Interface ShippingInfoImportDraft
- All Superinterfaces:
Draft<ShippingInfoImportDraft>
Maps to an Order's shippingInfo
property. This field is usually populated by the Cart associated with the Order, but when importing Orders you must provide a draft representation as a part of the OrderImport.
Example to create an instance using the builder pattern
ShippingInfoImportDraft shippingInfoImportDraft = ShippingInfoImportDraft.builder()
.shippingMethodName("{shippingMethodName}")
.price(priceBuilder -> priceBuilder)
.shippingRate(shippingRateBuilder -> shippingRateBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ShippingInfoImportDraftbuilder
(ShippingInfoImportDraft template) create builder for ShippingInfoImportDraft instancecopyDeep()
static ShippingInfoImportDraft
deepCopy
(ShippingInfoImportDraft template) factory method to create a deep copy of ShippingInfoImportDraftMaps toshippingInfo.deliveries
.@Valid DiscountedLineItemPriceDraft
Maps toshippingInfo.discountedPrice
.@NotNull @Valid TypedMoney
getPrice()
Maps toshippingInfo.price
.@Valid ShippingMethodKeyReference
Maps toshippingInfo.shippingMethod
.@NotNull String
Maps toshippingInfo.shippingMethodName
.Maps toshippingInfo.shippingMethodState
.@NotNull @Valid ShippingRateDraft
Used to determine the price.@Valid TaxCategoryKeyReference
Maps toshippingInfo.taxCategory
.@Valid TaxRate
Maps toshippingInfo.taxRate
.static ShippingInfoImportDraft
of()
factory methodstatic ShippingInfoImportDraft
of
(ShippingInfoImportDraft template) factory method to create a shallow copy ShippingInfoImportDraftvoid
setDeliveries
(Delivery... deliveries) Maps toshippingInfo.deliveries
.void
setDeliveries
(List<Delivery> deliveries) Maps toshippingInfo.deliveries
.void
setDiscountedPrice
(DiscountedLineItemPriceDraft discountedPrice) Maps toshippingInfo.discountedPrice
.void
setPrice
(TypedMoney price) Maps toshippingInfo.price
.void
setShippingMethod
(ShippingMethodKeyReference shippingMethod) Maps toshippingInfo.shippingMethod
.void
setShippingMethodName
(String shippingMethodName) Maps toshippingInfo.shippingMethodName
.void
setShippingMethodState
(ShippingMethodState shippingMethodState) Maps toshippingInfo.shippingMethodState
.void
setShippingRate
(ShippingRateDraft shippingRate) Used to determine the price.void
setTaxCategory
(TaxCategoryKeyReference taxCategory) Maps toshippingInfo.taxCategory
.void
setTaxRate
(TaxRate taxRate) Maps toshippingInfo.taxRate
.static com.fasterxml.jackson.core.type.TypeReference<ShippingInfoImportDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map function
-
Method Details
-
getShippingMethodName
Maps to
shippingInfo.shippingMethodName
.- Returns:
- shippingMethodName
-
getPrice
Maps to
shippingInfo.price
.- Returns:
- price
-
getShippingRate
Used to determine the price.
- Returns:
- shippingRate
-
getTaxRate
Maps to
shippingInfo.taxRate
.- Returns:
- taxRate
-
getTaxCategory
Maps to
shippingInfo.taxCategory
. If the referenced TaxCategory does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced TaxCategory is created.- Returns:
- taxCategory
-
getShippingMethod
Maps to
shippingInfo.shippingMethod
. If the referenced ShippingMethod does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced ShippingMethod is created.- Returns:
- shippingMethod
-
getDeliveries
Maps to
shippingInfo.deliveries
. You cannot add aDeliveryItem
on import, asLineItems
andCustomLineItems
are not yet referenceable by anid
.- Returns:
- deliveries
-
getDiscountedPrice
Maps to
shippingInfo.discountedPrice
.- Returns:
- discountedPrice
-
getShippingMethodState
ShippingMethodState getShippingMethodState()Maps to
shippingInfo.shippingMethodState
.- Returns:
- shippingMethodState
-
setShippingMethodName
Maps to
shippingInfo.shippingMethodName
.- Parameters:
shippingMethodName
- value to be set
-
setPrice
Maps to
shippingInfo.price
.- Parameters:
price
- value to be set
-
setShippingRate
Used to determine the price.
- Parameters:
shippingRate
- value to be set
-
setTaxRate
Maps to
shippingInfo.taxRate
.- Parameters:
taxRate
- value to be set
-
setTaxCategory
Maps to
shippingInfo.taxCategory
. If the referenced TaxCategory does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced TaxCategory is created.- Parameters:
taxCategory
- value to be set
-
setShippingMethod
Maps to
shippingInfo.shippingMethod
. If the referenced ShippingMethod does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced ShippingMethod is created.- Parameters:
shippingMethod
- value to be set
-
setDeliveries
Maps to
shippingInfo.deliveries
. You cannot add aDeliveryItem
on import, asLineItems
andCustomLineItems
are not yet referenceable by anid
.- Parameters:
deliveries
- values to be set
-
setDeliveries
Maps to
shippingInfo.deliveries
. You cannot add aDeliveryItem
on import, asLineItems
andCustomLineItems
are not yet referenceable by anid
.- Parameters:
deliveries
- values to be set
-
setDiscountedPrice
Maps to
shippingInfo.discountedPrice
.- Parameters:
discountedPrice
- value to be set
-
setShippingMethodState
Maps to
shippingInfo.shippingMethodState
.- Parameters:
shippingMethodState
- value to be set
-
of
factory method- Returns:
- instance of ShippingInfoImportDraft
-
of
factory method to create a shallow copy ShippingInfoImportDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
ShippingInfoImportDraft copyDeep() -
deepCopy
factory method to create a deep copy of ShippingInfoImportDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ShippingInfoImportDraft- Returns:
- builder
-
builder
create builder for ShippingInfoImportDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withShippingInfoImportDraft
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
-