Interface QuoteRequest

All Superinterfaces:
BaseResource, WithKey

public interface QuoteRequest extends BaseResource, WithKey
QuoteRequest
Example to create an instance using the builder pattern

     QuoteRequest quoteRequest = QuoteRequest.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .quoteRequestState(QuoteRequestState.SUBMITTED)
             .customer(customerBuilder -> customerBuilder)
             .plusLineItems(lineItemsBuilder -> lineItemsBuilder)
             .plusCustomLineItems(customLineItemsBuilder -> customLineItemsBuilder)
             .totalPrice(totalPriceBuilder -> totalPriceBuilder)
             .taxMode(TaxMode.PLATFORM)
             .taxRoundingMode(RoundingMode.HALF_EVEN)
             .taxCalculationMode(TaxCalculationMode.LINE_ITEM_LEVEL)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the QuoteRequest.

      Specified by:
      getId in interface BaseResource
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the QuoteRequest.

      Specified by:
      getVersion in interface BaseResource
      Returns:
      version
    • getKey

      String getKey()

      User-defined unique identifier of the QuoteRequest.

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

      @NotNull @NotNull ZonedDateTime getCreatedAt()

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

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

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

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

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

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      IDs and references that last modified the QuoteRequest.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      IDs and references that created the QuoteRequest.

      Returns:
      createdBy
    • getQuoteRequestState

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

      @NotNull @Valid @NotNull @Valid CustomerReference getCustomer()

      The Buyer who owns the request.

      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 Request creation. Used for Product Variant price selection.

      Returns:
      customerGroup
    • 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 a Quote is requested.

      Returns:
      lineItems
    • getCustomLineItems

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

      The Custom Line Items for which a 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 of the Quote Request.

      Returns:
      custom
    • getState

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

      @Valid @Valid CartReference getCart()

      The Cart from which a Quote is requested.

      Returns:
      cart
    • getBusinessUnit

      @Valid @Valid BusinessUnitKeyReference getBusinessUnit()

      The BusinessUnit for the Quote Request.

      Returns:
      businessUnit
    • setId

      void setId(String id)

      Unique identifier of the QuoteRequest.

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

      void setVersion(Long version)

      Current version of the QuoteRequest.

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

      void setKey(String key)

      User-defined unique identifier of the QuoteRequest.

      Parameters:
      key - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the QuoteRequest 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 QuoteRequest 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 QuoteRequest.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      IDs and references that created the QuoteRequest.

      Parameters:
      createdBy - value to be set
    • setQuoteRequestState

      void setQuoteRequestState(QuoteRequestState quoteRequestState)

      Indicates the current state of the Quote Request in the negotiation process.

      Parameters:
      quoteRequestState - value to be set
    • setComment

      void setComment(String comment)

      Message from the Buyer included in the Quote Request.

      Parameters:
      comment - value to be set
    • setCustomer

      void setCustomer(CustomerReference customer)

      The Buyer who owns the request.

      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 Request creation. Used for Product Variant price selection.

      Parameters:
      customerGroup - 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 a Quote is requested.

      Parameters:
      lineItems - values to be set
    • setLineItems

      void setLineItems(List<LineItem> lineItems)

      The Line Items for which a Quote is requested.

      Parameters:
      lineItems - values to be set
    • setCustomLineItems

      void setCustomLineItems(CustomLineItem... customLineItems)

      The Custom Line Items for which a Quote is requested.

      Parameters:
      customLineItems - values to be set
    • setCustomLineItems

      void setCustomLineItems(List<CustomLineItem> customLineItems)

      The Custom Line Items for which a 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 of the Quote Request.

      Parameters:
      custom - value to be set
    • setState

      void setState(StateReference state)

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

      Parameters:
      state - value to be set
    • setPurchaseOrderNumber

      void setPurchaseOrderNumber(String purchaseOrderNumber)

      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

      void setCart(CartReference cart)

      The Cart from which a Quote is requested.

      Parameters:
      cart - value to be set
    • setBusinessUnit

      void setBusinessUnit(BusinessUnitKeyReference businessUnit)

      The BusinessUnit for the Quote Request.

      Parameters:
      businessUnit - value to be set
    • of

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

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

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

      static QuoteRequestBuilder builder()
      builder factory method for QuoteRequest
      Returns:
      builder
    • builder

      static QuoteRequestBuilder builder(QuoteRequest template)
      create builder for QuoteRequest instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withQuoteRequest

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

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