Interface Quote

All Superinterfaces:
BaseResource, Customizable<Quote>, DomainResource<Quote>, Identifiable<Quote>, QuoteMixin, Referencable<Quote>, ResourceIdentifiable<Quote>, Versioned<Quote>, WithKey

Quote
Example to create an instance using the builder pattern

     Quote quote = Quote.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .quoteRequest(quoteRequestBuilder -> quoteRequestBuilder)
             .stagedQuote(stagedQuoteBuilder -> stagedQuoteBuilder)
             .plusLineItems(lineItemsBuilder -> lineItemsBuilder)
             .plusCustomLineItems(customLineItemsBuilder -> customLineItemsBuilder)
             .totalPrice(totalPriceBuilder -> totalPriceBuilder)
             .taxMode(TaxMode.PLATFORM)
             .taxRoundingMode(RoundingMode.HALF_EVEN)
             .taxCalculationMode(TaxCalculationMode.LINE_ITEM_LEVEL)
             .quoteState(QuoteState.PENDING)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Quote.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface DomainResource<Quote>
      Specified by:
      getId in interface Identifiable<Quote>
      Specified by:
      getId in interface Versioned<Quote>
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the Quote.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<Quote>
      Specified by:
      getVersion in interface Versioned<Quote>
      Returns:
      version
    • getKey

      String getKey()

      User-defined unique identifier of the Quote.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

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

      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

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

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      IDs and references that last modified the Quote.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      IDs and references that created the Quote.

      Returns:
      createdBy
    • getQuoteRequest

      @NotNull @Valid @NotNull @Valid QuoteRequestReference getQuoteRequest()

      Quote Request related to the Quote.

      Returns:
      quoteRequest
    • getStagedQuote

      @NotNull @Valid @NotNull @Valid StagedQuoteReference getStagedQuote()

      Staged Quote related to the Quote.

      Returns:
      stagedQuote
    • getCustomer

      @Valid @Valid CustomerReference getCustomer()

      The Buyer who owns the Quote.

      Returns:
      customer
    • getCustomerGroup

      @Valid @Valid 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

      ZonedDateTime getValidTo()

      Expiration date for the Quote.

      Returns:
      validTo
    • getSellerComment

      String getSellerComment()

      Message from the Seller included in the offer.

      Returns:
      sellerComment
    • getBuyerComment

      String getBuyerComment()

      Message from the Buyer included in the renegotiation request.

      Returns:
      buyerComment
    • getStore

      @Valid @Valid StoreKeyReference getStore()

      The Store to which the Buyer belongs.

      Returns:
      store
    • getLineItems

      @NotNull @Valid @NotNull @Valid List<LineItem> getLineItems()

      The Line Items for which the Quote is requested.

      Returns:
      lineItems
    • getCustomLineItems

      @NotNull @Valid @NotNull @Valid List<CustomLineItem> getCustomLineItems()

      The Custom Line Items for which the Quote is requested.

      Returns:
      customLineItems
    • getTotalPrice

      @NotNull @Valid @NotNull @Valid 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

      @Valid @Valid 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

      @Valid @Valid Address getShippingAddress()

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

      Returns:
      shippingAddress
    • getBillingAddress

      @Valid @Valid Address getBillingAddress()

      Address used for invoicing.

      Returns:
      billingAddress
    • getInventoryMode

      InventoryMode getInventoryMode()

      Inventory mode of the Cart referenced in the QuoteRequestDraft.

      Returns:
      inventoryMode
    • getTaxMode

      @NotNull @NotNull TaxMode getTaxMode()

      Tax mode of the Cart referenced in the QuoteRequestDraft.

      Returns:
      taxMode
    • getTaxRoundingMode

      @NotNull @NotNull RoundingMode getTaxRoundingMode()

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

      Returns:
      taxRoundingMode
    • getTaxCalculationMode

      @NotNull @NotNull 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

      String getCountry()

      Used for Product Variant price selection.

      Returns:
      country
    • getShippingInfo

      @Valid @Valid ShippingInfo getShippingInfo()

      Set automatically once the ShippingMethod is set.

      Returns:
      shippingInfo
    • getPaymentInfo

      @Valid @Valid PaymentInfo getPaymentInfo()

      Log of payment transactions related to the Quote.

      Returns:
      paymentInfo
    • getShippingRateInput

      @Valid @Valid ShippingRateInput getShippingRateInput()

      Used to select a ShippingRatePriceTier.

      Returns:
      shippingRateInput
    • getItemShippingAddresses

      @Valid @Valid 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

      @Valid @Valid List<DirectDiscount> getDirectDiscounts()

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

      Returns:
      directDiscounts
    • getCustom

      @Valid @Valid CustomFields getCustom()

      Custom Fields on the Quote.

      Specified by:
      getCustom in interface Customizable<Quote>
      Returns:
      custom
    • getQuoteState

      @NotNull @NotNull QuoteState getQuoteState()

      Predefined states tracking the status of the Quote.

      Returns:
      quoteState
    • getState

      @Valid @Valid StateReference getState()

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

      Returns:
      state
    • getPurchaseOrderNumber

      String getPurchaseOrderNumber()

      The Purchase Order Number is typically set by the Buyer on a QuoteRequest to track the purchase order during the quote and order flow.

      Returns:
      purchaseOrderNumber
    • getBusinessUnit

      @Valid @Valid BusinessUnitKeyReference getBusinessUnit()

      The BusinessUnit for the Quote.

      Returns:
      businessUnit
    • setId

      void setId(String id)

      Unique identifier of the Quote.

      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the Quote.

      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the Quote.

      Parameters:
      key - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

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

      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

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

      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      IDs and references that last modified the Quote.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      IDs and references that created the Quote.

      Parameters:
      createdBy - value to be set
    • setQuoteRequest

      void setQuoteRequest(QuoteRequestReference quoteRequest)

      Quote Request related to the Quote.

      Parameters:
      quoteRequest - value to be set
    • setStagedQuote

      void setStagedQuote(StagedQuoteReference stagedQuote)

      Staged Quote related to the Quote.

      Parameters:
      stagedQuote - value to be set
    • setCustomer

      void setCustomer(CustomerReference customer)

      The Buyer who owns the Quote.

      Parameters:
      customer - value to be set
    • setCustomerGroup

      void setCustomerGroup(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
    • setValidTo

      void setValidTo(ZonedDateTime validTo)

      Expiration date for the Quote.

      Parameters:
      validTo - value to be set
    • setSellerComment

      void setSellerComment(String sellerComment)

      Message from the Seller included in the offer.

      Parameters:
      sellerComment - value to be set
    • setBuyerComment

      void setBuyerComment(String buyerComment)

      Message from the Buyer included in the renegotiation request.

      Parameters:
      buyerComment - value to be set
    • setStore

      void setStore(StoreKeyReference store)

      The Store to which the Buyer belongs.

      Parameters:
      store - value to be set
    • setLineItems

      void setLineItems(LineItem... lineItems)

      The Line Items for which the Quote is requested.

      Parameters:
      lineItems - values to be set
    • setLineItems

      void setLineItems(List<LineItem> lineItems)

      The Line Items for which the Quote is requested.

      Parameters:
      lineItems - values to be set
    • setCustomLineItems

      void setCustomLineItems(CustomLineItem... customLineItems)

      The Custom Line Items for which the Quote is requested.

      Parameters:
      customLineItems - values to be set
    • setCustomLineItems

      void setCustomLineItems(List<CustomLineItem> customLineItems)

      The Custom Line Items for which the Quote is requested.

      Parameters:
      customLineItems - values to be set
    • setTotalPrice

      void setTotalPrice(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
    • setTaxedPrice

      void setTaxedPrice(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
    • setShippingAddress

      void setShippingAddress(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
    • setBillingAddress

      void setBillingAddress(Address billingAddress)

      Address used for invoicing.

      Parameters:
      billingAddress - value to be set
    • setInventoryMode

      void setInventoryMode(InventoryMode inventoryMode)

      Inventory mode of the Cart referenced in the QuoteRequestDraft.

      Parameters:
      inventoryMode - value to be set
    • setTaxMode

      void setTaxMode(TaxMode taxMode)

      Tax mode of the Cart referenced in the QuoteRequestDraft.

      Parameters:
      taxMode - value to be set
    • setTaxRoundingMode

      void setTaxRoundingMode(RoundingMode taxRoundingMode)

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

      Parameters:
      taxRoundingMode - value to be set
    • setTaxCalculationMode

      void setTaxCalculationMode(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
    • setCountry

      void setCountry(String country)

      Used for Product Variant price selection.

      Parameters:
      country - value to be set
    • setShippingInfo

      void setShippingInfo(ShippingInfo shippingInfo)

      Set automatically once the ShippingMethod is set.

      Parameters:
      shippingInfo - value to be set
    • setPaymentInfo

      void setPaymentInfo(PaymentInfo paymentInfo)

      Log of payment transactions related to the Quote.

      Parameters:
      paymentInfo - value to be set
    • setShippingRateInput

      void setShippingRateInput(ShippingRateInput shippingRateInput)

      Used to select a ShippingRatePriceTier.

      Parameters:
      shippingRateInput - value to be set
    • setItemShippingAddresses

      void setItemShippingAddresses(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 - values to be set
    • setItemShippingAddresses

      void setItemShippingAddresses(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 - values to be set
    • setDirectDiscounts

      void setDirectDiscounts(DirectDiscount... directDiscounts)

      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

      void setDirectDiscounts(List<DirectDiscount> directDiscounts)

      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

      void setCustom(CustomFields custom)

      Custom Fields on the Quote.

      Specified by:
      setCustom in interface Customizable<Quote>
      Parameters:
      custom - value to be set
    • setQuoteState

      void setQuoteState(QuoteState quoteState)

      Predefined states tracking the status of the Quote.

      Parameters:
      quoteState - value to be set
    • setState

      void setState(StateReference state)

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

      Parameters:
      state - value to be set
    • setPurchaseOrderNumber

      void setPurchaseOrderNumber(String purchaseOrderNumber)

      The Purchase Order Number is typically set by the Buyer on a QuoteRequest to track the purchase order during the quote and order flow.

      Parameters:
      purchaseOrderNumber - value to be set
    • setBusinessUnit

      void setBusinessUnit(BusinessUnitKeyReference businessUnit)

      The BusinessUnit for the Quote.

      Parameters:
      businessUnit - value to be set
    • of

      static Quote of()
      factory method
      Returns:
      instance of Quote
    • of

      static Quote of(Quote template)
      factory method to create a shallow copy Quote
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static Quote deepCopy(@Nullable Quote template)
      factory method to create a deep copy of Quote
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static QuoteBuilder builder()
      builder factory method for Quote
      Returns:
      builder
    • builder

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

      default <T> T withQuote(Function<Quote,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • referenceTypeId

      static ReferenceTypeId referenceTypeId()
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<Quote> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference