Class QuoteImpl

java.lang.Object
com.commercetools.api.models.quote.QuoteImpl
All Implemented Interfaces:
BaseResource, Customizable<Quote>, DomainResource<Quote>, Identifiable<Quote>, Quote, QuoteMixin, Referencable<Quote>, ResourceIdentifiable<Quote>, Versioned<Quote>, WithKey, io.vrap.rmf.base.client.ModelBase

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

    • QuoteImpl

      public QuoteImpl()
      create empty instance
  • Method Details

    • getId

      public 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 Quote
      Specified by:
      getId in interface Versioned<Quote>
      Returns:
      id
    • getVersion

      public 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 Quote
      Specified by:
      getVersion in interface Versioned<Quote>
      Returns:
      version
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

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

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

      public ZonedDateTime getLastModifiedAt()

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

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

      public String getKey()

      User-defined unique identifier of the Quote.

      Specified by:
      getKey in interface Quote
      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 Quote
      Returns:
      lastModifiedBy
    • getCreatedBy

      public CreatedBy getCreatedBy()

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

      Specified by:
      getCreatedBy in interface Quote
      Returns:
      createdBy
    • getQuoteRequest

      public QuoteRequestReference getQuoteRequest()

      Quote Request related to the Quote.

      Specified by:
      getQuoteRequest in interface Quote
      Returns:
      quoteRequest
    • getStagedQuote

      public StagedQuoteReference getStagedQuote()

      Staged Quote related to the Quote.

      Specified by:
      getStagedQuote in interface Quote
      Returns:
      stagedQuote
    • getCustomer

      public CustomerReference getCustomer()

      The Buyer who owns the Quote.

      Specified by:
      getCustomer in interface Quote
      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 creation. Used for Product Variant price selection.

      Specified by:
      getCustomerGroup in interface Quote
      Returns:
      customerGroup
    • getValidTo

      public ZonedDateTime getValidTo()

      Expiration date for the Quote.

      Specified by:
      getValidTo in interface Quote
      Returns:
      validTo
    • getSellerComment

      public String getSellerComment()

      Message from the Seller included in the offer.

      Specified by:
      getSellerComment in interface Quote
      Returns:
      sellerComment
    • getBuyerComment

      public String getBuyerComment()

      Message from the Buyer included in the renegotiation request.

      Specified by:
      getBuyerComment in interface Quote
      Returns:
      buyerComment
    • getStore

      public StoreKeyReference getStore()

      The Store to which the Buyer belongs.

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

      public List<LineItem> getLineItems()

      The Line Items for which the Quote is requested.

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

      public List<CustomLineItem> getCustomLineItems()

      The Custom Line Items for which the Quote is requested.

      Specified by:
      getCustomLineItems in interface Quote
      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 Quote
      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 Quote
      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 Quote
      Returns:
      shippingAddress
    • getBillingAddress

      public Address getBillingAddress()

      Address used for invoicing.

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

      public InventoryMode getInventoryMode()

      Inventory mode of the Cart referenced in the QuoteRequestDraft.

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

      public TaxMode getTaxMode()

      Tax mode of the Cart referenced in the QuoteRequestDraft.

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

      public RoundingMode getTaxRoundingMode()

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

      Specified by:
      getTaxRoundingMode in interface Quote
      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 Quote
      Returns:
      taxCalculationMode
    • getCountry

      public String getCountry()

      Used for Product Variant price selection.

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

      public ShippingInfo getShippingInfo()

      Set automatically once the ShippingMethod is set.

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

      public PaymentInfo getPaymentInfo()

      Log of payment transactions related to the Quote.

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

      public ShippingRateInput getShippingRateInput()

      Used to select a ShippingRatePriceTier.

      Specified by:
      getShippingRateInput in interface Quote
      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 Quote
      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 Quote
      Returns:
      directDiscounts
    • getCustom

      public CustomFields getCustom()

      Custom Fields on the Quote.

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

      public QuoteState getQuoteState()

      Predefined states tracking the status of the Quote.

      Specified by:
      getQuoteState in interface Quote
      Returns:
      quoteState
    • getState

      public StateReference getState()

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

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

      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.

      Specified by:
      getPurchaseOrderNumber in interface Quote
      Returns:
      purchaseOrderNumber
    • getBusinessUnit

      public BusinessUnitKeyReference getBusinessUnit()

      The BusinessUnit for the Quote.

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

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

      Unique identifier of the Quote.

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

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

      Current version of the Quote.

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

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

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

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

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

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

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

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

      User-defined unique identifier of the Quote.

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

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

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

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

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

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

      Specified by:
      setCreatedBy in interface Quote
      Parameters:
      createdBy - value to be set
    • setQuoteRequest

      public void setQuoteRequest(QuoteRequestReference quoteRequest)
      Description copied from interface: Quote

      Quote Request related to the Quote.

      Specified by:
      setQuoteRequest in interface Quote
      Parameters:
      quoteRequest - value to be set
    • setStagedQuote

      public void setStagedQuote(StagedQuoteReference stagedQuote)
      Description copied from interface: Quote

      Staged Quote related to the Quote.

      Specified by:
      setStagedQuote in interface Quote
      Parameters:
      stagedQuote - value to be set
    • setCustomer

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

      The Buyer who owns the Quote.

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

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

      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.

      Specified by:
      setCustomerGroup in interface Quote
      Parameters:
      customerGroup - value to be set
    • setValidTo

      public void setValidTo(ZonedDateTime validTo)
      Description copied from interface: Quote

      Expiration date for the Quote.

      Specified by:
      setValidTo in interface Quote
      Parameters:
      validTo - value to be set
    • setSellerComment

      public void setSellerComment(String sellerComment)
      Description copied from interface: Quote

      Message from the Seller included in the offer.

      Specified by:
      setSellerComment in interface Quote
      Parameters:
      sellerComment - value to be set
    • setBuyerComment

      public void setBuyerComment(String buyerComment)
      Description copied from interface: Quote

      Message from the Buyer included in the renegotiation request.

      Specified by:
      setBuyerComment in interface Quote
      Parameters:
      buyerComment - value to be set
    • setStore

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

      The Store to which the Buyer belongs.

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

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

      The Line Items for which the Quote is requested.

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

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

      The Line Items for which the Quote is requested.

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

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

      The Custom Line Items for which the Quote is requested.

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

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

      The Custom Line Items for which the Quote is requested.

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

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

      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 Quote
      Parameters:
      totalPrice - value to be set
    • setTaxedPrice

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

      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 Quote
      Parameters:
      taxedPrice - value to be set
    • setShippingAddress

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

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

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

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

      Address used for invoicing.

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

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

      Inventory mode of the Cart referenced in the QuoteRequestDraft.

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

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

      Tax mode of the Cart referenced in the QuoteRequestDraft.

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

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

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

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

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

      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 Quote
      Parameters:
      taxCalculationMode - value to be set
    • setCountry

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

      Used for Product Variant price selection.

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

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

      Set automatically once the ShippingMethod is set.

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

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

      Log of payment transactions related to the Quote.

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

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

      Used to select a ShippingRatePriceTier.

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

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

      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 Quote
      Parameters:
      itemShippingAddresses - values to be set
    • setItemShippingAddresses

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

      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 Quote
      Parameters:
      itemShippingAddresses - values to be set
    • setDirectDiscounts

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

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

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

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

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

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

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

      Custom Fields on the Quote.

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

      public void setQuoteState(QuoteState quoteState)
      Description copied from interface: Quote

      Predefined states tracking the status of the Quote.

      Specified by:
      setQuoteState in interface Quote
      Parameters:
      quoteState - value to be set
    • setState

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

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

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

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

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

      Specified by:
      setPurchaseOrderNumber in interface Quote
      Parameters:
      purchaseOrderNumber - value to be set
    • setBusinessUnit

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

      The BusinessUnit for the Quote.

      Specified by:
      setBusinessUnit in interface Quote
      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