Class ShippingDraftImpl

java.lang.Object
com.commercetools.api.models.cart.ShippingDraftImpl
All Implemented Interfaces:
ShippingDraft, WithKey, io.vrap.rmf.base.client.Draft<ShippingDraft>, io.vrap.rmf.base.client.ModelBase

public class ShippingDraftImpl extends Object implements ShippingDraft, io.vrap.rmf.base.client.ModelBase

Wraps all shipping-related information (such as address, rate, deliveries) per Shipping Method for Carts with multiple Shipping Methods.

  • Constructor Details

    • ShippingDraftImpl

      public ShippingDraftImpl()
      create empty instance
  • Method Details

    • getKey

      public String getKey()

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

      Specified by:
      getKey in interface ShippingDraft
      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getShippingMethod

      public ShippingMethodReference getShippingMethod()

      Shipping Methods added to the Cart with Multiple ShippingMode.

      Specified by:
      getShippingMethod in interface ShippingDraft
      Returns:
      shippingMethod
    • getShippingAddress

      public BaseAddress getShippingAddress()

      Determines the shipping rate and Tax Rate of the associated Line Items.

      Specified by:
      getShippingAddress in interface ShippingDraft
      Returns:
      shippingAddress
    • getShippingRateInput

      public ShippingRateInputDraft getShippingRateInput()

      Input used to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

      • If CartClassification, it must be ClassificationShippingRateInputDraft.
      • If CartScore, it must be ScoreShippingRateInputDraft.
      • If CartValue, it cannot be set.
      Specified by:
      getShippingRateInput in interface ShippingDraft
      Returns:
      shippingRateInput
    • getExternalTaxRate

      public ExternalTaxRateDraft getExternalTaxRate()

      Tax Rate used for taxing a shipping expense if the Cart has the External TaxMode.

      Specified by:
      getExternalTaxRate in interface ShippingDraft
      Returns:
      externalTaxRate
    • getDeliveries

      public List<DeliveryDraft> getDeliveries()

      Deliveries to be shipped with the Shipping Method.

      Specified by:
      getDeliveries in interface ShippingDraft
      Returns:
      deliveries
    • getCustom

      public CustomFieldsDraft getCustom()

      Custom Fields for Shipping.

      Specified by:
      getCustom in interface ShippingDraft
      Returns:
      custom
    • setKey

      public void setKey(String key)
      Description copied from interface: ShippingDraft

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

      Specified by:
      setKey in interface ShippingDraft
      Parameters:
      key - value to be set
    • setShippingMethod

      public void setShippingMethod(ShippingMethodReference shippingMethod)
      Description copied from interface: ShippingDraft

      Shipping Methods added to the Cart with Multiple ShippingMode.

      Specified by:
      setShippingMethod in interface ShippingDraft
      Parameters:
      shippingMethod - value to be set
    • setShippingAddress

      public void setShippingAddress(BaseAddress shippingAddress)
      Description copied from interface: ShippingDraft

      Determines the shipping rate and Tax Rate of the associated Line Items.

      Specified by:
      setShippingAddress in interface ShippingDraft
      Parameters:
      shippingAddress - value to be set
    • setShippingRateInput

      public void setShippingRateInput(ShippingRateInputDraft shippingRateInput)
      Description copied from interface: ShippingDraft

      Input used to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

      • If CartClassification, it must be ClassificationShippingRateInputDraft.
      • If CartScore, it must be ScoreShippingRateInputDraft.
      • If CartValue, it cannot be set.
      Specified by:
      setShippingRateInput in interface ShippingDraft
      Parameters:
      shippingRateInput - value to be set
    • setExternalTaxRate

      public void setExternalTaxRate(ExternalTaxRateDraft externalTaxRate)
      Description copied from interface: ShippingDraft

      Tax Rate used for taxing a shipping expense if the Cart has the External TaxMode.

      Specified by:
      setExternalTaxRate in interface ShippingDraft
      Parameters:
      externalTaxRate - value to be set
    • setDeliveries

      public void setDeliveries(DeliveryDraft... deliveries)
      Description copied from interface: ShippingDraft

      Deliveries to be shipped with the Shipping Method.

      Specified by:
      setDeliveries in interface ShippingDraft
      Parameters:
      deliveries - values to be set
    • setDeliveries

      public void setDeliveries(List<DeliveryDraft> deliveries)
      Description copied from interface: ShippingDraft

      Deliveries to be shipped with the Shipping Method.

      Specified by:
      setDeliveries in interface ShippingDraft
      Parameters:
      deliveries - values to be set
    • setCustom

      public void setCustom(CustomFieldsDraft custom)
      Description copied from interface: ShippingDraft

      Custom Fields for Shipping.

      Specified by:
      setCustom in interface ShippingDraft
      Parameters:
      custom - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object