stripe 9.3.0 → 9.4.0.pre.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +210 -40
  3. data/OPENAPI_VERSION +1 -1
  4. data/README.md +11 -0
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_operations/request.rb +2 -0
  7. data/lib/stripe/api_version.rb +1 -0
  8. data/lib/stripe/object_types.rb +17 -0
  9. data/lib/stripe/request_signing_authenticator.rb +83 -0
  10. data/lib/stripe/resources/capital/financing_offer.rb +32 -0
  11. data/lib/stripe/resources/capital/financing_summary.rb +12 -0
  12. data/lib/stripe/resources/capital/financing_transaction.rb +13 -0
  13. data/lib/stripe/resources/confirmation_token.rb +11 -0
  14. data/lib/stripe/resources/customer_session.rb +12 -0
  15. data/lib/stripe/resources/file.rb +4 -4
  16. data/lib/stripe/resources/file_link.rb +1 -1
  17. data/lib/stripe/resources/financial_connections/account.rb +39 -0
  18. data/lib/stripe/resources/financial_connections/inferred_balance.rb +13 -0
  19. data/lib/stripe/resources/financial_connections/transaction.rb +13 -0
  20. data/lib/stripe/resources/gift_cards/card.rb +25 -0
  21. data/lib/stripe/resources/gift_cards/transaction.rb +56 -0
  22. data/lib/stripe/resources/issuing/card_bundle.rb +13 -0
  23. data/lib/stripe/resources/issuing/card_design.rb +77 -0
  24. data/lib/stripe/resources/order.rb +89 -0
  25. data/lib/stripe/resources/person.rb +1 -1
  26. data/lib/stripe/resources/quote.rb +94 -0
  27. data/lib/stripe/resources/quote_phase.rb +29 -0
  28. data/lib/stripe/resources/quote_preview_invoice.rb +42 -0
  29. data/lib/stripe/resources/quote_preview_schedule.rb +10 -0
  30. data/lib/stripe/resources/subscription_schedule.rb +18 -0
  31. data/lib/stripe/resources/tax/form.rb +39 -0
  32. data/lib/stripe/resources/tax/registration.rb +19 -0
  33. data/lib/stripe/resources/tax_id.rb +3 -3
  34. data/lib/stripe/resources/terminal/reader.rb +54 -0
  35. data/lib/stripe/resources.rb +17 -0
  36. data/lib/stripe/stripe_client.rb +60 -26
  37. data/lib/stripe/stripe_configuration.rb +2 -0
  38. data/lib/stripe/util.rb +8 -1
  39. data/lib/stripe/version.rb +1 -1
  40. data/lib/stripe.rb +46 -0
  41. metadata +22 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcf0274fbad4e15be02d4b11d735147eab8d6cb5c7dd570c9d40a459a08f3ebc
4
- data.tar.gz: d67f24cc6bef98f57a2f0d1f54034cce8c8d9f1db8c656badd06f63ca28851c3
3
+ metadata.gz: 52c3ade4e579d5105608cdbc8376206b4c49676e6666cba84682acb14c38f6fd
4
+ data.tar.gz: 24b2e7585eea630da22d59ca7ab8c56376e1fe120b2b7cd9235eff55a1ab536f
5
5
  SHA512:
6
- metadata.gz: ff8e6be35379dde8bd4a51c08d11955267347520f654f5cb508ee78b277078b659c5db4582e306d2f271739152635e0dc16d4736e0800bae04f9e4109bbc52f5
7
- data.tar.gz: e4a11dc8805e67040a96f6a5a1d113bbde439d9a1fff61d6566963c20f7ac0608757fba85c58c4475e7bdcd4e199d839a41905df66fe710e5b1cfdd9207ce89b
6
+ metadata.gz: a22eea0f783b1f98bd8b4ee5f39380e6dfb6f4d6c70607f53ec084a073e39d06d3cebe9f9553d9d6d85b4928475772d9470aeaaa2dd3fafa27e7cfb6ae213f68
7
+ data.tar.gz: 5128b0127936534755ca895220d97b62818776cca564ed5d560fbb781feba896c5803b3486b747eee77e195643a384d26b2c20a6b68ff5863d26e22bb8ffa74d
data/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
1
  # Changelog
2
+
3
+ ## 9.4.0-beta.2 - 2023-09-21
4
+ * [#1273](https://github.com/stripe/stripe-ruby/pull/1273) Update generated code for beta
5
+
6
+ ## 9.4.0-beta.1 - 2023-09-14
7
+ * Updated stable APIs to the latest version
8
+
2
9
  ## 9.3.0 - 2023-09-14
3
10
  * [#1272](https://github.com/stripe/stripe-ruby/pull/1272) Update generated code
4
11
  * Add support for new resource `PaymentMethodConfiguration`
@@ -7,18 +14,38 @@
7
14
  * Add support for `capture`, `create`, `expire`, `increment`, and `reverse` test helper methods on resource `Issuing.Authorization`
8
15
  * Add support for `create_force_capture`, `create_unlinked_refund`, and `refund` test helper methods on resource `Issuing.Transaction`
9
16
 
17
+ ## 9.3.0-beta.1 - 2023-09-07
18
+ * [#1269](https://github.com/stripe/stripe-ruby/pull/1269) Update generated code for beta
19
+ * Release specs are identical.
20
+ * [#1268](https://github.com/stripe/stripe-ruby/pull/1268) Update generated code for beta
21
+ * Remove support for `submit_card` test helper method on resource `Issuing.Card`
22
+ * [#1265](https://github.com/stripe/stripe-ruby/pull/1265) Update generated code for beta
23
+ * Rename `Quote.preview_invoices` to `QuotePreviewInvoice.list` and `Quote.preview_schedules` to `QuotePreviewSchedules.list`
24
+ * [#1264](https://github.com/stripe/stripe-ruby/pull/1264) Update generated code for beta
25
+ * Add support for new resources `QuotePreviewInvoice` and `QuotePreviewSchedule`
26
+ * [#1259](https://github.com/stripe/stripe-ruby/pull/1259) Update generated code for beta
27
+
28
+ * [#1257](https://github.com/stripe/stripe-ruby/pull/1257) Update generated code for beta
29
+
30
+ * [#1254](https://github.com/stripe/stripe-ruby/pull/1254) Update generated code for beta
31
+ * Add support for `submit_card` test helper method on resource `Issuing.Card`
32
+ * [#1252](https://github.com/stripe/stripe-ruby/pull/1252) Remove developer_message support
33
+
10
34
  ## 9.2.0 - 2023-09-07
11
35
  * [#1267](https://github.com/stripe/stripe-ruby/pull/1267) Update generated code
12
36
  * Add support for new resource `PaymentMethodDomain`
13
37
  * Add support for `create`, `list`, `retrieve`, `update`, and `validate` methods on resource `PaymentMethodDomain`
14
38
 
39
+ ## 9.2.0-beta.1 - 2023-08-31
40
+ * [#1265](https://github.com/stripe/stripe-ruby/pull/1265) Update generated code for beta
41
+ * Rename `Quote.preview_invoices` to `QuotePreviewInvoice.list` and `Quote.preview_schedules` to `QuotePreviewSchedules.list`
42
+
15
43
  ## 9.1.0 - 2023-08-31
16
44
  * [#1266](https://github.com/stripe/stripe-ruby/pull/1266) Update generated code
17
45
  * Add support for new resource `AccountSession`
18
46
  * Add support for `create` method on resource `AccountSession`
19
47
  * [#1262](https://github.com/stripe/stripe-ruby/pull/1262) Explicitly format timestamp in SignatureVerificationError message
20
48
 
21
-
22
49
  ## 9.0.0 - 2023-08-16
23
50
  **⚠️ ACTION REQUIRED: the breaking change in this release likely affects you ⚠️**
24
51
 
@@ -51,10 +78,39 @@
51
78
 
52
79
  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.
53
80
 
81
+ ## 9.0.0-beta.1 - 2023-08-24
82
+ * [#1264](https://github.com/stripe/stripe-ruby/pull/1264) Update generated code for beta
83
+ * Add support for new resources `QuotePreviewInvoice` and `QuotePreviewSchedule`
84
+ * [#1259](https://github.com/stripe/stripe-ruby/pull/1259) Update generated code for beta
85
+
86
+ ## 8.8.0-beta.1 - 2023-08-10
87
+ * [#1257](https://github.com/stripe/stripe-ruby/pull/1257) Update generated code for beta
88
+ * Updated stable APIs to the latest version
89
+
54
90
  ## 8.7.0 - 2023-08-10
55
91
  * [#1256](https://github.com/stripe/stripe-ruby/pull/1256) Update generated code
56
92
  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.
57
93
 
94
+ ## 8.7.0-beta.3 - 2023-08-03
95
+ * [#1254](https://github.com/stripe/stripe-ruby/pull/1254) Update generated code for beta
96
+ * Add support for `submit_card` test helper method on resource `Issuing.Card`
97
+ * [#1252](https://github.com/stripe/stripe-ruby/pull/1252) Remove developer_message support
98
+
99
+ ## 8.7.0-beta.2 - 2023-07-28
100
+ * [#1251](https://github.com/stripe/stripe-ruby/pull/1251) Update generated code for beta
101
+ * Add support for new resource `Tax.Form`
102
+ * Add support for `list`, `pdf`, and `retrieve` methods on resource `Form`
103
+ * [#1249](https://github.com/stripe/stripe-ruby/pull/1249) Update generated code for beta
104
+ * [#1246](https://github.com/stripe/stripe-ruby/pull/1246) Update generated code for beta
105
+
106
+ ## 8.7.0-beta.1 - 2023-07-13
107
+ * [#1245](https://github.com/stripe/stripe-ruby/pull/1245) Update generated code for beta
108
+ Release specs are identical.
109
+ * [#1243](https://github.com/stripe/stripe-ruby/pull/1243) Update generated code for beta
110
+ * Add support for new resource `PaymentMethodConfiguration`
111
+ * Add support for `create`, `list`, `retrieve`, and `update` methods on resource `PaymentMethodConfiguration`
112
+ * [#1239](https://github.com/stripe/stripe-ruby/pull/1239) Update generated code for beta
113
+
58
114
  ## 8.6.0 - 2023-07-13
59
115
  * [#1244](https://github.com/stripe/stripe-ruby/pull/1244) Update generated code
60
116
  * Add support for new resource `Tax.Settings`
@@ -83,6 +139,37 @@
83
139
 
84
140
  * [#1204](https://github.com/stripe/stripe-ruby/pull/1204) Update generated code
85
141
 
142
+ ## 8.6.0-beta.6 - 2023-06-22
143
+ * [#1237](https://github.com/stripe/stripe-ruby/pull/1237) Update generated code for beta
144
+ * Add support for new resource `CustomerSession`
145
+ * Add support for `create` method on resource `CustomerSession`
146
+ * [#1233](https://github.com/stripe/stripe-ruby/pull/1233) Update generated code for beta
147
+ * [#1229](https://github.com/stripe/stripe-ruby/pull/1229) Update generated code for beta
148
+
149
+ ## 8.6.0-beta.5 - 2023-06-01
150
+ * [#1227](https://github.com/stripe/stripe-ruby/pull/1227) Update generated code for beta
151
+ * [#1228](https://github.com/stripe/stripe-ruby/pull/1228) Document raw_request
152
+ * [#1222](https://github.com/stripe/stripe-ruby/pull/1222) Update generated code for beta
153
+ * [#1224](https://github.com/stripe/stripe-ruby/pull/1224) Handle developer message in preview error responses
154
+
155
+ ## 8.6.0-beta.4 - 2023-05-19
156
+ * [#1220](https://github.com/stripe/stripe-ruby/pull/1220) Update generated code for beta
157
+ * Add support for `subscribe` and `unsubscribe` methods on resource `FinancialConnections.Account`
158
+ * [#1217](https://github.com/stripe/stripe-ruby/pull/1217) Add raw_request
159
+ * [#1216](https://github.com/stripe/stripe-ruby/pull/1216) Update generated code for beta
160
+ * [#1214](https://github.com/stripe/stripe-ruby/pull/1214) Update generated code for beta
161
+
162
+ ## 8.6.0-beta.3 - 2023-04-17
163
+ * [#1211](https://github.com/stripe/stripe-ruby/pull/1211) Update generated code for beta
164
+ * [#1210](https://github.com/stripe/stripe-ruby/pull/1210), [#1212](https://github.com/stripe/stripe-ruby/pull/1212), [#1213](https://github.com/stripe/stripe-ruby/pull/1213) Add support for request signing
165
+
166
+ ## 8.6.0-beta.2 - 2023-04-13
167
+ * [#1206](https://github.com/stripe/stripe-ruby/pull/1206) Update generated code for beta
168
+ * Add support for `collect_payment_method` and `confirm_payment_intent` methods on resource `Terminal.Reader`
169
+ * [#1205](https://github.com/stripe/stripe-ruby/pull/1205) Update generated code for beta
170
+
171
+ ## 8.6.0-beta.1 - 2023-03-30
172
+ * [#1202](https://github.com/stripe/stripe-ruby/pull/1202) Update generated code for beta
86
173
 
87
174
  ## 8.5.0 - 2023-03-30
88
175
  * [#1203](https://github.com/stripe/stripe-ruby/pull/1203) Update generated code
@@ -90,6 +177,11 @@
90
177
  * 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.
91
178
  * [#1201](https://github.com/stripe/stripe-ruby/pull/1201) Update save deprecation message
92
179
 
180
+ ## 8.5.0-beta.1 - 2023-03-23
181
+ * [#1194](https://github.com/stripe/stripe-ruby/pull/1194) Update generated code for beta (new)
182
+ * Add support for new resources `Tax.CalculationLineItem` and `Tax.TransactionLineItem`
183
+ * Add support for `collect_inputs` method on resource `Terminal.Reader`
184
+
93
185
  ## 8.4.0 - 2023-03-23
94
186
  * [#1197](https://github.com/stripe/stripe-ruby/pull/1197) Update generated code (new)
95
187
  * Add support for new resources `Tax.CalculationLineItem`, `Tax.Calculation`, `Tax.TransactionLineItem`, and `Tax.Transaction`
@@ -97,18 +189,91 @@
97
189
  * Add support for `create_from_calculation`, `create_reversal`, `create`, `list_line_items`, and `retrieve` methods on resource `Transaction`
98
190
  * [#1152](https://github.com/stripe/stripe-ruby/pull/1152) Symbolize hash keys inside `convert_to_stripe_object_with_params`
99
191
 
192
+ ## 8.4.0-beta.4 - 2023-03-16
193
+ * [#1189](https://github.com/stripe/stripe-ruby/pull/1189) Update generated code for beta (new)
194
+ * Add support for `create_from_calculation` method on resource `Tax.Transaction`
195
+ * [#1188](https://github.com/stripe/stripe-ruby/pull/1188) Update generated code for beta (new)
196
+ * Remove support for resources `Capital.FinancingOffer` and `Capital.FinancingSummary`
197
+ * Remove support for `list`, `mark_delivered`, and `retrieve` methods on resource `FinancingOffer`
198
+ * Remove support for `retrieve` method on resource `FinancingSummary`
199
+ * [#1187](https://github.com/stripe/stripe-ruby/pull/1187) Merge upstream master
200
+
201
+ ## 8.4.0-beta.3 - 2023-03-09
202
+ * [#1184](https://github.com/stripe/stripe-ruby/pull/1184) API Updates for beta branch
203
+ * Updated stable APIs to the latest version
204
+ * Remove support for `list_transactions` method on resource `Tax.Transaction`
205
+
206
+ ## 8.4.0-beta.2 - 2023-03-03
207
+ * [#1183](https://github.com/stripe/stripe-ruby/pull/1183) API Updates for beta branch
208
+ * Updated stable APIs to the latest version
209
+ * Add support for new resources `Issuing.CardBundle` and `Issuing.CardDesign`
210
+ * Add support for `list` and `retrieve` methods on resource `CardBundle`
211
+ * Add support for `list`, `retrieve`, and `update` methods on resource `CardDesign`
212
+
213
+ ## 8.4.0-beta.1 - 2023-02-23
214
+ * [#1182](https://github.com/stripe/stripe-ruby/pull/1182) API Updates for beta branch
215
+ * Updated stable APIs to the latest version
216
+
100
217
  ## 8.3.0 - 2023-02-16
101
218
  * [#1175](https://github.com/stripe/stripe-ruby/pull/1175) API Updates
102
219
  * Add support for `refund_payment` method on resource `Terminal.Reader`
103
220
 
221
+ ## 8.3.0-beta.1 - 2023-02-02
222
+ * [#1174](https://github.com/stripe/stripe-ruby/pull/1174) API Updates for beta branch
223
+ * Updated stable APIs to the latest version
224
+ * Add support for new resource `FinancialConnections.Transaction`
225
+ * Add support for `list` method on resource `Transaction`
226
+
104
227
  ## 8.2.0 - 2023-02-02
105
228
  * [#1173](https://github.com/stripe/stripe-ruby/pull/1173) API Updates
106
229
  * Add support for `resume` method on resource `Subscription`
107
230
  * [#1171](https://github.com/stripe/stripe-ruby/pull/1171) Remove unused `partial` param from `initialize_from`
108
231
 
232
+ ## 8.2.0-beta.3 - 2023-01-26
233
+ * [#1172](https://github.com/stripe/stripe-ruby/pull/1172) API Updates for beta branch
234
+ * Updated stable APIs to the latest version
235
+ * Add support for `list_transactions` method on resource `Tax.Transaction`
236
+
237
+ ## 8.2.0-beta.2 - 2023-01-19
238
+ * [#1170](https://github.com/stripe/stripe-ruby/pull/1170) API Updates for beta branch
239
+ * Updated stable APIs to the latest version
240
+ * Add support for `Tax.Settings` resource.
241
+
242
+ ## 8.2.0-beta.1 - 2023-01-12
243
+ * [#1167](https://github.com/stripe/stripe-ruby/pull/1167) API Updates for beta branch
244
+ * Updated stable APIs to the latest version
245
+ * Change `quote.draft_quote` implementation to from calling `POST /v1/quotes/{quote}/draft` to `POST /v1/quotes/{quote}/mark_draft`
246
+ * Add support for `Tax::Register` resource
247
+
109
248
  ## 8.1.0 - 2023-01-12
110
249
  * [#1162](https://github.com/stripe/stripe-ruby/pull/1162) Improve request events instrumentation
111
250
 
251
+ ## 8.1.0-beta.4 - 2023-01-05
252
+ * [#1164](https://github.com/stripe/stripe-ruby/pull/1164) API Updates for beta branch
253
+ * Updated stable APIs to the latest version
254
+ * Add support for `mark_stale_quote` method on resource `Quote`
255
+
256
+ ## 8.1.0-beta.3 - 2022-12-22
257
+ * [#1158](https://github.com/stripe/stripe-ruby/pull/1158) API Updates for beta branch
258
+ * Updated stable APIs to the latest version
259
+ * Move `TaxCalculation` and `TaxTransaction` to `Tax::Calculation` and `Tax::Transaction`.
260
+
261
+ ## 8.1.0-beta.2 - 2022-12-15
262
+ * [#1156](https://github.com/stripe/stripe-ruby/pull/1156) API Updates for beta branch
263
+ * Updated stable APIs to the latest version
264
+ * Add support for new resources `TaxCalculation`, and `TaxTransaction`
265
+ * Add support for `create` and `list_line_items` methods on resource `TaxCalculation`
266
+ * Add support for `create_reversal`, `create`, and `retrieve` methods on resource `TaxTransaction`
267
+ * [#1155](https://github.com/stripe/stripe-ruby/pull/1155) API Updates for beta branch
268
+ * Updated stable APIs to the latest version
269
+ * Add support for new resource `QuoteLine`.
270
+
271
+ ## 8.1.0-beta.1 - 2022-12-08
272
+ * [#1153](https://github.com/stripe/stripe-ruby/pull/1153) API Updates for beta branch
273
+ * Updated stable APIs to the latest version
274
+ * [#1146](https://github.com/stripe/stripe-ruby/pull/1146) API Updates for beta branch
275
+ * Updated stable APIs to the latest version
276
+
112
277
  ## 8.0.0 - 2022-11-16
113
278
  * [#1144](https://github.com/stripe/stripe-ruby/pull/1144) Next major release changes
114
279
 
@@ -116,30 +281,29 @@ Breaking changes that arose during code generation of the library that we postpo
116
281
 
117
282
  "⚠️" symbol highlights breaking changes.
118
283
 
119
- ### Deprecated
120
- - The `save` method is deprecated. Prefer the static `update` method that doesn't require retrieval of the resource to update it.
121
- ``` ruby
122
- # before
123
- refund = Stripe::Refund.retrieve("re_123")
124
- refund.description = "Refund description"
125
- refund.save
126
-
127
- # after
128
- Stripe::Refund.update("re_123", description: "Refund description")
129
- ```
284
+ ## 7.2.0-beta.5 - 2022-11-02
285
+ * [#1139](https://github.com/stripe/stripe-ruby/pull/1139) API Updates for beta branch
286
+ * Updated beta APIs to the latest stable version
287
+ * [#1135](https://github.com/stripe/stripe-ruby/pull/1135) API Updates for beta branch
288
+ * Updated stable APIs to the latest version
130
289
 
131
- ### ⚠️ Removed
132
- - Removed deprecated `Sku` resource.
133
- - Removed deprecated `Orders` resource.
134
- - Removed deprecated `delete` method on `Subscription` resource. Please use `cancel` method instead.
135
- ```ruby
136
- # before
137
- Stripe::Subscription::delete("sub_12345")
290
+ ## 7.2.0-beta.4 - 2022-10-07
291
+ * [#999](https://github.com/stripe/stripe-ruby/pull/999) DESCRIBE CHANGES HERE (try to use the same style, tense, etc. as the other entries)
138
292
 
139
- # after
140
- Stripe::Subscription::cancel("sub_12345")
141
- ```
293
+ ## 7.2.0-beta.3 - 2022-09-26
294
+ * [#1129](https://github.com/stripe/stripe-ruby/pull/1129) API Updates for beta branch
295
+ * Updated stable APIs to the latest version
296
+ * Add `FinancingOffer`, `FinancingSummary` and `FinancingTransaction` resources.
142
297
 
298
+ ## 7.2.0-beta.2 - 2022-08-26
299
+ * [#1127](https://github.com/stripe/stripe-ruby/pull/1127) API Updates for beta branch
300
+ * Updated stable APIs to the latest version
301
+ * Add support for the beta [Gift Card API](https://stripe.com/docs/gift-cards).
302
+
303
+ ## 7.2.0-beta.1 - 2022-08-23
304
+ * [#1122](https://github.com/stripe/stripe-ruby/pull/1122) API Updates for beta branch
305
+ - Updated stable APIs to the latest version
306
+ - `Stripe-Version` beta headers are not pinned by-default and need to be manually specified, please refer to [beta SDKs README section](https://github.com/stripe/stripe-ruby/blob/master/README.md#beta-sdks)
143
307
 
144
308
  ## 7.1.0 - 2022-08-19
145
309
  * [#1116](https://github.com/stripe/stripe-ruby/pull/1116) API Updates
@@ -148,6 +312,16 @@ Breaking changes that arose during code generation of the library that we postpo
148
312
  * [#1117](https://github.com/stripe/stripe-ruby/pull/1117) Refresh rubocop config.
149
313
  * [#1115](https://github.com/stripe/stripe-ruby/pull/1115) Add a support section to the readme
150
314
 
315
+ ## 7.1.0-beta.2 - 2022-08-11
316
+ * [#1113](https://github.com/stripe/stripe-ruby/pull/1113) API Updates for beta branch
317
+ - Updated stable APIs to the latest version
318
+ - Add `refund_payment` method to Terminal resource
319
+
320
+ ## 7.1.0-beta.1 - 2022-08-03
321
+ * [#1107](https://github.com/stripe/stripe-ruby/pull/1107) API Updates for beta branch
322
+ - Updated stable APIs to the latest version
323
+ - Added the `Order` resource support
324
+
151
325
  ## 7.0.0 - 2022-08-02
152
326
 
153
327
  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.
@@ -159,21 +333,19 @@ Breaking changes that arose during code generation of the library that we postpo
159
333
  * [#1090](https://github.com/stripe/stripe-ruby/pull/1090) Use auto-generation for `Invoice` methods
160
334
  * [#1103](https://github.com/stripe/stripe-ruby/pull/1103) Next major release changes
161
335
 
162
- ### ⚠️ Changed
163
- * `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.
164
- * Update default bundle of CA certificates to April 26, 2022.
165
-
166
- ### Deprecated
167
- * Deprecate `delete` method on `Subscription` resource. Please use `cancel` method instead.
168
-
169
- ### ⚠️ Removed
170
- * Remove `details` method from `Issuing.Card` resource. The method was not supported.
171
- * Remove `Issuing.CardDetails` resource. Read more at https://stripe.com/docs/issuing/cards/virtual.
172
- * Remove `create` method from `ReportType` resource. The method was not supported.
173
- * Remove `usage_record_summaries` method from `SubscriptionItem` resource. Please use `list_usage_record_summaries` method instead.
174
- * Remove `AlipayAccount`, `BitcoinReceiver`, `BitcoinTransaction`, `Issuing::CardDetails`, `Recipient`, ` RecipientTransfer`, and `ThreeDSecure` resources. The resources were deprecated or no longer in use.
175
- * Remove ability to list `Card` resource for a `Recipient`.
176
- * Remove `cancel` method from `Transfer` resource. The method was deprecated.
336
+ ## 6.6.0-beta.1 - 2022-07-22
337
+ * [#1100](https://github.com/stripe/stripe-ruby/pull/1100) API Updates for beta branch
338
+ - Updated stable APIs to the latest version
339
+ - Add `QuotePhase` resource
340
+ * [#1097](https://github.com/stripe/stripe-ruby/pull/1097) API Updates for beta branch
341
+ - Updated stable APIs to the latest version
342
+ - Add `SubscriptionSchedule.amend` method.
343
+ * [#1093](https://github.com/stripe/stripe-ruby/pull/1093) API Updates for beta branch
344
+ - Include `server_side_confirmation_beta=v1` beta
345
+ - Add `secretKeyConfirmation` to `PaymentIntent`
346
+ * [#1085](https://github.com/stripe/stripe-ruby/pull/1085) API Updates for beta branch
347
+ - Updated stable APIs to the latest version
348
+ * [#1075](https://github.com/stripe/stripe-ruby/pull/1075) Use the generated API version
177
349
 
178
350
  ## 6.5.0 - 2022-06-29
179
351
  * [#1084](https://github.com/stripe/stripe-ruby/pull/1084) API Updates
@@ -203,8 +375,6 @@ Breaking changes that arose during code generation of the library that we postpo
203
375
  * 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`
204
376
  * Add support for `retrieve_payment_method` method on resource `Customer`
205
377
  * Add support for `list_owners` and `list` methods on resource `FinancialConnections.Account`
206
-
207
-
208
378
 
209
379
  ## 6.0.0 - 2022-05-09
210
380
  * [#1056](https://github.com/stripe/stripe-ruby/pull/1056) API Updates
@@ -220,7 +390,6 @@ Breaking changes that arose during code generation of the library that we postpo
220
390
  ## 5.55.0 - 2022-05-05
221
391
  * [#1055](https://github.com/stripe/stripe-ruby/pull/1055) API Updates
222
392
  * Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
223
-
224
393
 
225
394
  ## 5.54.0 - 2022-05-03
226
395
  * [#1053](https://github.com/stripe/stripe-ruby/pull/1053) API Updates
@@ -1251,3 +1420,4 @@ Identical to 1.56.0 above. I incorrectly cut a patch-level release.
1251
1420
  <!--
1252
1421
  # vim: set tw=0:
1253
1422
  -->
1423
+
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v532
1
+ v540
data/README.md CHANGED
@@ -323,6 +323,17 @@ If your beta feature requires a `Stripe-Version` header to be sent, use the `Str
323
323
  Stripe.api_version += "; feature_beta=v3"
324
324
  ```
325
325
 
326
+ ### Custom requests
327
+
328
+ If you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `raw_request` method on `Stripe`.
329
+
330
+ ```ruby
331
+ resp = Stripe.raw_request(:post, "/v1/beta_endpoint", {param: 123}, {stripe_version: "2022-11-15; feature_beta=v3"})
332
+
333
+ # (Optional) resp is a StripeResponse. You can use `Stripe.deserialize` to get a StripeObject.
334
+ deserialized_resp = Stripe.deserialize(resp.http_body)
335
+ ```
336
+
326
337
  ## Support
327
338
 
328
339
  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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 9.3.0
1
+ 9.4.0-beta.2
@@ -47,6 +47,7 @@ module Stripe
47
47
  api_key = headers.delete(:api_key)
48
48
  api_base = headers.delete(:api_base)
49
49
  client = headers.delete(:client)
50
+ api_mode = headers.delete(:api_mode)
50
51
  # Assume all remaining opts must be headers
51
52
 
52
53
  resp, opts[:api_key] = client.send(
@@ -54,6 +55,7 @@ module Stripe
54
55
  method, url,
55
56
  api_base: api_base, api_key: api_key,
56
57
  headers: headers, params: params,
58
+ api_mode: api_mode,
57
59
  &read_body_chunk_block
58
60
  )
59
61
 
@@ -4,5 +4,6 @@
4
4
  module Stripe
5
5
  module ApiVersion
6
6
  CURRENT = "2023-08-16"
7
+ PREVIEW = "2023-09-15.preview-v2"
7
8
  end
8
9
  end
@@ -25,10 +25,14 @@ module Stripe
25
25
  BillingPortal::Configuration::OBJECT_NAME => BillingPortal::Configuration,
26
26
  BillingPortal::Session::OBJECT_NAME => BillingPortal::Session,
27
27
  Capability::OBJECT_NAME => Capability,
28
+ Capital::FinancingOffer::OBJECT_NAME => Capital::FinancingOffer,
29
+ Capital::FinancingSummary::OBJECT_NAME => Capital::FinancingSummary,
30
+ Capital::FinancingTransaction::OBJECT_NAME => Capital::FinancingTransaction,
28
31
  Card::OBJECT_NAME => Card,
29
32
  CashBalance::OBJECT_NAME => CashBalance,
30
33
  Charge::OBJECT_NAME => Charge,
31
34
  Checkout::Session::OBJECT_NAME => Checkout::Session,
35
+ ConfirmationToken::OBJECT_NAME => ConfirmationToken,
32
36
  CountrySpec::OBJECT_NAME => CountrySpec,
33
37
  Coupon::OBJECT_NAME => Coupon,
34
38
  CreditNote::OBJECT_NAME => CreditNote,
@@ -36,6 +40,7 @@ module Stripe
36
40
  Customer::OBJECT_NAME => Customer,
37
41
  CustomerBalanceTransaction::OBJECT_NAME => CustomerBalanceTransaction,
38
42
  CustomerCashBalanceTransaction::OBJECT_NAME => CustomerCashBalanceTransaction,
43
+ CustomerSession::OBJECT_NAME => CustomerSession,
39
44
  Discount::OBJECT_NAME => Discount,
40
45
  Dispute::OBJECT_NAME => Dispute,
41
46
  EphemeralKey::OBJECT_NAME => EphemeralKey,
@@ -48,8 +53,12 @@ module Stripe
48
53
  FinancialConnections::AccountOwner::OBJECT_NAME => FinancialConnections::AccountOwner,
49
54
  FinancialConnections::AccountOwnership::OBJECT_NAME =>
50
55
  FinancialConnections::AccountOwnership,
56
+ FinancialConnections::InferredBalance::OBJECT_NAME => FinancialConnections::InferredBalance,
51
57
  FinancialConnections::Session::OBJECT_NAME => FinancialConnections::Session,
58
+ FinancialConnections::Transaction::OBJECT_NAME => FinancialConnections::Transaction,
52
59
  FundingInstructions::OBJECT_NAME => FundingInstructions,
60
+ GiftCards::Card::OBJECT_NAME => GiftCards::Card,
61
+ GiftCards::Transaction::OBJECT_NAME => GiftCards::Transaction,
53
62
  Identity::VerificationReport::OBJECT_NAME => Identity::VerificationReport,
54
63
  Identity::VerificationSession::OBJECT_NAME => Identity::VerificationSession,
55
64
  Invoice::OBJECT_NAME => Invoice,
@@ -57,12 +66,15 @@ module Stripe
57
66
  InvoiceLineItem::OBJECT_NAME => InvoiceLineItem,
58
67
  Issuing::Authorization::OBJECT_NAME => Issuing::Authorization,
59
68
  Issuing::Card::OBJECT_NAME => Issuing::Card,
69
+ Issuing::CardBundle::OBJECT_NAME => Issuing::CardBundle,
70
+ Issuing::CardDesign::OBJECT_NAME => Issuing::CardDesign,
60
71
  Issuing::Cardholder::OBJECT_NAME => Issuing::Cardholder,
61
72
  Issuing::Dispute::OBJECT_NAME => Issuing::Dispute,
62
73
  Issuing::Transaction::OBJECT_NAME => Issuing::Transaction,
63
74
  LineItem::OBJECT_NAME => LineItem,
64
75
  LoginLink::OBJECT_NAME => LoginLink,
65
76
  Mandate::OBJECT_NAME => Mandate,
77
+ Order::OBJECT_NAME => Order,
66
78
  PaymentIntent::OBJECT_NAME => PaymentIntent,
67
79
  PaymentLink::OBJECT_NAME => PaymentLink,
68
80
  PaymentMethod::OBJECT_NAME => PaymentMethod,
@@ -75,6 +87,9 @@ module Stripe
75
87
  Product::OBJECT_NAME => Product,
76
88
  PromotionCode::OBJECT_NAME => PromotionCode,
77
89
  Quote::OBJECT_NAME => Quote,
90
+ QuotePhase::OBJECT_NAME => QuotePhase,
91
+ QuotePreviewInvoice::OBJECT_NAME => QuotePreviewInvoice,
92
+ QuotePreviewSchedule::OBJECT_NAME => QuotePreviewSchedule,
78
93
  Radar::EarlyFraudWarning::OBJECT_NAME => Radar::EarlyFraudWarning,
79
94
  Radar::ValueList::OBJECT_NAME => Radar::ValueList,
80
95
  Radar::ValueListItem::OBJECT_NAME => Radar::ValueListItem,
@@ -94,6 +109,8 @@ module Stripe
94
109
  SubscriptionSchedule::OBJECT_NAME => SubscriptionSchedule,
95
110
  Tax::Calculation::OBJECT_NAME => Tax::Calculation,
96
111
  Tax::CalculationLineItem::OBJECT_NAME => Tax::CalculationLineItem,
112
+ Tax::Form::OBJECT_NAME => Tax::Form,
113
+ Tax::Registration::OBJECT_NAME => Tax::Registration,
97
114
  Tax::Settings::OBJECT_NAME => Tax::Settings,
98
115
  Tax::Transaction::OBJECT_NAME => Tax::Transaction,
99
116
  Tax::TransactionLineItem::OBJECT_NAME => Tax::TransactionLineItem,
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stripe
4
+ class RequestSigningAuthenticator
5
+ AUTHORIZATION_HEADER_NAME = "Authorization"
6
+ CONTENT_TYPE_HEADER_NAME = "Content-Type"
7
+ STRIPE_CONTEXT_HEADER_NAME = "Stripe-Context"
8
+ STRIPE_ACCOUNT_HEADER_NAME = "Stripe-Account"
9
+ CONTENT_DIGEST_HEADER_NAME = "Content-Digest"
10
+ SIGNATURE_INPUT_HEADER_NAME = "Signature-Input"
11
+ SIGNATURE_HEADER_NAME = "Signature"
12
+
13
+ attr_reader :auth_token, :sign_lambda
14
+
15
+ def initialize(auth_token, sign_lambda)
16
+ unless auth_token.is_a?(String)
17
+ raise ArgumentError, "auth_token must be a string"
18
+ end
19
+ unless sign_lambda.is_a?(Proc)
20
+ raise ArgumentError, "sign_lambda must be a lambda"
21
+ end
22
+
23
+ @auth_token = auth_token
24
+ @sign_lambda = sign_lambda
25
+ end
26
+
27
+ def authenticate(method, headers, body)
28
+ covered_headers = [CONTENT_TYPE_HEADER_NAME,
29
+ CONTENT_DIGEST_HEADER_NAME,
30
+ STRIPE_CONTEXT_HEADER_NAME,
31
+ STRIPE_ACCOUNT_HEADER_NAME,
32
+ AUTHORIZATION_HEADER_NAME,]
33
+
34
+ headers[AUTHORIZATION_HEADER_NAME] = "STRIPE-V2-SIG #{auth_token}"
35
+
36
+ if method == :get
37
+ covered_headers -= [CONTENT_TYPE_HEADER_NAME,
38
+ CONTENT_DIGEST_HEADER_NAME,]
39
+ else
40
+ content = body || ""
41
+ headers[CONTENT_DIGEST_HEADER_NAME] =
42
+ %(sha-256=:#{content_digest(content)}:)
43
+ end
44
+
45
+ covered_headers_formatted = covered_headers
46
+ .map { |string| %("#{string.downcase}") }
47
+ .join(" ")
48
+
49
+ signature_input = "(#{covered_headers_formatted});created=#{created_time}"
50
+
51
+ inputs = covered_headers
52
+ .map { |header| %("#{header.downcase}": #{headers[header]}) }
53
+ .join("\n")
54
+
55
+ signature_base = %(#{inputs}\n"@signature-params": #{signature_input})
56
+ .encode(Encoding::UTF_8)
57
+
58
+ headers[SIGNATURE_INPUT_HEADER_NAME] = "sig1=#{signature_input}"
59
+
60
+ headers[SIGNATURE_HEADER_NAME] =
61
+ "sig1=:#{encoded_signature(signature_base)}:"
62
+ end
63
+
64
+ private def sign(signature_base)
65
+ @sign_lambda.call(signature_base)
66
+ end
67
+
68
+ private def encoded_signature(signature_base)
69
+ Base64.strict_encode64(sign(signature_base))
70
+ rescue StandardError
71
+ raise AuthenticationError, "Encountered '#{e.message} (#{e.class})' "\
72
+ "when calculating request signature."
73
+ end
74
+
75
+ private def content_digest(content)
76
+ Base64.strict_encode64(OpenSSL::Digest.new("SHA256").digest(content))
77
+ end
78
+
79
+ private def created_time
80
+ Time.now.to_i
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,32 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Capital
6
+ # This is an object representing an offer of financing from
7
+ # Stripe Capital to a Connect subaccount.
8
+ class FinancingOffer < APIResource
9
+ extend Stripe::APIOperations::List
10
+
11
+ OBJECT_NAME = "capital.financing_offer"
12
+
13
+ def mark_delivered(params = {}, opts = {})
14
+ request_stripe_object(
15
+ method: :post,
16
+ path: format("/v1/capital/financing_offers/%<financing_offer>s/mark_delivered", { financing_offer: CGI.escape(self["id"]) }),
17
+ params: params,
18
+ opts: opts
19
+ )
20
+ end
21
+
22
+ def self.mark_delivered(financing_offer, params = {}, opts = {})
23
+ request_stripe_object(
24
+ method: :post,
25
+ path: format("/v1/capital/financing_offers/%<financing_offer>s/mark_delivered", { financing_offer: CGI.escape(financing_offer) }),
26
+ params: params,
27
+ opts: opts
28
+ )
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Capital
6
+ # A financing object describes an account's current financing state. Used by Connect
7
+ # platforms to read the state of Capital offered to their connected accounts.
8
+ class FinancingSummary < SingletonAPIResource
9
+ OBJECT_NAME = "capital.financing_summary"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Capital
6
+ # This is an object representing the details of a transaction on a Capital financing object.
7
+ class FinancingTransaction < APIResource
8
+ extend Stripe::APIOperations::List
9
+
10
+ OBJECT_NAME = "capital.financing_transaction"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ # ConfirmationTokens help transport client side data collected by Stripe JS over
6
+ # to your server for confirming a PaymentIntent or SetupIntent. If the confirmation
7
+ # is successful, values present on the ConfirmationToken are written onto the Intent.
8
+ class ConfirmationToken < APIResource
9
+ OBJECT_NAME = "confirmation_token"
10
+ end
11
+ end