stripe 15.2.1 → 15.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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -0
  3. data/CHANGELOG.md +66 -39
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +14 -50
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_version.rb +2 -1
  8. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +1 -1
  9. data/lib/stripe/resources/account.rb +89 -5
  10. data/lib/stripe/resources/account_session.rb +79 -79
  11. data/lib/stripe/resources/billing_portal/session.rb +2 -2
  12. data/lib/stripe/resources/charge.rb +28 -15
  13. data/lib/stripe/resources/checkout/session.rb +57 -7
  14. data/lib/stripe/resources/confirmation_token.rb +19 -11
  15. data/lib/stripe/resources/credit_note.rb +9 -9
  16. data/lib/stripe/resources/customer_session.rb +2 -2
  17. data/lib/stripe/resources/event.rb +1 -1
  18. data/lib/stripe/resources/identity/verification_session.rb +34 -0
  19. data/lib/stripe/resources/invoice.rb +29 -4
  20. data/lib/stripe/resources/invoice_item.rb +1 -4
  21. data/lib/stripe/resources/mandate.rb +3 -0
  22. data/lib/stripe/resources/payment_intent.rb +331 -12
  23. data/lib/stripe/resources/payment_method.rb +17 -9
  24. data/lib/stripe/resources/quote.rb +26 -3
  25. data/lib/stripe/resources/setup_attempt.rb +1 -1
  26. data/lib/stripe/resources/setup_intent.rb +285 -3
  27. data/lib/stripe/resources/subscription.rb +68 -6
  28. data/lib/stripe/resources/subscription_schedule.rb +22 -0
  29. data/lib/stripe/resources/tax/registration.rb +20 -0
  30. data/lib/stripe/resources/terminal/configuration.rb +1 -0
  31. data/lib/stripe/resources/terminal/reader.rb +152 -4
  32. data/lib/stripe/resources/token.rb +1 -1
  33. data/lib/stripe/resources/treasury/financial_account.rb +5 -1
  34. data/lib/stripe/services/account_service.rb +83 -5
  35. data/lib/stripe/services/account_session_service.rb +48 -48
  36. data/lib/stripe/services/billing_portal/session_service.rb +1 -1
  37. data/lib/stripe/services/checkout/session_service.rb +57 -7
  38. data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
  39. data/lib/stripe/services/credit_note_service.rb +6 -6
  40. data/lib/stripe/services/customer_session_service.rb +1 -1
  41. data/lib/stripe/services/identity/verification_session_service.rb +16 -0
  42. data/lib/stripe/services/invoice_service.rb +29 -4
  43. data/lib/stripe/services/payment_intent_service.rb +315 -9
  44. data/lib/stripe/services/payment_method_service.rb +5 -0
  45. data/lib/stripe/services/quote_service.rb +20 -3
  46. data/lib/stripe/services/setup_intent_service.rb +275 -2
  47. data/lib/stripe/services/subscription_schedule_service.rb +13 -0
  48. data/lib/stripe/services/subscription_service.rb +48 -4
  49. data/lib/stripe/services/tax/registration_service.rb +13 -0
  50. data/lib/stripe/services/terminal/reader_service.rb +90 -0
  51. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +6 -1
  52. data/lib/stripe/services/token_service.rb +1 -1
  53. data/lib/stripe/services/treasury/financial_account_service.rb +5 -1
  54. data/lib/stripe/services/v2/billing_service.rb +2 -2
  55. data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
  56. data/lib/stripe/version.rb +1 -1
  57. data/rbi/stripe/resources/account.rbi +78 -9
  58. data/rbi/stripe/resources/account_session.rbi +79 -79
  59. data/rbi/stripe/resources/billing_portal/session.rbi +2 -2
  60. data/rbi/stripe/resources/charge.rbi +32 -15
  61. data/rbi/stripe/resources/checkout/session.rbi +65 -9
  62. data/rbi/stripe/resources/confirmation_token.rbi +23 -12
  63. data/rbi/stripe/resources/credit_note.rbi +9 -9
  64. data/rbi/stripe/resources/customer_session.rbi +2 -2
  65. data/rbi/stripe/resources/event.rbi +1 -1
  66. data/rbi/stripe/resources/identity/verification_session.rbi +39 -1
  67. data/rbi/stripe/resources/invoice.rbi +36 -6
  68. data/rbi/stripe/resources/invoice_item.rbi +1 -4
  69. data/rbi/stripe/resources/mandate.rbi +4 -0
  70. data/rbi/stripe/resources/payment_intent.rbi +361 -21
  71. data/rbi/stripe/resources/payment_method.rbi +19 -10
  72. data/rbi/stripe/resources/quote.rbi +22 -3
  73. data/rbi/stripe/resources/setup_attempt.rbi +1 -1
  74. data/rbi/stripe/resources/setup_intent.rbi +332 -9
  75. data/rbi/stripe/resources/subscription.rbi +60 -7
  76. data/rbi/stripe/resources/subscription_schedule.rbi +23 -1
  77. data/rbi/stripe/resources/tax/registration.rbi +20 -1
  78. data/rbi/stripe/resources/terminal/configuration.rbi +1 -0
  79. data/rbi/stripe/resources/terminal/location.rbi +2 -2
  80. data/rbi/stripe/resources/terminal/reader.rbi +151 -4
  81. data/rbi/stripe/resources/token.rbi +1 -1
  82. data/rbi/stripe/resources/treasury/financial_account.rbi +6 -2
  83. data/rbi/stripe/services/account_service.rbi +77 -9
  84. data/rbi/stripe/services/account_session_service.rbi +48 -48
  85. data/rbi/stripe/services/billing_portal/session_service.rbi +1 -1
  86. data/rbi/stripe/services/checkout/session_service.rbi +65 -9
  87. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +3 -3
  88. data/rbi/stripe/services/credit_note_service.rbi +6 -6
  89. data/rbi/stripe/services/customer_session_service.rbi +1 -1
  90. data/rbi/stripe/services/identity/verification_session_service.rbi +17 -1
  91. data/rbi/stripe/services/invoice_service.rbi +36 -6
  92. data/rbi/stripe/services/payment_intent_service.rbi +348 -18
  93. data/rbi/stripe/services/payment_method_service.rbi +6 -1
  94. data/rbi/stripe/services/quote_service.rbi +16 -3
  95. data/rbi/stripe/services/setup_intent_service.rbi +326 -8
  96. data/rbi/stripe/services/subscription_schedule_service.rbi +12 -1
  97. data/rbi/stripe/services/subscription_service.rbi +41 -5
  98. data/rbi/stripe/services/tax/registration_service.rbi +14 -1
  99. data/rbi/stripe/services/terminal/location_service.rbi +2 -2
  100. data/rbi/stripe/services/terminal/reader_service.rbi +85 -0
  101. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +9 -2
  102. data/rbi/stripe/services/token_service.rbi +1 -1
  103. data/rbi/stripe/services/treasury/financial_account_service.rbi +6 -2
  104. data/rbi/stripe/services/v2/billing_service.rbi +1 -1
  105. data/rbi/stripe/services/v2/core/event_destination_service.rbi +13 -13
  106. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dfe13e884372df8d3e4ea17baf54acefc1e32bb9012cd1b6eaf3b41cd6b0bcb7
4
- data.tar.gz: fe6b48ba0519a65e6889704f46994d1568294f1f4009929cd89d1234e860f167
3
+ metadata.gz: a2d72c2e4fa9d62e0defa6c35a5ca4555ab0d0e20afb07eb31b185fe1be8eea1
4
+ data.tar.gz: a5482622bdb95231f47b7444df5d37402b689fd7771d4a209cb695c89141639d
5
5
  SHA512:
6
- metadata.gz: 85b983b36836e34538300b262163412517f48565ad619e12261b6486cb186b5149c946c545eb9f206f4fec25fc240abebd19fce1a3c9b84ffdb46b20bf70d3bc
7
- data.tar.gz: 7862fa3ddfe885f8d6bd0050e329199cd51a92a6dbce2512b86ccfbbf06749f398dc3c345d2a0d54d0be35a562d87b42563ec3dee15a94c77e88550a9b994a1a
6
+ metadata.gz: 73e5f19aebfc269911a6061214abe943dfe29cbc70f578cf9cdc271ba69c6c42d8f99ac462ef6ffe5450d38fe984fa4970b391b45cd573d6064f0b4acc5b2054
7
+ data.tar.gz: 5fcd5f114f06a5b050702059942f4d3d7563d82a59b42c84ac8fa6c407022b29ee7e428076646a7a3fde6cf77394143ed920782287a747aedc0be9251d04b290
data/API_VERSION ADDED
@@ -0,0 +1 @@
1
+ 2025-06-30.basil
data/CHANGELOG.md CHANGED
@@ -1,7 +1,34 @@
1
1
  # Changelog
2
+ ## 15.3.0 - 2025-07-01
3
+ * [#1618](https://github.com/stripe/stripe-ruby/pull/1618) Update generated code
4
+ * Add support for `migrate` method on resource `Subscription`
5
+ * Add support for `collect_payment_method` and `confirm_payment_intent` methods on resource `Terminal::Reader`
6
+ * Add support for `crypto_payments` on `Account::Capability`, `Account::CreateParams::Capability`, and `Account::UpdateParams::Capability`
7
+ * Add support for `proof_of_address` on `Account::CreateParams::Document` and `Account::UpdateParams::Document`
8
+ * Add support for `monthly_payout_days` and `weekly_payout_days` on `Account::CreateParams::Setting::Payout::Schedule`, `Account::Setting::Payout::Schedule`, and `Account::UpdateParams::Setting::Payout::Schedule`
9
+ * Change `Account::Setting::Invoice.hosted_payment_method_save` to be required
10
+ * Add support for `crypto` on `Charge::PaymentMethodDetail`, `ConfirmationToken::CreateParams::PaymentMethodDatum`, `ConfirmationToken::PaymentMethodPreview`, `PaymentIntent::ConfirmParams::PaymentMethodDatum`, `PaymentIntent::ConfirmParams::PaymentMethodOption`, `PaymentIntent::CreateParams::PaymentMethodDatum`, `PaymentIntent::CreateParams::PaymentMethodOption`, `PaymentIntent::PaymentMethodOption`, `PaymentIntent::UpdateParams::PaymentMethodDatum`, `PaymentIntent::UpdateParams::PaymentMethodOption`, `PaymentMethod::CreateParams`, `PaymentMethod`, `SetupIntent::ConfirmParams::PaymentMethodDatum`, `SetupIntent::CreateParams::PaymentMethodDatum`, and `SetupIntent::UpdateParams::PaymentMethodDatum`
11
+ * Change type of `Charge::PaymentMethodDetail::Card::Installment::Plan.type`, `ConfirmationToken::CreateParams::PaymentMethodOption::Card::Installment::Plan.type`, `ConfirmationToken::PaymentMethodOption::Card::Installment::Plan.type`, `Invoice::CreateParams::PaymentSetting::PaymentMethodOption::Card::Installment::Plan.type`, `Invoice::UpdateParams::PaymentSetting::PaymentMethodOption::Card::Installment::Plan.type`, `PaymentIntent::ConfirmParams::PaymentMethodOption::Card::Installment::Plan.type`, `PaymentIntent::CreateParams::PaymentMethodOption::Card::Installment::Plan.type`, `PaymentIntent::PaymentMethodOption::Card::Installment::AvailablePlan.type`, `PaymentIntent::PaymentMethodOption::Card::Installment::Plan.type`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Card::Installment::Plan.type` from `literal('fixed_count')` to `enum('bonus'|'fixed_count'|'revolving')`
12
+ * Add support for `subscriptions` on `Checkout::Session::CreateParams::PaymentMethodOption::Klarna`, `PaymentIntent::ConfirmParams::PaymentMethodOption::Klarna`, `PaymentIntent::CreateParams::PaymentMethodOption::Klarna`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Klarna`
13
+ * Add support for `billing_mode` on `Checkout::Session::CreateParams::SubscriptionDatum`, `Invoice::CreatePreviewParams::ScheduleDetail`, `Invoice::CreatePreviewParams::SubscriptionDetail`, `Quote::CreateParams::SubscriptionDatum`, `Quote::SubscriptionDatum`, `Subscription::CreateParams`, `SubscriptionSchedule::CreateParams`, `SubscriptionSchedule`, and `Subscription`
14
+ * Change type of `Dispute.enhanced_eligibility_types` from `literal('visa_compelling_evidence_3')` to `enum('visa_compelling_evidence_3'|'visa_compliance')`
15
+ * Add support for `related_person` on `Identity::VerificationSession::CreateParams` and `Identity::VerificationSession`
16
+ * Add support for `matching` on `Identity::VerificationSession::Option`
17
+ * Add support for `klarna` on `Mandate::PaymentMethodDetail`, `SetupIntent::ConfirmParams::PaymentMethodOption`, `SetupIntent::CreateParams::PaymentMethodOption`, `SetupIntent::PaymentMethodOption`, and `SetupIntent::UpdateParams::PaymentMethodOption`
18
+ * Add support for `on_demand` on `PaymentIntent::ConfirmParams::PaymentMethodOption::Klarna`, `PaymentIntent::CreateParams::PaymentMethodOption::Klarna`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Klarna`
19
+ * Change type of `PaymentIntent::ConfirmParams::PaymentMethodOption::Klarna.setup_future_usage`, `PaymentIntent::CreateParams::PaymentMethodOption::Klarna.setup_future_usage`, `PaymentIntent::PaymentMethodOption::Klarna.setup_future_usage`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Klarna.setup_future_usage` from `literal('none')` to `enum('none'|'off_session'|'on_session')`
20
+ * Add support for `ua` on `Tax::Registration::CountryOption` and `Tax::Registration::CreateParams::CountryOption`
21
+ * Change type of `Terminal::Location::UpdateParams.display_name` from `string` to `emptyable(string)`
22
+ * Add support for `collect_payment_method` and `confirm_payment_intent` on `Terminal::Reader::Action`
23
+ * Add support for `status` on `Treasury::FinancialAccount::ListParams`
24
+ * [#1615](https://github.com/stripe/stripe-ruby/pull/1615) Update README to mention that APIResource.request was removed
25
+ * [#1619](https://github.com/stripe/stripe-ruby/pull/1619) Updated StripeClient snippets in README
26
+ * [#1621](https://github.com/stripe/stripe-ruby/pull/1621) Disable flaky test in jruby/truffleruby
27
+ * [#1620](https://github.com/stripe/stripe-ruby/pull/1620) Fix `raw_request` example in README
28
+
2
29
  ## 15.2.1 - 2025-06-04
3
30
  * [#1617](https://github.com/stripe/stripe-ruby/pull/1617) Fix `nil` requestor in `Webhook.construct_event` to allow for event data refresh
4
- * Fix bug where `Event` constructed from `Webhook.construct_event` could not be refreshed due to a `nil` APIRequestor
31
+ * Fix bug where `Event` constructed from `Webhook.construct_event` could not be refreshed due to a `nil` APIRequestor
5
32
  * Raised in https://github.com/stripe/stripe-ruby/issues/1616
6
33
 
7
34
  ## 15.2.0 - 2025-05-29
@@ -82,15 +109,15 @@
82
109
  * Adds explicit field types for resources and parameters for methods, and add RBI static annotations for all resources and services
83
110
  ![image](https://github.com/user-attachments/assets/1b6cd994-d3ea-4f47-8487-f5c7b9ebf885)
84
111
  * See [the wiki](https://github.com/stripe/stripe-ruby/wiki/Static-Type-Annotations) for more details
85
-
112
+
86
113
  * [#1543](https://github.com/stripe/stripe-ruby/pull/1543) Support for APIs in the new API version 2025-03-31.basil
87
114
 
88
115
  This release changes the pinned API version to `2025-03-31.basil`.
89
-
116
+
90
117
  ### ⚠️ Breaking changes due to changes in the Stripe API
91
118
 
92
119
  Please review details for the breaking changes and alternatives in the [Stripe API changelog](https://docs.stripe.com/changelog/basil) before upgrading.
93
-
120
+
94
121
  * Remove support for resources `SubscriptionItemUsageRecordSummary` and `SubscriptionItemUsageRecord`
95
122
  * Remove support for `create` method on resource `SubscriptionItemUsageRecord`
96
123
  * Remove support for `list` method on resource `SubscriptionItemUsageRecordSummary`
@@ -100,16 +127,16 @@
100
127
  * [#1553](https://github.com/stripe/stripe-ruby/pull/1553) Remove public idempotent_replayed? method
101
128
  * ⚠️ Remove the `idempotent_replayed?` method on `StripeError`
102
129
  * The information is accessible indirectly via the raw response headers, `StripeResponse.http_headers`. For example, use `resource.last_response.http_headers['Idempotent-Replayed']`
103
-
130
+
104
131
  ### Additions to the Stripe API
105
-
132
+
106
133
  * Add support for new resource `InvoicePayment`
107
134
  * Add support for `list` and `retrieve` methods on resource `InvoicePayment`
108
-
135
+
109
136
 
110
137
  ## 13.5.0 - 2025-02-24
111
138
  * [#1534](https://github.com/stripe/stripe-ruby/pull/1534) Update generated code
112
- * Fixed `Stripe::InvoiceLineItem.update` method.
139
+ * Fixed `Stripe::InvoiceLineItem.update` method.
113
140
  * [#1536](https://github.com/stripe/stripe-ruby/pull/1536) Fix InvoiceLineItem parent class
114
141
  * Fix bug where `Stripe::InvoiceLineItem` had the incorrect parent class, making it error when `update` was called
115
142
  * [#1533](https://github.com/stripe/stripe-ruby/pull/1533) add codeowners file
@@ -138,7 +165,7 @@
138
165
  * [#1500](https://github.com/stripe/stripe-ruby/pull/1500) This release changes the pinned API version to `2024-12-18.acacia`.
139
166
 
140
167
  * [#1507](https://github.com/stripe/stripe-ruby/pull/1507) Pass requestor to all deserialized objects including lists
141
-
168
+
142
169
  * Fixes bug where `StripeObject` retrieved from lists could not be used to make requests, such as `refresh`
143
170
 
144
171
  ## 13.2.0 - 2024-11-20
@@ -161,24 +188,24 @@
161
188
 
162
189
  ## 13.0.2 - 2024-10-23
163
190
  * [#1473](https://github.com/stripe/stripe-ruby/pull/1473) Always return the result of APIResource#refresh in APIResource.retrieve
164
-
191
+
165
192
  * Fix bug where we would not return the mutated `self` object when calling `APIResource.retrieve`
166
193
 
167
194
  ## 13.0.1 - 2024-10-18
168
195
  * [#1471](https://github.com/stripe/stripe-ruby/pull/1471) update object tags for meter-related classes
169
-
196
+
170
197
  - fixes a bug where the `object` property of the `MeterEvent`, `MeterEventAdjustment`, and `MeterEventSession` didn't match the server.
171
198
  * [#1470](https://github.com/stripe/stripe-ruby/pull/1470) Cleaned up examples and added documentation
172
199
 
173
200
  ## 13.0.0 - 2024-10-01
174
201
  * [#1458](https://github.com/stripe/stripe-ruby/pull/1458) Support for APIs in the new API version 2024-09-30.acacia
175
-
176
- This release changes the pinned API version to `2024-09-30.acacia`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-09-30.acacia) and carefully review the API changes before upgrading.
177
-
178
- ### ⚠️ Breaking changes
179
-
202
+
203
+ This release changes the pinned API version to `2024-09-30.acacia`. Please read the [API Changelog](https://docs.stripe.com/changelog/acacia#2024-09-30.acacia) and carefully review the API changes before upgrading.
204
+
205
+ ### ⚠️ Breaking changes
206
+
180
207
  Please refer to our [migration guide for v13](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v13) for more information about the backwards incompatible changes.
181
-
208
+
182
209
  #### ❗ `StripeClient` and related changes
183
210
  * Move `StripeClient` and requestor logic to `APIRequestor`.
184
211
  * `StripeClient#request` is still available, but is deprecated and will be removed. We encourage `StripeClient#raw_request` as a replacement (see other breaking changes for more detail).
@@ -186,21 +213,21 @@
186
213
  * No global config: you can simultaneously use multiple clients with different configuration options (such as API keys)
187
214
  * No extra API calls. All API endpoints can be accessed with a single method call. You don't have to call `retrieve` before doing an `update`.
188
215
  * No static methods. Much easier mocking.
189
-
216
+
190
217
  #### Other breaking changes
191
-
218
+
192
219
  * Adjust default values around retries for HTTP requests. You can use the old defaults by setting them explicitly. New values are:
193
220
  - max retries: `0` -> `2`
194
221
  - max retry delay (seconds) `2` -> `5`
195
222
  * Remove `StripeClient#connection_manager`. This was a legacy method from years ago.
196
- * Singleton `retrieve` method now requires `params` to be passed as the first argument. Existing calls to singleton `retrieve` method with only `opts` argument will have to be updated to account for the addition of `params` argument.
223
+ * Singleton `retrieve` method now requires `params` to be passed as the first argument. Existing calls to singleton `retrieve` method with only `opts` argument will have to be updated to account for the addition of `params` argument.
197
224
  ```ruby
198
225
  params = { expand: ["available"] }
199
226
  opts = { stripe_account: "acct_123" }
200
-
227
+
201
228
  # ❌ No longer works
202
229
  Stripe::Balance.retrieve(opts)
203
-
230
+
204
231
  # ✅ Correct way to call retrieve method
205
232
  Stripe::Balance.retrieve(params, opts)
206
233
  ```
@@ -209,7 +236,7 @@
209
236
  ```ruby
210
237
  # Instead of
211
238
  Stripe::APIResource.request(:get, "/v1/endpoint", params, opts)
212
-
239
+
213
240
  # do
214
241
  client = Stripe::StripeClient.new(...)
215
242
  resp = client.raw_request(:get, "/v1/endpoint", params: params, opts: opts)
@@ -225,18 +252,18 @@
225
252
  # Before
226
253
  obj, api_key = StripeClient.execute_request(method, path, api_base: nil,
227
254
  api_key: nil, headers: {}, params: {}, usage: [])
228
-
255
+
229
256
  # is now, with base_address being one of [:api, :files, :connect, :meter_events]
230
-
257
+
231
258
  obj, opts = APIRequestor.execute_request(method, path, base_address,
232
259
  params: {}, opts: {}, usage: [])
233
260
  puts(opts) # will output {api_key: "sk_test_123", stripe_account: "acct_123"}
234
261
  ```
235
-
236
-
262
+
263
+
237
264
  ### Additions
238
265
  * Add support for new Usage Billing APIs `Billing.MeterEvent`, `Billing.MeterEventAdjustments`, `Billing.MeterEventSession`, `Billing.MeterEventStream` and the new Events API `Core.Events` in the [v2 namespace ](https://docs.corp.stripe.com/api-v2-overview)
239
- * Add method `parse_thin_event()` on the `StripeClient` class to parse [thin events](https://docs.corp.stripe.com/event-destinations#events-overview).
266
+ * Add method `parse_thin_event()` on the `StripeClient` class to parse [thin events](https://docs.corp.stripe.com/event-destinations#events-overview).
240
267
 
241
268
 
242
269
  ## 12.6.0 - 2024-09-12
@@ -264,15 +291,15 @@
264
291
 
265
292
  * [#1433](https://github.com/stripe/stripe-ruby/pull/1433) Add usage to raw_request call
266
293
  * [#1431](https://github.com/stripe/stripe-ruby/pull/1431) Add `raw_request`
267
-
294
+
268
295
  - Adds the ability to make raw requests to the Stripe API, by providing an HTTP method and url. This is an alternative to using `Stripe::APIResource.request(...)` to make custom requests, which is discouraged and will be broken in a future major version.
269
296
 
270
297
  ## 12.1.0 - 2024-07-05
271
298
  * [#1425](https://github.com/stripe/stripe-ruby/pull/1425) Update generated code
272
299
  * Add support for `add_lines`, `remove_lines`, and `update_lines` methods on resource `Invoice`
273
300
  * [#1420](https://github.com/stripe/stripe-ruby/pull/1420) Update static methods for delete/list on BankAccount/Card to throw NotImplementedError
274
- * The below methods have been throwing `InvalidRequestError` because the urls used to make the requests have been buggy. Updating them to throw `NotImplementedError` instead just like their counterparts for update & retrieve because they cannot be implemented without the parent id.
275
-
301
+ * The below methods have been throwing `InvalidRequestError` because the urls used to make the requests have been buggy. Updating them to throw `NotImplementedError` instead just like their counterparts for update & retrieve because they cannot be implemented without the parent id.
302
+
276
303
  Methods affected | Use these instead in the context of payment method | Use these in the context of external accounts
277
304
  ------ | ------ | ----
278
305
  Stripe:: BankAccount.delete | Stripe::Customer.delete_source | Stripe::Account.delete_external_account
@@ -284,12 +311,12 @@
284
311
 
285
312
  ## 12.0.0 - 2024-06-24
286
313
  * [#1418](https://github.com/stripe/stripe-ruby/pull/1418) Add missing static method for verify on BankAccount
287
- * [#1419](https://github.com/stripe/stripe-ruby/pull/1419)
288
-
289
- This release changes the pinned API version to 2024-06-20. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-06-20) and carefully review the API changes before upgrading.
314
+ * [#1419](https://github.com/stripe/stripe-ruby/pull/1419)
315
+
316
+ This release changes the pinned API version to 2024-06-20. Please read the [API Changelog](https://docs.stripe.com/changelog/2024-06-20) and carefully review the API changes before upgrading.
290
317
 
291
318
  ### Additions
292
-
319
+
293
320
  * Add support for `finalize_amount` test helper method on resource `Issuing.Authorization`
294
321
 
295
322
  ## 11.7.0 - 2024-06-13
@@ -329,7 +356,7 @@
329
356
  ## 11.0.0 - 2024-04-10
330
357
  * [#1374](https://github.com/stripe/stripe-ruby/pull/1374)
331
358
 
332
- * This release changes the pinned API version to `2024-04-10`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2024-04-10) and carefully review the API changes before upgrading.
359
+ * This release changes the pinned API version to `2024-04-10`. Please read the [API Changelog](https://docs.stripe.com/changelog/2024-04-10) and carefully review the API changes before upgrading.
333
360
 
334
361
  ### ⚠️ Breaking changes
335
362
 
@@ -439,7 +466,7 @@
439
466
  * Add support for `create`, `list`, and `update` methods on resource `Registration`
440
467
 
441
468
  ## 10.0.0 - 2023-10-16
442
- * This release changes the pinned API version to `2023-10-16`. Please read the [API Upgrade Guide](https://stripe.com/docs/upgrades#2023-10-16) and carefully review the API changes before upgrading `stripe-ruby`.
469
+ * This release changes the pinned API version to `2023-10-16`. Please read the [API Changelog](https://docs.stripe.com/changelog/2023-10-16) and carefully review the API changes before upgrading `stripe-ruby`.
443
470
  * [#1283](https://github.com/stripe/stripe-ruby/pull/1283) Update generated code
444
471
  - Updated pinned API version
445
472
  * [#1281](https://github.com/stripe/stripe-ruby/pull/1281) Update generated code
@@ -563,7 +590,7 @@
563
590
  ## 8.0.0 - 2022-11-16
564
591
  * [#1144](https://github.com/stripe/stripe-ruby/pull/1144) Next major release changes
565
592
 
566
- Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-11-15.
593
+ Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the Stripe products, read more at https://docs.stripe.com/changelog/2022-11-15.
567
594
 
568
595
  "⚠️" symbol highlights breaking changes.
569
596
 
@@ -601,7 +628,7 @@ Breaking changes that arose during code generation of the library that we postpo
601
628
 
602
629
  ## 7.0.0 - 2022-08-02
603
630
 
604
- Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v7. For changes to the Stripe products, read more at https://stripe.com/docs/upgrades#2022-08-01.
631
+ Breaking changes that arose during code generation of the library that we postponed for the next major version. For changes to the SDK, read more detailed description at https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v7. For changes to the Stripe products, read more at https://docs.stripe.com/changelog/2022-08-01.
605
632
 
606
633
  "⚠️" symbol highlights breaking changes.
607
634
 
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v1773
1
+ v1819
data/README.md CHANGED
@@ -60,13 +60,14 @@ value:
60
60
 
61
61
  ```ruby
62
62
  require 'stripe'
63
- Stripe.api_key = 'sk_test_...'
63
+
64
+ client = Stripe::StripeClient.new("sk_test_...")
64
65
 
65
66
  # list customers
66
- Stripe::Customer.list()
67
+ customers = client.v1.customers.list()
67
68
 
68
- # retrieve single customer
69
- Stripe::Customer.retrieve('cus_123456789')
69
+ # retrieve single customer
70
+ customer = client.v1.customers.retrieve('cus_123456789')
70
71
  ```
71
72
 
72
73
  ### Per-request Configuration
@@ -78,55 +79,18 @@ per-request key and/or account:
78
79
  ```ruby
79
80
  require "stripe"
80
81
 
81
- Stripe::Customer.list(
82
- {},
83
- {
84
- api_key: 'sk_test_...',
85
- stripe_account: 'acct_...',
86
- stripe_version: '2018-02-28',
87
- }
88
- )
82
+ client = Stripe::StripeClient.new("sk_test_...")
89
83
 
90
- Stripe::Customer.retrieve(
91
- 'cus_123456789',
84
+ client.v1.customers.list(
85
+ {},
92
86
  {
93
87
  api_key: 'sk_test_...',
94
88
  stripe_account: 'acct_...',
95
89
  stripe_version: '2018-02-28',
96
90
  }
97
91
  )
98
-
99
- Stripe::Customer.retrieve(
100
- {
101
- id: 'cus_123456789',
102
- expand: %w(balance_transaction)
103
- },
104
- {
105
- stripe_version: '2018-02-28',
106
- api_key: 'sk_test_...',
107
- }
108
- )
109
-
110
- Stripe::Customer.capture(
111
- 'cus_123456789',
112
- {},
113
- {
114
- stripe_version: '2018-02-28',
115
- api_key: 'sk_test_...',
116
- }
117
- )
118
92
  ```
119
93
 
120
- Keep in mind that there are different method signatures depending on the action:
121
-
122
- - When operating on a collection (e.g. `.list`, `.create`) the method signature is
123
- `method(params, opts)`.
124
- - When operating on resource (e.g. `.capture`, `.update`) the method signature is
125
- `method(id, params, opts)`.
126
- - One exception is that `retrieve`, despite being an operation on a resource, has the signature
127
- `retrieve(id, opts)`. In addition, it will accept a Hash for the `id` param but will extract the
128
- `id` key out and use the others as options.
129
-
130
94
  ### StripeClient vs legacy pattern
131
95
 
132
96
  We introduced the `StripeClient` class in v13 of the Ruby SDK. The legacy pattern used prior to that version is still available to use but will be marked as deprecated soon. Review the [migration guide to use StripeClient](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v13) to move from the legacy pattern.
@@ -138,7 +102,7 @@ Once the legacy pattern is deprecated, new API endpoints will only be accessible
138
102
  Both indexer and accessors can be used to retrieve values of resource properties.
139
103
 
140
104
  ```ruby
141
- customer = Stripe::Customer.retrieve('cus_123456789')
105
+ customer = client.v1.customers.retrieve('cus_123456789')
142
106
  puts customer['id']
143
107
  puts customer.id
144
108
  ```
@@ -146,7 +110,7 @@ puts customer.id
146
110
  NOTE: If the resource property is not defined, the accessors will raise an exception, while the indexer will return `nil`.
147
111
 
148
112
  ```ruby
149
- customer = Stripe::Customer.retrieve('cus_123456789')
113
+ customer = client.v1.customers.retrieve('cus_123456789')
150
114
  puts customer['unknown'] # nil
151
115
  puts customer.unknown # raises NoMethodError
152
116
  ```
@@ -156,7 +120,7 @@ puts customer.unknown # raises NoMethodError
156
120
  Get access to response objects by using the `last_response` property of the returned resource:
157
121
 
158
122
  ```ruby
159
- customer = Stripe::Customer.retrieve('cus_123456789')
123
+ customer = client.v1.customers.retrieve('cus_123456789')
160
124
 
161
125
  print(customer.last_response.http_status) # to retrieve status code
162
126
  print(customer.last_response.http_headers) # to retrieve headers
@@ -383,13 +347,13 @@ If you:
383
347
 
384
348
  - would like to send a request to an undocumented API (for example you are in a private beta)
385
349
  - prefer to bypass the method definitions in the library and specify your request details directly,
386
- - used the method `Stripe::APIResource.request(...)` to specify your own requests, which will soon be broken
350
+ - used the method `Stripe::APIResource.request(...)` to specify your own requests, which was removed in v13+
387
351
 
388
352
  you can now use the `raw_request` method on `StripeClient`.
389
353
 
390
354
  ```ruby
391
- client = Stripe::StripeClient.new(...)
392
- resp = client.raw_request(:post, "/v1/beta_endpoint", {param: 123}, {stripe_version: "2022-11-15; feature_beta=v3"})
355
+ client = Stripe::StripeClient.new('sk_test_...')
356
+ resp = client.raw_request(:post, "/v1/beta_endpoint", params: {param: 123}, opts: {stripe_version: "2022-11-15; feature_beta=v3"})
393
357
 
394
358
  # (Optional) resp is a StripeResponse. You can use `Stripe.deserialize` to get a StripeObject.
395
359
  deserialized_resp = client.deserialize(resp.http_body)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 15.2.1
1
+ 15.3.0
@@ -3,6 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module ApiVersion
6
- CURRENT = "2025-05-28.basil"
6
+ CURRENT = "2025-06-30.basil"
7
+ CURRENT_MAJOR = "basil"
7
8
  end
8
9
  end
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
- # A ping event used to test the connection to an event destination.
5
+ # A ping event used to test the connection to an EventDestination.
6
6
  class V2CoreEventDestinationPingEvent < Stripe::V2::Event
7
7
  def self.lookup_type
8
8
  "v2.core.event_destination.ping"