Package com.stripe.model
Class Quote
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.Quote
- All Implemented Interfaces:
HasId,MetadataStore<Quote>,StripeActiveObject,StripeObjectInterface
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFor more details about AutomaticTax, please refer to the API Reference.static classFor more details about Computed, please refer to the API Reference.static classFor more details about FromQuote, please refer to the API Reference.static classFor more details about InvoiceSettings, please refer to the API Reference.static classFor more details about StatusTransitions, please refer to the API Reference.static classFor more details about SubscriptionData, please refer to the API Reference.static classFor more details about TotalDetails, please refer to the API Reference.static classFor more details about TransferData, please refer to the API Reference.Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod -
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept()Accepts the specified quote.accept(RequestOptions options) Accepts the specified quote.accept(QuoteAcceptParams params) Accepts the specified quote.accept(QuoteAcceptParams params, RequestOptions options) Accepts the specified quote.Accepts the specified quote.accept(Map<String, Object> params, RequestOptions options) Accepts the specified quote.cancel()Cancels the quote.cancel(RequestOptions options) Cancels the quote.cancel(QuoteCancelParams params) Cancels the quote.cancel(QuoteCancelParams params, RequestOptions options) Cancels the quote.Cancels the quote.cancel(Map<String, Object> params, RequestOptions options) Cancels the quote.protected booleanstatic Quotecreate(QuoteCreateParams params) A quote models prices and services for a customer.static Quotecreate(QuoteCreateParams params, RequestOptions options) A quote models prices and services for a customer.static QuoteA quote models prices and services for a customer.static Quotecreate(Map<String, Object> params, RequestOptions options) A quote models prices and services for a customer.booleanFinalizes the quote.finalizeQuote(RequestOptions options) Finalizes the quote.Finalizes the quote.finalizeQuote(QuoteFinalizeQuoteParams params, RequestOptions options) Finalizes the quote.finalizeQuote(Map<String, Object> params) Finalizes the quote.finalizeQuote(Map<String, Object> params, RequestOptions options) Finalizes the quote.Total before any discounts or taxes are applied.Total after discounts and taxes are applied.Get ID of expandableapplicationobject.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.A non-negative decimal between 0 and 100, with at most two decimal places.Get expandedapplication.Eithercharge_automatically, orsend_invoice.Time at which the object was created.Three-letter ISO currency code, in lowercase.Get ID of expandablecustomerobject.The account representing the customer who received this quote.Get expandedcustomer.Get expandeddefaultTaxRates.Get IDs of expandabledefaultTaxRatesobject list.A description that will be displayed on the quote PDF.Get expandeddiscounts.Get IDs of expandablediscountsobject list.The date on which the quote will be canceled if inopenordraftstatus.A footer that will be displayed on the quote PDF.Details of the quote that was cloned.A header that will be displayed on the quote PDF.getId()Unique identifier for the object.Get ID of expandableinvoiceobject.Get expandedinvoice.A list of items the customer is being quoted for.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.Set of key-value pairs that you can attach to an object.A unique number that identifies this particular quote.String representing the object's type.Get ID of expandableonBehalfOfobject.Get expandedonBehalfOf.The status of the quote.Get ID of expandablesubscriptionobject.Get expandedsubscription.Get ID of expandablesubscriptionScheduleobject.Get expandedsubscriptionSchedule.Get ID of expandabletestClockobject.Get expandedtestClock.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.inthashCode()static QuoteCollectionlist(QuoteListParams params) Returns a list of your quotes.static QuoteCollectionlist(QuoteListParams params, RequestOptions options) Returns a list of your quotes.static QuoteCollectionReturns a list of your quotes.static QuoteCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of your quotes.When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items.When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items.listComputedUpfrontLineItems(QuoteListComputedUpfrontLineItemsParams params, RequestOptions options) When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items.listComputedUpfrontLineItems(Map<String, Object> params) When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items.listComputedUpfrontLineItems(Map<String, Object> params, RequestOptions options) When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items.When retrieving a quote, there is an includable line_items property containing the first handful of those items.When retrieving a quote, there is an includable line_items property containing the first handful of those items.listLineItems(QuoteListLineItemsParams params, RequestOptions options) When retrieving a quote, there is an includable line_items property containing the first handful of those items.listLineItems(Map<String, Object> params) When retrieving a quote, there is an includable line_items property containing the first handful of those items.listLineItems(Map<String, Object> params, RequestOptions options) When retrieving a quote, there is an includable line_items property containing the first handful of those items.pdf()Download the PDF for a finalized quote.pdf(QuotePdfParams params) Download the PDF for a finalized quote.pdf(QuotePdfParams params, RequestOptions options) Download the PDF for a finalized quote.Download the PDF for a finalized quote.pdf(Map<String, Object> params, RequestOptions options) Download the PDF for a finalized quote.static QuoteRetrieves the quote with the given ID.static Quoteretrieve(String quote, RequestOptions options) Retrieves the quote with the given ID.static Quoteretrieve(String quote, QuoteRetrieveParams params, RequestOptions options) Retrieves the quote with the given ID.static QuoteRetrieves the quote with the given ID.voidsetAmountSubtotal(Long amountSubtotal) Total before any discounts or taxes are applied.voidsetAmountTotal(Long amountTotal) Total after discounts and taxes are applied.voidsetApplication(String id) voidsetApplicationFeeAmount(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.voidsetApplicationFeePercent(BigDecimal applicationFeePercent) A non-negative decimal between 0 and 100, with at most two decimal places.voidsetApplicationObject(Application expandableObject) voidsetAutomaticTax(Quote.AutomaticTax automaticTax) voidsetCollectionMethod(String collectionMethod) Eithercharge_automatically, orsend_invoice.voidsetComputed(Quote.Computed computed) voidsetCreated(Long created) Time at which the object was created.voidsetCurrency(String currency) Three-letter ISO currency code, in lowercase.voidsetCustomer(String id) voidsetCustomerAccount(String customerAccount) The account representing the customer who received this quote.voidsetCustomerObject(Customer expandableObject) voidsetDefaultTaxRateObjects(List<TaxRate> objs) voidsetDefaultTaxRates(List<String> ids) voidsetDescription(String description) A description that will be displayed on the quote PDF.voidsetDiscountObjects(List<Discount> objs) voidsetDiscounts(List<String> ids) voidsetExpiresAt(Long expiresAt) The date on which the quote will be canceled if inopenordraftstatus.voidA footer that will be displayed on the quote PDF.voidsetFromQuote(Quote.FromQuote fromQuote) Details of the quote that was cloned.voidA header that will be displayed on the quote PDF.voidUnique identifier for the object.voidsetInvoice(String id) voidsetInvoiceObject(Invoice expandableObject) voidsetInvoiceSettings(Quote.InvoiceSettings invoiceSettings) voidsetLineItems(LineItemCollection lineItems) A list of items the customer is being quoted for.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidA unique number that identifies this particular quote.voidString representing the object's type.voidsetOnBehalfOf(String id) voidsetOnBehalfOfObject(Account expandableObject) voidsetResponseGetter(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.voidThe status of the quote.voidsetStatusTransitions(Quote.StatusTransitions statusTransitions) voidvoidsetSubscriptionData(Quote.SubscriptionData subscriptionData) voidsetSubscriptionObject(Subscription expandableObject) voidvoidsetSubscriptionScheduleObject(SubscriptionSchedule expandableObject) voidsetTestClock(String id) voidsetTestClockObject(TestClock expandableObject) voidsetTotalDetails(Quote.TotalDetails totalDetails) voidsetTransferData(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.update(QuoteUpdateParams params) A quote models prices and services for a customer.update(QuoteUpdateParams params, RequestOptions options) A quote models prices and services for a customer.A quote models prices and services for a customer.update(Map<String, Object> params, RequestOptions options) A quote models prices and services for a customer.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
Quote
public Quote()
-
-
Method Details
-
getApplication
Get ID of expandableapplicationobject. -
setApplication
-
getApplicationObject
Get expandedapplication. -
setApplicationObject
-
getCustomer
Get ID of expandablecustomerobject. -
setCustomer
-
getCustomerObject
Get expandedcustomer. -
setCustomerObject
-
getInvoice
Get ID of expandableinvoiceobject. -
setInvoice
-
getInvoiceObject
Get expandedinvoice. -
setInvoiceObject
-
getOnBehalfOf
Get ID of expandableonBehalfOfobject. -
setOnBehalfOf
-
getOnBehalfOfObject
Get expandedonBehalfOf. -
setOnBehalfOfObject
-
getSubscription
Get ID of expandablesubscriptionobject. -
setSubscription
-
getSubscriptionObject
Get expandedsubscription. -
setSubscriptionObject
-
getSubscriptionSchedule
Get ID of expandablesubscriptionScheduleobject. -
setSubscriptionSchedule
-
getSubscriptionScheduleObject
Get expandedsubscriptionSchedule. -
setSubscriptionScheduleObject
-
getTestClock
Get ID of expandabletestClockobject. -
setTestClock
-
getTestClockObject
Get expandedtestClock. -
setTestClockObject
-
getDefaultTaxRates
Get IDs of expandabledefaultTaxRatesobject list. -
setDefaultTaxRates
-
getDefaultTaxRateObjects
Get expandeddefaultTaxRates. -
setDefaultTaxRateObjects
-
getDiscounts
Get IDs of expandablediscountsobject list. -
setDiscounts
-
getDiscountObjects
Get expandeddiscounts. -
setDiscountObjects
-
accept
Accepts the specified quote.- Throws:
StripeException
-
accept
Accepts the specified quote.- Throws:
StripeException
-
accept
Accepts the specified quote.- Throws:
StripeException
-
accept
Accepts the specified quote.- Throws:
StripeException
-
accept
Accepts the specified quote.- Throws:
StripeException
-
accept
Accepts the specified quote.- Throws:
StripeException
-
cancel
Cancels the quote.- Throws:
StripeException
-
cancel
Cancels the quote.- Throws:
StripeException
-
cancel
Cancels the quote.- Throws:
StripeException
-
cancel
Cancels the quote.- Throws:
StripeException
-
cancel
Cancels the quote.- Throws:
StripeException
-
cancel
Cancels the quote.- Throws:
StripeException
-
create
A quote models prices and services for a customer. Default options forheader,description,footer, andexpires_atcan be set in the dashboard via the quote template.- Throws:
StripeException
-
create
public static Quote create(Map<String, Object> params, RequestOptions options) throws StripeExceptionA quote models prices and services for a customer. Default options forheader,description,footer, andexpires_atcan be set in the dashboard via the quote template.- Throws:
StripeException
-
create
A quote models prices and services for a customer. Default options forheader,description,footer, andexpires_atcan be set in the dashboard via the quote template.- Throws:
StripeException
-
create
A quote models prices and services for a customer. Default options forheader,description,footer, andexpires_atcan be set in the dashboard via the quote template.- Throws:
StripeException
-
finalizeQuote
Finalizes the quote.- Throws:
StripeException
-
finalizeQuote
Finalizes the quote.- Throws:
StripeException
-
finalizeQuote
Finalizes the quote.- Throws:
StripeException
-
finalizeQuote
public Quote finalizeQuote(Map<String, Object> params, RequestOptions options) throws StripeExceptionFinalizes the quote.- Throws:
StripeException
-
finalizeQuote
Finalizes the quote.- Throws:
StripeException
-
finalizeQuote
public Quote finalizeQuote(QuoteFinalizeQuoteParams params, RequestOptions options) throws StripeException Finalizes the quote.- Throws:
StripeException
-
list
Returns a list of your quotes.- Throws:
StripeException
-
list
public static QuoteCollection list(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of your quotes.- Throws:
StripeException
-
list
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
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 StripeExceptionWhen 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 StripeExceptionWhen 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
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
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 StripeExceptionWhen 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
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
Download the PDF for a finalized quote. Explanation for special handling can be found here- Throws:
StripeException
-
pdf
Download the PDF for a finalized quote. Explanation for special handling can be found here- Throws:
StripeException
-
pdf
Download the PDF for a finalized quote. Explanation for special handling can be found here- Throws:
StripeException
-
pdf
Download the PDF for a finalized quote. Explanation for special handling can be found here- Throws:
StripeException
-
pdf
Download the PDF for a finalized quote. Explanation for special handling can be found here- Throws:
StripeException
-
retrieve
Retrieves the quote with the given ID.- Throws:
StripeException
-
retrieve
Retrieves the quote with the given ID.- Throws:
StripeException
-
retrieve
public static Quote retrieve(String quote, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves 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
A quote models prices and services for a customer.- Specified by:
updatein interfaceMetadataStore<Quote>- Throws:
StripeException
-
update
A quote models prices and services for a customer.- Specified by:
updatein interfaceMetadataStore<Quote>- Throws:
StripeException
-
update
A quote models prices and services for a customer.- Throws:
StripeException
-
update
A quote models prices and services for a customer.- Throws:
StripeException
-
setResponseGetter
Description copied from interface:StripeActiveObjectMethod is used by the containing object orStripeResponseGetterimplementations to set theStripeResponseGetterinstance used to make further requests.- Specified by:
setResponseGetterin interfaceStripeActiveObject- Overrides:
setResponseGetterin classApiResource- Parameters:
responseGetter- theStripeResponseGetterinstance to use for making further requests.
-
getAmountSubtotal
Total before any discounts or taxes are applied. -
getAmountTotal
Total after discounts and taxes are applied. -
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
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
-
getCollectionMethod
Eithercharge_automatically, orsend_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 asactive. Defaults tocharge_automatically.One of
charge_automatically, orsend_invoice. -
getComputed
-
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
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
A description that will be displayed on the quote PDF. -
getExpiresAt
The date on which the quote will be canceled if inopenordraftstatus. Measured in seconds since the Unix epoch. -
getFromQuote
Details of the quote that was cloned. See the cloning documentation for more details. -
getHeader
A header that will be displayed on the quote PDF. -
getInvoiceSettings
-
getLineItems
A list of items the customer is being quoted for. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getNumber
A unique number that identifies this particular quote. This number is assigned once the quote is finalized. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
quote. -
getStatus
The status of the quote.One of
accepted,canceled,draft, oropen. -
getStatusTransitions
-
getSubscriptionData
-
getTotalDetails
-
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
Total before any discounts or taxes are applied. -
setAmountTotal
Total after discounts and taxes are applied. -
setApplicationFeeAmount
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
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
-
setCollectionMethod
Eithercharge_automatically, orsend_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 asactive. Defaults tocharge_automatically.One of
charge_automatically, orsend_invoice. -
setComputed
-
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setCustomerAccount
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
A description that will be displayed on the quote PDF. -
setExpiresAt
The date on which the quote will be canceled if inopenordraftstatus. Measured in seconds since the Unix epoch. -
setFromQuote
Details of the quote that was cloned. See the cloning documentation for more details. -
setHeader
A header that will be displayed on the quote PDF. -
setId
Unique identifier for the object. -
setInvoiceSettings
-
setLineItems
A list of items the customer is being quoted for. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
setMetadata
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
A unique number that identifies this particular quote. This number is assigned once the quote is finalized. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
quote. -
setStatus
The status of the quote.One of
accepted,canceled,draft, oropen. -
setStatusTransitions
-
setSubscriptionData
-
setTotalDetails
-
setTransferData
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
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
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:
getMetadatain interfaceMetadataStore<Quote>
-