Interface OrderFromQuoteDraft
- All Superinterfaces:
io.vrap.rmf.base.client.Draft<OrderFromQuoteDraft>
- All Known Implementing Classes:
OrderFromQuoteDraftImpl
Example to create an instance using the builder pattern
OrderFromQuoteDraft orderFromQuoteDraft = OrderFromQuoteDraft.builder()
.quote(quoteBuilder -> quoteBuilder)
.version(0.3)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic OrderFromQuoteDraftBuilder
builder()
builder factory method for OrderFromQuoteDraftstatic OrderFromQuoteDraftBuilder
builder
(OrderFromQuoteDraft template) create builder for OrderFromQuoteDraft instancestatic OrderFromQuoteDraft
deepCopy
(OrderFromQuoteDraft template) factory method to create a deep copy of OrderFromQuoteDraftString that uniquely identifies an order.Order will be created withOpen
status by default.Payment state of the Order.@NotNull @Valid QuoteResourceIdentifier
getQuote()
ResourceIdentifier of the Quote from which this Order is created.Iftrue
, thequoteState
of the referenced Quote will be set toAccepted
.Shipment state of the Order.@Valid StateResourceIdentifier
getState()
Reference to a State indicating the Order's state.@NotNull Long
version
of the Quote from which an Order is created.static OrderFromQuoteDraft
of()
factory methodstatic OrderFromQuoteDraft
of
(OrderFromQuoteDraft template) factory method to create a shallow copy OrderFromQuoteDraftvoid
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 of the Order.void
setQuote
(QuoteResourceIdentifier quote) ResourceIdentifier of the Quote from which this Order is created.void
setQuoteStateToAccepted
(Boolean quoteStateToAccepted) Iftrue
, thequoteState
of the referenced Quote will be set toAccepted
.void
setShipmentState
(ShipmentState shipmentState) Shipment state of the Order.void
setState
(StateResourceIdentifier state) Reference to a State indicating the Order's state.void
setVersion
(Long version) version
of the Quote from which an Order is created.static com.fasterxml.jackson.core.type.TypeReference<OrderFromQuoteDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withOrderFromQuoteDraft
(Function<OrderFromQuoteDraft, T> helper) accessor map function
-
Method Details
-
getQuote
ResourceIdentifier of the Quote from which this Order is created. If the Quote has
QuoteState
inAccepted
,Declined
orWithdrawn
then the order creation will fail. The creation will also fail if theQuote
has expired (validTo
check).- Returns:
- quote
-
getVersion
version
of the Quote from which an Order is created.- Returns:
- version
-
getQuoteStateToAccepted
If
true
, thequoteState
of the referenced Quote will be set toAccepted
.- Returns:
- quoteStateToAccepted
-
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
-
getPaymentState
Payment state of the Order.
- Returns:
- paymentState
-
getShipmentState
Shipment state of 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
-
setQuote
ResourceIdentifier of the Quote from which this Order is created. If the Quote has
QuoteState
inAccepted
,Declined
orWithdrawn
then the order creation will fail. The creation will also fail if theQuote
has expired (validTo
check).- Parameters:
quote
- value to be set
-
setVersion
version
of the Quote from which an Order is created.- Parameters:
version
- value to be set
-
setQuoteStateToAccepted
If
true
, thequoteState
of the referenced Quote will be set toAccepted
.- Parameters:
quoteStateToAccepted
- 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
-
setPaymentState
Payment state of the Order.
- Parameters:
paymentState
- value to be set
-
setShipmentState
Shipment state of 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
-
of
factory method- Returns:
- instance of OrderFromQuoteDraft
-
of
factory method to create a shallow copy OrderFromQuoteDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of OrderFromQuoteDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OrderFromQuoteDraft- Returns:
- builder
-
builder
create builder for OrderFromQuoteDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withOrderFromQuoteDraft
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
-