Class Quote

All Implemented Interfaces:
HasId, MetadataStore<Quote>, StripeActiveObject, StripeObjectInterface

public class Quote extends ApiResource implements HasId, MetadataStore<Quote>
A Quote is a way to model prices that you'd like to provide to a customer. Once accepted, it will automatically create an invoice, subscription or subscription schedule.
  • Constructor Details

    • Quote

      public Quote()
  • Method Details

    • getApplication

      public String getApplication()
      Get ID of expandable application object.
    • setApplication

      public void setApplication(String id)
    • getApplicationObject

      public Application getApplicationObject()
      Get expanded application.
    • setApplicationObject

      public void setApplicationObject(Application expandableObject)
    • getCustomer

      public String getCustomer()
      Get ID of expandable customer object.
    • setCustomer

      public void setCustomer(String id)
    • getCustomerObject

      public Customer getCustomerObject()
      Get expanded customer.
    • setCustomerObject

      public void setCustomerObject(Customer expandableObject)
    • getInvoice

      public String getInvoice()
      Get ID of expandable invoice object.
    • setInvoice

      public void setInvoice(String id)
    • getInvoiceObject

      public Invoice getInvoiceObject()
      Get expanded invoice.
    • setInvoiceObject

      public void setInvoiceObject(Invoice expandableObject)
    • getOnBehalfOf

      public String getOnBehalfOf()
      Get ID of expandable onBehalfOf object.
    • setOnBehalfOf

      public void setOnBehalfOf(String id)
    • getOnBehalfOfObject

      public Account getOnBehalfOfObject()
      Get expanded onBehalfOf.
    • setOnBehalfOfObject

      public void setOnBehalfOfObject(Account expandableObject)
    • getSubscription

      public String getSubscription()
      Get ID of expandable subscription object.
    • setSubscription

      public void setSubscription(String id)
    • getSubscriptionObject

      public Subscription getSubscriptionObject()
      Get expanded subscription.
    • setSubscriptionObject

      public void setSubscriptionObject(Subscription expandableObject)
    • getSubscriptionSchedule

      public String getSubscriptionSchedule()
      Get ID of expandable subscriptionSchedule object.
    • setSubscriptionSchedule

      public void setSubscriptionSchedule(String id)
    • getSubscriptionScheduleObject

      public SubscriptionSchedule getSubscriptionScheduleObject()
      Get expanded subscriptionSchedule.
    • setSubscriptionScheduleObject

      public void setSubscriptionScheduleObject(SubscriptionSchedule expandableObject)
    • getTestClock

      public String getTestClock()
      Get ID of expandable testClock object.
    • setTestClock

      public void setTestClock(String id)
    • getTestClockObject

      public TestClock getTestClockObject()
      Get expanded testClock.
    • setTestClockObject

      public void setTestClockObject(TestClock expandableObject)
    • getDefaultTaxRates

      public List<String> getDefaultTaxRates()
      Get IDs of expandable defaultTaxRates object list.
    • setDefaultTaxRates

      public void setDefaultTaxRates(List<String> ids)
    • getDefaultTaxRateObjects

      public List<TaxRate> getDefaultTaxRateObjects()
      Get expanded defaultTaxRates.
    • setDefaultTaxRateObjects

      public void setDefaultTaxRateObjects(List<TaxRate> objs)
    • getDiscounts

      public List<String> getDiscounts()
      Get IDs of expandable discounts object list.
    • setDiscounts

      public void setDiscounts(List<String> ids)
    • getDiscountObjects

      public List<Discount> getDiscountObjects()
      Get expanded discounts.
    • setDiscountObjects

      public void setDiscountObjects(List<Discount> objs)
    • accept

      public Quote accept() throws StripeException
      Accepts the specified quote.
      Throws:
      StripeException
    • accept

      public Quote accept(RequestOptions options) throws StripeException
      Accepts the specified quote.
      Throws:
      StripeException
    • accept

      public Quote accept(Map<String,Object> params) throws StripeException
      Accepts the specified quote.
      Throws:
      StripeException
    • accept

      public Quote accept(Map<String,Object> params, RequestOptions options) throws StripeException
      Accepts the specified quote.
      Throws:
      StripeException
    • accept

      public Quote accept(QuoteAcceptParams params) throws StripeException
      Accepts the specified quote.
      Throws:
      StripeException
    • accept

      public Quote accept(QuoteAcceptParams params, RequestOptions options) throws StripeException
      Accepts the specified quote.
      Throws:
      StripeException
    • cancel

      public Quote cancel() throws StripeException
      Cancels the quote.
      Throws:
      StripeException
    • cancel

      public Quote cancel(RequestOptions options) throws StripeException
      Cancels the quote.
      Throws:
      StripeException
    • cancel

      public Quote cancel(Map<String,Object> params) throws StripeException
      Cancels the quote.
      Throws:
      StripeException
    • cancel

      public Quote cancel(Map<String,Object> params, RequestOptions options) throws StripeException
      Cancels the quote.
      Throws:
      StripeException
    • cancel

      public Quote cancel(QuoteCancelParams params) throws StripeException
      Cancels the quote.
      Throws:
      StripeException
    • cancel

      public Quote cancel(QuoteCancelParams params, RequestOptions options) throws StripeException
      Cancels the quote.
      Throws:
      StripeException
    • create

      public static Quote create(Map<String,Object> params) throws StripeException
      A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.
      Throws:
      StripeException
    • create

      public static Quote create(Map<String,Object> params, RequestOptions options) throws StripeException
      A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.
      Throws:
      StripeException
    • create

      public static Quote create(QuoteCreateParams params) throws StripeException
      A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.
      Throws:
      StripeException
    • create

      public static Quote create(QuoteCreateParams params, RequestOptions options) throws StripeException
      A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.
      Throws:
      StripeException
    • finalizeQuote

      public Quote finalizeQuote() throws StripeException
      Finalizes the quote.
      Throws:
      StripeException
    • finalizeQuote

      public Quote finalizeQuote(RequestOptions options) throws StripeException
      Finalizes the quote.
      Throws:
      StripeException
    • finalizeQuote

      public Quote finalizeQuote(Map<String,Object> params) throws StripeException
      Finalizes the quote.
      Throws:
      StripeException
    • finalizeQuote

      public Quote finalizeQuote(Map<String,Object> params, RequestOptions options) throws StripeException
      Finalizes the quote.
      Throws:
      StripeException
    • finalizeQuote

      public Quote finalizeQuote(QuoteFinalizeQuoteParams params) throws StripeException
      Finalizes the quote.
      Throws:
      StripeException
    • finalizeQuote

      public Quote finalizeQuote(QuoteFinalizeQuoteParams params, RequestOptions options) throws StripeException
      Finalizes the quote.
      Throws:
      StripeException
    • list

      public static QuoteCollection list(Map<String,Object> params) throws StripeException
      Returns a list of your quotes.
      Throws:
      StripeException
    • list

      public static QuoteCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      Returns a list of your quotes.
      Throws:
      StripeException
    • list

      public static QuoteCollection list(QuoteListParams params) throws StripeException
      Returns a list of your quotes.
      Throws:
      StripeException
    • list

      public static QuoteCollection list(QuoteListParams params, RequestOptions options) throws StripeException
      Returns a list of your quotes.
      Throws:
      StripeException
    • listComputedUpfrontLineItems

      public LineItemCollection listComputedUpfrontLineItems() throws StripeException
      When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
      Throws:
      StripeException
    • listComputedUpfrontLineItems

      public LineItemCollection listComputedUpfrontLineItems(Map<String,Object> params) throws StripeException
      When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
      Throws:
      StripeException
    • listComputedUpfrontLineItems

      public LineItemCollection listComputedUpfrontLineItems(Map<String,Object> params, RequestOptions options) throws StripeException
      When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
      Throws:
      StripeException
    • listComputedUpfrontLineItems

      public LineItemCollection listComputedUpfrontLineItems(QuoteListComputedUpfrontLineItemsParams params) throws StripeException
      When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
      Throws:
      StripeException
    • listComputedUpfrontLineItems

      public LineItemCollection listComputedUpfrontLineItems(QuoteListComputedUpfrontLineItemsParams params, RequestOptions options) throws StripeException
      When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
      Throws:
      StripeException
    • listLineItems

      public LineItemCollection listLineItems() throws StripeException
      When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
      Throws:
      StripeException
    • listLineItems

      public LineItemCollection listLineItems(Map<String,Object> params) throws StripeException
      When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
      Throws:
      StripeException
    • listLineItems

      public LineItemCollection listLineItems(Map<String,Object> params, RequestOptions options) throws StripeException
      When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
      Throws:
      StripeException
    • listLineItems

      public LineItemCollection listLineItems(QuoteListLineItemsParams params) throws StripeException
      When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
      Throws:
      StripeException
    • listLineItems

      public LineItemCollection listLineItems(QuoteListLineItemsParams params, RequestOptions options) throws StripeException
      When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
      Throws:
      StripeException
    • pdf

      public InputStream pdf() throws StripeException
      Download the PDF for a finalized quote. Explanation for special handling can be found here
      Throws:
      StripeException
    • pdf

      public InputStream pdf(Map<String,Object> params) throws StripeException
      Download the PDF for a finalized quote. Explanation for special handling can be found here
      Throws:
      StripeException
    • pdf

      public InputStream pdf(Map<String,Object> params, RequestOptions options) throws StripeException
      Download the PDF for a finalized quote. Explanation for special handling can be found here
      Throws:
      StripeException
    • pdf

      public InputStream pdf(QuotePdfParams params) throws StripeException
      Download the PDF for a finalized quote. Explanation for special handling can be found here
      Throws:
      StripeException
    • pdf

      public InputStream pdf(QuotePdfParams params, RequestOptions options) throws StripeException
      Download the PDF for a finalized quote. Explanation for special handling can be found here
      Throws:
      StripeException
    • retrieve

      public static Quote retrieve(String quote) throws StripeException
      Retrieves the quote with the given ID.
      Throws:
      StripeException
    • retrieve

      public static Quote retrieve(String quote, RequestOptions options) throws StripeException
      Retrieves the quote with the given ID.
      Throws:
      StripeException
    • retrieve

      public static Quote retrieve(String quote, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves the quote with the given ID.
      Throws:
      StripeException
    • retrieve

      public static Quote retrieve(String quote, QuoteRetrieveParams params, RequestOptions options) throws StripeException
      Retrieves the quote with the given ID.
      Throws:
      StripeException
    • update

      public Quote update(Map<String,Object> params) throws StripeException
      A quote models prices and services for a customer.
      Specified by:
      update in interface MetadataStore<Quote>
      Throws:
      StripeException
    • update

      public Quote update(Map<String,Object> params, RequestOptions options) throws StripeException
      A quote models prices and services for a customer.
      Specified by:
      update in interface MetadataStore<Quote>
      Throws:
      StripeException
    • update

      public Quote update(QuoteUpdateParams params) throws StripeException
      A quote models prices and services for a customer.
      Throws:
      StripeException
    • update

      public Quote update(QuoteUpdateParams params, RequestOptions options) throws StripeException
      A quote models prices and services for a customer.
      Throws:
      StripeException
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      Description copied from interface: StripeActiveObject
      Method is used by the containing object or StripeResponseGetter implementations to set the StripeResponseGetter instance used to make further requests.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getAmountSubtotal

      public Long getAmountSubtotal()
      Total before any discounts or taxes are applied.
    • getAmountTotal

      public Long getAmountTotal()
      Total after discounts and taxes are applied.
    • getApplicationFeeAmount

      public Long getApplicationFeeAmount()
      The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.
    • getApplicationFeePercent

      public BigDecimal getApplicationFeePercent()
      A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.
    • getAutomaticTax

      public Quote.AutomaticTax getAutomaticTax()
    • getCollectionMethod

      public String getCollectionMethod()
      Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active. Defaults to charge_automatically.

      One of charge_automatically, or send_invoice.

    • getComputed

      public Quote.Computed getComputed()
    • getCreated

      public Long getCreated()
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • getCurrency

      public String getCurrency()
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • getCustomerAccount

      public String getCustomerAccount()
      The account representing the customer who received this quote. A customer or account is required to finalize the quote. Once specified, you can't change it.
    • getDescription

      public String getDescription()
      A description that will be displayed on the quote PDF.
    • getExpiresAt

      public Long getExpiresAt()
      The date on which the quote will be canceled if in open or draft status. Measured in seconds since the Unix epoch.
    • getFooter

      public String getFooter()
      A footer that will be displayed on the quote PDF.
    • getFromQuote

      public Quote.FromQuote getFromQuote()
      Details of the quote that was cloned. See the cloning documentation for more details.
    • getHeader

      public String getHeader()
      A header that will be displayed on the quote PDF.
    • getInvoiceSettings

      public Quote.InvoiceSettings getInvoiceSettings()
    • getLineItems

      public LineItemCollection getLineItems()
      A list of items the customer is being quoted for.
    • getLivemode

      public Boolean getLivemode()
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • getNumber

      public String getNumber()
      A unique number that identifies this particular quote. This number is assigned once the quote is finalized.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to quote.

    • getStatus

      public String getStatus()
      The status of the quote.

      One of accepted, canceled, draft, or open.

    • getStatusTransitions

      public Quote.StatusTransitions getStatusTransitions()
    • getSubscriptionData

      public Quote.SubscriptionData getSubscriptionData()
    • getTotalDetails

      public Quote.TotalDetails getTotalDetails()
    • getTransferData

      public Quote.TransferData getTransferData()
      The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.
    • setAmountSubtotal

      public void setAmountSubtotal(Long amountSubtotal)
      Total before any discounts or taxes are applied.
    • setAmountTotal

      public void setAmountTotal(Long amountTotal)
      Total after discounts and taxes are applied.
    • setApplicationFeeAmount

      public void setApplicationFeeAmount(Long applicationFeeAmount)
      The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote.
    • setApplicationFeePercent

      public void setApplicationFeePercent(BigDecimal applicationFeePercent)
      A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.
    • setAutomaticTax

      public void setAutomaticTax(Quote.AutomaticTax automaticTax)
    • setCollectionMethod

      public void setCollectionMethod(String collectionMethod)
      Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as active. Defaults to charge_automatically.

      One of charge_automatically, or send_invoice.

    • setComputed

      public void setComputed(Quote.Computed computed)
    • setCreated

      public void setCreated(Long created)
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • setCurrency

      public void setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setCustomerAccount

      public void setCustomerAccount(String customerAccount)
      The account representing the customer who received this quote. A customer or account is required to finalize the quote. Once specified, you can't change it.
    • setDescription

      public void setDescription(String description)
      A description that will be displayed on the quote PDF.
    • setExpiresAt

      public void setExpiresAt(Long expiresAt)
      The date on which the quote will be canceled if in open or draft status. Measured in seconds since the Unix epoch.
    • setFooter

      public void setFooter(String footer)
      A footer that will be displayed on the quote PDF.
    • setFromQuote

      public void setFromQuote(Quote.FromQuote fromQuote)
      Details of the quote that was cloned. See the cloning documentation for more details.
    • setHeader

      public void setHeader(String header)
      A header that will be displayed on the quote PDF.
    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setInvoiceSettings

      public void setInvoiceSettings(Quote.InvoiceSettings invoiceSettings)
    • setLineItems

      public void setLineItems(LineItemCollection lineItems)
      A list of items the customer is being quoted for.
    • setLivemode

      public void setLivemode(Boolean livemode)
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • setMetadata

      public void setMetadata(Map<String,String> metadata)
      Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
    • setNumber

      public void setNumber(String number)
      A unique number that identifies this particular quote. This number is assigned once the quote is finalized.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to quote.

    • setStatus

      public void setStatus(String status)
      The status of the quote.

      One of accepted, canceled, draft, or open.

    • setStatusTransitions

      public void setStatusTransitions(Quote.StatusTransitions statusTransitions)
    • setSubscriptionData

      public void setSubscriptionData(Quote.SubscriptionData subscriptionData)
    • setTotalDetails

      public void setTotalDetails(Quote.TotalDetails totalDetails)
    • setTransferData

      public void setTransferData(Quote.TransferData transferData)
      The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices.
    • equals

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

      protected boolean canEqual(Object other)
    • hashCode

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

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId
    • getMetadata

      public Map<String,String> getMetadata()
      Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
      Specified by:
      getMetadata in interface MetadataStore<Quote>