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)
.taxRoundingMode(RoundingMode.HALF_EVEN)
.taxCalculationMode(TaxCalculationMode.LINE_ITEM_LEVEL)
.quoteState(QuoteState.PENDING)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic QuoteBuilder
builder()
builder factory method for Quotestatic QuoteBuilder
create builder for Quote instancestatic Quote
factory method to create a deep copy of Quote@Valid Address
Address used for invoicing.@Valid BusinessUnitKeyReference
The BusinessUnit for the Quote.Message from the Buyer included in the renegotiation request.Used for Product Variant price selection.@NotNull ZonedDateTime
Date and time (UTC) the Quote was initially created.@Valid CreatedBy
IDs and references that created the Quote.@Valid CustomFields
Custom Fields on the Quote.@Valid CustomerReference
The Buyer who owns the Quote.@Valid CustomerGroupReference
Set automatically whencustomer
is 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 String
getId()
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 ZonedDateTime
Date and time (UTC) the Quote was last updated.@Valid LastModifiedBy
IDs and references that last modified the Quote.The Line Items for which the Quote is requested.@Valid PaymentInfo
Log of payment transactions related to the Quote.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 QuoteRequestReference
Quote Request related to the Quote.@NotNull QuoteState
Predefined states tracking the status of the Quote.Message from the Seller included in the offer.@Valid Address
Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.@Valid ShippingInfo
Set automatically once the ShippingMethod is set.@Valid ShippingRateInput
Used to select a ShippingRatePriceTier.@NotNull @Valid StagedQuoteReference
Staged Quote related to the Quote.@Valid StateReference
getState()
State of the Quote.@Valid StoreKeyReference
getStore()
The Store to which the Buyer belongs.@NotNull TaxCalculationMode
When calculating taxes fortaxedPrice
, the selected mode is used for calculating the price withLineItemLevel
(horizontally) orUnitPriceLevel
(vertically) calculation mode.@Valid TaxedPrice
Not set until the shipping address is set.@NotNull TaxMode
Tax mode of the Cart referenced in the QuoteRequestDraft.@NotNull RoundingMode
When calculating taxes fortaxedPrice
, the selected mode is used for rounding.@NotNull @Valid TypedMoney
Sum of alltotalPrice
fields of thelineItems
andcustomLineItems
, as well as theprice
field ofshippingInfo
(if it exists).Expiration date for the Quote.@NotNull Long
Current version of the Quote.static Quote
of()
factory methodstatic Quote
factory method to create a shallow copy Quotestatic ReferenceTypeId
void
setBillingAddress
(Address billingAddress) Address used for invoicing.void
setBusinessUnit
(BusinessUnitKeyReference businessUnit) The BusinessUnit for the Quote.void
setBuyerComment
(String buyerComment) Message from the Buyer included in the renegotiation request.void
setCountry
(String country) Used for Product Variant price selection.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the Quote was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the Quote.void
setCustom
(CustomFields custom) Custom Fields on the Quote.void
setCustomer
(CustomerReference customer) The Buyer who owns the Quote.void
setCustomerGroup
(CustomerGroupReference customerGroup) Set automatically whencustomer
is set and the Customer is a member of a Customer Group.void
setCustomLineItems
(CustomLineItem... customLineItems) The Custom Line Items for which the Quote is requested.void
setCustomLineItems
(List<CustomLineItem> customLineItems) The Custom Line Items for which the Quote is requested.void
setDirectDiscounts
(DirectDiscount... directDiscounts) Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.void
setDirectDiscounts
(List<DirectDiscount> directDiscounts) Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.void
Unique identifier of the Quote.void
setInventoryMode
(InventoryMode inventoryMode) Inventory mode of the Cart referenced in the QuoteRequestDraft.void
setItemShippingAddresses
(Address... itemShippingAddresses) Contains addresses for carts with multiple shipping addresses.void
setItemShippingAddresses
(List<Address> itemShippingAddresses) Contains addresses for carts with multiple shipping addresses.void
User-defined unique identifier of the Quote.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Quote was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Quote.void
setLineItems
(LineItem... lineItems) The Line Items for which the Quote is requested.void
setLineItems
(List<LineItem> lineItems) The Line Items for which the Quote is requested.void
setPaymentInfo
(PaymentInfo paymentInfo) Log of payment transactions related to the Quote.void
setPurchaseOrderNumber
(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.void
setQuoteRequest
(QuoteRequestReference quoteRequest) Quote Request related to the Quote.void
setQuoteState
(QuoteState quoteState) Predefined states tracking the status of the Quote.void
setSellerComment
(String sellerComment) Message from the Seller included in the offer.void
setShippingAddress
(Address shippingAddress) Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.void
setShippingInfo
(ShippingInfo shippingInfo) Set automatically once the ShippingMethod is set.void
setShippingRateInput
(ShippingRateInput shippingRateInput) Used to select a ShippingRatePriceTier.void
setStagedQuote
(StagedQuoteReference stagedQuote) Staged Quote related to the Quote.void
setState
(StateReference state) State of the Quote.void
setStore
(StoreKeyReference store) The Store to which the Buyer belongs.void
setTaxCalculationMode
(TaxCalculationMode taxCalculationMode) When calculating taxes fortaxedPrice
, the selected mode is used for calculating the price withLineItemLevel
(horizontally) orUnitPriceLevel
(vertically) calculation mode.void
setTaxedPrice
(TaxedPrice taxedPrice) Not set until the shipping address is set.void
setTaxMode
(TaxMode taxMode) Tax mode of the Cart referenced in the QuoteRequestDraft.void
setTaxRoundingMode
(RoundingMode taxRoundingMode) When calculating taxes fortaxedPrice
, the selected mode is used for rounding.void
setTotalPrice
(TypedMoney totalPrice) Sum of alltotalPrice
fields of thelineItems
andcustomLineItems
, as well as theprice
field ofshippingInfo
(if it exists).void
setValidTo
(ZonedDateTime validTo) Expiration date for the Quote.void
setVersion
(Long version) Current version of the Quote.static com.fasterxml.jackson.core.type.TypeReference<Quote>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface com.commercetools.api.models.DomainResource
get
Methods inherited from interface com.commercetools.api.models.quote.QuoteMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the Quote.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<Quote>
- Specified by:
getId
in interfaceIdentifiable<Quote>
- Specified by:
getId
in interfaceVersioned<Quote>
- Returns:
- id
-
getVersion
Current version of the Quote.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<Quote>
- Specified by:
getVersion
in 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:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Quote was last updated.
- Specified by:
getLastModifiedAt
in 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
customer
is 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.
- 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
totalPrice
fields of thelineItems
andcustomLineItems
, as well as theprice
field ofshippingInfo
(if it exists).totalPrice
may 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
Platform
TaxMode. For theExternal
tax 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
-
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'sshippingAddress
is 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:
getCustom
in 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.
- Returns:
- businessUnit
-
setId
Unique identifier of the Quote.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the Quote.
- Specified by:
setVersion
in 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:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the Quote was last updated.
- Specified by:
setLastModifiedAt
in 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
customer
is 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.
- 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
totalPrice
fields of thelineItems
andcustomLineItems
, as well as theprice
field ofshippingInfo
(if it exists).totalPrice
may 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
Platform
TaxMode. For theExternal
tax 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
-
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'sshippingAddress
is 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'sshippingAddress
is 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:
setCustom
in 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.
- 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
-
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
-