Interface CartValueType

All Superinterfaces:
ShippingRateInputType

public interface CartValueType extends ShippingRateInputType

Used when the ShippingRate maps to the sum of LineItem Prices. The value of the Cart is used to select a tier. If chosen, it is not possible to set a value for the shippingRateInput on the Cart.


Example to create an instance using the builder pattern

     CartValueType cartValueType = CartValueType.builder()
             .build()
 
  • Field Details

  • Method Details

    • of

      static CartValueType of()
      factory method
      Returns:
      instance of CartValueType
    • of

      static CartValueType of(CartValueType template)
      factory method to create a shallow copy CartValueType
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static CartValueType deepCopy(@Nullable CartValueType template)
      factory method to create a deep copy of CartValueType
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static CartValueTypeBuilder builder()
      builder factory method for CartValueType
      Returns:
      builder
    • builder

      static CartValueTypeBuilder builder(CartValueType template)
      create builder for CartValueType instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCartValueType

      default <T> T withCartValueType(Function<CartValueType,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<CartValueType> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference