Interface LineItemImportDraft
- All Superinterfaces:
Draft<LineItemImportDraft>
Represents an individual Line Item in an Order. A line item is a snapshot of a product at the time it was added to the order.
You cannot create an Order that includes line item operations that do not exist in the Project or have been deleted. Products and Product Variants referenced by a line item must already exist in the Project. Product Attributes are merged with Variant Attributes to ensure the full Attribute context of the Product Variant.
Example to create an instance using the builder pattern
LineItemImportDraft lineItemImportDraft = LineItemImportDraft.builder()
.name(nameBuilder -> nameBuilder)
.variant(variantBuilder -> variantBuilder)
.price(priceBuilder -> priceBuilder)
.quantity(0.3)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic LineItemImportDraftBuilderbuilder()builder factory method for LineItemImportDraftstatic LineItemImportDraftBuilderbuilder(LineItemImportDraft template) create builder for LineItemImportDraft instancecopyDeep()static LineItemImportDraftdeepCopy(LineItemImportDraft template) factory method to create a deep copy of LineItemImportDraft@Valid CustomMaps toLineItem.custom.@Valid ChannelKeyReferenceMaps toLineItem.distributionChannel.@NotNull @Valid LocalizedStringgetName()Maps toLineItem.name.@NotNull @Valid LineItemPricegetPrice()Maps toLineItem.price.@Valid ProductKeyReferenceMaps toLineItem.productId.@NotNull LongMaps toLineItem.quantity.@Valid ItemShippingDetailsDraftMaps toLineItem.shippingDetails.getState()Maps toLineItem.state.@Valid ChannelKeyReferenceMaps toLineItem.supplyChannel.@Valid TaxRateMaps toLineItem.taxRate.@NotNull @Valid LineItemProductVariantImportDraftMaps toProductVariantImportDraft.static LineItemImportDraftof()factory methodstatic LineItemImportDraftof(LineItemImportDraft template) factory method to create a shallow copy LineItemImportDraftvoidMaps toLineItem.custom.voidsetDistributionChannel(ChannelKeyReference distributionChannel) Maps toLineItem.distributionChannel.voidsetName(LocalizedString name) Maps toLineItem.name.voidsetPrice(LineItemPrice price) Maps toLineItem.price.voidsetProduct(ProductKeyReference product) Maps toLineItem.productId.voidsetQuantity(Long quantity) Maps toLineItem.quantity.voidsetShippingDetails(ItemShippingDetailsDraft shippingDetails) Maps toLineItem.shippingDetails.voidMaps toLineItem.state.voidMaps toLineItem.state.voidsetSupplyChannel(ChannelKeyReference supplyChannel) Maps toLineItem.supplyChannel.voidsetTaxRate(TaxRate taxRate) Maps toLineItem.taxRate.voidMaps toProductVariantImportDraft.static com.fasterxml.jackson.core.type.TypeReference<LineItemImportDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithLineItemImportDraft(Function<LineItemImportDraft, T> helper) accessor map function
-
Method Details
-
getProduct
Maps to
LineItem.productId. If the referenced Product does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Product is created.- Returns:
- product
-
getName
Maps to
LineItem.name.- Returns:
- name
-
getVariant
Maps to
ProductVariantImportDraft.- Returns:
- variant
-
getPrice
Maps to
LineItem.price.- Returns:
- price
-
getQuantity
Maps to
LineItem.quantity.- Returns:
- quantity
-
getState
Maps to
LineItem.state.- Returns:
- state
-
getSupplyChannel
Maps to
LineItem.supplyChannel. If the referenced Channel does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Channel is created.- Returns:
- supplyChannel
-
getDistributionChannel
Maps to
LineItem.distributionChannel. If the referenced Channel does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Channel is created.- Returns:
- distributionChannel
-
getTaxRate
Maps to
LineItem.taxRate.- Returns:
- taxRate
-
getShippingDetails
Maps to
LineItem.shippingDetails.- Returns:
- shippingDetails
-
getCustom
Maps to
LineItem.custom.- Returns:
- custom
-
setProduct
Maps to
LineItem.productId. If the referenced Product does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Product is created.- Parameters:
product- value to be set
-
setName
Maps to
LineItem.name.- Parameters:
name- value to be set
-
setVariant
Maps to
ProductVariantImportDraft.- Parameters:
variant- value to be set
-
setPrice
Maps to
LineItem.price.- Parameters:
price- value to be set
-
setQuantity
Maps to
LineItem.quantity.- Parameters:
quantity- value to be set
-
setState
Maps to
LineItem.state.- Parameters:
state- values to be set
-
setState
Maps to
LineItem.state.- Parameters:
state- values to be set
-
setSupplyChannel
Maps to
LineItem.supplyChannel. If the referenced Channel does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Channel is created.- Parameters:
supplyChannel- value to be set
-
setDistributionChannel
Maps to
LineItem.distributionChannel. If the referenced Channel does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Channel is created.- Parameters:
distributionChannel- value to be set
-
setTaxRate
Maps to
LineItem.taxRate.- Parameters:
taxRate- value to be set
-
setShippingDetails
Maps to
LineItem.shippingDetails.- Parameters:
shippingDetails- value to be set
-
setCustom
Maps to
LineItem.custom.- Parameters:
custom- value to be set
-
of
factory method- Returns:
- instance of LineItemImportDraft
-
of
factory method to create a shallow copy LineItemImportDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
LineItemImportDraft copyDeep() -
deepCopy
factory method to create a deep copy of LineItemImportDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for LineItemImportDraft- Returns:
- builder
-
builder
create builder for LineItemImportDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withLineItemImportDraft
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
-