Interface ShippingInfo
- All Known Implementing Classes:
ShippingInfoImpl
Example to create an instance using the builder pattern
ShippingInfo shippingInfo = ShippingInfo.builder()
.shippingMethodName("{shippingMethodName}")
.price(priceBuilder -> priceBuilder)
.shippingRate(shippingRateBuilder -> shippingRateBuilder)
.shippingMethodState(ShippingMethodState.DOES_NOT_MATCH_CART)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShippingInfoBuilder
builder()
builder factory method for ShippingInfostatic ShippingInfoBuilder
builder
(ShippingInfo template) create builder for ShippingInfo instancestatic ShippingInfo
deepCopy
(ShippingInfo template) factory method to create a deep copy of ShippingInfoInformation on how items are delivered to customers.@Valid DiscountedLineItemPrice
Discounted price of the Shipping Method.@NotNull @Valid CentPrecisionMoney
getPrice()
Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or theshippingRateInput
field.@Valid ShippingMethodReference
Not set if a custom Shipping Method is used.@NotNull String
Name of the Shipping Method.@NotNull ShippingMethodState
Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.@NotNull @Valid ShippingRate
Used to determine the price.@Valid TaxCategoryReference
Used to select a Tax Rate when a Cart has thePlatform
TaxMode.@Valid TaxedItemPrice
Automatically set after thetaxRate
is set.@Valid TaxRate
Automatically set in thePlatform
TaxMode after the shipping address is set.static ShippingInfo
of()
factory methodstatic ShippingInfo
of
(ShippingInfo template) factory method to create a shallow copy ShippingInfovoid
setDeliveries
(Delivery... deliveries) Information on how items are delivered to customers.void
setDeliveries
(List<Delivery> deliveries) Information on how items are delivered to customers.void
setDiscountedPrice
(DiscountedLineItemPrice discountedPrice) Discounted price of the Shipping Method.void
setPrice
(CentPrecisionMoney price) Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or theshippingRateInput
field.void
setShippingMethod
(ShippingMethodReference shippingMethod) Not set if a custom Shipping Method is used.void
setShippingMethodName
(String shippingMethodName) Name of the Shipping Method.void
setShippingMethodState
(ShippingMethodState shippingMethodState) Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.void
setShippingRate
(ShippingRate shippingRate) Used to determine the price.void
setTaxCategory
(TaxCategoryReference taxCategory) Used to select a Tax Rate when a Cart has thePlatform
TaxMode.void
setTaxedPrice
(TaxedItemPrice taxedPrice) Automatically set after thetaxRate
is set.void
setTaxRate
(TaxRate taxRate) Automatically set in thePlatform
TaxMode after the shipping address is set.static com.fasterxml.jackson.core.type.TypeReference<ShippingInfo>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withShippingInfo
(Function<ShippingInfo, T> helper) accessor map function
-
Method Details
-
getShippingMethodName
Name of the Shipping Method.
- Returns:
- shippingMethodName
-
getPrice
Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or the
shippingRateInput
field.- Returns:
- price
-
getShippingRate
Used to determine the price.
- Returns:
- shippingRate
-
getTaxedPrice
Automatically set after the
taxRate
is set.- Returns:
- taxedPrice
-
getTaxRate
Automatically set in the
Platform
TaxMode after the shipping address is set.For the
External
TaxMode the Tax Rate must be set explicitly with the ExternalTaxRateDraft.- Returns:
- taxRate
-
getTaxCategory
Used to select a Tax Rate when a Cart has the
Platform
TaxMode.- Returns:
- taxCategory
-
getShippingMethod
Not set if a custom Shipping Method is used.
- Returns:
- shippingMethod
-
getDeliveries
Information on how items are delivered to customers.
- Returns:
- deliveries
-
getDiscountedPrice
Discounted price of the Shipping Method.
- Returns:
- discountedPrice
-
getShippingMethodState
Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.
- Returns:
- shippingMethodState
-
setShippingMethodName
Name of the Shipping Method.
- Parameters:
shippingMethodName
- value to be set
-
setPrice
Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or the
shippingRateInput
field.- Parameters:
price
- value to be set
-
setShippingRate
Used to determine the price.
- Parameters:
shippingRate
- value to be set
-
setTaxedPrice
Automatically set after the
taxRate
is set.- Parameters:
taxedPrice
- value to be set
-
setTaxRate
Automatically set in the
Platform
TaxMode after the shipping address is set.For the
External
TaxMode the Tax Rate must be set explicitly with the ExternalTaxRateDraft.- Parameters:
taxRate
- value to be set
-
setTaxCategory
Used to select a Tax Rate when a Cart has the
Platform
TaxMode.- Parameters:
taxCategory
- value to be set
-
setShippingMethod
Not set if a custom Shipping Method is used.
- Parameters:
shippingMethod
- value to be set
-
setDeliveries
Information on how items are delivered to customers.
- Parameters:
deliveries
- values to be set
-
setDeliveries
Information on how items are delivered to customers.
- Parameters:
deliveries
- values to be set
-
setDiscountedPrice
Discounted price of the Shipping Method.
- Parameters:
discountedPrice
- value to be set
-
setShippingMethodState
Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.
- Parameters:
shippingMethodState
- value to be set
-
of
factory method- Returns:
- instance of ShippingInfo
-
of
factory method to create a shallow copy ShippingInfo- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ShippingInfo- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ShippingInfo- Returns:
- builder
-
builder
create builder for ShippingInfo instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withShippingInfo
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
-