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
@@ -124,6 +124,8 @@ module Stripe
124
124
  attr_reader :cartes_bancaires_payments
125
125
  # The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments.
126
126
  attr_reader :cashapp_payments
127
+ # The status of the Crypto capability of the account, or whether the account can directly process Crypto payments.
128
+ attr_reader :crypto_payments
127
129
  # The status of the EPS payments capability of the account, or whether the account can directly process EPS charges.
128
130
  attr_reader :eps_payments
129
131
  # The status of the FPX payments capability of the account, or whether the account can directly process FPX charges.
@@ -531,8 +533,12 @@ module Stripe
531
533
  attr_reader :interval
532
534
  # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.
533
535
  attr_reader :monthly_anchor
536
+ # The days of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.
537
+ attr_reader :monthly_payout_days
534
538
  # The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly.
535
539
  attr_reader :weekly_anchor
540
+ # The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly.
541
+ attr_reader :weekly_payout_days
536
542
  end
537
543
  # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`.
538
544
  attr_reader :debit_negative_balances
@@ -887,6 +893,15 @@ module Stripe
887
893
  end
888
894
  end
889
895
 
896
+ class CryptoPayments < Stripe::RequestParams
897
+ # 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.
898
+ attr_accessor :requested
899
+
900
+ def initialize(requested: nil)
901
+ @requested = requested
902
+ end
903
+ end
904
+
890
905
  class EpsPayments < Stripe::RequestParams
891
906
  # 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.
892
907
  attr_accessor :requested
@@ -1296,6 +1311,8 @@ module Stripe
1296
1311
  attr_accessor :cartes_bancaires_payments
1297
1312
  # The cashapp_payments capability.
1298
1313
  attr_accessor :cashapp_payments
1314
+ # The crypto_payments capability.
1315
+ attr_accessor :crypto_payments
1299
1316
  # The eps_payments capability.
1300
1317
  attr_accessor :eps_payments
1301
1318
  # The fpx_payments capability.
@@ -1398,6 +1415,7 @@ module Stripe
1398
1415
  card_payments: nil,
1399
1416
  cartes_bancaires_payments: nil,
1400
1417
  cashapp_payments: nil,
1418
+ crypto_payments: nil,
1401
1419
  eps_payments: nil,
1402
1420
  fpx_payments: nil,
1403
1421
  gb_bank_transfer_payments: nil,
@@ -1457,6 +1475,7 @@ module Stripe
1457
1475
  @card_payments = card_payments
1458
1476
  @cartes_bancaires_payments = cartes_bancaires_payments
1459
1477
  @cashapp_payments = cashapp_payments
1478
+ @crypto_payments = crypto_payments
1460
1479
  @eps_payments = eps_payments
1461
1480
  @fpx_payments = fpx_payments
1462
1481
  @gb_bank_transfer_payments = gb_bank_transfer_payments
@@ -1899,6 +1918,15 @@ module Stripe
1899
1918
  end
1900
1919
  end
1901
1920
 
1921
+ class ProofOfAddress < Stripe::RequestParams
1922
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
1923
+ attr_accessor :files
1924
+
1925
+ def initialize(files: nil)
1926
+ @files = files
1927
+ end
1928
+ end
1929
+
1902
1930
  class ProofOfRegistration < Stripe::RequestParams
1903
1931
  # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
1904
1932
  attr_accessor :files
@@ -1928,6 +1956,8 @@ module Stripe
1928
1956
  attr_accessor :company_registration_verification
1929
1957
  # One or more documents that demonstrate proof of a company's tax ID.
1930
1958
  attr_accessor :company_tax_id_verification
1959
+ # One or more documents that demonstrate proof of address.
1960
+ attr_accessor :proof_of_address
1931
1961
  # One or more documents showing the company’s proof of registration with the national business registry.
1932
1962
  attr_accessor :proof_of_registration
1933
1963
  # One or more documents that demonstrate proof of ultimate beneficial ownership.
@@ -1940,6 +1970,7 @@ module Stripe
1940
1970
  company_ministerial_decree: nil,
1941
1971
  company_registration_verification: nil,
1942
1972
  company_tax_id_verification: nil,
1973
+ proof_of_address: nil,
1943
1974
  proof_of_registration: nil,
1944
1975
  proof_of_ultimate_beneficial_ownership: nil
1945
1976
  )
@@ -1949,6 +1980,7 @@ module Stripe
1949
1980
  @company_ministerial_decree = company_ministerial_decree
1950
1981
  @company_registration_verification = company_registration_verification
1951
1982
  @company_tax_id_verification = company_tax_id_verification
1983
+ @proof_of_address = proof_of_address
1952
1984
  @proof_of_registration = proof_of_registration
1953
1985
  @proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership
1954
1986
  end
@@ -2394,14 +2426,27 @@ module Stripe
2394
2426
  attr_accessor :interval
2395
2427
  # 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`.
2396
2428
  attr_accessor :monthly_anchor
2429
+ # 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.
2430
+ attr_accessor :monthly_payout_days
2397
2431
  # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
2398
2432
  attr_accessor :weekly_anchor
2399
-
2400
- def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil)
2433
+ # 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.)
2434
+ attr_accessor :weekly_payout_days
2435
+
2436
+ def initialize(
2437
+ delay_days: nil,
2438
+ interval: nil,
2439
+ monthly_anchor: nil,
2440
+ monthly_payout_days: nil,
2441
+ weekly_anchor: nil,
2442
+ weekly_payout_days: nil
2443
+ )
2401
2444
  @delay_days = delay_days
2402
2445
  @interval = interval
2403
2446
  @monthly_anchor = monthly_anchor
2447
+ @monthly_payout_days = monthly_payout_days
2404
2448
  @weekly_anchor = weekly_anchor
2449
+ @weekly_payout_days = weekly_payout_days
2405
2450
  end
2406
2451
  end
2407
2452
  # 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).
@@ -2899,6 +2944,15 @@ module Stripe
2899
2944
  end
2900
2945
  end
2901
2946
 
2947
+ class CryptoPayments < Stripe::RequestParams
2948
+ # 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.
2949
+ attr_accessor :requested
2950
+
2951
+ def initialize(requested: nil)
2952
+ @requested = requested
2953
+ end
2954
+ end
2955
+
2902
2956
  class EpsPayments < Stripe::RequestParams
2903
2957
  # 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.
2904
2958
  attr_accessor :requested
@@ -3308,6 +3362,8 @@ module Stripe
3308
3362
  attr_accessor :cartes_bancaires_payments
3309
3363
  # The cashapp_payments capability.
3310
3364
  attr_accessor :cashapp_payments
3365
+ # The crypto_payments capability.
3366
+ attr_accessor :crypto_payments
3311
3367
  # The eps_payments capability.
3312
3368
  attr_accessor :eps_payments
3313
3369
  # The fpx_payments capability.
@@ -3410,6 +3466,7 @@ module Stripe
3410
3466
  card_payments: nil,
3411
3467
  cartes_bancaires_payments: nil,
3412
3468
  cashapp_payments: nil,
3469
+ crypto_payments: nil,
3413
3470
  eps_payments: nil,
3414
3471
  fpx_payments: nil,
3415
3472
  gb_bank_transfer_payments: nil,
@@ -3469,6 +3526,7 @@ module Stripe
3469
3526
  @card_payments = card_payments
3470
3527
  @cartes_bancaires_payments = cartes_bancaires_payments
3471
3528
  @cashapp_payments = cashapp_payments
3529
+ @crypto_payments = crypto_payments
3472
3530
  @eps_payments = eps_payments
3473
3531
  @fpx_payments = fpx_payments
3474
3532
  @gb_bank_transfer_payments = gb_bank_transfer_payments
@@ -3792,7 +3850,7 @@ module Stripe
3792
3850
  attr_accessor :ownership_exemption_reason
3793
3851
  # The company's phone number (used for verification).
3794
3852
  attr_accessor :phone
3795
- # Attribute for param field registration_date
3853
+ # When the business was incorporated or registered.
3796
3854
  attr_accessor :registration_date
3797
3855
  # 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).
3798
3856
  attr_accessor :registration_number
@@ -3955,6 +4013,15 @@ module Stripe
3955
4013
  end
3956
4014
  end
3957
4015
 
4016
+ class ProofOfAddress < Stripe::RequestParams
4017
+ # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
4018
+ attr_accessor :files
4019
+
4020
+ def initialize(files: nil)
4021
+ @files = files
4022
+ end
4023
+ end
4024
+
3958
4025
  class ProofOfRegistration < Stripe::RequestParams
3959
4026
  # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`.
3960
4027
  attr_accessor :files
@@ -3984,6 +4051,8 @@ module Stripe
3984
4051
  attr_accessor :company_registration_verification
3985
4052
  # One or more documents that demonstrate proof of a company's tax ID.
3986
4053
  attr_accessor :company_tax_id_verification
4054
+ # One or more documents that demonstrate proof of address.
4055
+ attr_accessor :proof_of_address
3987
4056
  # One or more documents showing the company’s proof of registration with the national business registry.
3988
4057
  attr_accessor :proof_of_registration
3989
4058
  # One or more documents that demonstrate proof of ultimate beneficial ownership.
@@ -3996,6 +4065,7 @@ module Stripe
3996
4065
  company_ministerial_decree: nil,
3997
4066
  company_registration_verification: nil,
3998
4067
  company_tax_id_verification: nil,
4068
+ proof_of_address: nil,
3999
4069
  proof_of_registration: nil,
4000
4070
  proof_of_ultimate_beneficial_ownership: nil
4001
4071
  )
@@ -4005,6 +4075,7 @@ module Stripe
4005
4075
  @company_ministerial_decree = company_ministerial_decree
4006
4076
  @company_registration_verification = company_registration_verification
4007
4077
  @company_tax_id_verification = company_tax_id_verification
4078
+ @proof_of_address = proof_of_address
4008
4079
  @proof_of_registration = proof_of_registration
4009
4080
  @proof_of_ultimate_beneficial_ownership = proof_of_ultimate_beneficial_ownership
4010
4081
  end
@@ -4447,14 +4518,27 @@ module Stripe
4447
4518
  attr_accessor :interval
4448
4519
  # 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`.
4449
4520
  attr_accessor :monthly_anchor
4521
+ # 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.
4522
+ attr_accessor :monthly_payout_days
4450
4523
  # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.)
4451
4524
  attr_accessor :weekly_anchor
4452
-
4453
- def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil)
4525
+ # 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.)
4526
+ attr_accessor :weekly_payout_days
4527
+
4528
+ def initialize(
4529
+ delay_days: nil,
4530
+ interval: nil,
4531
+ monthly_anchor: nil,
4532
+ monthly_payout_days: nil,
4533
+ weekly_anchor: nil,
4534
+ weekly_payout_days: nil
4535
+ )
4454
4536
  @delay_days = delay_days
4455
4537
  @interval = interval
4456
4538
  @monthly_anchor = monthly_anchor
4539
+ @monthly_payout_days = monthly_payout_days
4457
4540
  @weekly_anchor = weekly_anchor
4541
+ @weekly_payout_days = weekly_payout_days
4458
4542
  end
4459
4543
  end
4460
4544
  # 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).