Interface OrderImport
Represents the data used to import an Order. Once imported, this data is persisted as an Order in the Project.
An OrderImport is a snapshot of an order at the time it was imported.
Example to create an instance using the builder pattern
OrderImport orderImport = OrderImport.builder()
.orderNumber("{orderNumber}")
.totalPrice(totalPriceBuilder -> totalPriceBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic OrderImportBuilderbuilder()builder factory method for OrderImportstatic OrderImportBuilderbuilder(OrderImport template) create builder for OrderImport instancecopyDeep()static OrderImportdeepCopy(OrderImport template) factory method to create a deep copy of OrderImport@Valid AddressMaps toOrder.billingAddress.Maps toOrder.completedAt.Maps toOrder.country.@Valid CustomMaps toOrder.custom.@Valid CustomerKeyReferencekeyof the Customer that the Order belongs to.Maps toOrder.customerEmail.@Valid CustomerGroupKeyReferenceMaps toOrder.customerGroup.@Valid List<CustomLineItemDraft>Maps toOrder.customLineItemsMaps toOrder.inventoryMode.Maps toOrder.itemShippingAddresses.@Valid List<LineItemImportDraft>Maps toOrder.lineItems.@NotNull StringMaps toOrder.orderNumber, String that uniquely identifies an order.Maps toOrder.orderState.Maps toOrder.origin.Maps toOrder.paymentState.Maps toOrder.shipmentState.@Valid AddressMaps toOrder.shippingAddress.@Valid ShippingInfoImportDraftMaps toOrder.shippingInfo.@Valid StateKeyReferencegetState()Maps toOrder.state.@Valid StoreKeyReferencegetStore()Maps toOrder.store.Maps toOrder.taxCalculationMode.@Valid TaxedPriceMaps toOrder.taxedPrice.Maps toOrder.taxRoundingMode.@NotNull @Valid TypedMoneyMaps toOrder.totalPrice.static OrderImportof()factory methodstatic OrderImportof(OrderImport template) factory method to create a shallow copy OrderImportvoidsetBillingAddress(Address billingAddress) Maps toOrder.billingAddress.voidsetCompletedAt(ZonedDateTime completedAt) Maps toOrder.completedAt.voidsetCountry(String country) Maps toOrder.country.voidMaps toOrder.custom.voidsetCustomer(CustomerKeyReference customer) keyof the Customer that the Order belongs to.voidsetCustomerEmail(String customerEmail) Maps toOrder.customerEmail.voidsetCustomerGroup(CustomerGroupKeyReference customerGroup) Maps toOrder.customerGroup.voidsetCustomLineItems(CustomLineItemDraft... customLineItems) Maps toOrder.customLineItemsvoidsetCustomLineItems(List<CustomLineItemDraft> customLineItems) Maps toOrder.customLineItemsvoidsetInventoryMode(InventoryMode inventoryMode) Maps toOrder.inventoryMode.voidsetItemShippingAddresses(Address... itemShippingAddresses) Maps toOrder.itemShippingAddresses.voidsetItemShippingAddresses(List<Address> itemShippingAddresses) Maps toOrder.itemShippingAddresses.voidsetLineItems(LineItemImportDraft... lineItems) Maps toOrder.lineItems.voidsetLineItems(List<LineItemImportDraft> lineItems) Maps toOrder.lineItems.voidsetOrderNumber(String orderNumber) Maps toOrder.orderNumber, String that uniquely identifies an order.voidsetOrderState(OrderState orderState) Maps toOrder.orderState.voidsetOrigin(CartOrigin origin) Maps toOrder.origin.voidsetPaymentState(PaymentState paymentState) Maps toOrder.paymentState.voidsetShipmentState(ShipmentState shipmentState) Maps toOrder.shipmentState.voidsetShippingAddress(Address shippingAddress) Maps toOrder.shippingAddress.voidsetShippingInfo(ShippingInfoImportDraft shippingInfo) Maps toOrder.shippingInfo.voidsetState(StateKeyReference state) Maps toOrder.state.voidsetStore(StoreKeyReference store) Maps toOrder.store.voidsetTaxCalculationMode(TaxCalculationMode taxCalculationMode) Maps toOrder.taxCalculationMode.voidsetTaxedPrice(TaxedPrice taxedPrice) Maps toOrder.taxedPrice.voidsetTaxRoundingMode(RoundingMode taxRoundingMode) Maps toOrder.taxRoundingMode.voidsetTotalPrice(TypedMoney totalPrice) Maps toOrder.totalPrice.static com.fasterxml.jackson.core.type.TypeReference<OrderImport>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithOrderImport(Function<OrderImport, T> helper) accessor map function
-
Method Details
-
getOrderNumber
Maps to
Order.orderNumber, String that uniquely identifies an order. It should be unique across a project. Once it's set it cannot be changed.- Returns:
- orderNumber
-
getCustomer
keyof the Customer that the Order belongs to. If the referenced Customer does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Customer is created.- Returns:
- customer
-
getCustomerEmail
String getCustomerEmail()Maps to
Order.customerEmail.- Returns:
- customerEmail
-
getLineItems
Maps to
Order.lineItems.- Returns:
- lineItems
-
getCustomLineItems
Maps to
Order.customLineItems- Returns:
- customLineItems
-
getTotalPrice
Maps to
Order.totalPrice.- Returns:
- totalPrice
-
getTaxedPrice
Maps to
Order.taxedPrice.- Returns:
- taxedPrice
-
getShippingAddress
Maps to
Order.shippingAddress.- Returns:
- shippingAddress
-
getBillingAddress
Maps to
Order.billingAddress.- Returns:
- billingAddress
-
getCustomerGroup
Maps to
Order.customerGroup. If the referenced CustomerGroup does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced CustomerGroup is created.- Returns:
- customerGroup
-
getCountry
String getCountry()Maps to
Order.country.- Returns:
- country
-
getOrderState
OrderState getOrderState()Maps to
Order.orderState.- Returns:
- orderState
-
getShipmentState
ShipmentState getShipmentState()Maps to
Order.shipmentState.- Returns:
- shipmentState
-
getPaymentState
PaymentState getPaymentState()Maps to
Order.paymentState.- Returns:
- paymentState
-
getShippingInfo
Maps to
Order.shippingInfo.- Returns:
- shippingInfo
-
getCompletedAt
ZonedDateTime getCompletedAt()Maps to
Order.completedAt.- Returns:
- completedAt
-
getCustom
Maps to
Order.custom.- Returns:
- custom
-
getInventoryMode
InventoryMode getInventoryMode()Maps to
Order.inventoryMode.- Returns:
- inventoryMode
-
getTaxRoundingMode
RoundingMode getTaxRoundingMode()Maps to
Order.taxRoundingMode.- Returns:
- taxRoundingMode
-
getTaxCalculationMode
TaxCalculationMode getTaxCalculationMode()Maps to
Order.taxCalculationMode.- Returns:
- taxCalculationMode
-
getOrigin
CartOrigin getOrigin()Maps to
Order.origin.- Returns:
- origin
-
getItemShippingAddresses
Maps to
Order.itemShippingAddresses.- Returns:
- itemShippingAddresses
-
getStore
Maps to
Order.store. If the referenced Store does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Store is created.- Returns:
- store
-
getState
Maps to
Order.state. If the referenced State does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced State is created.- Returns:
- state
-
setOrderNumber
Maps to
Order.orderNumber, String that uniquely identifies an order. It should be unique across a project. Once it's set it cannot be changed.- Parameters:
orderNumber- value to be set
-
setCustomer
keyof the Customer that the Order belongs to. If the referenced Customer does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Customer is created.- Parameters:
customer- value to be set
-
setCustomerEmail
Maps to
Order.customerEmail.- Parameters:
customerEmail- value to be set
-
setLineItems
Maps to
Order.lineItems.- Parameters:
lineItems- values to be set
-
setLineItems
Maps to
Order.lineItems.- Parameters:
lineItems- values to be set
-
setCustomLineItems
Maps to
Order.customLineItems- Parameters:
customLineItems- values to be set
-
setCustomLineItems
Maps to
Order.customLineItems- Parameters:
customLineItems- values to be set
-
setTotalPrice
Maps to
Order.totalPrice.- Parameters:
totalPrice- value to be set
-
setTaxedPrice
Maps to
Order.taxedPrice.- Parameters:
taxedPrice- value to be set
-
setShippingAddress
Maps to
Order.shippingAddress.- Parameters:
shippingAddress- value to be set
-
setBillingAddress
Maps to
Order.billingAddress.- Parameters:
billingAddress- value to be set
-
setCustomerGroup
Maps to
Order.customerGroup. If the referenced CustomerGroup does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced CustomerGroup is created.- Parameters:
customerGroup- value to be set
-
setCountry
Maps to
Order.country.- Parameters:
country- value to be set
-
setOrderState
Maps to
Order.orderState.- Parameters:
orderState- value to be set
-
setShipmentState
Maps to
Order.shipmentState.- Parameters:
shipmentState- value to be set
-
setPaymentState
Maps to
Order.paymentState.- Parameters:
paymentState- value to be set
-
setShippingInfo
Maps to
Order.shippingInfo.- Parameters:
shippingInfo- value to be set
-
setCompletedAt
Maps to
Order.completedAt.- Parameters:
completedAt- value to be set
-
setCustom
Maps to
Order.custom.- Parameters:
custom- value to be set
-
setInventoryMode
Maps to
Order.inventoryMode.- Parameters:
inventoryMode- value to be set
-
setTaxRoundingMode
Maps to
Order.taxRoundingMode.- Parameters:
taxRoundingMode- value to be set
-
setTaxCalculationMode
Maps to
Order.taxCalculationMode.- Parameters:
taxCalculationMode- value to be set
-
setOrigin
Maps to
Order.origin.- Parameters:
origin- value to be set
-
setItemShippingAddresses
Maps to
Order.itemShippingAddresses.- Parameters:
itemShippingAddresses- values to be set
-
setItemShippingAddresses
Maps to
Order.itemShippingAddresses.- Parameters:
itemShippingAddresses- values to be set
-
setStore
Maps to
Order.store. If the referenced Store does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Store is created.- Parameters:
store- value to be set
-
setState
Maps to
Order.state. If the referenced State does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced State is created.- Parameters:
state- value to be set
-
of
factory method- Returns:
- instance of OrderImport
-
of
factory method to create a shallow copy OrderImport- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
OrderImport copyDeep() -
deepCopy
factory method to create a deep copy of OrderImport- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OrderImport- Returns:
- builder
-
builder
create builder for OrderImport instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withOrderImport
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
-