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 QuoteDraftBuilderbuilder()builder factory method for QuoteDraftstatic QuoteDraftBuilderbuilder(QuoteDraft template) create builder for QuoteDraft instancecopyDeep()static QuoteDraftdeepCopy(QuoteDraft template) factory method to create a deep copy of QuoteDraft@Valid CustomFieldsDraftCustom Fields to be added to the Quote.getKey()User-defined unique identifier for the Quote.@NotNull @Valid StagedQuoteResourceIdentifierStagedQuote from which the Quote is created.@NotNull LongCurrent version of the StagedQuote.@Valid StateReferencegetState()State of the Quote.static QuoteDraftof()factory methodstatic QuoteDraftof(QuoteDraft template) factory method to create a shallow copy QuoteDraftvoidsetCustom(CustomFieldsDraft custom) Custom Fields to be added to the Quote.voidUser-defined unique identifier for the Quote.voidsetStagedQuote(StagedQuoteResourceIdentifier stagedQuote) StagedQuote from which the Quote is created.voidsetStagedQuoteStateToSent(Boolean stagedQuoteStateToSent) voidsetStagedQuoteVersion(Long stagedQuoteVersion) Current version of the StagedQuote.voidsetState(StateReference state) State of the Quote.static tools.jackson.core.type.TypeReference<QuoteDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithQuoteDraft(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, thestagedQuoteStateof 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:
getCustomin 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, thestagedQuoteStateof 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:
setCustomin 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
-
copyDeep
QuoteDraft copyDeep() -
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
-