Interface QuoteRequest
- All Superinterfaces:
BaseResource
,WithKey
Example to create an instance using the builder pattern
QuoteRequest quoteRequest = QuoteRequest.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.quoteRequestState(QuoteRequestState.SUBMITTED)
.customer(customerBuilder -> customerBuilder)
.plusLineItems(lineItemsBuilder -> lineItemsBuilder)
.plusCustomLineItems(customLineItemsBuilder -> customLineItemsBuilder)
.totalPrice(totalPriceBuilder -> totalPriceBuilder)
.taxMode(TaxMode.PLATFORM)
.taxRoundingMode(RoundingMode.HALF_EVEN)
.taxCalculationMode(TaxCalculationMode.LINE_ITEM_LEVEL)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic QuoteRequestBuilder
builder()
builder factory method for QuoteRequeststatic QuoteRequestBuilder
builder
(QuoteRequest template) create builder for QuoteRequest instancestatic QuoteRequest
deepCopy
(QuoteRequest template) factory method to create a deep copy of QuoteRequest@Valid Address
Address used for invoicing.@Valid BusinessUnitKeyReference
The BusinessUnit for the Quote Request.@Valid CartReference
getCart()
The Cart from which a Quote is requested.Message from the Buyer included in the Quote Request.Used for Product Variant price selection.@NotNull ZonedDateTime
Date and time (UTC) the QuoteRequest was initially created.@Valid CreatedBy
IDs and references that created the QuoteRequest.@Valid CustomFields
Custom Fields of the Quote Request.@NotNull @Valid CustomerReference
The Buyer who owns the request.@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 a 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 QuoteRequest.Inventory mode of the Cart referenced in the QuoteRequestDraft.Contains addresses for carts with multiple shipping addresses.getKey()
User-defined unique identifier of the QuoteRequest.@NotNull ZonedDateTime
Date and time (UTC) the QuoteRequest was last updated.@Valid LastModifiedBy
IDs and references that last modified the QuoteRequest.The Line Items for which a Quote is requested.@Valid PaymentInfo
Log of payment transactions related to the Quote.Identifier for a purchase order, usually in a B2B context.@NotNull QuoteRequestState
Indicates the current state of the Quote Request in the negotiation process.@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.@Valid StateReference
getState()
State of the Quote Request.@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).@NotNull Long
Current version of the QuoteRequest.static QuoteRequest
of()
factory methodstatic QuoteRequest
of
(QuoteRequest template) factory method to create a shallow copy QuoteRequestvoid
setBillingAddress
(Address billingAddress) Address used for invoicing.void
setBusinessUnit
(BusinessUnitKeyReference businessUnit) The BusinessUnit for the Quote Request.void
setCart
(CartReference cart) The Cart from which a Quote is requested.void
setComment
(String comment) Message from the Buyer included in the Quote Request.void
setCountry
(String country) Used for Product Variant price selection.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the QuoteRequest was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the QuoteRequest.void
setCustom
(CustomFields custom) Custom Fields of the Quote Request.void
setCustomer
(CustomerReference customer) The Buyer who owns the request.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 a Quote is requested.void
setCustomLineItems
(List<CustomLineItem> customLineItems) The Custom Line Items for which a 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 QuoteRequest.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 QuoteRequest.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the QuoteRequest was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the QuoteRequest.void
setLineItems
(LineItem... lineItems) The Line Items for which a Quote is requested.void
setLineItems
(List<LineItem> lineItems) The Line Items for which a Quote is requested.void
setPaymentInfo
(PaymentInfo paymentInfo) Log of payment transactions related to the Quote.void
setPurchaseOrderNumber
(String purchaseOrderNumber) Identifier for a purchase order, usually in a B2B context.void
setQuoteRequestState
(QuoteRequestState quoteRequestState) Indicates the current state of the Quote Request in the negotiation process.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
setState
(StateReference state) State of the Quote Request.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
setVersion
(Long version) Current version of the QuoteRequest.static com.fasterxml.jackson.core.type.TypeReference<QuoteRequest>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withQuoteRequest
(Function<QuoteRequest, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
-
Method Details
-
getId
Unique identifier of the QuoteRequest.
- Specified by:
getId
in interfaceBaseResource
- Returns:
- id
-
getVersion
Current version of the QuoteRequest.
- Specified by:
getVersion
in interfaceBaseResource
- Returns:
- version
-
getKey
String getKey()User-defined unique identifier of the QuoteRequest.
-
getCreatedAt
Date and time (UTC) the QuoteRequest was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the QuoteRequest was last updated.
- Specified by:
getLastModifiedAt
in interfaceBaseResource
- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the QuoteRequest.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the QuoteRequest.
- Returns:
- createdBy
-
getQuoteRequestState
Indicates the current state of the Quote Request in the negotiation process.
- Returns:
- quoteRequestState
-
getComment
String getComment()Message from the Buyer included in the Quote Request.
- Returns:
- comment
-
getCustomer
The Buyer who owns the request.
- 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 Request creation. Used for Product Variant price selection.- Returns:
- customerGroup
-
getStore
The Store to which the Buyer belongs.
- Returns:
- store
-
getLineItems
The Line Items for which a Quote is requested.
- Returns:
- lineItems
-
getCustomLineItems
The Custom Line Items for which a 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 of the Quote Request.
- Returns:
- custom
-
getState
State of the Quote Request. This reference can point to a State in a custom workflow.
- Returns:
- state
-
getPurchaseOrderNumber
String getPurchaseOrderNumber()Identifier for a purchase order, usually in a B2B context. The Purchase Order Number is typically entered by the Buyer.
- Returns:
- purchaseOrderNumber
-
getCart
The Cart from which a Quote is requested.
- Returns:
- cart
-
getBusinessUnit
The BusinessUnit for the Quote Request.
- Returns:
- businessUnit
-
setId
Unique identifier of the QuoteRequest.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the QuoteRequest.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setKey
User-defined unique identifier of the QuoteRequest.
- Parameters:
key
- value to be set
-
setCreatedAt
Date and time (UTC) the QuoteRequest was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the QuoteRequest was last updated.
- Specified by:
setLastModifiedAt
in interfaceBaseResource
- Parameters:
lastModifiedAt
- value to be set
-
setLastModifiedBy
IDs and references that last modified the QuoteRequest.
- Parameters:
lastModifiedBy
- value to be set
-
setCreatedBy
IDs and references that created the QuoteRequest.
- Parameters:
createdBy
- value to be set
-
setQuoteRequestState
Indicates the current state of the Quote Request in the negotiation process.
- Parameters:
quoteRequestState
- value to be set
-
setComment
Message from the Buyer included in the Quote Request.
- Parameters:
comment
- value to be set
-
setCustomer
The Buyer who owns the request.
- 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 Request creation. Used for Product Variant price selection.- Parameters:
customerGroup
- value to be set
-
setStore
The Store to which the Buyer belongs.
- Parameters:
store
- value to be set
-
setLineItems
The Line Items for which a Quote is requested.
- Parameters:
lineItems
- values to be set
-
setLineItems
The Line Items for which a Quote is requested.
- Parameters:
lineItems
- values to be set
-
setCustomLineItems
The Custom Line Items for which a Quote is requested.
- Parameters:
customLineItems
- values to be set
-
setCustomLineItems
The Custom Line Items for which a 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 of the Quote Request.
- Parameters:
custom
- value to be set
-
setState
State of the Quote Request. This reference can point to a State in a custom workflow.
- Parameters:
state
- value to be set
-
setPurchaseOrderNumber
Identifier for a purchase order, usually in a B2B context. The Purchase Order Number is typically entered by the Buyer.
- Parameters:
purchaseOrderNumber
- value to be set
-
setCart
The Cart from which a Quote is requested.
- Parameters:
cart
- value to be set
-
setBusinessUnit
The BusinessUnit for the Quote Request.
- Parameters:
businessUnit
- value to be set
-
of
factory method- Returns:
- instance of QuoteRequest
-
of
factory method to create a shallow copy QuoteRequest- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of QuoteRequest- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for QuoteRequest- Returns:
- builder
-
builder
create builder for QuoteRequest instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withQuoteRequest
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
-