stripe 5.55.0 → 8.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +122 -2
- data/Gemfile +1 -0
- data/Makefile +1 -1
- data/OPENAPI_VERSION +1 -0
- data/README.md +37 -3
- data/VERSION +1 -1
- data/lib/data/ca-certificates.crt +1241 -1937
- data/lib/stripe/api_operations/create.rb +6 -2
- data/lib/stripe/api_operations/delete.rb +12 -7
- data/lib/stripe/api_operations/list.rb +6 -9
- data/lib/stripe/api_operations/nested_resource.rb +62 -34
- data/lib/stripe/api_operations/request.rb +10 -0
- data/lib/stripe/api_operations/save.rb +11 -3
- data/lib/stripe/api_operations/search.rb +6 -9
- data/lib/stripe/api_resource.rb +1 -1
- data/lib/stripe/api_resource_test_helpers.rb +2 -0
- data/lib/stripe/api_version.rb +8 -0
- data/lib/stripe/instrumentation.rb +45 -7
- data/lib/stripe/object_types.rb +12 -10
- data/lib/stripe/resources/account.rb +36 -9
- data/lib/stripe/resources/account_link.rb +4 -0
- data/lib/stripe/resources/application_fee_refund.rb +5 -0
- data/lib/stripe/resources/apps/secret.rb +40 -0
- data/lib/stripe/resources/balance.rb +11 -0
- data/lib/stripe/resources/balance_transaction.rb +4 -0
- data/lib/stripe/resources/bank_account.rb +7 -0
- data/lib/stripe/resources/billing_portal/configuration.rb +1 -0
- data/lib/stripe/resources/billing_portal/session.rb +14 -0
- data/lib/stripe/resources/capability.rb +3 -0
- data/lib/stripe/resources/card.rb +6 -3
- data/lib/stripe/resources/cash_balance.rb +1 -0
- data/lib/stripe/resources/charge.rb +15 -3
- data/lib/stripe/resources/checkout/session.rb +41 -5
- data/lib/stripe/resources/country_spec.rb +6 -0
- data/lib/stripe/resources/coupon.rb +3 -0
- data/lib/stripe/resources/credit_note.rb +27 -9
- data/lib/stripe/resources/customer.rb +109 -19
- data/lib/stripe/resources/customer_balance_transaction.rb +6 -0
- data/lib/stripe/resources/customer_cash_balance_transaction.rb +14 -0
- data/lib/stripe/resources/discount.rb +4 -0
- data/lib/stripe/resources/dispute.rb +17 -3
- data/lib/stripe/resources/event.rb +29 -0
- data/lib/stripe/resources/exchange_rate.rb +11 -0
- data/lib/stripe/resources/file.rb +7 -0
- data/lib/stripe/resources/file_link.rb +3 -0
- data/lib/stripe/resources/financial_connections/account.rb +42 -6
- data/lib/stripe/resources/financial_connections/account_ownership.rb +1 -0
- data/lib/stripe/resources/financial_connections/session.rb +1 -0
- data/lib/stripe/resources/funding_instructions.rb +5 -0
- data/lib/stripe/resources/identity/verification_report.rb +11 -0
- data/lib/stripe/resources/identity/verification_session.rb +31 -5
- data/lib/stripe/resources/invoice.rb +96 -17
- data/lib/stripe/resources/invoice_item.rb +11 -0
- data/lib/stripe/resources/issuing/authorization.rb +25 -5
- data/lib/stripe/resources/issuing/card.rb +78 -8
- data/lib/stripe/resources/issuing/cardholder.rb +3 -0
- data/lib/stripe/resources/issuing/dispute.rb +13 -3
- data/lib/stripe/resources/issuing/transaction.rb +5 -0
- data/lib/stripe/resources/line_item.rb +1 -0
- data/lib/stripe/resources/mandate.rb +1 -0
- data/lib/stripe/resources/payment_intent.rb +71 -13
- data/lib/stripe/resources/payment_link.rb +15 -3
- data/lib/stripe/resources/payment_method.rb +25 -5
- data/lib/stripe/resources/payout.rb +28 -5
- data/lib/stripe/resources/person.rb +6 -0
- data/lib/stripe/resources/plan.rb +8 -0
- data/lib/stripe/resources/price.rb +6 -0
- data/lib/stripe/resources/product.rb +8 -0
- data/lib/stripe/resources/promotion_code.rb +2 -0
- data/lib/stripe/resources/quote.rb +52 -11
- data/lib/stripe/resources/radar/early_fraud_warning.rb +4 -0
- data/lib/stripe/resources/radar/value_list.rb +3 -0
- data/lib/stripe/resources/radar/value_list_item.rb +3 -0
- data/lib/stripe/resources/refund.rb +24 -5
- data/lib/stripe/resources/reporting/report_run.rb +8 -0
- data/lib/stripe/resources/reporting/report_type.rb +8 -1
- data/lib/stripe/resources/reversal.rb +13 -0
- data/lib/stripe/resources/review.rb +14 -3
- data/lib/stripe/resources/setup_attempt.rb +4 -0
- data/lib/stripe/resources/setup_intent.rb +52 -7
- data/lib/stripe/resources/shipping_rate.rb +3 -0
- data/lib/stripe/resources/sigma/scheduled_query_run.rb +4 -0
- data/lib/stripe/resources/source.rb +26 -6
- data/lib/stripe/resources/source_transaction.rb +4 -0
- data/lib/stripe/resources/subscription.rb +48 -3
- data/lib/stripe/resources/subscription_item.rb +2 -7
- data/lib/stripe/resources/subscription_schedule.rb +23 -5
- data/lib/stripe/resources/tax_code.rb +1 -0
- data/lib/stripe/resources/tax_id.rb +4 -0
- data/lib/stripe/resources/tax_rate.rb +3 -0
- data/lib/stripe/resources/terminal/configuration.rb +1 -0
- data/lib/stripe/resources/terminal/connection_token.rb +3 -0
- data/lib/stripe/resources/terminal/location.rb +3 -0
- data/lib/stripe/resources/terminal/reader.rb +70 -11
- data/lib/stripe/resources/test_helpers/test_clock.rb +13 -3
- data/lib/stripe/resources/token.rb +22 -0
- data/lib/stripe/resources/topup.rb +15 -3
- data/lib/stripe/resources/transfer.rb +10 -11
- data/lib/stripe/resources/treasury/credit_reversal.rb +14 -0
- data/lib/stripe/resources/treasury/debit_reversal.rb +14 -0
- data/lib/stripe/resources/treasury/financial_account.rb +52 -0
- data/lib/stripe/resources/treasury/inbound_transfer.rb +94 -0
- data/lib/stripe/resources/treasury/outbound_payment.rb +96 -0
- data/lib/stripe/resources/treasury/outbound_transfer.rb +100 -0
- data/lib/stripe/resources/treasury/received_credit.rb +30 -0
- data/lib/stripe/resources/treasury/received_debit.rb +30 -0
- data/lib/stripe/resources/treasury/transaction.rb +13 -0
- data/lib/stripe/resources/treasury/transaction_entry.rb +17 -0
- data/lib/stripe/resources/usage_record.rb +4 -0
- data/lib/stripe/resources/webhook_endpoint.rb +7 -0
- data/lib/stripe/resources.rb +12 -10
- data/lib/stripe/stripe_client.rb +25 -17
- data/lib/stripe/stripe_object.rb +2 -2
- data/lib/stripe/util.rb +38 -3
- data/lib/stripe/version.rb +1 -1
- metadata +17 -11
- data/lib/stripe/resources/bitcoin_receiver.rb +0 -24
- data/lib/stripe/resources/bitcoin_transaction.rb +0 -16
- data/lib/stripe/resources/issuing/card_details.rb +0 -10
- data/lib/stripe/resources/order.rb +0 -33
- data/lib/stripe/resources/order_return.rb +0 -10
- data/lib/stripe/resources/recipient.rb +0 -14
- data/lib/stripe/resources/sku.rb +0 -13
- data/lib/stripe/resources/three_d_secure.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8293f29e86f093b7980e362cf7721a56f6b7059b155e2e36b6f3975aa72aad2d
|
4
|
+
data.tar.gz: f2885f99fc05115e4398ca14f5e55f8dbe77f4a2565fc1cd9dedd40e8a439ed9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a21a14b0a0e0096ce0801dd6b9370e6e3649630120b79f3e13c171115cdfa51fd6a186e4470fbedecd99d33c9afa7502e2952d7142896cc1ba2a2c1601a2250f
|
7
|
+
data.tar.gz: 708a644e596972a37d5c0e9c37164c52df62e73d44588485b5ef7c6d991d63280f9aba9410d8a39bccbc0667ed1cbbf0e905f662e5af96e301ab42d4cfae7eab
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,129 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 8.3.0 - 2023-02-16
|
4
|
+
* [#1175](https://github.com/stripe/stripe-ruby/pull/1175) API Updates
|
5
|
+
* Add support for `refund_payment` method on resource `Terminal.Reader`
|
6
|
+
|
7
|
+
## 8.2.0 - 2023-02-02
|
8
|
+
* [#1173](https://github.com/stripe/stripe-ruby/pull/1173) API Updates
|
9
|
+
* Add support for `resume` method on resource `Subscription`
|
10
|
+
* [#1171](https://github.com/stripe/stripe-ruby/pull/1171) Remove unused `partial` param from `initialize_from`
|
11
|
+
|
12
|
+
## 8.1.0 - 2023-01-12
|
13
|
+
* [#1162](https://github.com/stripe/stripe-ruby/pull/1162) Improve request events instrumentation
|
14
|
+
|
15
|
+
## 8.0.0 - 2022-11-16
|
16
|
+
* [#1144](https://github.com/stripe/stripe-ruby/pull/1144) Next major release changes
|
17
|
+
|
18
|
+
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.
|
19
|
+
|
20
|
+
"⚠️" symbol highlights breaking changes.
|
21
|
+
|
22
|
+
### Deprecated
|
23
|
+
- The `save` method is deprecated. Prefer the static `update` method that doesn't require retrieval of the resource to update it.
|
24
|
+
``` ruby
|
25
|
+
# before
|
26
|
+
refund = Stripe::Refund.retrieve("re_123")
|
27
|
+
refund.description = "Refund description"
|
28
|
+
refund.save
|
29
|
+
|
30
|
+
# after
|
31
|
+
Stripe::Refund.update("re_123", description: "Refund description")
|
32
|
+
```
|
33
|
+
|
34
|
+
### ⚠️ Removed
|
35
|
+
- Removed deprecated `Sku` resource.
|
36
|
+
- Removed deprecated `Orders` resource.
|
37
|
+
- Removed deprecated `delete` method on `Subscription` resource. Please use `cancel` method instead.
|
38
|
+
```ruby
|
39
|
+
# before
|
40
|
+
Stripe::Subscription::delete("sub_12345")
|
41
|
+
|
42
|
+
# after
|
43
|
+
Stripe::Subscription::cancel("sub_12345")
|
44
|
+
```
|
45
|
+
|
46
|
+
|
47
|
+
## 7.1.0 - 2022-08-19
|
48
|
+
* [#1116](https://github.com/stripe/stripe-ruby/pull/1116) API Updates
|
49
|
+
* Add support for new resource `CustomerCashBalanceTransaction`
|
50
|
+
* [#1118](https://github.com/stripe/stripe-ruby/pull/1118) Update AllowedChars in rubocop config
|
51
|
+
* [#1117](https://github.com/stripe/stripe-ruby/pull/1117) Refresh rubocop config.
|
52
|
+
* [#1115](https://github.com/stripe/stripe-ruby/pull/1115) Add a support section to the readme
|
53
|
+
|
54
|
+
## 7.0.0 - 2022-08-02
|
55
|
+
|
56
|
+
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.
|
57
|
+
|
58
|
+
"⚠️" symbol highlights breaking changes.
|
59
|
+
|
60
|
+
* [#1106](https://github.com/stripe/stripe-ruby/pull/1106) API Updates
|
61
|
+
* [#1092](https://github.com/stripe/stripe-ruby/pull/1092) API Updates
|
62
|
+
* [#1090](https://github.com/stripe/stripe-ruby/pull/1090) Use auto-generation for `Invoice` methods
|
63
|
+
* [#1103](https://github.com/stripe/stripe-ruby/pull/1103) Next major release changes
|
64
|
+
|
65
|
+
### ⚠️ Changed
|
66
|
+
* `retrieve_cash_balance` and `update_cash_balance` methods on `Customer` resource no longer requires the second argument to always be `nil`. The methods now now take in `customer_id`, `params`, and `opts` parameters.
|
67
|
+
* Update default bundle of CA certificates to April 26, 2022.
|
68
|
+
|
69
|
+
### Deprecated
|
70
|
+
* Deprecate `delete` method on `Subscription` resource. Please use `cancel` method instead.
|
71
|
+
|
72
|
+
### ⚠️ Removed
|
73
|
+
* Remove `details` method from `Issuing.Card` resource. The method was not supported.
|
74
|
+
* Remove `Issuing.CardDetails` resource. Read more at https://stripe.com/docs/issuing/cards/virtual.
|
75
|
+
* Remove `create` method from `ReportType` resource. The method was not supported.
|
76
|
+
* Remove `usage_record_summaries` method from `SubscriptionItem` resource. Please use `list_usage_record_summaries` method instead.
|
77
|
+
* Remove `AlipayAccount`, `BitcoinReceiver`, `BitcoinTransaction`, `Issuing::CardDetails`, `Recipient`, ` RecipientTransfer`, and `ThreeDSecure` resources. The resources were deprecated or no longer in use.
|
78
|
+
* Remove ability to list `Card` resource for a `Recipient`.
|
79
|
+
* Remove `cancel` method from `Transfer` resource. The method was deprecated.
|
80
|
+
|
81
|
+
## 6.5.0 - 2022-06-29
|
82
|
+
* [#1084](https://github.com/stripe/stripe-ruby/pull/1084) API Updates
|
83
|
+
* Add support for `deliver_card`, `fail_card`, `return_card`, and `ship_card` test helper methods on resource `Issuing.Card`
|
84
|
+
* [#1076](https://github.com/stripe/stripe-ruby/pull/1076) fix: Update logging to coerce ASCII-8BIT into UTF-8.
|
85
|
+
|
86
|
+
## 6.4.0 - 2022-06-17
|
87
|
+
* [#1073](https://github.com/stripe/stripe-ruby/pull/1073) API Updates
|
88
|
+
* Add support for `fund_cash_balance` test helper method on resource `Customer`
|
89
|
+
* [#1074](https://github.com/stripe/stripe-ruby/pull/1074) Support updating pre-release versions
|
90
|
+
* [#1072](https://github.com/stripe/stripe-ruby/pull/1072) Trigger workflows on beta branches
|
91
|
+
* [#1071](https://github.com/stripe/stripe-ruby/pull/1071) Use request_stripe_object for all requests
|
92
|
+
* [#1070](https://github.com/stripe/stripe-ruby/pull/1070) API Updates
|
93
|
+
|
94
|
+
Switch from using meta-programing to generating explicit methods for custom methods.
|
95
|
+
* [#1069](https://github.com/stripe/stripe-ruby/pull/1069) chore: Stop special implementation of Account.persons method.
|
96
|
+
|
97
|
+
## 6.3.0 - 2022-06-08
|
98
|
+
* [#1063](https://github.com/stripe/stripe-ruby/pull/1063) fix: Update cash balance methods to no longer require nested ID.
|
99
|
+
|
100
|
+
## 6.2.0 - 2022-05-23
|
101
|
+
* [#1060](https://github.com/stripe/stripe-ruby/pull/1060) API Updates
|
102
|
+
* Add support for new resource `Apps.Secret`
|
103
|
+
|
104
|
+
## 6.1.0 - 2022-05-19
|
105
|
+
* [#1057](https://github.com/stripe/stripe-ruby/pull/1057) API Updates
|
106
|
+
* Add support for new resources `Treasury.CreditReversal`, `Treasury.DebitReversal`, `Treasury.FinancialAccountFeatures`, `Treasury.FinancialAccount`, `Treasury.FlowDetails`, `Treasury.InboundTransfer`, `Treasury.OutboundPayment`, `Treasury.OutboundTransfer`, `Treasury.ReceivedCredit`, `Treasury.ReceivedDebit`, `Treasury.TransactionEntry`, and `Treasury.Transaction`
|
107
|
+
* Add support for `retrieve_payment_method` method on resource `Customer`
|
108
|
+
* Add support for `list_owners` and `list` methods on resource `FinancialConnections.Account`
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
## 6.0.0 - 2022-05-09
|
113
|
+
* [#1056](https://github.com/stripe/stripe-ruby/pull/1056) API Updates
|
114
|
+
Major version release. The [migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-Guide-for-v6) contains more information.
|
115
|
+
|
116
|
+
(⚠️ = breaking changes):
|
117
|
+
* ⚠️ Replace the legacy `Order` API with the new `Order` API.
|
118
|
+
* New methods: `cancel`, `list_line_items`, `reopen`, and `submit`
|
119
|
+
* Removed methods: `pay` and `return_order`
|
120
|
+
* Removed resources: `OrderItem` and `OrderReturn`
|
121
|
+
* ⚠️ Rename `FinancialConnections::Account.refresh` to `FinancialConnections::Account.refresh_account
|
122
|
+
|
3
123
|
## 5.55.0 - 2022-05-05
|
4
124
|
* [#1055](https://github.com/stripe/stripe-ruby/pull/1055) API Updates
|
5
|
-
* Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
|
6
|
-
|
125
|
+
* Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
|
126
|
+
|
7
127
|
|
8
128
|
## 5.54.0 - 2022-05-03
|
9
129
|
* [#1053](https://github.com/stripe/stripe-ruby/pull/1053) API Updates
|
data/Gemfile
CHANGED
data/Makefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.PHONY: update-version codegen-format
|
2
2
|
update-version:
|
3
3
|
@echo "$(VERSION)" > VERSION
|
4
|
-
@perl -pi -e 's|VERSION = "[
|
4
|
+
@perl -pi -e 's|VERSION = "[.\-\w\d]+"|VERSION = "$(VERSION)"|' lib/stripe/version.rb
|
5
5
|
|
6
6
|
codegen-format:
|
7
7
|
bundle exec rubocop -o /dev/null --auto-correct
|
data/OPENAPI_VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
v226
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# Stripe Ruby Library
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/stripe.svg)](https://badge.fury.io/rb/stripe)
|
4
|
-
[![Build Status](https://
|
4
|
+
[![Build Status](https://github.com/stripe/stripe-ruby/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-ruby/actions?query=branch%3Amaster)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-ruby/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-ruby?branch=master)
|
5
6
|
|
6
7
|
The Stripe Ruby library provides convenient access to the Stripe API from
|
7
8
|
applications written in the Ruby language. It includes a pre-defined set of
|
@@ -252,7 +253,11 @@ a success or error. Receives `RequestEndEvent` with the following properties:
|
|
252
253
|
- `path`: Request path. (`String`)
|
253
254
|
- `user_data`: A hash on which users may have set arbitrary data in
|
254
255
|
`request_begin`. See above for more information. (`Hash`)
|
255
|
-
- `request_id
|
256
|
+
- `request_id`: HTTP request identifier. (`String`)
|
257
|
+
- `response_header`: The response headers. (`Hash`)
|
258
|
+
- `response_body` = The response body. (`String`)
|
259
|
+
- `request_header` = The request headers. (`Hash`)
|
260
|
+
- `request_body` = The request body. (`String`)
|
256
261
|
|
257
262
|
#### Example
|
258
263
|
|
@@ -260,9 +265,13 @@ For example:
|
|
260
265
|
|
261
266
|
```ruby
|
262
267
|
Stripe::Instrumentation.subscribe(:request_end) do |request_event|
|
268
|
+
# Filter out high-cardinality ids from `path`
|
269
|
+
path_parts = event.path.split("/").drop(2)
|
270
|
+
resource = path_parts.map { |part| part.match?(/\A[a-z_]+\z/) ? part : ":id" }.join("/")
|
271
|
+
|
263
272
|
tags = {
|
264
273
|
method: request_event.method,
|
265
|
-
resource:
|
274
|
+
resource: resource,
|
266
275
|
code: request_event.http_status,
|
267
276
|
retries: request_event.num_retries
|
268
277
|
}
|
@@ -293,6 +302,31 @@ You can disable this behavior if you prefer:
|
|
293
302
|
Stripe.enable_telemetry = false
|
294
303
|
```
|
295
304
|
|
305
|
+
### Beta SDKs
|
306
|
+
|
307
|
+
Stripe has features in the beta phase that can be accessed via the beta version of this package.
|
308
|
+
We would love for you to try these and share feedback with us before these features reach the stable phase.
|
309
|
+
To install a beta version use `gem install` with the exact version you'd like to use:
|
310
|
+
|
311
|
+
```sh
|
312
|
+
gem install stripe -v 7.1.0.pre.beta.2
|
313
|
+
```
|
314
|
+
|
315
|
+
> **Note**
|
316
|
+
> There can be breaking changes between beta versions. Therefore we recommend pinning the package version to a specific beta version in your Gemfile. This way you can install the same version each time without breaking changes unless you are intentionally looking for the latest beta version.
|
317
|
+
|
318
|
+
We highly recommend keeping an eye on when the beta feature you are interested in goes from beta to stable so that you can move from using a beta version of the SDK to the stable version.
|
319
|
+
|
320
|
+
If your beta feature requires a `Stripe-Version` header to be sent, use the `Stripe.api_version` field to set it:
|
321
|
+
|
322
|
+
```python
|
323
|
+
Stripe.api_version += "; feature_beta=v3"
|
324
|
+
```
|
325
|
+
|
326
|
+
## Support
|
327
|
+
|
328
|
+
New features and bug fixes are released on the latest major version of the Stripe Ruby library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
|
329
|
+
|
296
330
|
## Development
|
297
331
|
|
298
332
|
The test suite depends on [stripe-mock], so make sure to fetch and run it from a
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
8.3.0
|