Class OrderImportBuilder
- All Implemented Interfaces:
Builder<OrderImport>
Example to create an instance using the builder pattern
OrderImport orderImport = OrderImport.builder()
.orderNumber("{orderNumber}")
.totalPrice(totalPriceBuilder -> totalPriceBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMaps toOrder.customLineItems
Maps toOrder.itemShippingAddresses
.Maps toOrder.lineItems
.billingAddress
(Address billingAddress) Maps toOrder.billingAddress
.billingAddress
(Function<AddressBuilder, AddressBuilder> builder) Maps toOrder.billingAddress
.build()
builds OrderImport with checking for non-null required valuesbuilds OrderImport without checking for non-null required valuescompletedAt
(ZonedDateTime completedAt) Maps toOrder.completedAt
.Maps toOrder.country
.Maps toOrder.custom
.custom
(Function<CustomBuilder, CustomBuilder> builder) Maps toOrder.custom
.customer
(CustomerKeyReference customer) set the value to the customerset the value to the customer using the builder functioncustomerEmail
(String customerEmail) Maps toOrder.customerEmail
.customerGroup
(CustomerGroupKeyReference customerGroup) Maps toOrder.customerGroup
.Maps toOrder.customerGroup
.customLineItems
(CustomLineItemDraft... customLineItems) Maps toOrder.customLineItems
customLineItems
(List<CustomLineItemDraft> customLineItems) Maps toOrder.customLineItems
Maps toOrder.billingAddress
.Maps toOrder.completedAt
.Maps toOrder.country
.Maps toOrder.custom
.value of customer}Maps toOrder.customerEmail
.Maps toOrder.customerGroup
.Maps toOrder.customLineItems
Maps toOrder.inventoryMode
.Maps toOrder.itemShippingAddresses
.Maps toOrder.lineItems
.Maps toOrder.orderNumber
, String that uniquely identifies an order.Maps toOrder.orderState
.Maps toOrder.origin
.Maps toOrder.paymentState
.Maps toOrder.shipmentState
.Maps toOrder.shippingAddress
.Maps toOrder.shippingInfo
.getState()
Reference to a State in a custom workflow.getStore()
Reference to the Store in which the Order is associated.Maps toOrder.taxCalculationMode
.Maps toOrder.taxedPrice
.Maps toOrder.taxRoundingMode
.Maps toOrder.totalPrice
.inventoryMode
(InventoryMode inventoryMode) Maps toOrder.inventoryMode
.itemShippingAddresses
(Address... itemShippingAddresses) Maps toOrder.itemShippingAddresses
.itemShippingAddresses
(List<Address> itemShippingAddresses) Maps toOrder.itemShippingAddresses
.lineItems
(LineItemImportDraft... lineItems) Maps toOrder.lineItems
.lineItems
(List<LineItemImportDraft> lineItems) Maps toOrder.lineItems
.static OrderImportBuilder
of()
factory method for an instance of OrderImportBuilderstatic OrderImportBuilder
of
(OrderImport template) create builder for OrderImport instanceorderNumber
(String orderNumber) Maps toOrder.orderNumber
, String that uniquely identifies an order.orderState
(OrderState orderState) Maps toOrder.orderState
.origin
(CartOrigin origin) Maps toOrder.origin
.paymentState
(PaymentState paymentState) Maps toOrder.paymentState
.plusCustomLineItems
(CustomLineItemDraft... customLineItems) Maps toOrder.customLineItems
Maps toOrder.customLineItems
plusItemShippingAddresses
(Address... itemShippingAddresses) Maps toOrder.itemShippingAddresses
.Maps toOrder.itemShippingAddresses
.plusLineItems
(LineItemImportDraft... lineItems) Maps toOrder.lineItems
.Maps toOrder.lineItems
.Maps toOrder.customLineItems
Maps toOrder.itemShippingAddresses
.Maps toOrder.lineItems
.shipmentState
(ShipmentState shipmentState) Maps toOrder.shipmentState
.shippingAddress
(Address shippingAddress) Maps toOrder.shippingAddress
.shippingAddress
(Function<AddressBuilder, AddressBuilder> builder) Maps toOrder.shippingAddress
.shippingInfo
(ShippingInfoImportDraft shippingInfo) Maps toOrder.shippingInfo
.Maps toOrder.shippingInfo
.state
(StateKeyReference state) Reference to a State in a custom workflow.Reference to a State in a custom workflow.store
(StoreKeyReference store) Reference to the Store in which the Order is associated.Reference to the Store in which the Order is associated.taxCalculationMode
(TaxCalculationMode taxCalculationMode) Maps toOrder.taxCalculationMode
.taxedPrice
(TaxedPrice taxedPrice) Maps toOrder.taxedPrice
.taxedPrice
(Function<TaxedPriceBuilder, TaxedPriceBuilder> builder) Maps toOrder.taxedPrice
.taxRoundingMode
(RoundingMode taxRoundingMode) Maps toOrder.taxRoundingMode
.totalPrice
(TypedMoney totalPrice) Maps toOrder.totalPrice
.totalPrice
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Maps toOrder.totalPrice
.withBillingAddress
(Function<AddressBuilder, Address> builder) Maps toOrder.billingAddress
.withCustom
(Function<CustomBuilder, Custom> builder) Maps toOrder.custom
.set the value to the customer using the builder functionMaps toOrder.customerGroup
.Maps toOrder.customLineItems
Maps toOrder.itemShippingAddresses
.Maps toOrder.lineItems
.withShippingAddress
(Function<AddressBuilder, Address> builder) Maps toOrder.shippingAddress
.Maps toOrder.shippingInfo
.Reference to a State in a custom workflow.Reference to the Store in which the Order is associated.withTaxedPrice
(Function<TaxedPriceBuilder, TaxedPrice> builder) Maps toOrder.taxedPrice
.
-
Constructor Details
-
OrderImportBuilder
public OrderImportBuilder()
-
-
Method Details
-
orderNumber
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- Returns:
- Builder
-
customer
public OrderImportBuilder customer(Function<CustomerKeyReferenceBuilder, CustomerKeyReferenceBuilder> builder) set the value to the customer using the builder function- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
withCustomer
public OrderImportBuilder withCustomer(Function<CustomerKeyReferenceBuilder, CustomerKeyReference> builder) set the value to the customer using the builder function- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
customer
set the value to the customer- Parameters:
customer
- value to be set- Returns:
- Builder
-
customerEmail
Maps to
Order.customerEmail
.- Parameters:
customerEmail
- value to be set- Returns:
- Builder
-
lineItems
Maps to
Order.lineItems
.- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
lineItems
Maps to
Order.lineItems
.- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
plusLineItems
Maps to
Order.lineItems
.- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
plusLineItems
public OrderImportBuilder plusLineItems(Function<LineItemImportDraftBuilder, LineItemImportDraftBuilder> builder) Maps to
Order.lineItems
.- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
withLineItems
public OrderImportBuilder withLineItems(Function<LineItemImportDraftBuilder, LineItemImportDraftBuilder> builder) Maps to
Order.lineItems
.- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
addLineItems
public OrderImportBuilder addLineItems(Function<LineItemImportDraftBuilder, LineItemImportDraft> builder) Maps to
Order.lineItems
.- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
setLineItems
public OrderImportBuilder setLineItems(Function<LineItemImportDraftBuilder, LineItemImportDraft> builder) Maps to
Order.lineItems
.- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
customLineItems
Maps to
Order.customLineItems
- Parameters:
customLineItems
- value to be set- Returns:
- Builder
-
customLineItems
Maps to
Order.customLineItems
- Parameters:
customLineItems
- value to be set- Returns:
- Builder
-
plusCustomLineItems
Maps to
Order.customLineItems
- Parameters:
customLineItems
- value to be set- Returns:
- Builder
-
plusCustomLineItems
public OrderImportBuilder plusCustomLineItems(Function<CustomLineItemDraftBuilder, CustomLineItemDraftBuilder> builder) Maps to
Order.customLineItems
- Parameters:
builder
- function to build the customLineItems value- Returns:
- Builder
-
withCustomLineItems
public OrderImportBuilder withCustomLineItems(Function<CustomLineItemDraftBuilder, CustomLineItemDraftBuilder> builder) Maps to
Order.customLineItems
- Parameters:
builder
- function to build the customLineItems value- Returns:
- Builder
-
addCustomLineItems
public OrderImportBuilder addCustomLineItems(Function<CustomLineItemDraftBuilder, CustomLineItemDraft> builder) Maps to
Order.customLineItems
- Parameters:
builder
- function to build the customLineItems value- Returns:
- Builder
-
setCustomLineItems
public OrderImportBuilder setCustomLineItems(Function<CustomLineItemDraftBuilder, CustomLineItemDraft> builder) Maps to
Order.customLineItems
- Parameters:
builder
- function to build the customLineItems value- Returns:
- Builder
-
totalPrice
Maps to
Order.totalPrice
.- Parameters:
totalPrice
- value to be set- Returns:
- Builder
-
totalPrice
public OrderImportBuilder totalPrice(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Maps to
Order.totalPrice
.- Parameters:
builder
- function to build the totalPrice value- Returns:
- Builder
-
taxedPrice
Maps to
Order.taxedPrice
.- Parameters:
builder
- function to build the taxedPrice value- Returns:
- Builder
-
withTaxedPrice
Maps to
Order.taxedPrice
.- Parameters:
builder
- function to build the taxedPrice value- Returns:
- Builder
-
taxedPrice
Maps to
Order.taxedPrice
.- Parameters:
taxedPrice
- value to be set- Returns:
- Builder
-
shippingAddress
Maps to
Order.shippingAddress
.- Parameters:
builder
- function to build the shippingAddress value- Returns:
- Builder
-
withShippingAddress
Maps to
Order.shippingAddress
.- Parameters:
builder
- function to build the shippingAddress value- Returns:
- Builder
-
shippingAddress
Maps to
Order.shippingAddress
.- Parameters:
shippingAddress
- value to be set- Returns:
- Builder
-
billingAddress
Maps to
Order.billingAddress
.- Parameters:
builder
- function to build the billingAddress value- Returns:
- Builder
-
withBillingAddress
Maps to
Order.billingAddress
.- Parameters:
builder
- function to build the billingAddress value- Returns:
- Builder
-
billingAddress
Maps to
Order.billingAddress
.- Parameters:
billingAddress
- value to be set- Returns:
- Builder
-
customerGroup
public OrderImportBuilder customerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReferenceBuilder> builder) Maps to
Order.customerGroup
.- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
withCustomerGroup
public OrderImportBuilder withCustomerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReference> builder) Maps to
Order.customerGroup
.- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
customerGroup
Maps to
Order.customerGroup
.- Parameters:
customerGroup
- value to be set- Returns:
- Builder
-
country
Maps to
Order.country
.- Parameters:
country
- value to be set- Returns:
- Builder
-
orderState
Maps to
Order.orderState
.- Parameters:
orderState
- value to be set- Returns:
- Builder
-
shipmentState
Maps to
Order.shipmentState
.- Parameters:
shipmentState
- value to be set- Returns:
- Builder
-
paymentState
Maps to
Order.paymentState
.- Parameters:
paymentState
- value to be set- Returns:
- Builder
-
shippingInfo
public OrderImportBuilder shippingInfo(Function<ShippingInfoImportDraftBuilder, ShippingInfoImportDraftBuilder> builder) Maps to
Order.shippingInfo
.- Parameters:
builder
- function to build the shippingInfo value- Returns:
- Builder
-
withShippingInfo
public OrderImportBuilder withShippingInfo(Function<ShippingInfoImportDraftBuilder, ShippingInfoImportDraft> builder) Maps to
Order.shippingInfo
.- Parameters:
builder
- function to build the shippingInfo value- Returns:
- Builder
-
shippingInfo
Maps to
Order.shippingInfo
.- Parameters:
shippingInfo
- value to be set- Returns:
- Builder
-
completedAt
Maps to
Order.completedAt
.- Parameters:
completedAt
- value to be set- Returns:
- Builder
-
custom
Maps to
Order.custom
.- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Maps to
Order.custom
.- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Maps to
Order.custom
.- Parameters:
custom
- value to be set- Returns:
- Builder
-
inventoryMode
Maps to
Order.inventoryMode
.- Parameters:
inventoryMode
- value to be set- Returns:
- Builder
-
taxRoundingMode
Maps to
Order.taxRoundingMode
.- Parameters:
taxRoundingMode
- value to be set- Returns:
- Builder
-
taxCalculationMode
Maps to
Order.taxCalculationMode
.- Parameters:
taxCalculationMode
- value to be set- Returns:
- Builder
-
origin
Maps to
Order.origin
.- Parameters:
origin
- value to be set- Returns:
- Builder
-
itemShippingAddresses
Maps to
Order.itemShippingAddresses
.- Parameters:
itemShippingAddresses
- value to be set- Returns:
- Builder
-
itemShippingAddresses
Maps to
Order.itemShippingAddresses
.- Parameters:
itemShippingAddresses
- value to be set- Returns:
- Builder
-
plusItemShippingAddresses
Maps to
Order.itemShippingAddresses
.- Parameters:
itemShippingAddresses
- value to be set- Returns:
- Builder
-
plusItemShippingAddresses
public OrderImportBuilder plusItemShippingAddresses(Function<AddressBuilder, AddressBuilder> builder) Maps to
Order.itemShippingAddresses
.- Parameters:
builder
- function to build the itemShippingAddresses value- Returns:
- Builder
-
withItemShippingAddresses
public OrderImportBuilder withItemShippingAddresses(Function<AddressBuilder, AddressBuilder> builder) Maps to
Order.itemShippingAddresses
.- Parameters:
builder
- function to build the itemShippingAddresses value- Returns:
- Builder
-
addItemShippingAddresses
Maps to
Order.itemShippingAddresses
.- Parameters:
builder
- function to build the itemShippingAddresses value- Returns:
- Builder
-
setItemShippingAddresses
Maps to
Order.itemShippingAddresses
.- Parameters:
builder
- function to build the itemShippingAddresses value- Returns:
- Builder
-
store
public OrderImportBuilder store(Function<StoreKeyReferenceBuilder, StoreKeyReferenceBuilder> builder) Reference to the Store in which the Order is associated. If referenced Store does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Store exists.- Parameters:
builder
- function to build the store value- Returns:
- Builder
-
withStore
Reference to the Store in which the Order is associated. If referenced Store does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Store exists.- Parameters:
builder
- function to build the store value- Returns:
- Builder
-
store
Reference to the Store in which the Order is associated. If referenced Store does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Store exists.- Parameters:
store
- value to be set- Returns:
- Builder
-
state
public OrderImportBuilder state(Function<StateKeyReferenceBuilder, StateKeyReferenceBuilder> builder) Reference to a State in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
Reference to a State in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
Reference to a State in a custom workflow.
- Parameters:
state
- value to be set- Returns:
- Builder
-
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
value of customer}- Returns:
- customer
-
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
.- Returns:
- customerGroup
-
getCountry
Maps to
Order.country
.- Returns:
- country
-
getOrderState
Maps to
Order.orderState
.- Returns:
- orderState
-
getShipmentState
Maps to
Order.shipmentState
.- Returns:
- shipmentState
-
getPaymentState
Maps to
Order.paymentState
.- Returns:
- paymentState
-
getShippingInfo
Maps to
Order.shippingInfo
.- Returns:
- shippingInfo
-
getCompletedAt
Maps to
Order.completedAt
.- Returns:
- completedAt
-
getCustom
Maps to
Order.custom
.- Returns:
- custom
-
getInventoryMode
Maps to
Order.inventoryMode
.- Returns:
- inventoryMode
-
getTaxRoundingMode
Maps to
Order.taxRoundingMode
.- Returns:
- taxRoundingMode
-
getTaxCalculationMode
Maps to
Order.taxCalculationMode
.- Returns:
- taxCalculationMode
-
getOrigin
Maps to
Order.origin
.- Returns:
- origin
-
getItemShippingAddresses
Maps to
Order.itemShippingAddresses
.- Returns:
- itemShippingAddresses
-
getStore
Reference to the Store in which the Order is associated. If referenced Store does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Store exists.- Returns:
- store
-
getState
Reference to a State in a custom workflow.
- Returns:
- state
-
build
builds OrderImport with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderImport>
- Returns:
- OrderImport
-
buildUnchecked
builds OrderImport without checking for non-null required values- Returns:
- OrderImport
-
of
factory method for an instance of OrderImportBuilder- Returns:
- builder
-
of
create builder for OrderImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-