Class QuoteBuilder
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()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe Custom Line Items for which the Quote is requested.Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.Contains addresses for carts with multiple shipping addresses.addLineItems
(Function<LineItemBuilder, LineItem> builder) The Line Items for which the Quote is requested.billingAddress
(Address billingAddress) Address used for invoicing.billingAddress
(Function<AddressBuilder, AddressBuilder> builder) Address used for invoicing.build()
builds Quote with checking for non-null required valuesbuilds Quote without checking for non-null required valuesbusinessUnit
(BusinessUnitKeyReference businessUnit) The BusinessUnit for the Quote.The BusinessUnit for the Quote.buyerComment
(String buyerComment) Message from the Buyer included in the renegotiation request.Used for Product Variant price selection.createdAt
(ZonedDateTime createdAt) Date and time (UTC) the Quote was initially created.IDs and references that created the Quote.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) IDs and references that created the Quote.custom
(CustomFields custom) Custom Fields on the Quote.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields on the Quote.customer
(CustomerReference customer) The Buyer who owns the Quote.The Buyer who owns the Quote.customerGroup
(CustomerGroupReference customerGroup) Set automatically whencustomer
is set and the Customer is a member of a Customer Group.Set automatically whencustomer
is set and the Customer is a member of a Customer Group.customLineItems
(CustomLineItem... customLineItems) The Custom Line Items for which the Quote is requested.customLineItems
(List<CustomLineItem> customLineItems) The Custom Line Items for which the Quote is requested.directDiscounts
(DirectDiscount... directDiscounts) Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.directDiscounts
(List<DirectDiscount> directDiscounts) Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.Address used for invoicing.The BusinessUnit for the Quote.Message from the Buyer included in the renegotiation request.Used for Product Variant price selection.Date and time (UTC) the Quote was initially created.IDs and references that created the Quote.Custom Fields on the Quote.The Buyer who owns the Quote.Set automatically whencustomer
is set and the Customer is a member of a Customer Group.The Custom Line Items for which the Quote is requested.Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.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.Date and time (UTC) the Quote was last updated.IDs and references that last modified the Quote.The Line Items for which the Quote is requested.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.Quote Request related to the Quote.Predefined states tracking the status of the Quote.Message from the Seller included in the offer.Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.Set automatically once the ShippingMethod is set.Used to select a ShippingRatePriceTier.Staged Quote related to the Quote.getState()
State of the Quote.getStore()
The Store to which the Buyer belongs.When calculating taxes fortaxedPrice
, the selected mode is used for calculating the price withLineItemLevel
(horizontally) orUnitPriceLevel
(vertically) calculation mode.Not set until the shipping address is set.Tax mode of the Cart referenced in the QuoteRequestDraft.When calculating taxes fortaxedPrice
, the selected mode is used for rounding.Sum of alltotalPrice
fields of thelineItems
andcustomLineItems
, as well as theprice
field ofshippingInfo
(if it exists).Expiration date for the Quote.Current version of the Quote.Unique identifier of the Quote.inventoryMode
(InventoryMode inventoryMode) Inventory mode of the Cart referenced in the QuoteRequestDraft.itemShippingAddresses
(Address... itemShippingAddresses) Contains addresses for carts with multiple shipping addresses.itemShippingAddresses
(List<Address> itemShippingAddresses) Contains addresses for carts with multiple shipping addresses.User-defined unique identifier of the Quote.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the Quote was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the Quote.IDs and references that last modified the Quote.The Line Items for which the Quote is requested.The Line Items for which the Quote is requested.static QuoteBuilder
of()
factory method for an instance of QuoteBuilderstatic QuoteBuilder
create builder for Quote instancepaymentInfo
(PaymentInfo paymentInfo) Log of payment transactions related to the Quote.Log of payment transactions related to the Quote.plusCustomLineItems
(CustomLineItem... customLineItems) The Custom Line Items for which the Quote is requested.The Custom Line Items for which the Quote is requested.plusDirectDiscounts
(DirectDiscount... directDiscounts) Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.plusItemShippingAddresses
(Address... itemShippingAddresses) Contains addresses for carts with multiple shipping addresses.Contains addresses for carts with multiple shipping addresses.plusLineItems
(LineItem... lineItems) The Line Items for which the Quote is requested.plusLineItems
(Function<LineItemBuilder, LineItemBuilder> builder) The Line Items for which the Quote is requested.purchaseOrderNumber
(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.quoteRequest
(QuoteRequestReference quoteRequest) Quote Request related to the Quote.Quote Request related to the Quote.quoteState
(QuoteState quoteState) Predefined states tracking the status of the Quote.sellerComment
(String sellerComment) Message from the Seller included in the offer.The Custom Line Items for which the Quote is requested.Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.Contains addresses for carts with multiple shipping addresses.setLineItems
(Function<LineItemBuilder, LineItem> builder) The Line Items for which the Quote is requested.shippingAddress
(Address shippingAddress) Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.shippingAddress
(Function<AddressBuilder, AddressBuilder> builder) Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.shippingInfo
(ShippingInfo shippingInfo) Set automatically once the ShippingMethod is set.Set automatically once the ShippingMethod is set.shippingRateInput
(ShippingRateInput shippingRateInput) Used to select a ShippingRatePriceTier.shippingRateInput
(Function<ShippingRateInputBuilder, Builder<? extends ShippingRateInput>> builder) Used to select a ShippingRatePriceTier.stagedQuote
(StagedQuoteReference stagedQuote) Staged Quote related to the Quote.Staged Quote related to the Quote.state
(StateReference state) State of the Quote.State of the Quote.store
(StoreKeyReference store) The Store to which the Buyer belongs.The Store to which the Buyer belongs.taxCalculationMode
(TaxCalculationMode taxCalculationMode) When calculating taxes fortaxedPrice
, the selected mode is used for calculating the price withLineItemLevel
(horizontally) orUnitPriceLevel
(vertically) calculation mode.taxedPrice
(TaxedPrice taxedPrice) Not set until the shipping address is set.taxedPrice
(Function<TaxedPriceBuilder, TaxedPriceBuilder> builder) Not set until the shipping address is set.Tax mode of the Cart referenced in the QuoteRequestDraft.taxRoundingMode
(RoundingMode taxRoundingMode) When calculating taxes fortaxedPrice
, the selected mode is used for rounding.totalPrice
(TypedMoney totalPrice) Sum of alltotalPrice
fields of thelineItems
andcustomLineItems
, as well as theprice
field ofshippingInfo
(if it exists).totalPrice
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Sum of alltotalPrice
fields of thelineItems
andcustomLineItems
, as well as theprice
field ofshippingInfo
(if it exists).validTo
(ZonedDateTime validTo) Expiration date for the Quote.Current version of the Quote.withBillingAddress
(Function<AddressBuilder, Address> builder) Address used for invoicing.The BusinessUnit for the Quote.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) IDs and references that created the Quote.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields on the Quote.The Buyer who owns the Quote.Set automatically whencustomer
is set and the Customer is a member of a Customer Group.The Custom Line Items for which the Quote is requested.Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.Contains addresses for carts with multiple shipping addresses.IDs and references that last modified the Quote.withLineItems
(Function<LineItemBuilder, LineItemBuilder> builder) The Line Items for which the Quote is requested.withPaymentInfo
(Function<PaymentInfoBuilder, PaymentInfo> builder) Log of payment transactions related to the Quote.Quote Request related to the Quote.withShippingAddress
(Function<AddressBuilder, Address> builder) Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.Set automatically once the ShippingMethod is set.Staged Quote related to the Quote.withState
(Function<StateReferenceBuilder, StateReference> builder) State of the Quote.The Store to which the Buyer belongs.withTaxedPrice
(Function<TaxedPriceBuilder, TaxedPrice> builder) Not set until the shipping address is set.
-
Constructor Details
-
QuoteBuilder
public QuoteBuilder()
-
-
Method Details
-
id
Unique identifier of the Quote.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the Quote.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the Quote was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the Quote was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the Quote.
- Parameters:
key
- value to be set- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Quote.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
IDs and references that last modified the Quote.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
IDs and references that last modified the Quote.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
IDs and references that created the Quote.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
IDs and references that created the Quote.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
IDs and references that created the Quote.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
quoteRequest
public QuoteBuilder quoteRequest(Function<QuoteRequestReferenceBuilder, QuoteRequestReferenceBuilder> builder) Quote Request related to the Quote.
- Parameters:
builder
- function to build the quoteRequest value- Returns:
- Builder
-
withQuoteRequest
public QuoteBuilder withQuoteRequest(Function<QuoteRequestReferenceBuilder, QuoteRequestReference> builder) Quote Request related to the Quote.
- Parameters:
builder
- function to build the quoteRequest value- Returns:
- Builder
-
quoteRequest
Quote Request related to the Quote.
- Parameters:
quoteRequest
- value to be set- Returns:
- Builder
-
stagedQuote
public QuoteBuilder stagedQuote(Function<StagedQuoteReferenceBuilder, StagedQuoteReferenceBuilder> builder) Staged Quote related to the Quote.
- Parameters:
builder
- function to build the stagedQuote value- Returns:
- Builder
-
withStagedQuote
public QuoteBuilder withStagedQuote(Function<StagedQuoteReferenceBuilder, StagedQuoteReference> builder) Staged Quote related to the Quote.
- Parameters:
builder
- function to build the stagedQuote value- Returns:
- Builder
-
stagedQuote
Staged Quote related to the Quote.
- Parameters:
stagedQuote
- value to be set- Returns:
- Builder
-
customer
The Buyer who owns the Quote.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
withCustomer
The Buyer who owns the Quote.
- Parameters:
builder
- function to build the customer value- Returns:
- Builder
-
customer
The Buyer who owns the Quote.
- Parameters:
customer
- value to be set- Returns:
- Builder
-
customerGroup
public QuoteBuilder customerGroup(Function<CustomerGroupReferenceBuilder, CustomerGroupReferenceBuilder> builder) 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:
builder
- function to build the customerGroup value- Returns:
- Builder
-
withCustomerGroup
public QuoteBuilder withCustomerGroup(Function<CustomerGroupReferenceBuilder, CustomerGroupReference> builder) 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:
builder
- function to build the customerGroup value- Returns:
- Builder
-
customerGroup
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- Returns:
- Builder
-
validTo
Expiration date for the Quote.
- Parameters:
validTo
- value to be set- Returns:
- Builder
-
sellerComment
Message from the Seller included in the offer.
- Parameters:
sellerComment
- value to be set- Returns:
- Builder
-
buyerComment
Message from the Buyer included in the renegotiation request.
- Parameters:
buyerComment
- value to be set- Returns:
- Builder
-
store
The Store to which the Buyer belongs.
- Parameters:
builder
- function to build the store value- Returns:
- Builder
-
withStore
The Store to which the Buyer belongs.
- Parameters:
builder
- function to build the store value- Returns:
- Builder
-
store
The Store to which the Buyer belongs.
- Parameters:
store
- value to be set- Returns:
- Builder
-
lineItems
The Line Items for which the Quote is requested.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
lineItems
The Line Items for which the Quote is requested.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
plusLineItems
The Line Items for which the Quote is requested.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
plusLineItems
The Line Items for which the Quote is requested.
- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
withLineItems
The Line Items for which the Quote is requested.
- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
addLineItems
The Line Items for which the Quote is requested.
- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
setLineItems
The Line Items for which the Quote is requested.
- Parameters:
builder
- function to build the lineItems value- Returns:
- Builder
-
customLineItems
The Custom Line Items for which the Quote is requested.
- Parameters:
customLineItems
- value to be set- Returns:
- Builder
-
customLineItems
The Custom Line Items for which the Quote is requested.
- Parameters:
customLineItems
- value to be set- Returns:
- Builder
-
plusCustomLineItems
The Custom Line Items for which the Quote is requested.
- Parameters:
customLineItems
- value to be set- Returns:
- Builder
-
plusCustomLineItems
public QuoteBuilder plusCustomLineItems(Function<CustomLineItemBuilder, CustomLineItemBuilder> builder) The Custom Line Items for which the Quote is requested.
- Parameters:
builder
- function to build the customLineItems value- Returns:
- Builder
-
withCustomLineItems
public QuoteBuilder withCustomLineItems(Function<CustomLineItemBuilder, CustomLineItemBuilder> builder) The Custom Line Items for which the Quote is requested.
- Parameters:
builder
- function to build the customLineItems value- Returns:
- Builder
-
addCustomLineItems
The Custom Line Items for which the Quote is requested.
- Parameters:
builder
- function to build the customLineItems value- Returns:
- Builder
-
setCustomLineItems
The Custom Line Items for which the Quote is requested.
- Parameters:
builder
- function to build the customLineItems value- Returns:
- Builder
-
totalPrice
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- Returns:
- Builder
-
totalPrice
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:
builder
- function to build the totalPrice value- Returns:
- Builder
-
taxedPrice
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:
builder
- function to build the taxedPrice value- Returns:
- Builder
-
withTaxedPrice
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:
builder
- function to build the taxedPrice value- Returns:
- Builder
-
taxedPrice
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- Returns:
- Builder
-
shippingAddress
Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.
- Parameters:
builder
- function to build the shippingAddress value- Returns:
- Builder
-
withShippingAddress
Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.
- Parameters:
builder
- function to build the shippingAddress value- Returns:
- Builder
-
shippingAddress
Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.
- Parameters:
shippingAddress
- value to be set- Returns:
- Builder
-
billingAddress
Address used for invoicing.
- Parameters:
builder
- function to build the billingAddress value- Returns:
- Builder
-
withBillingAddress
Address used for invoicing.
- Parameters:
builder
- function to build the billingAddress value- Returns:
- Builder
-
billingAddress
Address used for invoicing.
- Parameters:
billingAddress
- value to be set- Returns:
- Builder
-
inventoryMode
Inventory mode of the Cart referenced in the QuoteRequestDraft.
- Parameters:
inventoryMode
- value to be set- Returns:
- Builder
-
taxMode
Tax mode of the Cart referenced in the QuoteRequestDraft.
- Parameters:
taxMode
- value to be set- Returns:
- Builder
-
taxRoundingMode
When calculating taxes for
taxedPrice
, the selected mode is used for rounding.- Parameters:
taxRoundingMode
- value to be set- Returns:
- Builder
-
taxCalculationMode
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- Returns:
- Builder
-
country
Used for Product Variant price selection.
- Parameters:
country
- value to be set- Returns:
- Builder
-
shippingInfo
Set automatically once the ShippingMethod is set.
- Parameters:
builder
- function to build the shippingInfo value- Returns:
- Builder
-
withShippingInfo
Set automatically once the ShippingMethod is set.
- Parameters:
builder
- function to build the shippingInfo value- Returns:
- Builder
-
shippingInfo
Set automatically once the ShippingMethod is set.
- Parameters:
shippingInfo
- value to be set- Returns:
- Builder
-
paymentInfo
Log of payment transactions related to the Quote.
- Parameters:
builder
- function to build the paymentInfo value- Returns:
- Builder
-
withPaymentInfo
Log of payment transactions related to the Quote.
- Parameters:
builder
- function to build the paymentInfo value- Returns:
- Builder
-
paymentInfo
Log of payment transactions related to the Quote.
- Parameters:
paymentInfo
- value to be set- Returns:
- Builder
-
shippingRateInput
Used to select a ShippingRatePriceTier.
- Parameters:
shippingRateInput
- value to be set- Returns:
- Builder
-
shippingRateInput
public QuoteBuilder shippingRateInput(Function<ShippingRateInputBuilder, Builder<? extends ShippingRateInput>> builder) Used to select a ShippingRatePriceTier.
- Parameters:
builder
- function to build the shippingRateInput value- Returns:
- Builder
-
itemShippingAddresses
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
- value to be set- Returns:
- Builder
-
itemShippingAddresses
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
- value to be set- Returns:
- Builder
-
plusItemShippingAddresses
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
- value to be set- Returns:
- Builder
-
plusItemShippingAddresses
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:
builder
- function to build the itemShippingAddresses value- Returns:
- Builder
-
withItemShippingAddresses
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:
builder
- function to build the itemShippingAddresses value- Returns:
- Builder
-
addItemShippingAddresses
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:
builder
- function to build the itemShippingAddresses value- Returns:
- Builder
-
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:
builder
- function to build the itemShippingAddresses value- Returns:
- Builder
-
directDiscounts
Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.
- Parameters:
directDiscounts
- value to be set- Returns:
- Builder
-
directDiscounts
Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.
- Parameters:
directDiscounts
- value to be set- Returns:
- Builder
-
plusDirectDiscounts
Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.
- Parameters:
directDiscounts
- value to be set- Returns:
- Builder
-
plusDirectDiscounts
public QuoteBuilder plusDirectDiscounts(Function<DirectDiscountBuilder, DirectDiscountBuilder> builder) Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.
- Parameters:
builder
- function to build the directDiscounts value- Returns:
- Builder
-
withDirectDiscounts
public QuoteBuilder withDirectDiscounts(Function<DirectDiscountBuilder, DirectDiscountBuilder> builder) Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.
- Parameters:
builder
- function to build the directDiscounts value- Returns:
- Builder
-
addDirectDiscounts
Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.
- Parameters:
builder
- function to build the directDiscounts value- Returns:
- Builder
-
setDirectDiscounts
Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.
- Parameters:
builder
- function to build the directDiscounts value- Returns:
- Builder
-
custom
Custom Fields on the Quote.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields on the Quote.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields on the Quote.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
quoteState
Predefined states tracking the status of the Quote.
- Parameters:
quoteState
- value to be set- Returns:
- Builder
-
state
State of the Quote. This reference can point to a State in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
withState
State of the Quote. This reference can point to a State in a custom workflow.
- Parameters:
builder
- function to build the state value- Returns:
- Builder
-
state
State of the Quote. This reference can point to a State in a custom workflow.
- Parameters:
state
- value to be set- Returns:
- Builder
-
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.
- Parameters:
purchaseOrderNumber
- value to be set- Returns:
- Builder
-
businessUnit
public QuoteBuilder businessUnit(Function<BusinessUnitKeyReferenceBuilder, BusinessUnitKeyReferenceBuilder> builder) The BusinessUnit for the Quote.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
withBusinessUnit
public QuoteBuilder withBusinessUnit(Function<BusinessUnitKeyReferenceBuilder, BusinessUnitKeyReference> builder) The BusinessUnit for the Quote.
- Parameters:
builder
- function to build the businessUnit value- Returns:
- Builder
-
businessUnit
The BusinessUnit for the Quote.
- Parameters:
businessUnit
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the Quote.
- Returns:
- id
-
getVersion
Current version of the Quote.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the Quote was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the Quote was last updated.
- Returns:
- lastModifiedAt
-
getKey
User-defined unique identifier of the Quote.
- Returns:
- key
-
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
Expiration date for the Quote.
- Returns:
- validTo
-
getSellerComment
Message from the Seller included in the offer.
- Returns:
- sellerComment
-
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
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
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.
- 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
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
-
build
builds Quote with checking for non-null required values -
buildUnchecked
builds Quote without checking for non-null required values- Returns:
- Quote
-
of
factory method for an instance of QuoteBuilder- Returns:
- builder
-
of
create builder for Quote instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-