Class StagedQuoteDraftBuilder
- All Implemented Interfaces:
Builder<StagedQuoteDraft>
Example to create an instance using the builder pattern
StagedQuoteDraft stagedQuoteDraft = StagedQuoteDraft.builder()
.quoteRequest(quoteRequestBuilder -> quoteRequestBuilder)
.quoteRequestVersion(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds StagedQuoteDraft with checking for non-null required valuesbuilds StagedQuoteDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields to be added to the StagedQuote.Custom Fields to be added to the StagedQuote.Custom Fields to be added to the StagedQuote.getKey()
User-defined unique identifier for the StagedQuote.QuoteRequest from which the StagedQuote is created.Iftrue
, thequoteRequestState
of the referenced QuoteRequest will be set toAccepted
.Current version of the QuoteRequest.getState()
State of the Staged Quote.User-defined unique identifier for the StagedQuote.static StagedQuoteDraftBuilder
of()
factory method for an instance of StagedQuoteDraftBuilderstatic StagedQuoteDraftBuilder
of
(StagedQuoteDraft template) create builder for StagedQuoteDraft instancequoteRequest
(QuoteRequestResourceIdentifier quoteRequest) QuoteRequest from which the StagedQuote is created.quoteRequest
(Function<QuoteRequestResourceIdentifierBuilder, QuoteRequestResourceIdentifierBuilder> builder) QuoteRequest from which the StagedQuote is created.quoteRequestStateToAccepted
(Boolean quoteRequestStateToAccepted) Iftrue
, thequoteRequestState
of the referenced QuoteRequest will be set toAccepted
.quoteRequestVersion
(Long quoteRequestVersion) Current version of the QuoteRequest.state
(StateReference state) State of the Staged Quote.State of the Staged Quote.Custom Fields to be added to the StagedQuote.withQuoteRequest
(Function<QuoteRequestResourceIdentifierBuilder, QuoteRequestResourceIdentifier> builder) QuoteRequest from which the StagedQuote is created.withState
(Function<StateReferenceBuilder, StateReference> builder) State of the Staged Quote.
-
Constructor Details
-
StagedQuoteDraftBuilder
public StagedQuoteDraftBuilder()
-
-
Method Details
-
quoteRequest
public StagedQuoteDraftBuilder quoteRequest(Function<QuoteRequestResourceIdentifierBuilder, QuoteRequestResourceIdentifierBuilder> builder) QuoteRequest from which the StagedQuote is created.
- Parameters:
builder
- function to build the quoteRequest value- Returns:
- Builder
-
withQuoteRequest
public StagedQuoteDraftBuilder withQuoteRequest(Function<QuoteRequestResourceIdentifierBuilder, QuoteRequestResourceIdentifier> builder) QuoteRequest from which the StagedQuote is created.
- Parameters:
builder
- function to build the quoteRequest value- Returns:
- Builder
-
quoteRequest
QuoteRequest from which the StagedQuote is created.
- Parameters:
quoteRequest
- value to be set- Returns:
- Builder
-
quoteRequestVersion
Current version of the QuoteRequest.
- Parameters:
quoteRequestVersion
- value to be set- Returns:
- Builder
-
quoteRequestStateToAccepted
public StagedQuoteDraftBuilder quoteRequestStateToAccepted(@Nullable Boolean quoteRequestStateToAccepted) If
true
, thequoteRequestState
of the referenced QuoteRequest will be set toAccepted
.- Parameters:
quoteRequestStateToAccepted
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier for the StagedQuote.
- Parameters:
key
- value to be set- Returns:
- Builder
-
custom
public StagedQuoteDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields to be added to the StagedQuote.
- If specified, the Custom Fields are merged with the Custom Fields on the referenced QuoteRequest and added to the StagedQuote.
- If empty, the Custom Fields on the referenced QuoteRequest are added to the StagedQuote automatically.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public StagedQuoteDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields to be added to the StagedQuote.
- If specified, the Custom Fields are merged with the Custom Fields on the referenced QuoteRequest and added to the StagedQuote.
- If empty, the Custom Fields on the referenced QuoteRequest are added to the StagedQuote automatically.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields to be added to the StagedQuote.
- If specified, the Custom Fields are merged with the Custom Fields on the referenced QuoteRequest and added to the StagedQuote.
- If empty, the Custom Fields on the referenced QuoteRequest are added to the StagedQuote automatically.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
state
State of the Staged Quote. This reference can point to a State in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
State of the Staged Quote. This reference can point to a State in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
State of the Staged Quote. This reference can point to a State in a custom workflow.
- Parameters:
state
- value to be set- Returns:
- Builder
-
getQuoteRequest
QuoteRequest from which the StagedQuote is created.
- Returns:
- quoteRequest
-
getQuoteRequestVersion
Current version of the QuoteRequest.
- Returns:
- quoteRequestVersion
-
getQuoteRequestStateToAccepted
If
true
, thequoteRequestState
of the referenced QuoteRequest will be set toAccepted
.- Returns:
- quoteRequestStateToAccepted
-
getKey
User-defined unique identifier for the StagedQuote.
- Returns:
- key
-
getCustom
Custom Fields to be added to the StagedQuote.
- If specified, the Custom Fields are merged with the Custom Fields on the referenced QuoteRequest and added to the StagedQuote.
- If empty, the Custom Fields on the referenced QuoteRequest are added to the StagedQuote automatically.
- Returns:
- custom
-
getState
State of the Staged Quote. This reference can point to a State in a custom workflow.
- Returns:
- state
-
build
builds StagedQuoteDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<StagedQuoteDraft>
- Returns:
- StagedQuoteDraft
-
buildUnchecked
builds StagedQuoteDraft without checking for non-null required values- Returns:
- StagedQuoteDraft
-
of
factory method for an instance of StagedQuoteDraftBuilder- Returns:
- builder
-
of
create builder for StagedQuoteDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-