Class QuoteRequestImpl

java.lang.Object
com.commercetools.api.models.quote_request.QuoteRequestImpl
All Implemented Interfaces:
BaseResource, QuoteRequest, WithKey, io.vrap.rmf.base.client.ModelBase

public class QuoteRequestImpl extends Object implements QuoteRequest, io.vrap.rmf.base.client.ModelBase
QuoteRequest
  • Constructor Details

    • QuoteRequestImpl

      public QuoteRequestImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Unique identifier of the QuoteRequest.

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

      public Long getVersion()

      Current version of the QuoteRequest.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface QuoteRequest
      Returns:
      version
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

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

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

      public ZonedDateTime getLastModifiedAt()

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

      Specified by:
      getLastModifiedAt in interface BaseResource
      Specified by:
      getLastModifiedAt in interface QuoteRequest
      Returns:
      lastModifiedAt
    • getKey

      public String getKey()

      User-defined unique identifier of the QuoteRequest.

      Specified by:
      getKey in interface QuoteRequest
      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getLastModifiedBy

      public LastModifiedBy getLastModifiedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getLastModifiedBy in interface QuoteRequest
      Returns:
      lastModifiedBy
    • getCreatedBy

      public CreatedBy getCreatedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getCreatedBy in interface QuoteRequest
      Returns:
      createdBy
    • getQuoteRequestState

      public QuoteRequestState getQuoteRequestState()

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

      Specified by:
      getQuoteRequestState in interface QuoteRequest
      Returns:
      quoteRequestState
    • getComment

      public String getComment()

      Message from the Buyer included in the Quote Request.

      Specified by:
      getComment in interface QuoteRequest
      Returns:
      comment
    • getCustomer

      public CustomerReference getCustomer()

      The Buyer who owns the request.

      Specified by:
      getCustomer in interface QuoteRequest
      Returns:
      customer
    • getCustomerGroup

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

      Specified by:
      getCustomerGroup in interface QuoteRequest
      Returns:
      customerGroup
    • getStore

      public StoreKeyReference getStore()

      The Store to which the Buyer belongs.

      Specified by:
      getStore in interface QuoteRequest
      Returns:
      store
    • getLineItems

      public List<LineItem> getLineItems()

      The Line Items for which a Quote is requested.

      Specified by:
      getLineItems in interface QuoteRequest
      Returns:
      lineItems
    • getCustomLineItems

      public List<CustomLineItem> getCustomLineItems()

      The Custom Line Items for which a Quote is requested.

      Specified by:
      getCustomLineItems in interface QuoteRequest
      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.

      Specified by:
      getTotalPrice in interface QuoteRequest
      Returns:
      totalPrice
    • getTaxedPrice

      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.

      Specified by:
      getTaxedPrice in interface QuoteRequest
      Returns:
      taxedPrice
    • getShippingAddress

      public Address getShippingAddress()

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

      Specified by:
      getShippingAddress in interface QuoteRequest
      Returns:
      shippingAddress
    • getBillingAddress

      public Address getBillingAddress()

      Address used for invoicing.

      Specified by:
      getBillingAddress in interface QuoteRequest
      Returns:
      billingAddress
    • getInventoryMode

      public InventoryMode getInventoryMode()

      Inventory mode of the Cart referenced in the QuoteRequestDraft.

      Specified by:
      getInventoryMode in interface QuoteRequest
      Returns:
      inventoryMode
    • getTaxMode

      public TaxMode getTaxMode()

      Tax mode of the Cart referenced in the QuoteRequestDraft.

      Specified by:
      getTaxMode in interface QuoteRequest
      Returns:
      taxMode
    • getTaxRoundingMode

      public RoundingMode getTaxRoundingMode()

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

      Specified by:
      getTaxRoundingMode in interface QuoteRequest
      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.

      Specified by:
      getTaxCalculationMode in interface QuoteRequest
      Returns:
      taxCalculationMode
    • getCountry

      public String getCountry()

      Used for Product Variant price selection.

      Specified by:
      getCountry in interface QuoteRequest
      Returns:
      country
    • getShippingInfo

      public ShippingInfo getShippingInfo()

      Set automatically once the ShippingMethod is set.

      Specified by:
      getShippingInfo in interface QuoteRequest
      Returns:
      shippingInfo
    • getPaymentInfo

      public PaymentInfo getPaymentInfo()

      Log of payment transactions related to the Quote.

      Specified by:
      getPaymentInfo in interface QuoteRequest
      Returns:
      paymentInfo
    • getShippingRateInput

      public ShippingRateInput getShippingRateInput()

      Used to select a ShippingRatePriceTier.

      Specified by:
      getShippingRateInput in interface QuoteRequest
      Returns:
      shippingRateInput
    • getItemShippingAddresses

      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.

      Specified by:
      getItemShippingAddresses in interface QuoteRequest
      Returns:
      itemShippingAddresses
    • getDirectDiscounts

      public List<DirectDiscount> getDirectDiscounts()

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

      Specified by:
      getDirectDiscounts in interface QuoteRequest
      Returns:
      directDiscounts
    • getCustom

      public CustomFields getCustom()

      Custom Fields of the Quote Request.

      Specified by:
      getCustom in interface QuoteRequest
      Returns:
      custom
    • getState

      public StateReference getState()

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

      Specified by:
      getState in interface QuoteRequest
      Returns:
      state
    • getPurchaseOrderNumber

      public String getPurchaseOrderNumber()

      Identifier for a purchase order, usually in a B2B context. The Purchase Order Number is typically entered by the Buyer.

      Specified by:
      getPurchaseOrderNumber in interface QuoteRequest
      Returns:
      purchaseOrderNumber
    • getCart

      public CartReference getCart()

      The Cart from which a Quote is requested.

      Specified by:
      getCart in interface QuoteRequest
      Returns:
      cart
    • getBusinessUnit

      public BusinessUnitKeyReference getBusinessUnit()

      The BusinessUnit for the Quote Request.

      Specified by:
      getBusinessUnit in interface QuoteRequest
      Returns:
      businessUnit
    • setId

      public void setId(String id)
      Description copied from interface: QuoteRequest

      Unique identifier of the QuoteRequest.

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

      public void setVersion(Long version)
      Description copied from interface: QuoteRequest

      Current version of the QuoteRequest.

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

      public void setCreatedAt(ZonedDateTime createdAt)
      Description copied from interface: QuoteRequest

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

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

      public void setLastModifiedAt(ZonedDateTime lastModifiedAt)
      Description copied from interface: QuoteRequest

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

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

      public void setKey(String key)
      Description copied from interface: QuoteRequest

      User-defined unique identifier of the QuoteRequest.

      Specified by:
      setKey in interface QuoteRequest
      Parameters:
      key - value to be set
    • setLastModifiedBy

      public void setLastModifiedBy(LastModifiedBy lastModifiedBy)
      Description copied from interface: QuoteRequest

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setLastModifiedBy in interface QuoteRequest
      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      public void setCreatedBy(CreatedBy createdBy)
      Description copied from interface: QuoteRequest

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setCreatedBy in interface QuoteRequest
      Parameters:
      createdBy - value to be set
    • setQuoteRequestState

      public void setQuoteRequestState(QuoteRequestState quoteRequestState)
      Description copied from interface: QuoteRequest

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

      Specified by:
      setQuoteRequestState in interface QuoteRequest
      Parameters:
      quoteRequestState - value to be set
    • setComment

      public void setComment(String comment)
      Description copied from interface: QuoteRequest

      Message from the Buyer included in the Quote Request.

      Specified by:
      setComment in interface QuoteRequest
      Parameters:
      comment - value to be set
    • setCustomer

      public void setCustomer(CustomerReference customer)
      Description copied from interface: QuoteRequest

      The Buyer who owns the request.

      Specified by:
      setCustomer in interface QuoteRequest
      Parameters:
      customer - value to be set
    • setCustomerGroup

      public void setCustomerGroup(CustomerGroupReference customerGroup)
      Description copied from interface: QuoteRequest

      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.

      Specified by:
      setCustomerGroup in interface QuoteRequest
      Parameters:
      customerGroup - value to be set
    • setStore

      public void setStore(StoreKeyReference store)
      Description copied from interface: QuoteRequest

      The Store to which the Buyer belongs.

      Specified by:
      setStore in interface QuoteRequest
      Parameters:
      store - value to be set
    • setLineItems

      public void setLineItems(LineItem... lineItems)
      Description copied from interface: QuoteRequest

      The Line Items for which a Quote is requested.

      Specified by:
      setLineItems in interface QuoteRequest
      Parameters:
      lineItems - values to be set
    • setLineItems

      public void setLineItems(List<LineItem> lineItems)
      Description copied from interface: QuoteRequest

      The Line Items for which a Quote is requested.

      Specified by:
      setLineItems in interface QuoteRequest
      Parameters:
      lineItems - values to be set
    • setCustomLineItems

      public void setCustomLineItems(CustomLineItem... customLineItems)
      Description copied from interface: QuoteRequest

      The Custom Line Items for which a Quote is requested.

      Specified by:
      setCustomLineItems in interface QuoteRequest
      Parameters:
      customLineItems - values to be set
    • setCustomLineItems

      public void setCustomLineItems(List<CustomLineItem> customLineItems)
      Description copied from interface: QuoteRequest

      The Custom Line Items for which a Quote is requested.

      Specified by:
      setCustomLineItems in interface QuoteRequest
      Parameters:
      customLineItems - values to be set
    • setTotalPrice

      public void setTotalPrice(TypedMoney totalPrice)
      Description copied from interface: QuoteRequest

      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.

      Specified by:
      setTotalPrice in interface QuoteRequest
      Parameters:
      totalPrice - value to be set
    • setTaxedPrice

      public void setTaxedPrice(TaxedPrice taxedPrice)
      Description copied from interface: QuoteRequest

      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.

      Specified by:
      setTaxedPrice in interface QuoteRequest
      Parameters:
      taxedPrice - value to be set
    • setShippingAddress

      public void setShippingAddress(Address shippingAddress)
      Description copied from interface: QuoteRequest

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

      Specified by:
      setShippingAddress in interface QuoteRequest
      Parameters:
      shippingAddress - value to be set
    • setBillingAddress

      public void setBillingAddress(Address billingAddress)
      Description copied from interface: QuoteRequest

      Address used for invoicing.

      Specified by:
      setBillingAddress in interface QuoteRequest
      Parameters:
      billingAddress - value to be set
    • setInventoryMode

      public void setInventoryMode(InventoryMode inventoryMode)
      Description copied from interface: QuoteRequest

      Inventory mode of the Cart referenced in the QuoteRequestDraft.

      Specified by:
      setInventoryMode in interface QuoteRequest
      Parameters:
      inventoryMode - value to be set
    • setTaxMode

      public void setTaxMode(TaxMode taxMode)
      Description copied from interface: QuoteRequest

      Tax mode of the Cart referenced in the QuoteRequestDraft.

      Specified by:
      setTaxMode in interface QuoteRequest
      Parameters:
      taxMode - value to be set
    • setTaxRoundingMode

      public void setTaxRoundingMode(RoundingMode taxRoundingMode)
      Description copied from interface: QuoteRequest

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

      Specified by:
      setTaxRoundingMode in interface QuoteRequest
      Parameters:
      taxRoundingMode - value to be set
    • setTaxCalculationMode

      public void setTaxCalculationMode(TaxCalculationMode taxCalculationMode)
      Description copied from interface: QuoteRequest

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

      Specified by:
      setTaxCalculationMode in interface QuoteRequest
      Parameters:
      taxCalculationMode - value to be set
    • setCountry

      public void setCountry(String country)
      Description copied from interface: QuoteRequest

      Used for Product Variant price selection.

      Specified by:
      setCountry in interface QuoteRequest
      Parameters:
      country - value to be set
    • setShippingInfo

      public void setShippingInfo(ShippingInfo shippingInfo)
      Description copied from interface: QuoteRequest

      Set automatically once the ShippingMethod is set.

      Specified by:
      setShippingInfo in interface QuoteRequest
      Parameters:
      shippingInfo - value to be set
    • setPaymentInfo

      public void setPaymentInfo(PaymentInfo paymentInfo)
      Description copied from interface: QuoteRequest

      Log of payment transactions related to the Quote.

      Specified by:
      setPaymentInfo in interface QuoteRequest
      Parameters:
      paymentInfo - value to be set
    • setShippingRateInput

      public void setShippingRateInput(ShippingRateInput shippingRateInput)
      Description copied from interface: QuoteRequest

      Used to select a ShippingRatePriceTier.

      Specified by:
      setShippingRateInput in interface QuoteRequest
      Parameters:
      shippingRateInput - value to be set
    • setItemShippingAddresses

      public void setItemShippingAddresses(Address... itemShippingAddresses)
      Description copied from interface: QuoteRequest

      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.

      Specified by:
      setItemShippingAddresses in interface QuoteRequest
      Parameters:
      itemShippingAddresses - values to be set
    • setItemShippingAddresses

      public void setItemShippingAddresses(List<Address> itemShippingAddresses)
      Description copied from interface: QuoteRequest

      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.

      Specified by:
      setItemShippingAddresses in interface QuoteRequest
      Parameters:
      itemShippingAddresses - values to be set
    • setDirectDiscounts

      public void setDirectDiscounts(DirectDiscount... directDiscounts)
      Description copied from interface: QuoteRequest

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

      Specified by:
      setDirectDiscounts in interface QuoteRequest
      Parameters:
      directDiscounts - values to be set
    • setDirectDiscounts

      public void setDirectDiscounts(List<DirectDiscount> directDiscounts)
      Description copied from interface: QuoteRequest

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

      Specified by:
      setDirectDiscounts in interface QuoteRequest
      Parameters:
      directDiscounts - values to be set
    • setCustom

      public void setCustom(CustomFields custom)
      Description copied from interface: QuoteRequest

      Custom Fields of the Quote Request.

      Specified by:
      setCustom in interface QuoteRequest
      Parameters:
      custom - value to be set
    • setState

      public void setState(StateReference state)
      Description copied from interface: QuoteRequest

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

      Specified by:
      setState in interface QuoteRequest
      Parameters:
      state - value to be set
    • setPurchaseOrderNumber

      public void setPurchaseOrderNumber(String purchaseOrderNumber)
      Description copied from interface: QuoteRequest

      Identifier for a purchase order, usually in a B2B context. The Purchase Order Number is typically entered by the Buyer.

      Specified by:
      setPurchaseOrderNumber in interface QuoteRequest
      Parameters:
      purchaseOrderNumber - value to be set
    • setCart

      public void setCart(CartReference cart)
      Description copied from interface: QuoteRequest

      The Cart from which a Quote is requested.

      Specified by:
      setCart in interface QuoteRequest
      Parameters:
      cart - value to be set
    • setBusinessUnit

      public void setBusinessUnit(BusinessUnitKeyReference businessUnit)
      Description copied from interface: QuoteRequest

      The BusinessUnit for the Quote Request.

      Specified by:
      setBusinessUnit in interface QuoteRequest
      Parameters:
      businessUnit - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object