Class: Stripe::QuotePreviewInvoice

Inherits:
APIResource show all
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](stripe.com/docs/api#invoiceitems), 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](stripe.com/docs/invoicing/integration/automatic-advancement-collection), 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](dashboard.stripe.com/account/billing/automatic), 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](stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), 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](stripe.com/docs/billing/customer/balance).

Related guide: [Send invoices to customers](stripe.com/docs/billing/invoices/sending)

Defined Under Namespace

Classes: AmountsDue, AppliesTo, AutomaticTax, CustomField, CustomerAddress, CustomerShipping, CustomerTaxId, FromInvoice, Issuer, LastFinalizationError, PaymentSettings, Rendering, ShippingCost, ShippingDetails, StatusTransitions, SubscriptionDetails, ThresholdReason, TotalDiscountAmount, TotalMarginAmount, TotalPretaxCreditAmount, TotalTaxAmount, TransferData

Constant Summary collapse

OBJECT_NAME =
"quote_preview_invoice"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

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

included

Methods inherited from StripeObject

#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #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_countryObject (readonly)

The country of the business associated with this invoice, most often the business creating the invoice.



474
475
476
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 474

def 
  @account_country
end

#account_nameObject (readonly)

The public name of the business associated with this invoice, most often the business creating the invoice.



476
477
478
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 476

def 
  @account_name
end

#account_tax_idsObject (readonly)

The account tax IDs associated with the invoice. Only editable when the invoice is a draft.



478
479
480
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 478

def 
  @account_tax_ids
end

#amount_dueObject (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`.



480
481
482
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 480

def amount_due
  @amount_due
end

#amount_overpaidObject (readonly)

Amount that was overpaid on the invoice. Overpayments are debited to the customer’s credit balance.



482
483
484
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 482

def amount_overpaid
  @amount_overpaid
end

#amount_paidObject (readonly)

The amount, in cents (or local equivalent), that was paid.



484
485
486
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 484

def amount_paid
  @amount_paid
end

#amount_remainingObject (readonly)

The difference between amount_due and amount_paid, in cents (or local equivalent).



486
487
488
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 486

def amount_remaining
  @amount_remaining
end

#amount_shippingObject (readonly)

This is the sum of all the shipping amounts.



488
489
490
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 488

def amount_shipping
  @amount_shipping
end

#amounts_dueObject (readonly)

List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.



490
491
492
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 490

def amounts_due
  @amounts_due
end

#applicationObject (readonly)

ID of the Connect Application that created the invoice.



492
493
494
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 492

def application
  @application
end

#application_fee_amountObject (readonly)

The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner’s Stripe account when the invoice is paid.



494
495
496
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 494

def application_fee_amount
  @application_fee_amount
end

#applies_toObject (readonly)

Attribute for field applies_to



496
497
498
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 496

def applies_to
  @applies_to
end

#attempt_countObject (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.



498
499
500
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 498

def attempt_count
  @attempt_count
end

#attemptedObject (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.



500
501
502
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 500

def attempted
  @attempted
end

#automatic_taxObject (readonly)

Attribute for field automatic_tax



502
503
504
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 502

def automatic_tax
  @automatic_tax
end

#automatically_finalizes_atObject (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.



504
505
506
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 504

def automatically_finalizes_at
  @automatically_finalizes_at
end

#billing_reasonObject (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 simulated invoices, per the upcoming invoice endpoint.



514
515
516
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 514

def billing_reason
  @billing_reason
end

#collection_methodObject (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.



516
517
518
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 516

def collection_method
  @collection_method
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



518
519
520
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 518

def created
  @created
end

#currencyObject (readonly)

Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).



520
521
522
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 520

def currency
  @currency
end

#custom_fieldsObject (readonly)

Custom fields displayed on the invoice.



522
523
524
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 522

def custom_fields
  @custom_fields
end

#customer_addressObject (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.



524
525
526
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 524

def customer_address
  @customer_address
end

#customer_emailObject (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.



526
527
528
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 526

def customer_email
  @customer_email
end

#customer_nameObject (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.



528
529
530
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 528

def customer_name
  @customer_name
end

#customer_phoneObject (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.



530
531
532
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 530

def customer_phone
  @customer_phone
end

#customer_shippingObject (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.



532
533
534
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 532

def customer_shipping
  @customer_shipping
end

#customer_tax_exemptObject (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.



534
535
536
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 534

def customer_tax_exempt
  @customer_tax_exempt
end

#customer_tax_idsObject (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.



536
537
538
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 536

def customer_tax_ids
  @customer_tax_ids
end

#default_marginsObject (readonly)

The margins applied to the invoice. Can be overridden by line item ‘margins`. Use `expand[]=default_margins` to expand each margin.



538
539
540
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 538

def default_margins
  @default_margins
end

#default_payment_methodObject (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.



540
541
542
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 540

def default_payment_method
  @default_payment_method
end

#default_sourceObject (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.



542
543
544
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 542

def default_source
  @default_source
end

#default_tax_ratesObject (readonly)

The tax rates applied to this invoice, if any.



544
545
546
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 544

def default_tax_rates
  @default_tax_rates
end

#descriptionObject (readonly)

An arbitrary string attached to the object. Often useful for displaying to users. Referenced as ‘memo’ in the Dashboard.



546
547
548
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 546

def description
  @description
end

#discountObject (readonly)

Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.



548
549
550
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 548

def discount
  @discount
end

#discountsObject (readonly)

The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use ‘expand[]=discounts` to expand each discount.



550
551
552
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 550

def discounts
  @discounts
end

#due_dateObject (readonly)

The date on which payment for this invoice is due. This value will be ‘null` for invoices where `collection_method=charge_automatically`.



552
553
554
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 552

def due_date
  @due_date
end

#effective_atObject (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.



554
555
556
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 554

def effective_at
  @effective_at
end

#ending_balanceObject (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.



556
557
558
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 556

def ending_balance
  @ending_balance
end

Footer displayed on the invoice.



558
559
560
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 558

def footer
  @footer
end

#from_invoiceObject (readonly)

Details of the invoice that was cloned. See the [revision documentation](stripe.com/docs/invoicing/invoice-revisions) for more details.



560
561
562
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 560

def from_invoice
  @from_invoice
end

#idObject (readonly)

Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](stripe.com/docs/api/invoices/upcoming) for more details.



562
563
564
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 562

def id
  @id
end

#issuerObject (readonly)

Attribute for field issuer



564
565
566
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 564

def issuer
  @issuer
end

#last_finalization_errorObject (readonly)

The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.



566
567
568
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 566

def last_finalization_error
  @last_finalization_error
end

#latest_revisionObject (readonly)

The ID of the most recent non-draft revision of this invoice



568
569
570
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 568

def latest_revision
  @latest_revision
end

#linesObject (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.



570
571
572
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 570

def lines
  @lines
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



572
573
574
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 572

def livemode
  @livemode
end

#metadataObject (readonly)

Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



574
575
576
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 574

def 
  @metadata
end

#next_payment_attemptObject (readonly)

The time at which payment will next be attempted. This value will be ‘null` for invoices where `collection_method=send_invoice`.



576
577
578
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 576

def next_payment_attempt
  @next_payment_attempt
end

#numberObject (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.



578
579
580
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 578

def number
  @number
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



580
581
582
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 580

def object
  @object
end

#on_behalf_ofObject (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](stripe.com/docs/billing/invoices/connect) documentation for details.



582
583
584
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 582

def on_behalf_of
  @on_behalf_of
end

Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer’s account balance.



584
585
586
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 584

def paid
  @paid
end

Returns true if the invoice was manually marked paid, returns false if the invoice hasn’t been paid yet or was paid on Stripe.



586
587
588
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 586

def paid_out_of_band
  @paid_out_of_band
end

#payment_intentObject (readonly)

The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent.



588
589
590
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 588

def payment_intent
  @payment_intent
end

#payment_settingsObject (readonly)

Attribute for field payment_settings



590
591
592
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 590

def payment_settings
  @payment_settings
end

#paymentsObject (readonly)

Payments for this invoice



592
593
594
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 592

def payments
  @payments
end

#period_endObject (readonly)

End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.



594
595
596
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 594

def period_end
  @period_end
end

#period_startObject (readonly)

Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price.



596
597
598
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 596

def period_start
  @period_start
end

#post_payment_credit_notes_amountObject (readonly)

Total amount of all post-payment credit notes issued for this invoice.



598
599
600
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 598

def post_payment_credit_notes_amount
  @post_payment_credit_notes_amount
end

#pre_payment_credit_notes_amountObject (readonly)

Total amount of all pre-payment credit notes issued for this invoice.



600
601
602
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 600

def pre_payment_credit_notes_amount
  @pre_payment_credit_notes_amount
end

#quoteObject (readonly)

The quote this invoice was generated from.



602
603
604
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 602

def quote
  @quote
end

#receipt_numberObject (readonly)

This is the transaction number that appears on email receipts sent for this invoice.



604
605
606
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 604

def receipt_number
  @receipt_number
end

#renderingObject (readonly)

The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.



606
607
608
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 606

def rendering
  @rendering
end

#shipping_costObject (readonly)

The details of the cost of shipping, including the ShippingRate applied on the invoice.



608
609
610
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 608

def shipping_cost
  @shipping_cost
end

#shipping_detailsObject (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.



610
611
612
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 610

def shipping_details
  @shipping_details
end

#starting_balanceObject (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.



612
613
614
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 612

def starting_balance
  @starting_balance
end

#statement_descriptorObject (readonly)

Extra information about an invoice for the customer’s credit card statement.



614
615
616
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 614

def statement_descriptor
  @statement_descriptor
end

#statusObject (readonly)

The status of the invoice, one of ‘draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](stripe.com/docs/billing/invoices/workflow#workflow-overview)



616
617
618
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 616

def status
  @status
end

#status_transitionsObject (readonly)

Attribute for field status_transitions



618
619
620
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 618

def status_transitions
  @status_transitions
end

#subscriptionObject (readonly)

Attribute for field subscription



620
621
622
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 620

def subscription
  @subscription
end

#subscription_detailsObject (readonly)

Details about the subscription that created this invoice.



622
623
624
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 622

def subscription_details
  @subscription_details
end

#subscription_proration_dateObject (readonly)

Only set for upcoming invoices that preview prorations. The time used to calculate prorations.



624
625
626
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 624

def subscription_proration_date
  @subscription_proration_date
end

#subtotalObject (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



626
627
628
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 626

def subtotal
  @subtotal
end

#subtotal_excluding_taxObject (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



628
629
630
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 628

def subtotal_excluding_tax
  @subtotal_excluding_tax
end

#taxObject (readonly)

The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.



630
631
632
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 630

def tax
  @tax
end

#test_clockObject (readonly)

ID of the test clock this invoice belongs to.



632
633
634
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 632

def test_clock
  @test_clock
end

#threshold_reasonObject (readonly)

Attribute for field threshold_reason



634
635
636
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 634

def threshold_reason
  @threshold_reason
end

#totalObject (readonly)

Total after discounts and taxes.



636
637
638
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 636

def total
  @total
end

#total_discount_amountsObject (readonly)

The aggregate amounts calculated per discount across all line items.



638
639
640
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 638

def total_discount_amounts
  @total_discount_amounts
end

#total_excluding_taxObject (readonly)

The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.



640
641
642
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 640

def total_excluding_tax
  @total_excluding_tax
end

#total_margin_amountsObject (readonly)

The aggregate amounts calculated per margin across all line items.



642
643
644
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 642

def total_margin_amounts
  @total_margin_amounts
end

#total_pretax_credit_amountsObject (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.



644
645
646
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 644

def total_pretax_credit_amounts
  @total_pretax_credit_amounts
end

#total_tax_amountsObject (readonly)

The aggregate amounts calculated per tax rate for all line items.



646
647
648
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 646

def total_tax_amounts
  @total_tax_amounts
end

#transfer_dataObject (readonly)

The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice.



648
649
650
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 648

def transfer_data
  @transfer_data
end

#webhooks_delivered_atObject (readonly)

Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](stripe.com/docs/billing/webhooks#understand). 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.



650
651
652
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 650

def webhooks_delivered_at
  @webhooks_delivered_at
end

Class Method Details

.object_nameObject



39
40
41
# File 'lib/stripe/resources/quote_preview_invoice.rb', line 39

def self.object_name
  "quote_preview_invoice"
end