stripe 15.3.0.pre.beta.2 → 15.4.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 (86) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -0
  3. data/CHANGELOG.md +42 -16
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +13 -49
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_requestor.rb +2 -2
  8. data/lib/stripe/api_version.rb +1 -1
  9. data/lib/stripe/errors.rb +3 -3
  10. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +1 -1
  11. data/lib/stripe/resources/account.rb +89 -5
  12. data/lib/stripe/resources/account_session.rb +93 -93
  13. data/lib/stripe/resources/billing_portal/session.rb +2 -2
  14. data/lib/stripe/resources/charge.rb +28 -15
  15. data/lib/stripe/resources/checkout/session.rb +53 -7
  16. data/lib/stripe/resources/confirmation_token.rb +19 -11
  17. data/lib/stripe/resources/credit_note.rb +9 -9
  18. data/lib/stripe/resources/customer_session.rb +2 -2
  19. data/lib/stripe/resources/dispute.rb +2 -0
  20. data/lib/stripe/resources/event.rb +1 -1
  21. data/lib/stripe/resources/identity/verification_session.rb +34 -0
  22. data/lib/stripe/resources/invoice.rb +21 -3
  23. data/lib/stripe/resources/invoice_item.rb +1 -4
  24. data/lib/stripe/resources/mandate.rb +3 -0
  25. data/lib/stripe/resources/order.rb +154 -2
  26. data/lib/stripe/resources/payment_attempt_record.rb +30 -17
  27. data/lib/stripe/resources/payment_intent.rb +331 -12
  28. data/lib/stripe/resources/payment_method.rb +17 -9
  29. data/lib/stripe/resources/payment_record.rb +30 -17
  30. data/lib/stripe/resources/quote.rb +15 -1
  31. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +8 -1
  32. data/lib/stripe/resources/setup_attempt.rb +1 -1
  33. data/lib/stripe/resources/setup_intent.rb +285 -3
  34. data/lib/stripe/resources/subscription.rb +27 -10
  35. data/lib/stripe/resources/subscription_schedule.rb +17 -1
  36. data/lib/stripe/resources/tax/registration.rb +20 -0
  37. data/lib/stripe/resources/terminal/configuration.rb +1 -0
  38. data/lib/stripe/resources/terminal/reader.rb +10 -10
  39. data/lib/stripe/resources/token.rb +1 -1
  40. data/lib/stripe/resources/treasury/financial_account.rb +5 -1
  41. data/lib/stripe/resources/v2/core/account.rb +9 -0
  42. data/lib/stripe/resources/v2/money_management/financial_account.rb +3 -3
  43. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +1 -1
  44. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +1 -1
  45. data/lib/stripe/resources/v2/money_management/received_credit.rb +8 -2
  46. data/lib/stripe/services/account_service.rb +83 -5
  47. data/lib/stripe/services/account_session_service.rb +62 -62
  48. data/lib/stripe/services/billing_portal/session_service.rb +1 -1
  49. data/lib/stripe/services/checkout/session_service.rb +53 -7
  50. data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
  51. data/lib/stripe/services/credit_note_service.rb +6 -6
  52. data/lib/stripe/services/customer_session_service.rb +1 -1
  53. data/lib/stripe/services/identity/verification_session_service.rb +16 -0
  54. data/lib/stripe/services/invoice_service.rb +21 -3
  55. data/lib/stripe/services/order_service.rb +154 -2
  56. data/lib/stripe/services/payment_intent_service.rb +315 -9
  57. data/lib/stripe/services/payment_method_service.rb +5 -0
  58. data/lib/stripe/services/quote_service.rb +9 -0
  59. data/lib/stripe/services/setup_intent_service.rb +275 -2
  60. data/lib/stripe/services/subscription_schedule_service.rb +9 -0
  61. data/lib/stripe/services/subscription_service.rb +21 -4
  62. data/lib/stripe/services/tax/registration_service.rb +13 -0
  63. data/lib/stripe/services/terminal/reader_service.rb +4 -4
  64. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +6 -1
  65. data/lib/stripe/services/token_service.rb +1 -1
  66. data/lib/stripe/services/treasury/financial_account_service.rb +5 -1
  67. data/lib/stripe/services/v2/billing_service.rb +2 -2
  68. data/lib/stripe/services/v2/core/account_service.rb +47 -15
  69. data/lib/stripe/services/v2/core/accounts/person_service.rb +9 -10
  70. data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
  71. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +4 -5
  72. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +2 -2
  73. data/lib/stripe/services/v2/core_service.rb +2 -2
  74. data/lib/stripe/services/v2/money_management/financial_address_service.rb +13 -12
  75. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +36 -36
  76. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +44 -45
  77. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +10 -10
  78. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +41 -41
  79. data/lib/stripe/services/v2/money_management/payout_method_service.rb +1 -2
  80. data/lib/stripe/services/v2/money_management_service.rb +4 -4
  81. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +9 -10
  82. data/lib/stripe/services/v2_services.rb +3 -3
  83. data/lib/stripe/version.rb +1 -1
  84. data/lib/stripe/webhook.rb +1 -1
  85. data/rbi/stripe.rbi +14445 -12226
  86. metadata +3 -2
@@ -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,7 +59,7 @@ module Stripe
59
59
 
60
60
  class AppInstall < Stripe::RequestParams
61
61
  class Features < Stripe::RequestParams
62
- # List of apps allowed to be enabled for this account session.
62
+ # The list of apps allowed to be enabled in the embedded component.
63
63
  attr_accessor :allowed_apps
64
64
 
65
65
  def initialize(allowed_apps: nil)
@@ -79,7 +79,7 @@ module Stripe
79
79
 
80
80
  class AppViewport < Stripe::RequestParams
81
81
  class Features < Stripe::RequestParams
82
- # List of apps allowed to be enabled for this account session.
82
+ # The list of apps allowed to be enabled in the embedded component.
83
83
  attr_accessor :allowed_apps
84
84
 
85
85
  def initialize(allowed_apps: nil)
@@ -99,15 +99,15 @@ module Stripe
99
99
 
100
100
  class Balances < Stripe::RequestParams
101
101
  class Features < Stripe::RequestParams
102
- # 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.
102
+ # 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`.
103
103
  attr_accessor :disable_stripe_user_authentication
104
- # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
104
+ # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
105
105
  attr_accessor :edit_payout_schedule
106
- # 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`.
106
+ # 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`.
107
107
  attr_accessor :external_account_collection
108
- # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
108
+ # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
109
109
  attr_accessor :instant_payouts
110
- # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
110
+ # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
111
111
  attr_accessor :standard_payouts
112
112
 
113
113
  def initialize(
@@ -191,11 +191,11 @@ module Stripe
191
191
  class Features < Stripe::RequestParams
192
192
  # Whether to allow capturing and cancelling payment intents. This is `true` by default.
193
193
  attr_accessor :capture_payments
194
- # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
194
+ # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default.
195
195
  attr_accessor :destination_on_behalf_of_charge_management
196
- # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
196
+ # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default.
197
197
  attr_accessor :dispute_management
198
- # Whether to allow sending refunds. This is `true` by default.
198
+ # Whether sending refunds is enabled. This is `true` by default.
199
199
  attr_accessor :refund_management
200
200
 
201
201
  def initialize(
@@ -249,9 +249,9 @@ module Stripe
249
249
 
250
250
  class FinancialAccount < Stripe::RequestParams
251
251
  class Features < Stripe::RequestParams
252
- # 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.
252
+ # 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`.
253
253
  attr_accessor :disable_stripe_user_authentication
254
- # Whether to allow external accounts to be linked for money transfer.
254
+ # 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`.
255
255
  attr_accessor :external_account_collection
256
256
  # Whether to allow sending money.
257
257
  attr_accessor :send_money
@@ -343,7 +343,7 @@ module Stripe
343
343
  attr_accessor :card_spend_dispute_management
344
344
  # Whether to allow cardholder management features.
345
345
  attr_accessor :cardholder_management
346
- # 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.
346
+ # 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`.
347
347
  attr_accessor :disable_stripe_user_authentication
348
348
  # Whether to allow spend control management features.
349
349
  attr_accessor :spend_control_management
@@ -375,9 +375,9 @@ module Stripe
375
375
 
376
376
  class NotificationBanner < Stripe::RequestParams
377
377
  class Features < Stripe::RequestParams
378
- # 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.
378
+ # 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`.
379
379
  attr_accessor :disable_stripe_user_authentication
380
- # 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`.
380
+ # 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`.
381
381
  attr_accessor :external_account_collection
382
382
 
383
383
  def initialize(
@@ -403,11 +403,11 @@ module Stripe
403
403
  class Features < Stripe::RequestParams
404
404
  # Whether to allow capturing and cancelling payment intents. This is `true` by default.
405
405
  attr_accessor :capture_payments
406
- # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
406
+ # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default.
407
407
  attr_accessor :destination_on_behalf_of_charge_management
408
- # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
408
+ # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default.
409
409
  attr_accessor :dispute_management
410
- # Whether to allow sending refunds. This is `true` by default.
410
+ # Whether sending refunds is enabled. This is `true` by default.
411
411
  attr_accessor :refund_management
412
412
 
413
413
  def initialize(
@@ -435,11 +435,11 @@ module Stripe
435
435
 
436
436
  class PaymentDisputes < Stripe::RequestParams
437
437
  class Features < Stripe::RequestParams
438
- # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
438
+ # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default.
439
439
  attr_accessor :destination_on_behalf_of_charge_management
440
- # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
440
+ # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default.
441
441
  attr_accessor :dispute_management
442
- # Whether to allow sending refunds. This is `true` by default.
442
+ # Whether sending refunds is enabled. This is `true` by default.
443
443
  attr_accessor :refund_management
444
444
 
445
445
  def initialize(
@@ -480,11 +480,11 @@ module Stripe
480
480
  class Features < Stripe::RequestParams
481
481
  # Whether to allow capturing and cancelling payment intents. This is `true` by default.
482
482
  attr_accessor :capture_payments
483
- # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
483
+ # Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default.
484
484
  attr_accessor :destination_on_behalf_of_charge_management
485
- # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
485
+ # Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default.
486
486
  attr_accessor :dispute_management
487
- # Whether to allow sending refunds. This is `true` by default.
487
+ # Whether sending refunds is enabled. This is `true` by default.
488
488
  attr_accessor :refund_management
489
489
 
490
490
  def initialize(
@@ -512,15 +512,15 @@ module Stripe
512
512
 
513
513
  class Payouts < Stripe::RequestParams
514
514
  class Features < Stripe::RequestParams
515
- # 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.
515
+ # 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`.
516
516
  attr_accessor :disable_stripe_user_authentication
517
- # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
517
+ # Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
518
518
  attr_accessor :edit_payout_schedule
519
- # 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`.
519
+ # 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`.
520
520
  attr_accessor :external_account_collection
521
- # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
521
+ # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
522
522
  attr_accessor :instant_payouts
523
- # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
523
+ # Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
524
524
  attr_accessor :standard_payouts
525
525
 
526
526
  def initialize(
@@ -645,63 +645,63 @@ module Stripe
645
645
  @features = features
646
646
  end
647
647
  end
648
- # Configuration for the account management embedded component.
648
+ # Configuration for the [account management](/connect/supported-embedded-components/account-management/) embedded component.
649
649
  attr_accessor :account_management
650
- # Configuration for the account onboarding embedded component.
650
+ # Configuration for the [account onboarding](/connect/supported-embedded-components/account-onboarding/) embedded component.
651
651
  attr_accessor :account_onboarding
652
- # Configuration for the app install component.
652
+ # Configuration for the [app install](/connect/supported-embedded-components/app-install/) embedded component.
653
653
  attr_accessor :app_install
654
- # Configuration for the app viewport component.
654
+ # Configuration for the [app viewport](/connect/supported-embedded-components/app-viewport/) embedded component.
655
655
  attr_accessor :app_viewport
656
- # Configuration for the balances embedded component.
656
+ # Configuration for the [balances](/connect/supported-embedded-components/balances/) embedded component.
657
657
  attr_accessor :balances
658
- # Configuration for the capital financing embedded component.
658
+ # Configuration for the [Capital financing](/connect/supported-embedded-components/capital-financing/) embedded component.
659
659
  attr_accessor :capital_financing
660
- # Configuration for the capital financing application embedded component.
660
+ # Configuration for the [Capital financing application](/connect/supported-embedded-components/capital-financing-application/) embedded component.
661
661
  attr_accessor :capital_financing_application
662
- # Configuration for the capital financing promotion embedded component.
662
+ # Configuration for the [Capital financing promotion](/connect/supported-embedded-components/capital-financing-promotion/) embedded component.
663
663
  attr_accessor :capital_financing_promotion
664
- # Configuration for the capital overview embedded component.
664
+ # Configuration for the [Capital overview](/connect/supported-embedded-components/capital-overview/) embedded component.
665
665
  attr_accessor :capital_overview
666
- # Configuration for the disputes list embedded component.
666
+ # Configuration for the [disputes list](/connect/supported-embedded-components/disputes-list/) embedded component.
667
667
  attr_accessor :disputes_list
668
- # Configuration for the documents embedded component.
668
+ # Configuration for the [documents](/connect/supported-embedded-components/documents/) embedded component.
669
669
  attr_accessor :documents
670
- # Configuration for the export tax transactions embedded component.
670
+ # Configuration for the [export tax transactions](/connect/supported-embedded-components/export-tax-transactions/) embedded component.
671
671
  attr_accessor :export_tax_transactions
672
- # Configuration for the financial account embedded component.
672
+ # Configuration for the [financial account](/connect/supported-embedded-components/financial-account/) embedded component.
673
673
  attr_accessor :financial_account
674
- # Configuration for the financial account transactions embedded component.
674
+ # Configuration for the [financial account transactions](/connect/supported-embedded-components/financial-account-transactions/) embedded component.
675
675
  attr_accessor :financial_account_transactions
676
- # Configuration for the issuing card embedded component.
676
+ # Configuration for the [issuing card](/connect/supported-embedded-components/issuing-card/) embedded component.
677
677
  attr_accessor :issuing_card
678
- # Configuration for the issuing cards list embedded component.
678
+ # Configuration for the [issuing cards list](/connect/supported-embedded-components/issuing-cards-list/) embedded component.
679
679
  attr_accessor :issuing_cards_list
680
- # Configuration for the notification banner embedded component.
680
+ # Configuration for the [notification banner](/connect/supported-embedded-components/notification-banner/) embedded component.
681
681
  attr_accessor :notification_banner
682
- # Configuration for the payment details embedded component.
682
+ # Configuration for the [payment details](/connect/supported-embedded-components/payment-details/) embedded component.
683
683
  attr_accessor :payment_details
684
- # Configuration for the payment disputes embedded component.
684
+ # Configuration for the [payment disputes](/connect/supported-embedded-components/payment-disputes/) embedded component.
685
685
  attr_accessor :payment_disputes
686
- # Configuration for the payment method settings embedded component.
686
+ # Configuration for the [payment method settings](/connect/supported-embedded-components/payment-method-settings/) embedded component.
687
687
  attr_accessor :payment_method_settings
688
- # Configuration for the payments embedded component.
688
+ # Configuration for the [payments](/connect/supported-embedded-components/payments/) embedded component.
689
689
  attr_accessor :payments
690
- # Configuration for the payouts embedded component.
690
+ # Configuration for the [payouts](/connect/supported-embedded-components/payouts/) embedded component.
691
691
  attr_accessor :payouts
692
- # Configuration for the payouts list embedded component.
692
+ # Configuration for the [payouts list](/connect/supported-embedded-components/payouts-list/) embedded component.
693
693
  attr_accessor :payouts_list
694
- # Configuration for the product tax code selector embedded component.
694
+ # Configuration for the [product tax code selector](/connect/supported-embedded-components/product-tax-code-selector/) embedded component.
695
695
  attr_accessor :product_tax_code_selector
696
- # Configuration for the recipients component.
696
+ # Configuration for the [recipients](/connect/supported-embedded-components/recipients/) embedded component.
697
697
  attr_accessor :recipients
698
- # Configuration for the reporting chart embedded component.
698
+ # Configuration for the [reporting chart](/connect/supported-embedded-components/reporting-chart/) embedded component.
699
699
  attr_accessor :reporting_chart
700
- # Configuration for the tax registrations embedded component.
700
+ # Configuration for the [tax registrations](/connect/supported-embedded-components/tax-registrations/) embedded component.
701
701
  attr_accessor :tax_registrations
702
- # Configuration for the tax settings embedded component.
702
+ # Configuration for the [tax settings](/connect/supported-embedded-components/tax-settings/) embedded component.
703
703
  attr_accessor :tax_settings
704
- # Configuration for the tax threshold monitoring embedded component.
704
+ # Configuration for the [tax threshold monitoring](/connect/supported-embedded-components/tax-threshold-monitoring/) embedded component.
705
705
  attr_accessor :tax_threshold_monitoring
706
706
 
707
707
  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
@@ -1173,6 +1173,43 @@ module Stripe
1173
1173
  end
1174
1174
 
1175
1175
  class Klarna < Stripe::RequestParams
1176
+ class Subscription < Stripe::RequestParams
1177
+ class NextBilling < Stripe::RequestParams
1178
+ # The amount of the next charge for the subscription.
1179
+ attr_accessor :amount
1180
+ # The date of the next charge for the subscription in YYYY-MM-DD format.
1181
+ attr_accessor :date
1182
+
1183
+ def initialize(amount: nil, date: nil)
1184
+ @amount = amount
1185
+ @date = date
1186
+ end
1187
+ end
1188
+ # Unit of time between subscription charges.
1189
+ attr_accessor :interval
1190
+ # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
1191
+ attr_accessor :interval_count
1192
+ # Name for subscription.
1193
+ attr_accessor :name
1194
+ # Describes the upcoming charge for this subscription.
1195
+ attr_accessor :next_billing
1196
+ # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
1197
+ attr_accessor :reference
1198
+
1199
+ def initialize(
1200
+ interval: nil,
1201
+ interval_count: nil,
1202
+ name: nil,
1203
+ next_billing: nil,
1204
+ reference: nil
1205
+ )
1206
+ @interval = interval
1207
+ @interval_count = interval_count
1208
+ @name = name
1209
+ @next_billing = next_billing
1210
+ @reference = reference
1211
+ end
1212
+ end
1176
1213
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1177
1214
  #
1178
1215
  # 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.
@@ -1181,9 +1218,12 @@ module Stripe
1181
1218
  #
1182
1219
  # 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).
1183
1220
  attr_accessor :setup_future_usage
1221
+ # Subscription details if the Checkout Session sets up a future subscription.
1222
+ attr_accessor :subscriptions
1184
1223
 
1185
- def initialize(setup_future_usage: nil)
1224
+ def initialize(setup_future_usage: nil, subscriptions: nil)
1186
1225
  @setup_future_usage = setup_future_usage
1226
+ @subscriptions = subscriptions
1187
1227
  end
1188
1228
  end
1189
1229
 
@@ -1959,6 +1999,15 @@ module Stripe
1959
1999
  end
1960
2000
 
1961
2001
  class SubscriptionData < Stripe::RequestParams
2002
+ class BillingMode < Stripe::RequestParams
2003
+ # Attribute for param field type
2004
+ attr_accessor :type
2005
+
2006
+ def initialize(type: nil)
2007
+ @type = type
2008
+ end
2009
+ end
2010
+
1962
2011
  class InvoiceSettings < Stripe::RequestParams
1963
2012
  class Issuer < Stripe::RequestParams
1964
2013
  # The connected account being referenced when `type` is `account`.
@@ -2031,12 +2080,9 @@ module Stripe
2031
2080
  attr_accessor :proration_behavior
2032
2081
  # 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.
2033
2082
  attr_accessor :transfer_data
2034
- # Unix timestamp representing the end of the trial period the customer
2035
- # will get before being charged for the first time. Has to be at least
2036
- # 48 hours in the future.
2083
+ # 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.
2037
2084
  attr_accessor :trial_end
2038
- # Integer representing the number of trial period days before the
2039
- # customer is charged for the first time. Has to be at least 1.
2085
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
2040
2086
  attr_accessor :trial_period_days
2041
2087
  # Settings related to subscription trials.
2042
2088
  attr_accessor :trial_settings
@@ -2164,7 +2210,7 @@ module Stripe
2164
2210
  attr_accessor :expires_at
2165
2211
  # Generate a post-purchase Invoice for one-time payments.
2166
2212
  attr_accessor :invoice_creation
2167
- # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
2213
+ # 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.
2168
2214
  #
2169
2215
  # 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.
2170
2216
  #
@@ -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
@@ -145,7 +145,7 @@ module Stripe
145
145
  @shipping_rate = shipping_rate
146
146
  end
147
147
  end
148
- # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
148
+ # 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.
149
149
  attr_accessor :amount
150
150
  # 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.
151
151
  attr_accessor :credit_amount
@@ -157,7 +157,7 @@ module Stripe
157
157
  attr_accessor :expand
158
158
  # ID of the invoice.
159
159
  attr_accessor :invoice
160
- # Line items that make up the credit note.
160
+ # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
161
161
  attr_accessor :lines
162
162
  # The credit note's memo appears on the credit note PDF.
163
163
  attr_accessor :memo
@@ -171,7 +171,7 @@ module Stripe
171
171
  attr_accessor :refund_amount
172
172
  # Refunds to link to this credit note.
173
173
  attr_accessor :refunds
174
- # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
174
+ # 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.
175
175
  attr_accessor :shipping_cost
176
176
 
177
177
  def initialize(
@@ -309,7 +309,7 @@ module Stripe
309
309
  @shipping_rate = shipping_rate
310
310
  end
311
311
  end
312
- # The integer amount in cents (or local equivalent) representing the total amount of the credit note.
312
+ # 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.
313
313
  attr_accessor :amount
314
314
  # 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.
315
315
  attr_accessor :credit_amount
@@ -321,7 +321,7 @@ module Stripe
321
321
  attr_accessor :expand
322
322
  # ID of the invoice.
323
323
  attr_accessor :invoice
324
- # Line items that make up the credit note.
324
+ # Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided.
325
325
  attr_accessor :lines
326
326
  # The credit note's memo appears on the credit note PDF.
327
327
  attr_accessor :memo
@@ -335,7 +335,7 @@ module Stripe
335
335
  attr_accessor :refund_amount
336
336
  # Refunds to link to this credit note.
337
337
  attr_accessor :refunds
338
- # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
338
+ # 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.
339
339
  attr_accessor :shipping_cost
340
340
 
341
341
  def initialize(
@@ -22,7 +22,7 @@ module Stripe
22
22
  attr_accessor :payment_method_allow_redisplay_filters
23
23
  # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
24
24
  attr_accessor :payment_method_redisplay
25
- # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
25
+ # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`.
26
26
  attr_accessor :payment_method_redisplay_limit
27
27
  # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
28
28
  #
@@ -107,6 +107,18 @@ module Stripe
107
107
  @phone = phone
108
108
  end
109
109
  end
110
+
111
+ class RelatedPerson < Stripe::RequestParams
112
+ # A token representing a connected account. If provided, the person parameter is also required and must be associated with the account.
113
+ attr_accessor :account
114
+ # A token referencing a Person resource that this verification is being used to verify.
115
+ attr_accessor :person
116
+
117
+ def initialize(account: nil, person: nil)
118
+ @account = account
119
+ @person = person
120
+ end
121
+ end
110
122
  # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
111
123
  attr_accessor :client_reference_id
112
124
  # Specifies which fields in the response should be expanded.
@@ -121,6 +133,8 @@ module Stripe
121
133
  attr_accessor :related_customer
122
134
  # Token referencing a Customer Account resource.
123
135
  attr_accessor :related_customer_account
136
+ # Tokens referencing a Person resource and it's associated account.
137
+ attr_accessor :related_person
124
138
  # The URL that the user will be redirected to upon completing the verification flow.
125
139
  attr_accessor :return_url
126
140
  # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`.
@@ -136,6 +150,7 @@ module Stripe
136
150
  provided_details: nil,
137
151
  related_customer: nil,
138
152
  related_customer_account: nil,
153
+ related_person: nil,
139
154
  return_url: nil,
140
155
  type: nil,
141
156
  verification_flow: nil
@@ -147,6 +162,7 @@ module Stripe
147
162
  @provided_details = provided_details
148
163
  @related_customer = related_customer
149
164
  @related_customer_account = related_customer_account
165
+ @related_person = related_person
150
166
  @return_url = return_url
151
167
  @type = type
152
168
  @verification_flow = verification_flow
@@ -169,7 +169,7 @@ module Stripe
169
169
  # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
170
170
  # One of `month`.
171
171
  attr_accessor :interval
172
- # Type of installment plan, one of `fixed_count`.
172
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
173
173
  attr_accessor :type
174
174
 
175
175
  def initialize(count: nil, interval: nil, type: nil)
@@ -882,7 +882,7 @@ module Stripe
882
882
  # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
883
883
  # One of `month`.
884
884
  attr_accessor :interval
885
- # Type of installment plan, one of `fixed_count`.
885
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
886
886
  attr_accessor :type
887
887
 
888
888
  def initialize(count: nil, interval: nil, type: nil)
@@ -2859,6 +2859,15 @@ module Stripe
2859
2859
  end
2860
2860
  end
2861
2861
 
2862
+ class BillingMode < Stripe::RequestParams
2863
+ # Attribute for param field type
2864
+ attr_accessor :type
2865
+
2866
+ def initialize(type: nil)
2867
+ @type = type
2868
+ end
2869
+ end
2870
+
2862
2871
  class Phase < Stripe::RequestParams
2863
2872
  class AddInvoiceItem < Stripe::RequestParams
2864
2873
  class Discount < Stripe::RequestParams
@@ -3434,6 +3443,15 @@ module Stripe
3434
3443
  end
3435
3444
 
3436
3445
  class SubscriptionDetails < Stripe::RequestParams
3446
+ class BillingMode < Stripe::RequestParams
3447
+ # Attribute for param field type
3448
+ attr_accessor :type
3449
+
3450
+ def initialize(type: nil)
3451
+ @type = type
3452
+ end
3453
+ end
3454
+
3437
3455
  class Item < Stripe::RequestParams
3438
3456
  class BillingThresholds < Stripe::RequestParams
3439
3457
  # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
@@ -3592,7 +3610,7 @@ module Stripe
3592
3610
  attr_accessor :billing_mode
3593
3611
  # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
3594
3612
  attr_accessor :cancel_at
3595
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
3613
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
3596
3614
  attr_accessor :cancel_at_period_end
3597
3615
  # This simulates the subscription being canceled or expired immediately.
3598
3616
  attr_accessor :cancel_now