Interface Quote
- All Superinterfaces:
BaseResource,Customizable<Quote>,DomainResource<Quote>,Identifiable<Quote>,QuoteMixin,Referencable<Quote>,ResourceIdentifiable<Quote>,Versioned<Quote>,WithKey
Example to create an instance using the builder pattern
Quote quote = Quote.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.quoteRequest(quoteRequestBuilder -> quoteRequestBuilder)
.stagedQuote(stagedQuoteBuilder -> stagedQuoteBuilder)
.plusLineItems(lineItemsBuilder -> lineItemsBuilder)
.plusCustomLineItems(customLineItemsBuilder -> customLineItemsBuilder)
.totalPrice(totalPriceBuilder -> totalPriceBuilder)
.taxMode(TaxMode.PLATFORM)
.priceRoundingMode(RoundingMode.HALF_EVEN)
.taxRoundingMode(RoundingMode.HALF_EVEN)
.taxCalculationMode(TaxCalculationMode.LINE_ITEM_LEVEL)
.quoteState(QuoteState.PENDING)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic QuoteBuilderbuilder()builder factory method for Quotestatic QuoteBuildercreate builder for Quote instancecopyDeep()static Quotefactory method to create a deep copy of Quote@Valid AddressAddress used for invoicing.@Valid BusinessUnitKeyReferenceThe BusinessUnit for the Quote.Message from the Buyer included in the renegotiation request.Used for Product Variant price selection.@NotNull ZonedDateTimeDate and time (UTC) the Quote was initially created.@Valid CreatedByIDs and references that created the Quote.@Valid CustomFieldsCustom Fields on the Quote.@Valid CustomerReferenceThe Buyer who owns the Quote.@Valid CustomerGroupReferenceSet automatically whencustomeris set and the Customer is a member of a Customer Group.@NotNull @Valid List<CustomLineItem>The Custom Line Items for which the Quote is requested.@Valid List<DirectDiscount>Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.@NotNull StringgetId()Unique identifier of the Quote.Inventory mode of the Cart referenced in the QuoteRequestDraft.Contains addresses for carts with multiple shipping addresses.getKey()User-defined unique identifier of the Quote.@NotNull ZonedDateTimeDate and time (UTC) the Quote was last updated.@Valid LastModifiedByIDs and references that last modified the Quote.The Line Items for which the Quote is requested.@Valid PaymentInfoLog of payment transactions related to the Quote.@NotNull RoundingModeWhen calculating total prices on LineItems and CustomLineItems, the selected mode is used for rounding.The Purchase Order Number is typically set by the Buyer on a QuoteRequest to track the purchase order during the quote and order flow.@NotNull @Valid QuoteRequestReferenceQuote Request related to the Quote.@NotNull QuoteStatePredefined states tracking the status of the Quote.Message from the Seller included in the offer.@Valid AddressUsed to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.@Valid ShippingInfoSet automatically once the ShippingMethod is set.@Valid ShippingRateInputUsed to select a ShippingRatePriceTier.@NotNull @Valid StagedQuoteReferenceStaged Quote related to the Quote.@Valid StateReferencegetState()State of the Quote.@Valid StoreKeyReferencegetStore()The Store to which the Buyer belongs.@NotNull TaxCalculationModeWhen calculating taxes fortaxedPrice, the selected mode is used for calculating the price withLineItemLevel(horizontally) orUnitPriceLevel(vertically) calculation mode.@Valid TaxedPriceNot set until the shipping address is set.@NotNull TaxModeTax mode of the Cart referenced in the QuoteRequestDraft.@NotNull RoundingModeWhen calculating taxes fortaxedPrice, the selected mode is used for rounding.@NotNull @Valid TypedMoneySum of alltotalPricefields of thelineItemsandcustomLineItems, as well as thepricefield ofshippingInfo(if it exists).Expiration date for the Quote.@NotNull LongCurrent version of the Quote.static Quoteof()factory methodstatic Quotefactory method to create a shallow copy Quotestatic ReferenceTypeIdvoidsetBillingAddress(Address billingAddress) Address used for invoicing.voidsetBusinessUnit(BusinessUnitKeyReference businessUnit) The BusinessUnit for the Quote.voidsetBuyerComment(String buyerComment) Message from the Buyer included in the renegotiation request.voidsetCountry(String country) Used for Product Variant price selection.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Quote was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the Quote.voidsetCustom(CustomFields custom) Custom Fields on the Quote.voidsetCustomer(CustomerReference customer) The Buyer who owns the Quote.voidsetCustomerGroup(CustomerGroupReference customerGroup) Set automatically whencustomeris set and the Customer is a member of a Customer Group.voidsetCustomLineItems(CustomLineItem... customLineItems) The Custom Line Items for which the Quote is requested.voidsetCustomLineItems(List<CustomLineItem> customLineItems) The Custom Line Items for which the Quote is requested.voidsetDirectDiscounts(DirectDiscount... directDiscounts) Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.voidsetDirectDiscounts(List<DirectDiscount> directDiscounts) Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.voidUnique identifier of the Quote.voidsetInventoryMode(InventoryMode inventoryMode) Inventory mode of the Cart referenced in the QuoteRequestDraft.voidsetItemShippingAddresses(Address... itemShippingAddresses) Contains addresses for carts with multiple shipping addresses.voidsetItemShippingAddresses(List<Address> itemShippingAddresses) Contains addresses for carts with multiple shipping addresses.voidUser-defined unique identifier of the Quote.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the Quote was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the Quote.voidsetLineItems(LineItem... lineItems) The Line Items for which the Quote is requested.voidsetLineItems(List<LineItem> lineItems) The Line Items for which the Quote is requested.voidsetPaymentInfo(PaymentInfo paymentInfo) Log of payment transactions related to the Quote.voidsetPriceRoundingMode(RoundingMode priceRoundingMode) When calculating total prices on LineItems and CustomLineItems, the selected mode is used for rounding.voidsetPurchaseOrderNumber(String purchaseOrderNumber) The Purchase Order Number is typically set by the Buyer on a QuoteRequest to track the purchase order during the quote and order flow.voidsetQuoteRequest(QuoteRequestReference quoteRequest) Quote Request related to the Quote.voidsetQuoteState(QuoteState quoteState) Predefined states tracking the status of the Quote.voidsetSellerComment(String sellerComment) Message from the Seller included in the offer.voidsetShippingAddress(Address shippingAddress) Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.voidsetShippingInfo(ShippingInfo shippingInfo) Set automatically once the ShippingMethod is set.voidsetShippingRateInput(ShippingRateInput shippingRateInput) Used to select a ShippingRatePriceTier.voidsetStagedQuote(StagedQuoteReference stagedQuote) Staged Quote related to the Quote.voidsetState(StateReference state) State of the Quote.voidsetStore(StoreKeyReference store) The Store to which the Buyer belongs.voidsetTaxCalculationMode(TaxCalculationMode taxCalculationMode) When calculating taxes fortaxedPrice, the selected mode is used for calculating the price withLineItemLevel(horizontally) orUnitPriceLevel(vertically) calculation mode.voidsetTaxedPrice(TaxedPrice taxedPrice) Not set until the shipping address is set.voidsetTaxMode(TaxMode taxMode) Tax mode of the Cart referenced in the QuoteRequestDraft.voidsetTaxRoundingMode(RoundingMode taxRoundingMode) When calculating taxes fortaxedPrice, the selected mode is used for rounding.voidsetTotalPrice(TypedMoney totalPrice) Sum of alltotalPricefields of thelineItemsandcustomLineItems, as well as thepricefield ofshippingInfo(if it exists).voidsetValidTo(ZonedDateTime validTo) Expiration date for the Quote.voidsetVersion(Long version) Current version of the Quote.static com.fasterxml.jackson.core.type.TypeReference<Quote>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizableMethods inherited from interface com.commercetools.api.models.DomainResource
getMethods inherited from interface com.commercetools.api.models.quote.QuoteMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the Quote.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<Quote>- Specified by:
getIdin interfaceIdentifiable<Quote>- Specified by:
getIdin interfaceVersioned<Quote>- Returns:
- id
-
getVersion
Current version of the Quote.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<Quote>- Specified by:
getVersionin interfaceVersioned<Quote>- Returns:
- version
-
getKey
String getKey()User-defined unique identifier of the Quote.
-
getCreatedAt
Date and time (UTC) the Quote was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Quote was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the Quote.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the Quote.
- Returns:
- createdBy
-
getQuoteRequest
Quote Request related to the Quote.
- Returns:
- quoteRequest
-
getStagedQuote
Staged Quote related to the Quote.
- Returns:
- stagedQuote
-
getCustomer
The Buyer who owns the Quote.
- Returns:
- customer
-
getCustomerGroup
Set automatically when
customeris set and the Customer is a member of a Customer Group. Not updated if Customer is changed after Quote creation. Used for Product Variant price selection.- Returns:
- customerGroup
-
getValidTo
ZonedDateTime getValidTo()Expiration date for the Quote. Once a Quote expires, it cannot be ordered.
- Returns:
- validTo
-
getSellerComment
String getSellerComment()Message from the Seller included in the offer.
- Returns:
- sellerComment
-
getBuyerComment
String getBuyerComment()Message from the Buyer included in the renegotiation request.
- Returns:
- buyerComment
-
getStore
The Store to which the Buyer belongs.
- Returns:
- store
-
getLineItems
The Line Items for which the Quote is requested.
- Returns:
- lineItems
-
getCustomLineItems
The Custom Line Items for which the Quote is requested.
- Returns:
- customLineItems
-
getTotalPrice
Sum of all
totalPricefields of thelineItemsandcustomLineItems, as well as thepricefield ofshippingInfo(if it exists).totalPricemay or may not include the taxes: it depends on the taxRate.includedInPrice property of each price.- Returns:
- totalPrice
-
getTaxedPrice
Not set until the shipping address is set. Will be set automatically in the
PlatformTaxMode. For theExternaltax mode it will be set as soon as the external tax rates for all line items, custom line items, and shipping in the cart are set.- Returns:
- taxedPrice
-
getShippingAddress
Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.
- Returns:
- shippingAddress
-
getBillingAddress
Address used for invoicing.
- Returns:
- billingAddress
-
getInventoryMode
InventoryMode getInventoryMode()Inventory mode of the Cart referenced in the QuoteRequestDraft.
- Returns:
- inventoryMode
-
getTaxMode
Tax mode of the Cart referenced in the QuoteRequestDraft.
- Returns:
- taxMode
-
getPriceRoundingMode
When calculating total prices on LineItems and CustomLineItems, the selected mode is used for rounding.
- Returns:
- priceRoundingMode
-
getTaxRoundingMode
When calculating taxes for
taxedPrice, the selected mode is used for rounding.- Returns:
- taxRoundingMode
-
getTaxCalculationMode
When calculating taxes for
taxedPrice, the selected mode is used for calculating the price withLineItemLevel(horizontally) orUnitPriceLevel(vertically) calculation mode.- Returns:
- taxCalculationMode
-
getCountry
String getCountry()Used for Product Variant price selection.
- Returns:
- country
-
getShippingInfo
Set automatically once the ShippingMethod is set.
- Returns:
- shippingInfo
-
getPaymentInfo
Log of payment transactions related to the Quote.
- Returns:
- paymentInfo
-
getShippingRateInput
Used to select a ShippingRatePriceTier.
- Returns:
- shippingRateInput
-
getItemShippingAddresses
Contains addresses for carts with multiple shipping addresses. Line items reference these addresses under their
shippingDetails. The addresses captured here are not used to determine eligible shipping methods or the applicable tax rate. Only the cart'sshippingAddressis used for this.- Returns:
- itemShippingAddresses
-
getDirectDiscounts
Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.
- Returns:
- directDiscounts
-
getCustom
Custom Fields on the Quote.
- Specified by:
getCustomin interfaceCustomizable<Quote>- Returns:
- custom
-
getQuoteState
Predefined states tracking the status of the Quote.
- Returns:
- quoteState
-
getState
State of the Quote. This reference can point to a State in a custom workflow.
- Returns:
- state
-
getPurchaseOrderNumber
String getPurchaseOrderNumber()The Purchase Order Number is typically set by the Buyer on a QuoteRequest to track the purchase order during the quote and order flow.
- Returns:
- purchaseOrderNumber
-
getBusinessUnit
The BusinessUnit for the Quote. Only available for B2B-enabled Projects.
- Returns:
- businessUnit
-
setId
Unique identifier of the Quote.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the Quote.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setKey
User-defined unique identifier of the Quote.
- Parameters:
key- value to be set
-
setCreatedAt
Date and time (UTC) the Quote was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the Quote was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
IDs and references that last modified the Quote.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
IDs and references that created the Quote.
- Parameters:
createdBy- value to be set
-
setQuoteRequest
Quote Request related to the Quote.
- Parameters:
quoteRequest- value to be set
-
setStagedQuote
Staged Quote related to the Quote.
- Parameters:
stagedQuote- value to be set
-
setCustomer
The Buyer who owns the Quote.
- Parameters:
customer- value to be set
-
setCustomerGroup
Set automatically when
customeris set and the Customer is a member of a Customer Group. Not updated if Customer is changed after Quote creation. Used for Product Variant price selection.- Parameters:
customerGroup- value to be set
-
setValidTo
Expiration date for the Quote. Once a Quote expires, it cannot be ordered.
- Parameters:
validTo- value to be set
-
setSellerComment
Message from the Seller included in the offer.
- Parameters:
sellerComment- value to be set
-
setBuyerComment
Message from the Buyer included in the renegotiation request.
- Parameters:
buyerComment- value to be set
-
setStore
The Store to which the Buyer belongs.
- Parameters:
store- value to be set
-
setLineItems
The Line Items for which the Quote is requested.
- Parameters:
lineItems- values to be set
-
setLineItems
The Line Items for which the Quote is requested.
- Parameters:
lineItems- values to be set
-
setCustomLineItems
The Custom Line Items for which the Quote is requested.
- Parameters:
customLineItems- values to be set
-
setCustomLineItems
The Custom Line Items for which the Quote is requested.
- Parameters:
customLineItems- values to be set
-
setTotalPrice
Sum of all
totalPricefields of thelineItemsandcustomLineItems, as well as thepricefield ofshippingInfo(if it exists).totalPricemay or may not include the taxes: it depends on the taxRate.includedInPrice property of each price.- Parameters:
totalPrice- value to be set
-
setTaxedPrice
Not set until the shipping address is set. Will be set automatically in the
PlatformTaxMode. For theExternaltax mode it will be set as soon as the external tax rates for all line items, custom line items, and shipping in the cart are set.- Parameters:
taxedPrice- value to be set
-
setShippingAddress
Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.
- Parameters:
shippingAddress- value to be set
-
setBillingAddress
Address used for invoicing.
- Parameters:
billingAddress- value to be set
-
setInventoryMode
Inventory mode of the Cart referenced in the QuoteRequestDraft.
- Parameters:
inventoryMode- value to be set
-
setTaxMode
Tax mode of the Cart referenced in the QuoteRequestDraft.
- Parameters:
taxMode- value to be set
-
setPriceRoundingMode
When calculating total prices on LineItems and CustomLineItems, the selected mode is used for rounding.
- Parameters:
priceRoundingMode- value to be set
-
setTaxRoundingMode
When calculating taxes for
taxedPrice, the selected mode is used for rounding.- Parameters:
taxRoundingMode- value to be set
-
setTaxCalculationMode
When calculating taxes for
taxedPrice, the selected mode is used for calculating the price withLineItemLevel(horizontally) orUnitPriceLevel(vertically) calculation mode.- Parameters:
taxCalculationMode- value to be set
-
setCountry
Used for Product Variant price selection.
- Parameters:
country- value to be set
-
setShippingInfo
Set automatically once the ShippingMethod is set.
- Parameters:
shippingInfo- value to be set
-
setPaymentInfo
Log of payment transactions related to the Quote.
- Parameters:
paymentInfo- value to be set
-
setShippingRateInput
Used to select a ShippingRatePriceTier.
- Parameters:
shippingRateInput- value to be set
-
setItemShippingAddresses
Contains addresses for carts with multiple shipping addresses. Line items reference these addresses under their
shippingDetails. The addresses captured here are not used to determine eligible shipping methods or the applicable tax rate. Only the cart'sshippingAddressis used for this.- Parameters:
itemShippingAddresses- values to be set
-
setItemShippingAddresses
Contains addresses for carts with multiple shipping addresses. Line items reference these addresses under their
shippingDetails. The addresses captured here are not used to determine eligible shipping methods or the applicable tax rate. Only the cart'sshippingAddressis used for this.- Parameters:
itemShippingAddresses- values to be set
-
setDirectDiscounts
Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.
- Parameters:
directDiscounts- values to be set
-
setDirectDiscounts
Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.
- Parameters:
directDiscounts- values to be set
-
setCustom
Custom Fields on the Quote.
- Specified by:
setCustomin interfaceCustomizable<Quote>- Parameters:
custom- value to be set
-
setQuoteState
Predefined states tracking the status of the Quote.
- Parameters:
quoteState- 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
-
setPurchaseOrderNumber
The Purchase Order Number is typically set by the Buyer on a QuoteRequest to track the purchase order during the quote and order flow.
- Parameters:
purchaseOrderNumber- value to be set
-
setBusinessUnit
The BusinessUnit for the Quote. Only available for B2B-enabled Projects.
- Parameters:
businessUnit- value to be set
-
of
factory method- Returns:
- instance of Quote
-
of
factory method to create a shallow copy Quote- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
Quote copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of Quote- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Quote- Returns:
- builder
-
builder
create builder for Quote instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withQuote
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
referenceTypeId
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-