stripe 9.3.0 → 9.4.0.pre.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +207 -40
  3. data/README.md +11 -0
  4. data/VERSION +1 -1
  5. data/lib/stripe/api_operations/request.rb +2 -0
  6. data/lib/stripe/api_version.rb +1 -0
  7. data/lib/stripe/object_types.rb +17 -0
  8. data/lib/stripe/request_signing_authenticator.rb +83 -0
  9. data/lib/stripe/resources/capital/financing_offer.rb +32 -0
  10. data/lib/stripe/resources/capital/financing_summary.rb +12 -0
  11. data/lib/stripe/resources/capital/financing_transaction.rb +13 -0
  12. data/lib/stripe/resources/confirmation_token.rb +11 -0
  13. data/lib/stripe/resources/customer_session.rb +12 -0
  14. data/lib/stripe/resources/financial_connections/account.rb +39 -0
  15. data/lib/stripe/resources/financial_connections/inferred_balance.rb +13 -0
  16. data/lib/stripe/resources/financial_connections/transaction.rb +13 -0
  17. data/lib/stripe/resources/gift_cards/card.rb +25 -0
  18. data/lib/stripe/resources/gift_cards/transaction.rb +56 -0
  19. data/lib/stripe/resources/issuing/card_bundle.rb +13 -0
  20. data/lib/stripe/resources/issuing/card_design.rb +77 -0
  21. data/lib/stripe/resources/order.rb +89 -0
  22. data/lib/stripe/resources/quote.rb +94 -0
  23. data/lib/stripe/resources/quote_phase.rb +29 -0
  24. data/lib/stripe/resources/quote_preview_invoice.rb +42 -0
  25. data/lib/stripe/resources/quote_preview_schedule.rb +10 -0
  26. data/lib/stripe/resources/subscription_schedule.rb +18 -0
  27. data/lib/stripe/resources/tax/form.rb +39 -0
  28. data/lib/stripe/resources/tax/registration.rb +19 -0
  29. data/lib/stripe/resources/terminal/reader.rb +54 -0
  30. data/lib/stripe/resources.rb +17 -0
  31. data/lib/stripe/stripe_client.rb +60 -26
  32. data/lib/stripe/stripe_configuration.rb +2 -0
  33. data/lib/stripe/util.rb +8 -1
  34. data/lib/stripe/version.rb +1 -1
  35. data/lib/stripe.rb +46 -0
  36. metadata +21 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcf0274fbad4e15be02d4b11d735147eab8d6cb5c7dd570c9d40a459a08f3ebc
4
- data.tar.gz: d67f24cc6bef98f57a2f0d1f54034cce8c8d9f1db8c656badd06f63ca28851c3
3
+ metadata.gz: acaa38ac9227b2bbeb35f775891aa433f592e386a6924e2279e2d7c00df88c58
4
+ data.tar.gz: 4a799ee0da412a49465356ee68034bf01ec98974bbe6be89a9daad1f4617d237
5
5
  SHA512:
6
- metadata.gz: ff8e6be35379dde8bd4a51c08d11955267347520f654f5cb508ee78b277078b659c5db4582e306d2f271739152635e0dc16d4736e0800bae04f9e4109bbc52f5
7
- data.tar.gz: e4a11dc8805e67040a96f6a5a1d113bbde439d9a1fff61d6566963c20f7ac0608757fba85c58c4475e7bdcd4e199d839a41905df66fe710e5b1cfdd9207ce89b
6
+ metadata.gz: f41d9e48617dc6b932cd4d65fb05e676a6b44232bd5b03bcdc6e7d1e05839ae216b94835d5209f39573f0dbff3b09c228ef600dd392ce46f0324ea1a34243df0
7
+ data.tar.gz: 31803f0b63b9e2e6f3c574b58c7f35fcfe2894f40ece52d897c12a2ad2f4e18b72d2922c8a92a84a1c8a6479331b733c8320a6ea0524537310621c542507ed78
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
1
  # Changelog
2
+
3
+ ## 9.4.0-beta.1 - 2023-09-14
4
+ * Updated stable APIs to the latest version
5
+
2
6
  ## 9.3.0 - 2023-09-14
3
7
  * [#1272](https://github.com/stripe/stripe-ruby/pull/1272) Update generated code
4
8
  * Add support for new resource `PaymentMethodConfiguration`
@@ -7,18 +11,38 @@
7
11
  * Add support for `capture`, `create`, `expire`, `increment`, and `reverse` test helper methods on resource `Issuing.Authorization`
8
12
  * Add support for `create_force_capture`, `create_unlinked_refund`, and `refund` test helper methods on resource `Issuing.Transaction`
9
13
 
14
+ ## 9.3.0-beta.1 - 2023-09-07
15
+ * [#1269](https://github.com/stripe/stripe-ruby/pull/1269) Update generated code for beta
16
+ * Release specs are identical.
17
+ * [#1268](https://github.com/stripe/stripe-ruby/pull/1268) Update generated code for beta
18
+ * Remove support for `submit_card` test helper method on resource `Issuing.Card`
19
+ * [#1265](https://github.com/stripe/stripe-ruby/pull/1265) Update generated code for beta
20
+ * Rename `Quote.preview_invoices` to `QuotePreviewInvoice.list` and `Quote.preview_schedules` to `QuotePreviewSchedules.list`
21
+ * [#1264](https://github.com/stripe/stripe-ruby/pull/1264) Update generated code for beta
22
+ * Add support for new resources `QuotePreviewInvoice` and `QuotePreviewSchedule`
23
+ * [#1259](https://github.com/stripe/stripe-ruby/pull/1259) Update generated code for beta
24
+
25
+ * [#1257](https://github.com/stripe/stripe-ruby/pull/1257) Update generated code for beta
26
+
27
+ * [#1254](https://github.com/stripe/stripe-ruby/pull/1254) Update generated code for beta
28
+ * Add support for `submit_card` test helper method on resource `Issuing.Card`
29
+ * [#1252](https://github.com/stripe/stripe-ruby/pull/1252) Remove developer_message support
30
+
10
31
  ## 9.2.0 - 2023-09-07
11
32
  * [#1267](https://github.com/stripe/stripe-ruby/pull/1267) Update generated code
12
33
  * Add support for new resource `PaymentMethodDomain`
13
34
  * Add support for `create`, `list`, `retrieve`, `update`, and `validate` methods on resource `PaymentMethodDomain`
14
35
 
36
+ ## 9.2.0-beta.1 - 2023-08-31
37
+ * [#1265](https://github.com/stripe/stripe-ruby/pull/1265) Update generated code for beta
38
+ * Rename `Quote.preview_invoices` to `QuotePreviewInvoice.list` and `Quote.preview_schedules` to `QuotePreviewSchedules.list`
39
+
15
40
  ## 9.1.0 - 2023-08-31
16
41
  * [#1266](https://github.com/stripe/stripe-ruby/pull/1266) Update generated code
17
42
  * Add support for new resource `AccountSession`
18
43
  * Add support for `create` method on resource `AccountSession`
19
44
  * [#1262](https://github.com/stripe/stripe-ruby/pull/1262) Explicitly format timestamp in SignatureVerificationError message
20
45
 
21
-
22
46
  ## 9.0.0 - 2023-08-16
23
47
  **⚠️ ACTION REQUIRED: the breaking change in this release likely affects you ⚠️**
24
48
 
@@ -51,10 +75,39 @@
51
75
 
52
76
  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
77
 
78
+ ## 9.0.0-beta.1 - 2023-08-24
79
+ * [#1264](https://github.com/stripe/stripe-ruby/pull/1264) Update generated code for beta
80
+ * Add support for new resources `QuotePreviewInvoice` and `QuotePreviewSchedule`
81
+ * [#1259](https://github.com/stripe/stripe-ruby/pull/1259) Update generated code for beta
82
+
83
+ ## 8.8.0-beta.1 - 2023-08-10
84
+ * [#1257](https://github.com/stripe/stripe-ruby/pull/1257) Update generated code for beta
85
+ * Updated stable APIs to the latest version
86
+
54
87
  ## 8.7.0 - 2023-08-10
55
88
  * [#1256](https://github.com/stripe/stripe-ruby/pull/1256) Update generated code
56
89
  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
90
 
91
+ ## 8.7.0-beta.3 - 2023-08-03
92
+ * [#1254](https://github.com/stripe/stripe-ruby/pull/1254) Update generated code for beta
93
+ * Add support for `submit_card` test helper method on resource `Issuing.Card`
94
+ * [#1252](https://github.com/stripe/stripe-ruby/pull/1252) Remove developer_message support
95
+
96
+ ## 8.7.0-beta.2 - 2023-07-28
97
+ * [#1251](https://github.com/stripe/stripe-ruby/pull/1251) Update generated code for beta
98
+ * Add support for new resource `Tax.Form`
99
+ * Add support for `list`, `pdf`, and `retrieve` methods on resource `Form`
100
+ * [#1249](https://github.com/stripe/stripe-ruby/pull/1249) Update generated code for beta
101
+ * [#1246](https://github.com/stripe/stripe-ruby/pull/1246) Update generated code for beta
102
+
103
+ ## 8.7.0-beta.1 - 2023-07-13
104
+ * [#1245](https://github.com/stripe/stripe-ruby/pull/1245) Update generated code for beta
105
+ Release specs are identical.
106
+ * [#1243](https://github.com/stripe/stripe-ruby/pull/1243) Update generated code for beta
107
+ * Add support for new resource `PaymentMethodConfiguration`
108
+ * Add support for `create`, `list`, `retrieve`, and `update` methods on resource `PaymentMethodConfiguration`
109
+ * [#1239](https://github.com/stripe/stripe-ruby/pull/1239) Update generated code for beta
110
+
58
111
  ## 8.6.0 - 2023-07-13
59
112
  * [#1244](https://github.com/stripe/stripe-ruby/pull/1244) Update generated code
60
113
  * Add support for new resource `Tax.Settings`
@@ -83,6 +136,37 @@
83
136
 
84
137
  * [#1204](https://github.com/stripe/stripe-ruby/pull/1204) Update generated code
85
138
 
139
+ ## 8.6.0-beta.6 - 2023-06-22
140
+ * [#1237](https://github.com/stripe/stripe-ruby/pull/1237) Update generated code for beta
141
+ * Add support for new resource `CustomerSession`
142
+ * Add support for `create` method on resource `CustomerSession`
143
+ * [#1233](https://github.com/stripe/stripe-ruby/pull/1233) Update generated code for beta
144
+ * [#1229](https://github.com/stripe/stripe-ruby/pull/1229) Update generated code for beta
145
+
146
+ ## 8.6.0-beta.5 - 2023-06-01
147
+ * [#1227](https://github.com/stripe/stripe-ruby/pull/1227) Update generated code for beta
148
+ * [#1228](https://github.com/stripe/stripe-ruby/pull/1228) Document raw_request
149
+ * [#1222](https://github.com/stripe/stripe-ruby/pull/1222) Update generated code for beta
150
+ * [#1224](https://github.com/stripe/stripe-ruby/pull/1224) Handle developer message in preview error responses
151
+
152
+ ## 8.6.0-beta.4 - 2023-05-19
153
+ * [#1220](https://github.com/stripe/stripe-ruby/pull/1220) Update generated code for beta
154
+ * Add support for `subscribe` and `unsubscribe` methods on resource `FinancialConnections.Account`
155
+ * [#1217](https://github.com/stripe/stripe-ruby/pull/1217) Add raw_request
156
+ * [#1216](https://github.com/stripe/stripe-ruby/pull/1216) Update generated code for beta
157
+ * [#1214](https://github.com/stripe/stripe-ruby/pull/1214) Update generated code for beta
158
+
159
+ ## 8.6.0-beta.3 - 2023-04-17
160
+ * [#1211](https://github.com/stripe/stripe-ruby/pull/1211) Update generated code for beta
161
+ * [#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
162
+
163
+ ## 8.6.0-beta.2 - 2023-04-13
164
+ * [#1206](https://github.com/stripe/stripe-ruby/pull/1206) Update generated code for beta
165
+ * Add support for `collect_payment_method` and `confirm_payment_intent` methods on resource `Terminal.Reader`
166
+ * [#1205](https://github.com/stripe/stripe-ruby/pull/1205) Update generated code for beta
167
+
168
+ ## 8.6.0-beta.1 - 2023-03-30
169
+ * [#1202](https://github.com/stripe/stripe-ruby/pull/1202) Update generated code for beta
86
170
 
87
171
  ## 8.5.0 - 2023-03-30
88
172
  * [#1203](https://github.com/stripe/stripe-ruby/pull/1203) Update generated code
@@ -90,6 +174,11 @@
90
174
  * 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
175
  * [#1201](https://github.com/stripe/stripe-ruby/pull/1201) Update save deprecation message
92
176
 
177
+ ## 8.5.0-beta.1 - 2023-03-23
178
+ * [#1194](https://github.com/stripe/stripe-ruby/pull/1194) Update generated code for beta (new)
179
+ * Add support for new resources `Tax.CalculationLineItem` and `Tax.TransactionLineItem`
180
+ * Add support for `collect_inputs` method on resource `Terminal.Reader`
181
+
93
182
  ## 8.4.0 - 2023-03-23
94
183
  * [#1197](https://github.com/stripe/stripe-ruby/pull/1197) Update generated code (new)
95
184
  * Add support for new resources `Tax.CalculationLineItem`, `Tax.Calculation`, `Tax.TransactionLineItem`, and `Tax.Transaction`
@@ -97,18 +186,91 @@
97
186
  * Add support for `create_from_calculation`, `create_reversal`, `create`, `list_line_items`, and `retrieve` methods on resource `Transaction`
98
187
  * [#1152](https://github.com/stripe/stripe-ruby/pull/1152) Symbolize hash keys inside `convert_to_stripe_object_with_params`
99
188
 
189
+ ## 8.4.0-beta.4 - 2023-03-16
190
+ * [#1189](https://github.com/stripe/stripe-ruby/pull/1189) Update generated code for beta (new)
191
+ * Add support for `create_from_calculation` method on resource `Tax.Transaction`
192
+ * [#1188](https://github.com/stripe/stripe-ruby/pull/1188) Update generated code for beta (new)
193
+ * Remove support for resources `Capital.FinancingOffer` and `Capital.FinancingSummary`
194
+ * Remove support for `list`, `mark_delivered`, and `retrieve` methods on resource `FinancingOffer`
195
+ * Remove support for `retrieve` method on resource `FinancingSummary`
196
+ * [#1187](https://github.com/stripe/stripe-ruby/pull/1187) Merge upstream master
197
+
198
+ ## 8.4.0-beta.3 - 2023-03-09
199
+ * [#1184](https://github.com/stripe/stripe-ruby/pull/1184) API Updates for beta branch
200
+ * Updated stable APIs to the latest version
201
+ * Remove support for `list_transactions` method on resource `Tax.Transaction`
202
+
203
+ ## 8.4.0-beta.2 - 2023-03-03
204
+ * [#1183](https://github.com/stripe/stripe-ruby/pull/1183) API Updates for beta branch
205
+ * Updated stable APIs to the latest version
206
+ * Add support for new resources `Issuing.CardBundle` and `Issuing.CardDesign`
207
+ * Add support for `list` and `retrieve` methods on resource `CardBundle`
208
+ * Add support for `list`, `retrieve`, and `update` methods on resource `CardDesign`
209
+
210
+ ## 8.4.0-beta.1 - 2023-02-23
211
+ * [#1182](https://github.com/stripe/stripe-ruby/pull/1182) API Updates for beta branch
212
+ * Updated stable APIs to the latest version
213
+
100
214
  ## 8.3.0 - 2023-02-16
101
215
  * [#1175](https://github.com/stripe/stripe-ruby/pull/1175) API Updates
102
216
  * Add support for `refund_payment` method on resource `Terminal.Reader`
103
217
 
218
+ ## 8.3.0-beta.1 - 2023-02-02
219
+ * [#1174](https://github.com/stripe/stripe-ruby/pull/1174) API Updates for beta branch
220
+ * Updated stable APIs to the latest version
221
+ * Add support for new resource `FinancialConnections.Transaction`
222
+ * Add support for `list` method on resource `Transaction`
223
+
104
224
  ## 8.2.0 - 2023-02-02
105
225
  * [#1173](https://github.com/stripe/stripe-ruby/pull/1173) API Updates
106
226
  * Add support for `resume` method on resource `Subscription`
107
227
  * [#1171](https://github.com/stripe/stripe-ruby/pull/1171) Remove unused `partial` param from `initialize_from`
108
228
 
229
+ ## 8.2.0-beta.3 - 2023-01-26
230
+ * [#1172](https://github.com/stripe/stripe-ruby/pull/1172) API Updates for beta branch
231
+ * Updated stable APIs to the latest version
232
+ * Add support for `list_transactions` method on resource `Tax.Transaction`
233
+
234
+ ## 8.2.0-beta.2 - 2023-01-19
235
+ * [#1170](https://github.com/stripe/stripe-ruby/pull/1170) API Updates for beta branch
236
+ * Updated stable APIs to the latest version
237
+ * Add support for `Tax.Settings` resource.
238
+
239
+ ## 8.2.0-beta.1 - 2023-01-12
240
+ * [#1167](https://github.com/stripe/stripe-ruby/pull/1167) API Updates for beta branch
241
+ * Updated stable APIs to the latest version
242
+ * Change `quote.draft_quote` implementation to from calling `POST /v1/quotes/{quote}/draft` to `POST /v1/quotes/{quote}/mark_draft`
243
+ * Add support for `Tax::Register` resource
244
+
109
245
  ## 8.1.0 - 2023-01-12
110
246
  * [#1162](https://github.com/stripe/stripe-ruby/pull/1162) Improve request events instrumentation
111
247
 
248
+ ## 8.1.0-beta.4 - 2023-01-05
249
+ * [#1164](https://github.com/stripe/stripe-ruby/pull/1164) API Updates for beta branch
250
+ * Updated stable APIs to the latest version
251
+ * Add support for `mark_stale_quote` method on resource `Quote`
252
+
253
+ ## 8.1.0-beta.3 - 2022-12-22
254
+ * [#1158](https://github.com/stripe/stripe-ruby/pull/1158) API Updates for beta branch
255
+ * Updated stable APIs to the latest version
256
+ * Move `TaxCalculation` and `TaxTransaction` to `Tax::Calculation` and `Tax::Transaction`.
257
+
258
+ ## 8.1.0-beta.2 - 2022-12-15
259
+ * [#1156](https://github.com/stripe/stripe-ruby/pull/1156) API Updates for beta branch
260
+ * Updated stable APIs to the latest version
261
+ * Add support for new resources `TaxCalculation`, and `TaxTransaction`
262
+ * Add support for `create` and `list_line_items` methods on resource `TaxCalculation`
263
+ * Add support for `create_reversal`, `create`, and `retrieve` methods on resource `TaxTransaction`
264
+ * [#1155](https://github.com/stripe/stripe-ruby/pull/1155) API Updates for beta branch
265
+ * Updated stable APIs to the latest version
266
+ * Add support for new resource `QuoteLine`.
267
+
268
+ ## 8.1.0-beta.1 - 2022-12-08
269
+ * [#1153](https://github.com/stripe/stripe-ruby/pull/1153) API Updates for beta branch
270
+ * Updated stable APIs to the latest version
271
+ * [#1146](https://github.com/stripe/stripe-ruby/pull/1146) API Updates for beta branch
272
+ * Updated stable APIs to the latest version
273
+
112
274
  ## 8.0.0 - 2022-11-16
113
275
  * [#1144](https://github.com/stripe/stripe-ruby/pull/1144) Next major release changes
114
276
 
@@ -116,30 +278,29 @@ Breaking changes that arose during code generation of the library that we postpo
116
278
 
117
279
  "⚠️" symbol highlights breaking changes.
118
280
 
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
- ```
281
+ ## 7.2.0-beta.5 - 2022-11-02
282
+ * [#1139](https://github.com/stripe/stripe-ruby/pull/1139) API Updates for beta branch
283
+ * Updated beta APIs to the latest stable version
284
+ * [#1135](https://github.com/stripe/stripe-ruby/pull/1135) API Updates for beta branch
285
+ * Updated stable APIs to the latest version
130
286
 
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")
287
+ ## 7.2.0-beta.4 - 2022-10-07
288
+ * [#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
289
 
139
- # after
140
- Stripe::Subscription::cancel("sub_12345")
141
- ```
290
+ ## 7.2.0-beta.3 - 2022-09-26
291
+ * [#1129](https://github.com/stripe/stripe-ruby/pull/1129) API Updates for beta branch
292
+ * Updated stable APIs to the latest version
293
+ * Add `FinancingOffer`, `FinancingSummary` and `FinancingTransaction` resources.
142
294
 
295
+ ## 7.2.0-beta.2 - 2022-08-26
296
+ * [#1127](https://github.com/stripe/stripe-ruby/pull/1127) API Updates for beta branch
297
+ * Updated stable APIs to the latest version
298
+ * Add support for the beta [Gift Card API](https://stripe.com/docs/gift-cards).
299
+
300
+ ## 7.2.0-beta.1 - 2022-08-23
301
+ * [#1122](https://github.com/stripe/stripe-ruby/pull/1122) API Updates for beta branch
302
+ - Updated stable APIs to the latest version
303
+ - `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
304
 
144
305
  ## 7.1.0 - 2022-08-19
145
306
  * [#1116](https://github.com/stripe/stripe-ruby/pull/1116) API Updates
@@ -148,6 +309,16 @@ Breaking changes that arose during code generation of the library that we postpo
148
309
  * [#1117](https://github.com/stripe/stripe-ruby/pull/1117) Refresh rubocop config.
149
310
  * [#1115](https://github.com/stripe/stripe-ruby/pull/1115) Add a support section to the readme
150
311
 
312
+ ## 7.1.0-beta.2 - 2022-08-11
313
+ * [#1113](https://github.com/stripe/stripe-ruby/pull/1113) API Updates for beta branch
314
+ - Updated stable APIs to the latest version
315
+ - Add `refund_payment` method to Terminal resource
316
+
317
+ ## 7.1.0-beta.1 - 2022-08-03
318
+ * [#1107](https://github.com/stripe/stripe-ruby/pull/1107) API Updates for beta branch
319
+ - Updated stable APIs to the latest version
320
+ - Added the `Order` resource support
321
+
151
322
  ## 7.0.0 - 2022-08-02
152
323
 
153
324
  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 +330,19 @@ Breaking changes that arose during code generation of the library that we postpo
159
330
  * [#1090](https://github.com/stripe/stripe-ruby/pull/1090) Use auto-generation for `Invoice` methods
160
331
  * [#1103](https://github.com/stripe/stripe-ruby/pull/1103) Next major release changes
161
332
 
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.
333
+ ## 6.6.0-beta.1 - 2022-07-22
334
+ * [#1100](https://github.com/stripe/stripe-ruby/pull/1100) API Updates for beta branch
335
+ - Updated stable APIs to the latest version
336
+ - Add `QuotePhase` resource
337
+ * [#1097](https://github.com/stripe/stripe-ruby/pull/1097) API Updates for beta branch
338
+ - Updated stable APIs to the latest version
339
+ - Add `SubscriptionSchedule.amend` method.
340
+ * [#1093](https://github.com/stripe/stripe-ruby/pull/1093) API Updates for beta branch
341
+ - Include `server_side_confirmation_beta=v1` beta
342
+ - Add `secretKeyConfirmation` to `PaymentIntent`
343
+ * [#1085](https://github.com/stripe/stripe-ruby/pull/1085) API Updates for beta branch
344
+ - Updated stable APIs to the latest version
345
+ * [#1075](https://github.com/stripe/stripe-ruby/pull/1075) Use the generated API version
177
346
 
178
347
  ## 6.5.0 - 2022-06-29
179
348
  * [#1084](https://github.com/stripe/stripe-ruby/pull/1084) API Updates
@@ -203,8 +372,6 @@ Breaking changes that arose during code generation of the library that we postpo
203
372
  * 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
373
  * Add support for `retrieve_payment_method` method on resource `Customer`
205
374
  * Add support for `list_owners` and `list` methods on resource `FinancialConnections.Account`
206
-
207
-
208
375
 
209
376
  ## 6.0.0 - 2022-05-09
210
377
  * [#1056](https://github.com/stripe/stripe-ruby/pull/1056) API Updates
@@ -220,7 +387,6 @@ Breaking changes that arose during code generation of the library that we postpo
220
387
  ## 5.55.0 - 2022-05-05
221
388
  * [#1055](https://github.com/stripe/stripe-ruby/pull/1055) API Updates
222
389
  * Add support for new resources `FinancialConnections.AccountOwner`, `FinancialConnections.AccountOwnership`, `FinancialConnections.Account`, and `FinancialConnections.Session`
223
-
224
390
 
225
391
  ## 5.54.0 - 2022-05-03
226
392
  * [#1053](https://github.com/stripe/stripe-ruby/pull/1053) API Updates
@@ -1251,3 +1417,4 @@ Identical to 1.56.0 above. I incorrectly cut a patch-level release.
1251
1417
  <!--
1252
1418
  # vim: set tw=0:
1253
1419
  -->
1420
+
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.1
@@ -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-08-11.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
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ # A customer session allows you to grant client access to Stripe's frontend SDKs (like StripeJs)
6
+ # control over a customer.
7
+ class CustomerSession < APIResource
8
+ extend Stripe::APIOperations::Create
9
+
10
+ OBJECT_NAME = "customer_session"
11
+ end
12
+ end