Class Cart
java.lang.Object
com.commercetools.graphql.api.types.Cart
- All Implemented Interfaces:
ReferenceExpandable,Versioned
A shopping cart holds product variants and can be ordered. Each cart either belongs to a registered customer or is an anonymous cart.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCart()Cart(String customerId, Customer customer, String customerEmail, String anonymousId, List<LineItem> lineItems, List<CustomLineItem> customLineItems, Money totalPrice, TaxedPrice taxedPrice, DiscountOnTotalPrice discountOnTotalPrice, Address shippingAddress, Address billingAddress, InventoryMode inventoryMode, TaxMode taxMode, RoundingMode taxRoundingMode, TaxCalculationMode taxCalculationMode, CustomerGroup customerGroup, Reference customerGroupRef, String country, String shippingKey, ShippingInfo shippingInfo, List<DiscountCodeInfo> discountCodes, List<DirectDiscount> directDiscounts, List<CartDiscount> refusedGifts, List<Reference> refusedGiftsRefs, PaymentInfo paymentInfo, String locale, ShippingRateInput shippingRateInput, CartOrigin origin, KeyReference storeRef, Store store, List<Address> itemShippingAddresses, BusinessUnit businessUnit, KeyReference businessUnitRef, List<Shipping> shipping, TaxedPrice taxedShippingPrice, ShippingMode shippingMode, CustomFieldsType shippingCustomFields, CartState cartState, String key, CustomFieldsType custom, Integer deleteDaysAfterLastModification, Long totalLineItemQuantity, String id, Long version, OffsetDateTime createdAt, OffsetDateTime lastModifiedAt, Initiator createdBy, Initiator lastModifiedBy) -
Method Summary
Modifier and TypeMethodDescriptionbooleanBETA: This feature can be subject to change and should be used carefully in production.getId()getKey()getStore()inthashCode()static Cart.BuildervoidsetAnonymousId(String anonymousId) voidsetBillingAddress(Address billingAddress) voidsetBusinessUnit(BusinessUnit businessUnit) voidsetBusinessUnitRef(KeyReference businessUnitRef) voidsetCartState(CartState cartState) voidsetCountry(String country) voidsetCreatedAt(OffsetDateTime createdAt) voidsetCreatedBy(Initiator createdBy) voidsetCustom(CustomFieldsType custom) voidsetCustomer(Customer customer) voidsetCustomerEmail(String customerEmail) voidsetCustomerGroup(CustomerGroup customerGroup) voidsetCustomerGroupRef(Reference customerGroupRef) voidsetCustomerId(String customerId) voidsetCustomLineItems(List<CustomLineItem> customLineItems) voidsetDeleteDaysAfterLastModification(Integer deleteDaysAfterLastModification) voidsetDirectDiscounts(List<DirectDiscount> directDiscounts) voidsetDiscountCodes(List<DiscountCodeInfo> discountCodes) voidsetDiscountOnTotalPrice(DiscountOnTotalPrice discountOnTotalPrice) voidvoidsetInventoryMode(InventoryMode inventoryMode) voidsetItemShippingAddresses(List<Address> itemShippingAddresses) voidvoidsetLastModifiedAt(OffsetDateTime lastModifiedAt) voidsetLastModifiedBy(Initiator lastModifiedBy) voidsetLineItems(List<LineItem> lineItems) voidvoidsetOrigin(CartOrigin origin) voidsetPaymentInfo(PaymentInfo paymentInfo) voidsetRefusedGifts(List<CartDiscount> refusedGifts) voidsetRefusedGiftsRefs(List<Reference> refusedGiftsRefs) voidsetShipping(List<Shipping> shipping) voidsetShippingAddress(Address shippingAddress) voidsetShippingCustomFields(CustomFieldsType shippingCustomFields) voidsetShippingInfo(ShippingInfo shippingInfo) voidsetShippingKey(String shippingKey) voidsetShippingMode(ShippingMode shippingMode) voidsetShippingRateInput(ShippingRateInput shippingRateInput) voidvoidsetStoreRef(KeyReference storeRef) voidsetTaxCalculationMode(TaxCalculationMode taxCalculationMode) voidsetTaxedPrice(TaxedPrice taxedPrice) voidsetTaxedShippingPrice(TaxedPrice taxedShippingPrice) voidsetTaxMode(TaxMode taxMode) voidsetTaxRoundingMode(RoundingMode taxRoundingMode) voidsetTotalLineItemQuantity(Long totalLineItemQuantity) voidsetTotalPrice(Money totalPrice) voidsetVersion(Long version) toString()
-
Constructor Details
-
Cart
public Cart() -
Cart
public Cart(String customerId, Customer customer, String customerEmail, String anonymousId, List<LineItem> lineItems, List<CustomLineItem> customLineItems, Money totalPrice, TaxedPrice taxedPrice, DiscountOnTotalPrice discountOnTotalPrice, Address shippingAddress, Address billingAddress, InventoryMode inventoryMode, TaxMode taxMode, RoundingMode taxRoundingMode, TaxCalculationMode taxCalculationMode, CustomerGroup customerGroup, Reference customerGroupRef, String country, String shippingKey, ShippingInfo shippingInfo, List<DiscountCodeInfo> discountCodes, List<DirectDiscount> directDiscounts, List<CartDiscount> refusedGifts, List<Reference> refusedGiftsRefs, PaymentInfo paymentInfo, String locale, ShippingRateInput shippingRateInput, CartOrigin origin, KeyReference storeRef, Store store, List<Address> itemShippingAddresses, BusinessUnit businessUnit, KeyReference businessUnitRef, List<Shipping> shipping, TaxedPrice taxedShippingPrice, ShippingMode shippingMode, CustomFieldsType shippingCustomFields, CartState cartState, String key, CustomFieldsType custom, Integer deleteDaysAfterLastModification, Long totalLineItemQuantity, String id, Long version, OffsetDateTime createdAt, OffsetDateTime lastModifiedAt, Initiator createdBy, Initiator lastModifiedBy)
-
-
Method Details
-
getCustomerId
-
setCustomerId
-
getCustomer
-
setCustomer
-
getCustomerEmail
-
setCustomerEmail
-
getAnonymousId
-
setAnonymousId
-
getLineItems
-
setLineItems
-
getCustomLineItems
-
setCustomLineItems
-
getTotalPrice
-
setTotalPrice
-
getTaxedPrice
-
setTaxedPrice
-
getDiscountOnTotalPrice
BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta -
setDiscountOnTotalPrice
-
getShippingAddress
-
setShippingAddress
-
getBillingAddress
-
setBillingAddress
-
getInventoryMode
-
setInventoryMode
-
getTaxMode
-
setTaxMode
-
getTaxRoundingMode
-
setTaxRoundingMode
-
getTaxCalculationMode
-
setTaxCalculationMode
-
getCustomerGroup
-
setCustomerGroup
-
getCustomerGroupRef
-
setCustomerGroupRef
-
getCountry
-
setCountry
-
getShippingKey
-
setShippingKey
-
getShippingInfo
-
setShippingInfo
-
getDiscountCodes
-
setDiscountCodes
-
getDirectDiscounts
-
setDirectDiscounts
-
getRefusedGifts
-
setRefusedGifts
-
getRefusedGiftsRefs
-
setRefusedGiftsRefs
-
getPaymentInfo
-
setPaymentInfo
-
getLocale
-
setLocale
-
getShippingRateInput
-
setShippingRateInput
-
getOrigin
-
setOrigin
-
getStoreRef
-
setStoreRef
-
getStore
-
setStore
-
getItemShippingAddresses
-
setItemShippingAddresses
-
getBusinessUnit
-
setBusinessUnit
-
getBusinessUnitRef
-
setBusinessUnitRef
-
getShipping
-
setShipping
-
getTaxedShippingPrice
-
setTaxedShippingPrice
-
getShippingMode
-
setShippingMode
-
getShippingCustomFields
-
setShippingCustomFields
-
getCartState
-
setCartState
-
getKey
-
setKey
-
getCustom
-
setCustom
-
getDeleteDaysAfterLastModification
-
setDeleteDaysAfterLastModification
-
getTotalLineItemQuantity
-
setTotalLineItemQuantity
-
getId
- Specified by:
getIdin interfaceReferenceExpandable- Specified by:
getIdin interfaceVersioned
-
setId
- Specified by:
setIdin interfaceReferenceExpandable- Specified by:
setIdin interfaceVersioned
-
getVersion
- Specified by:
getVersionin interfaceVersioned
-
setVersion
- Specified by:
setVersionin interfaceVersioned
-
getCreatedAt
- Specified by:
getCreatedAtin interfaceVersioned
-
setCreatedAt
- Specified by:
setCreatedAtin interfaceVersioned
-
getLastModifiedAt
- Specified by:
getLastModifiedAtin interfaceVersioned
-
setLastModifiedAt
- Specified by:
setLastModifiedAtin interfaceVersioned
-
getCreatedBy
- Specified by:
getCreatedByin interfaceVersioned
-
setCreatedBy
- Specified by:
setCreatedByin interfaceVersioned
-
getLastModifiedBy
- Specified by:
getLastModifiedByin interfaceVersioned
-
setLastModifiedBy
- Specified by:
setLastModifiedByin interfaceVersioned
-
toString
-
equals
-
hashCode
public int hashCode() -
newBuilder
-