Class QuoteBuilder

java.lang.Object
com.commercetools.api.models.quote.QuoteBuilder
All Implemented Interfaces:
Builder<Quote>

public class QuoteBuilder extends Object implements Builder<Quote>
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 Details

    • QuoteBuilder

      public QuoteBuilder()
  • Method Details

    • id

      public QuoteBuilder id(String id)

      Unique identifier of the Quote.

      Parameters:
      id - value to be set
      Returns:
      Builder
    • version

      public QuoteBuilder version(Long version)

      Current version of the Quote.

      Parameters:
      version - value to be set
      Returns:
      Builder
    • createdAt

      public QuoteBuilder createdAt(ZonedDateTime createdAt)

      Date and time (UTC) the Quote was initially created.

      Parameters:
      createdAt - value to be set
      Returns:
      Builder
    • lastModifiedAt

      public QuoteBuilder lastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the Quote was last updated.

      Parameters:
      lastModifiedAt - value to be set
      Returns:
      Builder
    • key

      public QuoteBuilder key(@Nullable String 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

      public QuoteBuilder withLastModifiedBy(Function<LastModifiedByBuilder,LastModifiedBy> builder)

      IDs and references that last modified the Quote.

      Parameters:
      builder - function to build the lastModifiedBy value
      Returns:
      Builder
    • lastModifiedBy

      public QuoteBuilder lastModifiedBy(@Nullable LastModifiedBy 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

      public QuoteBuilder withCreatedBy(Function<CreatedByBuilder,CreatedBy> builder)

      IDs and references that created the Quote.

      Parameters:
      builder - function to build the createdBy value
      Returns:
      Builder
    • createdBy

      public QuoteBuilder createdBy(@Nullable CreatedBy createdBy)

      IDs and references that created the Quote.

      Parameters:
      createdBy - value to be set
      Returns:
      Builder
    • quoteRequest

      Quote Request related to the Quote.

      Parameters:
      builder - function to build the quoteRequest value
      Returns:
      Builder
    • withQuoteRequest

      Quote Request related to the Quote.

      Parameters:
      builder - function to build the quoteRequest value
      Returns:
      Builder
    • quoteRequest

      public QuoteBuilder quoteRequest(QuoteRequestReference quoteRequest)

      Quote Request related to the Quote.

      Parameters:
      quoteRequest - value to be set
      Returns:
      Builder
    • stagedQuote

      Staged Quote related to the Quote.

      Parameters:
      builder - function to build the stagedQuote value
      Returns:
      Builder
    • withStagedQuote

      Staged Quote related to the Quote.

      Parameters:
      builder - function to build the stagedQuote value
      Returns:
      Builder
    • stagedQuote

      public QuoteBuilder stagedQuote(StagedQuoteReference 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

      public QuoteBuilder customer(@Nullable CustomerReference customer)

      The Buyer who owns the Quote.

      Parameters:
      customer - value to be set
      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:
      builder - function to build the customerGroup value
      Returns:
      Builder
    • withCustomerGroup

      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

      public QuoteBuilder customerGroup(@Nullable CustomerGroupReference 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

      public QuoteBuilder validTo(@Nullable ZonedDateTime validTo)

      Expiration date for the Quote.

      Parameters:
      validTo - value to be set
      Returns:
      Builder
    • sellerComment

      public QuoteBuilder sellerComment(@Nullable String sellerComment)

      Message from the Seller included in the offer.

      Parameters:
      sellerComment - value to be set
      Returns:
      Builder
    • buyerComment

      public QuoteBuilder buyerComment(@Nullable String 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

      public QuoteBuilder lineItems(LineItem... lineItems)

      The Line Items for which the Quote is requested.

      Parameters:
      lineItems - value to be set
      Returns:
      Builder
    • lineItems

      public QuoteBuilder lineItems(List<LineItem> lineItems)

      The Line Items for which the Quote is requested.

      Parameters:
      lineItems - value to be set
      Returns:
      Builder
    • plusLineItems

      public QuoteBuilder plusLineItems(LineItem... lineItems)

      The Line Items for which the Quote is requested.

      Parameters:
      lineItems - value to be set
      Returns:
      Builder
    • plusLineItems

      public QuoteBuilder plusLineItems(Function<LineItemBuilder,LineItemBuilder> builder)

      The Line Items for which the Quote is requested.

      Parameters:
      builder - function to build the lineItems value
      Returns:
      Builder
    • withLineItems

      public QuoteBuilder withLineItems(Function<LineItemBuilder,LineItemBuilder> builder)

      The Line Items for which the Quote is requested.

      Parameters:
      builder - function to build the lineItems value
      Returns:
      Builder
    • addLineItems

      public QuoteBuilder addLineItems(Function<LineItemBuilder,LineItem> builder)

      The Line Items for which the Quote is requested.

      Parameters:
      builder - function to build the lineItems value
      Returns:
      Builder
    • setLineItems

      public QuoteBuilder setLineItems(Function<LineItemBuilder,LineItem> builder)

      The Line Items for which the Quote is requested.

      Parameters:
      builder - function to build the lineItems value
      Returns:
      Builder
    • customLineItems

      public QuoteBuilder customLineItems(CustomLineItem... customLineItems)

      The Custom Line Items for which the Quote is requested.

      Parameters:
      customLineItems - value to be set
      Returns:
      Builder
    • customLineItems

      public QuoteBuilder customLineItems(List<CustomLineItem> customLineItems)

      The Custom Line Items for which the Quote is requested.

      Parameters:
      customLineItems - value to be set
      Returns:
      Builder
    • plusCustomLineItems

      public QuoteBuilder plusCustomLineItems(CustomLineItem... customLineItems)

      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

      public QuoteBuilder addCustomLineItems(Function<CustomLineItemBuilder,CustomLineItem> builder)

      The Custom Line Items for which the Quote is requested.

      Parameters:
      builder - function to build the customLineItems value
      Returns:
      Builder
    • setCustomLineItems

      public QuoteBuilder setCustomLineItems(Function<CustomLineItemBuilder,CustomLineItem> builder)

      The Custom Line Items for which the Quote is requested.

      Parameters:
      builder - function to build the customLineItems value
      Returns:
      Builder
    • totalPrice

      public QuoteBuilder totalPrice(TypedMoney totalPrice)

      Sum of all totalPrice fields of the lineItems and customLineItems, as well as the price field of shippingInfo (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

      public QuoteBuilder totalPrice(Function<TypedMoneyBuilder,Builder<? extends TypedMoney>> builder)

      Sum of all totalPrice fields of the lineItems and customLineItems, as well as the price field of shippingInfo (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 the External 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

      public QuoteBuilder withTaxedPrice(Function<TaxedPriceBuilder,TaxedPrice> builder)

      Not set until the shipping address is set. Will be set automatically in the Platform TaxMode. For the External 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

      public QuoteBuilder taxedPrice(@Nullable TaxedPrice taxedPrice)

      Not set until the shipping address is set. Will be set automatically in the Platform TaxMode. For the External 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

      public QuoteBuilder shippingAddress(Function<AddressBuilder,AddressBuilder> builder)

      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

      public QuoteBuilder withShippingAddress(Function<AddressBuilder,Address> builder)

      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

      public QuoteBuilder shippingAddress(@Nullable Address 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

      public QuoteBuilder billingAddress(Function<AddressBuilder,AddressBuilder> builder)

      Address used for invoicing.

      Parameters:
      builder - function to build the billingAddress value
      Returns:
      Builder
    • withBillingAddress

      public QuoteBuilder withBillingAddress(Function<AddressBuilder,Address> builder)

      Address used for invoicing.

      Parameters:
      builder - function to build the billingAddress value
      Returns:
      Builder
    • billingAddress

      public QuoteBuilder billingAddress(@Nullable Address billingAddress)

      Address used for invoicing.

      Parameters:
      billingAddress - value to be set
      Returns:
      Builder
    • inventoryMode

      public QuoteBuilder inventoryMode(@Nullable InventoryMode inventoryMode)

      Inventory mode of the Cart referenced in the QuoteRequestDraft.

      Parameters:
      inventoryMode - value to be set
      Returns:
      Builder
    • taxMode

      public QuoteBuilder taxMode(TaxMode taxMode)

      Tax mode of the Cart referenced in the QuoteRequestDraft.

      Parameters:
      taxMode - value to be set
      Returns:
      Builder
    • taxRoundingMode

      public QuoteBuilder taxRoundingMode(RoundingMode taxRoundingMode)

      When calculating taxes for taxedPrice, the selected mode is used for rounding.

      Parameters:
      taxRoundingMode - value to be set
      Returns:
      Builder
    • taxCalculationMode

      public QuoteBuilder taxCalculationMode(TaxCalculationMode taxCalculationMode)

      When calculating taxes for taxedPrice, the selected mode is used for calculating the price with LineItemLevel (horizontally) or UnitPriceLevel (vertically) calculation mode.

      Parameters:
      taxCalculationMode - value to be set
      Returns:
      Builder
    • country

      public QuoteBuilder country(@Nullable String 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

      public QuoteBuilder withShippingInfo(Function<ShippingInfoBuilder,ShippingInfo> builder)

      Set automatically once the ShippingMethod is set.

      Parameters:
      builder - function to build the shippingInfo value
      Returns:
      Builder
    • shippingInfo

      public QuoteBuilder shippingInfo(@Nullable ShippingInfo 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

      public QuoteBuilder withPaymentInfo(Function<PaymentInfoBuilder,PaymentInfo> builder)

      Log of payment transactions related to the Quote.

      Parameters:
      builder - function to build the paymentInfo value
      Returns:
      Builder
    • paymentInfo

      public QuoteBuilder paymentInfo(@Nullable PaymentInfo paymentInfo)

      Log of payment transactions related to the Quote.

      Parameters:
      paymentInfo - value to be set
      Returns:
      Builder
    • shippingRateInput

      public QuoteBuilder shippingRateInput(@Nullable ShippingRateInput 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

      public QuoteBuilder itemShippingAddresses(@Nullable Address... 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's shippingAddress is used for this.

      Parameters:
      itemShippingAddresses - value to be set
      Returns:
      Builder
    • itemShippingAddresses

      public QuoteBuilder itemShippingAddresses(@Nullable List<Address> 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's shippingAddress is used for this.

      Parameters:
      itemShippingAddresses - value to be set
      Returns:
      Builder
    • plusItemShippingAddresses

      public QuoteBuilder plusItemShippingAddresses(@Nullable Address... 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's shippingAddress is used for this.

      Parameters:
      itemShippingAddresses - value to be set
      Returns:
      Builder
    • plusItemShippingAddresses

      public QuoteBuilder plusItemShippingAddresses(Function<AddressBuilder,AddressBuilder> builder)

      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's shippingAddress is used for this.

      Parameters:
      builder - function to build the itemShippingAddresses value
      Returns:
      Builder
    • withItemShippingAddresses

      public QuoteBuilder withItemShippingAddresses(Function<AddressBuilder,AddressBuilder> builder)

      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's shippingAddress is used for this.

      Parameters:
      builder - function to build the itemShippingAddresses value
      Returns:
      Builder
    • addItemShippingAddresses

      public QuoteBuilder addItemShippingAddresses(Function<AddressBuilder,Address> builder)

      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's shippingAddress is used for this.

      Parameters:
      builder - function to build the itemShippingAddresses value
      Returns:
      Builder
    • setItemShippingAddresses

      public QuoteBuilder setItemShippingAddresses(Function<AddressBuilder,Address> builder)

      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's shippingAddress is used for this.

      Parameters:
      builder - function to build the itemShippingAddresses value
      Returns:
      Builder
    • directDiscounts

      public QuoteBuilder directDiscounts(@Nullable DirectDiscount... 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

      public QuoteBuilder directDiscounts(@Nullable List<DirectDiscount> 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

      public QuoteBuilder plusDirectDiscounts(@Nullable DirectDiscount... 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

      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

      public QuoteBuilder addDirectDiscounts(Function<DirectDiscountBuilder,DirectDiscount> 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
    • setDirectDiscounts

      public QuoteBuilder setDirectDiscounts(Function<DirectDiscountBuilder,DirectDiscount> 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
    • custom

      Custom Fields on the Quote.

      Parameters:
      builder - function to build the custom value
      Returns:
      Builder
    • withCustom

      public QuoteBuilder withCustom(Function<CustomFieldsBuilder,CustomFields> builder)

      Custom Fields on the Quote.

      Parameters:
      builder - function to build the custom value
      Returns:
      Builder
    • custom

      public QuoteBuilder custom(@Nullable CustomFields custom)

      Custom Fields on the Quote.

      Parameters:
      custom - value to be set
      Returns:
      Builder
    • quoteState

      public QuoteBuilder quoteState(QuoteState 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

      public QuoteBuilder state(@Nullable StateReference 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

      public QuoteBuilder purchaseOrderNumber(@Nullable 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.

      Parameters:
      purchaseOrderNumber - value to be set
      Returns:
      Builder
    • businessUnit

      The BusinessUnit for the Quote.

      Parameters:
      builder - function to build the businessUnit value
      Returns:
      Builder
    • withBusinessUnit

      The BusinessUnit for the Quote.

      Parameters:
      builder - function to build the businessUnit value
      Returns:
      Builder
    • businessUnit

      public QuoteBuilder businessUnit(@Nullable BusinessUnitKeyReference businessUnit)

      The BusinessUnit for the Quote.

      Parameters:
      businessUnit - value to be set
      Returns:
      Builder
    • getId

      public String getId()

      Unique identifier of the Quote.

      Returns:
      id
    • getVersion

      public Long getVersion()

      Current version of the Quote.

      Returns:
      version
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

      Date and time (UTC) the Quote was initially created.

      Returns:
      createdAt
    • getLastModifiedAt

      public ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the Quote was last updated.

      Returns:
      lastModifiedAt
    • getKey

      @Nullable public String getKey()

      User-defined unique identifier of the Quote.

      Returns:
      key
    • getLastModifiedBy

      @Nullable public LastModifiedBy getLastModifiedBy()

      IDs and references that last modified the Quote.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Nullable public CreatedBy getCreatedBy()

      IDs and references that created the Quote.

      Returns:
      createdBy
    • getQuoteRequest

      public QuoteRequestReference getQuoteRequest()

      Quote Request related to the Quote.

      Returns:
      quoteRequest
    • getStagedQuote

      public StagedQuoteReference getStagedQuote()

      Staged Quote related to the Quote.

      Returns:
      stagedQuote
    • getCustomer

      @Nullable public CustomerReference getCustomer()

      The Buyer who owns the Quote.

      Returns:
      customer
    • getCustomerGroup

      @Nullable public CustomerGroupReference 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

      @Nullable public ZonedDateTime getValidTo()

      Expiration date for the Quote.

      Returns:
      validTo
    • getSellerComment

      @Nullable public String getSellerComment()

      Message from the Seller included in the offer.

      Returns:
      sellerComment
    • getBuyerComment

      @Nullable public String getBuyerComment()

      Message from the Buyer included in the renegotiation request.

      Returns:
      buyerComment
    • getStore

      @Nullable public StoreKeyReference getStore()

      The Store to which the Buyer belongs.

      Returns:
      store
    • getLineItems

      public List<LineItem> getLineItems()

      The Line Items for which the Quote is requested.

      Returns:
      lineItems
    • getCustomLineItems

      public List<CustomLineItem> getCustomLineItems()

      The Custom Line Items for which the Quote is requested.

      Returns:
      customLineItems
    • getTotalPrice

      public TypedMoney getTotalPrice()

      Sum of all totalPrice fields of the lineItems and customLineItems, as well as the price field of shippingInfo (if it exists). totalPrice may or may not include the taxes: it depends on the taxRate.includedInPrice property of each price.

      Returns:
      totalPrice
    • getTaxedPrice

      @Nullable public TaxedPrice getTaxedPrice()

      Not set until the shipping address is set. Will be set automatically in the Platform TaxMode. For the External 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

      @Nullable public Address getShippingAddress()

      Used to determine the eligible ShippingMethods and rates as well as the tax rate of the Line Items.

      Returns:
      shippingAddress
    • getBillingAddress

      @Nullable public Address getBillingAddress()

      Address used for invoicing.

      Returns:
      billingAddress
    • getInventoryMode

      @Nullable public InventoryMode getInventoryMode()

      Inventory mode of the Cart referenced in the QuoteRequestDraft.

      Returns:
      inventoryMode
    • getTaxMode

      public TaxMode getTaxMode()

      Tax mode of the Cart referenced in the QuoteRequestDraft.

      Returns:
      taxMode
    • getTaxRoundingMode

      public RoundingMode getTaxRoundingMode()

      When calculating taxes for taxedPrice, the selected mode is used for rounding.

      Returns:
      taxRoundingMode
    • getTaxCalculationMode

      public TaxCalculationMode getTaxCalculationMode()

      When calculating taxes for taxedPrice, the selected mode is used for calculating the price with LineItemLevel (horizontally) or UnitPriceLevel (vertically) calculation mode.

      Returns:
      taxCalculationMode
    • getCountry

      @Nullable public String getCountry()

      Used for Product Variant price selection.

      Returns:
      country
    • getShippingInfo

      @Nullable public ShippingInfo getShippingInfo()

      Set automatically once the ShippingMethod is set.

      Returns:
      shippingInfo
    • getPaymentInfo

      @Nullable public PaymentInfo getPaymentInfo()

      Log of payment transactions related to the Quote.

      Returns:
      paymentInfo
    • getShippingRateInput

      @Nullable public ShippingRateInput getShippingRateInput()

      Used to select a ShippingRatePriceTier.

      Returns:
      shippingRateInput
    • getItemShippingAddresses

      @Nullable public List<Address> 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's shippingAddress is used for this.

      Returns:
      itemShippingAddresses
    • getDirectDiscounts

      @Nullable public List<DirectDiscount> getDirectDiscounts()

      Discounts that are only valid for the Quote and cannot be associated to any other Cart or Order.

      Returns:
      directDiscounts
    • getCustom

      @Nullable public CustomFields getCustom()

      Custom Fields on the Quote.

      Returns:
      custom
    • getQuoteState

      public QuoteState getQuoteState()

      Predefined states tracking the status of the Quote.

      Returns:
      quoteState
    • getState

      @Nullable public StateReference getState()

      State of the Quote. This reference can point to a State in a custom workflow.

      Returns:
      state
    • getPurchaseOrderNumber

      @Nullable public 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

      @Nullable public BusinessUnitKeyReference getBusinessUnit()

      The BusinessUnit for the Quote.

      Returns:
      businessUnit
    • build

      public Quote build()
      builds Quote with checking for non-null required values
      Specified by:
      build in interface Builder<Quote>
      Returns:
      Quote
    • buildUnchecked

      public Quote buildUnchecked()
      builds Quote without checking for non-null required values
      Returns:
      Quote
    • of

      public static QuoteBuilder of()
      factory method for an instance of QuoteBuilder
      Returns:
      builder
    • of

      public static QuoteBuilder of(Quote template)
      create builder for Quote instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder