stripe 12.2.0.pre.beta.1 → 12.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +671 -1341
  3. data/OPENAPI_VERSION +1 -1
  4. data/README.md +7 -1
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_operations/request.rb +5 -2
  7. data/lib/stripe/api_version.rb +0 -1
  8. data/lib/stripe/object_types.rb +0 -17
  9. data/lib/stripe/resources/billing_portal/session.rb +1 -1
  10. data/lib/stripe/resources/financial_connections/account.rb +0 -3
  11. data/lib/stripe/resources/identity/verification_report.rb +1 -1
  12. data/lib/stripe/resources/invoice.rb +0 -37
  13. data/lib/stripe/resources/payment_intent.rb +0 -50
  14. data/lib/stripe/resources/payment_method_domain.rb +1 -1
  15. data/lib/stripe/resources/quote.rb +0 -104
  16. data/lib/stripe/resources/subscription.rb +3 -3
  17. data/lib/stripe/resources/subscription_schedule.rb +0 -20
  18. data/lib/stripe/resources/terminal/reader.rb +0 -60
  19. data/lib/stripe/resources.rb +0 -16
  20. data/lib/stripe/stripe_client.rb +28 -60
  21. data/lib/stripe/stripe_configuration.rb +1 -2
  22. data/lib/stripe/util.rb +1 -8
  23. data/lib/stripe/version.rb +1 -1
  24. data/lib/stripe.rb +0 -29
  25. metadata +4 -21
  26. data/lib/stripe/request_signing_authenticator.rb +0 -79
  27. data/lib/stripe/resources/account_notice.rb +0 -32
  28. data/lib/stripe/resources/capital/financing_offer.rb +0 -49
  29. data/lib/stripe/resources/capital/financing_summary.rb +0 -15
  30. data/lib/stripe/resources/capital/financing_transaction.rb +0 -27
  31. data/lib/stripe/resources/financial_connections/account_inferred_balance.rb +0 -14
  32. data/lib/stripe/resources/financial_connections/institution.rb +0 -26
  33. data/lib/stripe/resources/gift_cards/card.rb +0 -59
  34. data/lib/stripe/resources/gift_cards/transaction.rb +0 -93
  35. data/lib/stripe/resources/invoice_payment.rb +0 -12
  36. data/lib/stripe/resources/issuing/credit_underwriting_record.rb +0 -88
  37. data/lib/stripe/resources/margin.rb +0 -37
  38. data/lib/stripe/resources/order.rb +0 -120
  39. data/lib/stripe/resources/quote_phase.rb +0 -39
  40. data/lib/stripe/resources/quote_preview_invoice.rb +0 -43
  41. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +0 -11
  42. data/lib/stripe/resources/tax/form.rb +0 -49
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v1108
1
+ v1126
data/README.md CHANGED
@@ -340,7 +340,13 @@ Stripe.add_beta_version("feature_beta", "v3")
340
340
 
341
341
  ### Custom requests
342
342
 
343
- If you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `raw_request` method on `Stripe`.
343
+ If you:
344
+
345
+ - would like to send a request to an undocumented API (for example you are in a private beta)
346
+ - prefer to bypass the method definitions in the library and specify your request details directly,
347
+ - used the method `Stripe::APIResource.request(...)` to specify your own requests, which will soon be broken
348
+
349
+ you can now use the `raw_request` method on `Stripe`.
344
350
 
345
351
  ```ruby
346
352
  resp = Stripe.raw_request(:post, "/v1/beta_endpoint", {param: 123}, {stripe_version: "2022-11-15; feature_beta=v3"})
data/VERSION CHANGED
@@ -1 +1 @@
1
- 12.2.0-beta.1
1
+ 12.3.0
@@ -48,14 +48,13 @@ module Stripe
48
48
  api_key = headers.delete(:api_key)
49
49
  api_base = headers.delete(:api_base)
50
50
  client = headers.delete(:client)
51
- api_mode = headers.delete(:api_mode)
52
51
  # Assume all remaining opts must be headers
53
52
 
54
53
  resp, opts[:api_key] = client.send(
55
54
  client_request_method_sym,
56
55
  method, url,
57
56
  api_base: api_base, api_key: api_key,
58
- headers: headers, params: params, usage: usage, api_mode: api_mode,
57
+ headers: headers, params: params, usage: usage,
59
58
  &read_body_chunk_block
60
59
  )
61
60
 
@@ -79,6 +78,8 @@ module Stripe
79
78
  # place for backwards compatibility. Consider removing it on the next
80
79
  # major.
81
80
  alias request execute_resource_request
81
+ extend Gem::Deprecate
82
+ deprecate :request, "Stripe.raw_request", 2024, 7
82
83
 
83
84
  private def error_on_non_string_user_opts(opts)
84
85
  Util::OPTS_USER_SPECIFIED.each do |opt|
@@ -135,6 +136,8 @@ module Stripe
135
136
 
136
137
  # See notes on `alias` above.
137
138
  alias request execute_resource_request
139
+ extend Gem::Deprecate
140
+ deprecate :request, "Stripe.raw_request", 2024, 7
138
141
  end
139
142
  end
140
143
  end
@@ -4,6 +4,5 @@
4
4
  module Stripe
5
5
  module ApiVersion
6
6
  CURRENT = "2024-06-20"
7
- PREVIEW = "2024-05-23.preview-v2"
8
7
  end
9
8
  end
@@ -15,7 +15,6 @@ module Stripe
15
15
  # object classes: The beginning of the section generated from our OpenAPI spec
16
16
  Account.object_name => Account,
17
17
  AccountLink.object_name => AccountLink,
18
- AccountNotice.object_name => AccountNotice,
19
18
  AccountSession.object_name => AccountSession,
20
19
  ApplePayDomain.object_name => ApplePayDomain,
21
20
  ApplicationFee.object_name => ApplicationFee,
@@ -31,9 +30,6 @@ module Stripe
31
30
  BillingPortal::Configuration.object_name => BillingPortal::Configuration,
32
31
  BillingPortal::Session.object_name => BillingPortal::Session,
33
32
  Capability.object_name => Capability,
34
- Capital::FinancingOffer.object_name => Capital::FinancingOffer,
35
- Capital::FinancingSummary.object_name => Capital::FinancingSummary,
36
- Capital::FinancingTransaction.object_name => Capital::FinancingTransaction,
37
33
  Card.object_name => Card,
38
34
  CashBalance.object_name => CashBalance,
39
35
  Charge.object_name => Charge,
@@ -60,27 +56,20 @@ module Stripe
60
56
  File.object_name => File,
61
57
  FileLink.object_name => FileLink,
62
58
  FinancialConnections::Account.object_name => FinancialConnections::Account,
63
- FinancialConnections::AccountInferredBalance.object_name =>
64
- FinancialConnections::AccountInferredBalance,
65
59
  FinancialConnections::AccountOwner.object_name => FinancialConnections::AccountOwner,
66
60
  FinancialConnections::AccountOwnership.object_name => FinancialConnections::AccountOwnership,
67
- FinancialConnections::Institution.object_name => FinancialConnections::Institution,
68
61
  FinancialConnections::Session.object_name => FinancialConnections::Session,
69
62
  FinancialConnections::Transaction.object_name => FinancialConnections::Transaction,
70
63
  Forwarding::Request.object_name => Forwarding::Request,
71
64
  FundingInstructions.object_name => FundingInstructions,
72
- GiftCards::Card.object_name => GiftCards::Card,
73
- GiftCards::Transaction.object_name => GiftCards::Transaction,
74
65
  Identity::VerificationReport.object_name => Identity::VerificationReport,
75
66
  Identity::VerificationSession.object_name => Identity::VerificationSession,
76
67
  Invoice.object_name => Invoice,
77
68
  InvoiceItem.object_name => InvoiceItem,
78
69
  InvoiceLineItem.object_name => InvoiceLineItem,
79
- InvoicePayment.object_name => InvoicePayment,
80
70
  Issuing::Authorization.object_name => Issuing::Authorization,
81
71
  Issuing::Card.object_name => Issuing::Card,
82
72
  Issuing::Cardholder.object_name => Issuing::Cardholder,
83
- Issuing::CreditUnderwritingRecord.object_name => Issuing::CreditUnderwritingRecord,
84
73
  Issuing::Dispute.object_name => Issuing::Dispute,
85
74
  Issuing::PersonalizationDesign.object_name => Issuing::PersonalizationDesign,
86
75
  Issuing::PhysicalBundle.object_name => Issuing::PhysicalBundle,
@@ -89,8 +78,6 @@ module Stripe
89
78
  LineItem.object_name => LineItem,
90
79
  LoginLink.object_name => LoginLink,
91
80
  Mandate.object_name => Mandate,
92
- Margin.object_name => Margin,
93
- Order.object_name => Order,
94
81
  PaymentIntent.object_name => PaymentIntent,
95
82
  PaymentLink.object_name => PaymentLink,
96
83
  PaymentMethod.object_name => PaymentMethod,
@@ -104,9 +91,6 @@ module Stripe
104
91
  ProductFeature.object_name => ProductFeature,
105
92
  PromotionCode.object_name => PromotionCode,
106
93
  Quote.object_name => Quote,
107
- QuotePhase.object_name => QuotePhase,
108
- QuotePreviewInvoice.object_name => QuotePreviewInvoice,
109
- QuotePreviewSubscriptionSchedule.object_name => QuotePreviewSubscriptionSchedule,
110
94
  Radar::EarlyFraudWarning.object_name => Radar::EarlyFraudWarning,
111
95
  Radar::ValueList.object_name => Radar::ValueList,
112
96
  Radar::ValueListItem.object_name => Radar::ValueListItem,
@@ -126,7 +110,6 @@ module Stripe
126
110
  SubscriptionSchedule.object_name => SubscriptionSchedule,
127
111
  Tax::Calculation.object_name => Tax::Calculation,
128
112
  Tax::CalculationLineItem.object_name => Tax::CalculationLineItem,
129
- Tax::Form.object_name => Tax::Form,
130
113
  Tax::Registration.object_name => Tax::Registration,
131
114
  Tax::Settings.object_name => Tax::Settings,
132
115
  Tax::Transaction.object_name => Tax::Transaction,
@@ -16,7 +16,7 @@ module Stripe
16
16
  # Create sessions on-demand when customers intend to manage their subscriptions
17
17
  # and billing details.
18
18
  #
19
- # Learn more in the [integration guide](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal).
19
+ # Related guide: [Customer management](https://stripe.com/customer-management)
20
20
  class Session < APIResource
21
21
  extend Stripe::APIOperations::Create
22
22
 
@@ -6,15 +6,12 @@ module Stripe
6
6
  # A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
7
7
  class Account < APIResource
8
8
  extend Stripe::APIOperations::List
9
- extend Stripe::APIOperations::NestedResource
10
9
 
11
10
  OBJECT_NAME = "financial_connections.account"
12
11
  def self.object_name
13
12
  "financial_connections.account"
14
13
  end
15
14
 
16
- nested_resource_class_methods :inferred_balance, operations: %i[list]
17
-
18
15
  # Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
19
16
  def disconnect(params = {}, opts = {})
20
17
  request_stripe_object(
@@ -13,7 +13,7 @@ module Stripe
13
13
  # API. To configure and create VerificationReports, use the
14
14
  # [VerificationSession](https://stripe.com/docs/api/identity/verification_sessions) API.
15
15
  #
16
- # Related guides: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).
16
+ # Related guide: [Accessing verification results](https://stripe.com/docs/identity/verification-sessions#results).
17
17
  class VerificationReport < APIResource
18
18
  extend Stripe::APIOperations::List
19
19
 
@@ -48,7 +48,6 @@ module Stripe
48
48
  end
49
49
 
50
50
  nested_resource_class_methods :line, operations: %i[list]
51
- nested_resource_class_methods :payment, operations: %i[retrieve list]
52
51
 
53
52
  # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft.
54
53
  def add_lines(params = {}, opts = {})
@@ -70,42 +69,6 @@ module Stripe
70
69
  )
71
70
  end
72
71
 
73
- # Attaches a PaymentIntent to the invoice, adding it to the list of payments.
74
- # When the PaymentIntent's status changes to succeeded, the payment is credited
75
- # to the invoice, increasing its amount_paid. When the invoice is fully paid, the
76
- # invoice's status becomes paid.
77
- #
78
- # If the PaymentIntent's status is already succeeded when it is attached, it is
79
- # credited to the invoice immediately.
80
- #
81
- # Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
82
- def attach_payment_intent(params = {}, opts = {})
83
- request_stripe_object(
84
- method: :post,
85
- path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(self["id"]) }),
86
- params: params,
87
- opts: opts
88
- )
89
- end
90
-
91
- # Attaches a PaymentIntent to the invoice, adding it to the list of payments.
92
- # When the PaymentIntent's status changes to succeeded, the payment is credited
93
- # to the invoice, increasing its amount_paid. When the invoice is fully paid, the
94
- # invoice's status becomes paid.
95
- #
96
- # If the PaymentIntent's status is already succeeded when it is attached, it is
97
- # credited to the invoice immediately.
98
- #
99
- # Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create)
100
- def self.attach_payment_intent(invoice, params = {}, opts = {})
101
- request_stripe_object(
102
- method: :post,
103
- path: format("/v1/invoices/%<invoice>s/attach_payment_intent", { invoice: CGI.escape(invoice) }),
104
- params: params,
105
- opts: opts
106
- )
107
- end
108
-
109
72
  # This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
110
73
  def self.create(params = {}, opts = {})
111
74
  request_stripe_object(method: :post, path: "/v1/invoices", params: params, opts: opts)
@@ -176,56 +176,6 @@ module Stripe
176
176
  request_stripe_object(method: :post, path: "/v1/payment_intents", params: params, opts: opts)
177
177
  end
178
178
 
179
- # Perform a decremental authorization on an eligible
180
- # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
181
- # PaymentIntent's status must be requires_capture and
182
- # [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization)
183
- # must be available.
184
- #
185
- # Decremental authorizations decrease the authorized amount on your customer's card
186
- # to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount.
187
- #
188
- # After decrement, the PaymentIntent object
189
- # returns with the updated
190
- # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
191
- # The PaymentIntent will now be capturable up to the new authorized amount.
192
- #
193
- # Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines.
194
- # After it's fully captured, a PaymentIntent can no longer be decremented.
195
- def decrement_authorization(params = {}, opts = {})
196
- request_stripe_object(
197
- method: :post,
198
- path: format("/v1/payment_intents/%<intent>s/decrement_authorization", { intent: CGI.escape(self["id"]) }),
199
- params: params,
200
- opts: opts
201
- )
202
- end
203
-
204
- # Perform a decremental authorization on an eligible
205
- # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
206
- # PaymentIntent's status must be requires_capture and
207
- # [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization)
208
- # must be available.
209
- #
210
- # Decremental authorizations decrease the authorized amount on your customer's card
211
- # to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount.
212
- #
213
- # After decrement, the PaymentIntent object
214
- # returns with the updated
215
- # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount).
216
- # The PaymentIntent will now be capturable up to the new authorized amount.
217
- #
218
- # Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines.
219
- # After it's fully captured, a PaymentIntent can no longer be decremented.
220
- def self.decrement_authorization(intent, params = {}, opts = {})
221
- request_stripe_object(
222
- method: :post,
223
- path: format("/v1/payment_intents/%<intent>s/decrement_authorization", { intent: CGI.escape(intent) }),
224
- params: params,
225
- opts: opts
226
- )
227
- end
228
-
229
179
  # Perform an incremental authorization on an eligible
230
180
  # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the
231
181
  # PaymentIntent's status must be requires_capture and
@@ -5,7 +5,7 @@ module Stripe
5
5
  # A payment method domain represents a web domain that you have registered with Stripe.
6
6
  # Stripe Elements use registered payment method domains to control where certain payment methods are shown.
7
7
  #
8
- # Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
8
+ # Related guide: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration).
9
9
  class PaymentMethodDomain < APIResource
10
10
  extend Stripe::APIOperations::Create
11
11
  extend Stripe::APIOperations::List
@@ -7,7 +7,6 @@ module Stripe
7
7
  class Quote < APIResource
8
8
  extend Stripe::APIOperations::Create
9
9
  extend Stripe::APIOperations::List
10
- extend Stripe::APIOperations::NestedResource
11
10
  include Stripe::APIOperations::Save
12
11
 
13
12
  OBJECT_NAME = "quote"
@@ -15,9 +14,6 @@ module Stripe
15
14
  "quote"
16
15
  end
17
16
 
18
- nested_resource_class_methods :preview_invoice, operations: %i[list]
19
- nested_resource_class_methods :preview_subscription_schedule, operations: %i[list]
20
-
21
17
  # Accepts the specified quote.
22
18
  def accept(params = {}, opts = {})
23
19
  request_stripe_object(
@@ -128,86 +124,6 @@ module Stripe
128
124
  )
129
125
  end
130
126
 
131
- # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
132
- def list_lines(params = {}, opts = {})
133
- request_stripe_object(
134
- method: :get,
135
- path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(self["id"]) }),
136
- params: params,
137
- opts: opts
138
- )
139
- end
140
-
141
- # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted.
142
- def self.list_lines(quote, params = {}, opts = {})
143
- request_stripe_object(
144
- method: :get,
145
- path: format("/v1/quotes/%<quote>s/lines", { quote: CGI.escape(quote) }),
146
- params: params,
147
- opts: opts
148
- )
149
- end
150
-
151
- # Preview the invoice line items that would be generated by accepting the quote.
152
- def list_preview_invoice_lines(preview_invoice, params = {}, opts = {})
153
- request_stripe_object(
154
- method: :get,
155
- path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(self["id"]), preview_invoice: CGI.escape(preview_invoice) }),
156
- params: params,
157
- opts: opts
158
- )
159
- end
160
-
161
- # Preview the invoice line items that would be generated by accepting the quote.
162
- def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {})
163
- request_stripe_object(
164
- method: :get,
165
- path: format("/v1/quotes/%<quote>s/preview_invoices/%<preview_invoice>s/lines", { quote: CGI.escape(quote), preview_invoice: CGI.escape(preview_invoice) }),
166
- params: params,
167
- opts: opts
168
- )
169
- end
170
-
171
- # Converts a stale quote to draft.
172
- def mark_draft(params = {}, opts = {})
173
- request_stripe_object(
174
- method: :post,
175
- path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(self["id"]) }),
176
- params: params,
177
- opts: opts
178
- )
179
- end
180
-
181
- # Converts a stale quote to draft.
182
- def self.mark_draft(quote, params = {}, opts = {})
183
- request_stripe_object(
184
- method: :post,
185
- path: format("/v1/quotes/%<quote>s/mark_draft", { quote: CGI.escape(quote) }),
186
- params: params,
187
- opts: opts
188
- )
189
- end
190
-
191
- # Converts a draft or open quote to stale.
192
- def mark_stale(params = {}, opts = {})
193
- request_stripe_object(
194
- method: :post,
195
- path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(self["id"]) }),
196
- params: params,
197
- opts: opts
198
- )
199
- end
200
-
201
- # Converts a draft or open quote to stale.
202
- def self.mark_stale(quote, params = {}, opts = {})
203
- request_stripe_object(
204
- method: :post,
205
- path: format("/v1/quotes/%<quote>s/mark_stale", { quote: CGI.escape(quote) }),
206
- params: params,
207
- opts: opts
208
- )
209
- end
210
-
211
127
  # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.corp.stripe.com/quotes/overview#quote_pdf)
212
128
  def pdf(params = {}, opts = {}, &read_body_chunk_block)
213
129
  config = opts[:client]&.config || Stripe.config
@@ -234,26 +150,6 @@ module Stripe
234
150
  )
235
151
  end
236
152
 
237
- # Recompute the upcoming invoice estimate for the quote.
238
- def reestimate(params = {}, opts = {})
239
- request_stripe_object(
240
- method: :post,
241
- path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(self["id"]) }),
242
- params: params,
243
- opts: opts
244
- )
245
- end
246
-
247
- # Recompute the upcoming invoice estimate for the quote.
248
- def self.reestimate(quote, params = {}, opts = {})
249
- request_stripe_object(
250
- method: :post,
251
- path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
252
- params: params,
253
- opts: opts
254
- )
255
- end
256
-
257
153
  # A quote models prices and services for a customer.
258
154
  def self.update(id, params = {}, opts = {})
259
155
  request_stripe_object(
@@ -115,7 +115,7 @@ module Stripe
115
115
 
116
116
  # Updates an existing subscription to match the specified parameters.
117
117
  # When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes.
118
- # To preview how the proration is calculated, use the [upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) endpoint.
118
+ # To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint.
119
119
  #
120
120
  # By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they'll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they'll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month's 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes.
121
121
  #
@@ -123,11 +123,11 @@ module Stripe
123
123
  #
124
124
  #
125
125
  # The billing interval is changed (for example, from monthly to yearly).
126
- # The subscription moves from free to paid, or paid to free.
126
+ # The subscription moves from free to paid.
127
127
  # A trial starts or ends.
128
128
  #
129
129
  #
130
- # In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date.
130
+ # In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment).
131
131
  #
132
132
  # If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create).
133
133
  #
@@ -15,26 +15,6 @@ module Stripe
15
15
  "subscription_schedule"
16
16
  end
17
17
 
18
- # Amends an existing subscription schedule.
19
- def amend(params = {}, opts = {})
20
- request_stripe_object(
21
- method: :post,
22
- path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(self["id"]) }),
23
- params: params,
24
- opts: opts
25
- )
26
- end
27
-
28
- # Amends an existing subscription schedule.
29
- def self.amend(schedule, params = {}, opts = {})
30
- request_stripe_object(
31
- method: :post,
32
- path: format("/v1/subscription_schedules/%<schedule>s/amend", { schedule: CGI.escape(schedule) }),
33
- params: params,
34
- opts: opts
35
- )
36
- end
37
-
38
18
  # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.
39
19
  def cancel(params = {}, opts = {})
40
20
  request_stripe_object(
@@ -37,66 +37,6 @@ module Stripe
37
37
  )
38
38
  end
39
39
 
40
- # Initiates an input collection flow on a Reader.
41
- def collect_inputs(params = {}, opts = {})
42
- request_stripe_object(
43
- method: :post,
44
- path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(self["id"]) }),
45
- params: params,
46
- opts: opts
47
- )
48
- end
49
-
50
- # Initiates an input collection flow on a Reader.
51
- def self.collect_inputs(reader, params = {}, opts = {})
52
- request_stripe_object(
53
- method: :post,
54
- path: format("/v1/terminal/readers/%<reader>s/collect_inputs", { reader: CGI.escape(reader) }),
55
- params: params,
56
- opts: opts
57
- )
58
- end
59
-
60
- # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
61
- def collect_payment_method(params = {}, opts = {})
62
- request_stripe_object(
63
- method: :post,
64
- path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(self["id"]) }),
65
- params: params,
66
- opts: opts
67
- )
68
- end
69
-
70
- # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
71
- def self.collect_payment_method(reader, params = {}, opts = {})
72
- request_stripe_object(
73
- method: :post,
74
- path: format("/v1/terminal/readers/%<reader>s/collect_payment_method", { reader: CGI.escape(reader) }),
75
- params: params,
76
- opts: opts
77
- )
78
- end
79
-
80
- # Finalizes a payment on a Reader.
81
- def confirm_payment_intent(params = {}, opts = {})
82
- request_stripe_object(
83
- method: :post,
84
- path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(self["id"]) }),
85
- params: params,
86
- opts: opts
87
- )
88
- end
89
-
90
- # Finalizes a payment on a Reader.
91
- def self.confirm_payment_intent(reader, params = {}, opts = {})
92
- request_stripe_object(
93
- method: :post,
94
- path: format("/v1/terminal/readers/%<reader>s/confirm_payment_intent", { reader: CGI.escape(reader) }),
95
- params: params,
96
- opts: opts
97
- )
98
- end
99
-
100
40
  # Creates a new Reader object.
101
41
  def self.create(params = {}, opts = {})
102
42
  request_stripe_object(
@@ -3,7 +3,6 @@
3
3
 
4
4
  require "stripe/resources/account"
5
5
  require "stripe/resources/account_link"
6
- require "stripe/resources/account_notice"
7
6
  require "stripe/resources/account_session"
8
7
  require "stripe/resources/apple_pay_domain"
9
8
  require "stripe/resources/application_fee"
@@ -19,9 +18,6 @@ require "stripe/resources/billing/meter_event_summary"
19
18
  require "stripe/resources/billing_portal/configuration"
20
19
  require "stripe/resources/billing_portal/session"
21
20
  require "stripe/resources/capability"
22
- require "stripe/resources/capital/financing_offer"
23
- require "stripe/resources/capital/financing_summary"
24
- require "stripe/resources/capital/financing_transaction"
25
21
  require "stripe/resources/card"
26
22
  require "stripe/resources/cash_balance"
27
23
  require "stripe/resources/charge"
@@ -48,26 +44,20 @@ require "stripe/resources/exchange_rate"
48
44
  require "stripe/resources/file"
49
45
  require "stripe/resources/file_link"
50
46
  require "stripe/resources/financial_connections/account"
51
- require "stripe/resources/financial_connections/account_inferred_balance"
52
47
  require "stripe/resources/financial_connections/account_owner"
53
48
  require "stripe/resources/financial_connections/account_ownership"
54
- require "stripe/resources/financial_connections/institution"
55
49
  require "stripe/resources/financial_connections/session"
56
50
  require "stripe/resources/financial_connections/transaction"
57
51
  require "stripe/resources/forwarding/request"
58
52
  require "stripe/resources/funding_instructions"
59
- require "stripe/resources/gift_cards/card"
60
- require "stripe/resources/gift_cards/transaction"
61
53
  require "stripe/resources/identity/verification_report"
62
54
  require "stripe/resources/identity/verification_session"
63
55
  require "stripe/resources/invoice"
64
56
  require "stripe/resources/invoice_item"
65
57
  require "stripe/resources/invoice_line_item"
66
- require "stripe/resources/invoice_payment"
67
58
  require "stripe/resources/issuing/authorization"
68
59
  require "stripe/resources/issuing/card"
69
60
  require "stripe/resources/issuing/cardholder"
70
- require "stripe/resources/issuing/credit_underwriting_record"
71
61
  require "stripe/resources/issuing/dispute"
72
62
  require "stripe/resources/issuing/personalization_design"
73
63
  require "stripe/resources/issuing/physical_bundle"
@@ -76,8 +66,6 @@ require "stripe/resources/issuing/transaction"
76
66
  require "stripe/resources/line_item"
77
67
  require "stripe/resources/login_link"
78
68
  require "stripe/resources/mandate"
79
- require "stripe/resources/margin"
80
- require "stripe/resources/order"
81
69
  require "stripe/resources/payment_intent"
82
70
  require "stripe/resources/payment_link"
83
71
  require "stripe/resources/payment_method"
@@ -91,9 +79,6 @@ require "stripe/resources/product"
91
79
  require "stripe/resources/product_feature"
92
80
  require "stripe/resources/promotion_code"
93
81
  require "stripe/resources/quote"
94
- require "stripe/resources/quote_phase"
95
- require "stripe/resources/quote_preview_invoice"
96
- require "stripe/resources/quote_preview_subscription_schedule"
97
82
  require "stripe/resources/radar/early_fraud_warning"
98
83
  require "stripe/resources/radar/value_list"
99
84
  require "stripe/resources/radar/value_list_item"
@@ -113,7 +98,6 @@ require "stripe/resources/subscription_item"
113
98
  require "stripe/resources/subscription_schedule"
114
99
  require "stripe/resources/tax/calculation"
115
100
  require "stripe/resources/tax/calculation_line_item"
116
- require "stripe/resources/tax/form"
117
101
  require "stripe/resources/tax/registration"
118
102
  require "stripe/resources/tax/settings"
119
103
  require "stripe/resources/tax/transaction"