Class QuoteDraftBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<QuoteDraft>
Example to create an instance using the builder pattern
QuoteDraft quoteDraft = QuoteDraft.builder()
.stagedQuote(stagedQuoteBuilder -> stagedQuoteBuilder)
.stagedQuoteVersion(0.3)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds QuoteDraft with checking for non-null required valuesbuilds QuoteDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields to be added to the Quote.Custom Fields to be added to the Quote.Custom Fields to be added to the Quote.getKey()
User-defined unique identifier for the Quote.StagedQuote from which the Quote is created.Iftrue
, thestagedQuoteState
of the referenced StagedQuote will be set toSent
.Current version of the StagedQuote.getState()
State of the Quote.User-defined unique identifier for the Quote.static QuoteDraftBuilder
of()
factory method for an instance of QuoteDraftBuilderstatic QuoteDraftBuilder
of
(QuoteDraft template) create builder for QuoteDraft instancestagedQuote
(StagedQuoteResourceIdentifier stagedQuote) StagedQuote from which the Quote is created.stagedQuote
(Function<StagedQuoteResourceIdentifierBuilder, StagedQuoteResourceIdentifierBuilder> builder) StagedQuote from which the Quote is created.stagedQuoteStateToSent
(Boolean stagedQuoteStateToSent) Iftrue
, thestagedQuoteState
of the referenced StagedQuote will be set toSent
.stagedQuoteVersion
(Long stagedQuoteVersion) Current version of the StagedQuote.state
(StateReference state) State of the Quote.State of the Quote.Custom Fields to be added to the Quote.withStagedQuote
(Function<StagedQuoteResourceIdentifierBuilder, StagedQuoteResourceIdentifier> builder) StagedQuote from which the Quote is created.withState
(Function<StateReferenceBuilder, StateReference> builder) State of the Quote.
-
Constructor Details
-
QuoteDraftBuilder
public QuoteDraftBuilder()
-
-
Method Details
-
key
User-defined unique identifier for the Quote.
- Parameters:
key
- value to be set- Returns:
- Builder
-
stagedQuote
public QuoteDraftBuilder stagedQuote(Function<StagedQuoteResourceIdentifierBuilder, StagedQuoteResourceIdentifierBuilder> builder) StagedQuote from which the Quote is created.
- Parameters:
builder
- function to build the stagedQuote value- Returns:
- Builder
-
withStagedQuote
public QuoteDraftBuilder withStagedQuote(Function<StagedQuoteResourceIdentifierBuilder, StagedQuoteResourceIdentifier> builder) StagedQuote from which the Quote is created.
- Parameters:
builder
- function to build the stagedQuote value- Returns:
- Builder
-
stagedQuote
StagedQuote from which the Quote is created.
- Parameters:
stagedQuote
- value to be set- Returns:
- Builder
-
stagedQuoteVersion
Current version of the StagedQuote.
- Parameters:
stagedQuoteVersion
- value to be set- Returns:
- Builder
-
stagedQuoteStateToSent
If
true
, thestagedQuoteState
of the referenced StagedQuote will be set toSent
.- Parameters:
stagedQuoteStateToSent
- value to be set- Returns:
- Builder
-
state
State of the 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 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 Quote. This reference can point to a State in a custom workflow.
- Parameters:
state
- value to be set- Returns:
- Builder
-
custom
public QuoteDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields to be added to the Quote.
- If specified, the Custom Fields are merged with the Custom Fields on the referenced StagedQuote and added to the Quote.
- If empty, the Custom Fields on the referenced StagedQuote are added to the Quote automatically.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields to be added to the Quote.
- If specified, the Custom Fields are merged with the Custom Fields on the referenced StagedQuote and added to the Quote.
- If empty, the Custom Fields on the referenced StagedQuote are added to the Quote automatically.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields to be added to the Quote.
- If specified, the Custom Fields are merged with the Custom Fields on the referenced StagedQuote and added to the Quote.
- If empty, the Custom Fields on the referenced StagedQuote are added to the Quote automatically.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier for the Quote.
- Returns:
- key
-
getStagedQuote
StagedQuote from which the Quote is created.
- Returns:
- stagedQuote
-
getStagedQuoteVersion
Current version of the StagedQuote.
- Returns:
- stagedQuoteVersion
-
getStagedQuoteStateToSent
If
true
, thestagedQuoteState
of the referenced StagedQuote will be set toSent
.- Returns:
- stagedQuoteStateToSent
-
getState
State of the Quote. This reference can point to a State in a custom workflow.
- Returns:
- state
-
getCustom
Custom Fields to be added to the Quote.
- If specified, the Custom Fields are merged with the Custom Fields on the referenced StagedQuote and added to the Quote.
- If empty, the Custom Fields on the referenced StagedQuote are added to the Quote automatically.
- Returns:
- custom
-
build
builds QuoteDraft with checking for non-null required values- Specified by:
build
in interfaceio.vrap.rmf.base.client.Builder<QuoteDraft>
- Returns:
- QuoteDraft
-
buildUnchecked
builds QuoteDraft without checking for non-null required values- Returns:
- QuoteDraft
-
of
factory method for an instance of QuoteDraftBuilder- Returns:
- builder
-
of
create builder for QuoteDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-