Interface OrderImportDraft
- All Superinterfaces:
CustomizableDraft<OrderImportDraft>
,Draft<OrderImportDraft>
A snapshot of an Order at the time it was imported.
Example to create an instance using the builder pattern
OrderImportDraft orderImportDraft = OrderImportDraft.builder()
.totalPrice(totalPriceBuilder -> totalPriceBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic OrderImportDraftBuilder
builder()
builder factory method for OrderImportDraftstatic OrderImportDraftBuilder
builder
(OrderImportDraft template) create builder for OrderImportDraft instancestatic OrderImportDraft
deepCopy
(OrderImportDraft template) factory method to create a deep copy of OrderImportDraft@Valid BaseAddress
Billing address associated with the Order.ResourceIdentifier to the Business Unit the Order should belong to.User-defined date and time for the Order.Include a value to associate a country with the Order.@Valid CustomFieldsDraft
Custom Fields for the Order.The Email address of the Customer the Order belongs to.The Customer Group of the Customer the Order belongs to.Theid
of the Customer the Order belongs to.@Valid List<CustomLineItemImportDraft>
Custom Line Items to add to the Cart.Determines how stock quantities are tracked for Line Items in the Cart.@Valid List<BaseAddress>
Addresses for Orders with multiple shipping addresses.@Valid List<LineItemImportDraft>
Line Items to add to the Order.User-defined identifier of the Order.Current status of the Order.Indicates the origin of the Order.@Valid PaymentInfo
Payment information associated with the Order.Payment status of the Order.User-defined identifier for a purchase Order.Shipment status of the Order.@Valid BaseAddress
Shipping address associated with the Order.@Valid ShippingInfoImportDraft
Shipping-related information of the Order.@Valid StateReference
getState()
State of the Order in a custom workflow.@Valid StoreResourceIdentifier
getStore()
The Store the Order belongs to.Determines how taxes are calculated fortaxedPrice
.@Valid TaxedPriceDraft
Include TaxedPrice information for the Order.Determines how monetary values are rounded when calculating taxes fortaxedPrice
.@NotNull @Valid Money
The total Price of the Order.static OrderImportDraft
of()
factory methodstatic OrderImportDraft
of
(OrderImportDraft template) factory method to create a shallow copy OrderImportDraftvoid
setBillingAddress
(BaseAddress billingAddress) Billing address associated with the Order.void
setBusinessUnit
(BusinessUnitResourceIdentifier businessUnit) ResourceIdentifier to the Business Unit the Order should belong to.void
setCompletedAt
(ZonedDateTime completedAt) User-defined date and time for the Order.void
setCountry
(String country) Include a value to associate a country with the Order.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the Order.void
setCustomerEmail
(String customerEmail) The Email address of the Customer the Order belongs to.void
setCustomerGroup
(CustomerGroupResourceIdentifier customerGroup) The Customer Group of the Customer the Order belongs to.void
setCustomerId
(String customerId) Theid
of the Customer the Order belongs to.void
setCustomLineItems
(CustomLineItemImportDraft... customLineItems) Custom Line Items to add to the Cart.void
setCustomLineItems
(List<CustomLineItemImportDraft> customLineItems) Custom Line Items to add to the Cart.void
setInventoryMode
(InventoryMode inventoryMode) Determines how stock quantities are tracked for Line Items in the Cart.void
setItemShippingAddresses
(BaseAddress... itemShippingAddresses) Addresses for Orders with multiple shipping addresses.void
setItemShippingAddresses
(List<BaseAddress> itemShippingAddresses) Addresses for Orders with multiple shipping addresses.void
setLineItems
(LineItemImportDraft... lineItems) Line Items to add to the Order.void
setLineItems
(List<LineItemImportDraft> lineItems) Line Items to add to the Order.void
setOrderNumber
(String orderNumber) User-defined identifier of the Order.void
setOrderState
(OrderState orderState) Current status of the Order.void
setOrigin
(CartOrigin origin) Indicates the origin of the Order.void
setPaymentInfo
(PaymentInfo paymentInfo) Payment information associated with the Order.void
setPaymentState
(PaymentState paymentState) Payment status of the Order.void
setPurchaseOrderNumber
(String purchaseOrderNumber) User-defined identifier for a purchase Order.void
setShipmentState
(ShipmentState shipmentState) Shipment status of the Order.void
setShippingAddress
(BaseAddress shippingAddress) Shipping address associated with the Order.void
setShippingInfo
(ShippingInfoImportDraft shippingInfo) Shipping-related information of the Order.void
setState
(StateReference state) State of the Order in a custom workflow.void
setStore
(StoreResourceIdentifier store) The Store the Order belongs to.void
setTaxCalculationMode
(TaxCalculationMode taxCalculationMode) Determines how taxes are calculated fortaxedPrice
.void
setTaxedPrice
(TaxedPriceDraft taxedPrice) Include TaxedPrice information for the Order.void
setTaxRoundingMode
(RoundingMode taxRoundingMode) Determines how monetary values are rounded when calculating taxes fortaxedPrice
.void
setTotalPrice
(Money totalPrice) The total Price of the Order.static com.fasterxml.jackson.core.type.TypeReference<OrderImportDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withOrderImportDraft
(Function<OrderImportDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getOrderNumber
String getOrderNumber()User-defined identifier of the Order. Must be unique across a Project. Once set, the value cannot be changed.
- Returns:
- orderNumber
-
getPurchaseOrderNumber
String getPurchaseOrderNumber()User-defined identifier for a purchase Order.
- Returns:
- purchaseOrderNumber
-
getCustomerId
String getCustomerId()The
id
of the Customer the Order belongs to.- Returns:
- customerId
-
getCustomerEmail
String getCustomerEmail()The Email address of the Customer the Order belongs to. Can be used instead of
customerId
when no check against existing Customers is required.- Returns:
- customerEmail
-
getCustomerGroup
The Customer Group of the Customer the Order belongs to.
- Returns:
- customerGroup
-
getBusinessUnit
ResourceIdentifier to the Business Unit the Order should belong to. When the
customerId
of the Order is also set, the Customer must be an Associate of the Business Unit.- Returns:
- businessUnit
-
getStore
The Store the Order belongs to. Used for filtering.
If a LineItemImportDraft or a CustomLineItemImportDraft specifies a
distributionChannel
or asupplyChannel
that is not defined for the referenced Store, the Order Import gets rejected. The same applies when the providedcountry
is not defined for the referenced Store.- Returns:
- store
-
getLineItems
Line Items to add to the Order.
If not specified,
customLineItems
must not be empty.- Returns:
- lineItems
-
getCustomLineItems
Custom Line Items to add to the Cart.
If not specified,
lineItems
must not be empty.- Returns:
- customLineItems
-
getTotalPrice
The total Price of the Order. The amount can be negative.
- Returns:
- totalPrice
-
getTaxedPrice
Include TaxedPrice information for the Order. If not included, and if you have Tax Rates set for Line Items and Custom Line Items, the Order total will not be recalculated.
- Returns:
- taxedPrice
-
getTaxRoundingMode
RoundingMode getTaxRoundingMode()Determines how monetary values are rounded when calculating taxes for
taxedPrice
.- Returns:
- taxRoundingMode
-
getTaxCalculationMode
TaxCalculationMode getTaxCalculationMode()Determines how taxes are calculated for
taxedPrice
.- Returns:
- taxCalculationMode
-
getInventoryMode
InventoryMode getInventoryMode()Determines how stock quantities are tracked for Line Items in the Cart.
- Returns:
- inventoryMode
-
getBillingAddress
Billing address associated with the Order.
- Returns:
- billingAddress
-
getShippingAddress
Shipping address associated with the Order.
- Returns:
- shippingAddress
-
getItemShippingAddresses
Addresses for Orders with multiple shipping addresses. Addresses must include a value for
key
.- Returns:
- itemShippingAddresses
-
getShippingInfo
Shipping-related information of the Order.
- Returns:
- shippingInfo
-
getPaymentInfo
Payment information associated with the Order.
- Returns:
- paymentInfo
-
getPaymentState
PaymentState getPaymentState()Payment status of the Order.
- Returns:
- paymentState
-
getShipmentState
ShipmentState getShipmentState()Shipment status of the Order.
- Returns:
- shipmentState
-
getOrderState
OrderState getOrderState()Current status of the Order.
- Returns:
- orderState
-
getState
State of the Order in a custom workflow.
- Returns:
- state
-
getCountry
String getCountry()Include a value to associate a country with the Order.
- Returns:
- country
-
getOrigin
CartOrigin getOrigin()Indicates the origin of the Order.
- Returns:
- origin
-
getCompletedAt
ZonedDateTime getCompletedAt()User-defined date and time for the Order. This value does not influence the
createdAt
orlastModifiedAt
values of the Order created by the Order Import.- Returns:
- completedAt
-
getCustom
Custom Fields for the Order.
- Specified by:
getCustom
in interfaceCustomizableDraft<OrderImportDraft>
- Returns:
- custom
-
setOrderNumber
User-defined identifier of the Order. Must be unique across a Project. Once set, the value cannot be changed.
- Parameters:
orderNumber
- value to be set
-
setPurchaseOrderNumber
User-defined identifier for a purchase Order.
- Parameters:
purchaseOrderNumber
- value to be set
-
setCustomerId
The
id
of the Customer the Order belongs to.- Parameters:
customerId
- value to be set
-
setCustomerEmail
The Email address of the Customer the Order belongs to. Can be used instead of
customerId
when no check against existing Customers is required.- Parameters:
customerEmail
- value to be set
-
setCustomerGroup
The Customer Group of the Customer the Order belongs to.
- Parameters:
customerGroup
- value to be set
-
setBusinessUnit
ResourceIdentifier to the Business Unit the Order should belong to. When the
customerId
of the Order is also set, the Customer must be an Associate of the Business Unit.- Parameters:
businessUnit
- value to be set
-
setStore
The Store the Order belongs to. Used for filtering.
If a LineItemImportDraft or a CustomLineItemImportDraft specifies a
distributionChannel
or asupplyChannel
that is not defined for the referenced Store, the Order Import gets rejected. The same applies when the providedcountry
is not defined for the referenced Store.- Parameters:
store
- value to be set
-
setLineItems
Line Items to add to the Order.
If not specified,
customLineItems
must not be empty.- Parameters:
lineItems
- values to be set
-
setLineItems
Line Items to add to the Order.
If not specified,
customLineItems
must not be empty.- Parameters:
lineItems
- values to be set
-
setCustomLineItems
Custom Line Items to add to the Cart.
If not specified,
lineItems
must not be empty.- Parameters:
customLineItems
- values to be set
-
setCustomLineItems
Custom Line Items to add to the Cart.
If not specified,
lineItems
must not be empty.- Parameters:
customLineItems
- values to be set
-
setTotalPrice
The total Price of the Order. The amount can be negative.
- Parameters:
totalPrice
- value to be set
-
setTaxedPrice
Include TaxedPrice information for the Order. If not included, and if you have Tax Rates set for Line Items and Custom Line Items, the Order total will not be recalculated.
- Parameters:
taxedPrice
- value to be set
-
setTaxRoundingMode
Determines how monetary values are rounded when calculating taxes for
taxedPrice
.- Parameters:
taxRoundingMode
- value to be set
-
setTaxCalculationMode
Determines how taxes are calculated for
taxedPrice
.- Parameters:
taxCalculationMode
- value to be set
-
setInventoryMode
Determines how stock quantities are tracked for Line Items in the Cart.
- Parameters:
inventoryMode
- value to be set
-
setBillingAddress
Billing address associated with the Order.
- Parameters:
billingAddress
- value to be set
-
setShippingAddress
Shipping address associated with the Order.
- Parameters:
shippingAddress
- value to be set
-
setItemShippingAddresses
Addresses for Orders with multiple shipping addresses. Addresses must include a value for
key
.- Parameters:
itemShippingAddresses
- values to be set
-
setItemShippingAddresses
Addresses for Orders with multiple shipping addresses. Addresses must include a value for
key
.- Parameters:
itemShippingAddresses
- values to be set
-
setShippingInfo
Shipping-related information of the Order.
- Parameters:
shippingInfo
- value to be set
-
setPaymentInfo
Payment information associated with the Order.
- Parameters:
paymentInfo
- value to be set
-
setPaymentState
Payment status of the Order.
- Parameters:
paymentState
- value to be set
-
setShipmentState
Shipment status of the Order.
- Parameters:
shipmentState
- value to be set
-
setOrderState
Current status of the Order.
- Parameters:
orderState
- value to be set
-
setState
State of the Order in a custom workflow.
- Parameters:
state
- value to be set
-
setCountry
Include a value to associate a country with the Order.
- Parameters:
country
- value to be set
-
setOrigin
Indicates the origin of the Order.
- Parameters:
origin
- value to be set
-
setCompletedAt
User-defined date and time for the Order. This value does not influence the
createdAt
orlastModifiedAt
values of the Order created by the Order Import.- Parameters:
completedAt
- value to be set
-
setCustom
Custom Fields for the Order.
- Specified by:
setCustom
in interfaceCustomizableDraft<OrderImportDraft>
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of OrderImportDraft
-
of
factory method to create a shallow copy OrderImportDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of OrderImportDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OrderImportDraft- Returns:
- builder
-
builder
create builder for OrderImportDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withOrderImportDraft
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
-