Class ItemShippingTargetImpl

java.lang.Object
com.commercetools.api.models.cart.ItemShippingTargetImpl
All Implemented Interfaces:
ItemShippingTarget, io.vrap.rmf.base.client.ModelBase

public class ItemShippingTargetImpl extends Object implements ItemShippingTarget, io.vrap.rmf.base.client.ModelBase

Determines the address (as a reference to an address in itemShippingAddresses) and the quantity shipped to the address.

If multiple shipping addresses are present for a Line Item or Custom Line Item, sub-quantities must be specified. An array of addresses and sub-quantities is stored per Line Item or Custom Line Item.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase

    io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
  • Constructor Summary

    Constructors
    Constructor
    Description
    create empty instance
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Key of the address in the Cart itemShippingAddresses.
    Quantity of Line Items or Custom Line Items shipped to the address with the specified addressKey.
    User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.
    int
     
    void
    setAddressKey(String addressKey)
    Key of the address in the Cart itemShippingAddresses.
    void
    setQuantity(Long quantity)
    Quantity of Line Items or Custom Line Items shipped to the address with the specified addressKey.
    void
    setShippingMethodKey(String shippingMethodKey)
    User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.commercetools.api.models.cart.ItemShippingTarget

    withItemShippingTarget

    Methods inherited from interface io.vrap.rmf.base.client.ModelBase

    reflectionString, reflectionString
  • Constructor Details

  • Method Details

    • getAddressKey

      Key of the address in the Cart itemShippingAddresses. Duplicate address keys are not allowed.

      Specified by:
      getAddressKey in interface ItemShippingTarget
      Returns:
      addressKey
    • getQuantity

      public Long getQuantity()

      Quantity of Line Items or Custom Line Items shipped to the address with the specified addressKey.

      If a quantity is updated to 0 when defining ItemShippingDetailsDraft, the targets are removed from a Line Item or Custom Line Item in the resulting ItemShippingDetails.

      Specified by:
      getQuantity in interface ItemShippingTarget
      Returns:
      quantity
    • getShippingMethodKey

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

      It connects Line Item quantities with individual shipping addresses.

      Specified by:
      getShippingMethodKey in interface ItemShippingTarget
      Returns:
      shippingMethodKey
    • setAddressKey

      public void setAddressKey(String addressKey)
      Description copied from interface: ItemShippingTarget

      Key of the address in the Cart itemShippingAddresses. Duplicate address keys are not allowed.

      Specified by:
      setAddressKey in interface ItemShippingTarget
      Parameters:
      addressKey - value to be set
    • setQuantity

      public void setQuantity(Long quantity)
      Description copied from interface: ItemShippingTarget

      Quantity of Line Items or Custom Line Items shipped to the address with the specified addressKey.

      If a quantity is updated to 0 when defining ItemShippingDetailsDraft, the targets are removed from a Line Item or Custom Line Item in the resulting ItemShippingDetails.

      Specified by:
      setQuantity in interface ItemShippingTarget
      Parameters:
      quantity - value to be set
    • setShippingMethodKey

      public void setShippingMethodKey(String shippingMethodKey)
      Description copied from interface: ItemShippingTarget

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

      It connects Line Item quantities with individual shipping addresses.

      Specified by:
      setShippingMethodKey in interface ItemShippingTarget
      Parameters:
      shippingMethodKey - value to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object