Class MyCartDraftImpl
- All Implemented Interfaces:
CustomizableDraft<MyCartDraft>
,MyCartDraft
,io.vrap.rmf.base.client.Draft<MyCartDraft>
,io.vrap.rmf.base.client.ModelBase
The customerId
is determined by a password flow token and automatically set on the resulting Cart. The anonymousId
is determined by a token for an anonymous session and automatically set on the resulting Cart.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Billing address associated with the Cart.ResourceIdentifier to the Business Unit the Cart should belong to.Used for LineItem Price selection.Currency the Cart uses.Custom Fields for the Cart.Email address of the Customer the Cart belongs to.Number of days after which a Cart withActive
CartState is deleted since its last modification.code
of the existing DiscountCodes to add to the Cart.Determines how stock quantities are tracked for Line Items in the Cart.Multiple shipping addresses of the Cart.Line Items to add to the Cart.Languages of the Cart.Shipping address associated with the Cart.Shipping Method for the Cart.getStore()
ResourceIdentifier to the Store the Cart should belong to.Determines how Tax Rates are set.int
hashCode()
void
setBillingAddress
(BaseAddress billingAddress) Billing address associated with the Cart.void
setBusinessUnit
(BusinessUnitResourceIdentifier businessUnit) ResourceIdentifier to the Business Unit the Cart should belong to.void
setCountry
(String country) Used for LineItem Price selection.void
setCurrency
(String currency) Currency the Cart uses.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the Cart.void
setCustomerEmail
(String customerEmail) Email address of the Customer the Cart belongs to.void
setDeleteDaysAfterLastModification
(Long deleteDaysAfterLastModification) Number of days after which a Cart withActive
CartState is deleted since its last modification.void
setDiscountCodes
(String... discountCodes) code
of the existing DiscountCodes to add to the Cart.void
setDiscountCodes
(List<String> discountCodes) code
of the existing DiscountCodes to add to the Cart.void
setInventoryMode
(InventoryMode inventoryMode) Determines how stock quantities are tracked for Line Items in the Cart.void
setItemShippingAddresses
(BaseAddress... itemShippingAddresses) Multiple shipping addresses of the Cart.void
setItemShippingAddresses
(List<BaseAddress> itemShippingAddresses) Multiple shipping addresses of the Cart.void
setLineItems
(MyLineItemDraft... lineItems) Line Items to add to the Cart.void
setLineItems
(List<MyLineItemDraft> lineItems) Line Items to add to the Cart.void
Languages of the Cart.void
setShippingAddress
(BaseAddress shippingAddress) Shipping address associated with the Cart.void
setShippingMethod
(ShippingMethodResourceIdentifier shippingMethod) Shipping Method for the Cart.void
setStore
(StoreResourceIdentifier store) ResourceIdentifier to the Store the Cart should belong to.void
setTaxMode
(TaxMode taxMode) Determines how Tax Rates are set.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.me.MyCartDraft
withMyCartDraft
-
Constructor Details
-
MyCartDraftImpl
public MyCartDraftImpl()create empty instance
-
-
Method Details
-
getCurrency
Currency the Cart uses.
- Specified by:
getCurrency
in interfaceMyCartDraft
- Returns:
- currency
-
getCustomerEmail
Email address of the Customer the Cart belongs to.
- Specified by:
getCustomerEmail
in interfaceMyCartDraft
- Returns:
- customerEmail
-
getBusinessUnit
ResourceIdentifier to the Business Unit the Cart should belong to. The Customer must be an Associate of the Business Unit.
- Specified by:
getBusinessUnit
in interfaceMyCartDraft
- Returns:
- businessUnit
-
getStore
ResourceIdentifier to the Store the Cart should belong to. Once set, it cannot be updated.
- Specified by:
getStore
in interfaceMyCartDraft
- Returns:
- store
-
getLineItems
Line Items to add to the Cart.
- Specified by:
getLineItems
in interfaceMyCartDraft
- Returns:
- lineItems
-
getTaxMode
Determines how Tax Rates are set. The
Disabled
TaxMode cannot be set.- Specified by:
getTaxMode
in interfaceMyCartDraft
- Returns:
- taxMode
-
getInventoryMode
Determines how stock quantities are tracked for Line Items in the Cart.
- Specified by:
getInventoryMode
in interfaceMyCartDraft
- Returns:
- inventoryMode
-
getBillingAddress
Billing address associated with the Cart.
- Specified by:
getBillingAddress
in interfaceMyCartDraft
- Returns:
- billingAddress
-
getShippingAddress
Shipping address associated with the Cart. Determines eligible ShippingMethod rates and Tax Rates of Line Items.
- Specified by:
getShippingAddress
in interfaceMyCartDraft
- Returns:
- shippingAddress
-
getShippingMethod
Shipping Method for the Cart. If the referenced ShippingMethod has a
predicate
that does not match the Cart, an InvalidOperation error is returned when creating a Cart.- Specified by:
getShippingMethod
in interfaceMyCartDraft
- Returns:
- shippingMethod
-
getItemShippingAddresses
Multiple shipping addresses of the Cart. Each address must contain a
key
that is unique in this Cart. The keys are used by LineItems to reference these addresses under theirshippingDetails
.Eligible Shipping Methods or applicable Tax Rates are determined by the Cart
shippingAddress
, and notitemShippingAddresses
.- Specified by:
getItemShippingAddresses
in interfaceMyCartDraft
- Returns:
- itemShippingAddresses
-
getDiscountCodes
code
of the existing DiscountCodes to add to the Cart.- Specified by:
getDiscountCodes
in interfaceMyCartDraft
- Returns:
- discountCodes
-
getCountry
Used for LineItem Price selection. If used for Create Cart in Store, the provided country must be one of the Store's
countries
.- Specified by:
getCountry
in interfaceMyCartDraft
- Returns:
- country
-
getLocale
Languages of the Cart. Can only contain languages supported by the Project.
- Specified by:
getLocale
in interfaceMyCartDraft
- Returns:
- locale
-
getDeleteDaysAfterLastModification
Number of days after which a Cart with
Active
CartState is deleted since its last modification. If not provided, the default value for this field configured in Project settings is assigned.Create a ChangeSubscription for Carts to receive a ResourceDeletedDeliveryPayload upon deletion of the Cart.
- Specified by:
getDeleteDaysAfterLastModification
in interfaceMyCartDraft
- Returns:
- deleteDaysAfterLastModification
-
getCustom
Custom Fields for the Cart.
- Specified by:
getCustom
in interfaceCustomizableDraft<MyCartDraft>
- Specified by:
getCustom
in interfaceMyCartDraft
- Returns:
- custom
-
setCurrency
Description copied from interface:MyCartDraft
Currency the Cart uses.
- Specified by:
setCurrency
in interfaceMyCartDraft
- Parameters:
currency
- value to be set
-
setCustomerEmail
Description copied from interface:MyCartDraft
Email address of the Customer the Cart belongs to.
- Specified by:
setCustomerEmail
in interfaceMyCartDraft
- Parameters:
customerEmail
- value to be set
-
setBusinessUnit
Description copied from interface:MyCartDraft
ResourceIdentifier to the Business Unit the Cart should belong to. The Customer must be an Associate of the Business Unit.
- Specified by:
setBusinessUnit
in interfaceMyCartDraft
- Parameters:
businessUnit
- value to be set
-
setStore
Description copied from interface:MyCartDraft
ResourceIdentifier to the Store the Cart should belong to. Once set, it cannot be updated.
- Specified by:
setStore
in interfaceMyCartDraft
- Parameters:
store
- value to be set
-
setLineItems
Description copied from interface:MyCartDraft
Line Items to add to the Cart.
- Specified by:
setLineItems
in interfaceMyCartDraft
- Parameters:
lineItems
- values to be set
-
setLineItems
Description copied from interface:MyCartDraft
Line Items to add to the Cart.
- Specified by:
setLineItems
in interfaceMyCartDraft
- Parameters:
lineItems
- values to be set
-
setTaxMode
Description copied from interface:MyCartDraft
Determines how Tax Rates are set. The
Disabled
TaxMode cannot be set.- Specified by:
setTaxMode
in interfaceMyCartDraft
- Parameters:
taxMode
- value to be set
-
setInventoryMode
Description copied from interface:MyCartDraft
Determines how stock quantities are tracked for Line Items in the Cart.
- Specified by:
setInventoryMode
in interfaceMyCartDraft
- Parameters:
inventoryMode
- value to be set
-
setBillingAddress
Description copied from interface:MyCartDraft
Billing address associated with the Cart.
- Specified by:
setBillingAddress
in interfaceMyCartDraft
- Parameters:
billingAddress
- value to be set
-
setShippingAddress
Description copied from interface:MyCartDraft
Shipping address associated with the Cart. Determines eligible ShippingMethod rates and Tax Rates of Line Items.
- Specified by:
setShippingAddress
in interfaceMyCartDraft
- Parameters:
shippingAddress
- value to be set
-
setShippingMethod
Description copied from interface:MyCartDraft
Shipping Method for the Cart. If the referenced ShippingMethod has a
predicate
that does not match the Cart, an InvalidOperation error is returned when creating a Cart.- Specified by:
setShippingMethod
in interfaceMyCartDraft
- Parameters:
shippingMethod
- value to be set
-
setItemShippingAddresses
Description copied from interface:MyCartDraft
Multiple shipping addresses of the Cart. Each address must contain a
key
that is unique in this Cart. The keys are used by LineItems to reference these addresses under theirshippingDetails
.Eligible Shipping Methods or applicable Tax Rates are determined by the Cart
shippingAddress
, and notitemShippingAddresses
.- Specified by:
setItemShippingAddresses
in interfaceMyCartDraft
- Parameters:
itemShippingAddresses
- values to be set
-
setItemShippingAddresses
Description copied from interface:MyCartDraft
Multiple shipping addresses of the Cart. Each address must contain a
key
that is unique in this Cart. The keys are used by LineItems to reference these addresses under theirshippingDetails
.Eligible Shipping Methods or applicable Tax Rates are determined by the Cart
shippingAddress
, and notitemShippingAddresses
.- Specified by:
setItemShippingAddresses
in interfaceMyCartDraft
- Parameters:
itemShippingAddresses
- values to be set
-
setDiscountCodes
Description copied from interface:MyCartDraft
code
of the existing DiscountCodes to add to the Cart.- Specified by:
setDiscountCodes
in interfaceMyCartDraft
- Parameters:
discountCodes
- values to be set
-
setDiscountCodes
Description copied from interface:MyCartDraft
code
of the existing DiscountCodes to add to the Cart.- Specified by:
setDiscountCodes
in interfaceMyCartDraft
- Parameters:
discountCodes
- values to be set
-
setCountry
Description copied from interface:MyCartDraft
Used for LineItem Price selection. If used for Create Cart in Store, the provided country must be one of the Store's
countries
.- Specified by:
setCountry
in interfaceMyCartDraft
- Parameters:
country
- value to be set
-
setLocale
Description copied from interface:MyCartDraft
Languages of the Cart. Can only contain languages supported by the Project.
- Specified by:
setLocale
in interfaceMyCartDraft
- Parameters:
locale
- value to be set
-
setDeleteDaysAfterLastModification
Description copied from interface:MyCartDraft
Number of days after which a Cart with
Active
CartState is deleted since its last modification. If not provided, the default value for this field configured in Project settings is assigned.Create a ChangeSubscription for Carts to receive a ResourceDeletedDeliveryPayload upon deletion of the Cart.
- Specified by:
setDeleteDaysAfterLastModification
in interfaceMyCartDraft
- Parameters:
deleteDaysAfterLastModification
- value to be set
-
setCustom
Description copied from interface:MyCartDraft
Custom Fields for the Cart.
- Specified by:
setCustom
in interfaceCustomizableDraft<MyCartDraft>
- Specified by:
setCustom
in interfaceMyCartDraft
- Parameters:
custom
- value to be set
-
equals
-
hashCode
-