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)
.priceRoundingMode(RoundingMode.HALF_EVEN)
.taxRoundingMode(RoundingMode.HALF_EVEN)
.taxCalculationMode(TaxCalculationMode.LINE_ITEM_LEVEL)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic QuoteRequestBuilderbuilder()builder factory method for QuoteRequeststatic QuoteRequestBuilderbuilder(QuoteRequest template) create builder for QuoteRequest instancecopyDeep()static QuoteRequestdeepCopy(QuoteRequest template) factory method to create a deep copy of QuoteRequest@Valid AddressAddress used for invoicing.@Valid BusinessUnitKeyReferenceThe BusinessUnit for the Quote Request.@Valid CartReferencegetCart()The Cart from which a Quote is requested.Message from the Buyer included in the Quote Request.Used for Product Variant price selection.@NotNull ZonedDateTimeDate and time (UTC) the QuoteRequest was initially created.@Valid CreatedByIDs and references that created the QuoteRequest.@Valid CustomFieldsCustom Fields of the Quote Request.@NotNull @Valid CustomerReferenceThe Buyer who owns the request.@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 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 StringgetId()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 ZonedDateTimeDate and time (UTC) the QuoteRequest was last updated.@Valid LastModifiedByIDs and references that last modified the QuoteRequest.The Line Items for which a 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.Identifier for a purchase order, usually in a B2B context.@NotNull QuoteRequestStateIndicates the current state of the Quote Request in the negotiation process.@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.@Valid StateReferencegetState()State of the Quote Request.@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).@NotNull LongCurrent version of the QuoteRequest.static QuoteRequestof()factory methodstatic QuoteRequestof(QuoteRequest template) factory method to create a shallow copy QuoteRequestvoidsetBillingAddress(Address billingAddress) Address used for invoicing.voidsetBusinessUnit(BusinessUnitKeyReference businessUnit) The BusinessUnit for the Quote Request.voidsetCart(CartReference cart) The Cart from which a Quote is requested.voidsetComment(String comment) Message from the Buyer included in the Quote Request.voidsetCountry(String country) Used for Product Variant price selection.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the QuoteRequest was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the QuoteRequest.voidsetCustom(CustomFields custom) Custom Fields of the Quote Request.voidsetCustomer(CustomerReference customer) The Buyer who owns the request.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 a Quote is requested.voidsetCustomLineItems(List<CustomLineItem> customLineItems) The Custom Line Items for which a 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 QuoteRequest.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 QuoteRequest.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the QuoteRequest was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the QuoteRequest.voidsetLineItems(LineItem... lineItems) The Line Items for which a Quote is requested.voidsetLineItems(List<LineItem> lineItems) The Line Items for which a 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) Identifier for a purchase order, usually in a B2B context.voidsetQuoteRequestState(QuoteRequestState quoteRequestState) Indicates the current state of the Quote Request in the negotiation process.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.voidsetState(StateReference state) State of the Quote Request.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).voidsetVersion(Long version) Current version of the QuoteRequest.static com.fasterxml.jackson.core.type.TypeReference<QuoteRequest>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithQuoteRequest(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:
getIdin interfaceBaseResource- Returns:
- id
-
getVersion
Current version of the QuoteRequest.
- Specified by:
getVersionin 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:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the QuoteRequest was last updated.
- Specified by:
getLastModifiedAtin 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
customeris 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
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 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. Only available for B2B-enabled Projects.
- Returns:
- businessUnit
-
setId
Unique identifier of the QuoteRequest.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the QuoteRequest.
- Specified by:
setVersionin 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:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the QuoteRequest was last updated.
- Specified by:
setLastModifiedAtin 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
customeris 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
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 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. Only available for B2B-enabled Projects.
- 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
-
copyDeep
QuoteRequest copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
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
-