Class OrderFromQuoteDraftBuilder
- All Implemented Interfaces:
Builder<OrderFromQuoteDraft>
Example to create an instance using the builder pattern
OrderFromQuoteDraft orderFromQuoteDraft = OrderFromQuoteDraft.builder()
.quote(quoteBuilder -> quoteBuilder)
.version(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds OrderFromQuoteDraft with checking for non-null required valuesbuilds OrderFromQuoteDraft without checking for non-null required valuesUser-defined identifier for the Order that is unique across a Project.Current status for the Order.Payment status for the Order.getQuote()
ResourceIdentifier to the Quote from which the Order is created.Iftrue
, thequoteState
of the referenced Quote will be set toAccepted
.Shipment status for the Order.getState()
State of the Order in a custom workflow.version
of the Quote from which the Order is created.static OrderFromQuoteDraftBuilder
of()
factory method for an instance of OrderFromQuoteDraftBuilderstatic OrderFromQuoteDraftBuilder
of
(OrderFromQuoteDraft template) create builder for OrderFromQuoteDraft 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.quote
(QuoteResourceIdentifier quote) ResourceIdentifier to the Quote from which the Order is created.ResourceIdentifier to the Quote from which the Order is created.quoteStateToAccepted
(Boolean quoteStateToAccepted) Iftrue
, thequoteState
of the referenced Quote will be set toAccepted
.shipmentState
(ShipmentState shipmentState) Shipment status for the Order.state
(StateResourceIdentifier state) State of the Order in a custom workflow.State of the Order in a custom workflow.version
of the Quote from which the Order is created.ResourceIdentifier to the Quote from which the Order is created.State of the Order in a custom workflow.
-
Constructor Details
-
OrderFromQuoteDraftBuilder
public OrderFromQuoteDraftBuilder()
-
-
Method Details
-
quote
public OrderFromQuoteDraftBuilder quote(Function<QuoteResourceIdentifierBuilder, QuoteResourceIdentifierBuilder> builder) ResourceIdentifier to the Quote from which the Order is created. If the referenced Quote has expired (
validTo
check) or itsquoteState
isAccepted
,Declined
, orWithdrawn
, the Order creation will fail.- Parameters:
builder
- function to build the quote value- Returns:
- Builder
-
withQuote
public OrderFromQuoteDraftBuilder withQuote(Function<QuoteResourceIdentifierBuilder, QuoteResourceIdentifier> builder) ResourceIdentifier to the Quote from which the Order is created. If the referenced Quote has expired (
validTo
check) or itsquoteState
isAccepted
,Declined
, orWithdrawn
, the Order creation will fail.- Parameters:
builder
- function to build the quote value- Returns:
- Builder
-
quote
ResourceIdentifier to the Quote from which the Order is created. If the referenced Quote has expired (
validTo
check) or itsquoteState
isAccepted
,Declined
, orWithdrawn
, the Order creation will fail.- Parameters:
quote
- value to be set- Returns:
- Builder
-
version
version
of the Quote from which the Order is created.- Parameters:
version
- value to be set- Returns:
- Builder
-
quoteStateToAccepted
If
true
, thequoteState
of the referenced Quote will be set toAccepted
.- Parameters:
quoteStateToAccepted
- 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
-
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 OrderFromQuoteDraftBuilder state(Function<StateResourceIdentifierBuilder, StateResourceIdentifierBuilder> builder) State of the Order in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
public OrderFromQuoteDraftBuilder withState(Function<StateResourceIdentifierBuilder, StateResourceIdentifier> builder) State of the Order in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
State of the Order in a custom workflow.
- Parameters:
state
- value to be set- Returns:
- Builder
-
getQuote
ResourceIdentifier to the Quote from which the Order is created. If the referenced Quote has expired (
validTo
check) or itsquoteState
isAccepted
,Declined
, orWithdrawn
, the Order creation will fail.- Returns:
- quote
-
getVersion
version
of the Quote from which the Order is created.- Returns:
- version
-
getQuoteStateToAccepted
If
true
, thequoteState
of the referenced Quote will be set toAccepted
.- Returns:
- quoteStateToAccepted
-
getOrderNumber
User-defined identifier for the Order that is unique across a Project. Once set, the value cannot be changed.
- Returns:
- orderNumber
-
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 of the Order in a custom workflow.
- Returns:
- state
-
build
builds OrderFromQuoteDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<OrderFromQuoteDraft>
- Returns:
- OrderFromQuoteDraft
-
buildUnchecked
builds OrderFromQuoteDraft without checking for non-null required values- Returns:
- OrderFromQuoteDraft
-
of
factory method for an instance of OrderFromQuoteDraftBuilder- Returns:
- builder
-
of
create builder for OrderFromQuoteDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-