Class CartCreationRequest
- All Implemented Interfaces:
Serializable
Cart.- Author:
- Nick Crum (ncrum)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCartCreationRequest(AddItemRequest addItemRequest) CartCreationRequest(String name, String type, Instant expirationDate, AddItemRequest addItemRequest, List<AddItemRequest> addItemRequests, PriceCartRequest priceCartRequest, String customerTimezone, Map<String, Object> cartInternalAttributes, Map<String, Object> cartAttributes) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe initialAddItemRequestto populate the cart.The initialAddItemRequeststo populate the cart.Miscellaneous attributes that should be copied toCart.getAttributes()Miscellaneous internal attributes that should be copied toCart.getInternalAttributes()The customer's timezone.DefaultCartTypes.QUOTEcarts can have an expiration date.getName()Allows optionally setting a cart name.The initialPriceCartRequestto price the cart.getType()Allows optionally setting the type of cart to be created.inthashCode()voidsetAddItemRequest(AddItemRequest addItemRequest) The initialAddItemRequestto populate the cart.voidsetAddItemRequests(List<AddItemRequest> addItemRequests) The initialAddItemRequeststo populate the cart.voidsetCartAttributes(Map<String, Object> cartAttributes) Miscellaneous attributes that should be copied toCart.getAttributes()voidsetCartInternalAttributes(Map<String, Object> cartInternalAttributes) Miscellaneous internal attributes that should be copied toCart.getInternalAttributes()voidsetCustomerTimezone(String customerTimezone) The customer's timezone.voidsetExpirationDate(Instant expirationDate) DefaultCartTypes.QUOTEcarts can have an expiration date.voidAllows optionally setting a cart name.voidsetPriceCartRequest(PriceCartRequest priceCartRequest) The initialPriceCartRequestto price the cart.voidAllows optionally setting the type of cart to be created.toString()
-
Constructor Details
-
CartCreationRequest
-
CartCreationRequest
public CartCreationRequest(String name, String type, Instant expirationDate, AddItemRequest addItemRequest, List<AddItemRequest> addItemRequests, PriceCartRequest priceCartRequest, String customerTimezone, Map<String, Object> cartInternalAttributes, Map<String, Object> cartAttributes) -
CartCreationRequest
public CartCreationRequest()
-
-
Method Details
-
getName
Allows optionally setting a cart name. This is typically blank for standard, in-process carts, and may be set when creating a Quote or Named cart directly. -
getType
Allows optionally setting the type of cart to be created. Default isDefaultCartTypes.STANDARD.- See Also:
-
DefaultCartTypesQuoteFunctionalitiesAspect
-
getExpirationDate
DefaultCartTypes.QUOTEcarts can have an expiration date. -
getAddItemRequest
The initialAddItemRequestto populate the cart. -
getAddItemRequests
The initialAddItemRequeststo populate the cart.If
addItemRequestis provided, this will not be used. -
getPriceCartRequest
The initialPriceCartRequestto price the cart. -
getCustomerTimezone
The customer's timezone.This gets stored in
Cart.getInternalAttributes()to be used by downstream services.If this is present in subscription scenarios, then it will be used to truncate the dates to the beginning of the day in customer's timezone as needed. If null, UTC time is used.
Note that if the provided timezone is invalid, an exception will be thrown. Refer to
TimeZone.getAvailableIDs()for valid timezones.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
- See Also:
-
com.broadleafcommerce.subscriptionoperation.service.SubscriptionDateUtilsTimeZone.getAvailableIDs()
-
getCartInternalAttributes
Miscellaneous internal attributes that should be copied toCart.getInternalAttributes()- Since:
- Cart Operation Service 2.1.5, Release Train 2.1.5
-
getCartAttributes
Miscellaneous attributes that should be copied toCart.getAttributes()- Since:
- Cart Operation Service 2.1.5, Release Train 2.1.5
-
setName
Allows optionally setting a cart name. This is typically blank for standard, in-process carts, and may be set when creating a Quote or Named cart directly. -
setType
Allows optionally setting the type of cart to be created. Default isDefaultCartTypes.STANDARD.- See Also:
-
DefaultCartTypesQuoteFunctionalitiesAspect
-
setExpirationDate
DefaultCartTypes.QUOTEcarts can have an expiration date. -
setAddItemRequest
The initialAddItemRequestto populate the cart. -
setAddItemRequests
The initialAddItemRequeststo populate the cart.If
addItemRequestis provided, this will not be used. -
setPriceCartRequest
The initialPriceCartRequestto price the cart. -
setCustomerTimezone
The customer's timezone.This gets stored in
Cart.getInternalAttributes()to be used by downstream services.If this is present in subscription scenarios, then it will be used to truncate the dates to the beginning of the day in customer's timezone as needed. If null, UTC time is used.
Note that if the provided timezone is invalid, an exception will be thrown. Refer to
TimeZone.getAvailableIDs()for valid timezones.- Since:
- Cart Operation Service 2.3.0, Release Train 2.3.0
- See Also:
-
com.broadleafcommerce.subscriptionoperation.service.SubscriptionDateUtilsTimeZone.getAvailableIDs()
-
setCartInternalAttributes
Miscellaneous internal attributes that should be copied toCart.getInternalAttributes()- Since:
- Cart Operation Service 2.1.5, Release Train 2.1.5
-
setCartAttributes
Miscellaneous attributes that should be copied toCart.getAttributes()- Since:
- Cart Operation Service 2.1.5, Release Train 2.1.5
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-