stripe 15.3.0.pre.beta.2 → 15.4.0.pre.beta.1
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.
- checksums.yaml +4 -4
- data/API_VERSION +1 -0
- data/CHANGELOG.md +42 -16
- data/OPENAPI_VERSION +1 -1
- data/README.md +13 -49
- data/VERSION +1 -1
- data/lib/stripe/api_requestor.rb +2 -2
- data/lib/stripe/api_version.rb +1 -1
- data/lib/stripe/errors.rb +3 -3
- data/lib/stripe/events/v2_core_event_destination_ping_event.rb +1 -1
- data/lib/stripe/resources/account.rb +89 -5
- data/lib/stripe/resources/account_session.rb +93 -93
- data/lib/stripe/resources/billing_portal/session.rb +2 -2
- data/lib/stripe/resources/charge.rb +28 -15
- data/lib/stripe/resources/checkout/session.rb +53 -7
- data/lib/stripe/resources/confirmation_token.rb +19 -11
- data/lib/stripe/resources/credit_note.rb +9 -9
- data/lib/stripe/resources/customer_session.rb +2 -2
- data/lib/stripe/resources/dispute.rb +2 -0
- data/lib/stripe/resources/event.rb +1 -1
- data/lib/stripe/resources/identity/verification_session.rb +34 -0
- data/lib/stripe/resources/invoice.rb +21 -3
- data/lib/stripe/resources/invoice_item.rb +1 -4
- data/lib/stripe/resources/mandate.rb +3 -0
- data/lib/stripe/resources/order.rb +154 -2
- data/lib/stripe/resources/payment_attempt_record.rb +30 -17
- data/lib/stripe/resources/payment_intent.rb +331 -12
- data/lib/stripe/resources/payment_method.rb +17 -9
- data/lib/stripe/resources/payment_record.rb +30 -17
- data/lib/stripe/resources/quote.rb +15 -1
- data/lib/stripe/resources/quote_preview_subscription_schedule.rb +8 -1
- data/lib/stripe/resources/setup_attempt.rb +1 -1
- data/lib/stripe/resources/setup_intent.rb +285 -3
- data/lib/stripe/resources/subscription.rb +27 -10
- data/lib/stripe/resources/subscription_schedule.rb +17 -1
- data/lib/stripe/resources/tax/registration.rb +20 -0
- data/lib/stripe/resources/terminal/configuration.rb +1 -0
- data/lib/stripe/resources/terminal/reader.rb +10 -10
- data/lib/stripe/resources/token.rb +1 -1
- data/lib/stripe/resources/treasury/financial_account.rb +5 -1
- data/lib/stripe/resources/v2/core/account.rb +9 -0
- data/lib/stripe/resources/v2/money_management/financial_account.rb +3 -3
- data/lib/stripe/resources/v2/money_management/outbound_payment.rb +1 -1
- data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +1 -1
- data/lib/stripe/resources/v2/money_management/received_credit.rb +8 -2
- data/lib/stripe/services/account_service.rb +83 -5
- data/lib/stripe/services/account_session_service.rb +62 -62
- data/lib/stripe/services/billing_portal/session_service.rb +1 -1
- data/lib/stripe/services/checkout/session_service.rb +53 -7
- data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
- data/lib/stripe/services/credit_note_service.rb +6 -6
- data/lib/stripe/services/customer_session_service.rb +1 -1
- data/lib/stripe/services/identity/verification_session_service.rb +16 -0
- data/lib/stripe/services/invoice_service.rb +21 -3
- data/lib/stripe/services/order_service.rb +154 -2
- data/lib/stripe/services/payment_intent_service.rb +315 -9
- data/lib/stripe/services/payment_method_service.rb +5 -0
- data/lib/stripe/services/quote_service.rb +9 -0
- data/lib/stripe/services/setup_intent_service.rb +275 -2
- data/lib/stripe/services/subscription_schedule_service.rb +9 -0
- data/lib/stripe/services/subscription_service.rb +21 -4
- data/lib/stripe/services/tax/registration_service.rb +13 -0
- data/lib/stripe/services/terminal/reader_service.rb +4 -4
- data/lib/stripe/services/test_helpers/confirmation_token_service.rb +6 -1
- data/lib/stripe/services/token_service.rb +1 -1
- data/lib/stripe/services/treasury/financial_account_service.rb +5 -1
- data/lib/stripe/services/v2/billing_service.rb +2 -2
- data/lib/stripe/services/v2/core/account_service.rb +47 -15
- data/lib/stripe/services/v2/core/accounts/person_service.rb +9 -10
- data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
- data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +4 -5
- data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +2 -2
- data/lib/stripe/services/v2/core_service.rb +2 -2
- data/lib/stripe/services/v2/money_management/financial_address_service.rb +13 -12
- data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +36 -36
- data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +44 -45
- data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +10 -10
- data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +41 -41
- data/lib/stripe/services/v2/money_management/payout_method_service.rb +1 -2
- data/lib/stripe/services/v2/money_management_service.rb +4 -4
- data/lib/stripe/services/v2/payments/off_session_payment_service.rb +9 -10
- data/lib/stripe/services/v2_services.rb +3 -3
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe/webhook.rb +1 -1
- data/rbi/stripe.rbi +14445 -12226
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d4c52518034d7e848630739fbe09f7afb095d2d8cf74969d9b2dd28f5a51677
|
4
|
+
data.tar.gz: 76740593a8056a1cb78ccfd9f4e18adbade2e2b09b660161eccbb43cd5ade784
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5df4535cc192bb850ea2e332934e9985c7b0e9d88d08937e616f3f42e8546539e15ea312f291dcb460640f9edc2d2f63291a68ea76e7a0ccd029c71332c668b5
|
7
|
+
data.tar.gz: d5a5e828ef120fbaa21ff623b79e92292c5d1ac526e284235ad3563c61554e30b984c2f47a3f831b27c94296198e53c0e0db98ec93f88cedb4ecd5217becd917
|
data/API_VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2025-06-30.preview
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 15.4.0-beta.1 - 2025-07-01
|
4
|
+
* [#1607](https://github.com/stripe/stripe-ruby/pull/1607) Update generated code for beta
|
5
|
+
* Change type of `Checkout::Session::CreateParams::SubscriptionDatum.billing_mode`, `Invoice::CreatePreviewParams::ScheduleDetail.billing_mode`, `Invoice::CreatePreviewParams::SubscriptionDetail.billing_mode`, `Quote::CreateParams::SubscriptionDatum.billing_mode`, `Quote::SubscriptionDatum.billing_mode`, `Subscription::CreateParams.billing_mode`, and `SubscriptionSchedule::CreateParams.billing_mode` from `enum('classic'|'flexible')` to `billing_mode`
|
6
|
+
* Add support for `submission_method` on `Dispute::EvidenceDetail`
|
7
|
+
* Add support for `on_demand` and `subscriptions` on `Order::CreateParams::Payment::Setting::PaymentMethodOption::Klarna` and `Order::UpdateParams::Payment::Setting::PaymentMethodOption::Klarna`
|
8
|
+
* Change type of `Order::CreateParams::Payment::Setting::PaymentMethodOption::Klarna.setup_future_usage`, `Order::Payment::Setting::PaymentMethodOption::Klarna.setup_future_usage`, and `Order::UpdateParams::Payment::Setting::PaymentMethodOption::Klarna.setup_future_usage` from `literal('none')` to `enum('none'|'off_session'|'on_session')`
|
9
|
+
* Add support for `crypto` on `PaymentAttemptRecord::PaymentMethodDetail` and `PaymentRecord::PaymentMethodDetail`
|
10
|
+
* Change type of `PaymentIntent::ConfirmParams::PaymentMethodOption::Gopay.setup_future_usage`, `PaymentIntent::CreateParams::PaymentMethodOption::Gopay.setup_future_usage`, `PaymentIntent::PaymentMethodOption::Gopay.setup_future_usage`, and `PaymentIntent::UpdateParams::PaymentMethodOption::Gopay.setup_future_usage` from `literal('none')` to `enum('none'|'off_session')`
|
11
|
+
* Change `Quote::SubscriptionDatum.billing_mode`, `QuotePreviewSubscriptionSchedule.billing_mode`, `Subscription.billing_mode`, and `SubscriptionSchedule.billing_mode` to be required
|
12
|
+
* Change type of `QuotePreviewSubscriptionSchedule.billing_mode`, `Subscription.billing_mode`, and `SubscriptionSchedule.billing_mode` from `enum('classic'|'flexible')` to `SubscriptionsResourceBillingMode`
|
13
|
+
* Change type of `Subscription::MigrateParams.billing_mode` from `literal('flexible')` to `billing_mode_migrate`
|
14
|
+
* Remove support for `billing_mode_details` on `Subscription`
|
15
|
+
* Add support for `proof_of_address` on `V2::Core::Account::CreateParams::Identity::BusinessDetail::Document`, `V2::Core::Account::Identity::BusinessDetail::Document`, and `V2::Core::Account::UpdateParams::Identity::BusinessDetail::Document`
|
16
|
+
* Add support for `metadata` on `V2::MoneyManagement::FinancialAccount`
|
17
|
+
* Remove support for `description` on `V2::MoneyManagement::FinancialAccount`
|
18
|
+
* Remove support for `attempts` on `V2::Payments::OffSessionPayment`
|
19
|
+
* Change type of `V2::Payments::OffSessionPayment::TransferDatum.amount` from `integer` to `nullable(integer)`
|
20
|
+
* Add support for `from_account`, `outbound_payment`, and `outbound_transfer` on `V2::MoneyManagement::ReceivedCredit::BalanceTransfer`
|
21
|
+
* Change type of `V2::MoneyManagement::ReceivedCredit::BalanceTransfer.type` from `literal('payout_v1')` to `enum('outbound_payment'|'outbound_transfer'|'payout_v1')`
|
22
|
+
* Change type of `V2::MoneyManagement::ReceivedCredit::BalanceTransfer.payout_v1` from `string` to `nullable(string)`
|
23
|
+
* Change `V2::Payments::OffSessionPayment::CreateParams::TransferDatum.amount` to be optional
|
24
|
+
|
3
25
|
## 15.3.0-beta.2 - 2025-06-26
|
4
26
|
* [#1623](https://github.com/stripe/stripe-ruby/pull/1623) Pull in OffSessionPayment changes for the May release
|
5
27
|
|
@@ -42,6 +64,11 @@ This release changes the pinned API version to `2025-05-28.preview`.
|
|
42
64
|
* Add support for `tax_transaction_attempts` on `Tax::Association`
|
43
65
|
* Add support for `confirm_config` on `Terminal::Reader::Action::ConfirmPaymentIntent` and `Terminal::Reader::ConfirmPaymentIntentParams`
|
44
66
|
|
67
|
+
## 15.2.1 - 2025-06-04
|
68
|
+
* [#1617](https://github.com/stripe/stripe-ruby/pull/1617) Fix `nil` requestor in `Webhook.construct_event` to allow for event data refresh
|
69
|
+
* Fix bug where `Event` constructed from `Webhook.construct_event` could not be refreshed due to a `nil` APIRequestor
|
70
|
+
* Raised in https://github.com/stripe/stripe-ruby/issues/1616
|
71
|
+
|
45
72
|
## 15.2.0 - 2025-05-29
|
46
73
|
This release changes the pinned API version to `2025-05-28.basil`.
|
47
74
|
|
@@ -224,15 +251,15 @@ This release changes the pinned API version to `2025-05-28.preview`.
|
|
224
251
|
* Adds explicit field types for resources and parameters for methods, and add RBI static annotations for all resources and services
|
225
252
|

|
226
253
|
* See [the wiki](https://github.com/stripe/stripe-ruby/wiki/Static-Type-Annotations) for more details
|
227
|
-
|
254
|
+
|
228
255
|
* [#1543](https://github.com/stripe/stripe-ruby/pull/1543) Support for APIs in the new API version 2025-03-31.basil
|
229
256
|
|
230
257
|
This release changes the pinned API version to `2025-03-31.basil`.
|
231
|
-
|
258
|
+
|
232
259
|
### ⚠️ Breaking changes due to changes in the Stripe API
|
233
260
|
|
234
261
|
Please review details for the breaking changes and alternatives in the [Stripe API changelog](https://docs.stripe.com/changelog/basil) before upgrading.
|
235
|
-
|
262
|
+
|
236
263
|
* Remove support for resources `SubscriptionItemUsageRecordSummary` and `SubscriptionItemUsageRecord`
|
237
264
|
* Remove support for `create` method on resource `SubscriptionItemUsageRecord`
|
238
265
|
* Remove support for `list` method on resource `SubscriptionItemUsageRecordSummary`
|
@@ -242,9 +269,9 @@ This release changes the pinned API version to `2025-05-28.preview`.
|
|
242
269
|
* [#1553](https://github.com/stripe/stripe-ruby/pull/1553) Remove public idempotent_replayed? method
|
243
270
|
* ⚠️ Remove the `idempotent_replayed?` method on `StripeError`
|
244
271
|
* The information is accessible indirectly via the raw response headers, `StripeResponse.http_headers`. For example, use `resource.last_response.http_headers['Idempotent-Replayed']`
|
245
|
-
|
272
|
+
|
246
273
|
### Additions to the Stripe API
|
247
|
-
|
274
|
+
|
248
275
|
* Add support for new resource `InvoicePayment`
|
249
276
|
* Add support for `list` and `retrieve` methods on resource `InvoicePayment`
|
250
277
|
|
@@ -255,9 +282,6 @@ This release changes the pinned API version to `2025-05-28.preview`.
|
|
255
282
|
* Add support for `succeed_input_collection` and `timeout_input_collection` test helper methods on resource `Terminal.Reader`
|
256
283
|
* [#1545](https://github.com/stripe/stripe-ruby/pull/1545) fix ruby merge conflict for beta
|
257
284
|
|
258
|
-
## 13.5.0-beta.1 - 2025-02-07
|
259
|
-
* [#1527](https://github.com/stripe/stripe-ruby/pull/1527) Update generated code for beta
|
260
|
-
|
261
285
|
## 13.5.0 - 2025-02-24
|
262
286
|
* [#1534](https://github.com/stripe/stripe-ruby/pull/1534) Update generated code
|
263
287
|
* Fixed `Stripe::InvoiceLineItem.update` method.
|
@@ -265,6 +289,9 @@ This release changes the pinned API version to `2025-05-28.preview`.
|
|
265
289
|
* Fix bug where `Stripe::InvoiceLineItem` had the incorrect parent class, making it error when `update` was called
|
266
290
|
* [#1533](https://github.com/stripe/stripe-ruby/pull/1533) add codeowners file
|
267
291
|
|
292
|
+
## 13.5.0-beta.1 - 2025-02-07
|
293
|
+
* [#1527](https://github.com/stripe/stripe-ruby/pull/1527) Update generated code for beta
|
294
|
+
|
268
295
|
## 13.4.1 - 2025-01-28
|
269
296
|
* [#1528](https://github.com/stripe/stripe-ruby/pull/1528) Update generated code
|
270
297
|
* ⚠️ Bugfix: `invoice` and `line_item_id` can be passed to `update` method in `InvoiceLineItem`.
|
@@ -394,7 +421,7 @@ This release changes the pinned API version to `2025-05-28.preview`.
|
|
394
421
|
## 13.0.0 - 2024-10-01
|
395
422
|
* [#1458](https://github.com/stripe/stripe-ruby/pull/1458) Support for APIs in the new API version 2024-09-30.acacia
|
396
423
|
|
397
|
-
This release changes the pinned API version to `2024-09-30.acacia`. Please read the [API
|
424
|
+
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.
|
398
425
|
|
399
426
|
### ⚠️ Breaking changes
|
400
427
|
|
@@ -539,7 +566,7 @@ This release changes the pinned API version to `2025-05-28.preview`.
|
|
539
566
|
* [#1418](https://github.com/stripe/stripe-ruby/pull/1418) Add missing static method for verify on BankAccount
|
540
567
|
* [#1419](https://github.com/stripe/stripe-ruby/pull/1419)
|
541
568
|
|
542
|
-
This release changes the pinned API version to 2024-06-20. Please read the [API
|
569
|
+
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.
|
543
570
|
|
544
571
|
### Additions
|
545
572
|
|
@@ -600,7 +627,7 @@ This release changes the pinned API version to `2025-05-28.preview`.
|
|
600
627
|
## 11.0.0 - 2024-04-10
|
601
628
|
* [#1374](https://github.com/stripe/stripe-ruby/pull/1374)
|
602
629
|
|
603
|
-
* This release changes the pinned API version to `2024-04-10`. Please read the [API
|
630
|
+
* 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.
|
604
631
|
|
605
632
|
### ⚠️ Breaking changes
|
606
633
|
|
@@ -829,9 +856,8 @@ Updated stable APIs to the latest version
|
|
829
856
|
- [#1282](https://github.com/stripe/stripe-ruby/pull/1282) Update generated code for beta
|
830
857
|
|
831
858
|
## 10.0.0 - 2023-10-16
|
832
|
-
|
833
|
-
|
834
|
-
- [#1283](https://github.com/stripe/stripe-ruby/pull/1283) Update generated code
|
859
|
+
* 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`.
|
860
|
+
* [#1283](https://github.com/stripe/stripe-ruby/pull/1283) Update generated code
|
835
861
|
- Updated pinned API version
|
836
862
|
- [#1281](https://github.com/stripe/stripe-ruby/pull/1281) Update generated code
|
837
863
|
- Documentation only changes
|
@@ -1180,7 +1206,7 @@ Updated stable APIs to the latest version
|
|
1180
1206
|
|
1181
1207
|
- [#1144](https://github.com/stripe/stripe-ruby/pull/1144) Next major release changes
|
1182
1208
|
|
1183
|
-
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/
|
1209
|
+
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.
|
1184
1210
|
|
1185
1211
|
"⚠️" symbol highlights breaking changes.
|
1186
1212
|
|
@@ -1235,7 +1261,7 @@ Breaking changes that arose during code generation of the library that we postpo
|
|
1235
1261
|
|
1236
1262
|
## 7.0.0 - 2022-08-02
|
1237
1263
|
|
1238
|
-
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/
|
1264
|
+
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.
|
1239
1265
|
|
1240
1266
|
"⚠️" symbol highlights breaking changes.
|
1241
1267
|
|
data/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v1819
|
data/README.md
CHANGED
@@ -60,13 +60,14 @@ value:
|
|
60
60
|
|
61
61
|
```ruby
|
62
62
|
require 'stripe'
|
63
|
-
|
63
|
+
|
64
|
+
client = Stripe::StripeClient.new("sk_test_...")
|
64
65
|
|
65
66
|
# list customers
|
66
|
-
|
67
|
+
customers = client.v1.customers.list()
|
67
68
|
|
68
|
-
# retrieve single customer
|
69
|
-
|
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::
|
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
|
-
|
91
|
-
|
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 =
|
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 =
|
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 =
|
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
|
@@ -388,8 +352,8 @@ If you:
|
|
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.
|
1
|
+
15.4.0-beta.1
|
data/lib/stripe/api_requestor.rb
CHANGED
@@ -854,6 +854,8 @@ module Stripe
|
|
854
854
|
TemporarySessionExpiredError.new(error_data[:message], **opts)
|
855
855
|
when "financial_account_not_open"
|
856
856
|
FinancialAccountNotOpenError.new(error_data[:message], **opts)
|
857
|
+
when "feature_not_enabled"
|
858
|
+
FeatureNotEnabledError.new(error_data[:message], **opts)
|
857
859
|
when "blocked_by_stripe"
|
858
860
|
BlockedByStripeError.new(error_data[:message], **opts)
|
859
861
|
when "already_canceled"
|
@@ -866,8 +868,6 @@ module Stripe
|
|
866
868
|
QuotaExceededError.new(error_data[:message], **opts)
|
867
869
|
when "recipient_not_notifiable"
|
868
870
|
RecipientNotNotifiableError.new(error_data[:message], **opts)
|
869
|
-
when "feature_not_enabled"
|
870
|
-
FeatureNotEnabledError.new(error_data[:message], **opts)
|
871
871
|
when "invalid_payout_method"
|
872
872
|
InvalidPayoutMethodError.new(error_data[:message], **opts)
|
873
873
|
when "controlled_by_dashboard"
|
data/lib/stripe/api_version.rb
CHANGED
data/lib/stripe/errors.rb
CHANGED
@@ -168,6 +168,9 @@ module Stripe
|
|
168
168
|
class FinancialAccountNotOpenError < StripeError
|
169
169
|
end
|
170
170
|
|
171
|
+
class FeatureNotEnabledError < StripeError
|
172
|
+
end
|
173
|
+
|
171
174
|
class BlockedByStripeError < StripeError
|
172
175
|
end
|
173
176
|
|
@@ -186,9 +189,6 @@ module Stripe
|
|
186
189
|
class RecipientNotNotifiableError < StripeError
|
187
190
|
end
|
188
191
|
|
189
|
-
class FeatureNotEnabledError < StripeError
|
190
|
-
end
|
191
|
-
|
192
192
|
class InvalidPayoutMethodError < StripeError
|
193
193
|
end
|
194
194
|
|
@@ -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
|
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"
|
@@ -126,6 +126,8 @@ module Stripe
|
|
126
126
|
attr_reader :cartes_bancaires_payments
|
127
127
|
# The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments.
|
128
128
|
attr_reader :cashapp_payments
|
129
|
+
# The status of the Crypto capability of the account, or whether the account can directly process Crypto payments.
|
130
|
+
attr_reader :crypto_payments
|
129
131
|
# The status of the EPS payments capability of the account, or whether the account can directly process EPS charges.
|
130
132
|
attr_reader :eps_payments
|
131
133
|
# The status of the FPX payments capability of the account, or whether the account can directly process FPX charges.
|
@@ -609,8 +611,12 @@ module Stripe
|
|
609
611
|
attr_reader :interval
|
610
612
|
# The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.
|
611
613
|
attr_reader :monthly_anchor
|
614
|
+
# The days of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.
|
615
|
+
attr_reader :monthly_payout_days
|
612
616
|
# The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly.
|
613
617
|
attr_reader :weekly_anchor
|
618
|
+
# The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly.
|
619
|
+
attr_reader :weekly_payout_days
|
614
620
|
end
|
615
621
|
# A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`.
|
616
622
|
attr_reader :debit_negative_balances
|
@@ -985,6 +991,15 @@ module Stripe
|
|
985
991
|
end
|
986
992
|
end
|
987
993
|
|
994
|
+
class CryptoPayments < Stripe::RequestParams
|
995
|
+
# Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
|
996
|
+
attr_accessor :requested
|
997
|
+
|
998
|
+
def initialize(requested: nil)
|
999
|
+
@requested = requested
|
1000
|
+
end
|
1001
|
+
end
|
1002
|
+
|
988
1003
|
class EpsPayments < Stripe::RequestParams
|
989
1004
|
# Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
|
990
1005
|
attr_accessor :requested
|
@@ -1513,6 +1528,8 @@ module Stripe
|
|
1513
1528
|
attr_accessor :cartes_bancaires_payments
|
1514
1529
|
# The cashapp_payments capability.
|
1515
1530
|
attr_accessor :cashapp_payments
|
1531
|
+
# The crypto_payments capability.
|
1532
|
+
attr_accessor :crypto_payments
|
1516
1533
|
# The eps_payments capability.
|
1517
1534
|
attr_accessor :eps_payments
|
1518
1535
|
# The fpx_payments capability.
|
@@ -1642,6 +1659,7 @@ module Stripe
|
|
1642
1659
|
card_payments: nil,
|
1643
1660
|
cartes_bancaires_payments: nil,
|
1644
1661
|
cashapp_payments: nil,
|
1662
|
+
crypto_payments: nil,
|
1645
1663
|
eps_payments: nil,
|
1646
1664
|
fpx_payments: nil,
|
1647
1665
|
gb_bank_transfer_payments: nil,
|
@@ -1715,6 +1733,7 @@ module Stripe
|
|
1715
1733
|
@card_payments = card_payments
|
1716
1734
|
@cartes_bancaires_payments = cartes_bancaires_payments
|
1717
1735
|
@cashapp_payments = cashapp_payments
|
1736
|
+
@crypto_payments = crypto_payments
|
1718
1737
|
@eps_payments = eps_payments
|
1719
1738
|
@fpx_payments = fpx_payments
|
1720
1739
|
@gb_bank_transfer_payments = gb_bank_transfer_payments
|
@@ -2170,6 +2189,15 @@ module Stripe
|
|
2170
2189
|
end
|
2171
2190
|
end
|
2172
2191
|
|
2192
|
+
class ProofOfAddress < Stripe::RequestParams
|
2193
|
+
# One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
|
2194
|
+
attr_accessor :files
|
2195
|
+
|
2196
|
+
def initialize(files: nil)
|
2197
|
+
@files = files
|
2198
|
+
end
|
2199
|
+
end
|
2200
|
+
|
2173
2201
|
class ProofOfRegistration < Stripe::RequestParams
|
2174
2202
|
# One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
|
2175
2203
|
attr_accessor :files
|
@@ -2199,6 +2227,8 @@ module Stripe
|
|
2199
2227
|
attr_accessor :company_registration_verification
|
2200
2228
|
# One or more documents that demonstrate proof of a company's tax ID.
|
2201
2229
|
attr_accessor :company_tax_id_verification
|
2230
|
+
# One or more documents that demonstrate proof of address.
|
2231
|
+
attr_accessor :proof_of_address
|
2202
2232
|
# One or more documents showing the company’s proof of registration with the national business registry.
|
2203
2233
|
attr_accessor :proof_of_registration
|
2204
2234
|
# One or more documents that demonstrate proof of ultimate beneficial ownership.
|
@@ -2211,6 +2241,7 @@ module Stripe
|
|
2211
2241
|
company_ministerial_decree: nil,
|
2212
2242
|
company_registration_verification: nil,
|
2213
2243
|
company_tax_id_verification: nil,
|
2244
|
+
proof_of_address: nil,
|
2214
2245
|
proof_of_registration: nil,
|
2215
2246
|
proof_of_ultimate_beneficial_ownership: nil
|
2216
2247
|
)
|
@@ -2220,6 +2251,7 @@ module Stripe
|
|
2220
2251
|
@company_ministerial_decree = company_ministerial_decree
|
2221
2252
|
@company_registration_verification = company_registration_verification
|
2222
2253
|
@company_tax_id_verification = company_tax_id_verification
|
2254
|
+
@proof_of_address = proof_of_address
|
2223
2255
|
@proof_of_registration = proof_of_registration
|
2224
2256
|
@proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership
|
2225
2257
|
end
|
@@ -2720,14 +2752,27 @@ module Stripe
|
|
2720
2752
|
attr_accessor :interval
|
2721
2753
|
# The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
|
2722
2754
|
attr_accessor :monthly_anchor
|
2755
|
+
# The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set.
|
2756
|
+
attr_accessor :monthly_payout_days
|
2723
2757
|
# The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
|
2724
2758
|
attr_accessor :weekly_anchor
|
2725
|
-
|
2726
|
-
|
2759
|
+
# The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.)
|
2760
|
+
attr_accessor :weekly_payout_days
|
2761
|
+
|
2762
|
+
def initialize(
|
2763
|
+
delay_days: nil,
|
2764
|
+
interval: nil,
|
2765
|
+
monthly_anchor: nil,
|
2766
|
+
monthly_payout_days: nil,
|
2767
|
+
weekly_anchor: nil,
|
2768
|
+
weekly_payout_days: nil
|
2769
|
+
)
|
2727
2770
|
@delay_days = delay_days
|
2728
2771
|
@interval = interval
|
2729
2772
|
@monthly_anchor = monthly_anchor
|
2773
|
+
@monthly_payout_days = monthly_payout_days
|
2730
2774
|
@weekly_anchor = weekly_anchor
|
2775
|
+
@weekly_payout_days = weekly_payout_days
|
2731
2776
|
end
|
2732
2777
|
end
|
2733
2778
|
# A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
|
@@ -3259,6 +3304,15 @@ module Stripe
|
|
3259
3304
|
end
|
3260
3305
|
end
|
3261
3306
|
|
3307
|
+
class CryptoPayments < Stripe::RequestParams
|
3308
|
+
# Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
|
3309
|
+
attr_accessor :requested
|
3310
|
+
|
3311
|
+
def initialize(requested: nil)
|
3312
|
+
@requested = requested
|
3313
|
+
end
|
3314
|
+
end
|
3315
|
+
|
3262
3316
|
class EpsPayments < Stripe::RequestParams
|
3263
3317
|
# Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
|
3264
3318
|
attr_accessor :requested
|
@@ -3787,6 +3841,8 @@ module Stripe
|
|
3787
3841
|
attr_accessor :cartes_bancaires_payments
|
3788
3842
|
# The cashapp_payments capability.
|
3789
3843
|
attr_accessor :cashapp_payments
|
3844
|
+
# The crypto_payments capability.
|
3845
|
+
attr_accessor :crypto_payments
|
3790
3846
|
# The eps_payments capability.
|
3791
3847
|
attr_accessor :eps_payments
|
3792
3848
|
# The fpx_payments capability.
|
@@ -3916,6 +3972,7 @@ module Stripe
|
|
3916
3972
|
card_payments: nil,
|
3917
3973
|
cartes_bancaires_payments: nil,
|
3918
3974
|
cashapp_payments: nil,
|
3975
|
+
crypto_payments: nil,
|
3919
3976
|
eps_payments: nil,
|
3920
3977
|
fpx_payments: nil,
|
3921
3978
|
gb_bank_transfer_payments: nil,
|
@@ -3989,6 +4046,7 @@ module Stripe
|
|
3989
4046
|
@card_payments = card_payments
|
3990
4047
|
@cartes_bancaires_payments = cartes_bancaires_payments
|
3991
4048
|
@cashapp_payments = cashapp_payments
|
4049
|
+
@crypto_payments = crypto_payments
|
3992
4050
|
@eps_payments = eps_payments
|
3993
4051
|
@fpx_payments = fpx_payments
|
3994
4052
|
@gb_bank_transfer_payments = gb_bank_transfer_payments
|
@@ -4325,7 +4383,7 @@ module Stripe
|
|
4325
4383
|
attr_accessor :ownership_exemption_reason
|
4326
4384
|
# The company's phone number (used for verification).
|
4327
4385
|
attr_accessor :phone
|
4328
|
-
#
|
4386
|
+
# When the business was incorporated or registered.
|
4329
4387
|
attr_accessor :registration_date
|
4330
4388
|
# The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
|
4331
4389
|
attr_accessor :registration_number
|
@@ -4525,6 +4583,15 @@ module Stripe
|
|
4525
4583
|
end
|
4526
4584
|
end
|
4527
4585
|
|
4586
|
+
class ProofOfAddress < Stripe::RequestParams
|
4587
|
+
# One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
|
4588
|
+
attr_accessor :files
|
4589
|
+
|
4590
|
+
def initialize(files: nil)
|
4591
|
+
@files = files
|
4592
|
+
end
|
4593
|
+
end
|
4594
|
+
|
4528
4595
|
class ProofOfRegistration < Stripe::RequestParams
|
4529
4596
|
# One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
|
4530
4597
|
attr_accessor :files
|
@@ -4554,6 +4621,8 @@ module Stripe
|
|
4554
4621
|
attr_accessor :company_registration_verification
|
4555
4622
|
# One or more documents that demonstrate proof of a company's tax ID.
|
4556
4623
|
attr_accessor :company_tax_id_verification
|
4624
|
+
# One or more documents that demonstrate proof of address.
|
4625
|
+
attr_accessor :proof_of_address
|
4557
4626
|
# One or more documents showing the company’s proof of registration with the national business registry.
|
4558
4627
|
attr_accessor :proof_of_registration
|
4559
4628
|
# One or more documents that demonstrate proof of ultimate beneficial ownership.
|
@@ -4566,6 +4635,7 @@ module Stripe
|
|
4566
4635
|
company_ministerial_decree: nil,
|
4567
4636
|
company_registration_verification: nil,
|
4568
4637
|
company_tax_id_verification: nil,
|
4638
|
+
proof_of_address: nil,
|
4569
4639
|
proof_of_registration: nil,
|
4570
4640
|
proof_of_ultimate_beneficial_ownership: nil
|
4571
4641
|
)
|
@@ -4575,6 +4645,7 @@ module Stripe
|
|
4575
4645
|
@company_ministerial_decree = company_ministerial_decree
|
4576
4646
|
@company_registration_verification = company_registration_verification
|
4577
4647
|
@company_tax_id_verification = company_tax_id_verification
|
4648
|
+
@proof_of_address = proof_of_address
|
4578
4649
|
@proof_of_registration = proof_of_registration
|
4579
4650
|
@proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership
|
4580
4651
|
end
|
@@ -5072,14 +5143,27 @@ module Stripe
|
|
5072
5143
|
attr_accessor :interval
|
5073
5144
|
# The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
|
5074
5145
|
attr_accessor :monthly_anchor
|
5146
|
+
# The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set.
|
5147
|
+
attr_accessor :monthly_payout_days
|
5075
5148
|
# The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
|
5076
5149
|
attr_accessor :weekly_anchor
|
5077
|
-
|
5078
|
-
|
5150
|
+
# The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.)
|
5151
|
+
attr_accessor :weekly_payout_days
|
5152
|
+
|
5153
|
+
def initialize(
|
5154
|
+
delay_days: nil,
|
5155
|
+
interval: nil,
|
5156
|
+
monthly_anchor: nil,
|
5157
|
+
monthly_payout_days: nil,
|
5158
|
+
weekly_anchor: nil,
|
5159
|
+
weekly_payout_days: nil
|
5160
|
+
)
|
5079
5161
|
@delay_days = delay_days
|
5080
5162
|
@interval = interval
|
5081
5163
|
@monthly_anchor = monthly_anchor
|
5164
|
+
@monthly_payout_days = monthly_payout_days
|
5082
5165
|
@weekly_anchor = weekly_anchor
|
5166
|
+
@weekly_payout_days = weekly_payout_days
|
5083
5167
|
end
|
5084
5168
|
end
|
5085
5169
|
# A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
|