stripe 5.39.0 → 10.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +304 -0
  3. data/Gemfile +5 -2
  4. data/Makefile +13 -0
  5. data/OPENAPI_VERSION +1 -0
  6. data/README.md +40 -6
  7. data/VERSION +1 -1
  8. data/lib/data/ca-certificates.crt +1241 -1937
  9. data/lib/stripe/api_operations/create.rb +6 -2
  10. data/lib/stripe/api_operations/delete.rb +12 -7
  11. data/lib/stripe/api_operations/list.rb +6 -9
  12. data/lib/stripe/api_operations/nested_resource.rb +62 -34
  13. data/lib/stripe/api_operations/request.rb +10 -0
  14. data/lib/stripe/api_operations/save.rb +13 -3
  15. data/lib/stripe/api_operations/search.rb +16 -0
  16. data/lib/stripe/api_resource.rb +3 -18
  17. data/lib/stripe/api_resource_test_helpers.rb +49 -0
  18. data/lib/stripe/api_version.rb +8 -0
  19. data/lib/stripe/connection_manager.rb +22 -1
  20. data/lib/stripe/instrumentation.rb +45 -7
  21. data/lib/stripe/object_types.rb +35 -10
  22. data/lib/stripe/resources/account.rb +37 -11
  23. data/lib/stripe/resources/account_link.rb +4 -0
  24. data/lib/stripe/resources/account_session.rb +17 -0
  25. data/lib/stripe/resources/application_fee.rb +1 -2
  26. data/lib/stripe/resources/application_fee_refund.rb +5 -0
  27. data/lib/stripe/resources/apps/secret.rb +40 -0
  28. data/lib/stripe/resources/balance.rb +11 -0
  29. data/lib/stripe/resources/balance_transaction.rb +4 -0
  30. data/lib/stripe/resources/bank_account.rb +7 -0
  31. data/lib/stripe/resources/billing_portal/configuration.rb +1 -0
  32. data/lib/stripe/resources/billing_portal/session.rb +14 -0
  33. data/lib/stripe/resources/capability.rb +3 -0
  34. data/lib/stripe/resources/card.rb +6 -3
  35. data/lib/stripe/resources/cash_balance.rb +23 -0
  36. data/lib/stripe/resources/charge.rb +23 -3
  37. data/lib/stripe/resources/checkout/session.rb +49 -2
  38. data/lib/stripe/resources/country_spec.rb +6 -0
  39. data/lib/stripe/resources/coupon.rb +3 -0
  40. data/lib/stripe/resources/credit_note.rb +27 -9
  41. data/lib/stripe/resources/credit_note_line_item.rb +1 -0
  42. data/lib/stripe/resources/customer.rb +119 -15
  43. data/lib/stripe/resources/customer_balance_transaction.rb +6 -0
  44. data/lib/stripe/resources/customer_cash_balance_transaction.rb +14 -0
  45. data/lib/stripe/resources/discount.rb +5 -0
  46. data/lib/stripe/resources/dispute.rb +15 -3
  47. data/lib/stripe/resources/event.rb +30 -0
  48. data/lib/stripe/resources/exchange_rate.rb +26 -0
  49. data/lib/stripe/resources/file.rb +7 -0
  50. data/lib/stripe/resources/file_link.rb +3 -0
  51. data/lib/stripe/resources/financial_connections/account.rb +67 -0
  52. data/lib/stripe/resources/financial_connections/account_owner.rb +11 -0
  53. data/lib/stripe/resources/financial_connections/account_ownership.rb +11 -0
  54. data/lib/stripe/resources/financial_connections/session.rb +13 -0
  55. data/lib/stripe/resources/funding_instructions.rb +21 -0
  56. data/lib/stripe/resources/identity/verification_report.rb +11 -0
  57. data/lib/stripe/resources/identity/verification_session.rb +31 -5
  58. data/lib/stripe/resources/invoice.rb +100 -17
  59. data/lib/stripe/resources/invoice_item.rb +11 -0
  60. data/lib/stripe/resources/issuing/authorization.rb +114 -5
  61. data/lib/stripe/resources/issuing/card.rb +78 -8
  62. data/lib/stripe/resources/issuing/cardholder.rb +3 -0
  63. data/lib/stripe/resources/issuing/dispute.rb +13 -3
  64. data/lib/stripe/resources/issuing/token.rb +14 -0
  65. data/lib/stripe/resources/issuing/transaction.rb +49 -0
  66. data/lib/stripe/resources/line_item.rb +1 -0
  67. data/lib/stripe/resources/login_link.rb +1 -0
  68. data/lib/stripe/resources/mandate.rb +1 -0
  69. data/lib/stripe/resources/payment_intent.rb +103 -6
  70. data/lib/stripe/resources/payment_link.rb +35 -0
  71. data/lib/stripe/resources/payment_method.rb +25 -5
  72. data/lib/stripe/resources/payment_method_configuration.rb +26 -0
  73. data/lib/stripe/resources/payment_method_domain.rb +34 -0
  74. data/lib/stripe/resources/payout.rb +28 -5
  75. data/lib/stripe/resources/person.rb +6 -0
  76. data/lib/stripe/resources/plan.rb +8 -0
  77. data/lib/stripe/resources/price.rb +15 -0
  78. data/lib/stripe/resources/product.rb +17 -0
  79. data/lib/stripe/resources/promotion_code.rb +2 -0
  80. data/lib/stripe/resources/quote.rb +58 -35
  81. data/lib/stripe/resources/radar/early_fraud_warning.rb +4 -0
  82. data/lib/stripe/resources/radar/value_list.rb +3 -0
  83. data/lib/stripe/resources/radar/value_list_item.rb +3 -0
  84. data/lib/stripe/resources/refund.rb +49 -0
  85. data/lib/stripe/resources/reporting/report_run.rb +8 -0
  86. data/lib/stripe/resources/reporting/report_type.rb +8 -1
  87. data/lib/stripe/resources/reversal.rb +13 -0
  88. data/lib/stripe/resources/review.rb +14 -3
  89. data/lib/stripe/resources/setup_attempt.rb +4 -0
  90. data/lib/stripe/resources/setup_intent.rb +59 -5
  91. data/lib/stripe/resources/shipping_rate.rb +14 -0
  92. data/lib/stripe/resources/sigma/scheduled_query_run.rb +4 -0
  93. data/lib/stripe/resources/source.rb +27 -8
  94. data/lib/stripe/resources/source_transaction.rb +5 -0
  95. data/lib/stripe/resources/subscription.rb +57 -3
  96. data/lib/stripe/resources/subscription_item.rb +2 -7
  97. data/lib/stripe/resources/subscription_schedule.rb +23 -5
  98. data/lib/stripe/resources/tax/calculation.rb +33 -0
  99. data/lib/stripe/resources/tax/calculation_line_item.rb +10 -0
  100. data/lib/stripe/resources/tax/registration.rb +19 -0
  101. data/lib/stripe/resources/tax/settings.rb +15 -0
  102. data/lib/stripe/resources/tax/transaction.rb +49 -0
  103. data/lib/stripe/resources/tax/transaction_line_item.rb +10 -0
  104. data/lib/stripe/resources/tax_code.rb +1 -0
  105. data/lib/stripe/resources/tax_id.rb +4 -0
  106. data/lib/stripe/resources/tax_rate.rb +3 -0
  107. data/lib/stripe/resources/terminal/configuration.rb +16 -0
  108. data/lib/stripe/resources/terminal/connection_token.rb +3 -0
  109. data/lib/stripe/resources/terminal/location.rb +3 -0
  110. data/lib/stripe/resources/terminal/reader.rb +119 -0
  111. data/lib/stripe/resources/test_helpers/test_clock.rb +35 -0
  112. data/lib/stripe/resources/token.rb +20 -0
  113. data/lib/stripe/resources/topup.rb +15 -3
  114. data/lib/stripe/resources/transfer.rb +11 -13
  115. data/lib/stripe/resources/treasury/credit_reversal.rb +14 -0
  116. data/lib/stripe/resources/treasury/debit_reversal.rb +14 -0
  117. data/lib/stripe/resources/treasury/financial_account.rb +52 -0
  118. data/lib/stripe/resources/treasury/financial_account_features.rb +12 -0
  119. data/lib/stripe/resources/treasury/inbound_transfer.rb +94 -0
  120. data/lib/stripe/resources/treasury/outbound_payment.rb +96 -0
  121. data/lib/stripe/resources/treasury/outbound_transfer.rb +96 -0
  122. data/lib/stripe/resources/treasury/received_credit.rb +30 -0
  123. data/lib/stripe/resources/treasury/received_debit.rb +30 -0
  124. data/lib/stripe/resources/treasury/transaction.rb +13 -0
  125. data/lib/stripe/resources/treasury/transaction_entry.rb +17 -0
  126. data/lib/stripe/resources/usage_record.rb +4 -0
  127. data/lib/stripe/resources/webhook_endpoint.rb +7 -0
  128. data/lib/stripe/resources.rb +33 -10
  129. data/lib/stripe/search_result_object.rb +86 -0
  130. data/lib/stripe/stripe_client.rb +37 -22
  131. data/lib/stripe/stripe_configuration.rb +5 -1
  132. data/lib/stripe/stripe_object.rb +2 -2
  133. data/lib/stripe/util.rb +85 -2
  134. data/lib/stripe/version.rb +1 -1
  135. data/lib/stripe/webhook.rb +2 -1
  136. data/lib/stripe.rb +5 -1
  137. data/stripe.gemspec +3 -3
  138. metadata +45 -14
  139. data/lib/stripe/resources/bitcoin_receiver.rb +0 -24
  140. data/lib/stripe/resources/bitcoin_transaction.rb +0 -16
  141. data/lib/stripe/resources/issuing/card_details.rb +0 -9
  142. data/lib/stripe/resources/order.rb +0 -33
  143. data/lib/stripe/resources/order_return.rb +0 -10
  144. data/lib/stripe/resources/recipient.rb +0 -14
  145. data/lib/stripe/resources/sku.rb +0 -13
  146. 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: f1e54cc2d57c31541003984f4cea2ac0e6523a88974bbe060c1332ecc3b2dd13
4
- data.tar.gz: 7834d48a4ec62a379ffba64730d81304f66185ba85d07c53c645a2239f44ac89
3
+ metadata.gz: 161eba8138b975aa9911f0fb43639b9732d11368b870d56b2a40dc394d8ae23c
4
+ data.tar.gz: 49cda1fbae2fe6731646e00d795406d03bcf5cdc0f3973e700c12a3b048098db
5
5
  SHA512:
6
- metadata.gz: 30661886d59dff20441b18404bf2bfc7a9e2371c68ac20bd48700d54c36ca46f29dceb87a22764ead9fb1a128949200edefa37da12fcc81b74d337d799e1cca7
7
- data.tar.gz: fac41913db0bcffa10c386c8ecd5cbeb6a1a542b8c73066a8b75b91f2860524adf202ffdbef92a2fd096566f35595e7633970af261858d10199a839096a0f7ba
6
+ metadata.gz: d80cdfbfeb61f3012e1e94483adb2221a7921e12b1a3461681c592cebf95937898fd438458d1feaa351824820f4711a42ddd7d3ebc20ed02a59d9896085e0fe5
7
+ data.tar.gz: a8d56ab530687777b348080757e53f20dc83a0121ce5e3578e4ff7fee31ea024be48b68fef318a9d7433d1d246a84e6a97d461942986dee5d684eeb04558db2a
data/CHANGELOG.md CHANGED
@@ -1,4 +1,308 @@
1
1
  # Changelog
2
+ ## 10.1.0 - 2023-11-02
3
+ * [#1286](https://github.com/stripe/stripe-ruby/pull/1286) Update generated code
4
+ * Add support for new resource `Tax.Registration`
5
+ * Add support for `create`, `list`, and `update` methods on resource `Registration`
6
+
7
+ ## 10.0.0 - 2023-10-16
8
+ * 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`.
9
+ * [#1283](https://github.com/stripe/stripe-ruby/pull/1283) Update generated code
10
+ - Updated pinned API version
11
+ * [#1281](https://github.com/stripe/stripe-ruby/pull/1281) Update generated code
12
+ * Documentation only changes
13
+
14
+ ## 9.4.0 - 2023-10-05
15
+ * [#1277](https://github.com/stripe/stripe-ruby/pull/1277) Update generated code
16
+ * Add support for new resources `Issuing.Token`
17
+ * Add support for `list`, `retrieve`, and `update` methods on resource `Token`
18
+
19
+ ## 9.3.0 - 2023-09-14
20
+ * [#1272](https://github.com/stripe/stripe-ruby/pull/1272) Update generated code
21
+ * Add support for new resource `PaymentMethodConfiguration`
22
+ * Add support for `create`, `list`, `retrieve`, and `update` methods on resource `PaymentMethodConfiguration`
23
+ * [#1271](https://github.com/stripe/stripe-ruby/pull/1271) Update generated code
24
+ * Add support for `capture`, `create`, `expire`, `increment`, and `reverse` test helper methods on resource `Issuing.Authorization`
25
+ * Add support for `create_force_capture`, `create_unlinked_refund`, and `refund` test helper methods on resource `Issuing.Transaction`
26
+
27
+ ## 9.2.0 - 2023-09-07
28
+ * [#1267](https://github.com/stripe/stripe-ruby/pull/1267) Update generated code
29
+ * Add support for new resource `PaymentMethodDomain`
30
+ * Add support for `create`, `list`, `retrieve`, `update`, and `validate` methods on resource `PaymentMethodDomain`
31
+
32
+ ## 9.1.0 - 2023-08-31
33
+ * [#1266](https://github.com/stripe/stripe-ruby/pull/1266) Update generated code
34
+ * Add support for new resource `AccountSession`
35
+ * Add support for `create` method on resource `AccountSession`
36
+ * [#1262](https://github.com/stripe/stripe-ruby/pull/1262) Explicitly format timestamp in SignatureVerificationError message
37
+
38
+
39
+ ## 9.0.0 - 2023-08-16
40
+ **⚠️ ACTION REQUIRED: the breaking change in this release likely affects you ⚠️**
41
+
42
+ * [#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
43
+
44
+ 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).
45
+
46
+ To successfully upgrade to stripe-ruby v9, you must either
47
+
48
+ 1. **(Recommended) Upgrade your integration to be compatible with API Version `2023-08-16`.**
49
+
50
+ 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.
51
+
52
+ You can read the [v9 migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v9) for more detailed instructions.
53
+ 2. **(Alternative option) Specify a version other than `2023-08-16` when initializing `stripe-ruby`.**
54
+
55
+ 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:
56
+
57
+ ```diff
58
+ require 'stripe'
59
+ Stripe.api_key = "sk_test_..."
60
+ + Stripe.api_version = '2020-08-27'
61
+ ```
62
+
63
+ If you were already initializing stripe-ruby with an explicit API Version, upgrading to v9 will not affect your integration.
64
+
65
+ Read the [v9 migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v9) for more details.
66
+
67
+ Going forward, each major release of this library will be *pinned* by default to the latest Stripe API Version at the time of release.
68
+
69
+ 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.
70
+
71
+ ## 8.7.0 - 2023-08-10
72
+ * [#1256](https://github.com/stripe/stripe-ruby/pull/1256) Update generated code
73
+ 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.
74
+
75
+ ## 8.6.0 - 2023-07-13
76
+ * [#1244](https://github.com/stripe/stripe-ruby/pull/1244) Update generated code
77
+ * Add support for new resource `Tax.Settings`
78
+ * Add support for `retrieve` and `update` methods on resource `Settings`
79
+ * [#1241](https://github.com/stripe/stripe-ruby/pull/1241) Update generated code
80
+
81
+ * [#1209](https://github.com/stripe/stripe-ruby/pull/1209) Update shoulda-context version
82
+ * [#1235](https://github.com/stripe/stripe-ruby/pull/1235) Allow "error" string as log level
83
+ * [#1238](https://github.com/stripe/stripe-ruby/pull/1238) Update log level error message to include `error`
84
+ * [#1231](https://github.com/stripe/stripe-ruby/pull/1231) fix: variable typo in README for instrumentation
85
+ * [#1234](https://github.com/stripe/stripe-ruby/pull/1234) Update generated code
86
+
87
+ * [#1230](https://github.com/stripe/stripe-ruby/pull/1230) Update generated code
88
+ * Release specs are identical.
89
+ * [#1226](https://github.com/stripe/stripe-ruby/pull/1226) Update generated code
90
+
91
+ * [#1223](https://github.com/stripe/stripe-ruby/pull/1223) Update generated code
92
+
93
+ * [#1225](https://github.com/stripe/stripe-ruby/pull/1225) Downgrade jaro_winkler
94
+ * [#1219](https://github.com/stripe/stripe-ruby/pull/1219) Update generated code
95
+
96
+ Documentation updates.
97
+ * [#1215](https://github.com/stripe/stripe-ruby/pull/1215) Update generated code
98
+
99
+ * [#1208](https://github.com/stripe/stripe-ruby/pull/1208) Update generated code
100
+
101
+ * [#1204](https://github.com/stripe/stripe-ruby/pull/1204) Update generated code
102
+
103
+
104
+ ## 8.5.0 - 2023-03-30
105
+ * [#1203](https://github.com/stripe/stripe-ruby/pull/1203) Update generated code
106
+ * Remove support for `create` method on resource `Tax.Transaction`
107
+ * 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.
108
+ * [#1201](https://github.com/stripe/stripe-ruby/pull/1201) Update save deprecation message
109
+
110
+ ## 8.4.0 - 2023-03-23
111
+ * [#1197](https://github.com/stripe/stripe-ruby/pull/1197) Update generated code (new)
112
+ * Add support for new resources `Tax.CalculationLineItem`, `Tax.Calculation`, `Tax.TransactionLineItem`, and `Tax.Transaction`
113
+ * Add support for `create` and `list_line_items` methods on resource `Calculation`
114
+ * Add support for `create_from_calculation`, `create_reversal`, `create`, `list_line_items`, and `retrieve` methods on resource `Transaction`
115
+ * [#1152](https://github.com/stripe/stripe-ruby/pull/1152) Symbolize hash keys inside `convert_to_stripe_object_with_params`
116
+
117
+ ## 8.3.0 - 2023-02-16
118
+ * [#1175](https://github.com/stripe/stripe-ruby/pull/1175) API Updates
119
+ * Add support for `refund_payment` method on resource `Terminal.Reader`
120
+
121
+ ## 8.2.0 - 2023-02-02
122
+ * [#1173](https://github.com/stripe/stripe-ruby/pull/1173) API Updates
123
+ * Add support for `resume` method on resource `Subscription`
124
+ * [#1171](https://github.com/stripe/stripe-ruby/pull/1171) Remove unused `partial` param from `initialize_from`
125
+
126
+ ## 8.1.0 - 2023-01-12
127
+ * [#1162](https://github.com/stripe/stripe-ruby/pull/1162) Improve request events instrumentation
128
+
129
+ ## 8.0.0 - 2022-11-16
130
+ * [#1144](https://github.com/stripe/stripe-ruby/pull/1144) Next major release changes
131
+
132
+ 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.
133
+
134
+ "⚠️" symbol highlights breaking changes.
135
+
136
+ ### Deprecated
137
+ - The `save` method is deprecated. Prefer the static `update` method that doesn't require retrieval of the resource to update it.
138
+ ``` ruby
139
+ # before
140
+ refund = Stripe::Refund.retrieve("re_123")
141
+ refund.description = "Refund description"
142
+ refund.save
143
+
144
+ # after
145
+ Stripe::Refund.update("re_123", description: "Refund description")
146
+ ```
147
+
148
+ ### ⚠️ Removed
149
+ - Removed deprecated `Sku` resource.
150
+ - Removed deprecated `Orders` resource.
151
+ - Removed deprecated `delete` method on `Subscription` resource. Please use `cancel` method instead.
152
+ ```ruby
153
+ # before
154
+ Stripe::Subscription::delete("sub_12345")
155
+
156
+ # after
157
+ Stripe::Subscription::cancel("sub_12345")
158
+ ```
159
+
160
+
161
+ ## 7.1.0 - 2022-08-19
162
+ * [#1116](https://github.com/stripe/stripe-ruby/pull/1116) API Updates
163
+ * Add support for new resource `CustomerCashBalanceTransaction`
164
+ * [#1118](https://github.com/stripe/stripe-ruby/pull/1118) Update AllowedChars in rubocop config
165
+ * [#1117](https://github.com/stripe/stripe-ruby/pull/1117) Refresh rubocop config.
166
+ * [#1115](https://github.com/stripe/stripe-ruby/pull/1115) Add a support section to the readme
167
+
168
+ ## 7.0.0 - 2022-08-02
169
+
170
+ 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.
171
+
172
+ "⚠️" symbol highlights breaking changes.
173
+
174
+ * [#1106](https://github.com/stripe/stripe-ruby/pull/1106) API Updates
175
+ * [#1092](https://github.com/stripe/stripe-ruby/pull/1092) API Updates
176
+ * [#1090](https://github.com/stripe/stripe-ruby/pull/1090) Use auto-generation for `Invoice` methods
177
+ * [#1103](https://github.com/stripe/stripe-ruby/pull/1103) Next major release changes
178
+
179
+ ### ⚠️ Changed
180
+ * `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.
181
+ * Update default bundle of CA certificates to April 26, 2022.
182
+
183
+ ### Deprecated
184
+ * Deprecate `delete` method on `Subscription` resource. Please use `cancel` method instead.
185
+
186
+ ### ⚠️ Removed
187
+ * Remove `details` method from `Issuing.Card` resource. The method was not supported.
188
+ * Remove `Issuing.CardDetails` resource. Read more at https://stripe.com/docs/issuing/cards/virtual.
189
+ * Remove `create` method from `ReportType` resource. The method was not supported.
190
+ * Remove `usage_record_summaries` method from `SubscriptionItem` resource. Please use `list_usage_record_summaries` method instead.
191
+ * Remove `AlipayAccount`, `BitcoinReceiver`, `BitcoinTransaction`, `Issuing::CardDetails`, `Recipient`, ` RecipientTransfer`, and `ThreeDSecure` resources. The resources were deprecated or no longer in use.
192
+ * Remove ability to list `Card` resource for a `Recipient`.
193
+ * Remove `cancel` method from `Transfer` resource. The method was deprecated.
194
+
195
+ ## 6.5.0 - 2022-06-29
196
+ * [#1084](https://github.com/stripe/stripe-ruby/pull/1084) API Updates
197
+ * Add support for `deliver_card`, `fail_card`, `return_card`, and `ship_card` test helper methods on resource `Issuing.Card`
198
+ * [#1076](https://github.com/stripe/stripe-ruby/pull/1076) fix: Update logging to coerce ASCII-8BIT into UTF-8.
199
+
200
+ ## 6.4.0 - 2022-06-17
201
+ * [#1073](https://github.com/stripe/stripe-ruby/pull/1073) API Updates
202
+ * Add support for `fund_cash_balance` test helper method on resource `Customer`
203
+ * [#1074](https://github.com/stripe/stripe-ruby/pull/1074) Support updating pre-release versions
204
+ * [#1072](https://github.com/stripe/stripe-ruby/pull/1072) Trigger workflows on beta branches
205
+ * [#1071](https://github.com/stripe/stripe-ruby/pull/1071) Use request_stripe_object for all requests
206
+ * [#1070](https://github.com/stripe/stripe-ruby/pull/1070) API Updates
207
+
208
+ Switch from using meta-programing to generating explicit methods for custom methods.
209
+ * [#1069](https://github.com/stripe/stripe-ruby/pull/1069) chore: Stop special implementation of Account.persons method.
210
+
211
+ ## 6.3.0 - 2022-06-08
212
+ * [#1063](https://github.com/stripe/stripe-ruby/pull/1063) fix: Update cash balance methods to no longer require nested ID.
213
+
214
+ ## 6.2.0 - 2022-05-23
215
+ * [#1060](https://github.com/stripe/stripe-ruby/pull/1060) API Updates
216
+ * Add support for new resource `Apps.Secret`
217
+
218
+ ## 6.1.0 - 2022-05-19
219
+ * [#1057](https://github.com/stripe/stripe-ruby/pull/1057) API Updates
220
+ * 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`
221
+ * Add support for `retrieve_payment_method` method on resource `Customer`
222
+ * Add support for `list_owners` and `list` methods on resource `FinancialConnections.Account`
223
+
224
+
225
+
226
+ ## 6.0.0 - 2022-05-09
227
+ * [#1056](https://github.com/stripe/stripe-ruby/pull/1056) API Updates
228
+ Major version release. The [migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-Guide-for-v6) contains more information.
229
+
230
+ (⚠️ = breaking changes):
231
+ * ⚠️ Replace the legacy `Order` API with the new `Order` API.
232
+ * New methods: `cancel`, `list_line_items`, `reopen`, and `submit`
233
+ * Removed methods: `pay` and `return_order`
234
+ * Removed resources: `OrderItem` and `OrderReturn`
235
+ * ⚠️ Rename `FinancialConnections::Account.refresh` to `FinancialConnections::Account.refresh_account
236
+
237
+ ## 5.55.0 - 2022-05-05
238
+ * [#1055](https://github.com/stripe/stripe-ruby/pull/1055) API Updates
239
+ * Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
240
+
241
+
242
+ ## 5.54.0 - 2022-05-03
243
+ * [#1053](https://github.com/stripe/stripe-ruby/pull/1053) API Updates
244
+ * Add support for new resource `CashBalance`
245
+
246
+ ## 5.53.0 - 2022-04-21
247
+ * [#1050](https://github.com/stripe/stripe-ruby/pull/1050) API Updates
248
+ * Add support for `expire` test helper method on resource `Refund`
249
+
250
+ ## 5.52.0 - 2022-04-18
251
+ * [#1046](https://github.com/stripe/stripe-ruby/pull/1046) [#1047](https://github.com/stripe/stripe-ruby/pull/1047) API Updates
252
+ * Add support for new resources `FundingInstructions` and `Terminal.Configuration`
253
+
254
+ ## 5.51.0 - 2022-04-15
255
+ * [#1046](https://github.com/stripe/stripe-ruby/pull/1046) This release was incomplete and was yanked from RubyGems immediately after it was published.
256
+
257
+ ## 5.50.0 - 2022-04-13
258
+ * [#1045](https://github.com/stripe/stripe-ruby/pull/1045) API Updates
259
+ * Add support for `increment_authorization` method on resource `PaymentIntent`
260
+
261
+ ## 5.49.0 - 2022-04-08
262
+ * [#1043](https://github.com/stripe/stripe-ruby/pull/1043) API Updates
263
+ * Add support for `apply_customer_balance` method on resource `PaymentIntent`
264
+
265
+ ## 5.48.0 - 2022-03-30
266
+ * [#1041](https://github.com/stripe/stripe-ruby/pull/1041) API Updates
267
+ * Add support for `cancel_action`, `process_payment_intent`, `process_setup_intent`, and `set_reader_display` methods on resource `Terminal.Reader`
268
+
269
+ ## 5.47.0 - 2022-03-29
270
+ * [#1040](https://github.com/stripe/stripe-ruby/pull/1040) API Updates
271
+ * Add support for Search API
272
+ * Add support for `search` method on resources `Charge`, `Customer`, `Invoice`, `PaymentIntent`, `Price`, `Product`, and `Subscription`
273
+
274
+ * [#1034](https://github.com/stripe/stripe-ruby/pull/1034) Add supporting classes for test helper generation
275
+
276
+ ## 5.46.0 - 2022-03-23
277
+ * [#1039](https://github.com/stripe/stripe-ruby/pull/1039) API Updates
278
+ * Add support for `cancel` method on resource `Refund`
279
+ * [#992](https://github.com/stripe/stripe-ruby/pull/992) Add support for Search API
280
+
281
+ ## 5.45.0 - 2022-03-01
282
+ * [#1035](https://github.com/stripe/stripe-ruby/pull/1035) API Updates
283
+ * Add support for new resource `TestHelpers.TestClock`
284
+
285
+ ## 5.44.0 - 2022-02-16
286
+ * [#1032](https://github.com/stripe/stripe-ruby/pull/1032) API Updates
287
+ * Add support for `verify_microdeposits` method on resources `PaymentIntent` and `SetupIntent`
288
+
289
+ ## 5.43.0 - 2022-01-20
290
+ * [#1031](https://github.com/stripe/stripe-ruby/pull/1031) API Updates
291
+ * Add support for new resource `PaymentLink`
292
+
293
+ ## 5.42.0 - 2021-12-13
294
+ * [#1022](https://github.com/stripe/stripe-ruby/pull/1022) Add connection manager logging and include object IDs in logging.
295
+
296
+ ## 5.41.0 - 2021-11-16
297
+ * [#1017](https://github.com/stripe/stripe-ruby/pull/1017) API Updates
298
+ * Add support for new resource `ShippingRate`
299
+
300
+ ## 5.40.0 - 2021-11-11
301
+ * [#1015](https://github.com/stripe/stripe-ruby/pull/1015) API Updates
302
+ * Add support for `expire` method on resource `Checkout.Session`
303
+ * [#1013](https://github.com/stripe/stripe-ruby/pull/1013) Add tests for child resources.
304
+ * [#1012](https://github.com/stripe/stripe-ruby/pull/1012) Add tests for namespaced resources.
305
+ * [#1011](https://github.com/stripe/stripe-ruby/pull/1011) codegen: 3 more files
2
306
 
3
307
  ## 5.39.0 - 2021-10-11
4
308
  * [#1010](https://github.com/stripe/stripe-ruby/pull/1010) API Updates
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
- # Update to 2.0.0 once it ships.
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
+ v640
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://travis-ci.org/stripe/stripe-ruby.svg?branch=master)](https://travis-ci.org/stripe/stripe-ruby)
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/ruby#intro).
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`. HTTP request identifier.
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: request_event.path.split('/')[2],
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#idempotent_requests
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#versioning
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
- 5.39.0
1
+ 10.1.0