stripe 15.2.1 → 15.3.0

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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -0
  3. data/CHANGELOG.md +66 -39
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +14 -50
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_version.rb +2 -1
  8. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +1 -1
  9. data/lib/stripe/resources/account.rb +89 -5
  10. data/lib/stripe/resources/account_session.rb +79 -79
  11. data/lib/stripe/resources/billing_portal/session.rb +2 -2
  12. data/lib/stripe/resources/charge.rb +28 -15
  13. data/lib/stripe/resources/checkout/session.rb +57 -7
  14. data/lib/stripe/resources/confirmation_token.rb +19 -11
  15. data/lib/stripe/resources/credit_note.rb +9 -9
  16. data/lib/stripe/resources/customer_session.rb +2 -2
  17. data/lib/stripe/resources/event.rb +1 -1
  18. data/lib/stripe/resources/identity/verification_session.rb +34 -0
  19. data/lib/stripe/resources/invoice.rb +29 -4
  20. data/lib/stripe/resources/invoice_item.rb +1 -4
  21. data/lib/stripe/resources/mandate.rb +3 -0
  22. data/lib/stripe/resources/payment_intent.rb +331 -12
  23. data/lib/stripe/resources/payment_method.rb +17 -9
  24. data/lib/stripe/resources/quote.rb +26 -3
  25. data/lib/stripe/resources/setup_attempt.rb +1 -1
  26. data/lib/stripe/resources/setup_intent.rb +285 -3
  27. data/lib/stripe/resources/subscription.rb +68 -6
  28. data/lib/stripe/resources/subscription_schedule.rb +22 -0
  29. data/lib/stripe/resources/tax/registration.rb +20 -0
  30. data/lib/stripe/resources/terminal/configuration.rb +1 -0
  31. data/lib/stripe/resources/terminal/reader.rb +152 -4
  32. data/lib/stripe/resources/token.rb +1 -1
  33. data/lib/stripe/resources/treasury/financial_account.rb +5 -1
  34. data/lib/stripe/services/account_service.rb +83 -5
  35. data/lib/stripe/services/account_session_service.rb +48 -48
  36. data/lib/stripe/services/billing_portal/session_service.rb +1 -1
  37. data/lib/stripe/services/checkout/session_service.rb +57 -7
  38. data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
  39. data/lib/stripe/services/credit_note_service.rb +6 -6
  40. data/lib/stripe/services/customer_session_service.rb +1 -1
  41. data/lib/stripe/services/identity/verification_session_service.rb +16 -0
  42. data/lib/stripe/services/invoice_service.rb +29 -4
  43. data/lib/stripe/services/payment_intent_service.rb +315 -9
  44. data/lib/stripe/services/payment_method_service.rb +5 -0
  45. data/lib/stripe/services/quote_service.rb +20 -3
  46. data/lib/stripe/services/setup_intent_service.rb +275 -2
  47. data/lib/stripe/services/subscription_schedule_service.rb +13 -0
  48. data/lib/stripe/services/subscription_service.rb +48 -4
  49. data/lib/stripe/services/tax/registration_service.rb +13 -0
  50. data/lib/stripe/services/terminal/reader_service.rb +90 -0
  51. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +6 -1
  52. data/lib/stripe/services/token_service.rb +1 -1
  53. data/lib/stripe/services/treasury/financial_account_service.rb +5 -1
  54. data/lib/stripe/services/v2/billing_service.rb +2 -2
  55. data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
  56. data/lib/stripe/version.rb +1 -1
  57. data/rbi/stripe/resources/account.rbi +78 -9
  58. data/rbi/stripe/resources/account_session.rbi +79 -79
  59. data/rbi/stripe/resources/billing_portal/session.rbi +2 -2
  60. data/rbi/stripe/resources/charge.rbi +32 -15
  61. data/rbi/stripe/resources/checkout/session.rbi +65 -9
  62. data/rbi/stripe/resources/confirmation_token.rbi +23 -12
  63. data/rbi/stripe/resources/credit_note.rbi +9 -9
  64. data/rbi/stripe/resources/customer_session.rbi +2 -2
  65. data/rbi/stripe/resources/event.rbi +1 -1
  66. data/rbi/stripe/resources/identity/verification_session.rbi +39 -1
  67. data/rbi/stripe/resources/invoice.rbi +36 -6
  68. data/rbi/stripe/resources/invoice_item.rbi +1 -4
  69. data/rbi/stripe/resources/mandate.rbi +4 -0
  70. data/rbi/stripe/resources/payment_intent.rbi +361 -21
  71. data/rbi/stripe/resources/payment_method.rbi +19 -10
  72. data/rbi/stripe/resources/quote.rbi +22 -3
  73. data/rbi/stripe/resources/setup_attempt.rbi +1 -1
  74. data/rbi/stripe/resources/setup_intent.rbi +332 -9
  75. data/rbi/stripe/resources/subscription.rbi +60 -7
  76. data/rbi/stripe/resources/subscription_schedule.rbi +23 -1
  77. data/rbi/stripe/resources/tax/registration.rbi +20 -1
  78. data/rbi/stripe/resources/terminal/configuration.rbi +1 -0
  79. data/rbi/stripe/resources/terminal/location.rbi +2 -2
  80. data/rbi/stripe/resources/terminal/reader.rbi +151 -4
  81. data/rbi/stripe/resources/token.rbi +1 -1
  82. data/rbi/stripe/resources/treasury/financial_account.rbi +6 -2
  83. data/rbi/stripe/services/account_service.rbi +77 -9
  84. data/rbi/stripe/services/account_session_service.rbi +48 -48
  85. data/rbi/stripe/services/billing_portal/session_service.rbi +1 -1
  86. data/rbi/stripe/services/checkout/session_service.rbi +65 -9
  87. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +3 -3
  88. data/rbi/stripe/services/credit_note_service.rbi +6 -6
  89. data/rbi/stripe/services/customer_session_service.rbi +1 -1
  90. data/rbi/stripe/services/identity/verification_session_service.rbi +17 -1
  91. data/rbi/stripe/services/invoice_service.rbi +36 -6
  92. data/rbi/stripe/services/payment_intent_service.rbi +348 -18
  93. data/rbi/stripe/services/payment_method_service.rbi +6 -1
  94. data/rbi/stripe/services/quote_service.rbi +16 -3
  95. data/rbi/stripe/services/setup_intent_service.rbi +326 -8
  96. data/rbi/stripe/services/subscription_schedule_service.rbi +12 -1
  97. data/rbi/stripe/services/subscription_service.rbi +41 -5
  98. data/rbi/stripe/services/tax/registration_service.rbi +14 -1
  99. data/rbi/stripe/services/terminal/location_service.rbi +2 -2
  100. data/rbi/stripe/services/terminal/reader_service.rbi +85 -0
  101. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +9 -2
  102. data/rbi/stripe/services/token_service.rbi +1 -1
  103. data/rbi/stripe/services/treasury/financial_account_service.rbi +6 -2
  104. data/rbi/stripe/services/v2/billing_service.rbi +1 -1
  105. data/rbi/stripe/services/v2/core/event_destination_service.rbi +13 -13
  106. metadata +3 -2
@@ -317,6 +317,15 @@ module Stripe
317
317
  end
318
318
  end
319
319
 
320
+ class CryptoPayments < Stripe::RequestParams
321
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
322
+ attr_accessor :requested
323
+
324
+ def initialize(requested: nil)
325
+ @requested = requested
326
+ end
327
+ end
328
+
320
329
  class EpsPayments < Stripe::RequestParams
321
330
  # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
322
331
  attr_accessor :requested
@@ -726,6 +735,8 @@ module Stripe
726
735
  attr_accessor :cartes_bancaires_payments
727
736
  # The cashapp_payments capability.
728
737
  attr_accessor :cashapp_payments
738
+ # The crypto_payments capability.
739
+ attr_accessor :crypto_payments
729
740
  # The eps_payments capability.
730
741
  attr_accessor :eps_payments
731
742
  # The fpx_payments capability.
@@ -828,6 +839,7 @@ module Stripe
828
839
  card_payments: nil,
829
840
  cartes_bancaires_payments: nil,
830
841
  cashapp_payments: nil,
842
+ crypto_payments: nil,
831
843
  eps_payments: nil,
832
844
  fpx_payments: nil,
833
845
  gb_bank_transfer_payments: nil,
@@ -887,6 +899,7 @@ module Stripe
887
899
  @card_payments = card_payments
888
900
  @cartes_bancaires_payments = cartes_bancaires_payments
889
901
  @cashapp_payments = cashapp_payments
902
+ @crypto_payments = crypto_payments
890
903
  @eps_payments = eps_payments
891
904
  @fpx_payments = fpx_payments
892
905
  @gb_bank_transfer_payments = gb_bank_transfer_payments
@@ -1329,6 +1342,15 @@ module Stripe
1329
1342
  end
1330
1343
  end
1331
1344
 
1345
+ class ProofOfAddress < Stripe::RequestParams
1346
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
1347
+ attr_accessor :files
1348
+
1349
+ def initialize(files: nil)
1350
+ @files = files
1351
+ end
1352
+ end
1353
+
1332
1354
  class ProofOfRegistration < Stripe::RequestParams
1333
1355
  # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
1334
1356
  attr_accessor :files
@@ -1358,6 +1380,8 @@ module Stripe
1358
1380
  attr_accessor :company_registration_verification
1359
1381
  # One or more documents that demonstrate proof of a company's tax ID.
1360
1382
  attr_accessor :company_tax_id_verification
1383
+ # One or more documents that demonstrate proof of address.
1384
+ attr_accessor :proof_of_address
1361
1385
  # One or more documents showing the company’s proof of registration with the national business registry.
1362
1386
  attr_accessor :proof_of_registration
1363
1387
  # One or more documents that demonstrate proof of ultimate beneficial ownership.
@@ -1370,6 +1394,7 @@ module Stripe
1370
1394
  company_ministerial_decree: nil,
1371
1395
  company_registration_verification: nil,
1372
1396
  company_tax_id_verification: nil,
1397
+ proof_of_address: nil,
1373
1398
  proof_of_registration: nil,
1374
1399
  proof_of_ultimate_beneficial_ownership: nil
1375
1400
  )
@@ -1379,6 +1404,7 @@ module Stripe
1379
1404
  @company_ministerial_decree = company_ministerial_decree
1380
1405
  @company_registration_verification = company_registration_verification
1381
1406
  @company_tax_id_verification = company_tax_id_verification
1407
+ @proof_of_address = proof_of_address
1382
1408
  @proof_of_registration = proof_of_registration
1383
1409
  @proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership
1384
1410
  end
@@ -1824,14 +1850,27 @@ module Stripe
1824
1850
  attr_accessor :interval
1825
1851
  # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
1826
1852
  attr_accessor :monthly_anchor
1853
+ # The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set.
1854
+ attr_accessor :monthly_payout_days
1827
1855
  # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
1828
1856
  attr_accessor :weekly_anchor
1829
-
1830
- def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil)
1857
+ # The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.)
1858
+ attr_accessor :weekly_payout_days
1859
+
1860
+ def initialize(
1861
+ delay_days: nil,
1862
+ interval: nil,
1863
+ monthly_anchor: nil,
1864
+ monthly_payout_days: nil,
1865
+ weekly_anchor: nil,
1866
+ weekly_payout_days: nil
1867
+ )
1831
1868
  @delay_days = delay_days
1832
1869
  @interval = interval
1833
1870
  @monthly_anchor = monthly_anchor
1871
+ @monthly_payout_days = monthly_payout_days
1834
1872
  @weekly_anchor = weekly_anchor
1873
+ @weekly_payout_days = weekly_payout_days
1835
1874
  end
1836
1875
  end
1837
1876
  # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
@@ -2338,6 +2377,15 @@ module Stripe
2338
2377
  end
2339
2378
  end
2340
2379
 
2380
+ class CryptoPayments < Stripe::RequestParams
2381
+ # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
2382
+ attr_accessor :requested
2383
+
2384
+ def initialize(requested: nil)
2385
+ @requested = requested
2386
+ end
2387
+ end
2388
+
2341
2389
  class EpsPayments < Stripe::RequestParams
2342
2390
  # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
2343
2391
  attr_accessor :requested
@@ -2747,6 +2795,8 @@ module Stripe
2747
2795
  attr_accessor :cartes_bancaires_payments
2748
2796
  # The cashapp_payments capability.
2749
2797
  attr_accessor :cashapp_payments
2798
+ # The crypto_payments capability.
2799
+ attr_accessor :crypto_payments
2750
2800
  # The eps_payments capability.
2751
2801
  attr_accessor :eps_payments
2752
2802
  # The fpx_payments capability.
@@ -2849,6 +2899,7 @@ module Stripe
2849
2899
  card_payments: nil,
2850
2900
  cartes_bancaires_payments: nil,
2851
2901
  cashapp_payments: nil,
2902
+ crypto_payments: nil,
2852
2903
  eps_payments: nil,
2853
2904
  fpx_payments: nil,
2854
2905
  gb_bank_transfer_payments: nil,
@@ -2908,6 +2959,7 @@ module Stripe
2908
2959
  @card_payments = card_payments
2909
2960
  @cartes_bancaires_payments = cartes_bancaires_payments
2910
2961
  @cashapp_payments = cashapp_payments
2962
+ @crypto_payments = crypto_payments
2911
2963
  @eps_payments = eps_payments
2912
2964
  @fpx_payments = fpx_payments
2913
2965
  @gb_bank_transfer_payments = gb_bank_transfer_payments
@@ -3231,7 +3283,7 @@ module Stripe
3231
3283
  attr_accessor :ownership_exemption_reason
3232
3284
  # The company's phone number (used for verification).
3233
3285
  attr_accessor :phone
3234
- # Attribute for param field registration_date
3286
+ # When the business was incorporated or registered.
3235
3287
  attr_accessor :registration_date
3236
3288
  # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
3237
3289
  attr_accessor :registration_number
@@ -3394,6 +3446,15 @@ module Stripe
3394
3446
  end
3395
3447
  end
3396
3448
 
3449
+ class ProofOfAddress < Stripe::RequestParams
3450
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
3451
+ attr_accessor :files
3452
+
3453
+ def initialize(files: nil)
3454
+ @files = files
3455
+ end
3456
+ end
3457
+
3397
3458
  class ProofOfRegistration < Stripe::RequestParams
3398
3459
  # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
3399
3460
  attr_accessor :files
@@ -3423,6 +3484,8 @@ module Stripe
3423
3484
  attr_accessor :company_registration_verification
3424
3485
  # One or more documents that demonstrate proof of a company's tax ID.
3425
3486
  attr_accessor :company_tax_id_verification
3487
+ # One or more documents that demonstrate proof of address.
3488
+ attr_accessor :proof_of_address
3426
3489
  # One or more documents showing the company’s proof of registration with the national business registry.
3427
3490
  attr_accessor :proof_of_registration
3428
3491
  # One or more documents that demonstrate proof of ultimate beneficial ownership.
@@ -3435,6 +3498,7 @@ module Stripe
3435
3498
  company_ministerial_decree: nil,
3436
3499
  company_registration_verification: nil,
3437
3500
  company_tax_id_verification: nil,
3501
+ proof_of_address: nil,
3438
3502
  proof_of_registration: nil,
3439
3503
  proof_of_ultimate_beneficial_ownership: nil
3440
3504
  )
@@ -3444,6 +3508,7 @@ module Stripe
3444
3508
  @company_ministerial_decree = company_ministerial_decree
3445
3509
  @company_registration_verification = company_registration_verification
3446
3510
  @company_tax_id_verification = company_tax_id_verification
3511
+ @proof_of_address = proof_of_address
3447
3512
  @proof_of_registration = proof_of_registration
3448
3513
  @proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership
3449
3514
  end
@@ -3886,14 +3951,27 @@ module Stripe
3886
3951
  attr_accessor :interval
3887
3952
  # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
3888
3953
  attr_accessor :monthly_anchor
3954
+ # The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set.
3955
+ attr_accessor :monthly_payout_days
3889
3956
  # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
3890
3957
  attr_accessor :weekly_anchor
3891
-
3892
- def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil)
3958
+ # The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly` and `weekly_anchor` is not set.)
3959
+ attr_accessor :weekly_payout_days
3960
+
3961
+ def initialize(
3962
+ delay_days: nil,
3963
+ interval: nil,
3964
+ monthly_anchor: nil,
3965
+ monthly_payout_days: nil,
3966
+ weekly_anchor: nil,
3967
+ weekly_payout_days: nil
3968
+ )
3893
3969
  @delay_days = delay_days
3894
3970
  @interval = interval
3895
3971
  @monthly_anchor = monthly_anchor
3972
+ @monthly_payout_days = monthly_payout_days
3896
3973
  @weekly_anchor = weekly_anchor
3974
+ @weekly_payout_days = weekly_payout_days
3897
3975
  end
3898
3976
  end
3899
3977
  # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
@@ -7,9 +7,9 @@ module Stripe
7
7
  class Components < Stripe::RequestParams
8
8
  class AccountManagement < Stripe::RequestParams
9
9
  class Features < Stripe::RequestParams
10
- # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you dont set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
10
+ # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`.
11
11
  attr_accessor :disable_stripe_user_authentication
12
- # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
12
+ # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`.
13
13
  attr_accessor :external_account_collection
14
14
 
15
15
  def initialize(
@@ -33,9 +33,9 @@ module Stripe
33
33
 
34
34
  class AccountOnboarding < Stripe::RequestParams
35
35
  class Features < Stripe::RequestParams
36
- # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you dont set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
36
+ # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`.
37
37
  attr_accessor :disable_stripe_user_authentication
38
- # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
38
+ # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`.
39
39
  attr_accessor :external_account_collection
40
40
 
41
41
  def initialize(
@@ -59,15 +59,15 @@ module Stripe
59
59
 
60
60
  class Balances < Stripe::RequestParams
61
61
  class Features < Stripe::RequestParams
62
- # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you dont set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
62
+ # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`.
63
63
  attr_accessor :disable_stripe_user_authentication
64
- # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
64
+ # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
65
65
  attr_accessor :edit_payout_schedule
66
- # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
66
+ # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`.
67
67
  attr_accessor :external_account_collection
68
- # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
68
+ # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
69
69
  attr_accessor :instant_payouts
70
- # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
70
+ # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
71
71
  attr_accessor :standard_payouts
72
72
 
73
73
  def initialize(
@@ -99,11 +99,11 @@ module Stripe
99
99
  class Features < Stripe::RequestParams
100
100
  # Whether to allow capturing and cancelling payment intents. This is `true` by default.
101
101
  attr_accessor :capture_payments
102
- # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
102
+ # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default.
103
103
  attr_accessor :destination_on_behalf_of_charge_management
104
- # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
104
+ # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default.
105
105
  attr_accessor :dispute_management
106
- # Whether to allow sending refunds. This is `true` by default.
106
+ # Whether sending refunds is enabled. This is `true` by default.
107
107
  attr_accessor :refund_management
108
108
 
109
109
  def initialize(
@@ -144,9 +144,9 @@ module Stripe
144
144
 
145
145
  class FinancialAccount < Stripe::RequestParams
146
146
  class Features < Stripe::RequestParams
147
- # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you dont set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
147
+ # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`.
148
148
  attr_accessor :disable_stripe_user_authentication
149
- # Whether to allow external accounts to be linked for money transfer.
149
+ # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`.
150
150
  attr_accessor :external_account_collection
151
151
  # Whether to allow sending money.
152
152
  attr_accessor :send_money
@@ -238,7 +238,7 @@ module Stripe
238
238
  attr_accessor :card_spend_dispute_management
239
239
  # Whether to allow cardholder management features.
240
240
  attr_accessor :cardholder_management
241
- # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts.
241
+ # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`.
242
242
  attr_accessor :disable_stripe_user_authentication
243
243
  # Whether to allow spend control management features.
244
244
  attr_accessor :spend_control_management
@@ -270,9 +270,9 @@ module Stripe
270
270
 
271
271
  class NotificationBanner < Stripe::RequestParams
272
272
  class Features < Stripe::RequestParams
273
- # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you dont set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
273
+ # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`.
274
274
  attr_accessor :disable_stripe_user_authentication
275
- # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
275
+ # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`.
276
276
  attr_accessor :external_account_collection
277
277
 
278
278
  def initialize(
@@ -298,11 +298,11 @@ module Stripe
298
298
  class Features < Stripe::RequestParams
299
299
  # Whether to allow capturing and cancelling payment intents. This is `true` by default.
300
300
  attr_accessor :capture_payments
301
- # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
301
+ # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default.
302
302
  attr_accessor :destination_on_behalf_of_charge_management
303
- # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
303
+ # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default.
304
304
  attr_accessor :dispute_management
305
- # Whether to allow sending refunds. This is `true` by default.
305
+ # Whether sending refunds is enabled. This is `true` by default.
306
306
  attr_accessor :refund_management
307
307
 
308
308
  def initialize(
@@ -330,11 +330,11 @@ module Stripe
330
330
 
331
331
  class PaymentDisputes < Stripe::RequestParams
332
332
  class Features < Stripe::RequestParams
333
- # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
333
+ # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default.
334
334
  attr_accessor :destination_on_behalf_of_charge_management
335
- # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
335
+ # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default.
336
336
  attr_accessor :dispute_management
337
- # Whether to allow sending refunds. This is `true` by default.
337
+ # Whether sending refunds is enabled. This is `true` by default.
338
338
  attr_accessor :refund_management
339
339
 
340
340
  def initialize(
@@ -362,11 +362,11 @@ module Stripe
362
362
  class Features < Stripe::RequestParams
363
363
  # Whether to allow capturing and cancelling payment intents. This is `true` by default.
364
364
  attr_accessor :capture_payments
365
- # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
365
+ # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default.
366
366
  attr_accessor :destination_on_behalf_of_charge_management
367
- # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
367
+ # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default.
368
368
  attr_accessor :dispute_management
369
- # Whether to allow sending refunds. This is `true` by default.
369
+ # Whether sending refunds is enabled. This is `true` by default.
370
370
  attr_accessor :refund_management
371
371
 
372
372
  def initialize(
@@ -394,15 +394,15 @@ module Stripe
394
394
 
395
395
  class Payouts < Stripe::RequestParams
396
396
  class Features < Stripe::RequestParams
397
- # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you dont set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
397
+ # Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`.
398
398
  attr_accessor :disable_stripe_user_authentication
399
- # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
399
+ # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
400
400
  attr_accessor :edit_payout_schedule
401
- # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
401
+ # Whether external account collection is enabled. This feature can only be `false` for accounts where you’re responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`.
402
402
  attr_accessor :external_account_collection
403
- # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
403
+ # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
404
404
  attr_accessor :instant_payouts
405
- # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
405
+ # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
406
406
  attr_accessor :standard_payouts
407
407
 
408
408
  def initialize(
@@ -468,39 +468,39 @@ module Stripe
468
468
  @features = features
469
469
  end
470
470
  end
471
- # Configuration for the account management embedded component.
471
+ # Configuration for the [account management](/connect/supported-embedded-components/account-management/) embedded component.
472
472
  attr_accessor :account_management
473
- # Configuration for the account onboarding embedded component.
473
+ # Configuration for the [account onboarding](/connect/supported-embedded-components/account-onboarding/) embedded component.
474
474
  attr_accessor :account_onboarding
475
- # Configuration for the balances embedded component.
475
+ # Configuration for the [balances](/connect/supported-embedded-components/balances/) embedded component.
476
476
  attr_accessor :balances
477
- # Configuration for the disputes list embedded component.
477
+ # Configuration for the [disputes list](/connect/supported-embedded-components/disputes-list/) embedded component.
478
478
  attr_accessor :disputes_list
479
- # Configuration for the documents embedded component.
479
+ # Configuration for the [documents](/connect/supported-embedded-components/documents/) embedded component.
480
480
  attr_accessor :documents
481
- # Configuration for the financial account embedded component.
481
+ # Configuration for the [financial account](/connect/supported-embedded-components/financial-account/) embedded component.
482
482
  attr_accessor :financial_account
483
- # Configuration for the financial account transactions embedded component.
483
+ # Configuration for the [financial account transactions](/connect/supported-embedded-components/financial-account-transactions/) embedded component.
484
484
  attr_accessor :financial_account_transactions
485
- # Configuration for the issuing card embedded component.
485
+ # Configuration for the [issuing card](/connect/supported-embedded-components/issuing-card/) embedded component.
486
486
  attr_accessor :issuing_card
487
- # Configuration for the issuing cards list embedded component.
487
+ # Configuration for the [issuing cards list](/connect/supported-embedded-components/issuing-cards-list/) embedded component.
488
488
  attr_accessor :issuing_cards_list
489
- # Configuration for the notification banner embedded component.
489
+ # Configuration for the [notification banner](/connect/supported-embedded-components/notification-banner/) embedded component.
490
490
  attr_accessor :notification_banner
491
- # Configuration for the payment details embedded component.
491
+ # Configuration for the [payment details](/connect/supported-embedded-components/payment-details/) embedded component.
492
492
  attr_accessor :payment_details
493
- # Configuration for the payment disputes embedded component.
493
+ # Configuration for the [payment disputes](/connect/supported-embedded-components/payment-disputes/) embedded component.
494
494
  attr_accessor :payment_disputes
495
- # Configuration for the payments embedded component.
495
+ # Configuration for the [payments](/connect/supported-embedded-components/payments/) embedded component.
496
496
  attr_accessor :payments
497
- # Configuration for the payouts embedded component.
497
+ # Configuration for the [payouts](/connect/supported-embedded-components/payouts/) embedded component.
498
498
  attr_accessor :payouts
499
- # Configuration for the payouts list embedded component.
499
+ # Configuration for the [payouts list](/connect/supported-embedded-components/payouts-list/) embedded component.
500
500
  attr_accessor :payouts_list
501
- # Configuration for the tax registrations embedded component.
501
+ # Configuration for the [tax registrations](/connect/supported-embedded-components/tax-registrations/) embedded component.
502
502
  attr_accessor :tax_registrations
503
- # Configuration for the tax settings embedded component.
503
+ # Configuration for the [tax settings](/connect/supported-embedded-components/tax-settings/) embedded component.
504
504
  attr_accessor :tax_settings
505
505
 
506
506
  def initialize(
@@ -105,7 +105,7 @@ module Stripe
105
105
  @quantity = quantity
106
106
  end
107
107
  end
108
- # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
108
+ # The coupon or promotion code to apply to this subscription update.
109
109
  attr_accessor :discounts
110
110
  # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
111
111
  attr_accessor :items
@@ -1161,6 +1161,43 @@ module Stripe
1161
1161
  end
1162
1162
 
1163
1163
  class Klarna < Stripe::RequestParams
1164
+ class Subscription < Stripe::RequestParams
1165
+ class NextBilling < Stripe::RequestParams
1166
+ # The amount of the next charge for the subscription.
1167
+ attr_accessor :amount
1168
+ # The date of the next charge for the subscription in YYYY-MM-DD format.
1169
+ attr_accessor :date
1170
+
1171
+ def initialize(amount: nil, date: nil)
1172
+ @amount = amount
1173
+ @date = date
1174
+ end
1175
+ end
1176
+ # Unit of time between subscription charges.
1177
+ attr_accessor :interval
1178
+ # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
1179
+ attr_accessor :interval_count
1180
+ # Name for subscription.
1181
+ attr_accessor :name
1182
+ # Describes the upcoming charge for this subscription.
1183
+ attr_accessor :next_billing
1184
+ # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
1185
+ attr_accessor :reference
1186
+
1187
+ def initialize(
1188
+ interval: nil,
1189
+ interval_count: nil,
1190
+ name: nil,
1191
+ next_billing: nil,
1192
+ reference: nil
1193
+ )
1194
+ @interval = interval
1195
+ @interval_count = interval_count
1196
+ @name = name
1197
+ @next_billing = next_billing
1198
+ @reference = reference
1199
+ end
1200
+ end
1164
1201
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1165
1202
  #
1166
1203
  # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
@@ -1169,9 +1206,12 @@ module Stripe
1169
1206
  #
1170
1207
  # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
1171
1208
  attr_accessor :setup_future_usage
1209
+ # Subscription details if the Checkout Session sets up a future subscription.
1210
+ attr_accessor :subscriptions
1172
1211
 
1173
- def initialize(setup_future_usage: nil)
1212
+ def initialize(setup_future_usage: nil, subscriptions: nil)
1174
1213
  @setup_future_usage = setup_future_usage
1214
+ @subscriptions = subscriptions
1175
1215
  end
1176
1216
  end
1177
1217
 
@@ -1854,6 +1894,15 @@ module Stripe
1854
1894
  end
1855
1895
 
1856
1896
  class SubscriptionData < Stripe::RequestParams
1897
+ class BillingMode < Stripe::RequestParams
1898
+ # Attribute for param field type
1899
+ attr_accessor :type
1900
+
1901
+ def initialize(type: nil)
1902
+ @type = type
1903
+ end
1904
+ end
1905
+
1857
1906
  class InvoiceSettings < Stripe::RequestParams
1858
1907
  class Issuer < Stripe::RequestParams
1859
1908
  # The connected account being referenced when `type` is `account`.
@@ -1906,6 +1955,8 @@ module Stripe
1906
1955
  attr_accessor :application_fee_percent
1907
1956
  # A future timestamp to anchor the subscription's billing cycle for new subscriptions.
1908
1957
  attr_accessor :billing_cycle_anchor
1958
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1959
+ attr_accessor :billing_mode
1909
1960
  # The tax rates that will apply to any subscription item that does not have
1910
1961
  # `tax_rates` set. Invoices created will have their `default_tax_rates` populated
1911
1962
  # from the subscription.
@@ -1924,12 +1975,9 @@ module Stripe
1924
1975
  attr_accessor :proration_behavior
1925
1976
  # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
1926
1977
  attr_accessor :transfer_data
1927
- # Unix timestamp representing the end of the trial period the customer
1928
- # will get before being charged for the first time. Has to be at least
1929
- # 48 hours in the future.
1978
+ # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future.
1930
1979
  attr_accessor :trial_end
1931
- # Integer representing the number of trial period days before the
1932
- # customer is charged for the first time. Has to be at least 1.
1980
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
1933
1981
  attr_accessor :trial_period_days
1934
1982
  # Settings related to subscription trials.
1935
1983
  attr_accessor :trial_settings
@@ -1937,6 +1985,7 @@ module Stripe
1937
1985
  def initialize(
1938
1986
  application_fee_percent: nil,
1939
1987
  billing_cycle_anchor: nil,
1988
+ billing_mode: nil,
1940
1989
  default_tax_rates: nil,
1941
1990
  description: nil,
1942
1991
  invoice_settings: nil,
@@ -1950,6 +1999,7 @@ module Stripe
1950
1999
  )
1951
2000
  @application_fee_percent = application_fee_percent
1952
2001
  @billing_cycle_anchor = billing_cycle_anchor
2002
+ @billing_mode = billing_mode
1953
2003
  @default_tax_rates = default_tax_rates
1954
2004
  @description = description
1955
2005
  @invoice_settings = invoice_settings
@@ -2053,7 +2103,7 @@ module Stripe
2053
2103
  attr_accessor :expires_at
2054
2104
  # Generate a post-purchase Invoice for one-time payments.
2055
2105
  attr_accessor :invoice_creation
2056
- # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
2106
+ # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). The parameter is required for `payment` and `subscription` mode.
2057
2107
  #
2058
2108
  # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
2059
2109
  #
@@ -81,7 +81,7 @@ module Stripe
81
81
  @shipping_rate = shipping_rate
82
82
  end
83
83
  end
84
- # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
84
+ # The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
85
85
  attr_accessor :amount
86
86
  # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
87
87
  attr_accessor :credit_amount
@@ -97,7 +97,7 @@ module Stripe
97
97
  attr_accessor :invoice
98
98
  # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
99
99
  attr_accessor :limit
100
- # Line items that make up the credit note.
100
+ # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
101
101
  attr_accessor :lines
102
102
  # The credit note's memo appears on the credit note PDF.
103
103
  attr_accessor :memo
@@ -111,7 +111,7 @@ module Stripe
111
111
  attr_accessor :refund_amount
112
112
  # Refunds to link to this credit note.
113
113
  attr_accessor :refunds
114
- # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
114
+ # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
115
115
  attr_accessor :shipping_cost
116
116
  # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
117
117
  attr_accessor :starting_after