Interface ShippingInfo
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 ShippingInfoBuilderbuilder()builder factory method for ShippingInfostatic ShippingInfoBuilderbuilder(ShippingInfo template) create builder for ShippingInfo instancecopyDeep()static ShippingInfodeepCopy(ShippingInfo template) factory method to create a deep copy of ShippingInfoInformation on how items are delivered to customers.@Valid DiscountedLineItemPriceDiscounted price of the Shipping Method.@NotNull @Valid CentPrecisionMoneygetPrice()Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or theshippingRateInputfield.@Valid ShippingMethodReferenceNot set if a custom Shipping Method is used.@NotNull StringName of the Shipping Method.@NotNull ShippingMethodStateIndicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.@NotNull @Valid ShippingRateUsed to determine the price.@Valid TaxCategoryReferenceUsed to select a Tax Rate when a Cart has thePlatformTaxMode.@Valid TaxedItemPriceAutomatically set after thetaxRateis set.@Valid TaxRatestatic ShippingInfoof()factory methodstatic ShippingInfoof(ShippingInfo template) factory method to create a shallow copy ShippingInfovoidsetDeliveries(Delivery... deliveries) Information on how items are delivered to customers.voidsetDeliveries(List<Delivery> deliveries) Information on how items are delivered to customers.voidsetDiscountedPrice(DiscountedLineItemPrice discountedPrice) Discounted price of the Shipping Method.voidsetPrice(CentPrecisionMoney price) Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or theshippingRateInputfield.voidsetShippingMethod(ShippingMethodReference shippingMethod) Not set if a custom Shipping Method is used.voidsetShippingMethodName(String shippingMethodName) Name of the Shipping Method.voidsetShippingMethodState(ShippingMethodState shippingMethodState) Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.voidsetShippingRate(ShippingRate shippingRate) Used to determine the price.voidsetTaxCategory(TaxCategoryReference taxCategory) Used to select a Tax Rate when a Cart has thePlatformTaxMode.voidsetTaxedPrice(TaxedItemPrice taxedPrice) Automatically set after thetaxRateis set.voidsetTaxRate(TaxRate taxRate) static com.fasterxml.jackson.core.type.TypeReference<ShippingInfo>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithShippingInfo(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
shippingRateInputfield.- Returns:
- price
-
getShippingRate
Used to determine the price.
- Returns:
- shippingRate
-
getTaxedPrice
Automatically set after the
taxRateis set.- Returns:
- taxedPrice
-
getTaxRate
Automatically set in the
PlatformTaxMode after the shipping address is set.For the
ExternalTaxMode the Tax Rate must be set explicitly with the ExternalTaxRateDraft.- Returns:
- taxRate
-
getTaxCategory
Used to select a Tax Rate when a Cart has the
PlatformTaxMode.- 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
shippingRateInputfield.- Parameters:
price- value to be set
-
setShippingRate
Used to determine the price.
- Parameters:
shippingRate- value to be set
-
setTaxedPrice
Automatically set after the
taxRateis set.- Parameters:
taxedPrice- value to be set
-
setTaxRate
Automatically set in the
PlatformTaxMode after the shipping address is set.For the
ExternalTaxMode 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
PlatformTaxMode.- 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
-
copyDeep
ShippingInfo copyDeep() -
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
-