Class OrderFromCartDraftBuilder
- All Implemented Interfaces:
Builder<OrderFromCartDraft>
Example to create an instance using the builder pattern
OrderFromCartDraft orderFromCartDraft = OrderFromCartDraft.builder()
.version(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds OrderFromCartDraft with checking for non-null required valuesbuilds OrderFromCartDraft without checking for non-null required valuescart
(CartResourceIdentifier cart) ResourceIdentifier to the Cart from which the Order is created.ResourceIdentifier to the Cart from which the Order is created.custom
(CustomFieldsDraft custom) Custom Fields for the Order.Custom Fields for the Order.getCart()
ResourceIdentifier to the Cart from which the Order is created.Custom Fields for the Order.getId()
Deprecated.User-defined identifier for the Order that is unique across a Project.Current status for the Order.Payment status for the Order.User-defined identifier for a purchase Order.Shipment status for the Order.getState()
State for the Order in a custom workflow.version
of the Cart from which the Order is created.Deprecated.static OrderFromCartDraftBuilder
of()
factory method for an instance of OrderFromCartDraftBuilderstatic OrderFromCartDraftBuilder
of
(OrderFromCartDraft template) create builder for OrderFromCartDraft instanceorderNumber
(String orderNumber) User-defined identifier for the Order that is unique across a Project.orderState
(OrderState orderState) Current status for the Order.paymentState
(PaymentState paymentState) Payment status for the Order.purchaseOrderNumber
(String purchaseOrderNumber) User-defined identifier for a purchase Order.shipmentState
(ShipmentState shipmentState) Shipment status for the Order.state
(StateResourceIdentifier state) State for the Order in a custom workflow.State for the Order in a custom workflow.version
of the Cart from which the Order is created.ResourceIdentifier to the Cart from which the Order is created.Custom Fields for the Order.State for the Order in a custom workflow.
-
Constructor Details
-
OrderFromCartDraftBuilder
public OrderFromCartDraftBuilder()
-
-
Method Details
-
id
Deprecated.id
of the Cart used to create the Order.- Parameters:
id
- value to be set- Returns:
- Builder
-
cart
public OrderFromCartDraftBuilder cart(Function<CartResourceIdentifierBuilder, CartResourceIdentifierBuilder> builder) ResourceIdentifier to the Cart from which the Order is created.
This field is required, but is marked as optional for backwards compatibility reasons.
- Parameters:
builder
- function to build the cart value- Returns:
- Builder
-
withCart
public OrderFromCartDraftBuilder withCart(Function<CartResourceIdentifierBuilder, CartResourceIdentifier> builder) ResourceIdentifier to the Cart from which the Order is created.
This field is required, but is marked as optional for backwards compatibility reasons.
- Parameters:
builder
- function to build the cart value- Returns:
- Builder
-
cart
ResourceIdentifier to the Cart from which the Order is created.
This field is required, but is marked as optional for backwards compatibility reasons.
- Parameters:
cart
- value to be set- Returns:
- Builder
-
version
version
of the Cart from which the Order is created.- Parameters:
version
- value to be set- Returns:
- Builder
-
orderNumber
User-defined identifier for the Order that is unique across a Project. Once set, the value cannot be changed.
- Parameters:
orderNumber
- value to be set- Returns:
- Builder
-
purchaseOrderNumber
User-defined identifier for a purchase Order.
It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow.
- Parameters:
purchaseOrderNumber
- value to be set- Returns:
- Builder
-
paymentState
Payment status for the Order.
- Parameters:
paymentState
- value to be set- Returns:
- Builder
-
shipmentState
Shipment status for the Order.
- Parameters:
shipmentState
- value to be set- Returns:
- Builder
-
orderState
Current status for the Order.
- Parameters:
orderState
- value to be set- Returns:
- Builder
-
state
public OrderFromCartDraftBuilder state(Function<StateResourceIdentifierBuilder, StateResourceIdentifierBuilder> builder) State for the Order in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
public OrderFromCartDraftBuilder withState(Function<StateResourceIdentifierBuilder, StateResourceIdentifier> builder) State for the Order in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
State for the Order in a custom workflow.
- Parameters:
state
- value to be set- Returns:
- Builder
-
custom
public OrderFromCartDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Order. The Custom Fields' type must match the Custom Fields' type in the referenced Cart.
- If empty, the Custom Fields on the referenced Cart are added to the Order automatically.
- If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public OrderFromCartDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the Order. The Custom Fields' type must match the Custom Fields' type in the referenced Cart.
- If empty, the Custom Fields on the referenced Cart are added to the Order automatically.
- If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Order. The Custom Fields' type must match the Custom Fields' type in the referenced Cart.
- If empty, the Custom Fields on the referenced Cart are added to the Order automatically.
- If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getId
Deprecated.id
of the Cart used to create the Order.- Returns:
- id
-
getCart
ResourceIdentifier to the Cart from which the Order is created.
This field is required, but is marked as optional for backwards compatibility reasons.
- Returns:
- cart
-
getVersion
version
of the Cart from which the Order is created.- Returns:
- version
-
getOrderNumber
User-defined identifier for the Order that is unique across a Project. Once set, the value cannot be changed.
- Returns:
- orderNumber
-
getPurchaseOrderNumber
User-defined identifier for a purchase Order.
It is typically set by the Buyer and can be used with Quotes to track the purchase Order during the quote and order flow.
- Returns:
- purchaseOrderNumber
-
getPaymentState
Payment status for the Order.
- Returns:
- paymentState
-
getShipmentState
Shipment status for the Order.
- Returns:
- shipmentState
-
getOrderState
Current status for the Order.
- Returns:
- orderState
-
getState
State for the Order in a custom workflow.
- Returns:
- state
-
getCustom
Custom Fields for the Order. The Custom Fields' type must match the Custom Fields' type in the referenced Cart.
- If empty, the Custom Fields on the referenced Cart are added to the Order automatically.
- If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order.
- Returns:
- custom
-
build
builds OrderFromCartDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderFromCartDraft>
- Returns:
- OrderFromCartDraft
-
buildUnchecked
builds OrderFromCartDraft without checking for non-null required values- Returns:
- OrderFromCartDraft
-
of
factory method for an instance of OrderFromCartDraftBuilder- Returns:
- builder
-
of
create builder for OrderFromCartDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-