T
- the type of this CartLike
, order or cartpublic interface CartLike<T> extends Resource<T>, Custom
Modifier and Type | Method and Description |
---|---|
default javax.money.MonetaryAmount |
calculateSubTotalPrice()
Returns the subtotal price of the cart, which is calculated by adding the prices of line items and custom line items,
thus excluding shipping costs and discounts that are applied to the entire cart.
|
default Optional<javax.money.MonetaryAmount> |
calculateTotalAppliedTaxes()
Tries to calculate all the taxes applied to the cart, without discriminating between different tax portions.
|
default Optional<CustomLineItem> |
findCustomLineItem(String customLineItemId)
Searches for custom line items by ID of a custom line item.
|
default Optional<LineItem> |
findLineItem(String lineItemId)
Searches for line items by ID of a line item.
|
String |
getAnonymousId()
Identifies carts and orders belonging to an anonymous session (the customer has not signed up/in yet).
|
Address |
getBillingAddress()
Address for the bill.
|
com.neovisionaries.i18n.CountryCode |
getCountry() |
default javax.money.CurrencyUnit |
getCurrency()
The currency of this cart/order.
|
CustomFields |
getCustom() |
String |
getCustomerEmail()
The email of the customer which should be used for this cart/order.
|
Reference<CustomerGroup> |
getCustomerGroup()
In the order context the customer group can only be expanded if the customer was in a group before creating the order.
|
String |
getCustomerId()
The ID of the customer to which this cart/order belongs to.
|
List<CustomLineItem> |
getCustomLineItems()
Custom goods, fees or discounts added to the cart.
|
List<DiscountCodeInfo> |
getDiscountCodes()
Discount codes belonging to this cart.
|
List<Address> |
getItemShippingAddresses() |
List<LineItem> |
getLineItems()
Snapshots of the products added to the cart.
|
Locale |
getLocale() |
CartOrigin |
getOrigin() |
PaymentInfo |
getPaymentInfo()
Get associated payments.
|
Address |
getShippingAddress()
Address to ship the goods.
|
CartShippingInfo |
getShippingInfo()
Information about shipping set by the backend once the shipping method is set.
|
ShippingRateInput |
getShippingRateInput()
The shippingRateInput is used as an input to select a shipping rate price tier
|
TaxCalculationMode |
getTaxCalculationMode()
Tax calculation mode of this cart.
|
TaxedPrice |
getTaxedPrice()
The taxed price.
|
TaxMode |
getTaxMode()
Tax mode of this cart.
|
RoundingMode |
getTaxRoundingMode()
When calculating taxes in
taxedPrice , the tax rounding mode is used for decimal values. |
javax.money.MonetaryAmount |
getTotalPrice() |
getCreatedAt, getId, getLastModifiedAt, getVersion, toReference
hasSameIdAs, toResourceIdentifier
@Nullable String getCustomerId()
CustomerSignInCommand
,
SetCustomerId
@Nullable String getCustomerEmail()
Customer.getEmail()
.SetCustomerEmail
List<LineItem> getLineItems()
AddLineItem
,
ChangeLineItemQuantity
,
RemoveLineItem
List<CustomLineItem> getCustomLineItems()
AddCustomLineItem
,
RemoveCustomLineItem
default Optional<CustomLineItem> findCustomLineItem(String customLineItemId)
customLineItemId
- the ID of the custom line item to search for.default Optional<LineItem> findLineItem(String lineItemId)
lineItemId
- the ID of the line item to search for.javax.money.MonetaryAmount getTotalPrice()
@Nullable TaxedPrice getTaxedPrice()
getShippingAddress()
) is used to determine tax rate of the line items.@Nullable Address getShippingAddress()
SetShippingAddress
,
getTaxedPrice()
@Nullable Address getBillingAddress()
SetBillingAddress
@Nullable Reference<CustomerGroup> getCustomerGroup()
@Nullable com.neovisionaries.i18n.CountryCode getCountry()
List<DiscountCodeInfo> getDiscountCodes()
AddDiscountCode
@Nullable CustomFields getCustom()
@Nullable CartShippingInfo getShippingInfo()
SetShippingMethod
,
SetCustomShippingMethod
,
AddDelivery
@Nullable PaymentInfo getPaymentInfo()
AddPayment
,
RemovePayment
,
AddPayment
,
RemovePayment
TaxMode getTaxMode()
ChangeTaxMode
TaxCalculationMode getTaxCalculationMode()
ChangeTaxCalculationMode
default javax.money.CurrencyUnit getCurrency()
@Nullable String getAnonymousId()
@Nullable ShippingRateInput getShippingRateInput()
RoundingMode getTaxRoundingMode()
taxedPrice
, the tax rounding mode is used for decimal values.CartOrigin getOrigin()
default javax.money.MonetaryAmount calculateSubTotalPrice()
default Optional<javax.money.MonetaryAmount> calculateTotalAppliedTaxes()