stripe 5.41.0 → 9.0.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 +256 -0
- data/Gemfile +5 -2
- data/Makefile +13 -0
- data/OPENAPI_VERSION +1 -0
- data/README.md +40 -6
- 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 +13 -3
- data/lib/stripe/api_operations/search.rb +16 -0
- data/lib/stripe/api_resource.rb +3 -18
- data/lib/stripe/api_resource_test_helpers.rb +49 -0
- data/lib/stripe/api_version.rb +8 -0
- data/lib/stripe/connection_manager.rb +22 -1
- data/lib/stripe/instrumentation.rb +45 -7
- data/lib/stripe/object_types.rb +29 -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 +23 -0
- data/lib/stripe/resources/charge.rb +23 -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/credit_note_line_item.rb +1 -0
- data/lib/stripe/resources/customer.rb +124 -12
- 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 +67 -0
- data/lib/stripe/resources/financial_connections/account_owner.rb +11 -0
- data/lib/stripe/resources/financial_connections/account_ownership.rb +11 -0
- data/lib/stripe/resources/financial_connections/session.rb +13 -0
- data/lib/stripe/resources/funding_instructions.rb +21 -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 +105 -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/login_link.rb +1 -0
- data/lib/stripe/resources/mandate.rb +1 -0
- data/lib/stripe/resources/payment_intent.rb +103 -6
- data/lib/stripe/resources/payment_link.rb +35 -0
- 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 +15 -0
- data/lib/stripe/resources/product.rb +17 -0
- data/lib/stripe/resources/promotion_code.rb +2 -0
- data/lib/stripe/resources/quote.rb +58 -35
- 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 +49 -0
- 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 +60 -5
- data/lib/stripe/resources/shipping_rate.rb +2 -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 +57 -3
- data/lib/stripe/resources/subscription_item.rb +2 -7
- data/lib/stripe/resources/subscription_schedule.rb +23 -5
- data/lib/stripe/resources/tax/calculation.rb +33 -0
- data/lib/stripe/resources/tax/calculation_line_item.rb +10 -0
- data/lib/stripe/resources/tax/settings.rb +15 -0
- data/lib/stripe/resources/tax/transaction.rb +49 -0
- data/lib/stripe/resources/tax/transaction_line_item.rb +10 -0
- 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 +16 -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 +119 -0
- data/lib/stripe/resources/test_helpers/test_clock.rb +35 -0
- data/lib/stripe/resources/token.rb +20 -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/financial_account_features.rb +12 -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 +27 -10
- data/lib/stripe/search_result_object.rb +86 -0
- data/lib/stripe/stripe_client.rb +37 -22
- data/lib/stripe/stripe_configuration.rb +5 -1
- data/lib/stripe/stripe_object.rb +2 -2
- data/lib/stripe/util.rb +85 -2
- data/lib/stripe/version.rb +1 -1
- data/lib/stripe.rb +5 -1
- data/stripe.gemspec +3 -3
- metadata +39 -14
- 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: e7dfdb00614bcd3674779d258240b4c5e9cf5cb6806a9bc456d2384b19f652be
|
4
|
+
data.tar.gz: d4ab60d674524c92fbdf7c7fde52329ee2280685422c95673461fbb99ba3e3cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c405ffc3f03cdb9da19dc5fcbac2a56f22dca4b9f3dc93e2a524655d12d84464a2788ce90f2b593dd8ca8c5475a4fb734e882fc9c7eb3e88fc460fe743025c16
|
7
|
+
data.tar.gz: 34063f3c3d73a69c89584f0eb381739634a91f3b7e57d7c1cf1ed7b08a64fcc1c40938bb2b0fdd8e5305d72fbe9c4313a5de64c598dbd870cfb29a86d8ea37a0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,261 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 9.0.0 - 2023-08-16
|
4
|
+
**⚠️ ACTION REQUIRED: the breaking change in this release likely affects you ⚠️**
|
5
|
+
|
6
|
+
* [#1253](https://github.com/stripe/stripe-ruby/pull/1253) [#1260](https://github.com/stripe/stripe-ruby/pull/1260) Pin latest API version as the default
|
7
|
+
In this release, Stripe API Version `2023-08-16` (the latest at time of release) will be sent by default on all requests. This is a significant change with wide ramifications. The API version affects the properties you see on responses, the parameters you are allowed to send on requests, and so on. The previous default was to use your [Stripe account's default API version](https://stripe.com/docs/development/dashboard/request-logs#view-your-default-api-version).
|
8
|
+
|
9
|
+
To successfully upgrade to stripe-ruby v9, you must either
|
10
|
+
|
11
|
+
1. **(Recommended) Upgrade your integration to be compatible with API Version `2023-08-16`.**
|
12
|
+
|
13
|
+
Please read the API Changelog carefully for each API Version from `2023-08-16` back to your [Stripe account's default API version](https://stripe.com/docs/development/dashboard/request-logs#view-your-default-api-version). Determine if you are using any of the APIs that have changed in a breaking way, and adjust your integration accordingly. Carefully test your changes with Stripe [Test Mode](https://stripe.com/docs/keys#test-live-modes) before deploying them to production.
|
14
|
+
|
15
|
+
You can read the [v9 migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v9) for more detailed instructions.
|
16
|
+
2. **(Alternative option) Specify a version other than `2023-08-16` when initializing `stripe-ruby`.**
|
17
|
+
|
18
|
+
If you were previously initializing stripe-ruby without an explicit API Version, you can postpone modifying your integration by specifying a version equal to your [Stripe account's default API version](https://stripe.com/docs/development/dashboard/request-logs#view-your-default-api-version). For example:
|
19
|
+
|
20
|
+
```diff
|
21
|
+
require 'stripe'
|
22
|
+
Stripe.api_key = "sk_test_..."
|
23
|
+
+ Stripe.api_version = '2020-08-27'
|
24
|
+
```
|
25
|
+
|
26
|
+
If you were already initializing stripe-ruby with an explicit API Version, upgrading to v9 will not affect your integration.
|
27
|
+
|
28
|
+
Read the [v9 migration guide](https://github.com/stripe-ruby/wiki/Migration-guide-for-v9) for more details.
|
29
|
+
|
30
|
+
Going forward, each major release of this library will be *pinned* by default to the latest Stripe API Version at the time of release.
|
31
|
+
|
32
|
+
That is, instead of upgrading stripe-ruby and separately upgrading your Stripe API Version through the Stripe Dashboard. whenever you upgrade major versions of stripe-ruby, you should also upgrade your integration to be compatible with the latest Stripe API version.
|
33
|
+
|
34
|
+
## 8.7.0 - 2023-08-10
|
35
|
+
* [#1256](https://github.com/stripe/stripe-ruby/pull/1256) Update generated code
|
36
|
+
Add resources `Tax::CalculationLineItem`, `Tax::TransactionLineItem`, and `Treasury::FinancialAccountFeatures`. These resources have no methods on them, but do represent the return type of methods elsewhere.
|
37
|
+
|
38
|
+
## 8.6.0 - 2023-07-13
|
39
|
+
* [#1244](https://github.com/stripe/stripe-ruby/pull/1244) Update generated code
|
40
|
+
* Add support for new resource `Tax.Settings`
|
41
|
+
* Add support for `retrieve` and `update` methods on resource `Settings`
|
42
|
+
* [#1241](https://github.com/stripe/stripe-ruby/pull/1241) Update generated code
|
43
|
+
|
44
|
+
* [#1209](https://github.com/stripe/stripe-ruby/pull/1209) Update shoulda-context version
|
45
|
+
* [#1235](https://github.com/stripe/stripe-ruby/pull/1235) Allow "error" string as log level
|
46
|
+
* [#1238](https://github.com/stripe/stripe-ruby/pull/1238) Update log level error message to include `error`
|
47
|
+
* [#1231](https://github.com/stripe/stripe-ruby/pull/1231) fix: variable typo in README for instrumentation
|
48
|
+
* [#1234](https://github.com/stripe/stripe-ruby/pull/1234) Update generated code
|
49
|
+
|
50
|
+
* [#1230](https://github.com/stripe/stripe-ruby/pull/1230) Update generated code
|
51
|
+
* Release specs are identical.
|
52
|
+
* [#1226](https://github.com/stripe/stripe-ruby/pull/1226) Update generated code
|
53
|
+
|
54
|
+
* [#1223](https://github.com/stripe/stripe-ruby/pull/1223) Update generated code
|
55
|
+
|
56
|
+
* [#1225](https://github.com/stripe/stripe-ruby/pull/1225) Downgrade jaro_winkler
|
57
|
+
* [#1219](https://github.com/stripe/stripe-ruby/pull/1219) Update generated code
|
58
|
+
|
59
|
+
Documentation updates.
|
60
|
+
* [#1215](https://github.com/stripe/stripe-ruby/pull/1215) Update generated code
|
61
|
+
|
62
|
+
* [#1208](https://github.com/stripe/stripe-ruby/pull/1208) Update generated code
|
63
|
+
|
64
|
+
* [#1204](https://github.com/stripe/stripe-ruby/pull/1204) Update generated code
|
65
|
+
|
66
|
+
|
67
|
+
## 8.5.0 - 2023-03-30
|
68
|
+
* [#1203](https://github.com/stripe/stripe-ruby/pull/1203) Update generated code
|
69
|
+
* Remove support for `create` method on resource `Tax.Transaction`
|
70
|
+
* This is not a breaking change, as this method was deprecated before the Tax Transactions API was released in favor of the `create_from_calculation` method.
|
71
|
+
* [#1201](https://github.com/stripe/stripe-ruby/pull/1201) Update save deprecation message
|
72
|
+
|
73
|
+
## 8.4.0 - 2023-03-23
|
74
|
+
* [#1197](https://github.com/stripe/stripe-ruby/pull/1197) Update generated code (new)
|
75
|
+
* Add support for new resources `Tax.CalculationLineItem`, `Tax.Calculation`, `Tax.TransactionLineItem`, and `Tax.Transaction`
|
76
|
+
* Add support for `create` and `list_line_items` methods on resource `Calculation`
|
77
|
+
* Add support for `create_from_calculation`, `create_reversal`, `create`, `list_line_items`, and `retrieve` methods on resource `Transaction`
|
78
|
+
* [#1152](https://github.com/stripe/stripe-ruby/pull/1152) Symbolize hash keys inside `convert_to_stripe_object_with_params`
|
79
|
+
|
80
|
+
## 8.3.0 - 2023-02-16
|
81
|
+
* [#1175](https://github.com/stripe/stripe-ruby/pull/1175) API Updates
|
82
|
+
* Add support for `refund_payment` method on resource `Terminal.Reader`
|
83
|
+
|
84
|
+
## 8.2.0 - 2023-02-02
|
85
|
+
* [#1173](https://github.com/stripe/stripe-ruby/pull/1173) API Updates
|
86
|
+
* Add support for `resume` method on resource `Subscription`
|
87
|
+
* [#1171](https://github.com/stripe/stripe-ruby/pull/1171) Remove unused `partial` param from `initialize_from`
|
88
|
+
|
89
|
+
## 8.1.0 - 2023-01-12
|
90
|
+
* [#1162](https://github.com/stripe/stripe-ruby/pull/1162) Improve request events instrumentation
|
91
|
+
|
92
|
+
## 8.0.0 - 2022-11-16
|
93
|
+
* [#1144](https://github.com/stripe/stripe-ruby/pull/1144) Next major release changes
|
94
|
+
|
95
|
+
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.
|
96
|
+
|
97
|
+
"⚠️" symbol highlights breaking changes.
|
98
|
+
|
99
|
+
### Deprecated
|
100
|
+
- The `save` method is deprecated. Prefer the static `update` method that doesn't require retrieval of the resource to update it.
|
101
|
+
``` ruby
|
102
|
+
# before
|
103
|
+
refund = Stripe::Refund.retrieve("re_123")
|
104
|
+
refund.description = "Refund description"
|
105
|
+
refund.save
|
106
|
+
|
107
|
+
# after
|
108
|
+
Stripe::Refund.update("re_123", description: "Refund description")
|
109
|
+
```
|
110
|
+
|
111
|
+
### ⚠️ Removed
|
112
|
+
- Removed deprecated `Sku` resource.
|
113
|
+
- Removed deprecated `Orders` resource.
|
114
|
+
- Removed deprecated `delete` method on `Subscription` resource. Please use `cancel` method instead.
|
115
|
+
```ruby
|
116
|
+
# before
|
117
|
+
Stripe::Subscription::delete("sub_12345")
|
118
|
+
|
119
|
+
# after
|
120
|
+
Stripe::Subscription::cancel("sub_12345")
|
121
|
+
```
|
122
|
+
|
123
|
+
|
124
|
+
## 7.1.0 - 2022-08-19
|
125
|
+
* [#1116](https://github.com/stripe/stripe-ruby/pull/1116) API Updates
|
126
|
+
* Add support for new resource `CustomerCashBalanceTransaction`
|
127
|
+
* [#1118](https://github.com/stripe/stripe-ruby/pull/1118) Update AllowedChars in rubocop config
|
128
|
+
* [#1117](https://github.com/stripe/stripe-ruby/pull/1117) Refresh rubocop config.
|
129
|
+
* [#1115](https://github.com/stripe/stripe-ruby/pull/1115) Add a support section to the readme
|
130
|
+
|
131
|
+
## 7.0.0 - 2022-08-02
|
132
|
+
|
133
|
+
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.
|
134
|
+
|
135
|
+
"⚠️" symbol highlights breaking changes.
|
136
|
+
|
137
|
+
* [#1106](https://github.com/stripe/stripe-ruby/pull/1106) API Updates
|
138
|
+
* [#1092](https://github.com/stripe/stripe-ruby/pull/1092) API Updates
|
139
|
+
* [#1090](https://github.com/stripe/stripe-ruby/pull/1090) Use auto-generation for `Invoice` methods
|
140
|
+
* [#1103](https://github.com/stripe/stripe-ruby/pull/1103) Next major release changes
|
141
|
+
|
142
|
+
### ⚠️ Changed
|
143
|
+
* `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.
|
144
|
+
* Update default bundle of CA certificates to April 26, 2022.
|
145
|
+
|
146
|
+
### Deprecated
|
147
|
+
* Deprecate `delete` method on `Subscription` resource. Please use `cancel` method instead.
|
148
|
+
|
149
|
+
### ⚠️ Removed
|
150
|
+
* Remove `details` method from `Issuing.Card` resource. The method was not supported.
|
151
|
+
* Remove `Issuing.CardDetails` resource. Read more at https://stripe.com/docs/issuing/cards/virtual.
|
152
|
+
* Remove `create` method from `ReportType` resource. The method was not supported.
|
153
|
+
* Remove `usage_record_summaries` method from `SubscriptionItem` resource. Please use `list_usage_record_summaries` method instead.
|
154
|
+
* Remove `AlipayAccount`, `BitcoinReceiver`, `BitcoinTransaction`, `Issuing::CardDetails`, `Recipient`, ` RecipientTransfer`, and `ThreeDSecure` resources. The resources were deprecated or no longer in use.
|
155
|
+
* Remove ability to list `Card` resource for a `Recipient`.
|
156
|
+
* Remove `cancel` method from `Transfer` resource. The method was deprecated.
|
157
|
+
|
158
|
+
## 6.5.0 - 2022-06-29
|
159
|
+
* [#1084](https://github.com/stripe/stripe-ruby/pull/1084) API Updates
|
160
|
+
* Add support for `deliver_card`, `fail_card`, `return_card`, and `ship_card` test helper methods on resource `Issuing.Card`
|
161
|
+
* [#1076](https://github.com/stripe/stripe-ruby/pull/1076) fix: Update logging to coerce ASCII-8BIT into UTF-8.
|
162
|
+
|
163
|
+
## 6.4.0 - 2022-06-17
|
164
|
+
* [#1073](https://github.com/stripe/stripe-ruby/pull/1073) API Updates
|
165
|
+
* Add support for `fund_cash_balance` test helper method on resource `Customer`
|
166
|
+
* [#1074](https://github.com/stripe/stripe-ruby/pull/1074) Support updating pre-release versions
|
167
|
+
* [#1072](https://github.com/stripe/stripe-ruby/pull/1072) Trigger workflows on beta branches
|
168
|
+
* [#1071](https://github.com/stripe/stripe-ruby/pull/1071) Use request_stripe_object for all requests
|
169
|
+
* [#1070](https://github.com/stripe/stripe-ruby/pull/1070) API Updates
|
170
|
+
|
171
|
+
Switch from using meta-programing to generating explicit methods for custom methods.
|
172
|
+
* [#1069](https://github.com/stripe/stripe-ruby/pull/1069) chore: Stop special implementation of Account.persons method.
|
173
|
+
|
174
|
+
## 6.3.0 - 2022-06-08
|
175
|
+
* [#1063](https://github.com/stripe/stripe-ruby/pull/1063) fix: Update cash balance methods to no longer require nested ID.
|
176
|
+
|
177
|
+
## 6.2.0 - 2022-05-23
|
178
|
+
* [#1060](https://github.com/stripe/stripe-ruby/pull/1060) API Updates
|
179
|
+
* Add support for new resource `Apps.Secret`
|
180
|
+
|
181
|
+
## 6.1.0 - 2022-05-19
|
182
|
+
* [#1057](https://github.com/stripe/stripe-ruby/pull/1057) API Updates
|
183
|
+
* 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`
|
184
|
+
* Add support for `retrieve_payment_method` method on resource `Customer`
|
185
|
+
* Add support for `list_owners` and `list` methods on resource `FinancialConnections.Account`
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
## 6.0.0 - 2022-05-09
|
190
|
+
* [#1056](https://github.com/stripe/stripe-ruby/pull/1056) API Updates
|
191
|
+
Major version release. The [migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-Guide-for-v6) contains more information.
|
192
|
+
|
193
|
+
(⚠️ = breaking changes):
|
194
|
+
* ⚠️ Replace the legacy `Order` API with the new `Order` API.
|
195
|
+
* New methods: `cancel`, `list_line_items`, `reopen`, and `submit`
|
196
|
+
* Removed methods: `pay` and `return_order`
|
197
|
+
* Removed resources: `OrderItem` and `OrderReturn`
|
198
|
+
* ⚠️ Rename `FinancialConnections::Account.refresh` to `FinancialConnections::Account.refresh_account
|
199
|
+
|
200
|
+
## 5.55.0 - 2022-05-05
|
201
|
+
* [#1055](https://github.com/stripe/stripe-ruby/pull/1055) API Updates
|
202
|
+
* Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
|
203
|
+
|
204
|
+
|
205
|
+
## 5.54.0 - 2022-05-03
|
206
|
+
* [#1053](https://github.com/stripe/stripe-ruby/pull/1053) API Updates
|
207
|
+
* Add support for new resource `CashBalance`
|
208
|
+
|
209
|
+
## 5.53.0 - 2022-04-21
|
210
|
+
* [#1050](https://github.com/stripe/stripe-ruby/pull/1050) API Updates
|
211
|
+
* Add support for `expire` test helper method on resource `Refund`
|
212
|
+
|
213
|
+
## 5.52.0 - 2022-04-18
|
214
|
+
* [#1046](https://github.com/stripe/stripe-ruby/pull/1046) [#1047](https://github.com/stripe/stripe-ruby/pull/1047) API Updates
|
215
|
+
* Add support for new resources `FundingInstructions` and `Terminal.Configuration`
|
216
|
+
|
217
|
+
## 5.51.0 - 2022-04-15
|
218
|
+
* [#1046](https://github.com/stripe/stripe-ruby/pull/1046) This release was incomplete and was yanked from RubyGems immediately after it was published.
|
219
|
+
|
220
|
+
## 5.50.0 - 2022-04-13
|
221
|
+
* [#1045](https://github.com/stripe/stripe-ruby/pull/1045) API Updates
|
222
|
+
* Add support for `increment_authorization` method on resource `PaymentIntent`
|
223
|
+
|
224
|
+
## 5.49.0 - 2022-04-08
|
225
|
+
* [#1043](https://github.com/stripe/stripe-ruby/pull/1043) API Updates
|
226
|
+
* Add support for `apply_customer_balance` method on resource `PaymentIntent`
|
227
|
+
|
228
|
+
## 5.48.0 - 2022-03-30
|
229
|
+
* [#1041](https://github.com/stripe/stripe-ruby/pull/1041) API Updates
|
230
|
+
* Add support for `cancel_action`, `process_payment_intent`, `process_setup_intent`, and `set_reader_display` methods on resource `Terminal.Reader`
|
231
|
+
|
232
|
+
## 5.47.0 - 2022-03-29
|
233
|
+
* [#1040](https://github.com/stripe/stripe-ruby/pull/1040) API Updates
|
234
|
+
* Add support for Search API
|
235
|
+
* Add support for `search` method on resources `Charge`, `Customer`, `Invoice`, `PaymentIntent`, `Price`, `Product`, and `Subscription`
|
236
|
+
|
237
|
+
* [#1034](https://github.com/stripe/stripe-ruby/pull/1034) Add supporting classes for test helper generation
|
238
|
+
|
239
|
+
## 5.46.0 - 2022-03-23
|
240
|
+
* [#1039](https://github.com/stripe/stripe-ruby/pull/1039) API Updates
|
241
|
+
* Add support for `cancel` method on resource `Refund`
|
242
|
+
* [#992](https://github.com/stripe/stripe-ruby/pull/992) Add support for Search API
|
243
|
+
|
244
|
+
## 5.45.0 - 2022-03-01
|
245
|
+
* [#1035](https://github.com/stripe/stripe-ruby/pull/1035) API Updates
|
246
|
+
* Add support for new resource `TestHelpers.TestClock`
|
247
|
+
|
248
|
+
## 5.44.0 - 2022-02-16
|
249
|
+
* [#1032](https://github.com/stripe/stripe-ruby/pull/1032) API Updates
|
250
|
+
* Add support for `verify_microdeposits` method on resources `PaymentIntent` and `SetupIntent`
|
251
|
+
|
252
|
+
## 5.43.0 - 2022-01-20
|
253
|
+
* [#1031](https://github.com/stripe/stripe-ruby/pull/1031) API Updates
|
254
|
+
* Add support for new resource `PaymentLink`
|
255
|
+
|
256
|
+
## 5.42.0 - 2021-12-13
|
257
|
+
* [#1022](https://github.com/stripe/stripe-ruby/pull/1022) Add connection manager logging and include object IDs in logging.
|
258
|
+
|
3
259
|
## 5.41.0 - 2021-11-16
|
4
260
|
* [#1017](https://github.com/stripe/stripe-ruby/pull/1017) API Updates
|
5
261
|
* Add support for new resource `ShippingRate`
|
data/Gemfile
CHANGED
@@ -5,12 +5,12 @@ source "https://rubygems.org"
|
|
5
5
|
gemspec
|
6
6
|
|
7
7
|
group :development do
|
8
|
+
gem "coveralls_reborn", "~> 0.25.0" if RUBY_VERSION >= "3.1"
|
8
9
|
gem "mocha", "~> 0.13.2"
|
9
10
|
gem "rack", ">= 2.0.6"
|
10
11
|
gem "rake"
|
11
12
|
|
12
|
-
|
13
|
-
gem "shoulda-context", "2.0.0.rc4"
|
13
|
+
gem "shoulda-context", "2.0.0"
|
14
14
|
|
15
15
|
gem "test-unit"
|
16
16
|
|
@@ -25,6 +25,9 @@ group :development do
|
|
25
25
|
# up-to-date, but it's not the end of the world if it's not.
|
26
26
|
gem "rubocop", "0.80"
|
27
27
|
|
28
|
+
# jaro_winkler 1.5.5 installation fails for jruby
|
29
|
+
gem "jaro_winkler", "1.5.4"
|
30
|
+
|
28
31
|
platforms :mri do
|
29
32
|
gem "byebug"
|
30
33
|
gem "pry"
|
data/Makefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
.PHONY: update-version codegen-format test ci-test
|
2
|
+
update-version:
|
3
|
+
@echo "$(VERSION)" > VERSION
|
4
|
+
@perl -pi -e 's|VERSION = "[.\-\w\d]+"|VERSION = "$(VERSION)"|' lib/stripe/version.rb
|
5
|
+
|
6
|
+
codegen-format:
|
7
|
+
bundle install --quiet
|
8
|
+
bundle exec rubocop -o /dev/null --auto-correct
|
9
|
+
|
10
|
+
ci-test:
|
11
|
+
bundle install && bundle exec rake test
|
12
|
+
|
13
|
+
test: ci-test
|
data/OPENAPI_VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
v461
|
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
|
@@ -18,7 +19,7 @@ The library also provides other features. For example:
|
|
18
19
|
|
19
20
|
## Documentation
|
20
21
|
|
21
|
-
See the [Ruby API docs](https://stripe.com/docs/api
|
22
|
+
See the [Ruby API docs](https://stripe.com/docs/api?lang=ruby).
|
22
23
|
|
23
24
|
See [video demonstrations][youtube-playlist] covering how to use the library.
|
24
25
|
|
@@ -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 = request_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
|
@@ -340,9 +374,9 @@ Update the bundled [stripe-mock] by editing the version number found in
|
|
340
374
|
[api-keys]: https://dashboard.stripe.com/account/apikeys
|
341
375
|
[connect]: https://stripe.com/connect
|
342
376
|
[curl]: http://curl.haxx.se/docs/caextract.html
|
343
|
-
[idempotency-keys]: https://stripe.com/docs/api/ruby
|
377
|
+
[idempotency-keys]: https://stripe.com/docs/api/idempotent_requests?lang=ruby
|
344
378
|
[stripe-mock]: https://github.com/stripe/stripe-mock
|
345
|
-
[versioning]: https://stripe.com/docs/api/ruby
|
379
|
+
[versioning]: https://stripe.com/docs/api/versioning?lang=ruby
|
346
380
|
[youtube-playlist]: https://www.youtube.com/playlist?list=PLy1nL-pvL2M50RmP6ie-gdcSnfOuQCRYk
|
347
381
|
|
348
382
|
<!--
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
9.0.0
|