Class MethodTaxedPriceBuilder

java.lang.Object
com.commercetools.api.models.cart.MethodTaxedPriceBuilder
All Implemented Interfaces:
Builder<MethodTaxedPrice>

public class MethodTaxedPriceBuilder extends Object implements Builder<MethodTaxedPrice>
MethodTaxedPriceBuilder
Example to create an instance using the builder pattern

     MethodTaxedPrice methodTaxedPrice = MethodTaxedPrice.builder()
             .shippingMethodKey("{shippingMethodKey}")
             .build()
 
  • Constructor Details

    • MethodTaxedPriceBuilder

      public MethodTaxedPriceBuilder()
  • Method Details

    • shippingMethodKey

      public MethodTaxedPriceBuilder shippingMethodKey(String shippingMethodKey)

      User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

      Parameters:
      shippingMethodKey - value to be set
      Returns:
      Builder
    • taxedPrice

      Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by shippingMethodKey.

      Parameters:
      builder - function to build the taxedPrice value
      Returns:
      Builder
    • withTaxedPrice

      Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by shippingMethodKey.

      Parameters:
      builder - function to build the taxedPrice value
      Returns:
      Builder
    • taxedPrice

      public MethodTaxedPriceBuilder taxedPrice(@Nullable TaxedItemPrice taxedPrice)

      Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by shippingMethodKey.

      Parameters:
      taxedPrice - value to be set
      Returns:
      Builder
    • getShippingMethodKey

      public String getShippingMethodKey()

      User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

      Returns:
      shippingMethodKey
    • getTaxedPrice

      @Nullable public TaxedItemPrice getTaxedPrice()

      Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by shippingMethodKey.

      Returns:
      taxedPrice
    • build

      public MethodTaxedPrice build()
      builds MethodTaxedPrice with checking for non-null required values
      Specified by:
      build in interface Builder<MethodTaxedPrice>
      Returns:
      MethodTaxedPrice
    • buildUnchecked

      public MethodTaxedPrice buildUnchecked()
      builds MethodTaxedPrice without checking for non-null required values
      Returns:
      MethodTaxedPrice
    • of

      public static MethodTaxedPriceBuilder of()
      factory method for an instance of MethodTaxedPriceBuilder
      Returns:
      builder
    • of

      public static MethodTaxedPriceBuilder of(MethodTaxedPrice template)
      create builder for MethodTaxedPrice instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder