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
Modifier and TypeClassDescriptionstatic class
static class
Get expandedaccount
.static class
The amount on which tax is calculated, in cents (or local equivalent).static class
static class
Get expandedaccount
.static class
static class
static class
The amount on which tax is calculated, in cents (or local equivalent).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_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
-
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 boolean
static Quote
create
(QuoteCreateParams params) A quote models prices and services for a customer.static Quote
create
(QuoteCreateParams params, RequestOptions options) A quote models prices and services for a customer.static Quote
A quote models prices and services for a customer.static Quote
create
(Map<String, Object> params, RequestOptions options) A quote models prices and services for a customer.boolean
Finalizes 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 expandableapplication
object.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 expandablecustomer
object.Get expandedcustomer
.Get expandeddefaultTaxRates
.Get IDs of expandabledefaultTaxRates
object list.A description that will be displayed on the quote PDF.Get expandeddiscounts
.Get IDs of expandablediscounts
object list.The date on which the quote will be canceled if inopen
ordraft
status.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 expandableinvoice
object.Get expandedinvoice
.A list of items the customer is being quoted for.Has the valuetrue
if the object exists in live mode or the valuefalse
if 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 expandableonBehalfOf
object.Get expandedonBehalfOf
.The status of the quote.Get ID of expandablesubscription
object.Get expandedsubscription
.Get ID of expandablesubscriptionSchedule
object.Get expandedsubscriptionSchedule
.Get ID of expandabletestClock
object.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.int
hashCode()
static QuoteCollection
list
(QuoteListParams params) Returns a list of your quotes.static QuoteCollection
list
(QuoteListParams params, RequestOptions options) Returns a list of your quotes.static QuoteCollection
Returns a list of your quotes.static QuoteCollection
list
(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 Quote
Retrieves the quote with the given ID.static Quote
retrieve
(String quote, RequestOptions options) Retrieves the quote with the given ID.static Quote
retrieve
(String quote, QuoteRetrieveParams params, RequestOptions options) Retrieves the quote with the given ID.static Quote
Retrieves the quote with the given ID.void
setAmountSubtotal
(Long amountSubtotal) Total before any discounts or taxes are applied.void
setAmountTotal
(Long amountTotal) Total after discounts and taxes are applied.void
setApplication
(String id) 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.void
setApplicationFeePercent
(BigDecimal applicationFeePercent) A non-negative decimal between 0 and 100, with at most two decimal places.void
setApplicationObject
(Application expandableObject) void
setAutomaticTax
(Quote.AutomaticTax automaticTax) void
setCollectionMethod
(String collectionMethod) Eithercharge_automatically
, orsend_invoice
.void
setComputed
(Quote.Computed computed) void
setCreated
(Long created) Time at which the object was created.void
setCurrency
(String currency) Three-letter ISO currency code, in lowercase.void
setCustomer
(String id) void
setCustomerObject
(Customer expandableObject) void
setDefaultTaxRateObjects
(List<TaxRate> objs) void
setDefaultTaxRates
(List<String> ids) void
setDescription
(String description) A description that will be displayed on the quote PDF.void
setDiscountObjects
(List<Discount> objs) void
setDiscounts
(List<String> ids) void
setExpiresAt
(Long expiresAt) The date on which the quote will be canceled if inopen
ordraft
status.void
A footer that will be displayed on the quote PDF.void
setFromQuote
(Quote.FromQuote fromQuote) Details of the quote that was cloned.void
A header that will be displayed on the quote PDF.void
Unique identifier for the object.void
setInvoice
(String id) void
setInvoiceObject
(Invoice expandableObject) void
setInvoiceSettings
(Quote.InvoiceSettings invoiceSettings) void
setLineItems
(LineItemCollection lineItems) A list of items the customer is being quoted for.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
A unique number that identifies this particular quote.void
String representing the object's type.void
setOnBehalfOf
(String id) void
setOnBehalfOfObject
(Account expandableObject) void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
The status of the quote.void
setStatusTransitions
(Quote.StatusTransitions statusTransitions) void
void
setSubscriptionData
(Quote.SubscriptionData subscriptionData) void
setSubscriptionObject
(Subscription expandableObject) void
void
setSubscriptionScheduleObject
(SubscriptionSchedule expandableObject) void
setTestClock
(String id) void
setTestClockObject
(TestClock expandableObject) void
setTotalDetails
(Quote.TotalDetails totalDetails) 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.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, setStripeResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
Quote
public Quote()
-
-
Method Details
-
getApplication
Get ID of expandableapplication
object. -
setApplication
-
getApplicationObject
Get expandedapplication
. -
setApplicationObject
-
getCustomer
Get ID of expandablecustomer
object. -
setCustomer
-
getCustomerObject
Get expandedcustomer
. -
setCustomerObject
-
getInvoice
Get ID of expandableinvoice
object. -
setInvoice
-
getInvoiceObject
Get expandedinvoice
. -
setInvoiceObject
-
getOnBehalfOf
Get ID of expandableonBehalfOf
object. -
setOnBehalfOf
-
getOnBehalfOfObject
Get expandedonBehalfOf
. -
setOnBehalfOfObject
-
getSubscription
Get ID of expandablesubscription
object. -
setSubscription
-
getSubscriptionObject
Get expandedsubscription
. -
setSubscriptionObject
-
getSubscriptionSchedule
Get ID of expandablesubscriptionSchedule
object. -
setSubscriptionSchedule
-
getSubscriptionScheduleObject
Get expandedsubscriptionSchedule
. -
setSubscriptionScheduleObject
-
getTestClock
Get ID of expandabletestClock
object. -
setTestClock
-
getTestClockObject
Get expandedtestClock
. -
setTestClockObject
-
getDefaultTaxRates
Get IDs of expandabledefaultTaxRates
object list. -
setDefaultTaxRates
-
getDefaultTaxRateObjects
Get expandeddefaultTaxRates
. -
setDefaultTaxRateObjects
-
getDiscounts
Get IDs of expandablediscounts
object 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_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 StripeExceptionA quote models prices and services for a customer. Default options forheader
,description
,footer
, andexpires_at
can 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_at
can 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_at
can 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:
update
in interfaceMetadataStore<Quote>
- Throws:
StripeException
-
update
A quote models prices and services for a customer.- Specified by:
update
in 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:StripeActiveObject
Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance 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. -
getDescription
A description that will be displayed on the quote PDF. -
getExpiresAt
The date on which the quote will be canceled if inopen
ordraft
status. 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 valuetrue
if the object exists in live mode or the valuefalse
if 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. -
setDescription
A description that will be displayed on the quote PDF. -
setExpiresAt
The date on which the quote will be canceled if inopen
ordraft
status. 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 valuetrue
if the object exists in live mode or the valuefalse
if 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:
getMetadata
in interfaceMetadataStore<Quote>
-