Class CartImpl

java.lang.Object
com.commercetools.api.models.cart.CartImpl
All Implemented Interfaces:
Cart, CartMixin, BaseResource, Customizable<Cart>, DomainResource<Cart>, Identifiable<Cart>, OrderLike<Cart>, Referencable<Cart>, ResourceIdentifiable<Cart>, Versioned<Cart>, WithKey, io.vrap.rmf.base.client.ModelBase

public class CartImpl extends Object implements Cart, io.vrap.rmf.base.client.ModelBase
Cart
  • Constructor Details

    • CartImpl

      public CartImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Unique identifier of the Cart.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface Cart
      Specified by:
      getId in interface DomainResource<Cart>
      Specified by:
      getId in interface Identifiable<Cart>
      Specified by:
      getId in interface OrderLike<Cart>
      Specified by:
      getId in interface Versioned<Cart>
      Returns:
      id
    • getVersion

      public Long getVersion()

      Current version of the Cart.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface Cart
      Specified by:
      getVersion in interface DomainResource<Cart>
      Specified by:
      getVersion in interface OrderLike<Cart>
      Specified by:
      getVersion in interface Versioned<Cart>
      Returns:
      version
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

      Date and time (UTC) the Cart was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Specified by:
      getCreatedAt in interface Cart
      Specified by:
      getCreatedAt in interface OrderLike<Cart>
      Returns:
      createdAt
    • getLastModifiedAt

      public ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the Cart was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Specified by:
      getLastModifiedAt in interface Cart
      Specified by:
      getLastModifiedAt in interface OrderLike<Cart>
      Returns:
      lastModifiedAt
    • getKey

      public String getKey()

      User-defined unique identifier of the Cart.

      Specified by:
      getKey in interface Cart
      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getCustomerId

      public String getCustomerId()

      id of the Customer that the Cart belongs to.

      Specified by:
      getCustomerId in interface Cart
      Specified by:
      getCustomerId in interface OrderLike<Cart>
      Returns:
      customerId
    • getCustomerEmail

      public String getCustomerEmail()

      Email address of the Customer that the Cart belongs to.

      Specified by:
      getCustomerEmail in interface Cart
      Specified by:
      getCustomerEmail in interface OrderLike<Cart>
      Returns:
      customerEmail
    • getCustomerGroup

      public CustomerGroupReference getCustomerGroup()

      Reference to the Customer Group of the Customer that the Cart belongs to. Used for LineItem Price selection.

      Specified by:
      getCustomerGroup in interface Cart
      Specified by:
      getCustomerGroup in interface OrderLike<Cart>
      Returns:
      customerGroup
    • getAnonymousId

      public String getAnonymousId()

      Anonymous session associated with the Cart.

      Specified by:
      getAnonymousId in interface Cart
      Specified by:
      getAnonymousId in interface OrderLike<Cart>
      Returns:
      anonymousId
    • getBusinessUnit

      public BusinessUnitKeyReference getBusinessUnit()

      Reference to a Business Unit the Cart belongs to.

      Specified by:
      getBusinessUnit in interface Cart
      Returns:
      businessUnit
    • getStore

      public StoreKeyReference getStore()

      Reference to a Store the Cart belongs to.

      Specified by:
      getStore in interface Cart
      Specified by:
      getStore in interface OrderLike<Cart>
      Returns:
      store
    • getLineItems

      public List<LineItem> getLineItems()

      Line Items added to the Cart.

      Specified by:
      getLineItems in interface Cart
      Specified by:
      getLineItems in interface OrderLike<Cart>
      Returns:
      lineItems
    • getCustomLineItems

      public List<CustomLineItem> getCustomLineItems()

      Custom Line Items added to the Cart.

      Specified by:
      getCustomLineItems in interface Cart
      Specified by:
      getCustomLineItems in interface OrderLike<Cart>
      Returns:
      customLineItems
    • getTotalLineItemQuantity

      public Long getTotalLineItemQuantity()

      Sum of all LineItem quantities, excluding CustomLineItems. Only present when the Cart has at least one LineItem.

      Specified by:
      getTotalLineItemQuantity in interface Cart
      Returns:
      totalLineItemQuantity
    • getTotalPrice

      public CentPrecisionMoney getTotalPrice()

      Sum of the totalPrice field of all LineItems and CustomLineItems, and if available, the price field of ShippingInfo. If a discount applies on totalPrice, this field holds the discounted value.

      Taxes are included if TaxRate includedInPrice is true for each price.

      Specified by:
      getTotalPrice in interface Cart
      Specified by:
      getTotalPrice in interface OrderLike<Cart>
      Returns:
      totalPrice
    • getTaxedPrice

      public TaxedPrice getTaxedPrice()
      • For a Cart with Platform TaxMode, it is automatically set when a shipping address is set.
      • For a Cart with External TaxMode, it is automatically set when shippingAddress and external Tax Rates for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set.

      If a discount applies on totalPrice, this field holds the discounted values.

      Specified by:
      getTaxedPrice in interface Cart
      Specified by:
      getTaxedPrice in interface OrderLike<Cart>
      Returns:
      taxedPrice
    • getTaxedShippingPrice

      public TaxedPrice getTaxedShippingPrice()

      Sum of the taxedPrice field of ShippingInfo across all Shipping Methods.

      Specified by:
      getTaxedShippingPrice in interface Cart
      Returns:
      taxedShippingPrice
    • getDiscountOnTotalPrice

      public DiscountOnTotalPrice getDiscountOnTotalPrice()

      Discounts that apply on the Cart totalPrice.

      Specified by:
      getDiscountOnTotalPrice in interface Cart
      Returns:
      discountOnTotalPrice
    • getTaxMode

      public TaxMode getTaxMode()

      Indicates how Tax Rates are set.

      Specified by:
      getTaxMode in interface Cart
      Specified by:
      getTaxMode in interface OrderLike<Cart>
      Returns:
      taxMode
    • getTaxRoundingMode

      public RoundingMode getTaxRoundingMode()

      Indicates how monetary values are rounded when calculating taxes for taxedPrice.

      Specified by:
      getTaxRoundingMode in interface Cart
      Specified by:
      getTaxRoundingMode in interface OrderLike<Cart>
      Returns:
      taxRoundingMode
    • getTaxCalculationMode

      public TaxCalculationMode getTaxCalculationMode()

      Indicates how taxes are calculated when calculating taxes for taxedPrice.

      Specified by:
      getTaxCalculationMode in interface Cart
      Specified by:
      getTaxCalculationMode in interface OrderLike<Cart>
      Returns:
      taxCalculationMode
    • getInventoryMode

      public InventoryMode getInventoryMode()

      Indicates how stock quantities are tracked for Line Items in the Cart.

      Specified by:
      getInventoryMode in interface Cart
      Specified by:
      getInventoryMode in interface OrderLike<Cart>
      Returns:
      inventoryMode
    • getCartState

      public CartState getCartState()

      Current status of the Cart.

      Specified by:
      getCartState in interface Cart
      Returns:
      cartState
    • getBillingAddress

      public Address getBillingAddress()

      Billing address associated with the Cart.

      Specified by:
      getBillingAddress in interface Cart
      Specified by:
      getBillingAddress in interface OrderLike<Cart>
      Returns:
      billingAddress
    • getShippingAddress

      public Address getShippingAddress()

      Shipping address for a Cart with Single ShippingMode. Determines eligible ShippingMethod rates and Tax Rates of Line Items.

      Specified by:
      getShippingAddress in interface Cart
      Specified by:
      getShippingAddress in interface OrderLike<Cart>
      Returns:
      shippingAddress
    • getShippingMode

      public ShippingMode getShippingMode()

      Indicates whether the Cart has one or multiple Shipping Methods.

      Specified by:
      getShippingMode in interface Cart
      Returns:
      shippingMode
    • getShippingKey

      public String getShippingKey()

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

      Specified by:
      getShippingKey in interface Cart
      Returns:
      shippingKey
    • getShippingInfo

      public ShippingInfo getShippingInfo()

      Shipping-related information of a Cart with Single ShippingMode. Automatically set when a Shipping Method is set.

      Specified by:
      getShippingInfo in interface Cart
      Specified by:
      getShippingInfo in interface OrderLike<Cart>
      Returns:
      shippingInfo
    • getShippingRateInput

      public ShippingRateInput 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 is ClassificationShippingRateInput.
      • If CartScore, it is ScoreShippingRateInput.
      • If CartValue, it cannot be used.
      Specified by:
      getShippingRateInput in interface Cart
      Specified by:
      getShippingRateInput in interface OrderLike<Cart>
      Returns:
      shippingRateInput
    • getShippingCustomFields

      public CustomFields getShippingCustomFields()

      Custom Fields of the Shipping Method in a Cart with Single ShippingMode.

      Specified by:
      getShippingCustomFields in interface Cart
      Specified by:
      getShippingCustomFields in interface OrderLike<Cart>
      Returns:
      shippingCustomFields
    • getShipping

      public List<Shipping> getShipping()

      Shipping-related information of a Cart with Multiple ShippingMode. Updated automatically each time a new Shipping Method is added.

      Specified by:
      getShipping in interface Cart
      Returns:
      shipping
    • getItemShippingAddresses

      public List<Address> getItemShippingAddresses()

      Additional shipping addresses of the Cart as specified by LineItems using the shippingDetails field.

      For Carts with Single ShippingMode: eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress, and not itemShippingAddresses.

      Specified by:
      getItemShippingAddresses in interface Cart
      Specified by:
      getItemShippingAddresses in interface OrderLike<Cart>
      Returns:
      itemShippingAddresses
    • getDiscountCodes

      public List<DiscountCodeInfo> getDiscountCodes()

      Discount Codes applied to the Cart. A Cart that has directDiscounts cannot have discountCodes.

      Specified by:
      getDiscountCodes in interface Cart
      Specified by:
      getDiscountCodes in interface OrderLike<Cart>
      Returns:
      discountCodes
    • getDirectDiscounts

      public List<DirectDiscount> getDirectDiscounts()

      Direct Discounts added to the Cart. A Cart that has discountCodes cannot have directDiscounts.

      Specified by:
      getDirectDiscounts in interface Cart
      Returns:
      directDiscounts
    • getRefusedGifts

      public List<CartDiscountReference> getRefusedGifts()

      Automatically set when a Line Item with GiftLineItem LineItemMode is removed from the Cart.

      Specified by:
      getRefusedGifts in interface Cart
      Specified by:
      getRefusedGifts in interface OrderLike<Cart>
      Returns:
      refusedGifts
    • getPaymentInfo

      public PaymentInfo getPaymentInfo()

      Payment information related to the Cart.

      Specified by:
      getPaymentInfo in interface Cart
      Specified by:
      getPaymentInfo in interface OrderLike<Cart>
      Returns:
      paymentInfo
    • getCountry

      public String getCountry()

      Used for LineItem Price selection.

      Specified by:
      getCountry in interface Cart
      Specified by:
      getCountry in interface OrderLike<Cart>
      Returns:
      country
    • getLocale

      public String getLocale()

      Languages of the Cart. Can only contain languages supported by the Project.

      Specified by:
      getLocale in interface Cart
      Specified by:
      getLocale in interface OrderLike<Cart>
      Returns:
      locale
    • getOrigin

      public CartOrigin getOrigin()

      Indicates how the Cart was created.

      Specified by:
      getOrigin in interface Cart
      Specified by:
      getOrigin in interface OrderLike<Cart>
      Returns:
      origin
    • getCustom

      public CustomFields getCustom()

      Custom Fields of the Cart.

      Specified by:
      getCustom in interface Cart
      Specified by:
      getCustom in interface Customizable<Cart>
      Specified by:
      getCustom in interface OrderLike<Cart>
      Returns:
      custom
    • getDeleteDaysAfterLastModification

      public Integer getDeleteDaysAfterLastModification()

      Number of days after which an active Cart is deleted since its last modification. Configured in Project settings.

      Specified by:
      getDeleteDaysAfterLastModification in interface Cart
      Returns:
      deleteDaysAfterLastModification
    • getLastModifiedBy

      public LastModifiedBy getLastModifiedBy()

      Present on resources updated after 1 February 2019 except for events not tracked.

      Specified by:
      getLastModifiedBy in interface Cart
      Specified by:
      getLastModifiedBy in interface OrderLike<Cart>
      Returns:
      lastModifiedBy
    • getCreatedBy

      public CreatedBy getCreatedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getCreatedBy in interface Cart
      Specified by:
      getCreatedBy in interface OrderLike<Cart>
      Returns:
      createdBy
    • setId

      public void setId(String id)
      Description copied from interface: Cart

      Unique identifier of the Cart.

      Specified by:
      setId in interface BaseResource
      Specified by:
      setId in interface Cart
      Parameters:
      id - value to be set
    • setVersion

      public void setVersion(Long version)
      Description copied from interface: Cart

      Current version of the Cart.

      Specified by:
      setVersion in interface BaseResource
      Specified by:
      setVersion in interface Cart
      Parameters:
      version - value to be set
    • setCreatedAt

      public void setCreatedAt(ZonedDateTime createdAt)
      Description copied from interface: Cart

      Date and time (UTC) the Cart was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Specified by:
      setCreatedAt in interface Cart
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      public void setLastModifiedAt(ZonedDateTime lastModifiedAt)
      Description copied from interface: Cart

      Date and time (UTC) the Cart was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Specified by:
      setLastModifiedAt in interface Cart
      Parameters:
      lastModifiedAt - value to be set
    • setKey

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

      User-defined unique identifier of the Cart.

      Specified by:
      setKey in interface Cart
      Parameters:
      key - value to be set
    • setCustomerId

      public void setCustomerId(String customerId)
      Description copied from interface: Cart

      id of the Customer that the Cart belongs to.

      Specified by:
      setCustomerId in interface Cart
      Parameters:
      customerId - value to be set
    • setCustomerEmail

      public void setCustomerEmail(String customerEmail)
      Description copied from interface: Cart

      Email address of the Customer that the Cart belongs to.

      Specified by:
      setCustomerEmail in interface Cart
      Parameters:
      customerEmail - value to be set
    • setCustomerGroup

      public void setCustomerGroup(CustomerGroupReference customerGroup)
      Description copied from interface: Cart

      Reference to the Customer Group of the Customer that the Cart belongs to. Used for LineItem Price selection.

      Specified by:
      setCustomerGroup in interface Cart
      Parameters:
      customerGroup - value to be set
    • setAnonymousId

      public void setAnonymousId(String anonymousId)
      Description copied from interface: Cart

      Anonymous session associated with the Cart.

      Specified by:
      setAnonymousId in interface Cart
      Parameters:
      anonymousId - value to be set
    • setBusinessUnit

      public void setBusinessUnit(BusinessUnitKeyReference businessUnit)
      Description copied from interface: Cart

      Reference to a Business Unit the Cart belongs to.

      Specified by:
      setBusinessUnit in interface Cart
      Parameters:
      businessUnit - value to be set
    • setStore

      public void setStore(StoreKeyReference store)
      Description copied from interface: Cart

      Reference to a Store the Cart belongs to.

      Specified by:
      setStore in interface Cart
      Parameters:
      store - value to be set
    • setLineItems

      public void setLineItems(LineItem... lineItems)
      Description copied from interface: Cart

      Line Items added to the Cart.

      Specified by:
      setLineItems in interface Cart
      Parameters:
      lineItems - values to be set
    • setLineItems

      public void setLineItems(List<LineItem> lineItems)
      Description copied from interface: Cart

      Line Items added to the Cart.

      Specified by:
      setLineItems in interface Cart
      Parameters:
      lineItems - values to be set
    • setCustomLineItems

      public void setCustomLineItems(CustomLineItem... customLineItems)
      Description copied from interface: Cart

      Custom Line Items added to the Cart.

      Specified by:
      setCustomLineItems in interface Cart
      Parameters:
      customLineItems - values to be set
    • setCustomLineItems

      public void setCustomLineItems(List<CustomLineItem> customLineItems)
      Description copied from interface: Cart

      Custom Line Items added to the Cart.

      Specified by:
      setCustomLineItems in interface Cart
      Parameters:
      customLineItems - values to be set
    • setTotalLineItemQuantity

      public void setTotalLineItemQuantity(Long totalLineItemQuantity)
      Description copied from interface: Cart

      Sum of all LineItem quantities, excluding CustomLineItems. Only present when the Cart has at least one LineItem.

      Specified by:
      setTotalLineItemQuantity in interface Cart
      Parameters:
      totalLineItemQuantity - value to be set
    • setTotalPrice

      public void setTotalPrice(CentPrecisionMoney totalPrice)
      Description copied from interface: Cart

      Sum of the totalPrice field of all LineItems and CustomLineItems, and if available, the price field of ShippingInfo. If a discount applies on totalPrice, this field holds the discounted value.

      Taxes are included if TaxRate includedInPrice is true for each price.

      Specified by:
      setTotalPrice in interface Cart
      Parameters:
      totalPrice - value to be set
    • setTaxedPrice

      public void setTaxedPrice(TaxedPrice taxedPrice)
      Description copied from interface: Cart
      • For a Cart with Platform TaxMode, it is automatically set when a shipping address is set.
      • For a Cart with External TaxMode, it is automatically set when shippingAddress and external Tax Rates for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set.

      If a discount applies on totalPrice, this field holds the discounted values.

      Specified by:
      setTaxedPrice in interface Cart
      Parameters:
      taxedPrice - value to be set
    • setTaxedShippingPrice

      public void setTaxedShippingPrice(TaxedPrice taxedShippingPrice)
      Description copied from interface: Cart

      Sum of the taxedPrice field of ShippingInfo across all Shipping Methods.

      Specified by:
      setTaxedShippingPrice in interface Cart
      Parameters:
      taxedShippingPrice - value to be set
    • setDiscountOnTotalPrice

      public void setDiscountOnTotalPrice(DiscountOnTotalPrice discountOnTotalPrice)
      Description copied from interface: Cart

      Discounts that apply on the Cart totalPrice.

      Specified by:
      setDiscountOnTotalPrice in interface Cart
      Parameters:
      discountOnTotalPrice - value to be set
    • setTaxMode

      public void setTaxMode(TaxMode taxMode)
      Description copied from interface: Cart

      Indicates how Tax Rates are set.

      Specified by:
      setTaxMode in interface Cart
      Parameters:
      taxMode - value to be set
    • setTaxRoundingMode

      public void setTaxRoundingMode(RoundingMode taxRoundingMode)
      Description copied from interface: Cart

      Indicates how monetary values are rounded when calculating taxes for taxedPrice.

      Specified by:
      setTaxRoundingMode in interface Cart
      Parameters:
      taxRoundingMode - value to be set
    • setTaxCalculationMode

      public void setTaxCalculationMode(TaxCalculationMode taxCalculationMode)
      Description copied from interface: Cart

      Indicates how taxes are calculated when calculating taxes for taxedPrice.

      Specified by:
      setTaxCalculationMode in interface Cart
      Parameters:
      taxCalculationMode - value to be set
    • setInventoryMode

      public void setInventoryMode(InventoryMode inventoryMode)
      Description copied from interface: Cart

      Indicates how stock quantities are tracked for Line Items in the Cart.

      Specified by:
      setInventoryMode in interface Cart
      Parameters:
      inventoryMode - value to be set
    • setCartState

      public void setCartState(CartState cartState)
      Description copied from interface: Cart

      Current status of the Cart.

      Specified by:
      setCartState in interface Cart
      Parameters:
      cartState - value to be set
    • setBillingAddress

      public void setBillingAddress(Address billingAddress)
      Description copied from interface: Cart

      Billing address associated with the Cart.

      Specified by:
      setBillingAddress in interface Cart
      Parameters:
      billingAddress - value to be set
    • setShippingAddress

      public void setShippingAddress(Address shippingAddress)
      Description copied from interface: Cart

      Shipping address for a Cart with Single ShippingMode. Determines eligible ShippingMethod rates and Tax Rates of Line Items.

      Specified by:
      setShippingAddress in interface Cart
      Parameters:
      shippingAddress - value to be set
    • setShippingMode

      public void setShippingMode(ShippingMode shippingMode)
      Description copied from interface: Cart

      Indicates whether the Cart has one or multiple Shipping Methods.

      Specified by:
      setShippingMode in interface Cart
      Parameters:
      shippingMode - value to be set
    • setShippingKey

      public void setShippingKey(String shippingKey)
      Description copied from interface: Cart

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

      Specified by:
      setShippingKey in interface Cart
      Parameters:
      shippingKey - value to be set
    • setShippingInfo

      public void setShippingInfo(ShippingInfo shippingInfo)
      Description copied from interface: Cart

      Shipping-related information of a Cart with Single ShippingMode. Automatically set when a Shipping Method is set.

      Specified by:
      setShippingInfo in interface Cart
      Parameters:
      shippingInfo - value to be set
    • setShippingRateInput

      public void setShippingRateInput(ShippingRateInput shippingRateInput)
      Description copied from interface: Cart

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

      • If CartClassification, it is ClassificationShippingRateInput.
      • If CartScore, it is ScoreShippingRateInput.
      • If CartValue, it cannot be used.
      Specified by:
      setShippingRateInput in interface Cart
      Parameters:
      shippingRateInput - value to be set
    • setShippingCustomFields

      public void setShippingCustomFields(CustomFields shippingCustomFields)
      Description copied from interface: Cart

      Custom Fields of the Shipping Method in a Cart with Single ShippingMode.

      Specified by:
      setShippingCustomFields in interface Cart
      Parameters:
      shippingCustomFields - value to be set
    • setShipping

      public void setShipping(Shipping... shipping)
      Description copied from interface: Cart

      Shipping-related information of a Cart with Multiple ShippingMode. Updated automatically each time a new Shipping Method is added.

      Specified by:
      setShipping in interface Cart
      Parameters:
      shipping - values to be set
    • setShipping

      public void setShipping(List<Shipping> shipping)
      Description copied from interface: Cart

      Shipping-related information of a Cart with Multiple ShippingMode. Updated automatically each time a new Shipping Method is added.

      Specified by:
      setShipping in interface Cart
      Parameters:
      shipping - values to be set
    • setItemShippingAddresses

      public void setItemShippingAddresses(Address... itemShippingAddresses)
      Description copied from interface: Cart

      Additional shipping addresses of the Cart as specified by LineItems using the shippingDetails field.

      For Carts with Single ShippingMode: eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress, and not itemShippingAddresses.

      Specified by:
      setItemShippingAddresses in interface Cart
      Parameters:
      itemShippingAddresses - values to be set
    • setItemShippingAddresses

      public void setItemShippingAddresses(List<Address> itemShippingAddresses)
      Description copied from interface: Cart

      Additional shipping addresses of the Cart as specified by LineItems using the shippingDetails field.

      For Carts with Single ShippingMode: eligible Shipping Methods or applicable Tax Rates are determined by the address in shippingAddress, and not itemShippingAddresses.

      Specified by:
      setItemShippingAddresses in interface Cart
      Parameters:
      itemShippingAddresses - values to be set
    • setDiscountCodes

      public void setDiscountCodes(DiscountCodeInfo... discountCodes)
      Description copied from interface: Cart

      Discount Codes applied to the Cart. A Cart that has directDiscounts cannot have discountCodes.

      Specified by:
      setDiscountCodes in interface Cart
      Parameters:
      discountCodes - values to be set
    • setDiscountCodes

      public void setDiscountCodes(List<DiscountCodeInfo> discountCodes)
      Description copied from interface: Cart

      Discount Codes applied to the Cart. A Cart that has directDiscounts cannot have discountCodes.

      Specified by:
      setDiscountCodes in interface Cart
      Parameters:
      discountCodes - values to be set
    • setDirectDiscounts

      public void setDirectDiscounts(DirectDiscount... directDiscounts)
      Description copied from interface: Cart

      Direct Discounts added to the Cart. A Cart that has discountCodes cannot have directDiscounts.

      Specified by:
      setDirectDiscounts in interface Cart
      Parameters:
      directDiscounts - values to be set
    • setDirectDiscounts

      public void setDirectDiscounts(List<DirectDiscount> directDiscounts)
      Description copied from interface: Cart

      Direct Discounts added to the Cart. A Cart that has discountCodes cannot have directDiscounts.

      Specified by:
      setDirectDiscounts in interface Cart
      Parameters:
      directDiscounts - values to be set
    • setRefusedGifts

      public void setRefusedGifts(CartDiscountReference... refusedGifts)
      Description copied from interface: Cart

      Automatically set when a Line Item with GiftLineItem LineItemMode is removed from the Cart.

      Specified by:
      setRefusedGifts in interface Cart
      Parameters:
      refusedGifts - values to be set
    • setRefusedGifts

      public void setRefusedGifts(List<CartDiscountReference> refusedGifts)
      Description copied from interface: Cart

      Automatically set when a Line Item with GiftLineItem LineItemMode is removed from the Cart.

      Specified by:
      setRefusedGifts in interface Cart
      Parameters:
      refusedGifts - values to be set
    • setPaymentInfo

      public void setPaymentInfo(PaymentInfo paymentInfo)
      Description copied from interface: Cart

      Payment information related to the Cart.

      Specified by:
      setPaymentInfo in interface Cart
      Parameters:
      paymentInfo - value to be set
    • setCountry

      public void setCountry(String country)
      Description copied from interface: Cart

      Used for LineItem Price selection.

      Specified by:
      setCountry in interface Cart
      Parameters:
      country - value to be set
    • setLocale

      public void setLocale(String locale)
      Description copied from interface: Cart

      Languages of the Cart. Can only contain languages supported by the Project.

      Specified by:
      setLocale in interface Cart
      Parameters:
      locale - value to be set
    • setOrigin

      public void setOrigin(CartOrigin origin)
      Description copied from interface: Cart

      Indicates how the Cart was created.

      Specified by:
      setOrigin in interface Cart
      Parameters:
      origin - value to be set
    • setCustom

      public void setCustom(CustomFields custom)
      Description copied from interface: Cart

      Custom Fields of the Cart.

      Specified by:
      setCustom in interface Cart
      Specified by:
      setCustom in interface Customizable<Cart>
      Parameters:
      custom - value to be set
    • setDeleteDaysAfterLastModification

      public void setDeleteDaysAfterLastModification(Integer deleteDaysAfterLastModification)
      Description copied from interface: Cart

      Number of days after which an active Cart is deleted since its last modification. Configured in Project settings.

      Specified by:
      setDeleteDaysAfterLastModification in interface Cart
      Parameters:
      deleteDaysAfterLastModification - value to be set
    • setLastModifiedBy

      public void setLastModifiedBy(LastModifiedBy lastModifiedBy)
      Description copied from interface: Cart

      Present on resources updated after 1 February 2019 except for events not tracked.

      Specified by:
      setLastModifiedBy in interface Cart
      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      public void setCreatedBy(CreatedBy createdBy)
      Description copied from interface: Cart

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setCreatedBy in interface Cart
      Parameters:
      createdBy - value to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object