stripe 13.3.0.pre.beta.3 → 13.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (220) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +650 -1402
  3. data/OPENAPI_VERSION +1 -1
  4. data/VERSION +1 -1
  5. data/lib/stripe/object_types.rb +0 -32
  6. data/lib/stripe/resources/account.rb +2 -232
  7. data/lib/stripe/resources/account_link.rb +0 -9
  8. data/lib/stripe/resources/account_session.rb +0 -103
  9. data/lib/stripe/resources/apple_pay_domain.rb +2 -20
  10. data/lib/stripe/resources/application_fee.rb +2 -36
  11. data/lib/stripe/resources/application_fee_refund.rb +0 -17
  12. data/lib/stripe/resources/apps/secret.rb +2 -24
  13. data/lib/stripe/resources/balance.rb +0 -59
  14. data/lib/stripe/resources/balance_transaction.rb +2 -36
  15. data/lib/stripe/resources/bank_account.rb +3 -61
  16. data/lib/stripe/resources/billing/alert.rb +2 -23
  17. data/lib/stripe/resources/billing/credit_balance_summary.rb +0 -25
  18. data/lib/stripe/resources/billing/credit_balance_transaction.rb +2 -50
  19. data/lib/stripe/resources/billing/credit_grant.rb +2 -46
  20. data/lib/stripe/resources/billing/meter.rb +2 -44
  21. data/lib/stripe/resources/billing/meter_event.rb +0 -15
  22. data/lib/stripe/resources/billing/meter_event_adjustment.rb +0 -16
  23. data/lib/stripe/resources/billing/meter_event_summary.rb +0 -15
  24. data/lib/stripe/resources/billing_portal/configuration.rb +2 -72
  25. data/lib/stripe/resources/billing_portal/session.rb +0 -61
  26. data/lib/stripe/resources/capability.rb +0 -38
  27. data/lib/stripe/resources/card.rb +1 -77
  28. data/lib/stripe/resources/cash_balance.rb +0 -14
  29. data/lib/stripe/resources/charge.rb +2 -471
  30. data/lib/stripe/resources/checkout/session.rb +2 -498
  31. data/lib/stripe/resources/climate/order.rb +2 -57
  32. data/lib/stripe/resources/climate/product.rb +2 -26
  33. data/lib/stripe/resources/climate/supplier.rb +2 -20
  34. data/lib/stripe/resources/confirmation_token.rb +0 -297
  35. data/lib/stripe/resources/country_spec.rb +2 -29
  36. data/lib/stripe/resources/coupon.rb +2 -46
  37. data/lib/stripe/resources/credit_note.rb +2 -93
  38. data/lib/stripe/resources/credit_note_line_item.rb +0 -46
  39. data/lib/stripe/resources/customer.rb +2 -95
  40. data/lib/stripe/resources/customer_balance_transaction.rb +0 -27
  41. data/lib/stripe/resources/customer_cash_balance_transaction.rb +0 -72
  42. data/lib/stripe/resources/customer_session.rb +0 -34
  43. data/lib/stripe/resources/discount.rb +0 -29
  44. data/lib/stripe/resources/dispute.rb +2 -98
  45. data/lib/stripe/resources/entitlements/active_entitlement.rb +2 -13
  46. data/lib/stripe/resources/entitlements/feature.rb +2 -17
  47. data/lib/stripe/resources/ephemeral_key.rb +0 -13
  48. data/lib/stripe/resources/event.rb +2 -46
  49. data/lib/stripe/resources/exchange_rate.rb +2 -9
  50. data/lib/stripe/resources/file.rb +2 -25
  51. data/lib/stripe/resources/file_link.rb +2 -21
  52. data/lib/stripe/resources/financial_connections/account.rb +2 -89
  53. data/lib/stripe/resources/financial_connections/account_owner.rb +0 -17
  54. data/lib/stripe/resources/financial_connections/account_ownership.rb +0 -9
  55. data/lib/stripe/resources/financial_connections/session.rb +0 -49
  56. data/lib/stripe/resources/financial_connections/transaction.rb +2 -30
  57. data/lib/stripe/resources/forwarding/request.rb +2 -42
  58. data/lib/stripe/resources/funding_instructions.rb +0 -82
  59. data/lib/stripe/resources/identity/verification_report.rb +2 -94
  60. data/lib/stripe/resources/identity/verification_session.rb +2 -78
  61. data/lib/stripe/resources/invoice.rb +2 -420
  62. data/lib/stripe/resources/invoice_item.rb +2 -56
  63. data/lib/stripe/resources/invoice_line_item.rb +0 -83
  64. data/lib/stripe/resources/invoice_rendering_template.rb +2 -19
  65. data/lib/stripe/resources/issuing/authorization.rb +2 -131
  66. data/lib/stripe/resources/issuing/card.rb +2 -88
  67. data/lib/stripe/resources/issuing/cardholder.rb +2 -78
  68. data/lib/stripe/resources/issuing/dispute.rb +2 -67
  69. data/lib/stripe/resources/issuing/personalization_design.rb +2 -40
  70. data/lib/stripe/resources/issuing/physical_bundle.rb +2 -20
  71. data/lib/stripe/resources/issuing/token.rb +2 -48
  72. data/lib/stripe/resources/issuing/transaction.rb +2 -108
  73. data/lib/stripe/resources/line_item.rb +0 -50
  74. data/lib/stripe/resources/login_link.rb +0 -7
  75. data/lib/stripe/resources/mandate.rb +0 -78
  76. data/lib/stripe/resources/payment_intent.rb +2 -714
  77. data/lib/stripe/resources/payment_link.rb +2 -200
  78. data/lib/stripe/resources/payment_method.rb +2 -370
  79. data/lib/stripe/resources/payment_method_configuration.rb +2 -432
  80. data/lib/stripe/resources/payment_method_domain.rb +2 -59
  81. data/lib/stripe/resources/payout.rb +2 -58
  82. data/lib/stripe/resources/person.rb +0 -128
  83. data/lib/stripe/resources/plan.rb +2 -54
  84. data/lib/stripe/resources/price.rb +2 -79
  85. data/lib/stripe/resources/product.rb +2 -62
  86. data/lib/stripe/resources/product_feature.rb +0 -12
  87. data/lib/stripe/resources/promotion_code.rb +2 -37
  88. data/lib/stripe/resources/quote.rb +2 -358
  89. data/lib/stripe/resources/radar/early_fraud_warning.rb +2 -19
  90. data/lib/stripe/resources/radar/value_list.rb +2 -25
  91. data/lib/stripe/resources/radar/value_list_item.rb +2 -19
  92. data/lib/stripe/resources/refund.rb +2 -132
  93. data/lib/stripe/resources/reporting/report_run.rb +2 -31
  94. data/lib/stripe/resources/reporting/report_type.rb +2 -21
  95. data/lib/stripe/resources/reversal.rb +0 -21
  96. data/lib/stripe/resources/review.rb +2 -38
  97. data/lib/stripe/resources/setup_attempt.rb +2 -103
  98. data/lib/stripe/resources/setup_intent.rb +2 -160
  99. data/lib/stripe/resources/shipping_rate.rb +2 -44
  100. data/lib/stripe/resources/sigma/scheduled_query_run.rb +2 -28
  101. data/lib/stripe/resources/source.rb +0 -197
  102. data/lib/stripe/resources/source_transaction.rb +0 -48
  103. data/lib/stripe/resources/subscription.rb +2 -216
  104. data/lib/stripe/resources/subscription_item.rb +2 -48
  105. data/lib/stripe/resources/subscription_schedule.rb +2 -175
  106. data/lib/stripe/resources/tax/calculation.rb +0 -72
  107. data/lib/stripe/resources/tax/calculation_line_item.rb +0 -33
  108. data/lib/stripe/resources/tax/registration.rb +2 -381
  109. data/lib/stripe/resources/tax/settings.rb +0 -33
  110. data/lib/stripe/resources/tax/transaction.rb +0 -68
  111. data/lib/stripe/resources/tax/transaction_line_item.rb +0 -30
  112. data/lib/stripe/resources/tax_code.rb +2 -11
  113. data/lib/stripe/resources/tax_id.rb +2 -32
  114. data/lib/stripe/resources/tax_rate.rb +2 -44
  115. data/lib/stripe/resources/terminal/configuration.rb +2 -109
  116. data/lib/stripe/resources/terminal/connection_token.rb +0 -7
  117. data/lib/stripe/resources/terminal/location.rb +2 -22
  118. data/lib/stripe/resources/terminal/reader.rb +2 -180
  119. data/lib/stripe/resources/test_helpers/test_clock.rb +2 -29
  120. data/lib/stripe/resources/token.rb +0 -29
  121. data/lib/stripe/resources/topup.rb +2 -35
  122. data/lib/stripe/resources/transfer.rb +2 -37
  123. data/lib/stripe/resources/treasury/credit_reversal.rb +2 -34
  124. data/lib/stripe/resources/treasury/debit_reversal.rb +2 -40
  125. data/lib/stripe/resources/treasury/financial_account.rb +2 -59
  126. data/lib/stripe/resources/treasury/financial_account_features.rb +0 -91
  127. data/lib/stripe/resources/treasury/inbound_transfer.rb +2 -68
  128. data/lib/stripe/resources/treasury/outbound_payment.rb +2 -87
  129. data/lib/stripe/resources/treasury/outbound_transfer.rb +2 -84
  130. data/lib/stripe/resources/treasury/received_credit.rb +2 -72
  131. data/lib/stripe/resources/treasury/received_debit.rb +2 -69
  132. data/lib/stripe/resources/treasury/transaction.rb +2 -44
  133. data/lib/stripe/resources/treasury/transaction_entry.rb +2 -36
  134. data/lib/stripe/resources/usage_record.rb +0 -13
  135. data/lib/stripe/resources/usage_record_summary.rb +0 -18
  136. data/lib/stripe/resources/v2/billing/meter_event.rb +0 -18
  137. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +0 -20
  138. data/lib/stripe/resources/v2/billing/meter_event_session.rb +0 -14
  139. data/lib/stripe/resources/v2/event.rb +0 -21
  140. data/lib/stripe/resources/v2/event_destination.rb +0 -49
  141. data/lib/stripe/resources/webhook_endpoint.rb +2 -34
  142. data/lib/stripe/resources.rb +0 -31
  143. data/lib/stripe/services/financial_connections/account_service.rb +1 -3
  144. data/lib/stripe/services/financial_connections_service.rb +1 -2
  145. data/lib/stripe/services/invoice_service.rb +1 -44
  146. data/lib/stripe/services/issuing_service.rb +1 -5
  147. data/lib/stripe/services/payment_intent_service.rb +0 -37
  148. data/lib/stripe/services/quote_service.rb +1 -49
  149. data/lib/stripe/services/subscription_schedule_service.rb +0 -11
  150. data/lib/stripe/services/tax_service.rb +1 -3
  151. data/lib/stripe/services/terminal/reader_service.rb +0 -33
  152. data/lib/stripe/services/terminal_service.rb +1 -2
  153. data/lib/stripe/services/v1_services.rb +1 -8
  154. data/lib/stripe/services.rb +0 -25
  155. data/lib/stripe/stripe_client.rb +1 -1
  156. data/lib/stripe/stripe_configuration.rb +1 -3
  157. data/lib/stripe/stripe_object.rb +3 -8
  158. data/lib/stripe/util.rb +2 -8
  159. data/lib/stripe/version.rb +1 -1
  160. data/lib/stripe.rb +0 -45
  161. data/stripe.gemspec +1 -2
  162. metadata +4 -62
  163. data/lib/stripe/request_signing_authenticator.rb +0 -79
  164. data/lib/stripe/resources/account_notice.rb +0 -60
  165. data/lib/stripe/resources/application.rb +0 -20
  166. data/lib/stripe/resources/billing/alert_triggered.rb +0 -26
  167. data/lib/stripe/resources/billing/meter_error_report.rb +0 -44
  168. data/lib/stripe/resources/capital/financing_offer.rb +0 -94
  169. data/lib/stripe/resources/capital/financing_summary.rb +0 -32
  170. data/lib/stripe/resources/capital/financing_transaction.rb +0 -56
  171. data/lib/stripe/resources/connect_collection_transfer.rb +0 -24
  172. data/lib/stripe/resources/entitlements/active_entitlement_summary.rb +0 -23
  173. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -27
  174. data/lib/stripe/resources/financial_connections/institution.rb +0 -61
  175. data/lib/stripe/resources/gift_cards/card.rb +0 -96
  176. data/lib/stripe/resources/gift_cards/transaction.rb +0 -132
  177. data/lib/stripe/resources/invoice_payment.rb +0 -46
  178. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -145
  179. data/lib/stripe/resources/issuing/dispute_settlement_detail.rb +0 -49
  180. data/lib/stripe/resources/issuing/fraud_liability_debit.rb +0 -43
  181. data/lib/stripe/resources/issuing/settlement.rb +0 -49
  182. data/lib/stripe/resources/margin.rb +0 -56
  183. data/lib/stripe/resources/order.rb +0 -322
  184. data/lib/stripe/resources/payment_attempt_record.rb +0 -100
  185. data/lib/stripe/resources/payment_record.rb +0 -188
  186. data/lib/stripe/resources/quote_line.rb +0 -136
  187. data/lib/stripe/resources/quote_preview_invoice.rb +0 -374
  188. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -170
  189. data/lib/stripe/resources/reserve_transaction.rb +0 -22
  190. data/lib/stripe/resources/source_mandate_notification.rb +0 -59
  191. data/lib/stripe/resources/tax/association.rb +0 -60
  192. data/lib/stripe/resources/tax/form.rb +0 -124
  193. data/lib/stripe/resources/tax_deducted_at_source.rb +0 -22
  194. data/lib/stripe/resources/terminal/reader_collected_data.rb +0 -30
  195. data/lib/stripe/resources/v2/amount.rb +0 -9
  196. data/lib/stripe/services/account_notice_service.rb +0 -39
  197. data/lib/stripe/services/capital/financing_offer_service.rb +0 -42
  198. data/lib/stripe/services/capital/financing_summary_service.rb +0 -19
  199. data/lib/stripe/services/capital/financing_transaction_service.rb +0 -31
  200. data/lib/stripe/services/capital_service.rb +0 -15
  201. data/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +0 -19
  202. data/lib/stripe/services/financial_connections/institution_service.rb +0 -30
  203. data/lib/stripe/services/gift_cards/card_service.rb +0 -63
  204. data/lib/stripe/services/gift_cards/transaction_service.rb +0 -74
  205. data/lib/stripe/services/gift_cards_service.rb +0 -14
  206. data/lib/stripe/services/invoice_payment_service.rb +0 -28
  207. data/lib/stripe/services/issuing/credit_underwriting_record_service.rb +0 -74
  208. data/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +0 -30
  209. data/lib/stripe/services/issuing/fraud_liability_debit_service.rb +0 -30
  210. data/lib/stripe/services/margin_service.rb +0 -50
  211. data/lib/stripe/services/order_line_item_service.rb +0 -17
  212. data/lib/stripe/services/order_service.rb +0 -78
  213. data/lib/stripe/services/payment_attempt_record_service.rb +0 -28
  214. data/lib/stripe/services/payment_record_service.rb +0 -78
  215. data/lib/stripe/services/quote_line_service.rb +0 -17
  216. data/lib/stripe/services/quote_preview_invoice_service.rb +0 -17
  217. data/lib/stripe/services/quote_preview_subscription_schedule_service.rb +0 -17
  218. data/lib/stripe/services/tax/association_service.rb +0 -19
  219. data/lib/stripe/services/tax/form_service.rb +0 -37
  220. data/lib/stripe/services/terminal/reader_collected_data_service.rb +0 -19
@@ -1,374 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- # Invoices are statements of amounts owed by a customer, and are either
6
- # generated one-off, or generated periodically from a subscription.
7
- #
8
- # They contain [invoice items](https://stripe.com/docs/api#invoiceitems), and proration adjustments
9
- # that may be caused by subscription upgrades/downgrades (if necessary).
10
- #
11
- # If your invoice is configured to be billed through automatic charges,
12
- # Stripe automatically finalizes your invoice and attempts payment. Note
13
- # that finalizing the invoice,
14
- # [when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does
15
- # not happen immediately as the invoice is created. Stripe waits
16
- # until one hour after the last webhook was successfully sent (or the last
17
- # webhook timed out after failing). If you (and the platforms you may have
18
- # connected to) have no webhooks configured, Stripe waits one hour after
19
- # creation to finalize the invoice.
20
- #
21
- # If your invoice is configured to be billed by sending an email, then based on your
22
- # [email settings](https://dashboard.stripe.com/account/billing/automatic),
23
- # Stripe will email the invoice to your customer and await payment. These
24
- # emails can contain a link to a hosted page to pay the invoice.
25
- #
26
- # Stripe applies any customer credit on the account before determining the
27
- # amount due for the invoice (i.e., the amount that will be actually
28
- # charged). If the amount due for the invoice is less than Stripe's [minimum allowed charge
29
- # per currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts), the
30
- # invoice is automatically marked paid, and we add the amount due to the
31
- # customer's credit balance which is applied to the next invoice.
32
- #
33
- # More details on the customer's credit balance are
34
- # [here](https://stripe.com/docs/billing/customer/balance).
35
- #
36
- # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)
37
- class QuotePreviewInvoice < APIResource
38
- OBJECT_NAME = "quote_preview_invoice"
39
- def self.object_name
40
- "quote_preview_invoice"
41
- end
42
-
43
- class AmountsDue < Stripe::StripeObject
44
- attr_reader :amount, :amount_paid, :amount_remaining, :days_until_due, :description, :due_date, :paid_at, :status
45
- end
46
-
47
- class AppliesTo < Stripe::StripeObject
48
- attr_reader :new_reference, :subscription_schedule, :type
49
- end
50
-
51
- class AutomaticTax < Stripe::StripeObject
52
- class Liability < Stripe::StripeObject
53
- attr_reader :account, :type
54
- end
55
- attr_reader :disabled_reason, :enabled, :liability, :status
56
- end
57
-
58
- class CustomField < Stripe::StripeObject
59
- attr_reader :name, :value
60
- end
61
-
62
- class CustomerAddress < Stripe::StripeObject
63
- attr_reader :city, :country, :line1, :line2, :postal_code, :state
64
- end
65
-
66
- class CustomerShipping < Stripe::StripeObject
67
- class Address < Stripe::StripeObject
68
- attr_reader :city, :country, :line1, :line2, :postal_code, :state
69
- end
70
- attr_reader :address, :carrier, :name, :phone, :tracking_number
71
- end
72
-
73
- class CustomerTaxId < Stripe::StripeObject
74
- attr_reader :type, :value
75
- end
76
-
77
- class FromInvoice < Stripe::StripeObject
78
- attr_reader :action, :invoice
79
- end
80
-
81
- class Issuer < Stripe::StripeObject
82
- attr_reader :account, :type
83
- end
84
-
85
- class LastFinalizationError < Stripe::StripeObject
86
- attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type
87
- end
88
-
89
- class PaymentSettings < Stripe::StripeObject
90
- class PaymentMethodOptions < Stripe::StripeObject
91
- class AcssDebit < Stripe::StripeObject
92
- class MandateOptions < Stripe::StripeObject
93
- attr_reader :transaction_type
94
- end
95
- attr_reader :mandate_options, :verification_method
96
- end
97
-
98
- class Bancontact < Stripe::StripeObject
99
- attr_reader :preferred_language
100
- end
101
-
102
- class Card < Stripe::StripeObject
103
- class Installments < Stripe::StripeObject
104
- attr_reader :enabled
105
- end
106
- attr_reader :installments, :request_three_d_secure
107
- end
108
-
109
- class CustomerBalance < Stripe::StripeObject
110
- class BankTransfer < Stripe::StripeObject
111
- class EuBankTransfer < Stripe::StripeObject
112
- attr_reader :country
113
- end
114
- attr_reader :eu_bank_transfer, :type
115
- end
116
- attr_reader :bank_transfer, :funding_type
117
- end
118
-
119
- class IdBankTransfer < Stripe::StripeObject; end
120
- class Konbini < Stripe::StripeObject; end
121
- class SepaDebit < Stripe::StripeObject; end
122
-
123
- class UsBankAccount < Stripe::StripeObject
124
- class FinancialConnections < Stripe::StripeObject
125
- class Filters < Stripe::StripeObject
126
- attr_reader :account_subcategories, :institution
127
- end
128
- attr_reader :filters, :permissions, :prefetch
129
- end
130
- attr_reader :financial_connections, :verification_method
131
- end
132
- attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account
133
- end
134
- attr_reader :default_mandate, :payment_method_options, :payment_method_types
135
- end
136
-
137
- class Rendering < Stripe::StripeObject
138
- class Pdf < Stripe::StripeObject
139
- attr_reader :page_size
140
- end
141
- attr_reader :amount_tax_display, :pdf, :template, :template_version
142
- end
143
-
144
- class ShippingCost < Stripe::StripeObject
145
- class Tax < Stripe::StripeObject
146
- attr_reader :amount, :rate, :taxability_reason, :taxable_amount
147
- end
148
- attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes
149
- end
150
-
151
- class ShippingDetails < Stripe::StripeObject
152
- class Address < Stripe::StripeObject
153
- attr_reader :city, :country, :line1, :line2, :postal_code, :state
154
- end
155
- attr_reader :address, :carrier, :name, :phone, :tracking_number
156
- end
157
-
158
- class StatusTransitions < Stripe::StripeObject
159
- attr_reader :finalized_at, :marked_uncollectible_at, :paid_at, :voided_at
160
- end
161
-
162
- class SubscriptionDetails < Stripe::StripeObject
163
- class PauseCollection < Stripe::StripeObject
164
- attr_reader :behavior, :resumes_at
165
- end
166
- attr_reader :metadata, :pause_collection
167
- end
168
-
169
- class ThresholdReason < Stripe::StripeObject
170
- class ItemReason < Stripe::StripeObject
171
- attr_reader :line_item_ids, :usage_gte
172
- end
173
- attr_reader :amount_gte, :item_reasons
174
- end
175
-
176
- class TotalDiscountAmount < Stripe::StripeObject
177
- attr_reader :amount, :discount
178
- end
179
-
180
- class TotalMarginAmount < Stripe::StripeObject
181
- attr_reader :amount, :margin
182
- end
183
-
184
- class TotalPretaxCreditAmount < Stripe::StripeObject
185
- attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type
186
- end
187
-
188
- class TotalTaxAmount < Stripe::StripeObject
189
- attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount
190
- end
191
-
192
- class TransferData < Stripe::StripeObject
193
- attr_reader :amount, :destination
194
- end
195
- # The country of the business associated with this invoice, most often the business creating the invoice.
196
- attr_reader :account_country
197
- # The public name of the business associated with this invoice, most often the business creating the invoice.
198
- attr_reader :account_name
199
- # The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
200
- attr_reader :account_tax_ids
201
- # 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`.
202
- attr_reader :amount_due
203
- # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance.
204
- attr_reader :amount_overpaid
205
- # The amount, in cents (or local equivalent), that was paid.
206
- attr_reader :amount_paid
207
- # The difference between amount_due and amount_paid, in cents (or local equivalent).
208
- attr_reader :amount_remaining
209
- # This is the sum of all the shipping amounts.
210
- attr_reader :amount_shipping
211
- # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically.
212
- attr_reader :amounts_due
213
- # ID of the Connect Application that created the invoice.
214
- attr_reader :application
215
- # 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.
216
- attr_reader :application_fee_amount
217
- # Attribute for field applies_to
218
- attr_reader :applies_to
219
- # 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.
220
- attr_reader :attempt_count
221
- # 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.
222
- attr_reader :attempted
223
- # Attribute for field automatic_tax
224
- attr_reader :automatic_tax
225
- # 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.
226
- attr_reader :automatically_finalizes_at
227
- # Indicates the reason why the invoice was created.
228
- #
229
- # * `manual`: Unrelated to a subscription, for example, created via the invoice editor.
230
- # * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds.
231
- # * `subscription_create`: A new subscription was created.
232
- # * `subscription_cycle`: A subscription advanced into a new period.
233
- # * `subscription_threshold`: A subscription reached a billing threshold.
234
- # * `subscription_update`: A subscription was updated.
235
- # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint.
236
- attr_reader :billing_reason
237
- # 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.
238
- attr_reader :collection_method
239
- # Time at which the object was created. Measured in seconds since the Unix epoch.
240
- attr_reader :created
241
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
242
- attr_reader :currency
243
- # Custom fields displayed on the invoice.
244
- attr_reader :custom_fields
245
- # 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.
246
- attr_reader :customer_address
247
- # 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.
248
- attr_reader :customer_email
249
- # 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.
250
- attr_reader :customer_name
251
- # 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.
252
- attr_reader :customer_phone
253
- # 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.
254
- attr_reader :customer_shipping
255
- # 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.
256
- attr_reader :customer_tax_exempt
257
- # 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.
258
- attr_reader :customer_tax_ids
259
- # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin.
260
- attr_reader :default_margins
261
- # 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.
262
- attr_reader :default_payment_method
263
- # 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.
264
- attr_reader :default_source
265
- # The tax rates applied to this invoice, if any.
266
- attr_reader :default_tax_rates
267
- # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard.
268
- attr_reader :description
269
- # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts.
270
- attr_reader :discount
271
- # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
272
- attr_reader :discounts
273
- # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`.
274
- attr_reader :due_date
275
- # 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.
276
- attr_reader :effective_at
277
- # 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.
278
- attr_reader :ending_balance
279
- # Footer displayed on the invoice.
280
- attr_reader :footer
281
- # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details.
282
- attr_reader :from_invoice
283
- # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details.
284
- attr_reader :id
285
- # Attribute for field issuer
286
- attr_reader :issuer
287
- # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
288
- attr_reader :last_finalization_error
289
- # The ID of the most recent non-draft revision of this invoice
290
- attr_reader :latest_revision
291
- # 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.
292
- attr_reader :lines
293
- # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
294
- attr_reader :livemode
295
- # Set of [key-value pairs](https://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.
296
- attr_reader :metadata
297
- # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`.
298
- attr_reader :next_payment_attempt
299
- # 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.
300
- attr_reader :number
301
- # String representing the object's type. Objects of the same type share the same value.
302
- attr_reader :object
303
- # 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](https://stripe.com/docs/billing/invoices/connect) documentation for details.
304
- attr_reader :on_behalf_of
305
- # 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.
306
- attr_reader :paid
307
- # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe.
308
- attr_reader :paid_out_of_band
309
- # 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.
310
- attr_reader :payment_intent
311
- # Attribute for field payment_settings
312
- attr_reader :payment_settings
313
- # Payments for this invoice
314
- attr_reader :payments
315
- # 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.
316
- attr_reader :period_end
317
- # 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.
318
- attr_reader :period_start
319
- # Total amount of all post-payment credit notes issued for this invoice.
320
- attr_reader :post_payment_credit_notes_amount
321
- # Total amount of all pre-payment credit notes issued for this invoice.
322
- attr_reader :pre_payment_credit_notes_amount
323
- # The quote this invoice was generated from.
324
- attr_reader :quote
325
- # This is the transaction number that appears on email receipts sent for this invoice.
326
- attr_reader :receipt_number
327
- # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
328
- attr_reader :rendering
329
- # The details of the cost of shipping, including the ShippingRate applied on the invoice.
330
- attr_reader :shipping_cost
331
- # 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.
332
- attr_reader :shipping_details
333
- # 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.
334
- attr_reader :starting_balance
335
- # Extra information about an invoice for the customer's credit card statement.
336
- attr_reader :statement_descriptor
337
- # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview)
338
- attr_reader :status
339
- # Attribute for field status_transitions
340
- attr_reader :status_transitions
341
- # Attribute for field subscription
342
- attr_reader :subscription
343
- # Details about the subscription that created this invoice.
344
- attr_reader :subscription_details
345
- # Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
346
- attr_reader :subscription_proration_date
347
- # 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
348
- attr_reader :subtotal
349
- # 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
350
- attr_reader :subtotal_excluding_tax
351
- # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
352
- attr_reader :tax
353
- # ID of the test clock this invoice belongs to.
354
- attr_reader :test_clock
355
- # Attribute for field threshold_reason
356
- attr_reader :threshold_reason
357
- # Total after discounts and taxes.
358
- attr_reader :total
359
- # The aggregate amounts calculated per discount across all line items.
360
- attr_reader :total_discount_amounts
361
- # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax.
362
- attr_reader :total_excluding_tax
363
- # The aggregate amounts calculated per margin across all line items.
364
- attr_reader :total_margin_amounts
365
- # 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.
366
- attr_reader :total_pretax_credit_amounts
367
- # The aggregate amounts calculated per tax rate for all line items.
368
- attr_reader :total_tax_amounts
369
- # 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.
370
- attr_reader :transfer_data
371
- # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://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.
372
- attr_reader :webhooks_delivered_at
373
- end
374
- end
@@ -1,170 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- class QuotePreviewSubscriptionSchedule < APIResource
6
- OBJECT_NAME = "quote_preview_subscription_schedule"
7
- def self.object_name
8
- "quote_preview_subscription_schedule"
9
- end
10
-
11
- class AppliesTo < Stripe::StripeObject
12
- attr_reader :new_reference, :subscription_schedule, :type
13
- end
14
-
15
- class CurrentPhase < Stripe::StripeObject
16
- attr_reader :end_date, :start_date
17
- end
18
-
19
- class DefaultSettings < Stripe::StripeObject
20
- class AutomaticTax < Stripe::StripeObject
21
- class Liability < Stripe::StripeObject
22
- attr_reader :account, :type
23
- end
24
- attr_reader :disabled_reason, :enabled, :liability
25
- end
26
-
27
- class BillingThresholds < Stripe::StripeObject
28
- attr_reader :amount_gte, :reset_billing_cycle_anchor
29
- end
30
-
31
- class InvoiceSettings < Stripe::StripeObject
32
- class Issuer < Stripe::StripeObject
33
- attr_reader :account, :type
34
- end
35
- attr_reader :account_tax_ids, :days_until_due, :issuer
36
- end
37
-
38
- class TransferData < Stripe::StripeObject
39
- attr_reader :amount_percent, :destination
40
- end
41
- attr_reader :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :default_payment_method, :description, :invoice_settings, :on_behalf_of, :transfer_data
42
- end
43
-
44
- class LastPriceMigrationError < Stripe::StripeObject
45
- class FailedTransition < Stripe::StripeObject
46
- attr_reader :source_price, :target_price
47
- end
48
- attr_reader :errored_at, :failed_transitions, :type
49
- end
50
-
51
- class Phase < Stripe::StripeObject
52
- class AddInvoiceItem < Stripe::StripeObject
53
- class Discount < Stripe::StripeObject
54
- class DiscountEnd < Stripe::StripeObject
55
- attr_reader :timestamp, :type
56
- end
57
- attr_reader :coupon, :discount, :discount_end, :promotion_code
58
- end
59
- attr_reader :discounts, :price, :quantity, :tax_rates
60
- end
61
-
62
- class AutomaticTax < Stripe::StripeObject
63
- class Liability < Stripe::StripeObject
64
- attr_reader :account, :type
65
- end
66
- attr_reader :disabled_reason, :enabled, :liability
67
- end
68
-
69
- class BillingThresholds < Stripe::StripeObject
70
- attr_reader :amount_gte, :reset_billing_cycle_anchor
71
- end
72
-
73
- class Discount < Stripe::StripeObject
74
- class DiscountEnd < Stripe::StripeObject
75
- attr_reader :timestamp, :type
76
- end
77
- attr_reader :coupon, :discount, :discount_end, :promotion_code
78
- end
79
-
80
- class InvoiceSettings < Stripe::StripeObject
81
- class Issuer < Stripe::StripeObject
82
- attr_reader :account, :type
83
- end
84
- attr_reader :account_tax_ids, :days_until_due, :issuer
85
- end
86
-
87
- class Item < Stripe::StripeObject
88
- class BillingThresholds < Stripe::StripeObject
89
- attr_reader :usage_gte
90
- end
91
-
92
- class Discount < Stripe::StripeObject
93
- class DiscountEnd < Stripe::StripeObject
94
- attr_reader :timestamp, :type
95
- end
96
- attr_reader :coupon, :discount, :discount_end, :promotion_code
97
- end
98
-
99
- class Trial < Stripe::StripeObject
100
- attr_reader :converts_to, :type
101
- end
102
- attr_reader :billing_thresholds, :discounts, :metadata, :plan, :price, :quantity, :tax_rates, :trial
103
- end
104
-
105
- class PauseCollection < Stripe::StripeObject
106
- attr_reader :behavior
107
- end
108
-
109
- class TransferData < Stripe::StripeObject
110
- attr_reader :amount_percent, :destination
111
- end
112
-
113
- class TrialSettings < Stripe::StripeObject
114
- class EndBehavior < Stripe::StripeObject
115
- attr_reader :prorate_up_front
116
- end
117
- attr_reader :end_behavior
118
- end
119
- attr_reader :add_invoice_items, :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :coupon, :currency, :default_payment_method, :default_tax_rates, :description, :discounts, :end_date, :invoice_settings, :items, :metadata, :on_behalf_of, :pause_collection, :proration_behavior, :start_date, :transfer_data, :trial_continuation, :trial_end, :trial_settings
120
- end
121
-
122
- class Prebilling < Stripe::StripeObject
123
- attr_reader :invoice, :period_end, :period_start, :update_behavior
124
- end
125
- # ID of the Connect Application that created the schedule.
126
- attr_reader :application
127
- # Attribute for field applies_to
128
- attr_reader :applies_to
129
- # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.
130
- attr_reader :billing_behavior
131
- # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
132
- attr_reader :canceled_at
133
- # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch.
134
- attr_reader :completed_at
135
- # Time at which the object was created. Measured in seconds since the Unix epoch.
136
- attr_reader :created
137
- # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`.
138
- attr_reader :current_phase
139
- # ID of the customer who owns the subscription schedule.
140
- attr_reader :customer
141
- # Attribute for field default_settings
142
- attr_reader :default_settings
143
- # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
144
- attr_reader :end_behavior
145
- # Unique identifier for the object.
146
- attr_reader :id
147
- # Details of the most recent price migration that failed for the subscription schedule.
148
- attr_reader :last_price_migration_error
149
- # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
150
- attr_reader :livemode
151
- # Set of [key-value pairs](https://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.
152
- attr_reader :metadata
153
- # String representing the object's type. Objects of the same type share the same value.
154
- attr_reader :object
155
- # Configuration for the subscription schedule's phases.
156
- attr_reader :phases
157
- # Time period and invoice for a Subscription billed in advance.
158
- attr_reader :prebilling
159
- # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch.
160
- attr_reader :released_at
161
- # ID of the subscription once managed by the subscription schedule (if it is released).
162
- attr_reader :released_subscription
163
- # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules).
164
- attr_reader :status
165
- # ID of the subscription managed by the subscription schedule.
166
- attr_reader :subscription
167
- # ID of the test clock this subscription schedule belongs to.
168
- attr_reader :test_clock
169
- end
170
- end
@@ -1,22 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- class ReserveTransaction < APIResource
6
- OBJECT_NAME = "reserve_transaction"
7
- def self.object_name
8
- "reserve_transaction"
9
- end
10
-
11
- # Attribute for field amount
12
- attr_reader :amount
13
- # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
14
- attr_reader :currency
15
- # An arbitrary string attached to the object. Often useful for displaying to users.
16
- attr_reader :description
17
- # Unique identifier for the object.
18
- attr_reader :id
19
- # String representing the object's type. Objects of the same type share the same value.
20
- attr_reader :object
21
- end
22
- end
@@ -1,59 +0,0 @@
1
- # File generated from our OpenAPI spec
2
- # frozen_string_literal: true
3
-
4
- module Stripe
5
- # Source mandate notifications should be created when a notification related to
6
- # a source mandate must be sent to the payer. They will trigger a webhook or
7
- # deliver an email to the customer.
8
- class SourceMandateNotification < APIResource
9
- OBJECT_NAME = "source_mandate_notification"
10
- def self.object_name
11
- "source_mandate_notification"
12
- end
13
-
14
- class AcssDebit < Stripe::StripeObject
15
- attr_reader :statement_descriptor
16
- end
17
-
18
- class BacsDebit < Stripe::StripeObject
19
- attr_reader :last4
20
- end
21
-
22
- class SepaDebit < Stripe::StripeObject
23
- attr_reader :creditor_identifier, :last4, :mandate_reference
24
- end
25
- # Attribute for field acss_debit
26
- attr_reader :acss_debit
27
- # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`.
28
- attr_reader :amount
29
- # Attribute for field bacs_debit
30
- attr_reader :bacs_debit
31
- # Time at which the object was created. Measured in seconds since the Unix epoch.
32
- attr_reader :created
33
- # Unique identifier for the object.
34
- attr_reader :id
35
- # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
36
- attr_reader :livemode
37
- # String representing the object's type. Objects of the same type share the same value.
38
- attr_reader :object
39
- # The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`.
40
- attr_reader :reason
41
- # Attribute for field sepa_debit
42
- attr_reader :sepa_debit
43
- # `Source` objects allow you to accept a variety of payment methods. They
44
- # represent a customer's payment instrument, and can be used with the Stripe API
45
- # just like a `Card` object: once chargeable, they can be charged, or can be
46
- # attached to customers.
47
- #
48
- # Stripe doesn't recommend using the deprecated [Sources API](https://stripe.com/docs/api/sources).
49
- # We recommend that you adopt the [PaymentMethods API](https://stripe.com/docs/api/payment_methods).
50
- # This newer API provides access to our latest features and payment method types.
51
- #
52
- # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers).
53
- attr_reader :source
54
- # The status of the mandate notification. Valid statuses are `pending` or `submitted`.
55
- attr_reader :status
56
- # The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`.
57
- attr_reader :type
58
- end
59
- end