stripe 15.2.0.pre.beta.1 → 15.3.0.pre.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +92 -0
  3. data/CONTRIBUTING.md +25 -0
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +10 -7
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_version.rb +1 -1
  8. data/lib/stripe/event_types.rb +9 -0
  9. data/lib/stripe/events/v2_core_account_link_completed_event.rb +1 -1
  10. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_failed_event.rb +1 -1
  11. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_processing_event.rb +1 -1
  12. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_queued_event.rb +1 -1
  13. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_returned_event.rb +1 -1
  14. data/lib/stripe/events/v2_money_management_inbound_transfer_bank_debit_succeeded_event.rb +1 -1
  15. data/lib/stripe/events/v2_money_management_outbound_payment_canceled_event.rb +1 -1
  16. data/lib/stripe/events/v2_money_management_outbound_payment_failed_event.rb +1 -1
  17. data/lib/stripe/events/v2_money_management_outbound_payment_posted_event.rb +1 -1
  18. data/lib/stripe/events/v2_money_management_outbound_payment_returned_event.rb +1 -1
  19. data/lib/stripe/events/v2_money_management_outbound_payment_updated_event.rb +1 -1
  20. data/lib/stripe/events/v2_off_session_payment_requires_capture_event.rb +21 -0
  21. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +21 -0
  22. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +21 -0
  23. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +21 -0
  24. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +21 -0
  25. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +21 -0
  26. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +21 -0
  27. data/lib/stripe/object_types.rb +1 -3
  28. data/lib/stripe/resources/account.rb +47 -20
  29. data/lib/stripe/resources/account_session.rb +85 -24
  30. data/lib/stripe/resources/apple_pay_domain.rb +1 -2
  31. data/lib/stripe/resources/balance.rb +42 -0
  32. data/lib/stripe/resources/balance_transaction.rb +2 -0
  33. data/lib/stripe/resources/bank_account.rb +2 -2
  34. data/lib/stripe/resources/billing_portal/session.rb +1 -1
  35. data/lib/stripe/resources/capability.rb +1 -1
  36. data/lib/stripe/resources/charge.rb +85 -9
  37. data/lib/stripe/resources/checkout/session.rb +22 -6
  38. data/lib/stripe/resources/confirmation_token.rb +37 -97
  39. data/lib/stripe/resources/country_spec.rb +1 -1
  40. data/lib/stripe/resources/coupon.rb +1 -2
  41. data/lib/stripe/resources/credit_note.rb +10 -11
  42. data/lib/stripe/resources/customer.rb +2 -4
  43. data/lib/stripe/resources/customer_session.rb +3 -3
  44. data/lib/stripe/resources/dispute.rb +2 -2
  45. data/lib/stripe/resources/event.rb +1 -1
  46. data/lib/stripe/resources/file.rb +1 -1
  47. data/lib/stripe/resources/financial_connections/account.rb +2 -0
  48. data/lib/stripe/resources/financial_connections/institution.rb +2 -0
  49. data/lib/stripe/resources/identity/verification_report.rb +6 -0
  50. data/lib/stripe/resources/identity/verification_session.rb +17 -11
  51. data/lib/stripe/resources/invoice.rb +70 -43
  52. data/lib/stripe/resources/invoice_item.rb +2 -3
  53. data/lib/stripe/resources/invoice_line_item.rb +1 -1
  54. data/lib/stripe/resources/invoice_payment.rb +9 -2
  55. data/lib/stripe/resources/issuing/authorization.rb +8 -8
  56. data/lib/stripe/resources/issuing/card.rb +1 -1
  57. data/lib/stripe/resources/issuing/dispute.rb +3 -3
  58. data/lib/stripe/resources/order.rb +2 -55
  59. data/lib/stripe/resources/payment_attempt_record.rb +8 -0
  60. data/lib/stripe/resources/payment_intent.rb +439 -411
  61. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +7 -0
  62. data/lib/stripe/resources/payment_method.rb +50 -113
  63. data/lib/stripe/resources/payment_method_configuration.rb +297 -2
  64. data/lib/stripe/resources/payment_method_domain.rb +2 -2
  65. data/lib/stripe/resources/payment_record.rb +8 -0
  66. data/lib/stripe/resources/payout.rb +4 -4
  67. data/lib/stripe/resources/person.rb +2 -2
  68. data/lib/stripe/resources/plan.rb +2 -3
  69. data/lib/stripe/resources/price.rb +1 -1
  70. data/lib/stripe/resources/privacy/redaction_job.rb +52 -29
  71. data/lib/stripe/resources/privacy/redaction_job_validation_error.rb +12 -4
  72. data/lib/stripe/resources/product.rb +1 -61
  73. data/lib/stripe/resources/quote.rb +1 -1
  74. data/lib/stripe/resources/quote_preview_invoice.rb +2 -2
  75. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +26 -1
  76. data/lib/stripe/resources/radar/value_list.rb +1 -2
  77. data/lib/stripe/resources/radar/value_list_item.rb +1 -2
  78. data/lib/stripe/resources/refund.rb +6 -1
  79. data/lib/stripe/resources/reversal.rb +1 -1
  80. data/lib/stripe/resources/review.rb +1 -1
  81. data/lib/stripe/resources/setup_intent.rb +123 -311
  82. data/lib/stripe/resources/source.rb +1 -1
  83. data/lib/stripe/resources/subscription.rb +132 -37
  84. data/lib/stripe/resources/subscription_item.rb +33 -0
  85. data/lib/stripe/resources/subscription_schedule.rb +120 -5
  86. data/lib/stripe/resources/tax/association.rb +8 -31
  87. data/lib/stripe/resources/tax/calculation.rb +4 -0
  88. data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
  89. data/lib/stripe/resources/tax/registration.rb +1 -1
  90. data/lib/stripe/resources/tax_id.rb +1 -2
  91. data/lib/stripe/resources/tax_rate.rb +2 -2
  92. data/lib/stripe/resources/terminal/configuration.rb +1 -2
  93. data/lib/stripe/resources/terminal/location.rb +2 -3
  94. data/lib/stripe/resources/terminal/reader.rb +26 -4
  95. data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
  96. data/lib/stripe/resources/token.rb +2 -2
  97. data/lib/stripe/resources/transfer.rb +1 -1
  98. data/lib/stripe/resources/v2/core/account.rb +5 -5
  99. data/lib/stripe/resources/v2/money_management/received_credit.rb +0 -20
  100. data/lib/stripe/resources/v2/money_management/received_debit.rb +0 -24
  101. data/lib/stripe/resources/v2/payments/off_session_payment.rb +74 -0
  102. data/lib/stripe/resources/webhook_endpoint.rb +1 -2
  103. data/lib/stripe/resources.rb +8 -3
  104. data/lib/stripe/services/account_external_account_service.rb +2 -3
  105. data/lib/stripe/services/account_login_link_service.rb +1 -1
  106. data/lib/stripe/services/account_person_service.rb +1 -2
  107. data/lib/stripe/services/account_service.rb +38 -13
  108. data/lib/stripe/services/account_session_service.rb +49 -24
  109. data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
  110. data/lib/stripe/services/balance_service.rb +1 -1
  111. data/lib/stripe/services/balance_settings_service.rb +2 -2
  112. data/lib/stripe/services/charge_service.rb +76 -8
  113. data/lib/stripe/services/checkout/session_service.rb +14 -6
  114. data/lib/stripe/services/coupon_service.rb +1 -2
  115. data/lib/stripe/services/credit_note_service.rb +7 -8
  116. data/lib/stripe/services/customer_balance_transaction_service.rb +3 -3
  117. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +2 -2
  118. data/lib/stripe/services/customer_payment_source_service.rb +1 -1
  119. data/lib/stripe/services/customer_service.rb +3 -5
  120. data/lib/stripe/services/customer_tax_id_service.rb +1 -2
  121. data/lib/stripe/services/dispute_service.rb +1 -1
  122. data/lib/stripe/services/external_account_service.rb +2 -3
  123. data/lib/stripe/services/file_service.rb +1 -1
  124. data/lib/stripe/services/identity/verification_session_service.rb +5 -5
  125. data/lib/stripe/services/invoice_item_service.rb +1 -2
  126. data/lib/stripe/services/invoice_service.rb +65 -35
  127. data/lib/stripe/services/issuing/authorization_service.rb +4 -4
  128. data/lib/stripe/services/issuing/card_service.rb +1 -1
  129. data/lib/stripe/services/issuing/dispute_service.rb +2 -2
  130. data/lib/stripe/services/order_service.rb +1 -33
  131. data/lib/stripe/services/payment_intent_service.rb +385 -386
  132. data/lib/stripe/services/payment_method_configuration_service.rb +212 -2
  133. data/lib/stripe/services/payment_method_domain_service.rb +1 -1
  134. data/lib/stripe/services/payment_method_service.rb +47 -110
  135. data/lib/stripe/services/payout_service.rb +2 -2
  136. data/lib/stripe/services/plan_service.rb +2 -3
  137. data/lib/stripe/services/price_service.rb +2 -2
  138. data/lib/stripe/services/privacy/redaction_job_service.rb +22 -13
  139. data/lib/stripe/services/privacy/redaction_job_validation_error_service.rb +1 -1
  140. data/lib/stripe/services/product_feature_service.rb +1 -2
  141. data/lib/stripe/services/product_service.rb +2 -41
  142. data/lib/stripe/services/promotion_code_service.rb +1 -1
  143. data/lib/stripe/services/quote_service.rb +1 -1
  144. data/lib/stripe/services/radar/early_fraud_warning_service.rb +1 -1
  145. data/lib/stripe/services/radar/value_list_item_service.rb +1 -2
  146. data/lib/stripe/services/radar/value_list_service.rb +1 -2
  147. data/lib/stripe/services/setup_intent_service.rb +122 -310
  148. data/lib/stripe/services/source_service.rb +1 -1
  149. data/lib/stripe/services/subscription_item_service.rb +26 -0
  150. data/lib/stripe/services/subscription_schedule_service.rb +94 -4
  151. data/lib/stripe/services/subscription_service.rb +103 -33
  152. data/lib/stripe/services/tax/calculation_service.rb +4 -0
  153. data/lib/stripe/services/tax/registration_service.rb +1 -1
  154. data/lib/stripe/services/tax_id_service.rb +1 -2
  155. data/lib/stripe/services/terminal/configuration_service.rb +1 -2
  156. data/lib/stripe/services/terminal/location_service.rb +2 -3
  157. data/lib/stripe/services/terminal/reader_service.rb +17 -3
  158. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +37 -97
  159. data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
  160. data/lib/stripe/services/token_service.rb +1 -1
  161. data/lib/stripe/services/transfer_service.rb +1 -1
  162. data/lib/stripe/services/v1_services.rb +1 -2
  163. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
  164. data/lib/stripe/services/v2/core/accounts/person_service.rb +2 -4
  165. data/lib/stripe/services/v2/core/event_destination_service.rb +4 -10
  166. data/lib/stripe/services/v2/core/event_service.rb +1 -2
  167. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +3 -7
  168. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +2 -4
  169. data/lib/stripe/services/v2/money_management/adjustment_service.rb +1 -2
  170. data/lib/stripe/services/v2/money_management/financial_account_service.rb +1 -2
  171. data/lib/stripe/services/v2/money_management/financial_address_service.rb +1 -1
  172. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +1 -2
  173. data/lib/stripe/services/v2/money_management/outbound_payment_quote_service.rb +1 -2
  174. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +2 -4
  175. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +2 -4
  176. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +2 -4
  177. data/lib/stripe/services/v2/money_management/payout_method_service.rb +3 -7
  178. data/lib/stripe/services/v2/money_management/received_credit_service.rb +1 -2
  179. data/lib/stripe/services/v2/money_management/received_debit_service.rb +1 -2
  180. data/lib/stripe/services/v2/money_management/transaction_entry_service.rb +1 -2
  181. data/lib/stripe/services/v2/money_management/transaction_service.rb +1 -2
  182. data/lib/stripe/services/v2/payment_service.rb +15 -0
  183. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +138 -0
  184. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +1 -2
  185. data/lib/stripe/services/v2_services.rb +2 -1
  186. data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
  187. data/lib/stripe/services.rb +2 -3
  188. data/lib/stripe/version.rb +1 -1
  189. data/rbi/stripe.rbi +3903 -4131
  190. metadata +13 -8
  191. data/lib/stripe/resources/billing/meter_error_report.rb +0 -59
  192. data/lib/stripe/resources/gift_cards/card.rb +0 -208
  193. data/lib/stripe/resources/gift_cards/transaction.rb +0 -272
  194. data/lib/stripe/services/gift_cards/card_service.rb +0 -170
  195. data/lib/stripe/services/gift_cards/transaction_service.rb +0 -209
  196. data/lib/stripe/services/gift_cards_service.rb +0 -14
@@ -50,20 +50,11 @@ module Stripe
50
50
  end
51
51
  end
52
52
 
53
- class Affirm < Stripe::RequestParams
54
- end
55
-
56
- class AfterpayClearpay < Stripe::RequestParams
57
- end
58
-
59
- class Alipay < Stripe::RequestParams
60
- end
61
-
62
- class Alma < Stripe::RequestParams
63
- end
64
-
65
- class AmazonPay < Stripe::RequestParams
66
- end
53
+ class Affirm < Stripe::RequestParams; end
54
+ class AfterpayClearpay < Stripe::RequestParams; end
55
+ class Alipay < Stripe::RequestParams; end
56
+ class Alma < Stripe::RequestParams; end
57
+ class AmazonPay < Stripe::RequestParams; end
67
58
 
68
59
  class AuBecsDebit < Stripe::RequestParams
69
60
  # The account number for the bank account.
@@ -89,11 +80,8 @@ module Stripe
89
80
  end
90
81
  end
91
82
 
92
- class Bancontact < Stripe::RequestParams
93
- end
94
-
95
- class Billie < Stripe::RequestParams
96
- end
83
+ class Bancontact < Stripe::RequestParams; end
84
+ class Billie < Stripe::RequestParams; end
97
85
 
98
86
  class BillingDetails < Stripe::RequestParams
99
87
  class Address < Stripe::RequestParams
@@ -146,8 +134,7 @@ module Stripe
146
134
  end
147
135
  end
148
136
 
149
- class Blik < Stripe::RequestParams
150
- end
137
+ class Blik < Stripe::RequestParams; end
151
138
 
152
139
  class Boleto < Stripe::RequestParams
153
140
  # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
@@ -197,11 +184,8 @@ module Stripe
197
184
  end
198
185
  end
199
186
 
200
- class Cashapp < Stripe::RequestParams
201
- end
202
-
203
- class CustomerBalance < Stripe::RequestParams
204
- end
187
+ class Cashapp < Stripe::RequestParams; end
188
+ class CustomerBalance < Stripe::RequestParams; end
205
189
 
206
190
  class Eps < Stripe::RequestParams
207
191
  # The customer's bank.
@@ -224,14 +208,9 @@ module Stripe
224
208
  end
225
209
  end
226
210
 
227
- class Giropay < Stripe::RequestParams
228
- end
229
-
230
- class Gopay < Stripe::RequestParams
231
- end
232
-
233
- class Grabpay < Stripe::RequestParams
234
- end
211
+ class Giropay < Stripe::RequestParams; end
212
+ class Gopay < Stripe::RequestParams; end
213
+ class Grabpay < Stripe::RequestParams; end
235
214
 
236
215
  class IdBankTransfer < Stripe::RequestParams
237
216
  # Bank where the account is held.
@@ -251,11 +230,8 @@ module Stripe
251
230
  end
252
231
  end
253
232
 
254
- class InteracPresent < Stripe::RequestParams
255
- end
256
-
257
- class KakaoPay < Stripe::RequestParams
258
- end
233
+ class InteracPresent < Stripe::RequestParams; end
234
+ class KakaoPay < Stripe::RequestParams; end
259
235
 
260
236
  class Klarna < Stripe::RequestParams
261
237
  class Dob < Stripe::RequestParams
@@ -280,23 +256,12 @@ module Stripe
280
256
  end
281
257
  end
282
258
 
283
- class Konbini < Stripe::RequestParams
284
- end
285
-
286
- class KrCard < Stripe::RequestParams
287
- end
288
-
289
- class Link < Stripe::RequestParams
290
- end
291
-
292
- class MbWay < Stripe::RequestParams
293
- end
294
-
295
- class Mobilepay < Stripe::RequestParams
296
- end
297
-
298
- class Multibanco < Stripe::RequestParams
299
- end
259
+ class Konbini < Stripe::RequestParams; end
260
+ class KrCard < Stripe::RequestParams; end
261
+ class Link < Stripe::RequestParams; end
262
+ class MbWay < Stripe::RequestParams; end
263
+ class Mobilepay < Stripe::RequestParams; end
264
+ class Multibanco < Stripe::RequestParams; end
300
265
 
301
266
  class NaverPay < Stripe::RequestParams
302
267
  # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`.
@@ -338,8 +303,7 @@ module Stripe
338
303
  end
339
304
  end
340
305
 
341
- class Oxxo < Stripe::RequestParams
342
- end
306
+ class Oxxo < Stripe::RequestParams; end
343
307
 
344
308
  class P24 < Stripe::RequestParams
345
309
  # The customer's bank.
@@ -350,17 +314,10 @@ module Stripe
350
314
  end
351
315
  end
352
316
 
353
- class PayByBank < Stripe::RequestParams
354
- end
355
-
356
- class Payco < Stripe::RequestParams
357
- end
358
-
359
- class Paynow < Stripe::RequestParams
360
- end
361
-
362
- class Paypal < Stripe::RequestParams
363
- end
317
+ class PayByBank < Stripe::RequestParams; end
318
+ class Payco < Stripe::RequestParams; end
319
+ class Paynow < Stripe::RequestParams; end
320
+ class Paypal < Stripe::RequestParams; end
364
321
 
365
322
  class Payto < Stripe::RequestParams
366
323
  # The account number for the bank account.
@@ -377,14 +334,9 @@ module Stripe
377
334
  end
378
335
  end
379
336
 
380
- class Pix < Stripe::RequestParams
381
- end
382
-
383
- class Promptpay < Stripe::RequestParams
384
- end
385
-
386
- class Qris < Stripe::RequestParams
387
- end
337
+ class Pix < Stripe::RequestParams; end
338
+ class Promptpay < Stripe::RequestParams; end
339
+ class Qris < Stripe::RequestParams; end
388
340
 
389
341
  class RadarOptions < Stripe::RequestParams
390
342
  # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
@@ -418,14 +370,9 @@ module Stripe
418
370
  end
419
371
  end
420
372
 
421
- class RevolutPay < Stripe::RequestParams
422
- end
423
-
424
- class SamsungPay < Stripe::RequestParams
425
- end
426
-
427
- class Satispay < Stripe::RequestParams
428
- end
373
+ class RevolutPay < Stripe::RequestParams; end
374
+ class SamsungPay < Stripe::RequestParams; end
375
+ class Satispay < Stripe::RequestParams; end
429
376
 
430
377
  class SepaDebit < Stripe::RequestParams
431
378
  # IBAN of the bank account.
@@ -436,8 +383,7 @@ module Stripe
436
383
  end
437
384
  end
438
385
 
439
- class Shopeepay < Stripe::RequestParams
440
- end
386
+ class Shopeepay < Stripe::RequestParams; end
441
387
 
442
388
  class Sofort < Stripe::RequestParams
443
389
  # Two-letter ISO code representing the country the bank account is located in.
@@ -460,11 +406,8 @@ module Stripe
460
406
  end
461
407
  end
462
408
 
463
- class Swish < Stripe::RequestParams
464
- end
465
-
466
- class Twint < Stripe::RequestParams
467
- end
409
+ class Swish < Stripe::RequestParams; end
410
+ class Twint < Stripe::RequestParams; end
468
411
 
469
412
  class UsBankAccount < Stripe::RequestParams
470
413
  # Account holder type: individual or company.
@@ -493,11 +436,8 @@ module Stripe
493
436
  end
494
437
  end
495
438
 
496
- class WechatPay < Stripe::RequestParams
497
- end
498
-
499
- class Zip < Stripe::RequestParams
500
- end
439
+ class WechatPay < Stripe::RequestParams; end
440
+ class Zip < Stripe::RequestParams; end
501
441
  # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
502
442
  attr_accessor :acss_debit
503
443
  # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
@@ -844,11 +784,8 @@ module Stripe
844
784
  end
845
785
  end
846
786
 
847
- class Link < Stripe::RequestParams
848
- end
849
-
850
- class PayByBank < Stripe::RequestParams
851
- end
787
+ class Link < Stripe::RequestParams; end
788
+ class PayByBank < Stripe::RequestParams; end
852
789
 
853
790
  class Payto < Stripe::RequestParams
854
791
  # The account number for the bank account.
@@ -944,16 +881,16 @@ module Stripe
944
881
 
945
882
  # Attaches a PaymentMethod object to a Customer.
946
883
  #
947
- # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents)
948
- # or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
884
+ # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://docs.stripe.com/docs/api/setup_intents)
885
+ # or a PaymentIntent with [setup_future_usage](https://docs.stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage).
949
886
  # These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach
950
887
  # endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for
951
888
  # future use, which makes later declines and payment friction more likely.
952
- # See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
889
+ # See [Optimizing cards for future payments](https://docs.stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up
953
890
  # future payments.
954
891
  #
955
892
  # To use this PaymentMethod as the default for invoice or subscription payments,
956
- # set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
893
+ # set [invoice_settings.default_payment_method](https://docs.stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method),
957
894
  # on the Customer to the PaymentMethod's ID.
958
895
  def attach(payment_method, params = {}, opts = {})
959
896
  request(
@@ -965,9 +902,9 @@ module Stripe
965
902
  )
966
903
  end
967
904
 
968
- # Creates a PaymentMethod object. Read the [Stripe.js reference](https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js.
905
+ # Creates a PaymentMethod object. Read the [Stripe.js reference](https://docs.stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js.
969
906
  #
970
- # Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the <a href="/docs/payments/save-and-reuse">SetupIntent](https://stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment.
907
+ # Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the <a href="/docs/payments/save-and-reuse">SetupIntent](https://docs.stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment.
971
908
  def create(params = {}, opts = {})
972
909
  request(
973
910
  method: :post,
@@ -989,7 +926,7 @@ module Stripe
989
926
  )
990
927
  end
991
928
 
992
- # Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead.
929
+ # Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://docs.stripe.com/docs/api/payment_methods/customer_list) API instead.
993
930
  def list(params = {}, opts = {})
994
931
  request(
995
932
  method: :get,
@@ -1000,7 +937,7 @@ module Stripe
1000
937
  )
1001
938
  end
1002
939
 
1003
- # Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer)
940
+ # Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer's PaymentMethods](https://docs.stripe.com/docs/api/payment_methods/customer)
1004
941
  def retrieve(payment_method, params = {}, opts = {})
1005
942
  request(
1006
943
  method: :get,
@@ -177,11 +177,11 @@ module Stripe
177
177
  )
178
178
  end
179
179
 
180
- # To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://stripe.com/docs/api#balance) must cover the payout amount. If it doesn't, you receive an “Insufficient Funds” error.
180
+ # To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://docs.stripe.com/api#balance) must cover the payout amount. If it doesn't, you receive an “Insufficient Funds” error.
181
181
  #
182
182
  # If your API key is in test mode, money won't actually be sent, though every other action occurs as if you're in live mode.
183
183
  #
184
- # If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](https://stripe.com/docs/api#balance_object) details available and pending amounts by source type.
184
+ # If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](https://docs.stripe.com/api#balance_object) details available and pending amounts by source type.
185
185
  def create(params = {}, opts = {})
186
186
  request(method: :post, path: "/v1/payouts", params: params, opts: opts, base_address: :api)
187
187
  end
@@ -3,8 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  class PlanService < StripeService
6
- class DeleteParams < Stripe::RequestParams
7
- end
6
+ class DeleteParams < Stripe::RequestParams; end
8
7
 
9
8
  class RetrieveParams < Stripe::RequestParams
10
9
  # Specifies which fields in the response should be expanded.
@@ -252,7 +251,7 @@ module Stripe
252
251
  end
253
252
  end
254
253
 
255
- # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
254
+ # You can now model subscriptions more flexibly using the [Prices API](https://docs.stripe.com/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration.
256
255
  def create(params = {}, opts = {})
257
256
  request(method: :post, path: "/v1/plans", params: params, opts: opts, base_address: :api)
258
257
  end
@@ -520,7 +520,7 @@ module Stripe
520
520
  request(method: :post, path: "/v1/prices", params: params, opts: opts, base_address: :api)
521
521
  end
522
522
 
523
- # Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false.
523
+ # Returns a list of your active prices, excluding [inline prices](https://docs.stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false.
524
524
  def list(params = {}, opts = {})
525
525
  request(method: :get, path: "/v1/prices", params: params, opts: opts, base_address: :api)
526
526
  end
@@ -536,7 +536,7 @@ module Stripe
536
536
  )
537
537
  end
538
538
 
539
- # Search for prices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
539
+ # Search for prices you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language).
540
540
  # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
541
541
  # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
542
542
  # to an hour behind during outages. Search functionality is not available to merchants in India.
@@ -87,12 +87,9 @@ module Stripe
87
87
  end
88
88
  # Specifies which fields in the response should be expanded.
89
89
  attr_accessor :expand
90
- # The objects at the root level that are subject to redaction.
90
+ # The objects to redact. These root objects and their related ones will be validated for redaction.
91
91
  attr_accessor :objects
92
- # Default is "error". If "error", we will make sure all objects in the graph are
93
- # redactable in the 1st traversal, otherwise error. If "fix", where possible, we will
94
- # auto-fix any validation errors (e.g. by auto-transitioning objects to a terminal
95
- # state, etc.) in the 2nd traversal before redacting
92
+ # Determines the validation behavior of the job. Default is `error`.
96
93
  attr_accessor :validation_behavior
97
94
 
98
95
  def initialize(expand: nil, objects: nil, validation_behavior: nil)
@@ -114,7 +111,7 @@ module Stripe
114
111
  class UpdateParams < Stripe::RequestParams
115
112
  # Specifies which fields in the response should be expanded.
116
113
  attr_accessor :expand
117
- # Attribute for param field validation_behavior
114
+ # Determines the validation behavior of the job. Default is `error`.
118
115
  attr_accessor :validation_behavior
119
116
 
120
117
  def initialize(expand: nil, validation_behavior: nil)
@@ -150,7 +147,9 @@ module Stripe
150
147
  end
151
148
  end
152
149
 
153
- # Cancel redaction job method
150
+ # You can cancel a redaction job when it's in one of these statuses: ready, failed.
151
+ #
152
+ # Canceling the redaction job will abandon its attempt to redact the configured objects. A canceled job cannot be used again.
154
153
  def cancel(job, params = {}, opts = {})
155
154
  request(
156
155
  method: :post,
@@ -161,7 +160,7 @@ module Stripe
161
160
  )
162
161
  end
163
162
 
164
- # Create redaction job method
163
+ # Creates a redaction job. When a job is created, it will start to validate.
165
164
  def create(params = {}, opts = {})
166
165
  request(
167
166
  method: :post,
@@ -172,7 +171,7 @@ module Stripe
172
171
  )
173
172
  end
174
173
 
175
- # List redaction jobs method...
174
+ # Returns a list of redaction jobs.
176
175
  def list(params = {}, opts = {})
177
176
  request(
178
177
  method: :get,
@@ -183,7 +182,7 @@ module Stripe
183
182
  )
184
183
  end
185
184
 
186
- # Retrieve redaction job method
185
+ # Retrieves the details of a previously created redaction job.
187
186
  def retrieve(job, params = {}, opts = {})
188
187
  request(
189
188
  method: :get,
@@ -194,7 +193,11 @@ module Stripe
194
193
  )
195
194
  end
196
195
 
197
- # Run redaction job method
196
+ # Run a redaction job in a ready status.
197
+ #
198
+ # When you run a job, the configured objects will be redacted asynchronously. This action is irreversible and cannot be canceled once started.
199
+ #
200
+ # The status of the job will move to redacting. Once all of the objects are redacted, the status will become succeeded. If the job's validation_behavior is set to fix, the automatic fixes will be applied to objects at this step.
198
201
  def run(job, params = {}, opts = {})
199
202
  request(
200
203
  method: :post,
@@ -205,7 +208,9 @@ module Stripe
205
208
  )
206
209
  end
207
210
 
208
- # Update redaction job method
211
+ # Updates the properties of a redaction job without running or canceling the job.
212
+ #
213
+ # If the job to update is in a failed status, it will not automatically start to validate. Once you applied all of the changes, use the validate API to start validation again.
209
214
  def update(job, params = {}, opts = {})
210
215
  request(
211
216
  method: :post,
@@ -216,7 +221,11 @@ module Stripe
216
221
  )
217
222
  end
218
223
 
219
- # Validate redaction job method
224
+ # Validate a redaction job when it is in a failed status.
225
+ #
226
+ # When a job is created, it automatically begins to validate on the configured objects' eligibility for redaction. Use this to validate the job again after its validation errors are resolved or the job's validation_behavior is changed.
227
+ #
228
+ # The status of the job will move to validating. Once all of the objects are validated, the status of the job will become ready. If there are any validation errors preventing the job from running, the status will become failed.
220
229
  def validate(job, params = {}, opts = {})
221
230
  request(
222
231
  method: :post,
@@ -22,7 +22,7 @@ module Stripe
22
22
  end
23
23
  end
24
24
 
25
- # List validation errors method
25
+ # Returns a list of validation errors for the specified redaction job.
26
26
  def list(job, params = {}, opts = {})
27
27
  request(
28
28
  method: :get,
@@ -3,8 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  class ProductFeatureService < StripeService
6
- class DeleteParams < Stripe::RequestParams
7
- end
6
+ class DeleteParams < Stripe::RequestParams; end
8
7
 
9
8
  class RetrieveParams < Stripe::RequestParams
10
9
  # Specifies which fields in the response should be expanded.
@@ -10,8 +10,7 @@ module Stripe
10
10
  @features = Stripe::ProductFeatureService.new(@requestor)
11
11
  end
12
12
 
13
- class DeleteParams < Stripe::RequestParams
14
- end
13
+ class DeleteParams < Stripe::RequestParams; end
15
14
 
16
15
  class RetrieveParams < Stripe::RequestParams
17
16
  # Specifies which fields in the response should be expanded.
@@ -344,40 +343,6 @@ module Stripe
344
343
  @width = width
345
344
  end
346
345
  end
347
-
348
- class Provisioning < Stripe::RequestParams
349
- class GiftCard < Stripe::RequestParams
350
- class FixedAmount < Stripe::RequestParams
351
- # The initial amount with which the provisioned gift card will be created.
352
- attr_accessor :amount
353
- # Attribute for param field currency
354
- attr_accessor :currency
355
-
356
- def initialize(amount: nil, currency: nil)
357
- @amount = amount
358
- @currency = currency
359
- end
360
- end
361
- # Attribute for param field fixed_amount
362
- attr_accessor :fixed_amount
363
- # The specific type of gift_card provisioning, only `fixed_amount` currently supported.
364
- attr_accessor :type
365
-
366
- def initialize(fixed_amount: nil, type: nil)
367
- @fixed_amount = fixed_amount
368
- @type = type
369
- end
370
- end
371
- # Attribute for param field gift_card
372
- attr_accessor :gift_card
373
- # The type of provisioning, only `gift_card` currently supported.
374
- attr_accessor :type
375
-
376
- def initialize(gift_card: nil, type: nil)
377
- @gift_card = gift_card
378
- @type = type
379
- end
380
- end
381
346
  # Whether the product is currently available for purchase. Defaults to `true`.
382
347
  attr_accessor :active
383
348
  # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product.
@@ -398,8 +363,6 @@ module Stripe
398
363
  attr_accessor :name
399
364
  # The dimensions of this product for shipping purposes.
400
365
  attr_accessor :package_dimensions
401
- # Provisioning configuration for this product.
402
- attr_accessor :provisioning
403
366
  # Whether this product is shipped (i.e., physical goods).
404
367
  attr_accessor :shippable
405
368
  # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.
@@ -427,7 +390,6 @@ module Stripe
427
390
  metadata: nil,
428
391
  name: nil,
429
392
  package_dimensions: nil,
430
- provisioning: nil,
431
393
  shippable: nil,
432
394
  statement_descriptor: nil,
433
395
  tax_code: nil,
@@ -445,7 +407,6 @@ module Stripe
445
407
  @metadata = metadata
446
408
  @name = name
447
409
  @package_dimensions = package_dimensions
448
- @provisioning = provisioning
449
410
  @shippable = shippable
450
411
  @statement_descriptor = statement_descriptor
451
412
  @tax_code = tax_code
@@ -505,7 +466,7 @@ module Stripe
505
466
  )
506
467
  end
507
468
 
508
- # Search for products you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
469
+ # Search for products you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language).
509
470
  # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
510
471
  # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up
511
472
  # to an hour behind during outages. Search functionality is not available to merchants in India.
@@ -211,7 +211,7 @@ module Stripe
211
211
  )
212
212
  end
213
213
 
214
- # Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://stripe.com/docs/api/promotion_codes/list) with the desired code.
214
+ # Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://docs.stripe.com/docs/api/promotion_codes/list) with the desired code.
215
215
  def retrieve(promotion_code, params = {}, opts = {})
216
216
  request(
217
217
  method: :get,
@@ -834,7 +834,7 @@ module Stripe
834
834
  attr_accessor :billing_behavior
835
835
  # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted.
836
836
  attr_accessor :billing_cycle_anchor
837
- # Configure billing_mode to opt in improved credit proration behavior.Once a quote that creates a subscription or subscription schedule is accepted,all future operations on the subscription or subscription schedule will be processed based on this billing_mode.
837
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
838
838
  attr_accessor :billing_mode
839
839
  # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
840
840
  attr_accessor :description
@@ -78,7 +78,7 @@ module Stripe
78
78
 
79
79
  # Retrieves the details of an early fraud warning that has previously been created.
80
80
  #
81
- # Please refer to the [early fraud warning](https://stripe.com/docs/api#early_fraud_warning_object) object reference for more details.
81
+ # Please refer to the [early fraud warning](https://docs.stripe.com/api#early_fraud_warning_object) object reference for more details.
82
82
  def retrieve(early_fraud_warning, params = {}, opts = {})
83
83
  request(
84
84
  method: :get,
@@ -4,8 +4,7 @@
4
4
  module Stripe
5
5
  module Radar
6
6
  class ValueListItemService < StripeService
7
- class DeleteParams < Stripe::RequestParams
8
- end
7
+ class DeleteParams < Stripe::RequestParams; end
9
8
 
10
9
  class RetrieveParams < Stripe::RequestParams
11
10
  # Specifies which fields in the response should be expanded.
@@ -4,8 +4,7 @@
4
4
  module Stripe
5
5
  module Radar
6
6
  class ValueListService < StripeService
7
- class DeleteParams < Stripe::RequestParams
8
- end
7
+ class DeleteParams < Stripe::RequestParams; end
9
8
 
10
9
  class RetrieveParams < Stripe::RequestParams
11
10
  # Specifies which fields in the response should be expanded.