View Source Stripe.Quote (Striped v0.1.0)
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.
Link to this section Summary
Functions
Accepts the specified quote.
Cancels the quote.
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.
Finalizes the quote.
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. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
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.
Download the PDF for a finalized quote
Retrieves the quote with the given ID.
A quote models prices and services for a customer.
Link to this section Types
@type t() :: %Stripe.Quote{ amount_subtotal: integer(), amount_total: integer(), application: (binary() | term() | term()) | nil, application_fee_amount: integer() | nil, application_fee_percent: term() | nil, automatic_tax: term(), collection_method: binary(), computed: term(), created: integer(), currency: binary() | nil, customer: (binary() | Stripe.Customer.t() | Stripe.DeletedCustomer.t()) | nil, default_tax_rates: term(), description: binary() | nil, discounts: term(), expires_at: integer(), footer: binary() | nil, from_quote: term() | nil, header: binary() | nil, id: binary(), invoice: (binary() | Stripe.Invoice.t() | Stripe.DeletedInvoice.t()) | nil, invoice_settings: term() | nil, line_items: term(), livemode: boolean(), metadata: term(), number: binary() | nil, object: binary(), on_behalf_of: (binary() | Stripe.Account.t()) | nil, status: binary(), status_transitions: term(), subscription: (binary() | Stripe.Subscription.t()) | nil, subscription_data: term(), subscription_schedule: (binary() | Stripe.SubscriptionSchedule.t()) | nil, test_clock: (binary() | Stripe.TestHelpers.TestClock.t()) | nil, total_details: term(), transfer_data: term() | nil }
The quote type.
application_fee_percentA non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote.computedlivemodeHas the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.collection_methodEithercharge_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. Defaults tocharge_automatically.line_itemsA list of items the customer is being quoted for.metadataSet 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.subscription_datadescriptionA description that will be displayed on the quote PDF.footerA footer that will be displayed on the quote PDF.headerA header that will be displayed on the quote PDF.subscription_scheduleThe subscription schedule that was created or updated from this quote.on_behalf_ofThe account on behalf of which to charge. See the Connect documentation for details.customerThe customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed.invoiceThe invoice that was created from this quote.applicationID of the Connect Application that created the quote.objectString representing the object's type. Objects of the same type share the same value.invoice_settingsAll invoices will be billed using the specified settings.total_detailsexpires_atThe date on which the quote will be canceled if inopenordraftstatus. Measured in seconds since the Unix epoch.status_transitionstest_clockID of the test clock this quote belongs to.automatic_taxcurrencyThree-letter ISO currency code, in lowercase. Must be a supported currency.createdTime at which the object was created. Measured in seconds since the Unix epoch.discountsThe discounts applied to this quote.amount_subtotalTotal before any discounts or taxes are applied.amount_totalTotal after discounts and taxes are applied.subscriptionThe subscription that was created or updated from this quote.statusThe status of the quote.from_quoteDetails of the quote that was cloned. See the cloning documentation for more details.numberA unique number that identifies this particular quote. This number is assigned once the quote is finalized.application_fee_amountThe 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.transfer_dataThe 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.idUnique identifier for the object.default_tax_ratesThe tax rates applied to this quote.
Link to this section Functions
@spec accept(client :: term(), quote :: binary(), params :: map()) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Accepts the specified quote.
Details
- Method:
post - Path:
/v1/quotes/{quote}/accept
@spec cancel(client :: term(), quote :: binary(), params :: map()) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Cancels the quote.
Details
- Method:
post - Path:
/v1/quotes/{quote}/cancel
@spec create(client :: term(), params :: map()) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
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.
Details
- Method:
post - Path:
/v1/quotes
@spec finalize_quote(client :: term(), quote :: binary(), params :: map()) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Finalizes the quote.
Details
- Method:
post - Path:
/v1/quotes/{quote}/finalize
@spec list(client :: term(), params :: map()) :: {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Returns a list of your quotes.
Details
- Method:
get - Path:
/v1/quotes
Query parameters
:customerstring:ending_beforestring:expandarray of: string:limitinteger:starting_afterstring:statusstring:test_clockstring
@spec list_computed_upfront_line_items( client :: term(), quote :: binary(), params :: map() ) :: {:ok, Stripe.List.t(Stripe.Item.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
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.
Details
- Method:
get - Path:
/v1/quotes/{quote}/computed_upfront_line_items
Query parameters
:ending_beforestring:expandarray of: string:limitinteger:starting_afterstring
@spec list_line_items(client :: term(), quote :: binary(), params :: map()) :: {:ok, Stripe.List.t(Stripe.Item.t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
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.
Details
- Method:
get - Path:
/v1/quotes/{quote}/line_items
Query parameters
:ending_beforestring:expandarray of: string:limitinteger:starting_afterstring
@spec pdf(client :: term(), quote :: binary(), params :: map()) :: {:ok, []} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Download the PDF for a finalized quote
Details
- Method:
get - Path:
/v1/quotes/{quote}/pdf
Query parameters
:expandarray of: string
@spec retrieve(client :: term(), quote :: binary(), params :: map()) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
Retrieves the quote with the given ID.
Details
- Method:
get - Path:
/v1/quotes/{quote}
Query parameters
:expandarray of: string
@spec update(client :: term(), quote :: binary(), params :: map()) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}
A quote models prices and services for a customer.
Details
- Method:
post - Path:
/v1/quotes/{quote}