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)
.priceRoundingMode(RoundingMode.HALF_EVEN)
.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 CartBuilderbuilder()builder factory method for Cartstatic CartBuildercreate builder for Cart instancecopyDeep()static Cartfactory method to create a deep copy of CartAnonymous session associated with the Cart.@Valid AddressBilling address associated with the Cart.@Valid BusinessUnitKeyReferenceReference to a Business Unit the Cart belongs to.@NotNull CartStateCurrent status of the Cart.Used for Line Item price selection.@NotNull ZonedDateTimeDate and time (UTC) the Cart was initially created.@Valid CreatedByIDs and references that created the Cart.@Valid CustomFieldsCustom Fields of the Cart.Email address of the Customer that the Cart belongs to.@Valid CustomerGroupReferenceReference to the Customer Group of the Customer that the Cart belongs to.idof the Customer that the Cart belongs to.@NotNull @Valid List<CustomLineItem>Custom Line Items added to the Cart.Number of days after the last modification before a Cart is deleted.@NotNull @Valid List<DirectDiscount>Direct Discounts added to the Cart.@NotNull @Valid List<DiscountCodeInfo>Discount Codes applied to the Cart.@Valid DiscountOnTotalPriceDiscounts that apply on the CarttotalPrice.@Valid DiscountTypeCombinationIndicates if a combination of discount types can apply on a Cart.@NotNull StringgetId()Unique identifier of the Cart.@NotNull InventoryModeIndicates how stock quantities are tracked for Line Items in the Cart.Additional shipping addresses of the Cart as specified by LineItems using theshippingDetailsfield.getKey()User-defined unique identifier of the Cart.@NotNull ZonedDateTimeDate and time (UTC) the Cart was last updated.@Valid LastModifiedByIDs and references that last modified the Cart.Line Items added to the Cart.Language of the Cart.@NotNull CartOriginIndicates how the Cart was created.@Valid PaymentInfoPayment information related to the Cart.@NotNull RoundingModeIndicates how the total prices on LineItems and CustomLineItems are rounded when calculated.@NotNull @Valid List<CartDiscountReference>Shipping-related information of a Cart withMultipleShippingMode.@Valid AddressShipping address for a Cart withSingleShippingMode.@Valid CustomFieldsCustom Fields of the Shipping Method in a Cart withSingleShippingMode.@Valid ShippingInfoShipping-related information of a Cart withSingleShippingMode.User-defined unique identifier of the Shipping Method in a Cart withSingleShippingMode.@NotNull ShippingModeIndicates whether the Cart has one or multiple Shipping Methods.@Valid ShippingRateInputInput used to select a ShippingRatePriceTier.@Valid StoreKeyReferencegetStore()Reference to a Store the Cart belongs to.@NotNull TaxCalculationModeIndicates how taxes are calculated when calculating taxes fortaxedPrice.@Valid TaxedPrice@Valid TaxedPriceSum of thetaxedPricefield of ShippingInfo across all Shipping Methods.@NotNull TaxModeIndicates how Tax Rates are set.@NotNull RoundingModeIndicates how monetary values are rounded when calculating taxes fortaxedPrice.Sum of all LineItem quantities, excluding CustomLineItems.@NotNull @Valid CentPrecisionMoneySum of thetotalPricefield of all LineItems and CustomLineItems, and if available, thepricefield of ShippingInfo.@NotNull LongCurrent version of the Cart.static Cartof()factory methodstatic Cartfactory method to create a shallow copy CartvoidsetAnonymousId(String anonymousId) Anonymous session associated with the Cart.voidsetBillingAddress(Address billingAddress) Billing address associated with the Cart.voidsetBusinessUnit(BusinessUnitKeyReference businessUnit) Reference to a Business Unit the Cart belongs to.voidsetCartState(CartState cartState) Current status of the Cart.voidsetCountry(String country) Used for Line Item price selection.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Cart was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the Cart.voidsetCustom(CustomFields custom) Custom Fields of the Cart.voidsetCustomerEmail(String customerEmail) Email address of the Customer that the Cart belongs to.voidsetCustomerGroup(CustomerGroupReference customerGroup) Reference to the Customer Group of the Customer that the Cart belongs to.voidsetCustomerId(String customerId) idof the Customer that the Cart belongs to.voidsetCustomLineItems(CustomLineItem... customLineItems) Custom Line Items added to the Cart.voidsetCustomLineItems(List<CustomLineItem> customLineItems) Custom Line Items added to the Cart.voidsetDeleteDaysAfterLastModification(Integer deleteDaysAfterLastModification) Number of days after the last modification before a Cart is deleted.voidsetDirectDiscounts(DirectDiscount... directDiscounts) Direct Discounts added to the Cart.voidsetDirectDiscounts(List<DirectDiscount> directDiscounts) Direct Discounts added to the Cart.voidsetDiscountCodes(DiscountCodeInfo... discountCodes) Discount Codes applied to the Cart.voidsetDiscountCodes(List<DiscountCodeInfo> discountCodes) Discount Codes applied to the Cart.voidsetDiscountOnTotalPrice(DiscountOnTotalPrice discountOnTotalPrice) Discounts that apply on the CarttotalPrice.voidsetDiscountTypeCombination(DiscountTypeCombination discountTypeCombination) Indicates if a combination of discount types can apply on a Cart.voidUnique identifier of the Cart.voidsetInventoryMode(InventoryMode inventoryMode) Indicates how stock quantities are tracked for Line Items in the Cart.voidsetItemShippingAddresses(Address... itemShippingAddresses) Additional shipping addresses of the Cart as specified by LineItems using theshippingDetailsfield.voidsetItemShippingAddresses(List<Address> itemShippingAddresses) Additional shipping addresses of the Cart as specified by LineItems using theshippingDetailsfield.voidUser-defined unique identifier of the Cart.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the Cart was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the Cart.voidsetLineItems(LineItem... lineItems) Line Items added to the Cart.voidsetLineItems(List<LineItem> lineItems) Line Items added to the Cart.voidLanguage of the Cart.voidsetOrigin(CartOrigin origin) Indicates how the Cart was created.voidsetPaymentInfo(PaymentInfo paymentInfo) Payment information related to the Cart.voidsetPriceRoundingMode(RoundingMode priceRoundingMode) Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated.voidsetRefusedGifts(CartDiscountReference... refusedGifts) voidsetRefusedGifts(List<CartDiscountReference> refusedGifts) voidsetShipping(Shipping... shipping) Shipping-related information of a Cart withMultipleShippingMode.voidsetShipping(List<Shipping> shipping) Shipping-related information of a Cart withMultipleShippingMode.voidsetShippingAddress(Address shippingAddress) Shipping address for a Cart withSingleShippingMode.voidsetShippingCustomFields(CustomFields shippingCustomFields) Custom Fields of the Shipping Method in a Cart withSingleShippingMode.voidsetShippingInfo(ShippingInfo shippingInfo) Shipping-related information of a Cart withSingleShippingMode.voidsetShippingKey(String shippingKey) User-defined unique identifier of the Shipping Method in a Cart withSingleShippingMode.voidsetShippingMode(ShippingMode shippingMode) Indicates whether the Cart has one or multiple Shipping Methods.voidsetShippingRateInput(ShippingRateInput shippingRateInput) Input used to select a ShippingRatePriceTier.voidsetStore(StoreKeyReference store) Reference to a Store the Cart belongs to.voidsetTaxCalculationMode(TaxCalculationMode taxCalculationMode) Indicates how taxes are calculated when calculating taxes fortaxedPrice.voidsetTaxedPrice(TaxedPrice taxedPrice) voidsetTaxedShippingPrice(TaxedPrice taxedShippingPrice) Sum of thetaxedPricefield of ShippingInfo across all Shipping Methods.voidsetTaxMode(TaxMode taxMode) Indicates how Tax Rates are set.voidsetTaxRoundingMode(RoundingMode taxRoundingMode) Indicates how monetary values are rounded when calculating taxes fortaxedPrice.voidsetTotalLineItemQuantity(Long totalLineItemQuantity) Sum of all LineItem quantities, excluding CustomLineItems.voidsetTotalPrice(CentPrecisionMoney totalPrice) Sum of thetotalPricefield of all LineItems and CustomLineItems, and if available, thepricefield of ShippingInfo.voidsetVersion(Long version) Current version of the Cart.static com.fasterxml.jackson.core.type.TypeReference<Cart>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.cart.CartMixin
toReference, toResourceIdentifierMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizableMethods inherited from interface com.commercetools.api.models.DomainResource
getMethods inherited from interface com.commercetools.api.models.order.OrderLike
calculateSubTotalPrice
-
Method Details
-
getId
Unique identifier of the Cart.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<Cart>- Specified by:
getIdin interfaceIdentifiable<Cart>- Specified by:
getIdin interfaceOrderLike<Cart>- Specified by:
getIdin interfaceVersioned<Cart>- Returns:
- id
-
getVersion
Current version of the Cart.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<Cart>- Specified by:
getVersionin interfaceOrderLike<Cart>- Specified by:
getVersionin interfaceVersioned<Cart>- Returns:
- version
-
getKey
String getKey()User-defined unique identifier of the Cart.
-
getCustomerId
String getCustomerId()idof the Customer that the Cart belongs to.- Specified by:
getCustomerIdin interfaceOrderLike<Cart>- Returns:
- customerId
-
getCustomerEmail
String getCustomerEmail()Email address of the Customer that the Cart belongs to.
- Specified by:
getCustomerEmailin 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:
getCustomerGroupin interfaceOrderLike<Cart>- Returns:
- customerGroup
-
getAnonymousId
String getAnonymousId()Anonymous session associated with the Cart.
- Specified by:
getAnonymousIdin interfaceOrderLike<Cart>- Returns:
- anonymousId
-
getBusinessUnit
Reference to a Business Unit the Cart belongs to. Only available for B2B-enabled Projects.
- Returns:
- businessUnit
-
getStore
Reference to a Store the Cart belongs to.
-
getLineItems
Line Items added to the Cart.
- Specified by:
getLineItemsin interfaceOrderLike<Cart>- Returns:
- lineItems
-
getCustomLineItems
Custom Line Items added to the Cart.
- Specified by:
getCustomLineItemsin 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
totalPricefield of all LineItems and CustomLineItems, and if available, thepricefield of ShippingInfo. If a discount applies ontotalPrice, this field holds the discounted value.Taxes are included if TaxRate
includedInPriceistruefor each price.- Specified by:
getTotalPricein interfaceOrderLike<Cart>- Returns:
- totalPrice
-
getTaxedPrice
- For a Cart with
PlatformTaxMode, it is automatically set when a shipping address is set. For Carts withMultipleShippingMode, all Line Items and Custom Line Items must be fully distributed between the Shipping Methods (viashippingDetails), otherwisetaxedPriceis not automatically set. - For a Cart with
ExternalTaxMode, it is automatically set whenshippingAddressand external Tax Rates for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set. For Carts withMultipleShippingMode, all allocations must have their respective tax rates present inperMethodTaxRate, otherwisetaxedPriceis not automatically set.
If a discount applies on
totalPrice, this field holds the proportionally discounted value.- Specified by:
getTaxedPricein interfaceOrderLike<Cart>- Returns:
- taxedPrice
- For a Cart with
-
getTaxedShippingPrice
Sum of the
taxedPricefield of ShippingInfo across all Shipping Methods.If a discount applies on
totalPrice, this field holds the proportionally discounted value.- Returns:
- taxedShippingPrice
-
getDiscountOnTotalPrice
Discounts that apply on the Cart
totalPrice.- Returns:
- discountOnTotalPrice
-
getTaxMode
Indicates how Tax Rates are set.
- Specified by:
getTaxModein interfaceOrderLike<Cart>- Returns:
- taxMode
-
getPriceRoundingMode
Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated. Configured in Project settings.
- Returns:
- priceRoundingMode
-
getTaxRoundingMode
Indicates how monetary values are rounded when calculating taxes for
taxedPrice. Configured in Project settings.- Specified by:
getTaxRoundingModein interfaceOrderLike<Cart>- Returns:
- taxRoundingMode
-
getTaxCalculationMode
Indicates how taxes are calculated when calculating taxes for
taxedPrice.- Specified by:
getTaxCalculationModein interfaceOrderLike<Cart>- Returns:
- taxCalculationMode
-
getInventoryMode
Indicates how stock quantities are tracked for Line Items in the Cart.
- Specified by:
getInventoryModein interfaceOrderLike<Cart>- Returns:
- inventoryMode
-
getCartState
Current status of the Cart.
- Returns:
- cartState
-
getBillingAddress
Billing address associated with the Cart.
- Specified by:
getBillingAddressin interfaceOrderLike<Cart>- Returns:
- billingAddress
-
getShippingAddress
Shipping address for a Cart with
SingleShippingMode. Determines eligible ShippingMethod rates and Tax Rates of Line Items.- Specified by:
getShippingAddressin 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
SingleShippingMode.- Returns:
- shippingKey
-
getShippingInfo
Shipping-related information of a Cart with
SingleShippingMode. Automatically set when a Shipping Method is set.- Specified by:
getShippingInfoin interfaceOrderLike<Cart>- Returns:
- shippingInfo
-
getShippingRateInput
Input used to select a ShippingRatePriceTier. The data type of this field depends on the
shippingRateInputType.typeconfigured in the Project:- If
CartClassification, it is ClassificationShippingRateInput. - If
CartScore, it is ScoreShippingRateInput. - If
CartValue, it cannot be used.
- Specified by:
getShippingRateInputin interfaceOrderLike<Cart>- Returns:
- shippingRateInput
- If
-
getShippingCustomFields
Custom Fields of the Shipping Method in a Cart with
SingleShippingMode.- Specified by:
getShippingCustomFieldsin interfaceOrderLike<Cart>- Returns:
- shippingCustomFields
-
getShipping
Shipping-related information of a Cart with
MultipleShippingMode. 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
shippingDetailsfield.For Carts with
SingleShippingMode: eligible Shipping Methods or applicable Tax Rates are determined by the address inshippingAddress, and notitemShippingAddresses.- Specified by:
getItemShippingAddressesin interfaceOrderLike<Cart>- Returns:
- itemShippingAddresses
-
getDiscountCodes
Discount Codes applied to the Cart. A Cart that has
directDiscountscannot havediscountCodes.- Specified by:
getDiscountCodesin interfaceOrderLike<Cart>- Returns:
- discountCodes
-
getDirectDiscounts
Direct Discounts added to the Cart. A Cart that has
discountCodescannot havedirectDiscounts.- Returns:
- directDiscounts
-
getRefusedGifts
Automatically set when a Line Item with
GiftLineItemLineItemMode is removed from the Cart.- Specified by:
getRefusedGiftsin interfaceOrderLike<Cart>- Returns:
- refusedGifts
-
getPaymentInfo
Payment information related to the Cart.
- Specified by:
getPaymentInfoin interfaceOrderLike<Cart>- Returns:
- paymentInfo
-
getCountry
String getCountry()Used for Line Item price selection.
- Specified by:
getCountryin interfaceOrderLike<Cart>- Returns:
- country
-
getLocale
String getLocale()Language of the Cart. Must be one of the languages supported by the Project.
-
getOrigin
Indicates how the Cart was created.
-
getCustom
Custom Fields of the Cart.
-
getDiscountTypeCombination
Indicates if a combination of discount types can apply on a Cart.
- Returns:
- discountTypeCombination
-
getDeleteDaysAfterLastModification
Integer getDeleteDaysAfterLastModification()Number of days after the last modification before a Cart is deleted. Configured in Project settings.
- Returns:
- deleteDaysAfterLastModification
-
getCreatedAt
Date and time (UTC) the Cart was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Specified by:
getCreatedAtin interfaceOrderLike<Cart>- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Cart was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Specified by:
getLastModifiedAtin interfaceOrderLike<Cart>- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Cart.
- Specified by:
getLastModifiedByin interfaceOrderLike<Cart>- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Cart.
- Specified by:
getCreatedByin interfaceOrderLike<Cart>- Returns:
- createdBy
-
setId
Unique identifier of the Cart.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the Cart.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setKey
User-defined unique identifier of the Cart.
- Parameters:
key- value to be set
-
setCustomerId
idof 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. Only available for B2B-enabled Projects.
- 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
totalPricefield of all LineItems and CustomLineItems, and if available, thepricefield of ShippingInfo. If a discount applies ontotalPrice, this field holds the discounted value.Taxes are included if TaxRate
includedInPriceistruefor each price.- Parameters:
totalPrice- value to be set
-
setTaxedPrice
- For a Cart with
PlatformTaxMode, it is automatically set when a shipping address is set. For Carts withMultipleShippingMode, all Line Items and Custom Line Items must be fully distributed between the Shipping Methods (viashippingDetails), otherwisetaxedPriceis not automatically set. - For a Cart with
ExternalTaxMode, it is automatically set whenshippingAddressand external Tax Rates for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set. For Carts withMultipleShippingMode, all allocations must have their respective tax rates present inperMethodTaxRate, otherwisetaxedPriceis not automatically set.
If a discount applies on
totalPrice, this field holds the proportionally discounted value.- Parameters:
taxedPrice- value to be set
- For a Cart with
-
setTaxedShippingPrice
Sum of the
taxedPricefield of ShippingInfo across all Shipping Methods.If a discount applies on
totalPrice, this field holds the proportionally discounted value.- 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
-
setPriceRoundingMode
Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated. Configured in Project settings.
- Parameters:
priceRoundingMode- value to be set
-
setTaxRoundingMode
Indicates how monetary values are rounded when calculating taxes for
taxedPrice. Configured in Project settings.- 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
SingleShippingMode. 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
SingleShippingMode.- Parameters:
shippingKey- value to be set
-
setShippingInfo
Shipping-related information of a Cart with
SingleShippingMode. 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.typeconfigured 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
SingleShippingMode.- Parameters:
shippingCustomFields- value to be set
-
setShipping
Shipping-related information of a Cart with
MultipleShippingMode. Updated automatically each time a new Shipping Method is added.- Parameters:
shipping- values to be set
-
setShipping
Shipping-related information of a Cart with
MultipleShippingMode. 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
shippingDetailsfield.For Carts with
SingleShippingMode: 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
shippingDetailsfield.For Carts with
SingleShippingMode: 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
directDiscountscannot havediscountCodes.- Parameters:
discountCodes- values to be set
-
setDiscountCodes
Discount Codes applied to the Cart. A Cart that has
directDiscountscannot havediscountCodes.- Parameters:
discountCodes- values to be set
-
setDirectDiscounts
Direct Discounts added to the Cart. A Cart that has
discountCodescannot havedirectDiscounts.- Parameters:
directDiscounts- values to be set
-
setDirectDiscounts
Direct Discounts added to the Cart. A Cart that has
discountCodescannot havedirectDiscounts.- Parameters:
directDiscounts- values to be set
-
setRefusedGifts
Automatically set when a Line Item with
GiftLineItemLineItemMode is removed from the Cart.- Parameters:
refusedGifts- values to be set
-
setRefusedGifts
Automatically set when a Line Item with
GiftLineItemLineItemMode 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
Language of the Cart. Must be one of the 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:
setCustomin interfaceCustomizable<Cart>- Parameters:
custom- value to be set
-
setDiscountTypeCombination
Indicates if a combination of discount types can apply on a Cart.
- Parameters:
discountTypeCombination- value to be set
-
setDeleteDaysAfterLastModification
Number of days after the last modification before a Cart is deleted. Configured in Project settings.
- Parameters:
deleteDaysAfterLastModification- value to be set
-
setCreatedAt
Date and time (UTC) the Cart was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the Cart was last updated.
- Specified by:
setLastModifiedAtin 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
-
copyDeep
Cart copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
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
-