Class OrderFromCartDraftBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.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 of the Cart from which the Order is created.ResourceIdentifier of the Cart from which the Order is created.custom
(CustomFieldsDraft custom) Custom Fields for the Order.Custom Fields for the Order.getCart()
ResourceIdentifier of the Cart from which the Order is created.Custom Fields for the Order.getId()
Deprecated.String that uniquely identifies an order.Order will be created withOpen
status by default.Payment state for the Order.Identifier for a purchase order, usually in a B2B context.Shipment state for the Order.getState()
Reference to a State indicating the Order's state.Expected 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) String that uniquely identifies an order.orderState
(OrderState orderState) Order will be created withOpen
status by default.paymentState
(PaymentState paymentState) Payment state for the Order.purchaseOrderNumber
(String purchaseOrderNumber) Identifier for a purchase order, usually in a B2B context.shipmentState
(ShipmentState shipmentState) Shipment state for the Order.state
(StateResourceIdentifier state) Reference to a State indicating the Order's state.Reference to a State indicating the Order's state.Expected version of the Cart from which the Order is created.ResourceIdentifier of the Cart from which the Order is created.Custom Fields for the Order.Reference to a State indicating the Order's state.
-
Constructor Details
-
OrderFromCartDraftBuilder
public OrderFromCartDraftBuilder()
-
-
Method Details
-
id
Deprecated.Unique identifier of the Cart from which you can create an Order.
- Parameters:
id
- value to be set- Returns:
- Builder
-
cart
public OrderFromCartDraftBuilder cart(Function<CartResourceIdentifierBuilder, CartResourceIdentifierBuilder> builder) ResourceIdentifier of the Cart from which the Order is created.
- Parameters:
builder
- function to build the cart value- Returns:
- Builder
-
withCart
public OrderFromCartDraftBuilder withCart(Function<CartResourceIdentifierBuilder, CartResourceIdentifier> builder) ResourceIdentifier of the Cart from which the Order is created.
- Parameters:
builder
- function to build the cart value- Returns:
- Builder
-
cart
ResourceIdentifier of the Cart from which the Order is created.
- Parameters:
cart
- value to be set- Returns:
- Builder
-
version
Expected version of the Cart from which the Order is created. If the expected version does not match the actual version, a 409 Conflict error will be returned.
- Parameters:
version
- value to be set- Returns:
- Builder
-
orderNumber
String that uniquely identifies an order. It can be used to create more human-readable (in contrast to ID) identifier for the order. It should be unique across a project. Once it's set it cannot be changed. For easier use on Get, Update and Delete actions we suggest assigning order numbers that match the regular expression
[a-z0-9_\-]{2,36}
.- Parameters:
orderNumber
- value to be set- Returns:
- Builder
-
purchaseOrderNumber
Identifier for a purchase order, usually in a B2B context. The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.
- Parameters:
purchaseOrderNumber
- value to be set- Returns:
- Builder
-
paymentState
Payment state for the Order.
- Parameters:
paymentState
- value to be set- Returns:
- Builder
-
shipmentState
Shipment state for the Order.
- Parameters:
shipmentState
- value to be set- Returns:
- Builder
-
orderState
Order will be created with
Open
status by default.- Parameters:
orderState
- value to be set- Returns:
- Builder
-
state
public OrderFromCartDraftBuilder state(Function<StateResourceIdentifierBuilder, StateResourceIdentifierBuilder> builder) Reference to a State indicating the Order's state.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
public OrderFromCartDraftBuilder withState(Function<StateResourceIdentifierBuilder, StateResourceIdentifier> builder) Reference to a State indicating the Order's state.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
Reference to a State indicating the Order's state.
- Parameters:
state
- value to be set- Returns:
- Builder
-
custom
public OrderFromCartDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Order. The Custom Field type must match the type of the Custom Fields in the referenced Cart. If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order. If empty, the Custom Fields on the referenced Cart are added to the Order automatically.
- 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 Field type must match the type of the Custom Fields in the referenced Cart. If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order. If empty, the Custom Fields on the referenced Cart are added to the Order automatically.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Order. The Custom Field type must match the type of the Custom Fields in the referenced Cart. If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order. If empty, the Custom Fields on the referenced Cart are added to the Order automatically.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getId
Deprecated.Unique identifier of the Cart from which you can create an Order.
- Returns:
- id
-
getCart
ResourceIdentifier of the Cart from which the Order is created.
- Returns:
- cart
-
getVersion
Expected version of the Cart from which the Order is created. If the expected version does not match the actual version, a 409 Conflict error will be returned.
- Returns:
- version
-
getOrderNumber
String that uniquely identifies an order. It can be used to create more human-readable (in contrast to ID) identifier for the order. It should be unique across a project. Once it's set it cannot be changed. For easier use on Get, Update and Delete actions we suggest assigning order numbers that match the regular expression
[a-z0-9_\-]{2,36}
.- Returns:
- orderNumber
-
getPurchaseOrderNumber
Identifier for a purchase order, usually in a B2B context. The Purchase Order Number is typically entered by the Buyer and can also be used with Quotes.
- Returns:
- purchaseOrderNumber
-
getPaymentState
Payment state for the Order.
- Returns:
- paymentState
-
getShipmentState
Shipment state for the Order.
- Returns:
- shipmentState
-
getOrderState
Order will be created with
Open
status by default.- Returns:
- orderState
-
getState
Reference to a State indicating the Order's state.
- Returns:
- state
-
getCustom
Custom Fields for the Order. The Custom Field type must match the type of the Custom Fields in the referenced Cart. If specified, the Custom Fields are merged with the Custom Fields on the referenced Cart and added to the Order. If empty, the Custom Fields on the referenced Cart are added to the Order automatically.
- Returns:
- custom
-
build
builds OrderFromCartDraft with checking for non-null required values- Specified by:
build
in interfaceio.vrap.rmf.base.client.Builder<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
-