stripe 19.7.0.pre.alpha.2 → 19.7.0.pre.alpha.4

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 (103) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_requestor.rb +3 -0
  3. data/lib/stripe/api_version.rb +1 -1
  4. data/lib/stripe/errors.rb +3 -0
  5. data/lib/stripe/events/v1_setup_intent_succeeded_event.rb +2 -2
  6. data/lib/stripe/object_types.rb +2 -0
  7. data/lib/stripe/params/checkout/session_create_params.rb +28 -4
  8. data/lib/stripe/params/checkout/session_update_params.rb +2 -2
  9. data/lib/stripe/params/confirmation_token_create_params.rb +2 -2
  10. data/lib/stripe/params/customer_create_params.rb +1 -1
  11. data/lib/stripe/params/customer_update_params.rb +1 -1
  12. data/lib/stripe/params/invoice_create_params.rb +17 -1
  13. data/lib/stripe/params/invoice_create_preview_params.rb +6 -2
  14. data/lib/stripe/params/invoice_update_params.rb +17 -1
  15. data/lib/stripe/params/payment_intent_capture_params.rb +4 -0
  16. data/lib/stripe/params/payment_intent_confirm_params.rb +6 -2
  17. data/lib/stripe/params/payment_intent_create_params.rb +6 -2
  18. data/lib/stripe/params/payment_intent_decrement_authorization_params.rb +4 -0
  19. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +4 -0
  20. data/lib/stripe/params/payment_intent_update_params.rb +6 -2
  21. data/lib/stripe/params/payment_link_create_params.rb +1 -1
  22. data/lib/stripe/params/payment_link_update_params.rb +1 -1
  23. data/lib/stripe/params/payment_method_create_params.rb +2 -2
  24. data/lib/stripe/params/payout_create_params.rb +21 -1
  25. data/lib/stripe/params/product_catalog/trial_offer_list_params.rb +4 -0
  26. data/lib/stripe/params/radar/billing_evaluation_create_params.rb +1 -1
  27. data/lib/stripe/params/setup_intent_confirm_params.rb +2 -2
  28. data/lib/stripe/params/setup_intent_create_params.rb +2 -2
  29. data/lib/stripe/params/setup_intent_update_params.rb +2 -2
  30. data/lib/stripe/params/subscription_create_params.rb +16 -0
  31. data/lib/stripe/params/subscription_item_update_params.rb +2 -2
  32. data/lib/stripe/params/subscription_update_params.rb +18 -2
  33. data/lib/stripe/params/tax/form_list_params.rb +1 -1
  34. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +2 -2
  35. data/lib/stripe/params/v2/billing/contract_create_params.rb +4 -1
  36. data/lib/stripe/params/v2/billing/contract_update_params.rb +8 -2
  37. data/lib/stripe/params/v2/core/vault/network_token_create_from_credential_params.rb +33 -0
  38. data/lib/stripe/params/v2/core/vault/network_token_create_params.rb +59 -0
  39. data/lib/stripe/params/v2/core/vault/network_token_generate_cryptogram_params.rb +19 -0
  40. data/lib/stripe/params/v2/core/vault/network_token_retrieve_params.rb +12 -0
  41. data/lib/stripe/params/v2/money_management/financial_address_create_params.rb +23 -20
  42. data/lib/stripe/params/v2/money_management/financial_address_list_params.rb +1 -4
  43. data/lib/stripe/params/v2/money_management/financial_address_retrieve_params.rb +1 -8
  44. data/lib/stripe/params/v2/payments/off_session_payment_create_params.rb +5 -1
  45. data/lib/stripe/params/v2/signals/account_activity_create_params.rb +14 -0
  46. data/lib/stripe/params.rb +10 -0
  47. data/lib/stripe/resources/account_session.rb +1 -28
  48. data/lib/stripe/resources/apps/install.rb +115 -0
  49. data/lib/stripe/resources/capital/financing_summary.rb +1 -3
  50. data/lib/stripe/resources/charge.rb +6 -14
  51. data/lib/stripe/resources/checkout/session.rb +20 -2
  52. data/lib/stripe/resources/delegated_checkout/requested_session.rb +1 -1
  53. data/lib/stripe/resources/dispute.rb +30 -1
  54. data/lib/stripe/resources/identity/verification_report.rb +116 -0
  55. data/lib/stripe/resources/invoice.rb +21 -2
  56. data/lib/stripe/resources/invoice_item.rb +1 -1
  57. data/lib/stripe/resources/invoice_payment.rb +1 -1
  58. data/lib/stripe/resources/issuing/authorization.rb +2 -0
  59. data/lib/stripe/resources/mandate.rb +1 -1
  60. data/lib/stripe/resources/payment_attempt_record.rb +34 -2
  61. data/lib/stripe/resources/payment_intent.rb +2 -0
  62. data/lib/stripe/resources/payment_intent_amount_details_line_item.rb +2 -0
  63. data/lib/stripe/resources/payment_link.rb +1 -1
  64. data/lib/stripe/resources/payment_record.rb +34 -2
  65. data/lib/stripe/resources/quote_preview_invoice.rb +19 -1
  66. data/lib/stripe/resources/radar/billing_evaluation.rb +1 -1
  67. data/lib/stripe/resources/radar/payment_evaluation.rb +44 -2
  68. data/lib/stripe/resources/subscription.rb +19 -1
  69. data/lib/stripe/resources/tax/calculation.rb +2 -0
  70. data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
  71. data/lib/stripe/resources/tax/form.rb +1 -1
  72. data/lib/stripe/resources/tax/registration.rb +27 -417
  73. data/lib/stripe/resources/tax/transaction.rb +2 -0
  74. data/lib/stripe/resources/tax/transaction_line_item.rb +1 -0
  75. data/lib/stripe/resources/v2/billing/contract.rb +2 -0
  76. data/lib/stripe/resources/v2/core/event_notification.rb +15 -1
  77. data/lib/stripe/resources/v2/core/fee_batch.rb +10 -20
  78. data/lib/stripe/resources/v2/core/fee_entry.rb +4 -8
  79. data/lib/stripe/resources/v2/core/vault/network_token.rb +61 -0
  80. data/lib/stripe/resources/v2/money_management/financial_address.rb +107 -120
  81. data/lib/stripe/resources/v2/money_management/inbound_transfer.rb +5 -5
  82. data/lib/stripe/resources/v2/money_management/received_credit.rb +148 -10
  83. data/lib/stripe/resources/v2/payments/off_session_payment.rb +95 -1
  84. data/lib/stripe/resources/v2/signals/account_activity.rb +17 -0
  85. data/lib/stripe/resources.rb +5 -0
  86. data/lib/stripe/services/account_session_service.rb +1 -1
  87. data/lib/stripe/services/charge_service.rb +2 -8
  88. data/lib/stripe/services/financial_connections/account_service.rb +1 -1
  89. data/lib/stripe/services/financial_connections/authorization_service.rb +1 -1
  90. data/lib/stripe/services/invoice_service.rb +2 -1
  91. data/lib/stripe/services/payment_intent_service.rb +1 -1
  92. data/lib/stripe/services/v2/billing/contract_service.rb +7 -0
  93. data/lib/stripe/services/v2/core/vault/network_token_service.rb +68 -0
  94. data/lib/stripe/services/v2/core/vault_service.rb +2 -1
  95. data/lib/stripe/services/v2/money_management/financial_address_service.rb +3 -3
  96. data/lib/stripe/services/v2/money_management/payout_intent_service.rb +2 -0
  97. data/lib/stripe/services.rb +2 -0
  98. data/lib/stripe/stripe_context.rb +7 -1
  99. data/lib/stripe/version.rb +1 -1
  100. data/lib/stripe/webhook.rb +8 -0
  101. data/rbi/stripe/stripe_client.rbi +1 -1
  102. data/rbi/stripe.rbi +2307 -1870
  103. metadata +9 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e72679f32a96c0a30876ebb8c6fa8b6f6a58c1ebc15983a8c5a2fc4a6df9fcc6
4
- data.tar.gz: 97d5bd4a5f71d248c727f6c940762032e091848cde9a3db3065c2b3eea99f532
3
+ metadata.gz: eac9924e9724217da0f571411f89bb1ab1c724eea8413b236386c0020676bfce
4
+ data.tar.gz: eefe6fbed8d00c749a71dff21422b5d5dddb741fae8734b2451a288766dda934
5
5
  SHA512:
6
- metadata.gz: a3dded822a0d955deaecbb53a6e7c66a629ff3006a5d6851a4389bc9e07bada9e813c8bef4479971d100dd8aa178856fc18e4246680b155198c6ac8ec428cf12
7
- data.tar.gz: 21e7ada5f86507b7685a808a3f701de698b94ca2c3005667f06cb69a6d4f1265e6dfb92cd7ed4ab46995576ab882e5b406d41b0d8fddf824177903efba4ec1f1
6
+ metadata.gz: 6f86d1bcf5728d15b1a6f71a8d5ab9a70f638dd7abba0bf546201dd1fd35b5218eedfb499f0c55b87351ca9b63fc2eaa8db694e723ae1b8a9a8617e50eaf4fa5
7
+ data.tar.gz: 0143eef0447c1b9d37ba78bc4751cc00330ba34bd4e4ddb33efac33fd9613d9023eaee12f351ea97ec48d9d755ef13d82ae4ef153f0da86057eaa4df3cf11a98
@@ -889,6 +889,8 @@ module Stripe
889
889
 
890
890
  when "invalid_payout_method"
891
891
  InvalidPayoutMethodError.new(error_data[:message], **opts)
892
+ when "merchant_not_gated"
893
+ MerchantNotGatedError.new(error_data[:message], **opts)
892
894
  when "non_zero_balance"
893
895
  NonZeroBalanceError.new(error_data[:message], **opts)
894
896
  when "not_cancelable"
@@ -1118,6 +1120,7 @@ module Stripe
1118
1120
  %w[CODEX_CI codex_cli],
1119
1121
  %w[CURSOR_AGENT cursor],
1120
1122
  %w[GEMINI_CLI gemini_cli],
1123
+ %w[HERMES_AGENT hermes],
1121
1124
  %w[OPENCLAW_SHELL openclaw],
1122
1125
  %w[OPENCODE open_code],
1123
1126
  # aiAgents: The end of the section generated from our OpenAPI spec
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module ApiVersion
6
- CURRENT = "2026-08-26.preview"
6
+ CURRENT = "2026-09-16.preview"
7
7
  CURRENT_MAJOR = ""
8
8
  end
9
9
  end
data/lib/stripe/errors.rb CHANGED
@@ -243,6 +243,9 @@ module Stripe
243
243
  class InvalidPayoutMethodError < StripeError
244
244
  end
245
245
 
246
+ class MerchantNotGatedError < StripeError
247
+ end
248
+
246
249
  class NonZeroBalanceError < StripeError
247
250
  end
248
251
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Stripe
5
5
  module Events
6
- # Occurs when an SetupIntent has successfully setup a payment method.
6
+ # Occurs when a SetupIntent has successfully setup a payment method.
7
7
  class V1SetupIntentSucceededEvent < Stripe::V2::Core::Event
8
8
  def self.lookup_type
9
9
  "v1.setup_intent.succeeded"
@@ -21,7 +21,7 @@ module Stripe
21
21
  attr_reader :related_object
22
22
  end
23
23
 
24
- # Occurs when an SetupIntent has successfully setup a payment method.
24
+ # Occurs when a SetupIntent has successfully setup a payment method.
25
25
  class V1SetupIntentSucceededEventNotification < Stripe::V2::Core::EventNotification
26
26
  def self.lookup_type
27
27
  "v1.setup_intent.succeeded"
@@ -21,6 +21,7 @@ module Stripe
21
21
  Application.object_name => Application,
22
22
  ApplicationFee.object_name => ApplicationFee,
23
23
  ApplicationFeeRefund.object_name => ApplicationFeeRefund,
24
+ Apps::Install.object_name => Apps::Install,
24
25
  Apps::Secret.object_name => Apps::Secret,
25
26
  Balance.object_name => Balance,
26
27
  BalanceSettings.object_name => BalanceSettings,
@@ -278,6 +279,7 @@ module Stripe
278
279
  V2::Core::Health::Alert.object_name => V2::Core::Health::Alert,
279
280
  V2::Core::Health::AlertHistoryEntry.object_name => V2::Core::Health::AlertHistoryEntry,
280
281
  V2::Core::Vault::GbBankAccount.object_name => V2::Core::Vault::GbBankAccount,
282
+ V2::Core::Vault::NetworkToken.object_name => V2::Core::Vault::NetworkToken,
281
283
  V2::Core::Vault::UsBankAccount.object_name => V2::Core::Vault::UsBankAccount,
282
284
  V2::Data::Analytics::MetricQueryResult.object_name => V2::Data::Analytics::MetricQueryResult,
283
285
  V2::Data::Reporting::QueryRun.object_name => V2::Data::Reporting::QueryRun,
@@ -273,7 +273,7 @@ module Stripe
273
273
  end
274
274
 
275
275
  class Label < ::Stripe::RequestParams
276
- # Custom text for the label, displayed to the customer. Up to 50 characters.
276
+ # Custom text for the label, displayed to the customer. Up to 100 characters.
277
277
  attr_accessor :custom
278
278
  # The type of the label.
279
279
  attr_accessor :type
@@ -592,6 +592,15 @@ module Stripe
592
592
  end
593
593
 
594
594
  class Item < ::Stripe::RequestParams
595
+ class CurrentTrial < ::Stripe::RequestParams
596
+ # The ID of the trial offer to apply to the subscription item.
597
+ attr_accessor :trial_offer
598
+
599
+ def initialize(trial_offer: nil)
600
+ @trial_offer = trial_offer
601
+ end
602
+ end
603
+
595
604
  class PriceData < ::Stripe::RequestParams
596
605
  class ProductData < ::Stripe::RequestParams
597
606
  class TaxDetails < ::Stripe::RequestParams
@@ -687,6 +696,8 @@ module Stripe
687
696
  @field_encodings = { unit_amount_decimal: :decimal_string }
688
697
  end
689
698
  end
699
+ # The trial offer to apply to this subscription item.
700
+ attr_accessor :current_trial
690
701
  # The ID of the [Price](https://docs.stripe.com/api/prices). One of `price` or `price_data` is required.
691
702
  attr_accessor :price
692
703
  # Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
@@ -694,7 +705,8 @@ module Stripe
694
705
  # Quantity for this item.
695
706
  attr_accessor :quantity
696
707
 
697
- def initialize(price: nil, price_data: nil, quantity: nil)
708
+ def initialize(current_trial: nil, price: nil, price_data: nil, quantity: nil)
709
+ @current_trial = current_trial
698
710
  @price = price
699
711
  @price_data = price_data
700
712
  @quantity = quantity
@@ -735,6 +747,8 @@ module Stripe
735
747
  @end_behavior = end_behavior
736
748
  end
737
749
  end
750
+ # A past timestamp to backdate the subscription's start date to.
751
+ attr_accessor :backdate_start_date
738
752
  # Configures when the subscription schedule's billing cycle anchors to a specific day of the week or month.
739
753
  attr_accessor :billing_cycle_anchor_config
740
754
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
@@ -757,6 +771,7 @@ module Stripe
757
771
  attr_accessor :trial_settings
758
772
 
759
773
  def initialize(
774
+ backdate_start_date: nil,
760
775
  billing_cycle_anchor_config: nil,
761
776
  billing_mode: nil,
762
777
  description: nil,
@@ -768,6 +783,7 @@ module Stripe
768
783
  trial_period_days: nil,
769
784
  trial_settings: nil
770
785
  )
786
+ @backdate_start_date = backdate_start_date
771
787
  @billing_cycle_anchor_config = billing_cycle_anchor_config
772
788
  @billing_mode = billing_mode
773
789
  @description = description
@@ -1367,11 +1383,19 @@ module Stripe
1367
1383
  attr_accessor :setup_future_usage
1368
1384
  # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
1369
1385
  attr_accessor :target_date
1386
+ # Attribute for param field verification_method
1387
+ attr_accessor :verification_method
1370
1388
 
1371
- def initialize(mandate_options: nil, setup_future_usage: nil, target_date: nil)
1389
+ def initialize(
1390
+ mandate_options: nil,
1391
+ setup_future_usage: nil,
1392
+ target_date: nil,
1393
+ verification_method: nil
1394
+ )
1372
1395
  @mandate_options = mandate_options
1373
1396
  @setup_future_usage = setup_future_usage
1374
1397
  @target_date = target_date
1398
+ @verification_method = verification_method
1375
1399
  end
1376
1400
  end
1377
1401
 
@@ -3080,7 +3104,7 @@ module Stripe
3080
3104
  #
3081
3105
  # 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.
3082
3106
  #
3083
- # You can't set this parameter if `ui_mode` is `custom`.
3107
+ # You can't set this parameter if `ui_mode` is `elements` or `form`.
3084
3108
  attr_accessor :optional_items
3085
3109
  # Where the user is coming from. This informs the optimizations that are applied to the session. You can't set this parameter if `ui_mode` is `elements`.
3086
3110
  attr_accessor :origin_context
@@ -530,9 +530,9 @@ module Stripe
530
530
  attr_accessor :line_items
531
531
  # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
532
532
  attr_accessor :metadata
533
- # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
533
+ # A subset of parameters to apply to the PaymentIntent for Checkout Sessions in `payment` mode.
534
534
  #
535
- # You can only update these parameters when `ui_mode` is `elements` and while the session is active.
535
+ # You can only update these parameters when `ui_mode` is `elements` and while the session is active. If the PaymentIntent requires customer action or confirmation, updating these parameters abandons the current payment attempt and returns the PaymentIntent to `requires_payment_method`. You can't update these parameters after the PaymentIntent begins processing, requires capture, succeeds, or is canceled.
536
536
  attr_accessor :payment_intent_data
537
537
  # The shipping rate options to apply to this Session. Up to a maximum of 5.
538
538
  attr_accessor :shipping_options
@@ -417,9 +417,9 @@ module Stripe
417
417
  attr_accessor :alipay
418
418
  # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
419
419
  attr_accessor :allow_redisplay
420
- # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
420
+ # If this is an Alma PaymentMethod, this hash contains details about the Alma payment method.
421
421
  attr_accessor :alma
422
- # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
422
+ # If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
423
423
  attr_accessor :amazon_pay
424
424
  # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
425
425
  attr_accessor :au_becs_debit
@@ -175,7 +175,7 @@ module Stripe
175
175
  attr_accessor :expand
176
176
  # The customer's full name. This may be up to *150 characters*.
177
177
  attr_accessor :individual_name
178
- # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
178
+ # The prefix for the customer used to generate unique invoice numbers. Must be 1–12 uppercase letters or numbers.
179
179
  attr_accessor :invoice_prefix
180
180
  # Default invoice settings for this customer.
181
181
  attr_accessor :invoice_settings
@@ -169,7 +169,7 @@ module Stripe
169
169
  attr_accessor :expand
170
170
  # The customer's full name. This may be up to *150 characters*.
171
171
  attr_accessor :individual_name
172
- # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
172
+ # The prefix for the customer used to generate unique invoice numbers. Must be 1–12 uppercase letters or numbers.
173
173
  attr_accessor :invoice_prefix
174
174
  # Default invoice settings for this customer.
175
175
  attr_accessor :invoice_settings
@@ -154,6 +154,18 @@ module Stripe
154
154
  end
155
155
  end
156
156
 
157
+ class BacsDebit < ::Stripe::RequestParams
158
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
159
+ attr_accessor :target_date
160
+ # Attribute for param field verification_method
161
+ attr_accessor :verification_method
162
+
163
+ def initialize(target_date: nil, verification_method: nil)
164
+ @target_date = target_date
165
+ @verification_method = verification_method
166
+ end
167
+ end
168
+
157
169
  class Bancontact < ::Stripe::RequestParams
158
170
  # Preferred language of the Bancontact authorization page that the customer is redirected to.
159
171
  attr_accessor :preferred_language
@@ -421,6 +433,8 @@ module Stripe
421
433
  end
422
434
  # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
423
435
  attr_accessor :acss_debit
436
+ # If paying by `bacs_debit`, this sub-hash contains details about the Bacs Direct Debit payment method options to pass to the invoice’s PaymentIntent.
437
+ attr_accessor :bacs_debit
424
438
  # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
425
439
  attr_accessor :bancontact
426
440
  # If paying by `billie`, this sub-hash contains details about the Billie payment method options to pass to the invoice’s PaymentIntent.
@@ -454,6 +468,7 @@ module Stripe
454
468
 
455
469
  def initialize(
456
470
  acss_debit: nil,
471
+ bacs_debit: nil,
457
472
  bancontact: nil,
458
473
  billie: nil,
459
474
  bizum: nil,
@@ -471,6 +486,7 @@ module Stripe
471
486
  wechat_pay: nil
472
487
  )
473
488
  @acss_debit = acss_debit
489
+ @bacs_debit = bacs_debit
474
490
  @bancontact = bancontact
475
491
  @billie = billie
476
492
  @bizum = bizum
@@ -752,7 +768,7 @@ module Stripe
752
768
  attr_accessor :payment_settings
753
769
  # How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted.
754
770
  attr_accessor :pending_invoice_items_behavior
755
- # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
771
+ # The rendering-related settings that control how invoices render in customer-facing interfaces such as the PDF or hosted invoice page.
756
772
  attr_accessor :rendering
757
773
  # Settings for the cost of shipping for this invoice.
758
774
  attr_accessor :shipping_cost
@@ -2277,9 +2277,9 @@ module Stripe
2277
2277
  attr_accessor :metadata
2278
2278
  # Plan ID for this item, as a string.
2279
2279
  attr_accessor :plan
2280
- # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
2280
+ # The ID of the price object. You can use either `price` or `price_data`, but not both, to set or change this item's price. If you're updating an existing item without changing its price, omit both. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
2281
2281
  attr_accessor :price
2282
- # Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
2282
+ # Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. You can use either `price` or `price_data`, but not both, to set or change this item's price. If you're updating an existing item without changing its price, omit both.
2283
2283
  attr_accessor :price_data
2284
2284
  # Quantity for this item.
2285
2285
  attr_accessor :quantity
@@ -2481,6 +2481,8 @@ module Stripe
2481
2481
  attr_accessor :on_behalf_of
2482
2482
  # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
2483
2483
  attr_accessor :preview_mode
2484
+ # A pricing token whose presentment currency and exchange rate are used to convert the amounts on the previewed invoice into the customer-facing presentment currency. When omitted, amounts are returned in the settlement currency.
2485
+ attr_accessor :pricing_token
2484
2486
  # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
2485
2487
  attr_accessor :schedule
2486
2488
  # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
@@ -2503,6 +2505,7 @@ module Stripe
2503
2505
  issuer: nil,
2504
2506
  on_behalf_of: nil,
2505
2507
  preview_mode: nil,
2508
+ pricing_token: nil,
2506
2509
  schedule: nil,
2507
2510
  schedule_details: nil,
2508
2511
  subscription: nil,
@@ -2520,6 +2523,7 @@ module Stripe
2520
2523
  @issuer = issuer
2521
2524
  @on_behalf_of = on_behalf_of
2522
2525
  @preview_mode = preview_mode
2526
+ @pricing_token = pricing_token
2523
2527
  @schedule = schedule
2524
2528
  @schedule_details = schedule_details
2525
2529
  @subscription = subscription
@@ -133,6 +133,18 @@ module Stripe
133
133
  end
134
134
  end
135
135
 
136
+ class BacsDebit < ::Stripe::RequestParams
137
+ # Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now.
138
+ attr_accessor :target_date
139
+ # Attribute for param field verification_method
140
+ attr_accessor :verification_method
141
+
142
+ def initialize(target_date: nil, verification_method: nil)
143
+ @target_date = target_date
144
+ @verification_method = verification_method
145
+ end
146
+ end
147
+
136
148
  class Bancontact < ::Stripe::RequestParams
137
149
  # Preferred language of the Bancontact authorization page that the customer is redirected to.
138
150
  attr_accessor :preferred_language
@@ -400,6 +412,8 @@ module Stripe
400
412
  end
401
413
  # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent.
402
414
  attr_accessor :acss_debit
415
+ # If paying by `bacs_debit`, this sub-hash contains details about the Bacs Direct Debit payment method options to pass to the invoice’s PaymentIntent.
416
+ attr_accessor :bacs_debit
403
417
  # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent.
404
418
  attr_accessor :bancontact
405
419
  # If paying by `billie`, this sub-hash contains details about the Billie payment method options to pass to the invoice’s PaymentIntent.
@@ -433,6 +447,7 @@ module Stripe
433
447
 
434
448
  def initialize(
435
449
  acss_debit: nil,
450
+ bacs_debit: nil,
436
451
  bancontact: nil,
437
452
  billie: nil,
438
453
  bizum: nil,
@@ -450,6 +465,7 @@ module Stripe
450
465
  wechat_pay: nil
451
466
  )
452
467
  @acss_debit = acss_debit
468
+ @bacs_debit = bacs_debit
453
469
  @bancontact = bancontact
454
470
  @billie = billie
455
471
  @bizum = bizum
@@ -719,7 +735,7 @@ module Stripe
719
735
  attr_accessor :on_behalf_of
720
736
  # Configuration settings for the PaymentIntent that is generated when the invoice is finalized.
721
737
  attr_accessor :payment_settings
722
- # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page.
738
+ # The rendering-related settings that control how invoices render in customer-facing interfaces such as the PDF or hosted invoice page.
723
739
  attr_accessor :rendering
724
740
  # Settings for the cost of shipping for this invoice.
725
741
  attr_accessor :shipping_cost
@@ -164,6 +164,8 @@ module Stripe
164
164
  attr_accessor :tax
165
165
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
166
166
  attr_accessor :unit_cost
167
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
168
+ attr_accessor :unit_cost_precision
167
169
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
168
170
  attr_accessor :unit_of_measure
169
171
 
@@ -176,6 +178,7 @@ module Stripe
176
178
  quantity_precision: nil,
177
179
  tax: nil,
178
180
  unit_cost: nil,
181
+ unit_cost_precision: nil,
179
182
  unit_of_measure: nil
180
183
  )
181
184
  @discount_amount = discount_amount
@@ -186,6 +189,7 @@ module Stripe
186
189
  @quantity_precision = quantity_precision
187
190
  @tax = tax
188
191
  @unit_cost = unit_cost
192
+ @unit_cost_precision = unit_cost_precision
189
193
  @unit_of_measure = unit_of_measure
190
194
  end
191
195
  end
@@ -173,6 +173,8 @@ module Stripe
173
173
  attr_accessor :tax
174
174
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
175
175
  attr_accessor :unit_cost
176
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
177
+ attr_accessor :unit_cost_precision
176
178
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
177
179
  attr_accessor :unit_of_measure
178
180
 
@@ -185,6 +187,7 @@ module Stripe
185
187
  quantity_precision: nil,
186
188
  tax: nil,
187
189
  unit_cost: nil,
190
+ unit_cost_precision: nil,
188
191
  unit_of_measure: nil
189
192
  )
190
193
  @discount_amount = discount_amount
@@ -195,6 +198,7 @@ module Stripe
195
198
  @quantity_precision = quantity_precision
196
199
  @tax = tax
197
200
  @unit_cost = unit_cost
201
+ @unit_cost_precision = unit_cost_precision
198
202
  @unit_of_measure = unit_of_measure
199
203
  end
200
204
  end
@@ -2712,9 +2716,9 @@ module Stripe
2712
2716
  attr_accessor :alipay
2713
2717
  # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
2714
2718
  attr_accessor :allow_redisplay
2715
- # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
2719
+ # If this is an Alma PaymentMethod, this hash contains details about the Alma payment method.
2716
2720
  attr_accessor :alma
2717
- # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
2721
+ # If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
2718
2722
  attr_accessor :amazon_pay
2719
2723
  # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
2720
2724
  attr_accessor :au_becs_debit
@@ -173,6 +173,8 @@ module Stripe
173
173
  attr_accessor :tax
174
174
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
175
175
  attr_accessor :unit_cost
176
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
177
+ attr_accessor :unit_cost_precision
176
178
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
177
179
  attr_accessor :unit_of_measure
178
180
 
@@ -185,6 +187,7 @@ module Stripe
185
187
  quantity_precision: nil,
186
188
  tax: nil,
187
189
  unit_cost: nil,
190
+ unit_cost_precision: nil,
188
191
  unit_of_measure: nil
189
192
  )
190
193
  @discount_amount = discount_amount
@@ -195,6 +198,7 @@ module Stripe
195
198
  @quantity_precision = quantity_precision
196
199
  @tax = tax
197
200
  @unit_cost = unit_cost
201
+ @unit_cost_precision = unit_cost_precision
198
202
  @unit_of_measure = unit_of_measure
199
203
  end
200
204
  end
@@ -2726,9 +2730,9 @@ module Stripe
2726
2730
  attr_accessor :alipay
2727
2731
  # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
2728
2732
  attr_accessor :allow_redisplay
2729
- # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
2733
+ # If this is an Alma PaymentMethod, this hash contains details about the Alma payment method.
2730
2734
  attr_accessor :alma
2731
- # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
2735
+ # If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
2732
2736
  attr_accessor :amazon_pay
2733
2737
  # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
2734
2738
  attr_accessor :au_becs_debit
@@ -164,6 +164,8 @@ module Stripe
164
164
  attr_accessor :tax
165
165
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
166
166
  attr_accessor :unit_cost
167
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
168
+ attr_accessor :unit_cost_precision
167
169
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
168
170
  attr_accessor :unit_of_measure
169
171
 
@@ -176,6 +178,7 @@ module Stripe
176
178
  quantity_precision: nil,
177
179
  tax: nil,
178
180
  unit_cost: nil,
181
+ unit_cost_precision: nil,
179
182
  unit_of_measure: nil
180
183
  )
181
184
  @discount_amount = discount_amount
@@ -186,6 +189,7 @@ module Stripe
186
189
  @quantity_precision = quantity_precision
187
190
  @tax = tax
188
191
  @unit_cost = unit_cost
192
+ @unit_cost_precision = unit_cost_precision
189
193
  @unit_of_measure = unit_of_measure
190
194
  end
191
195
  end
@@ -164,6 +164,8 @@ module Stripe
164
164
  attr_accessor :tax
165
165
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
166
166
  attr_accessor :unit_cost
167
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
168
+ attr_accessor :unit_cost_precision
167
169
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
168
170
  attr_accessor :unit_of_measure
169
171
 
@@ -176,6 +178,7 @@ module Stripe
176
178
  quantity_precision: nil,
177
179
  tax: nil,
178
180
  unit_cost: nil,
181
+ unit_cost_precision: nil,
179
182
  unit_of_measure: nil
180
183
  )
181
184
  @discount_amount = discount_amount
@@ -186,6 +189,7 @@ module Stripe
186
189
  @quantity_precision = quantity_precision
187
190
  @tax = tax
188
191
  @unit_cost = unit_cost
192
+ @unit_cost_precision = unit_cost_precision
189
193
  @unit_of_measure = unit_of_measure
190
194
  end
191
195
  end
@@ -173,6 +173,8 @@ module Stripe
173
173
  attr_accessor :tax
174
174
  # The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
175
175
  attr_accessor :unit_cost
176
+ # The number of decimal places implied in the unit_cost. For example, if unit_cost is 10000 and unit_cost_precision is 1, the actual unit cost is 1000.0. Defaults to 0 if not provided.
177
+ attr_accessor :unit_cost_precision
176
178
  # A unit of measure for the line item, such as gallons, feet, meters, etc.
177
179
  attr_accessor :unit_of_measure
178
180
 
@@ -185,6 +187,7 @@ module Stripe
185
187
  quantity_precision: nil,
186
188
  tax: nil,
187
189
  unit_cost: nil,
190
+ unit_cost_precision: nil,
188
191
  unit_of_measure: nil
189
192
  )
190
193
  @discount_amount = discount_amount
@@ -195,6 +198,7 @@ module Stripe
195
198
  @quantity_precision = quantity_precision
196
199
  @tax = tax
197
200
  @unit_cost = unit_cost
201
+ @unit_cost_precision = unit_cost_precision
198
202
  @unit_of_measure = unit_of_measure
199
203
  end
200
204
  end
@@ -2704,9 +2708,9 @@ module Stripe
2704
2708
  attr_accessor :alipay
2705
2709
  # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
2706
2710
  attr_accessor :allow_redisplay
2707
- # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
2711
+ # If this is an Alma PaymentMethod, this hash contains details about the Alma payment method.
2708
2712
  attr_accessor :alma
2709
- # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
2713
+ # If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
2710
2714
  attr_accessor :amazon_pay
2711
2715
  # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
2712
2716
  attr_accessor :au_becs_debit
@@ -127,7 +127,7 @@ module Stripe
127
127
  end
128
128
 
129
129
  class Label < ::Stripe::RequestParams
130
- # Custom text for the label, displayed to the customer. Up to 50 characters.
130
+ # Custom text for the label, displayed to the customer. Up to 100 characters.
131
131
  attr_accessor :custom
132
132
  # The type of the label.
133
133
  attr_accessor :type
@@ -112,7 +112,7 @@ module Stripe
112
112
  end
113
113
 
114
114
  class Label < ::Stripe::RequestParams
115
- # Custom text for the label, displayed to the customer. Up to 50 characters.
115
+ # Custom text for the label, displayed to the customer. Up to 100 characters.
116
116
  attr_accessor :custom
117
117
  # The type of the label.
118
118
  attr_accessor :type
@@ -465,9 +465,9 @@ module Stripe
465
465
  attr_accessor :alipay
466
466
  # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
467
467
  attr_accessor :allow_redisplay
468
- # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
468
+ # If this is an Alma PaymentMethod, this hash contains details about the Alma payment method.
469
469
  attr_accessor :alma
470
- # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
470
+ # If this is an AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
471
471
  attr_accessor :amazon_pay
472
472
  # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
473
473
  attr_accessor :au_becs_debit
@@ -3,7 +3,23 @@
3
3
 
4
4
  module Stripe
5
5
  class PayoutCreateParams < ::Stripe::RequestParams
6
- # A positive integer in cents representing how much to payout.
6
+ class PayoutMethodOptions < ::Stripe::RequestParams
7
+ class FinancialAccount < ::Stripe::RequestParams
8
+ # Identifies the currency to credit in the destination Financial Account. Must be a currency supported by the target Financial Account. When omitted, the payout uses the currency parameter.
9
+ attr_accessor :destination_currency
10
+
11
+ def initialize(destination_currency: nil)
12
+ @destination_currency = destination_currency
13
+ end
14
+ end
15
+ # Additional options for a Financial Account payout method. Only valid when payout_method is a Financial Account ID.
16
+ attr_accessor :financial_account
17
+
18
+ def initialize(financial_account: nil)
19
+ @financial_account = financial_account
20
+ end
21
+ end
22
+ # A positive integer in cents representing how much to pay out.
7
23
  attr_accessor :amount
8
24
  # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
9
25
  attr_accessor :currency
@@ -19,6 +35,8 @@ module Stripe
19
35
  attr_accessor :method
20
36
  # The ID of a v2 FinancialAccount to send funds to.
21
37
  attr_accessor :payout_method
38
+ # Additional options that complement the payout_method. The keys in this dictionary identify the type of payout method the options apply to.
39
+ attr_accessor :payout_method_options
22
40
  # The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`.
23
41
  attr_accessor :source_type
24
42
  # A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. For US ACH payouts, this maps to the ACH Company Entry Description field, which the NACHA standard limits to 10 characters. Stripe truncates descriptors longer than 10 characters for US ACH payouts.
@@ -33,6 +51,7 @@ module Stripe
33
51
  metadata: nil,
34
52
  method: nil,
35
53
  payout_method: nil,
54
+ payout_method_options: nil,
36
55
  source_type: nil,
37
56
  statement_descriptor: nil
38
57
  )
@@ -44,6 +63,7 @@ module Stripe
44
63
  @metadata = metadata
45
64
  @method = method
46
65
  @payout_method = payout_method
66
+ @payout_method_options = payout_method_options
47
67
  @source_type = source_type
48
68
  @statement_descriptor = statement_descriptor
49
69
  end