stripe 15.3.0 → 15.4.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 (96) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +21 -1
  4. data/OPENAPI_VERSION +1 -1
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_version.rb +1 -1
  7. data/lib/stripe/resources/account.rb +5 -5
  8. data/lib/stripe/resources/account_link.rb +3 -1
  9. data/lib/stripe/resources/account_session.rb +51 -0
  10. data/lib/stripe/resources/billing/credit_grant.rb +1 -1
  11. data/lib/stripe/resources/billing_portal/configuration.rb +46 -2
  12. data/lib/stripe/resources/charge.rb +7 -5
  13. data/lib/stripe/resources/checkout/session.rb +32 -4
  14. data/lib/stripe/resources/confirmation_token.rb +3 -3
  15. data/lib/stripe/resources/customer.rb +1 -1
  16. data/lib/stripe/resources/dispute.rb +1 -1
  17. data/lib/stripe/resources/event.rb +14 -26
  18. data/lib/stripe/resources/invoice.rb +24 -8
  19. data/lib/stripe/resources/invoice_item.rb +1 -1
  20. data/lib/stripe/resources/payment_intent.rb +14 -4
  21. data/lib/stripe/resources/payment_link.rb +83 -5
  22. data/lib/stripe/resources/payment_method.rb +4 -4
  23. data/lib/stripe/resources/quote.rb +1 -1
  24. data/lib/stripe/resources/radar/value_list.rb +2 -2
  25. data/lib/stripe/resources/refund.rb +1 -1
  26. data/lib/stripe/resources/review.rb +2 -2
  27. data/lib/stripe/resources/setup_attempt.rb +1 -1
  28. data/lib/stripe/resources/subscription.rb +2 -2
  29. data/lib/stripe/resources/subscription_item.rb +2 -2
  30. data/lib/stripe/resources/subscription_schedule.rb +35 -3
  31. data/lib/stripe/resources/tax/registration.rb +408 -30
  32. data/lib/stripe/resources/terminal/configuration.rb +196 -0
  33. data/lib/stripe/services/account_link_service.rb +3 -1
  34. data/lib/stripe/services/account_service.rb +3 -3
  35. data/lib/stripe/services/account_session_service.rb +34 -0
  36. data/lib/stripe/services/billing/credit_grant_service.rb +1 -1
  37. data/lib/stripe/services/billing_portal/configuration_service.rb +36 -2
  38. data/lib/stripe/services/checkout/session_service.rb +19 -3
  39. data/lib/stripe/services/invoice_item_service.rb +1 -1
  40. data/lib/stripe/services/invoice_service.rb +24 -8
  41. data/lib/stripe/services/payment_intent_service.rb +8 -3
  42. data/lib/stripe/services/payment_link_service.rb +81 -5
  43. data/lib/stripe/services/payment_method_service.rb +1 -1
  44. data/lib/stripe/services/quote_service.rb +1 -1
  45. data/lib/stripe/services/radar/value_list_service.rb +1 -1
  46. data/lib/stripe/services/subscription_item_service.rb +2 -2
  47. data/lib/stripe/services/subscription_schedule_service.rb +35 -3
  48. data/lib/stripe/services/subscription_service.rb +2 -2
  49. data/lib/stripe/services/tax/registration_service.rb +360 -30
  50. data/lib/stripe/services/terminal/configuration_service.rb +152 -0
  51. data/lib/stripe/version.rb +1 -1
  52. data/rbi/stripe/resources/account.rbi +5 -5
  53. data/rbi/stripe/resources/account_link.rbi +3 -1
  54. data/rbi/stripe/resources/account_session.rbi +62 -1
  55. data/rbi/stripe/resources/billing/credit_grant.rbi +1 -1
  56. data/rbi/stripe/resources/billing_portal/configuration.rbi +62 -4
  57. data/rbi/stripe/resources/charge.rbi +8 -5
  58. data/rbi/stripe/resources/checkout/session.rbi +42 -7
  59. data/rbi/stripe/resources/confirmation_token.rbi +3 -3
  60. data/rbi/stripe/resources/customer.rbi +1 -1
  61. data/rbi/stripe/resources/dispute.rbi +1 -1
  62. data/rbi/stripe/resources/event.rbi +14 -26
  63. data/rbi/stripe/resources/invoice.rbi +27 -11
  64. data/rbi/stripe/resources/invoice_item.rbi +1 -1
  65. data/rbi/stripe/resources/payment_intent.rbi +14 -4
  66. data/rbi/stripe/resources/payment_link.rbi +101 -9
  67. data/rbi/stripe/resources/payment_method.rbi +4 -4
  68. data/rbi/stripe/resources/quote.rbi +1 -1
  69. data/rbi/stripe/resources/radar/value_list.rbi +2 -2
  70. data/rbi/stripe/resources/refund.rbi +1 -1
  71. data/rbi/stripe/resources/review.rbi +2 -2
  72. data/rbi/stripe/resources/setup_attempt.rbi +1 -1
  73. data/rbi/stripe/resources/subscription.rbi +6 -6
  74. data/rbi/stripe/resources/subscription_item.rbi +2 -2
  75. data/rbi/stripe/resources/subscription_schedule.rbi +33 -5
  76. data/rbi/stripe/resources/tax/registration.rbi +544 -60
  77. data/rbi/stripe/resources/terminal/configuration.rbi +210 -2
  78. data/rbi/stripe/services/account_link_service.rbi +3 -1
  79. data/rbi/stripe/services/account_service.rbi +3 -3
  80. data/rbi/stripe/services/account_session_service.rbi +40 -1
  81. data/rbi/stripe/services/billing/credit_grant_service.rbi +1 -1
  82. data/rbi/stripe/services/billing_portal/configuration_service.rbi +48 -4
  83. data/rbi/stripe/services/checkout/session_service.rbi +26 -6
  84. data/rbi/stripe/services/invoice_item_service.rbi +1 -1
  85. data/rbi/stripe/services/invoice_service.rbi +27 -11
  86. data/rbi/stripe/services/payment_intent_service.rbi +8 -3
  87. data/rbi/stripe/services/payment_link_service.rbi +98 -9
  88. data/rbi/stripe/services/payment_method_service.rbi +1 -1
  89. data/rbi/stripe/services/quote_service.rbi +1 -1
  90. data/rbi/stripe/services/radar/value_list_service.rbi +1 -1
  91. data/rbi/stripe/services/subscription_item_service.rbi +2 -2
  92. data/rbi/stripe/services/subscription_schedule_service.rbi +37 -5
  93. data/rbi/stripe/services/subscription_service.rbi +6 -6
  94. data/rbi/stripe/services/tax/registration_service.rbi +480 -60
  95. data/rbi/stripe/services/terminal/configuration_service.rbi +170 -2
  96. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2d72c2e4fa9d62e0defa6c35a5ca4555ab0d0e20afb07eb31b185fe1be8eea1
4
- data.tar.gz: a5482622bdb95231f47b7444df5d37402b689fd7771d4a209cb695c89141639d
3
+ metadata.gz: 0da618ec1c9330b02b01ba1e76ebd6f9ef24ecaf5ecbd46b8cccb3eecb755caf
4
+ data.tar.gz: e580d6137c1b2d18648b8d1da99f062b1ee65bb3b86a26e4f2d5f1314a44f712
5
5
  SHA512:
6
- metadata.gz: 73e5f19aebfc269911a6061214abe943dfe29cbc70f578cf9cdc271ba69c6c42d8f99ac462ef6ffe5450d38fe984fa4970b391b45cd573d6064f0b4acc5b2054
7
- data.tar.gz: 5fcd5f114f06a5b050702059942f4d3d7563d82a59b42c84ac8fa6c407022b29ee7e428076646a7a3fde6cf77394143ed920782287a747aedc0be9251d04b290
6
+ metadata.gz: 615e02d70b970ed00ae5ae63eb935dbb2d5a0e3b24e9f4244a59cb87f3e71fc59b7ae4ad132eef2aa944c5bafcc53a6b21fe71eee745ca9436b6e26f118a2eb1
7
+ data.tar.gz: be5c508ac012c143e399e23f52387d2249d848014b7426aec617c32e75f3767f9f8a52a6a913c68bc90e09bfd10d89c716ece860f0e89ffa43b2801751fff81f
data/API_VERSION CHANGED
@@ -1 +1 @@
1
- 2025-06-30.basil
1
+ 2025-07-30.basil
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
+ ## 15.4.0 - 2025-07-30
3
+ This release changes the pinned API version to `2025-07-30.basil`.
4
+
5
+ * [#1627](https://github.com/stripe/stripe-ruby/pull/1627) Update generated code
6
+ * Add support for `instant_payouts_promotion` on `AccountSession::Component` and `AccountSession::CreateParams::Component`
7
+ * Add support for `adjustable_quantity` on `BillingPortal::Configuration::CreateParams::Feature::SubscriptionUpdate::Product`, `BillingPortal::Configuration::Feature::SubscriptionUpdate::Product`, and `BillingPortal::Configuration::UpdateParams::Feature::SubscriptionUpdate::Product`
8
+ * Add support for `transaction_id` on `Charge::PaymentMethodDetail::Cashapp`
9
+ * Add support for `origin_context` on `Checkout::Session::CreateParams` and `Checkout::Session`
10
+ * Add support for `template` on `Checkout::Session::CreateParams::InvoiceCreation::InvoiceDatum::RenderingOption`, `Checkout::Session::InvoiceCreation::InvoiceDatum::RenderingOption`, `PaymentLink::CreateParams::InvoiceCreation::InvoiceDatum::RenderingOption`, `PaymentLink::InvoiceCreation::InvoiceDatum::RenderingOption`, and `PaymentLink::UpdateParams::InvoiceCreation::InvoiceDatum::RenderingOption`
11
+ * Add support for `setup_future_usage` on `Checkout::Session::CreateParams::PaymentMethodOption::Pix` and `Checkout::Session::PaymentMethodOption::Pix`
12
+ * Change `Identity::VerificationSession::RelatedPerson.account` to be required
13
+ * Change `Identity::VerificationSession::RelatedPerson.person` to be required
14
+ * Add support for `duration` on `Invoice::CreatePreviewParams::ScheduleDetail::Phase`, `SubscriptionSchedule::CreateParams::Phase`, and `SubscriptionSchedule::UpdateParams::Phase`
15
+ * Change type of `Invoice::CreatePreviewParams::SubscriptionDetail.cancel_at`, `Subscription::CreateParams.cancel_at`, and `Subscription::UpdateParams.cancel_at` from `DateTime` to `DateTime | enum('max_period_end'|'min_period_end')`
16
+ * Add support for `price_data` on `PaymentLink::CreateParams::LineItem`
17
+ * Change `PaymentLink::CreateParams::LineItem.price` to be optional
18
+ * Add support for `standard` on `Tax::Registration::CountryOption::Ae`, `Tax::Registration::CountryOption::Au`, `Tax::Registration::CountryOption::Ch`, `Tax::Registration::CountryOption::Gb`, `Tax::Registration::CountryOption::Jp`, `Tax::Registration::CountryOption::No`, `Tax::Registration::CountryOption::Nz`, `Tax::Registration::CountryOption::Sg`, `Tax::Registration::CreateParams::CountryOption::Ae`, `Tax::Registration::CreateParams::CountryOption::Al`, `Tax::Registration::CreateParams::CountryOption::Ao`, `Tax::Registration::CreateParams::CountryOption::Au`, `Tax::Registration::CreateParams::CountryOption::Aw`, `Tax::Registration::CreateParams::CountryOption::B`, `Tax::Registration::CreateParams::CountryOption::Ba`, `Tax::Registration::CreateParams::CountryOption::Bb`, `Tax::Registration::CreateParams::CountryOption::Bd`, `Tax::Registration::CreateParams::CountryOption::Bf`, `Tax::Registration::CreateParams::CountryOption::Bh`, `Tax::Registration::CreateParams::CountryOption::Cd`, `Tax::Registration::CreateParams::CountryOption::Ch`, `Tax::Registration::CreateParams::CountryOption::Et`, `Tax::Registration::CreateParams::CountryOption::Gb`, `Tax::Registration::CreateParams::CountryOption::Gn`, `Tax::Registration::CreateParams::CountryOption::Is`, `Tax::Registration::CreateParams::CountryOption::Jp`, `Tax::Registration::CreateParams::CountryOption::Me`, `Tax::Registration::CreateParams::CountryOption::Mk`, `Tax::Registration::CreateParams::CountryOption::Mr`, `Tax::Registration::CreateParams::CountryOption::No`, `Tax::Registration::CreateParams::CountryOption::Nz`, `Tax::Registration::CreateParams::CountryOption::Om`, `Tax::Registration::CreateParams::CountryOption::R`, `Tax::Registration::CreateParams::CountryOption::Sg`, `Tax::Registration::CreateParams::CountryOption::Sr`, `Tax::Registration::CreateParams::CountryOption::Uy`, `Tax::Registration::CreateParams::CountryOption::Za`, and `Tax::Registration::CreateParams::CountryOption::Zw`
19
+ * Add support for `aed`, `bgn`, `huf`, and `ron` on `Terminal::Configuration::CreateParams::Tipping`, `Terminal::Configuration::Tipping`, and `Terminal::Configuration::UpdateParams::Tipping`
20
+
2
21
  ## 15.3.0 - 2025-07-01
22
+ This release changes the pinned API version to `2025-06-30.basil`.
23
+
3
24
  * [#1618](https://github.com/stripe/stripe-ruby/pull/1618) Update generated code
4
25
  * Add support for `migrate` method on resource `Subscription`
5
26
  * Add support for `collect_payment_method` and `confirm_payment_intent` methods on resource `Terminal::Reader`
@@ -23,7 +44,6 @@
23
44
  * Add support for `status` on `Treasury::FinancialAccount::ListParams`
24
45
  * [#1615](https://github.com/stripe/stripe-ruby/pull/1615) Update README to mention that APIResource.request was removed
25
46
  * [#1619](https://github.com/stripe/stripe-ruby/pull/1619) Updated StripeClient snippets in README
26
- * [#1621](https://github.com/stripe/stripe-ruby/pull/1621) Disable flaky test in jruby/truffleruby
27
47
  * [#1620](https://github.com/stripe/stripe-ruby/pull/1620) Fix `raw_request` example in README
28
48
 
29
49
  ## 15.2.1 - 2025-06-04
data/OPENAPI_VERSION CHANGED
@@ -1 +1 @@
1
- v1819
1
+ v1868
data/VERSION CHANGED
@@ -1 +1 @@
1
- 15.3.0
1
+ 15.4.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module ApiVersion
6
- CURRENT = "2025-06-30.basil"
6
+ CURRENT = "2025-07-30.basil"
7
7
  CURRENT_MAJOR = "basil"
8
8
  end
9
9
  end
@@ -71,7 +71,7 @@ module Stripe
71
71
  attr_reader :estimated_worker_count
72
72
  # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
73
73
  attr_reader :mcc
74
- # Whether the business is a minority-owned, women-owned, and/or LGBTQI+-owned business.
74
+ # Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business.
75
75
  attr_reader :minority_owned_business_designation
76
76
  # Attribute for field monthly_estimated_revenue
77
77
  attr_reader :monthly_estimated_revenue
@@ -700,7 +700,7 @@ module Stripe
700
700
  attr_accessor :estimated_worker_count
701
701
  # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
702
702
  attr_accessor :mcc
703
- # Whether the business is a minority-owned, women-owned, and/or LGBTQI+-owned business.
703
+ # Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business.
704
704
  attr_accessor :minority_owned_business_designation
705
705
  # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
706
706
  attr_accessor :monthly_estimated_revenue
@@ -2751,7 +2751,7 @@ module Stripe
2751
2751
  attr_accessor :estimated_worker_count
2752
2752
  # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide.
2753
2753
  attr_accessor :mcc
2754
- # Whether the business is a minority-owned, women-owned, and/or LGBTQI+-owned business.
2754
+ # Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business.
2755
2755
  attr_accessor :minority_owned_business_designation
2756
2756
  # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India.
2757
2757
  attr_accessor :monthly_estimated_revenue
@@ -4852,7 +4852,7 @@ module Stripe
4852
4852
  #
4853
4853
  # Test-mode accounts can be deleted at any time.
4854
4854
  #
4855
- # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://docs.stripe.com/api/balance/balance_object) are zero.
4855
+ # Live-mode accounts that have access to the standard dashboard and Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. All other Live-mode accounts, can be deleted when all [balances](https://docs.stripe.com/api/balance/balance_object) are zero.
4856
4856
  #
4857
4857
  # If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
4858
4858
  def self.delete(account, params = {}, opts = {})
@@ -4868,7 +4868,7 @@ module Stripe
4868
4868
  #
4869
4869
  # Test-mode accounts can be deleted at any time.
4870
4870
  #
4871
- # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://docs.stripe.com/api/balance/balance_object) are zero.
4871
+ # Live-mode accounts that have access to the standard dashboard and Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. All other Live-mode accounts, can be deleted when all [balances](https://docs.stripe.com/api/balance/balance_object) are zero.
4872
4872
  #
4873
4873
  # If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
4874
4874
  def delete(params = {}, opts = {})
@@ -38,7 +38,9 @@ module Stripe
38
38
  attr_accessor :refresh_url
39
39
  # The URL that the user will be redirected to upon leaving or completing the linked flow.
40
40
  attr_accessor :return_url
41
- # The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.
41
+ # The type of account link the user is requesting.
42
+ #
43
+ # You can create Account Links of type `account_update` only for connected accounts where your platform is responsible for collecting requirements, including Custom accounts. You can't create them for accounts that have access to a Stripe-hosted Dashboard. If you use [Connect embedded components](/connect/get-started-connect-embedded-components), you can include components that allow your connected accounts to update their own information. For an account without Stripe-hosted Dashboard access where Stripe is liable for negative balances, you must use embedded components.
42
44
  attr_accessor :type
43
45
 
44
46
  def initialize(
@@ -116,6 +116,21 @@ module Stripe
116
116
  attr_reader :features
117
117
  end
118
118
 
119
+ class InstantPayoutsPromotion < Stripe::StripeObject
120
+ class Features < Stripe::StripeObject
121
+ # 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`.
122
+ attr_reader :disable_stripe_user_authentication
123
+ # 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`.
124
+ attr_reader :external_account_collection
125
+ # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
126
+ attr_reader :instant_payouts
127
+ end
128
+ # Whether the embedded component is enabled.
129
+ attr_reader :enabled
130
+ # Attribute for field features
131
+ attr_reader :features
132
+ end
133
+
119
134
  class IssuingCard < Stripe::StripeObject
120
135
  class Features < Stripe::StripeObject
121
136
  # Whether to allow card management features.
@@ -270,6 +285,8 @@ module Stripe
270
285
  attr_reader :financial_account
271
286
  # Attribute for field financial_account_transactions
272
287
  attr_reader :financial_account_transactions
288
+ # Attribute for field instant_payouts_promotion
289
+ attr_reader :instant_payouts_promotion
273
290
  # Attribute for field issuing_card
274
291
  attr_reader :issuing_card
275
292
  # Attribute for field issuing_cards_list
@@ -485,6 +502,36 @@ module Stripe
485
502
  end
486
503
  end
487
504
 
505
+ class InstantPayoutsPromotion < Stripe::RequestParams
506
+ class Features < Stripe::RequestParams
507
+ # 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`.
508
+ attr_accessor :disable_stripe_user_authentication
509
+ # 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`.
510
+ attr_accessor :external_account_collection
511
+ # Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`.
512
+ attr_accessor :instant_payouts
513
+
514
+ def initialize(
515
+ disable_stripe_user_authentication: nil,
516
+ external_account_collection: nil,
517
+ instant_payouts: nil
518
+ )
519
+ @disable_stripe_user_authentication = disable_stripe_user_authentication
520
+ @external_account_collection = external_account_collection
521
+ @instant_payouts = instant_payouts
522
+ end
523
+ end
524
+ # Whether the embedded component is enabled.
525
+ attr_accessor :enabled
526
+ # The list of features enabled in the embedded component.
527
+ attr_accessor :features
528
+
529
+ def initialize(enabled: nil, features: nil)
530
+ @enabled = enabled
531
+ @features = features
532
+ end
533
+ end
534
+
488
535
  class IssuingCard < Stripe::RequestParams
489
536
  class Features < Stripe::RequestParams
490
537
  # Whether to allow card management features.
@@ -771,6 +818,8 @@ module Stripe
771
818
  attr_accessor :financial_account
772
819
  # Configuration for the [financial account transactions](/connect/supported-embedded-components/financial-account-transactions/) embedded component.
773
820
  attr_accessor :financial_account_transactions
821
+ # Configuration for the [instant payouts promotion](/connect/supported-embedded-components/instant-payouts-promotion/) embedded component.
822
+ attr_accessor :instant_payouts_promotion
774
823
  # Configuration for the [issuing card](/connect/supported-embedded-components/issuing-card/) embedded component.
775
824
  attr_accessor :issuing_card
776
825
  # Configuration for the [issuing cards list](/connect/supported-embedded-components/issuing-cards-list/) embedded component.
@@ -800,6 +849,7 @@ module Stripe
800
849
  documents: nil,
801
850
  financial_account: nil,
802
851
  financial_account_transactions: nil,
852
+ instant_payouts_promotion: nil,
803
853
  issuing_card: nil,
804
854
  issuing_cards_list: nil,
805
855
  notification_banner: nil,
@@ -818,6 +868,7 @@ module Stripe
818
868
  @documents = documents
819
869
  @financial_account = financial_account
820
870
  @financial_account_transactions = financial_account_transactions
871
+ @instant_payouts_promotion = instant_payouts_promotion
821
872
  @issuing_card = issuing_card
822
873
  @issuing_cards_list = issuing_cards_list
823
874
  @notification_banner = notification_banner
@@ -86,7 +86,7 @@ module Stripe
86
86
  end
87
87
  # The monetary amount.
88
88
  attr_accessor :monetary
89
- # Specify the type of this amount. We currently only support `monetary` billing credits.
89
+ # The type of this amount. We currently only support `monetary` billing credits.
90
90
  attr_accessor :type
91
91
 
92
92
  def initialize(monetary: nil, type: nil)
@@ -60,6 +60,16 @@ module Stripe
60
60
 
61
61
  class SubscriptionUpdate < Stripe::StripeObject
62
62
  class Product < Stripe::StripeObject
63
+ class AdjustableQuantity < Stripe::StripeObject
64
+ # If true, the quantity can be adjusted to any non-negative integer.
65
+ attr_reader :enabled
66
+ # The maximum quantity that can be set for the product.
67
+ attr_reader :maximum
68
+ # The minimum quantity that can be set for the product.
69
+ attr_reader :minimum
70
+ end
71
+ # Attribute for field adjustable_quantity
72
+ attr_reader :adjustable_quantity
63
73
  # The list of price IDs which, when subscribed to, a subscription can be updated.
64
74
  attr_reader :prices
65
75
  # The product ID.
@@ -220,12 +230,29 @@ module Stripe
220
230
 
221
231
  class SubscriptionUpdate < Stripe::RequestParams
222
232
  class Product < Stripe::RequestParams
233
+ class AdjustableQuantity < Stripe::RequestParams
234
+ # Set to true if the quantity can be adjusted to any non-negative integer.
235
+ attr_accessor :enabled
236
+ # The maximum quantity that can be set for the product.
237
+ attr_accessor :maximum
238
+ # The minimum quantity that can be set for the product.
239
+ attr_accessor :minimum
240
+
241
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
242
+ @enabled = enabled
243
+ @maximum = maximum
244
+ @minimum = minimum
245
+ end
246
+ end
247
+ # Control whether the quantity of the product can be adjusted.
248
+ attr_accessor :adjustable_quantity
223
249
  # The list of price IDs for the product that a subscription can be updated to.
224
250
  attr_accessor :prices
225
251
  # The product id.
226
252
  attr_accessor :product
227
253
 
228
- def initialize(prices: nil, product: nil)
254
+ def initialize(adjustable_quantity: nil, prices: nil, product: nil)
255
+ @adjustable_quantity = adjustable_quantity
229
256
  @prices = prices
230
257
  @product = product
231
258
  end
@@ -419,12 +446,29 @@ module Stripe
419
446
 
420
447
  class SubscriptionUpdate < Stripe::RequestParams
421
448
  class Product < Stripe::RequestParams
449
+ class AdjustableQuantity < Stripe::RequestParams
450
+ # Set to true if the quantity can be adjusted to any non-negative integer.
451
+ attr_accessor :enabled
452
+ # The maximum quantity that can be set for the product.
453
+ attr_accessor :maximum
454
+ # The minimum quantity that can be set for the product.
455
+ attr_accessor :minimum
456
+
457
+ def initialize(enabled: nil, maximum: nil, minimum: nil)
458
+ @enabled = enabled
459
+ @maximum = maximum
460
+ @minimum = minimum
461
+ end
462
+ end
463
+ # Control whether the quantity of the product can be adjusted.
464
+ attr_accessor :adjustable_quantity
422
465
  # The list of price IDs for the product that a subscription can be updated to.
423
466
  attr_accessor :prices
424
467
  # The product id.
425
468
  attr_accessor :product
426
469
 
427
- def initialize(prices: nil, product: nil)
470
+ def initialize(adjustable_quantity: nil, prices: nil, product: nil)
471
+ @adjustable_quantity = adjustable_quantity
428
472
  @prices = prices
429
473
  @product = product
430
474
  end
@@ -186,7 +186,7 @@ module Stripe
186
186
  class AmazonPay < Stripe::StripeObject
187
187
  class Funding < Stripe::StripeObject
188
188
  class Card < Stripe::StripeObject
189
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
189
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
190
190
  attr_reader :brand
191
191
  # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
192
192
  attr_reader :country
@@ -448,7 +448,7 @@ module Stripe
448
448
  attr_reader :amount_authorized
449
449
  # Authorization code on the charge.
450
450
  attr_reader :authorization_code
451
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
451
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
452
452
  attr_reader :brand
453
453
  # When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured.
454
454
  attr_reader :capture_before
@@ -539,7 +539,7 @@ module Stripe
539
539
  end
540
540
  # The authorized amount
541
541
  attr_reader :amount_authorized
542
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
542
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
543
543
  attr_reader :brand
544
544
  # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
545
545
  attr_reader :brand_product
@@ -596,6 +596,8 @@ module Stripe
596
596
  attr_reader :buyer_id
597
597
  # A public identifier for buyers using Cash App.
598
598
  attr_reader :cashtag
599
+ # A unique and immutable identifier of payments assigned by Cash App
600
+ attr_reader :transaction_id
599
601
  end
600
602
 
601
603
  class Crypto < Stripe::StripeObject
@@ -880,7 +882,7 @@ module Stripe
880
882
  class RevolutPay < Stripe::StripeObject
881
883
  class Funding < Stripe::StripeObject
882
884
  class Card < Stripe::StripeObject
883
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
885
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
884
886
  attr_reader :brand
885
887
  # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
886
888
  attr_reader :country
@@ -1119,7 +1121,7 @@ module Stripe
1119
1121
  end
1120
1122
 
1121
1123
  class PresentmentDetails < Stripe::StripeObject
1122
- # Amount intended to be collected by this payment, denominated in presentment_currency.
1124
+ # Amount intended to be collected by this payment, denominated in `presentment_currency`.
1123
1125
  attr_reader :presentment_amount
1124
1126
  # Currency presented to the customer during payment.
1125
1127
  attr_reader :presentment_currency
@@ -280,6 +280,8 @@ module Stripe
280
280
  class RenderingOptions < Stripe::StripeObject
281
281
  # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
282
282
  attr_reader :amount_tax_display
283
+ # ID of the invoice rendering template to be used for the generated invoice.
284
+ attr_reader :template
283
285
  end
284
286
  # The account tax IDs associated with the invoice.
285
287
  attr_reader :account_tax_ids
@@ -747,6 +749,14 @@ module Stripe
747
749
  class Pix < Stripe::StripeObject
748
750
  # The number of seconds after which Pix payment will expire.
749
751
  attr_reader :expires_after_seconds
752
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
753
+ #
754
+ # 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.
755
+ #
756
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
757
+ #
758
+ # 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).
759
+ attr_reader :setup_future_usage
750
760
  end
751
761
 
752
762
  class RevolutPay < Stripe::StripeObject
@@ -921,7 +931,7 @@ module Stripe
921
931
  end
922
932
 
923
933
  class PresentmentDetails < Stripe::StripeObject
924
- # Amount intended to be collected by this payment, denominated in presentment_currency.
934
+ # Amount intended to be collected by this payment, denominated in `presentment_currency`.
925
935
  attr_reader :presentment_amount
926
936
  # Currency presented to the customer during payment.
927
937
  attr_reader :presentment_currency
@@ -1409,9 +1419,12 @@ module Stripe
1409
1419
  class RenderingOptions < Stripe::RequestParams
1410
1420
  # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
1411
1421
  attr_accessor :amount_tax_display
1422
+ # ID of the invoice rendering template to use for this invoice.
1423
+ attr_accessor :template
1412
1424
 
1413
- def initialize(amount_tax_display: nil)
1425
+ def initialize(amount_tax_display: nil, template: nil)
1414
1426
  @amount_tax_display = amount_tax_display
1427
+ @template = template
1415
1428
  end
1416
1429
  end
1417
1430
  # The account tax IDs associated with the invoice.
@@ -2432,9 +2445,18 @@ module Stripe
2432
2445
  class Pix < Stripe::RequestParams
2433
2446
  # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
2434
2447
  attr_accessor :expires_after_seconds
2448
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2449
+ #
2450
+ # 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.
2451
+ #
2452
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
2453
+ #
2454
+ # 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).
2455
+ attr_accessor :setup_future_usage
2435
2456
 
2436
- def initialize(expires_after_seconds: nil)
2457
+ def initialize(expires_after_seconds: nil, setup_future_usage: nil)
2437
2458
  @expires_after_seconds = expires_after_seconds
2459
+ @setup_future_usage = setup_future_usage
2438
2460
  end
2439
2461
  end
2440
2462
 
@@ -2913,7 +2935,7 @@ module Stripe
2913
2935
 
2914
2936
  class SubscriptionData < Stripe::RequestParams
2915
2937
  class BillingMode < Stripe::RequestParams
2916
- # Attribute for param field type
2938
+ # Controls the calculation and orchestration of prorations and invoices for subscriptions.
2917
2939
  attr_accessor :type
2918
2940
 
2919
2941
  def initialize(type: nil)
@@ -3141,6 +3163,8 @@ module Stripe
3141
3163
  #
3142
3164
  # For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices.
3143
3165
  attr_accessor :optional_items
3166
+ # Where the user is coming from. This informs the optimizations that are applied to the session. For example, a session originating from a mobile app may behave more like a native app, depending on the platform. This parameter is currently not allowed if `ui_mode` is `custom`.
3167
+ attr_accessor :origin_context
3144
3168
  # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
3145
3169
  attr_accessor :payment_intent_data
3146
3170
  # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.
@@ -3236,6 +3260,7 @@ module Stripe
3236
3260
  metadata: nil,
3237
3261
  mode: nil,
3238
3262
  optional_items: nil,
3263
+ origin_context: nil,
3239
3264
  payment_intent_data: nil,
3240
3265
  payment_method_collection: nil,
3241
3266
  payment_method_configuration: nil,
@@ -3281,6 +3306,7 @@ module Stripe
3281
3306
  @metadata = metadata
3282
3307
  @mode = mode
3283
3308
  @optional_items = optional_items
3309
+ @origin_context = origin_context
3284
3310
  @payment_intent_data = payment_intent_data
3285
3311
  @payment_method_collection = payment_method_collection
3286
3312
  @payment_method_configuration = payment_method_configuration
@@ -3587,6 +3613,8 @@ module Stripe
3587
3613
  attr_reader :object
3588
3614
  # The optional items presented to the customer at checkout.
3589
3615
  attr_reader :optional_items
3616
+ # Where the user is coming from. This informs the optimizations that are applied to the session.
3617
+ attr_reader :origin_context
3590
3618
  # The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead.
3591
3619
  attr_reader :payment_intent
3592
3620
  # The ID of the Payment Link that created this Session.
@@ -178,7 +178,7 @@ module Stripe
178
178
  end
179
179
  # The authorized amount
180
180
  attr_reader :amount_authorized
181
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
181
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
182
182
  attr_reader :brand
183
183
  # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
184
184
  attr_reader :brand_product
@@ -360,7 +360,7 @@ module Stripe
360
360
  # Attribute for field visa_checkout
361
361
  attr_reader :visa_checkout
362
362
  end
363
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
363
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
364
364
  attr_reader :brand
365
365
  # Checks on Card address and CVC if provided.
366
366
  attr_reader :checks
@@ -417,7 +417,7 @@ module Stripe
417
417
  # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`.
418
418
  attr_reader :type
419
419
  end
420
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
420
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
421
421
  attr_reader :brand
422
422
  # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card.
423
423
  attr_reader :brand_product
@@ -781,7 +781,7 @@ module Stripe
781
781
  end
782
782
  # The customer's address.
783
783
  attr_reader :address
784
- # The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize.
784
+ # The current balance, if any, that's stored on the customer in their default currency. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. For multi-currency balances, see [invoice_credit_balance](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance).
785
785
  attr_reader :balance
786
786
  # The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically.
787
787
  attr_reader :cash_balance
@@ -194,7 +194,7 @@ module Stripe
194
194
  end
195
195
 
196
196
  class Card < Stripe::StripeObject
197
- # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
197
+ # Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
198
198
  attr_reader :brand
199
199
  # The type of dispute opened. Different case types may have varying fees and financial impact.
200
200
  attr_reader :case_type
@@ -2,35 +2,23 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Stripe
5
- # Events are our way of letting you know when something interesting happens in
6
- # your account. When an interesting event occurs, we create a new `Event`
7
- # object. For example, when a charge succeeds, we create a `charge.succeeded`
8
- # event, and when an invoice payment attempt fails, we create an
9
- # `invoice.payment_failed` event. Certain API requests might create multiple
10
- # events. For example, if you create a new subscription for a
11
- # customer, you receive both a `customer.subscription.created` event and a
12
- # `charge.succeeded` event.
5
+ # Snapshot events allow you to track and react to activity in your Stripe integration. When
6
+ # the state of another API resource changes, Stripe creates an `Event` object that contains
7
+ # all the relevant information associated with that action, including the affected API
8
+ # resource. For example, a successful payment triggers a `charge.succeeded` event, which
9
+ # contains the `Charge` in the event's data property. Some actions trigger multiple events.
10
+ # For example, if you create a new subscription for a customer, it triggers both a
11
+ # `customer.subscription.created` event and a `charge.succeeded` event.
13
12
  #
14
- # Events occur when the state of another API resource changes. The event's data
15
- # field embeds the resource's state at the time of the change. For
16
- # example, a `charge.succeeded` event contains a charge, and an
17
- # `invoice.payment_failed` event contains an invoice.
13
+ # Configure an event destination in your account to listen for events that represent actions
14
+ # your integration needs to respond to. Additionally, you can retrieve an individual event or
15
+ # a list of events from the API.
18
16
  #
19
- # As with other API resources, you can use endpoints to retrieve an
20
- # [individual event](https://stripe.com/docs/api#retrieve_event) or a [list of events](https://stripe.com/docs/api#list_events)
21
- # from the API. We also have a separate
22
- # [webhooks](http://en.wikipedia.org/wiki/Webhook) system for sending the
23
- # `Event` objects directly to an endpoint on your server. You can manage
24
- # webhooks in your
25
- # [account settings](https://dashboard.stripe.com/account/webhooks). Learn how
26
- # to [listen for events](https://docs.stripe.com/webhooks)
27
- # so that your integration can automatically trigger reactions.
17
+ # [Connect](https://docs.stripe.com/connect) platforms can also receive event notifications
18
+ # that occur in their connected accounts. These events include an account attribute that
19
+ # identifies the relevant connected account.
28
20
  #
29
- # When using [Connect](https://docs.stripe.com/connect), you can also receive event notifications
30
- # that occur in connected accounts. For these events, there's an
31
- # additional `account` attribute in the received `Event` object.
32
- #
33
- # We only guarantee access to events through the [Retrieve Event API](https://stripe.com/docs/api#retrieve_event)
21
+ # You can access events through the [Retrieve Event API](https://docs.stripe.com/api/events#retrieve_event)
34
22
  # for 30 days.
35
23
  class Event < APIResource
36
24
  extend Stripe::APIOperations::List