Class: Stripe::QuotePreviewInvoice
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::QuotePreviewInvoice
- Defined in:
- lib/stripe/resources/quote_preview_invoice.rb
Overview
Invoices are statements of amounts owed by a customer, and are either generated one-off, or generated periodically from a subscription.
They contain invoice items, and proration adjustments that may be caused by subscription upgrades/downgrades (if necessary).
If your invoice is configured to be billed through automatic charges, Stripe automatically finalizes your invoice and attempts payment. Note that finalizing the invoice, when automatic, does not happen immediately as the invoice is created. Stripe waits until one hour after the last webhook was successfully sent (or the last webhook timed out after failing). If you (and the platforms you may have connected to) have no webhooks configured, Stripe waits one hour after creation to finalize the invoice.
If your invoice is configured to be billed by sending an email, then based on your email settings, Stripe will email the invoice to your customer and await payment. These emails can contain a link to a hosted page to pay the invoice.
Stripe applies any customer credit on the account before determining the amount due for the invoice (i.e., the amount that will be actually charged). If the amount due for the invoice is less than Stripe's minimum allowed charge per currency, the invoice is automatically marked paid, and we add the amount due to the customer's credit balance which is applied to the next invoice.
More details on the customer's credit balance are here.
Related guide: Send invoices to customers
Defined Under Namespace
Classes: AmountsDue, AppliesTo, AutomaticTax, ConfirmationSecret, CustomField, CustomerAddress, CustomerBalance, CustomerShipping, CustomerTaxId, FromInvoice, Issuer, LastFinalizationError, Parent, PaymentSettings, Rendering, ShippingCost, ShippingDetails, StatusTransitions, ThresholdReason, TotalDiscountAmount, TotalMarginAmount, TotalPretaxCreditAmount, TotalTax
Constant Summary collapse
- OBJECT_NAME =
"quote_preview_invoice"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#account_country ⇒ Object
readonly
The country of the business associated with this invoice, most often the business creating the invoice.
-
#account_name ⇒ Object
readonly
The public name of the business associated with this invoice, most often the business creating the invoice.
-
#account_tax_ids ⇒ Object
readonly
The account tax IDs associated with the invoice.
-
#amount_due ⇒ Object
readonly
Final amount due at this time for this invoice.
-
#amount_overpaid ⇒ Object
readonly
Amount that was overpaid on the invoice.
-
#amount_paid ⇒ Object
readonly
The amount, in cents (or local equivalent), that was paid.
-
#amount_paid_off_stripe ⇒ Object
readonly
Amount, in cents (or local equivalent), that was paid on the invoice outside of Stripe.
-
#amount_remaining ⇒ Object
readonly
The difference between amount_due and amount_paid, in cents (or local equivalent).
-
#amount_shipping ⇒ Object
readonly
This is the sum of all the shipping amounts.
-
#amounts_due ⇒ Object
readonly
List of expected payments and corresponding due dates.
-
#application ⇒ Object
readonly
ID of the Connect Application that created the invoice.
-
#applies_to ⇒ Object
readonly
Attribute for field applies_to.
-
#attempt_count ⇒ Object
readonly
Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.
-
#attempted ⇒ Object
readonly
Whether an attempt has been made to pay the invoice.
-
#automatic_tax ⇒ Object
readonly
Attribute for field automatic_tax.
-
#automatically_finalizes_at ⇒ Object
readonly
The time when this invoice is currently scheduled to be automatically finalized.
-
#billing_reason ⇒ Object
readonly
Indicates the reason why the invoice was created.
-
#collection_method ⇒ Object
readonly
Either
charge_automatically, orsend_invoice. -
#confirmation_secret ⇒ Object
readonly
The confirmation secret associated with this invoice.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#currency ⇒ Object
readonly
Three-letter ISO currency code, in lowercase.
-
#custom_fields ⇒ Object
readonly
Custom fields displayed on the invoice.
-
#customer_account ⇒ Object
readonly
The ID of the account representing the customer to bill.
-
#customer_address ⇒ Object
readonly
The customer's address.
-
#customer_balance ⇒ Object
readonly
The customer balance amounts applied to this invoice.
-
#customer_email ⇒ Object
readonly
The customer's email.
-
#customer_name ⇒ Object
readonly
The customer's name.
-
#customer_phone ⇒ Object
readonly
The customer's phone number.
-
#customer_shipping ⇒ Object
readonly
The customer's shipping information.
-
#customer_tax_exempt ⇒ Object
readonly
The customer's tax exempt status.
-
#customer_tax_ids ⇒ Object
readonly
The customer's tax IDs.
-
#default_margins ⇒ Object
readonly
The margins applied to the invoice.
-
#default_payment_method ⇒ Object
readonly
ID of the default payment method for the invoice.
-
#default_source ⇒ Object
readonly
ID of the default payment source for the invoice.
-
#default_tax_rates ⇒ Object
readonly
The tax rates applied to this invoice, if any.
-
#description ⇒ Object
readonly
An arbitrary string attached to the object.
-
#discounts ⇒ Object
readonly
The discounts applied to the invoice.
-
#due_date ⇒ Object
readonly
The date on which payment for this invoice is due.
-
#effective_at ⇒ Object
readonly
The date when this invoice is in effect.
-
#ending_balance ⇒ Object
readonly
Ending customer balance after the invoice is finalized.
-
#footer ⇒ Object
readonly
Footer displayed on the invoice.
-
#from_invoice ⇒ Object
readonly
Details of the invoice that was cloned.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#issuer ⇒ Object
readonly
Attribute for field issuer.
-
#last_finalization_error ⇒ Object
readonly
The error encountered during the previous attempt to finalize the invoice.
-
#latest_revision ⇒ Object
readonly
The ID of the most recent non-draft revision of this invoice.
-
#lines ⇒ Object
readonly
The individual line items that make up the invoice.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is
true. -
#metadata ⇒ Object
readonly
Set of key-value pairs that you can attach to an object.
-
#next_payment_attempt ⇒ Object
readonly
The time at which payment will next be attempted.
-
#number ⇒ Object
readonly
A unique, identifying string that appears on emails sent to the customer for this invoice.
-
#object ⇒ Object
readonly
String representing the object's type.
-
#on_behalf_of ⇒ Object
readonly
The account (if any) for which the funds of the invoice payment are intended.
-
#parent ⇒ Object
readonly
The parent that generated this invoice.
-
#payment_settings ⇒ Object
readonly
Attribute for field payment_settings.
-
#payments ⇒ Object
readonly
Payments for this invoice.
-
#period_end ⇒ Object
readonly
The latest timestamp at which invoice items can be associated with this invoice.
-
#period_start ⇒ Object
readonly
The earliest timestamp at which invoice items can be associated with this invoice.
-
#post_payment_credit_notes_amount ⇒ Object
readonly
Total amount of all post-payment credit notes issued for this invoice.
-
#pre_payment_credit_notes_amount ⇒ Object
readonly
Total amount of all pre-payment credit notes issued for this invoice.
-
#receipt_number ⇒ Object
readonly
This is the transaction number that appears on email receipts sent for this invoice.
-
#rendering ⇒ Object
readonly
The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
-
#shipping_cost ⇒ Object
readonly
The details of the cost of shipping, including the ShippingRate applied on the invoice.
-
#shipping_details ⇒ Object
readonly
Shipping details for the invoice.
-
#starting_balance ⇒ Object
readonly
Starting customer balance before the invoice is finalized.
-
#statement_descriptor ⇒ Object
readonly
Extra information about an invoice for the customer's credit card statement.
-
#status ⇒ Object
readonly
The status of the invoice, one of
draft,open,paid,uncollectible, orvoid. -
#status_transitions ⇒ Object
readonly
Attribute for field status_transitions.
-
#subscription ⇒ Object
readonly
Attribute for field subscription.
-
#subtotal ⇒ Object
readonly
Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied.
-
#subtotal_excluding_tax ⇒ Object
readonly
The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied.
-
#test_clock ⇒ Object
readonly
ID of the test clock this invoice belongs to.
-
#threshold_reason ⇒ Object
readonly
Attribute for field threshold_reason.
-
#total ⇒ Object
readonly
Total after discounts and taxes.
-
#total_discount_amounts ⇒ Object
readonly
The aggregate amounts calculated per discount across all line items.
-
#total_excluding_tax ⇒ Object
readonly
The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
-
#total_margin_amounts ⇒ Object
readonly
The aggregate amounts calculated per margin across all line items.
-
#total_pretax_credit_amounts ⇒ Object
readonly
Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice.
-
#total_taxes ⇒ Object
readonly
The aggregate tax information of all line items.
-
#webhooks_delivered_at ⇒ Object
readonly
Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#account_country ⇒ Object (readonly)
The country of the business associated with this invoice, most often the business creating the invoice.
1097 1098 1099 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1097 def account_country @account_country end |
#account_name ⇒ Object (readonly)
The public name of the business associated with this invoice, most often the business creating the invoice.
1099 1100 1101 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1099 def account_name @account_name end |
#account_tax_ids ⇒ Object (readonly)
The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
1101 1102 1103 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1101 def account_tax_ids @account_tax_ids end |
#amount_due ⇒ Object (readonly)
Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the amount_due may be 0. If there is a positive starting_balance for the invoice (the customer owes money), the amount_due will also take that into account. The charge that gets generated for the invoice will be for the amount specified in amount_due.
1103 1104 1105 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1103 def amount_due @amount_due end |
#amount_overpaid ⇒ Object (readonly)
Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance.
1105 1106 1107 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1105 def amount_overpaid @amount_overpaid end |
#amount_paid ⇒ Object (readonly)
The amount, in cents (or local equivalent), that was paid.
1107 1108 1109 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1107 def amount_paid @amount_paid end |
#amount_paid_off_stripe ⇒ Object (readonly)
Amount, in cents (or local equivalent), that was paid on the invoice outside of Stripe.
1109 1110 1111 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1109 def amount_paid_off_stripe @amount_paid_off_stripe end |
#amount_remaining ⇒ Object (readonly)
The difference between amount_due and amount_paid, in cents (or local equivalent).
1111 1112 1113 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1111 def amount_remaining @amount_remaining end |
#amount_shipping ⇒ Object (readonly)
This is the sum of all the shipping amounts.
1113 1114 1115 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1113 def amount_shipping @amount_shipping end |
#amounts_due ⇒ Object (readonly)
List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
1115 1116 1117 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1115 def amounts_due @amounts_due end |
#application ⇒ Object (readonly)
ID of the Connect Application that created the invoice.
1117 1118 1119 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1117 def application @application end |
#applies_to ⇒ Object (readonly)
Attribute for field applies_to
1119 1120 1121 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1119 def applies_to @applies_to end |
#attempt_count ⇒ Object (readonly)
Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained.
1121 1122 1123 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1121 def attempt_count @attempt_count end |
#attempted ⇒ Object (readonly)
Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the invoice.created webhook, for example, so you might not want to display that invoice as unpaid to your users.
1123 1124 1125 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1123 def attempted @attempted end |
#automatic_tax ⇒ Object (readonly)
Attribute for field automatic_tax
1125 1126 1127 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1125 def automatic_tax @automatic_tax end |
#automatically_finalizes_at ⇒ Object (readonly)
The time when this invoice is currently scheduled to be automatically finalized. The field will be null if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be null - see finalized_at for the time when an already-finalized invoice was finalized.
1127 1128 1129 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1127 def automatically_finalizes_at @automatically_finalizes_at end |
#billing_reason ⇒ Object (readonly)
Indicates the reason why the invoice was created.
manual: Unrelated to a subscription, for example, created via the invoice editor.subscription: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.subscription_create: A new subscription was created.subscription_cycle: A subscription advanced into a new period.subscription_threshold: A subscription reached a billing threshold.subscription_update: A subscription was updated.upcoming: Reserved for upcoming invoices created through the Create Preview Invoice API or when aninvoice.upcomingevent is generated for an upcoming invoice on a subscription.
1137 1138 1139 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1137 def billing_reason @billing_reason end |
#collection_method ⇒ Object (readonly)
Either charge_automatically, or send_invoice. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions.
1139 1140 1141 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1139 def collection_method @collection_method end |
#confirmation_secret ⇒ Object (readonly)
The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization.
1141 1142 1143 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1141 def confirmation_secret @confirmation_secret end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
1143 1144 1145 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1143 def created @created end |
#currency ⇒ Object (readonly)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
1145 1146 1147 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1145 def currency @currency end |
#custom_fields ⇒ Object (readonly)
Custom fields displayed on the invoice.
1147 1148 1149 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1147 def custom_fields @custom_fields end |
#customer_account ⇒ Object (readonly)
The ID of the account representing the customer to bill.
1149 1150 1151 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1149 def customer_account @customer_account end |
#customer_address ⇒ Object (readonly)
The customer's address. Until the invoice is finalized, this field will equal customer.address. Once the invoice is finalized, this field will no longer be updated.
1151 1152 1153 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1151 def customer_address @customer_address end |
#customer_balance ⇒ Object (readonly)
The customer balance amounts applied to this invoice.
1153 1154 1155 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1153 def customer_balance @customer_balance end |
#customer_email ⇒ Object (readonly)
The customer's email. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.
1155 1156 1157 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1155 def customer_email @customer_email end |
#customer_name ⇒ Object (readonly)
The customer's name. Until the invoice is finalized, this field will equal customer.name. Once the invoice is finalized, this field will no longer be updated.
1157 1158 1159 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1157 def customer_name @customer_name end |
#customer_phone ⇒ Object (readonly)
The customer's phone number. Until the invoice is finalized, this field will equal customer.phone. Once the invoice is finalized, this field will no longer be updated.
1159 1160 1161 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1159 def customer_phone @customer_phone end |
#customer_shipping ⇒ Object (readonly)
The customer's shipping information. Until the invoice is finalized, this field will equal customer.shipping. Once the invoice is finalized, this field will no longer be updated.
1161 1162 1163 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1161 def customer_shipping @customer_shipping end |
#customer_tax_exempt ⇒ Object (readonly)
The customer's tax exempt status. Until the invoice is finalized, this field will equal customer.tax_exempt. Once the invoice is finalized, this field will no longer be updated.
1163 1164 1165 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1163 def customer_tax_exempt @customer_tax_exempt end |
#customer_tax_ids ⇒ Object (readonly)
The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as customer.tax_ids. Once the invoice is finalized, this field will no longer be updated.
1165 1166 1167 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1165 def customer_tax_ids @customer_tax_ids end |
#default_margins ⇒ Object (readonly)
The margins applied to the invoice. Can be overridden by line item margins. Use expand[]=default_margins to expand each margin.
1167 1168 1169 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1167 def default_margins @default_margins end |
#default_payment_method ⇒ Object (readonly)
ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings.
1169 1170 1171 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1169 def default_payment_method @default_payment_method end |
#default_source ⇒ Object (readonly)
ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source.
1171 1172 1173 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1171 def default_source @default_source end |
#default_tax_rates ⇒ Object (readonly)
The tax rates applied to this invoice, if any.
1173 1174 1175 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1173 def default_tax_rates @default_tax_rates end |
#description ⇒ Object (readonly)
An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
1175 1176 1177 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1175 def description @description end |
#discounts ⇒ Object (readonly)
The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use expand[]=discounts to expand each discount.
1177 1178 1179 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1177 def discounts @discounts end |
#due_date ⇒ Object (readonly)
The date on which payment for this invoice is due. This value will be null for invoices where collection_method=charge_automatically.
1179 1180 1181 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1179 def due_date @due_date end |
#effective_at ⇒ Object (readonly)
The date when this invoice is in effect. Same as finalized_at unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt.
1181 1182 1183 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1181 def effective_at @effective_at end |
#ending_balance ⇒ Object (readonly)
Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null.
1183 1184 1185 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1183 def ending_balance @ending_balance end |
#footer ⇒ Object (readonly)
Footer displayed on the invoice.
1185 1186 1187 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1185 def @footer end |
#from_invoice ⇒ Object (readonly)
Details of the invoice that was cloned. See the revision documentation for more details.
1187 1188 1189 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1187 def from_invoice @from_invoice end |
#id ⇒ Object (readonly)
Unique identifier for the object. For preview invoices created using the create preview endpoint, this id will be prefixed with upcoming_in.
1189 1190 1191 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1189 def id @id end |
#issuer ⇒ Object (readonly)
Attribute for field issuer
1191 1192 1193 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1191 def issuer @issuer end |
#last_finalization_error ⇒ Object (readonly)
The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
1193 1194 1195 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1193 def last_finalization_error @last_finalization_error end |
#latest_revision ⇒ Object (readonly)
The ID of the most recent non-draft revision of this invoice
1195 1196 1197 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1195 def latest_revision @latest_revision end |
#lines ⇒ Object (readonly)
The individual line items that make up the invoice. lines is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order.
1197 1198 1199 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1197 def lines @lines end |
#livemode ⇒ Object (readonly)
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
1199 1200 1201 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1199 def livemode @livemode end |
#metadata ⇒ Object (readonly)
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.
1201 1202 1203 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1201 def @metadata end |
#next_payment_attempt ⇒ Object (readonly)
The time at which payment will next be attempted. This value will be null for invoices where collection_method=send_invoice.
1203 1204 1205 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1203 def next_payment_attempt @next_payment_attempt end |
#number ⇒ Object (readonly)
A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified.
1205 1206 1207 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1205 def number @number end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
1207 1208 1209 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1207 def object @object end |
#on_behalf_of ⇒ Object (readonly)
The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the Invoices with Connect documentation for details.
1209 1210 1211 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1209 def on_behalf_of @on_behalf_of end |
#parent ⇒ Object (readonly)
The parent that generated this invoice
1211 1212 1213 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1211 def parent @parent end |
#payment_settings ⇒ Object (readonly)
Attribute for field payment_settings
1213 1214 1215 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1213 def payment_settings @payment_settings end |
#payments ⇒ Object (readonly)
Payments for this invoice. Use invoice payment to get more details.
1215 1216 1217 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1215 def payments @payments end |
#period_end ⇒ Object (readonly)
The latest timestamp at which invoice items can be associated with this invoice. Use the line item period to get the service period for each price.
1217 1218 1219 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1217 def period_end @period_end end |
#period_start ⇒ Object (readonly)
The earliest timestamp at which invoice items can be associated with this invoice. Use the line item period to get the service period for each price.
1219 1220 1221 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1219 def period_start @period_start end |
#post_payment_credit_notes_amount ⇒ Object (readonly)
Total amount of all post-payment credit notes issued for this invoice.
1221 1222 1223 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1221 def post_payment_credit_notes_amount @post_payment_credit_notes_amount end |
#pre_payment_credit_notes_amount ⇒ Object (readonly)
Total amount of all pre-payment credit notes issued for this invoice.
1223 1224 1225 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1223 def pre_payment_credit_notes_amount @pre_payment_credit_notes_amount end |
#receipt_number ⇒ Object (readonly)
This is the transaction number that appears on email receipts sent for this invoice.
1225 1226 1227 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1225 def receipt_number @receipt_number end |
#rendering ⇒ Object (readonly)
The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
1227 1228 1229 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1227 def rendering @rendering end |
#shipping_cost ⇒ Object (readonly)
The details of the cost of shipping, including the ShippingRate applied on the invoice.
1229 1230 1231 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1229 def shipping_cost @shipping_cost end |
#shipping_details ⇒ Object (readonly)
Shipping details for the invoice. The Invoice PDF will use the shipping_details value if it is set, otherwise the PDF will render the shipping address from the customer.
1231 1232 1233 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1231 def shipping_details @shipping_details end |
#starting_balance ⇒ Object (readonly)
Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice.
1233 1234 1235 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1233 def starting_balance @starting_balance end |
#statement_descriptor ⇒ Object (readonly)
Extra information about an invoice for the customer's credit card statement.
1235 1236 1237 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1235 def statement_descriptor @statement_descriptor end |
#status ⇒ Object (readonly)
The status of the invoice, one of draft, open, paid, uncollectible, or void. Learn more
1237 1238 1239 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1237 def status @status end |
#status_transitions ⇒ Object (readonly)
Attribute for field status_transitions
1239 1240 1241 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1239 def status_transitions @status_transitions end |
#subscription ⇒ Object (readonly)
Attribute for field subscription
1241 1242 1243 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1241 def subscription @subscription end |
#subtotal ⇒ Object (readonly)
Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated
1243 1244 1245 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1243 def subtotal @subtotal end |
#subtotal_excluding_tax ⇒ Object (readonly)
The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
1245 1246 1247 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1245 def subtotal_excluding_tax @subtotal_excluding_tax end |
#test_clock ⇒ Object (readonly)
ID of the test clock this invoice belongs to.
1247 1248 1249 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1247 def test_clock @test_clock end |
#threshold_reason ⇒ Object (readonly)
Attribute for field threshold_reason
1249 1250 1251 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1249 def threshold_reason @threshold_reason end |
#total ⇒ Object (readonly)
Total after discounts and taxes.
1251 1252 1253 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1251 def total @total end |
#total_discount_amounts ⇒ Object (readonly)
The aggregate amounts calculated per discount across all line items.
1253 1254 1255 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1253 def total_discount_amounts @total_discount_amounts end |
#total_excluding_tax ⇒ Object (readonly)
The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
1255 1256 1257 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1255 def total_excluding_tax @total_excluding_tax end |
#total_margin_amounts ⇒ Object (readonly)
The aggregate amounts calculated per margin across all line items.
1257 1258 1259 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1257 def total_margin_amounts @total_margin_amounts end |
#total_pretax_credit_amounts ⇒ Object (readonly)
Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items.
1259 1260 1261 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1259 def total_pretax_credit_amounts @total_pretax_credit_amounts end |
#total_taxes ⇒ Object (readonly)
The aggregate tax information of all line items.
1261 1262 1263 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1261 def total_taxes @total_taxes end |
#webhooks_delivered_at ⇒ Object (readonly)
Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have been exhausted. This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created.
1263 1264 1265 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1263 def webhooks_delivered_at @webhooks_delivered_at end |
Class Method Details
.field_remappings ⇒ Object
1293 1294 1295 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1293 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 1265 def self.inner_class_types @inner_class_types = { amounts_due: AmountsDue, applies_to: AppliesTo, automatic_tax: AutomaticTax, confirmation_secret: ConfirmationSecret, custom_fields: CustomField, customer_address: CustomerAddress, customer_balance: CustomerBalance, customer_shipping: CustomerShipping, customer_tax_ids: CustomerTaxId, from_invoice: FromInvoice, issuer: Issuer, last_finalization_error: LastFinalizationError, parent: Parent, payment_settings: PaymentSettings, rendering: Rendering, shipping_cost: ShippingCost, shipping_details: ShippingDetails, status_transitions: StatusTransitions, threshold_reason: ThresholdReason, total_discount_amounts: TotalDiscountAmount, total_margin_amounts: TotalMarginAmount, total_pretax_credit_amounts: TotalPretaxCreditAmount, total_taxes: TotalTax, } end |
.object_name ⇒ Object
39 40 41 |
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 39 def self.object_name "quote_preview_invoice" end |