Interface QuoteDraft
- All Superinterfaces:
CustomizableDraft<QuoteDraft>
,Draft<QuoteDraft>
,WithKey
QuoteDraft
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
QuoteDraft quoteDraft = QuoteDraft.builder()
.stagedQuote(stagedQuoteBuilder -> stagedQuoteBuilder)
.stagedQuoteVersion(0.3)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic QuoteDraftBuilder
builder()
builder factory method for QuoteDraftstatic QuoteDraftBuilder
builder
(QuoteDraft template) create builder for QuoteDraft instancestatic QuoteDraft
deepCopy
(QuoteDraft template) factory method to create a deep copy of QuoteDraft@Valid CustomFieldsDraft
Custom Fields to be added to the Quote.getKey()
User-defined unique identifier for the Quote.@NotNull @Valid StagedQuoteResourceIdentifier
StagedQuote from which the Quote is created.Iftrue
, thestagedQuoteState
of the referenced StagedQuote will be set toSent
.@NotNull Long
Current version of the StagedQuote.@Valid StateReference
getState()
State of the Quote.static QuoteDraft
of()
factory methodstatic QuoteDraft
of
(QuoteDraft template) factory method to create a shallow copy QuoteDraftvoid
setCustom
(CustomFieldsDraft custom) Custom Fields to be added to the Quote.void
User-defined unique identifier for the Quote.void
setStagedQuote
(StagedQuoteResourceIdentifier stagedQuote) StagedQuote from which the Quote is created.void
setStagedQuoteStateToSent
(Boolean stagedQuoteStateToSent) Iftrue
, thestagedQuoteState
of the referenced StagedQuote will be set toSent
.void
setStagedQuoteVersion
(Long stagedQuoteVersion) Current version of the StagedQuote.void
setState
(StateReference state) State of the Quote.static com.fasterxml.jackson.core.type.TypeReference<QuoteDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withQuoteDraft
(Function<QuoteDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getKey
String getKey()User-defined unique identifier for the Quote.
-
getStagedQuote
StagedQuote from which the Quote is created.
- Returns:
- stagedQuote
-
getStagedQuoteVersion
Current version of the StagedQuote.
- Returns:
- stagedQuoteVersion
-
getStagedQuoteStateToSent
Boolean 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.
- Specified by:
getCustom
in interfaceCustomizableDraft<QuoteDraft>
- Returns:
- custom
-
setKey
User-defined unique identifier for the Quote.
- Parameters:
key
- value to be set
-
setStagedQuote
StagedQuote from which the Quote is created.
- Parameters:
stagedQuote
- value to be set
-
setStagedQuoteVersion
Current version of the StagedQuote.
- Parameters:
stagedQuoteVersion
- value to be set
-
setStagedQuoteStateToSent
If
true
, thestagedQuoteState
of the referenced StagedQuote will be set toSent
.- Parameters:
stagedQuoteStateToSent
- value to be set
-
setState
State of the Quote. This reference can point to a State in a custom workflow.
- Parameters:
state
- value to be set
-
setCustom
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.
- Specified by:
setCustom
in interfaceCustomizableDraft<QuoteDraft>
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of QuoteDraft
-
of
factory method to create a shallow copy QuoteDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of QuoteDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for QuoteDraft- Returns:
- builder
-
builder
create builder for QuoteDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withQuoteDraft
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
-