Interface ShippingInfo

All Known Implementing Classes:
ShippingInfoImpl

public interface ShippingInfo
ShippingInfo
Example to create an instance using the builder pattern

     ShippingInfo shippingInfo = ShippingInfo.builder()
             .shippingMethodName("{shippingMethodName}")
             .price(priceBuilder -> priceBuilder)
             .shippingRate(shippingRateBuilder -> shippingRateBuilder)
             .shippingMethodState(ShippingMethodState.DOES_NOT_MATCH_CART)
             .build()
 
  • Method Details

    • getShippingMethodName

      @NotNull @NotNull String getShippingMethodName()

      Name of the Shipping Method.

      Returns:
      shippingMethodName
    • getPrice

      @NotNull @Valid @NotNull @Valid CentPrecisionMoney getPrice()

      Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or the shippingRateInput field.

      Returns:
      price
    • getShippingRate

      @NotNull @Valid @NotNull @Valid ShippingRate getShippingRate()

      Used to determine the price.

      Returns:
      shippingRate
    • getTaxedPrice

      @Valid @Valid TaxedItemPrice getTaxedPrice()

      Automatically set after the taxRate is set.

      Returns:
      taxedPrice
    • getTaxRate

      @Valid @Valid TaxRate getTaxRate()

      Automatically set in the Platform TaxMode after the shipping address is set.

      For the External TaxMode the Tax Rate must be set explicitly with the ExternalTaxRateDraft.

      Returns:
      taxRate
    • getTaxCategory

      @Valid @Valid TaxCategoryReference getTaxCategory()

      Used to select a Tax Rate when a Cart has the Platform TaxMode.

      Returns:
      taxCategory
    • getShippingMethod

      @Valid @Valid ShippingMethodReference getShippingMethod()

      Not set if a custom Shipping Method is used.

      Returns:
      shippingMethod
    • getDeliveries

      @Valid @Valid List<Delivery> getDeliveries()

      Information on how items are delivered to customers.

      Returns:
      deliveries
    • getDiscountedPrice

      @Valid @Valid DiscountedLineItemPrice getDiscountedPrice()

      Discounted price of the Shipping Method.

      Returns:
      discountedPrice
    • getShippingMethodState

      @NotNull @NotNull ShippingMethodState getShippingMethodState()

      Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.

      Returns:
      shippingMethodState
    • setShippingMethodName

      void setShippingMethodName(String shippingMethodName)

      Name of the Shipping Method.

      Parameters:
      shippingMethodName - value to be set
    • setPrice

      void setPrice(CentPrecisionMoney price)

      Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or the shippingRateInput field.

      Parameters:
      price - value to be set
    • setShippingRate

      void setShippingRate(ShippingRate shippingRate)

      Used to determine the price.

      Parameters:
      shippingRate - value to be set
    • setTaxedPrice

      void setTaxedPrice(TaxedItemPrice taxedPrice)

      Automatically set after the taxRate is set.

      Parameters:
      taxedPrice - value to be set
    • setTaxRate

      void setTaxRate(TaxRate taxRate)

      Automatically set in the Platform TaxMode after the shipping address is set.

      For the External TaxMode the Tax Rate must be set explicitly with the ExternalTaxRateDraft.

      Parameters:
      taxRate - value to be set
    • setTaxCategory

      void setTaxCategory(TaxCategoryReference taxCategory)

      Used to select a Tax Rate when a Cart has the Platform TaxMode.

      Parameters:
      taxCategory - value to be set
    • setShippingMethod

      void setShippingMethod(ShippingMethodReference shippingMethod)

      Not set if a custom Shipping Method is used.

      Parameters:
      shippingMethod - value to be set
    • setDeliveries

      void setDeliveries(Delivery... deliveries)

      Information on how items are delivered to customers.

      Parameters:
      deliveries - values to be set
    • setDeliveries

      void setDeliveries(List<Delivery> deliveries)

      Information on how items are delivered to customers.

      Parameters:
      deliveries - values to be set
    • setDiscountedPrice

      void setDiscountedPrice(DiscountedLineItemPrice discountedPrice)

      Discounted price of the Shipping Method.

      Parameters:
      discountedPrice - value to be set
    • setShippingMethodState

      void setShippingMethodState(ShippingMethodState shippingMethodState)

      Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.

      Parameters:
      shippingMethodState - value to be set
    • of

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

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

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

      static ShippingInfoBuilder builder()
      builder factory method for ShippingInfo
      Returns:
      builder
    • builder

      static ShippingInfoBuilder builder(ShippingInfo template)
      create builder for ShippingInfo instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withShippingInfo

      default <T> T withShippingInfo(Function<ShippingInfo,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<ShippingInfo> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference