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 OrderImportDraftBuilderbuilder()builder factory method for OrderImportDraftstatic OrderImportDraftBuilderbuilder(OrderImportDraft template) create builder for OrderImportDraft instancecopyDeep()static OrderImportDraftdeepCopy(OrderImportDraft template) factory method to create a deep copy of OrderImportDraft@Valid BaseAddressBilling 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 CustomFieldsDraftCustom Fields for the Order.The Email address of the Customer the Order belongs to.The Customer Group of the Customer the Order belongs to.Theidof 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 PaymentInfoPayment information associated with the Order.Payment status of the Order.Determines how the total prices on LineItems and CustomLineItems are rounded when calculated.User-defined identifier for a purchase Order.Shipment status of the Order.@Valid BaseAddressShipping address associated with the Order.@Valid ShippingInfoImportDraftShipping-related information of the Order.@Valid StateReferencegetState()State of the Order in a custom workflow.@Valid StoreResourceIdentifiergetStore()The Store the Order belongs to.Determines how taxes are calculated fortaxedPrice.@Valid TaxedPriceDraftInclude TaxedPrice information for the Order.Determines how monetary values are rounded when calculating taxes fortaxedPrice.@NotNull @Valid MoneyThe total Price of the Order.static OrderImportDraftof()factory methodstatic OrderImportDraftof(OrderImportDraft template) factory method to create a shallow copy OrderImportDraftvoidsetBillingAddress(BaseAddress billingAddress) Billing address associated with the Order.voidsetBusinessUnit(BusinessUnitResourceIdentifier businessUnit) ResourceIdentifier to the Business Unit the Order should belong to.voidsetCompletedAt(ZonedDateTime completedAt) User-defined date and time for the Order.voidsetCountry(String country) Include a value to associate a country with the Order.voidsetCustom(CustomFieldsDraft custom) Custom Fields for the Order.voidsetCustomerEmail(String customerEmail) The Email address of the Customer the Order belongs to.voidsetCustomerGroup(CustomerGroupResourceIdentifier customerGroup) The Customer Group of the Customer the Order belongs to.voidsetCustomerId(String customerId) Theidof the Customer the Order belongs to.voidsetCustomLineItems(CustomLineItemImportDraft... customLineItems) Custom Line Items to add to the Cart.voidsetCustomLineItems(List<CustomLineItemImportDraft> customLineItems) Custom Line Items to add to the Cart.voidsetInventoryMode(InventoryMode inventoryMode) Determines how stock quantities are tracked for Line Items in the Cart.voidsetItemShippingAddresses(BaseAddress... itemShippingAddresses) Addresses for Orders with multiple shipping addresses.voidsetItemShippingAddresses(List<BaseAddress> itemShippingAddresses) Addresses for Orders with multiple shipping addresses.voidsetLineItems(LineItemImportDraft... lineItems) Line Items to add to the Order.voidsetLineItems(List<LineItemImportDraft> lineItems) Line Items to add to the Order.voidsetOrderNumber(String orderNumber) User-defined identifier of the Order.voidsetOrderState(OrderState orderState) Current status of the Order.voidsetOrigin(CartOrigin origin) Indicates the origin of the Order.voidsetPaymentInfo(PaymentInfo paymentInfo) Payment information associated with the Order.voidsetPaymentState(PaymentState paymentState) Payment status of the Order.voidsetPriceRoundingMode(RoundingMode priceRoundingMode) Determines how the total prices on LineItems and CustomLineItems are rounded when calculated.voidsetPurchaseOrderNumber(String purchaseOrderNumber) User-defined identifier for a purchase Order.voidsetShipmentState(ShipmentState shipmentState) Shipment status of the Order.voidsetShippingAddress(BaseAddress shippingAddress) Shipping address associated with the Order.voidsetShippingInfo(ShippingInfoImportDraft shippingInfo) Shipping-related information of the Order.voidsetState(StateReference state) State of the Order in a custom workflow.voidsetStore(StoreResourceIdentifier store) The Store the Order belongs to.voidsetTaxCalculationMode(TaxCalculationMode taxCalculationMode) Determines how taxes are calculated fortaxedPrice.voidsetTaxedPrice(TaxedPriceDraft taxedPrice) Include TaxedPrice information for the Order.voidsetTaxRoundingMode(RoundingMode taxRoundingMode) Determines how monetary values are rounded when calculating taxes fortaxedPrice.voidsetTotalPrice(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> TwithOrderImportDraft(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
idof 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
customerIdwhen 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
customerIdof the Order is also set, the Customer must be an Associate of the Business Unit. Only available for B2B-enabled Projects.- Returns:
- businessUnit
-
getStore
The Store the Order belongs to. Used for filtering.
If a LineItemImportDraft or a CustomLineItemImportDraft specifies a
distributionChannelor asupplyChannelthat is not defined for the referenced Store, the Order Import gets rejected. The same applies when the providedcountryis not defined for the referenced Store.- Returns:
- store
-
getLineItems
Line Items to add to the Order.
If not specified,
customLineItemsmust not be empty.- Returns:
- lineItems
-
getCustomLineItems
Custom Line Items to add to the Cart.
If not specified,
lineItemsmust 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
-
getPriceRoundingMode
RoundingMode getPriceRoundingMode()Determines how the total prices on LineItems and CustomLineItems are rounded when calculated.
- Returns:
- priceRoundingMode
-
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
createdAtorlastModifiedAtvalues of the Order created by the Order Import.- Returns:
- completedAt
-
getCustom
Custom Fields for the Order.
- Specified by:
getCustomin 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
idof 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
customerIdwhen 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
customerIdof the Order is also set, the Customer must be an Associate of the Business Unit. Only available for B2B-enabled Projects.- Parameters:
businessUnit- value to be set
-
setStore
The Store the Order belongs to. Used for filtering.
If a LineItemImportDraft or a CustomLineItemImportDraft specifies a
distributionChannelor asupplyChannelthat is not defined for the referenced Store, the Order Import gets rejected. The same applies when the providedcountryis not defined for the referenced Store.- Parameters:
store- value to be set
-
setLineItems
Line Items to add to the Order.
If not specified,
customLineItemsmust not be empty.- Parameters:
lineItems- values to be set
-
setLineItems
Line Items to add to the Order.
If not specified,
customLineItemsmust not be empty.- Parameters:
lineItems- values to be set
-
setCustomLineItems
Custom Line Items to add to the Cart.
If not specified,
lineItemsmust not be empty.- Parameters:
customLineItems- values to be set
-
setCustomLineItems
Custom Line Items to add to the Cart.
If not specified,
lineItemsmust 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
-
setPriceRoundingMode
Determines how the total prices on LineItems and CustomLineItems are rounded when calculated.
- Parameters:
priceRoundingMode- 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
createdAtorlastModifiedAtvalues of the Order created by the Order Import.- Parameters:
completedAt- value to be set
-
setCustom
Custom Fields for the Order.
- Specified by:
setCustomin 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
-
copyDeep
OrderImportDraft copyDeep() -
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
-