Interface ShippingInfoImportDraft
- All Superinterfaces:
Draft<ShippingInfoImportDraft>
Maps to an order's shippingInfo
property. This field is usually populated by the cart assosciated 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 instancestatic ShippingInfoImportDraft
deepCopy
(ShippingInfoImportDraft template) factory method to create a deep copy of ShippingInfoImportDraftNote that you can not add aDeliveryItem
on import, asLineItems
andCustomLineItems
are not yet referencable by anid
.@Valid DiscountedLineItemPriceDraft
@NotNull @Valid TypedMoney
getPrice()
@Valid ShippingMethodKeyReference
References a shipping method by key.@NotNull String
@NotNull @Valid ShippingRateDraft
@Valid TaxCategoryKeyReference
References a tax category by key.@Valid TaxRate
static ShippingInfoImportDraft
of()
factory methodstatic ShippingInfoImportDraft
of
(ShippingInfoImportDraft template) factory method to create a shallow copy ShippingInfoImportDraftvoid
setDeliveries
(Delivery... deliveries) Note that you can not add aDeliveryItem
on import, asLineItems
andCustomLineItems
are not yet referencable by anid
.void
setDeliveries
(List<Delivery> deliveries) Note that you can not add aDeliveryItem
on import, asLineItems
andCustomLineItems
are not yet referencable by anid
.void
setDiscountedPrice
(DiscountedLineItemPriceDraft discountedPrice) set discountedPricevoid
setPrice
(TypedMoney price) set pricevoid
setShippingMethod
(ShippingMethodKeyReference shippingMethod) References a shipping method by key.void
setShippingMethodName
(String shippingMethodName) set shippingMethodNamevoid
setShippingMethodState
(ShippingMethodState shippingMethodState) set shippingMethodStatevoid
setShippingRate
(ShippingRateDraft shippingRate) set shippingRatevoid
setTaxCategory
(TaxCategoryKeyReference taxCategory) References a tax category by key.void
setTaxRate
(TaxRate taxRate) set taxRatestatic com.fasterxml.jackson.core.type.TypeReference<ShippingInfoImportDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map function
-
Method Details
-
getShippingMethodName
- Returns:
- shippingMethodName
-
getPrice
- Returns:
- price
-
getShippingRate
- Returns:
- shippingRate
-
getTaxRate
- Returns:
- taxRate
-
getTaxCategory
References a tax category by key.
- Returns:
- taxCategory
-
getShippingMethod
References a shipping method by key.
- Returns:
- shippingMethod
-
getDeliveries
Note that you can not add a
DeliveryItem
on import, asLineItems
andCustomLineItems
are not yet referencable by anid
.- Returns:
- deliveries
-
getDiscountedPrice
- Returns:
- discountedPrice
-
getShippingMethodState
ShippingMethodState getShippingMethodState()- Returns:
- shippingMethodState
-
setShippingMethodName
set shippingMethodName- Parameters:
shippingMethodName
- value to be set
-
setPrice
set price- Parameters:
price
- value to be set
-
setShippingRate
set shippingRate- Parameters:
shippingRate
- value to be set
-
setTaxRate
set taxRate- Parameters:
taxRate
- value to be set
-
setTaxCategory
References a tax category by key.
- Parameters:
taxCategory
- value to be set
-
setShippingMethod
References a shipping method by key.
- Parameters:
shippingMethod
- value to be set
-
setDeliveries
Note that you can not add a
DeliveryItem
on import, asLineItems
andCustomLineItems
are not yet referencable by anid
.- Parameters:
deliveries
- values to be set
-
setDeliveries
Note that you can not add a
DeliveryItem
on import, asLineItems
andCustomLineItems
are not yet referencable by anid
.- Parameters:
deliveries
- values to be set
-
setDiscountedPrice
set discountedPrice- Parameters:
discountedPrice
- value to be set
-
setShippingMethodState
set 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
-
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
-