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 ShippingInfoImportDraftdeepCopy(ShippingInfoImportDraft template) factory method to create a deep copy of ShippingInfoImportDraftMaps toshippingInfo.deliveries.@Valid DiscountedLineItemPriceDraftMaps toshippingInfo.discountedPrice.@NotNull @Valid TypedMoneygetPrice()Maps toshippingInfo.price.@Valid ShippingMethodKeyReferenceMaps toshippingInfo.shippingMethod.@NotNull StringMaps toshippingInfo.shippingMethodName.Maps toshippingInfo.shippingMethodState.@NotNull @Valid ShippingRateDraftUsed to determine the price.@Valid TaxCategoryKeyReferenceMaps toshippingInfo.taxCategory.@Valid TaxRateMaps toshippingInfo.taxRate.static ShippingInfoImportDraftof()factory methodstatic ShippingInfoImportDraftof(ShippingInfoImportDraft template) factory method to create a shallow copy ShippingInfoImportDraftvoidsetDeliveries(Delivery... deliveries) Maps toshippingInfo.deliveries.voidsetDeliveries(List<Delivery> deliveries) Maps toshippingInfo.deliveries.voidsetDiscountedPrice(DiscountedLineItemPriceDraft discountedPrice) Maps toshippingInfo.discountedPrice.voidsetPrice(TypedMoney price) Maps toshippingInfo.price.voidsetShippingMethod(ShippingMethodKeyReference shippingMethod) Maps toshippingInfo.shippingMethod.voidsetShippingMethodName(String shippingMethodName) Maps toshippingInfo.shippingMethodName.voidsetShippingMethodState(ShippingMethodState shippingMethodState) Maps toshippingInfo.shippingMethodState.voidsetShippingRate(ShippingRateDraft shippingRate) Used to determine the price.voidsetTaxCategory(TaxCategoryKeyReference taxCategory) Maps toshippingInfo.taxCategory.voidsetTaxRate(TaxRate taxRate) Maps toshippingInfo.taxRate.static com.fasterxml.jackson.core.type.TypeReference<ShippingInfoImportDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor 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, thestateof the ImportOperation will be set tounresolveduntil the referenced TaxCategory is created.- Returns:
- taxCategory
-
getShippingMethod
Maps to
shippingInfo.shippingMethod. If the referenced ShippingMethod does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced ShippingMethod is created.- Returns:
- shippingMethod
-
getDeliveries
Maps to
shippingInfo.deliveries. You cannot add aDeliveryItemon import, asLineItemsandCustomLineItemsare 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, thestateof the ImportOperation will be set tounresolveduntil the referenced TaxCategory is created.- Parameters:
taxCategory- value to be set
-
setShippingMethod
Maps to
shippingInfo.shippingMethod. If the referenced ShippingMethod does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced ShippingMethod is created.- Parameters:
shippingMethod- value to be set
-
setDeliveries
Maps to
shippingInfo.deliveries. You cannot add aDeliveryItemon import, asLineItemsandCustomLineItemsare not yet referenceable by anid.- Parameters:
deliveries- values to be set
-
setDeliveries
Maps to
shippingInfo.deliveries. You cannot add aDeliveryItemon import, asLineItemsandCustomLineItemsare 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
-