Interface Cart
- All Superinterfaces:
BaseResource
,CartMixin
,Customizable<Cart>
,DomainResource<Cart>
,Identifiable<Cart>
,OrderLike<Cart>
,Referencable<Cart>
,ResourceIdentifiable<Cart>
,Versioned<Cart>
,WithKey
Example to create an instance using the builder pattern
Cart cart = Cart.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.plusLineItems(lineItemsBuilder -> lineItemsBuilder)
.plusCustomLineItems(customLineItemsBuilder -> customLineItemsBuilder)
.totalPrice(totalPriceBuilder -> totalPriceBuilder)
.taxMode(TaxMode.PLATFORM)
.taxRoundingMode(RoundingMode.HALF_EVEN)
.taxCalculationMode(TaxCalculationMode.LINE_ITEM_LEVEL)
.inventoryMode(InventoryMode.NONE)
.cartState(CartState.ACTIVE)
.shippingMode(ShippingMode.SINGLE)
.plusShipping(shippingBuilder -> shippingBuilder)
.plusItemShippingAddresses(itemShippingAddressesBuilder -> itemShippingAddressesBuilder)
.plusDiscountCodes(discountCodesBuilder -> discountCodesBuilder)
.plusDirectDiscounts(directDiscountsBuilder -> directDiscountsBuilder)
.plusRefusedGifts(refusedGiftsBuilder -> refusedGiftsBuilder)
.origin(CartOrigin.CUSTOMER)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CartBuilder
builder()
builder factory method for Cartstatic CartBuilder
create builder for Cart instancestatic Cart
factory method to create a deep copy of CartAnonymous session associated with the Cart.@Valid Address
Billing address associated with the Cart.@Valid BusinessUnitKeyReference
Reference to a Business Unit the Cart belongs to.@NotNull CartState
Current status of the Cart.Used for Line Item price selection.@NotNull ZonedDateTime
Date and time (UTC) the Cart was initially created.@Valid CreatedBy
IDs and references that created the Cart.@Valid CustomFields
Custom Fields of the Cart.Email address of the Customer that the Cart belongs to.@Valid CustomerGroupReference
Reference to the Customer Group of the Customer that the Cart belongs to.id
of the Customer that the Cart belongs to.@NotNull @Valid List<CustomLineItem>
Custom Line Items added to the Cart.Number of days after which an active Cart is deleted since its last modification.@NotNull @Valid List<DirectDiscount>
Direct Discounts added to the Cart.@NotNull @Valid List<DiscountCodeInfo>
Discount Codes applied to the Cart.@Valid DiscountOnTotalPrice
Discounts that apply on the CarttotalPrice
.@NotNull String
getId()
Unique identifier of the Cart.@NotNull InventoryMode
Indicates how stock quantities are tracked for Line Items in the Cart.Additional shipping addresses of the Cart as specified by LineItems using theshippingDetails
field.getKey()
User-defined unique identifier of the Cart.@NotNull ZonedDateTime
Date and time (UTC) the Cart was last updated.@Valid LastModifiedBy
IDs and references that last modified the Cart.Line Items added to the Cart.Languages of the Cart.@NotNull CartOrigin
Indicates how the Cart was created.@Valid PaymentInfo
Payment information related to the Cart.@NotNull @Valid List<CartDiscountReference>
Automatically set when a Line Item withGiftLineItem
LineItemMode is removed from the Cart.Shipping-related information of a Cart withMultiple
ShippingMode.@Valid Address
Shipping address for a Cart withSingle
ShippingMode.@Valid CustomFields
Custom Fields of the Shipping Method in a Cart withSingle
ShippingMode.@Valid ShippingInfo
Shipping-related information of a Cart withSingle
ShippingMode.User-defined unique identifier of the Shipping Method in a Cart withSingle
ShippingMode.@NotNull ShippingMode
Indicates whether the Cart has one or multiple Shipping Methods.@Valid ShippingRateInput
Input used to select a ShippingRatePriceTier.@Valid StoreKeyReference
getStore()
Reference to a Store the Cart belongs to.@NotNull TaxCalculationMode
Indicates how taxes are calculated when calculating taxes fortaxedPrice
.@Valid TaxedPrice
For a Cart withPlatform
TaxMode, it is automatically set when a shipping address is set.@Valid TaxedPrice
Sum of thetaxedPrice
field of ShippingInfo across all Shipping Methods.@NotNull TaxMode
Indicates how Tax Rates are set.@NotNull RoundingMode
Indicates how monetary values are rounded when calculating taxes fortaxedPrice
.Sum of all LineItem quantities, excluding CustomLineItems.@NotNull @Valid CentPrecisionMoney
Sum of thetotalPrice
field of all LineItems and CustomLineItems, and if available, theprice
field of ShippingInfo.@NotNull Long
Current version of the Cart.static Cart
of()
factory methodstatic Cart
factory method to create a shallow copy Cartvoid
setAnonymousId
(String anonymousId) Anonymous session associated with the Cart.void
setBillingAddress
(Address billingAddress) Billing address associated with the Cart.void
setBusinessUnit
(BusinessUnitKeyReference businessUnit) Reference to a Business Unit the Cart belongs to.void
setCartState
(CartState cartState) Current status of the Cart.void
setCountry
(String country) Used for Line Item price selection.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Cart was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the Cart.void
setCustom
(CustomFields custom) Custom Fields of the Cart.void
setCustomerEmail
(String customerEmail) Email address of the Customer that the Cart belongs to.void
setCustomerGroup
(CustomerGroupReference customerGroup) Reference to the Customer Group of the Customer that the Cart belongs to.void
setCustomerId
(String customerId) id
of the Customer that the Cart belongs to.void
setCustomLineItems
(CustomLineItem... customLineItems) Custom Line Items added to the Cart.void
setCustomLineItems
(List<CustomLineItem> customLineItems) Custom Line Items added to the Cart.void
setDeleteDaysAfterLastModification
(Integer deleteDaysAfterLastModification) Number of days after which an active Cart is deleted since its last modification.void
setDirectDiscounts
(DirectDiscount... directDiscounts) Direct Discounts added to the Cart.void
setDirectDiscounts
(List<DirectDiscount> directDiscounts) Direct Discounts added to the Cart.void
setDiscountCodes
(DiscountCodeInfo... discountCodes) Discount Codes applied to the Cart.void
setDiscountCodes
(List<DiscountCodeInfo> discountCodes) Discount Codes applied to the Cart.void
setDiscountOnTotalPrice
(DiscountOnTotalPrice discountOnTotalPrice) Discounts that apply on the CarttotalPrice
.void
Unique identifier of the Cart.void
setInventoryMode
(InventoryMode inventoryMode) Indicates how stock quantities are tracked for Line Items in the Cart.void
setItemShippingAddresses
(Address... itemShippingAddresses) Additional shipping addresses of the Cart as specified by LineItems using theshippingDetails
field.void
setItemShippingAddresses
(List<Address> itemShippingAddresses) Additional shipping addresses of the Cart as specified by LineItems using theshippingDetails
field.void
User-defined unique identifier of the Cart.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Cart was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Cart.void
setLineItems
(LineItem... lineItems) Line Items added to the Cart.void
setLineItems
(List<LineItem> lineItems) Line Items added to the Cart.void
Languages of the Cart.void
setOrigin
(CartOrigin origin) Indicates how the Cart was created.void
setPaymentInfo
(PaymentInfo paymentInfo) Payment information related to the Cart.void
setRefusedGifts
(CartDiscountReference... refusedGifts) Automatically set when a Line Item withGiftLineItem
LineItemMode is removed from the Cart.void
setRefusedGifts
(List<CartDiscountReference> refusedGifts) Automatically set when a Line Item withGiftLineItem
LineItemMode is removed from the Cart.void
setShipping
(Shipping... shipping) Shipping-related information of a Cart withMultiple
ShippingMode.void
setShipping
(List<Shipping> shipping) Shipping-related information of a Cart withMultiple
ShippingMode.void
setShippingAddress
(Address shippingAddress) Shipping address for a Cart withSingle
ShippingMode.void
setShippingCustomFields
(CustomFields shippingCustomFields) Custom Fields of the Shipping Method in a Cart withSingle
ShippingMode.void
setShippingInfo
(ShippingInfo shippingInfo) Shipping-related information of a Cart withSingle
ShippingMode.void
setShippingKey
(String shippingKey) User-defined unique identifier of the Shipping Method in a Cart withSingle
ShippingMode.void
setShippingMode
(ShippingMode shippingMode) Indicates whether the Cart has one or multiple Shipping Methods.void
setShippingRateInput
(ShippingRateInput shippingRateInput) Input used to select a ShippingRatePriceTier.void
setStore
(StoreKeyReference store) Reference to a Store the Cart belongs to.void
setTaxCalculationMode
(TaxCalculationMode taxCalculationMode) Indicates how taxes are calculated when calculating taxes fortaxedPrice
.void
setTaxedPrice
(TaxedPrice taxedPrice) For a Cart withPlatform
TaxMode, it is automatically set when a shipping address is set.void
setTaxedShippingPrice
(TaxedPrice taxedShippingPrice) Sum of thetaxedPrice
field of ShippingInfo across all Shipping Methods.void
setTaxMode
(TaxMode taxMode) Indicates how Tax Rates are set.void
setTaxRoundingMode
(RoundingMode taxRoundingMode) Indicates how monetary values are rounded when calculating taxes fortaxedPrice
.void
setTotalLineItemQuantity
(Long totalLineItemQuantity) Sum of all LineItem quantities, excluding CustomLineItems.void
setTotalPrice
(CentPrecisionMoney totalPrice) Sum of thetotalPrice
field of all LineItems and CustomLineItems, and if available, theprice
field of ShippingInfo.void
setVersion
(Long version) Current version of the Cart.static com.fasterxml.jackson.core.type.TypeReference<Cart>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.cart.CartMixin
toReference, toResourceIdentifier
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface com.commercetools.api.models.DomainResource
get
Methods inherited from interface com.commercetools.api.models.order.OrderLike
calculateSubTotalPrice
-
Method Details
-
getId
Unique identifier of the Cart.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<Cart>
- Specified by:
getId
in interfaceIdentifiable<Cart>
- Specified by:
getId
in interfaceOrderLike<Cart>
- Specified by:
getId
in interfaceVersioned<Cart>
- Returns:
- id
-
getVersion
Current version of the Cart.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<Cart>
- Specified by:
getVersion
in interfaceOrderLike<Cart>
- Specified by:
getVersion
in interfaceVersioned<Cart>
- Returns:
- version
-
getKey
String getKey()User-defined unique identifier of the Cart.
-
getCustomerId
String getCustomerId()id
of the Customer that the Cart belongs to.- Specified by:
getCustomerId
in interfaceOrderLike<Cart>
- Returns:
- customerId
-
getCustomerEmail
String getCustomerEmail()Email address of the Customer that the Cart belongs to.
- Specified by:
getCustomerEmail
in interfaceOrderLike<Cart>
- Returns:
- customerEmail
-
getCustomerGroup
Reference to the Customer Group of the Customer that the Cart belongs to. Used for Line Item price selection.
- Specified by:
getCustomerGroup
in interfaceOrderLike<Cart>
- Returns:
- customerGroup
-
getAnonymousId
String getAnonymousId()Anonymous session associated with the Cart.
- Specified by:
getAnonymousId
in interfaceOrderLike<Cart>
- Returns:
- anonymousId
-
getBusinessUnit
Reference to a Business Unit the Cart belongs to.
- Returns:
- businessUnit
-
getStore
Reference to a Store the Cart belongs to.
-
getLineItems
Line Items added to the Cart.
- Specified by:
getLineItems
in interfaceOrderLike<Cart>
- Returns:
- lineItems
-
getCustomLineItems
Custom Line Items added to the Cart.
- Specified by:
getCustomLineItems
in interfaceOrderLike<Cart>
- Returns:
- customLineItems
-
getTotalLineItemQuantity
Long getTotalLineItemQuantity()Sum of all LineItem quantities, excluding CustomLineItems. Only present when the Cart has at least one LineItem.
- Returns:
- totalLineItemQuantity
-
getTotalPrice
Sum of the
totalPrice
field of all LineItems and CustomLineItems, and if available, theprice
field of ShippingInfo. If a discount applies ontotalPrice
, this field holds the discounted value.Taxes are included if TaxRate
includedInPrice
istrue
for each price.- Specified by:
getTotalPrice
in interfaceOrderLike<Cart>
- Returns:
- totalPrice
-
getTaxedPrice
- For a Cart with
Platform
TaxMode, it is automatically set when a shipping address is set. For Carts withMultiple
ShippingMode, all Line Items and Custom Line Items must be fully distributed between the Shipping Methods (viashippingDetails
), otherwisetaxedPrice
is not automatically set. - For a Cart with
External
TaxMode, it is automatically set whenshippingAddress
and external Tax Rates for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set. For Carts withMultiple
ShippingMode, all allocations must have their respective tax rates present inperMethodTaxRate
, otherwisetaxedPrice
is not automatically set.
If a discount applies on
totalPrice
, this field holds the discounted values.- Specified by:
getTaxedPrice
in interfaceOrderLike<Cart>
- Returns:
- taxedPrice
- For a Cart with
-
getTaxedShippingPrice
Sum of the
taxedPrice
field of ShippingInfo across all Shipping Methods.- Returns:
- taxedShippingPrice
-
getDiscountOnTotalPrice
Discounts that apply on the Cart
totalPrice
.- Returns:
- discountOnTotalPrice
-
getTaxMode
Indicates how Tax Rates are set.
- Specified by:
getTaxMode
in interfaceOrderLike<Cart>
- Returns:
- taxMode
-
getTaxRoundingMode
Indicates how monetary values are rounded when calculating taxes for
taxedPrice
.- Specified by:
getTaxRoundingMode
in interfaceOrderLike<Cart>
- Returns:
- taxRoundingMode
-
getTaxCalculationMode
Indicates how taxes are calculated when calculating taxes for
taxedPrice
.- Specified by:
getTaxCalculationMode
in interfaceOrderLike<Cart>
- Returns:
- taxCalculationMode
-
getInventoryMode
Indicates how stock quantities are tracked for Line Items in the Cart.
- Specified by:
getInventoryMode
in interfaceOrderLike<Cart>
- Returns:
- inventoryMode
-
getCartState
Current status of the Cart.
- Returns:
- cartState
-
getBillingAddress
Billing address associated with the Cart.
- Specified by:
getBillingAddress
in interfaceOrderLike<Cart>
- Returns:
- billingAddress
-
getShippingAddress
Shipping address for a Cart with
Single
ShippingMode. Determines eligible ShippingMethod rates and Tax Rates of Line Items.- Specified by:
getShippingAddress
in interfaceOrderLike<Cart>
- Returns:
- shippingAddress
-
getShippingMode
Indicates whether the Cart has one or multiple Shipping Methods.
- Returns:
- shippingMode
-
getShippingKey
String getShippingKey()User-defined unique identifier of the Shipping Method in a Cart with
Single
ShippingMode.- Returns:
- shippingKey
-
getShippingInfo
Shipping-related information of a Cart with
Single
ShippingMode. Automatically set when a Shipping Method is set.- Specified by:
getShippingInfo
in interfaceOrderLike<Cart>
- Returns:
- shippingInfo
-
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 interfaceOrderLike<Cart>
- Returns:
- shippingRateInput
- If
-
getShippingCustomFields
Custom Fields of the Shipping Method in a Cart with
Single
ShippingMode.- Specified by:
getShippingCustomFields
in interfaceOrderLike<Cart>
- Returns:
- shippingCustomFields
-
getShipping
Shipping-related information of a Cart with
Multiple
ShippingMode. Updated automatically each time a new Shipping Method is added.- Returns:
- shipping
-
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 inshippingAddress
, and notitemShippingAddresses
.- Specified by:
getItemShippingAddresses
in interfaceOrderLike<Cart>
- Returns:
- itemShippingAddresses
-
getDiscountCodes
Discount Codes applied to the Cart. A Cart that has
directDiscounts
cannot havediscountCodes
.- Specified by:
getDiscountCodes
in interfaceOrderLike<Cart>
- Returns:
- discountCodes
-
getDirectDiscounts
Direct Discounts added to the Cart. A Cart that has
discountCodes
cannot havedirectDiscounts
.- Returns:
- directDiscounts
-
getRefusedGifts
Automatically set when a Line Item with
GiftLineItem
LineItemMode is removed from the Cart.- Specified by:
getRefusedGifts
in interfaceOrderLike<Cart>
- Returns:
- refusedGifts
-
getPaymentInfo
Payment information related to the Cart.
- Specified by:
getPaymentInfo
in interfaceOrderLike<Cart>
- Returns:
- paymentInfo
-
getCountry
String getCountry()Used for Line Item price selection.
- Specified by:
getCountry
in interfaceOrderLike<Cart>
- Returns:
- country
-
getLocale
String getLocale()Languages of the Cart. Can only contain languages supported by the Project.
-
getOrigin
Indicates how the Cart was created.
-
getCustom
Custom Fields of the Cart.
-
getDeleteDaysAfterLastModification
Integer getDeleteDaysAfterLastModification()Number of days after which an active Cart is deleted since its last modification. Configured in Project settings.
- Returns:
- deleteDaysAfterLastModification
-
getCreatedAt
Date and time (UTC) the Cart was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Specified by:
getCreatedAt
in interfaceOrderLike<Cart>
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Cart was last updated.
- Specified by:
getLastModifiedAt
in interfaceBaseResource
- Specified by:
getLastModifiedAt
in interfaceOrderLike<Cart>
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Cart.
- Specified by:
getLastModifiedBy
in interfaceOrderLike<Cart>
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Cart.
- Specified by:
getCreatedBy
in interfaceOrderLike<Cart>
- Returns:
- createdBy
-
setId
Unique identifier of the Cart.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the Cart.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setKey
User-defined unique identifier of the Cart.
- Parameters:
key
- value to be set
-
setCustomerId
id
of the Customer that the Cart belongs to.- Parameters:
customerId
- value to be set
-
setCustomerEmail
Email address of the Customer that the Cart belongs to.
- Parameters:
customerEmail
- value to be set
-
setCustomerGroup
Reference to the Customer Group of the Customer that the Cart belongs to. Used for Line Item price selection.
- Parameters:
customerGroup
- value to be set
-
setAnonymousId
Anonymous session associated with the Cart.
- Parameters:
anonymousId
- value to be set
-
setBusinessUnit
Reference to a Business Unit the Cart belongs to.
- Parameters:
businessUnit
- value to be set
-
setStore
Reference to a Store the Cart belongs to.
- Parameters:
store
- value to be set
-
setLineItems
Line Items added to the Cart.
- Parameters:
lineItems
- values to be set
-
setLineItems
Line Items added to the Cart.
- Parameters:
lineItems
- values to be set
-
setCustomLineItems
Custom Line Items added to the Cart.
- Parameters:
customLineItems
- values to be set
-
setCustomLineItems
Custom Line Items added to the Cart.
- Parameters:
customLineItems
- values to be set
-
setTotalLineItemQuantity
Sum of all LineItem quantities, excluding CustomLineItems. Only present when the Cart has at least one LineItem.
- Parameters:
totalLineItemQuantity
- value to be set
-
setTotalPrice
Sum of the
totalPrice
field of all LineItems and CustomLineItems, and if available, theprice
field of ShippingInfo. If a discount applies ontotalPrice
, this field holds the discounted value.Taxes are included if TaxRate
includedInPrice
istrue
for each price.- Parameters:
totalPrice
- value to be set
-
setTaxedPrice
- For a Cart with
Platform
TaxMode, it is automatically set when a shipping address is set. For Carts withMultiple
ShippingMode, all Line Items and Custom Line Items must be fully distributed between the Shipping Methods (viashippingDetails
), otherwisetaxedPrice
is not automatically set. - For a Cart with
External
TaxMode, it is automatically set whenshippingAddress
and external Tax Rates for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set. For Carts withMultiple
ShippingMode, all allocations must have their respective tax rates present inperMethodTaxRate
, otherwisetaxedPrice
is not automatically set.
If a discount applies on
totalPrice
, this field holds the discounted values.- Parameters:
taxedPrice
- value to be set
- For a Cart with
-
setTaxedShippingPrice
Sum of the
taxedPrice
field of ShippingInfo across all Shipping Methods.- Parameters:
taxedShippingPrice
- value to be set
-
setDiscountOnTotalPrice
Discounts that apply on the Cart
totalPrice
.- Parameters:
discountOnTotalPrice
- value to be set
-
setTaxMode
Indicates how Tax Rates are set.
- Parameters:
taxMode
- value to be set
-
setTaxRoundingMode
Indicates how monetary values are rounded when calculating taxes for
taxedPrice
.- Parameters:
taxRoundingMode
- value to be set
-
setTaxCalculationMode
Indicates how taxes are calculated when calculating taxes for
taxedPrice
.- Parameters:
taxCalculationMode
- value to be set
-
setInventoryMode
Indicates how stock quantities are tracked for Line Items in the Cart.
- Parameters:
inventoryMode
- value to be set
-
setCartState
Current status of the Cart.
- Parameters:
cartState
- value to be set
-
setBillingAddress
Billing address associated with the Cart.
- Parameters:
billingAddress
- value to be set
-
setShippingAddress
Shipping address for a Cart with
Single
ShippingMode. Determines eligible ShippingMethod rates and Tax Rates of Line Items.- Parameters:
shippingAddress
- value to be set
-
setShippingMode
Indicates whether the Cart has one or multiple Shipping Methods.
- Parameters:
shippingMode
- value to be set
-
setShippingKey
User-defined unique identifier of the Shipping Method in a Cart with
Single
ShippingMode.- Parameters:
shippingKey
- value to be set
-
setShippingInfo
Shipping-related information of a Cart with
Single
ShippingMode. Automatically set when a Shipping Method is set.- Parameters:
shippingInfo
- value to be set
-
setShippingRateInput
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.
- Parameters:
shippingRateInput
- value to be set
- If
-
setShippingCustomFields
Custom Fields of the Shipping Method in a Cart with
Single
ShippingMode.- Parameters:
shippingCustomFields
- value to be set
-
setShipping
Shipping-related information of a Cart with
Multiple
ShippingMode. Updated automatically each time a new Shipping Method is added.- Parameters:
shipping
- values to be set
-
setShipping
Shipping-related information of a Cart with
Multiple
ShippingMode. Updated automatically each time a new Shipping Method is added.- Parameters:
shipping
- values to be set
-
setItemShippingAddresses
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 inshippingAddress
, and notitemShippingAddresses
.- Parameters:
itemShippingAddresses
- values to be set
-
setItemShippingAddresses
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 inshippingAddress
, and notitemShippingAddresses
.- Parameters:
itemShippingAddresses
- values to be set
-
setDiscountCodes
Discount Codes applied to the Cart. A Cart that has
directDiscounts
cannot havediscountCodes
.- Parameters:
discountCodes
- values to be set
-
setDiscountCodes
Discount Codes applied to the Cart. A Cart that has
directDiscounts
cannot havediscountCodes
.- Parameters:
discountCodes
- values to be set
-
setDirectDiscounts
Direct Discounts added to the Cart. A Cart that has
discountCodes
cannot havedirectDiscounts
.- Parameters:
directDiscounts
- values to be set
-
setDirectDiscounts
Direct Discounts added to the Cart. A Cart that has
discountCodes
cannot havedirectDiscounts
.- Parameters:
directDiscounts
- values to be set
-
setRefusedGifts
Automatically set when a Line Item with
GiftLineItem
LineItemMode is removed from the Cart.- Parameters:
refusedGifts
- values to be set
-
setRefusedGifts
Automatically set when a Line Item with
GiftLineItem
LineItemMode is removed from the Cart.- Parameters:
refusedGifts
- values to be set
-
setPaymentInfo
Payment information related to the Cart.
- Parameters:
paymentInfo
- value to be set
-
setCountry
Used for Line Item price selection.
- Parameters:
country
- value to be set
-
setLocale
Languages of the Cart. Can only contain languages supported by the Project.
- Parameters:
locale
- value to be set
-
setOrigin
Indicates how the Cart was created.
- Parameters:
origin
- value to be set
-
setCustom
Custom Fields of the Cart.
- Specified by:
setCustom
in interfaceCustomizable<Cart>
- Parameters:
custom
- value to be set
-
setDeleteDaysAfterLastModification
Number of days after which an active Cart is deleted since its last modification. Configured in Project settings.
- Parameters:
deleteDaysAfterLastModification
- value to be set
-
setCreatedAt
Date and time (UTC) the Cart was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the Cart was last updated.
- Specified by:
setLastModifiedAt
in interfaceBaseResource
- Parameters:
lastModifiedAt
- value to be set
-
setLastModifiedBy
IDs and references that last modified the Cart.
- Parameters:
lastModifiedBy
- value to be set
-
setCreatedBy
IDs and references that created the Cart.
- Parameters:
createdBy
- value to be set
-
of
factory method- Returns:
- instance of Cart
-
of
factory method to create a shallow copy Cart- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Cart- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Cart- Returns:
- builder
-
builder
create builder for Cart instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCart
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-