Interface OrderFromCartDraft
- All Superinterfaces:
io.vrap.rmf.base.client.Draft<OrderFromCartDraft>
- All Known Implementing Classes:
OrderFromCartDraftImpl
Example to create an instance using the builder pattern
OrderFromCartDraft orderFromCartDraft = OrderFromCartDraft.builder()
.version(0.3)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic OrderFromCartDraftBuilder
builder()
builder factory method for OrderFromCartDraftstatic OrderFromCartDraftBuilder
builder
(OrderFromCartDraft template) create builder for OrderFromCartDraft instancestatic OrderFromCartDraft
deepCopy
(OrderFromCartDraft template) factory method to create a deep copy of OrderFromCartDraft@Valid CartResourceIdentifier
getCart()
ResourceIdentifier of the Cart from which the Order is created.@Valid CustomFieldsDraft
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.@Valid StateResourceIdentifier
getState()
Reference to a State indicating the Order's state.@NotNull Long
Expected version of the Cart from which the Order is created.static OrderFromCartDraft
of()
factory methodstatic OrderFromCartDraft
of
(OrderFromCartDraft template) factory method to create a shallow copy OrderFromCartDraftvoid
ResourceIdentifier of the Cart from which the Order is created.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the Order.void
Deprecated.void
setOrderNumber
(String orderNumber) String that uniquely identifies an order.void
setOrderState
(OrderState orderState) Order will be created withOpen
status by default.void
setPaymentState
(PaymentState paymentState) Payment state for the Order.void
setPurchaseOrderNumber
(String purchaseOrderNumber) Identifier for a purchase order, usually in a B2B context.void
setShipmentState
(ShipmentState shipmentState) Shipment state for the Order.void
setState
(StateResourceIdentifier state) Reference to a State indicating the Order's state.void
setVersion
(Long version) Expected version of the Cart from which the Order is created.static com.fasterxml.jackson.core.type.TypeReference<OrderFromCartDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withOrderFromCartDraft
(Function<OrderFromCartDraft, T> helper) accessor map function
-
Method Details
-
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
-
setId
Deprecated.Unique identifier of the Cart from which you can create an Order.
- Parameters:
id
- value to be set
-
setCart
ResourceIdentifier of the Cart from which the Order is created.
- Parameters:
cart
- value to be set
-
setVersion
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
-
setOrderNumber
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
-
setPurchaseOrderNumber
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
-
setPaymentState
Payment state for the Order.
- Parameters:
paymentState
- value to be set
-
setShipmentState
Shipment state for the Order.
- Parameters:
shipmentState
- value to be set
-
setOrderState
Order will be created with
Open
status by default.- Parameters:
orderState
- value to be set
-
setState
Reference to a State indicating the Order's state.
- Parameters:
state
- value to be set
-
setCustom
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
-
of
factory method- Returns:
- instance of OrderFromCartDraft
-
of
factory method to create a shallow copy OrderFromCartDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of OrderFromCartDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OrderFromCartDraft- Returns:
- builder
-
builder
create builder for OrderFromCartDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withOrderFromCartDraft
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
-