stripe 15.5.0.pre.beta.2 → 15.6.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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +53 -1
  4. data/OPENAPI_VERSION +1 -1
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_requestor.rb +18 -18
  7. data/lib/stripe/api_version.rb +1 -1
  8. data/lib/stripe/errors.rb +23 -23
  9. data/lib/stripe/resources/account.rb +2 -2
  10. data/lib/stripe/resources/account_session.rb +94 -13
  11. data/lib/stripe/resources/balance.rb +2 -7
  12. data/lib/stripe/resources/balance_settings.rb +72 -65
  13. data/lib/stripe/resources/billing/meter.rb +2 -2
  14. data/lib/stripe/resources/billing/meter_usage_row.rb +1 -1
  15. data/lib/stripe/resources/billing_portal/configuration.rb +12 -2
  16. data/lib/stripe/resources/charge.rb +40 -5
  17. data/lib/stripe/resources/checkout/session.rb +109 -5
  18. data/lib/stripe/resources/credit_note.rb +3 -3
  19. data/lib/stripe/resources/dispute.rb +1 -1
  20. data/lib/stripe/resources/file.rb +1 -1
  21. data/lib/stripe/resources/file_link.rb +1 -1
  22. data/lib/stripe/resources/invoice.rb +44 -1
  23. data/lib/stripe/resources/invoice_payment.rb +1 -1
  24. data/lib/stripe/resources/issuing/card.rb +8 -0
  25. data/lib/stripe/resources/mandate.rb +65 -1
  26. data/lib/stripe/resources/payment_attempt_record.rb +90 -10
  27. data/lib/stripe/resources/payment_intent.rb +182 -4
  28. data/lib/stripe/resources/payment_link.rb +1 -1
  29. data/lib/stripe/resources/payment_method.rb +2 -0
  30. data/lib/stripe/resources/payment_record.rb +111 -14
  31. data/lib/stripe/resources/promotion_code.rb +5 -2
  32. data/lib/stripe/resources/quote_preview_invoice.rb +1 -1
  33. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +24 -0
  34. data/lib/stripe/resources/setup_attempt.rb +4 -1
  35. data/lib/stripe/resources/setup_intent.rb +194 -1
  36. data/lib/stripe/resources/subscription.rb +107 -9
  37. data/lib/stripe/resources/subscription_schedule.rb +124 -2
  38. data/lib/stripe/resources/terminal/configuration.rb +82 -0
  39. data/lib/stripe/resources/terminal/reader.rb +22 -0
  40. data/lib/stripe/resources/v2/core/account.rb +8 -0
  41. data/lib/stripe/resources/v2/money_management/financial_account.rb +2 -0
  42. data/lib/stripe/resources/v2/money_management/outbound_payment_quote.rb +1 -1
  43. data/lib/stripe/resources/v2/money_management/transaction.rb +2 -0
  44. data/lib/stripe/resources/v2/money_management/transaction_entry.rb +2 -0
  45. data/lib/stripe/services/account_session_service.rb +64 -13
  46. data/lib/stripe/services/balance_settings_service.rb +44 -41
  47. data/lib/stripe/services/billing/meter_service.rb +1 -1
  48. data/lib/stripe/services/billing_portal/configuration_service.rb +10 -2
  49. data/lib/stripe/services/checkout/session_service.rb +86 -4
  50. data/lib/stripe/services/credit_note_preview_lines_service.rb +1 -1
  51. data/lib/stripe/services/credit_note_service.rb +2 -2
  52. data/lib/stripe/services/customer_service.rb +4 -4
  53. data/lib/stripe/services/file_link_service.rb +1 -1
  54. data/lib/stripe/services/file_service.rb +1 -1
  55. data/lib/stripe/services/invoice_payment_service.rb +1 -1
  56. data/lib/stripe/services/invoice_service.rb +43 -0
  57. data/lib/stripe/services/issuing/card_service.rb +8 -0
  58. data/lib/stripe/services/mandate_service.rb +40 -0
  59. data/lib/stripe/services/payment_attempt_record_service.rb +4 -1
  60. data/lib/stripe/services/payment_intent_service.rb +157 -3
  61. data/lib/stripe/services/payment_link_service.rb +1 -1
  62. data/lib/stripe/services/payment_record_service.rb +25 -5
  63. data/lib/stripe/services/quote_service.rb +4 -4
  64. data/lib/stripe/services/setup_intent_service.rb +153 -0
  65. data/lib/stripe/services/subscription_schedule_service.rb +100 -2
  66. data/lib/stripe/services/subscription_service.rb +107 -9
  67. data/lib/stripe/services/terminal/configuration_service.rb +64 -0
  68. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +22 -0
  69. data/lib/stripe/services/v1_services.rb +5 -5
  70. data/lib/stripe/services/v2/billing_service.rb +2 -2
  71. data/lib/stripe/services/v2/core/account_service.rb +16 -2
  72. data/lib/stripe/services/v2/core_service.rb +3 -3
  73. data/lib/stripe/services/v2/money_management/financial_account_service.rb +4 -1
  74. data/lib/stripe/services/v2/money_management_service.rb +3 -3
  75. data/lib/stripe/stripe_service.rb +3 -1
  76. data/lib/stripe/version.rb +1 -1
  77. data/rbi/stripe.rbi +142341 -140132
  78. metadata +2 -2
@@ -97,6 +97,19 @@ module Stripe
97
97
  end
98
98
  end
99
99
 
100
+ class BalanceReport < Stripe::RequestParams
101
+ class Features < Stripe::RequestParams; end
102
+ # Whether the embedded component is enabled.
103
+ attr_accessor :enabled
104
+ # An empty list, because this embedded component has no features.
105
+ attr_accessor :features
106
+
107
+ def initialize(enabled: nil, features: nil)
108
+ @enabled = enabled
109
+ @features = features
110
+ end
111
+ end
112
+
100
113
  class Balances < Stripe::RequestParams
101
114
  class Features < Stripe::RequestParams
102
115
  # 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`.
@@ -139,7 +152,7 @@ module Stripe
139
152
  class Features < Stripe::RequestParams; end
140
153
  # Whether the embedded component is enabled.
141
154
  attr_accessor :enabled
142
- # The list of features enabled in the embedded component.
155
+ # An empty list, because this embedded component has no features.
143
156
  attr_accessor :features
144
157
 
145
158
  def initialize(enabled: nil, features: nil)
@@ -152,7 +165,7 @@ module Stripe
152
165
  class Features < Stripe::RequestParams; end
153
166
  # Whether the embedded component is enabled.
154
167
  attr_accessor :enabled
155
- # The list of features enabled in the embedded component.
168
+ # An empty list, because this embedded component has no features.
156
169
  attr_accessor :features
157
170
 
158
171
  def initialize(enabled: nil, features: nil)
@@ -165,7 +178,7 @@ module Stripe
165
178
  class Features < Stripe::RequestParams; end
166
179
  # Whether the embedded component is enabled.
167
180
  attr_accessor :enabled
168
- # The list of features enabled in the embedded component.
181
+ # An empty list, because this embedded component has no features.
169
182
  attr_accessor :features
170
183
 
171
184
  def initialize(enabled: nil, features: nil)
@@ -178,7 +191,7 @@ module Stripe
178
191
  class Features < Stripe::RequestParams; end
179
192
  # Whether the embedded component is enabled.
180
193
  attr_accessor :enabled
181
- # The list of features enabled in the embedded component.
194
+ # An empty list, because this embedded component has no features.
182
195
  attr_accessor :features
183
196
 
184
197
  def initialize(enabled: nil, features: nil)
@@ -225,7 +238,7 @@ module Stripe
225
238
  class Features < Stripe::RequestParams; end
226
239
  # Whether the embedded component is enabled.
227
240
  attr_accessor :enabled
228
- # The list of features enabled in the embedded component.
241
+ # An empty list, because this embedded component has no features.
229
242
  attr_accessor :features
230
243
 
231
244
  def initialize(enabled: nil, features: nil)
@@ -238,7 +251,7 @@ module Stripe
238
251
  class Features < Stripe::RequestParams; end
239
252
  # Whether the embedded component is enabled.
240
253
  attr_accessor :enabled
241
- # The list of features enabled in the embedded component.
254
+ # An empty list, because this embedded component has no features.
242
255
  attr_accessor :features
243
256
 
244
257
  def initialize(enabled: nil, features: nil)
@@ -497,7 +510,7 @@ module Stripe
497
510
  class Features < Stripe::RequestParams; end
498
511
  # Whether the embedded component is enabled.
499
512
  attr_accessor :enabled
500
- # The list of features enabled in the embedded component.
513
+ # An empty list, because this embedded component has no features.
501
514
  attr_accessor :features
502
515
 
503
516
  def initialize(enabled: nil, features: nil)
@@ -540,6 +553,32 @@ module Stripe
540
553
  end
541
554
  end
542
555
 
556
+ class PayoutDetails < Stripe::RequestParams
557
+ class Features < Stripe::RequestParams; end
558
+ # Whether the embedded component is enabled.
559
+ attr_accessor :enabled
560
+ # An empty list, because this embedded component has no features.
561
+ attr_accessor :features
562
+
563
+ def initialize(enabled: nil, features: nil)
564
+ @enabled = enabled
565
+ @features = features
566
+ end
567
+ end
568
+
569
+ class PayoutReconciliationReport < Stripe::RequestParams
570
+ class Features < Stripe::RequestParams; end
571
+ # Whether the embedded component is enabled.
572
+ attr_accessor :enabled
573
+ # An empty list, because this embedded component has no features.
574
+ attr_accessor :features
575
+
576
+ def initialize(enabled: nil, features: nil)
577
+ @enabled = enabled
578
+ @features = features
579
+ end
580
+ end
581
+
543
582
  class Payouts < Stripe::RequestParams
544
583
  class Features < Stripe::RequestParams
545
584
  # 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`.
@@ -582,7 +621,7 @@ module Stripe
582
621
  class Features < Stripe::RequestParams; end
583
622
  # Whether the embedded component is enabled.
584
623
  attr_accessor :enabled
585
- # The list of features enabled in the embedded component.
624
+ # An empty list, because this embedded component has no features.
586
625
  attr_accessor :features
587
626
 
588
627
  def initialize(enabled: nil, features: nil)
@@ -595,7 +634,7 @@ module Stripe
595
634
  class Features < Stripe::RequestParams; end
596
635
  # Whether the embedded component is enabled.
597
636
  attr_accessor :enabled
598
- # The list of features enabled in the embedded component.
637
+ # An empty list, because this embedded component has no features.
599
638
  attr_accessor :features
600
639
 
601
640
  def initialize(enabled: nil, features: nil)
@@ -628,7 +667,7 @@ module Stripe
628
667
  class Features < Stripe::RequestParams; end
629
668
  # Whether the embedded component is enabled.
630
669
  attr_accessor :enabled
631
- # The list of features enabled in the embedded component.
670
+ # An empty list, because this embedded component has no features.
632
671
  attr_accessor :features
633
672
 
634
673
  def initialize(enabled: nil, features: nil)
@@ -641,7 +680,7 @@ module Stripe
641
680
  class Features < Stripe::RequestParams; end
642
681
  # Whether the embedded component is enabled.
643
682
  attr_accessor :enabled
644
- # The list of features enabled in the embedded component.
683
+ # An empty list, because this embedded component has no features.
645
684
  attr_accessor :features
646
685
 
647
686
  def initialize(enabled: nil, features: nil)
@@ -654,7 +693,7 @@ module Stripe
654
693
  class Features < Stripe::RequestParams; end
655
694
  # Whether the embedded component is enabled.
656
695
  attr_accessor :enabled
657
- # The list of features enabled in the embedded component.
696
+ # An empty list, because this embedded component has no features.
658
697
  attr_accessor :features
659
698
 
660
699
  def initialize(enabled: nil, features: nil)
@@ -667,7 +706,7 @@ module Stripe
667
706
  class Features < Stripe::RequestParams; end
668
707
  # Whether the embedded component is enabled.
669
708
  attr_accessor :enabled
670
- # The list of features enabled in the embedded component.
709
+ # An empty list, because this embedded component has no features.
671
710
  attr_accessor :features
672
711
 
673
712
  def initialize(enabled: nil, features: nil)
@@ -683,6 +722,8 @@ module Stripe
683
722
  attr_accessor :app_install
684
723
  # Configuration for the [app viewport](/connect/supported-embedded-components/app-viewport/) embedded component.
685
724
  attr_accessor :app_viewport
725
+ # Configuration for the [balance report](/connect/supported-embedded-components/financial-reports#balance-report) embedded component.
726
+ attr_accessor :balance_report
686
727
  # Configuration for the [balances](/connect/supported-embedded-components/balances/) embedded component.
687
728
  attr_accessor :balances
688
729
  # Configuration for the [Capital financing](/connect/supported-embedded-components/capital-financing/) embedded component.
@@ -719,6 +760,10 @@ module Stripe
719
760
  attr_accessor :payment_method_settings
720
761
  # Configuration for the [payments](/connect/supported-embedded-components/payments/) embedded component.
721
762
  attr_accessor :payments
763
+ # Configuration for the [payout details](/connect/supported-embedded-components/payout-details/) embedded component.
764
+ attr_accessor :payout_details
765
+ # Configuration for the [payout reconciliation report](/connect/supported-embedded-components/financial-reports#payout-reconciliation-report) embedded component.
766
+ attr_accessor :payout_reconciliation_report
722
767
  # Configuration for the [payouts](/connect/supported-embedded-components/payouts/) embedded component.
723
768
  attr_accessor :payouts
724
769
  # Configuration for the [payouts list](/connect/supported-embedded-components/payouts-list/) embedded component.
@@ -741,6 +786,7 @@ module Stripe
741
786
  account_onboarding: nil,
742
787
  app_install: nil,
743
788
  app_viewport: nil,
789
+ balance_report: nil,
744
790
  balances: nil,
745
791
  capital_financing: nil,
746
792
  capital_financing_application: nil,
@@ -759,6 +805,8 @@ module Stripe
759
805
  payment_disputes: nil,
760
806
  payment_method_settings: nil,
761
807
  payments: nil,
808
+ payout_details: nil,
809
+ payout_reconciliation_report: nil,
762
810
  payouts: nil,
763
811
  payouts_list: nil,
764
812
  product_tax_code_selector: nil,
@@ -772,6 +820,7 @@ module Stripe
772
820
  @account_onboarding = account_onboarding
773
821
  @app_install = app_install
774
822
  @app_viewport = app_viewport
823
+ @balance_report = balance_report
775
824
  @balances = balances
776
825
  @capital_financing = capital_financing
777
826
  @capital_financing_application = capital_financing_application
@@ -790,6 +839,8 @@ module Stripe
790
839
  @payment_disputes = payment_disputes
791
840
  @payment_method_settings = payment_method_settings
792
841
  @payments = payments
842
+ @payout_details = payout_details
843
+ @payout_reconciliation_report = payout_reconciliation_report
793
844
  @payouts = payouts
794
845
  @payouts_list = payouts_list
795
846
  @product_tax_code_selector = product_tax_code_selector
@@ -13,59 +13,62 @@ module Stripe
13
13
  end
14
14
 
15
15
  class UpdateParams < Stripe::RequestParams
16
- class Payouts < Stripe::RequestParams
17
- class Schedule < Stripe::RequestParams
18
- # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
19
- attr_accessor :interval
20
- # The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
21
- attr_accessor :monthly_payout_days
22
- # The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly`.)
23
- attr_accessor :weekly_payout_days
16
+ class Payments < Stripe::RequestParams
17
+ class Payouts < Stripe::RequestParams
18
+ class Schedule < Stripe::RequestParams
19
+ # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
20
+ attr_accessor :interval
21
+ # The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`.
22
+ attr_accessor :monthly_payout_days
23
+ # The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. (required and applicable only if `interval` is `weekly`.)
24
+ attr_accessor :weekly_payout_days
24
25
 
25
- def initialize(interval: nil, monthly_payout_days: nil, weekly_payout_days: nil)
26
- @interval = interval
27
- @monthly_payout_days = monthly_payout_days
28
- @weekly_payout_days = weekly_payout_days
26
+ def initialize(interval: nil, monthly_payout_days: nil, weekly_payout_days: nil)
27
+ @interval = interval
28
+ @monthly_payout_days = monthly_payout_days
29
+ @weekly_payout_days = weekly_payout_days
30
+ end
29
31
  end
30
- end
31
- # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
32
- attr_accessor :schedule
33
- # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
34
- attr_accessor :statement_descriptor
32
+ # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation.
33
+ attr_accessor :schedule
34
+ # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard.
35
+ attr_accessor :statement_descriptor
35
36
 
36
- def initialize(schedule: nil, statement_descriptor: nil)
37
- @schedule = schedule
38
- @statement_descriptor = statement_descriptor
37
+ def initialize(schedule: nil, statement_descriptor: nil)
38
+ @schedule = schedule
39
+ @statement_descriptor = statement_descriptor
40
+ end
39
41
  end
40
- end
41
42
 
42
- class SettlementTiming < Stripe::RequestParams
43
- # The number of days charge funds are held before becoming available. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `payouts.schedule.interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
44
- attr_accessor :delay_days_override
43
+ class SettlementTiming < Stripe::RequestParams
44
+ # The number of days charge funds are held before becoming available. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `payouts.schedule.interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule).
45
+ attr_accessor :delay_days_override
45
46
 
46
- def initialize(delay_days_override: nil)
47
- @delay_days_override = delay_days_override
47
+ def initialize(delay_days_override: nil)
48
+ @delay_days_override = delay_days_override
49
+ end
50
+ end
51
+ # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
52
+ attr_accessor :debit_negative_balances
53
+ # Settings specific to the account's payouts.
54
+ attr_accessor :payouts
55
+ # Settings related to the account's balance settlement timing.
56
+ attr_accessor :settlement_timing
57
+
58
+ def initialize(debit_negative_balances: nil, payouts: nil, settlement_timing: nil)
59
+ @debit_negative_balances = debit_negative_balances
60
+ @payouts = payouts
61
+ @settlement_timing = settlement_timing
48
62
  end
49
63
  end
50
- # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances).
51
- attr_accessor :debit_negative_balances
52
64
  # Specifies which fields in the response should be expanded.
53
65
  attr_accessor :expand
54
- # Settings specific to the account's payouts.
55
- attr_accessor :payouts
56
- # Settings related to the account's balance settlement timing.
57
- attr_accessor :settlement_timing
66
+ # Settings that apply to the [Payments Balance](https://docs.stripe.com/api/balance).
67
+ attr_accessor :payments
58
68
 
59
- def initialize(
60
- debit_negative_balances: nil,
61
- expand: nil,
62
- payouts: nil,
63
- settlement_timing: nil
64
- )
65
- @debit_negative_balances = debit_negative_balances
69
+ def initialize(expand: nil, payments: nil)
66
70
  @expand = expand
67
- @payouts = payouts
68
- @settlement_timing = settlement_timing
71
+ @payments = payments
69
72
  end
70
73
  end
71
74
 
@@ -76,7 +76,7 @@ module Stripe
76
76
  attr_accessor :display_name
77
77
  # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
78
78
  attr_accessor :event_name
79
- # The time window to pre-aggregate meter events for, if any.
79
+ # The time window which meter events have been pre-aggregated for, if any.
80
80
  attr_accessor :event_time_window
81
81
  # Specifies which fields in the response should be expanded.
82
82
  attr_accessor :expand
@@ -233,6 +233,8 @@ module Stripe
233
233
  attr_accessor :login_page
234
234
  # Set of [key-value pairs](https://stripe.com/docs/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`.
235
235
  attr_accessor :metadata
236
+ # The name of the configuration.
237
+ attr_accessor :name
236
238
 
237
239
  def initialize(
238
240
  business_profile: nil,
@@ -240,7 +242,8 @@ module Stripe
240
242
  expand: nil,
241
243
  features: nil,
242
244
  login_page: nil,
243
- metadata: nil
245
+ metadata: nil,
246
+ name: nil
244
247
  )
245
248
  @business_profile = business_profile
246
249
  @default_return_url = default_return_url
@@ -248,6 +251,7 @@ module Stripe
248
251
  @features = features
249
252
  @login_page = login_page
250
253
  @metadata = metadata
254
+ @name = name
251
255
  end
252
256
  end
253
257
 
@@ -462,6 +466,8 @@ module Stripe
462
466
  attr_accessor :login_page
463
467
  # Set of [key-value pairs](https://stripe.com/docs/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`.
464
468
  attr_accessor :metadata
469
+ # The name of the configuration.
470
+ attr_accessor :name
465
471
 
466
472
  def initialize(
467
473
  active: nil,
@@ -470,7 +476,8 @@ module Stripe
470
476
  expand: nil,
471
477
  features: nil,
472
478
  login_page: nil,
473
- metadata: nil
479
+ metadata: nil,
480
+ name: nil
474
481
  )
475
482
  @active = active
476
483
  @business_profile = business_profile
@@ -479,6 +486,7 @@ module Stripe
479
486
  @features = features
480
487
  @login_page = login_page
481
488
  @metadata = metadata
489
+ @name = name
482
490
  end
483
491
  end
484
492
 
@@ -94,7 +94,7 @@ module Stripe
94
94
 
95
95
  class CreateParams < Stripe::RequestParams
96
96
  class AdaptivePricing < Stripe::RequestParams
97
- # Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing).
97
+ # If set to `true`, Adaptive Pricing is available on [eligible sessions](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing?payment-ui=stripe-hosted#restrictions). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing).
98
98
  attr_accessor :enabled
99
99
 
100
100
  def initialize(enabled: nil)
@@ -355,13 +355,46 @@ module Stripe
355
355
  end
356
356
 
357
357
  class Discount < Stripe::RequestParams
358
+ class CouponData < Stripe::RequestParams
359
+ # A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
360
+ attr_accessor :amount_off
361
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).
362
+ attr_accessor :currency
363
+ # Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
364
+ attr_accessor :duration
365
+ # Set of [key-value pairs](https://stripe.com/docs/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`.
366
+ attr_accessor :metadata
367
+ # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
368
+ attr_accessor :name
369
+ # A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).
370
+ attr_accessor :percent_off
371
+
372
+ def initialize(
373
+ amount_off: nil,
374
+ currency: nil,
375
+ duration: nil,
376
+ metadata: nil,
377
+ name: nil,
378
+ percent_off: nil
379
+ )
380
+ @amount_off = amount_off
381
+ @currency = currency
382
+ @duration = duration
383
+ @metadata = metadata
384
+ @name = name
385
+ @percent_off = percent_off
386
+ end
387
+ end
358
388
  # The ID of the coupon to apply to this Session.
359
389
  attr_accessor :coupon
390
+ # Data used to generate a new [Coupon](https://stripe.com/docs/api/coupon) object inline. One of `coupon` or `coupon_data` is required when updating discounts.
391
+ attr_accessor :coupon_data
360
392
  # The ID of a promotion code to apply to this Session.
361
393
  attr_accessor :promotion_code
362
394
 
363
- def initialize(coupon: nil, promotion_code: nil)
395
+ def initialize(coupon: nil, coupon_data: nil, promotion_code: nil)
364
396
  @coupon = coupon
397
+ @coupon_data = coupon_data
365
398
  @promotion_code = promotion_code
366
399
  end
367
400
  end
@@ -1487,8 +1520,50 @@ module Stripe
1487
1520
  end
1488
1521
 
1489
1522
  class Pix < Stripe::RequestParams
1523
+ class MandateOptions < Stripe::RequestParams
1524
+ # Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
1525
+ attr_accessor :amount
1526
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
1527
+ attr_accessor :amount_includes_iof
1528
+ # Type of amount. Defaults to `maximum`.
1529
+ attr_accessor :amount_type
1530
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
1531
+ attr_accessor :currency
1532
+ # Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
1533
+ attr_accessor :end_date
1534
+ # Schedule at which the future payments will be charged. Defaults to `weekly`.
1535
+ attr_accessor :payment_schedule
1536
+ # Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
1537
+ attr_accessor :reference
1538
+ # Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
1539
+ attr_accessor :start_date
1540
+
1541
+ def initialize(
1542
+ amount: nil,
1543
+ amount_includes_iof: nil,
1544
+ amount_type: nil,
1545
+ currency: nil,
1546
+ end_date: nil,
1547
+ payment_schedule: nil,
1548
+ reference: nil,
1549
+ start_date: nil
1550
+ )
1551
+ @amount = amount
1552
+ @amount_includes_iof = amount_includes_iof
1553
+ @amount_type = amount_type
1554
+ @currency = currency
1555
+ @end_date = end_date
1556
+ @payment_schedule = payment_schedule
1557
+ @reference = reference
1558
+ @start_date = start_date
1559
+ end
1560
+ end
1561
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
1562
+ attr_accessor :amount_includes_iof
1490
1563
  # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
1491
1564
  attr_accessor :expires_after_seconds
1565
+ # Additional fields for mandate creation.
1566
+ attr_accessor :mandate_options
1492
1567
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1493
1568
  #
1494
1569
  # 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.
@@ -1498,8 +1573,15 @@ module Stripe
1498
1573
  # 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).
1499
1574
  attr_accessor :setup_future_usage
1500
1575
 
1501
- def initialize(expires_after_seconds: nil, setup_future_usage: nil)
1576
+ def initialize(
1577
+ amount_includes_iof: nil,
1578
+ expires_after_seconds: nil,
1579
+ mandate_options: nil,
1580
+ setup_future_usage: nil
1581
+ )
1582
+ @amount_includes_iof = amount_includes_iof
1502
1583
  @expires_after_seconds = expires_after_seconds
1584
+ @mandate_options = mandate_options
1503
1585
  @setup_future_usage = setup_future_usage
1504
1586
  end
1505
1587
  end
@@ -2252,7 +2334,7 @@ module Stripe
2252
2334
  #
2253
2335
  # 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.
2254
2336
  attr_accessor :optional_items
2255
- # 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`.
2337
+ # Where the user is coming from. This informs the optimizations that are applied to the session.
2256
2338
  attr_accessor :origin_context
2257
2339
  # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
2258
2340
  attr_accessor :payment_intent_data
@@ -64,7 +64,7 @@ module Stripe
64
64
  class Refund < Stripe::RequestParams
65
65
  # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
66
66
  attr_accessor :amount_refunded
67
- # ID of an existing refund to link this credit note to.
67
+ # ID of an existing refund to link this credit note to. Required when `type` is `refund`.
68
68
  attr_accessor :refund
69
69
 
70
70
  def initialize(amount_refunded: nil, refund: nil)
@@ -128,7 +128,7 @@ module Stripe
128
128
  class Refund < Stripe::RequestParams
129
129
  # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
130
130
  attr_accessor :amount_refunded
131
- # ID of an existing refund to link this credit note to.
131
+ # ID of an existing refund to link this credit note to. Required when `type` is `refund`.
132
132
  attr_accessor :refund
133
133
 
134
134
  def initialize(amount_refunded: nil, refund: nil)
@@ -292,7 +292,7 @@ module Stripe
292
292
  class Refund < Stripe::RequestParams
293
293
  # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
294
294
  attr_accessor :amount_refunded
295
- # ID of an existing refund to link this credit note to.
295
+ # ID of an existing refund to link this credit note to. Required when `type` is `refund`.
296
296
  attr_accessor :refund
297
297
 
298
298
  def initialize(amount_refunded: nil, refund: nil)
@@ -3,17 +3,17 @@
3
3
 
4
4
  module Stripe
5
5
  class CustomerService < StripeService
6
- attr_reader :cash_balance, :balance_transactions, :cash_balance_transactions, :payment_sources, :tax_ids, :payment_methods, :funding_instructions
6
+ attr_reader :balance_transactions, :cash_balance, :cash_balance_transactions, :funding_instructions, :payment_methods, :payment_sources, :tax_ids
7
7
 
8
8
  def initialize(requestor)
9
9
  super
10
- @cash_balance = Stripe::CustomerCashBalanceService.new(@requestor)
11
10
  @balance_transactions = Stripe::CustomerBalanceTransactionService.new(@requestor)
11
+ @cash_balance = Stripe::CustomerCashBalanceService.new(@requestor)
12
12
  @cash_balance_transactions = Stripe::CustomerCashBalanceTransactionService.new(@requestor)
13
+ @funding_instructions = Stripe::CustomerFundingInstructionsService.new(@requestor)
14
+ @payment_methods = Stripe::CustomerPaymentMethodService.new(@requestor)
13
15
  @payment_sources = Stripe::CustomerPaymentSourceService.new(@requestor)
14
16
  @tax_ids = Stripe::CustomerTaxIdService.new(@requestor)
15
- @payment_methods = Stripe::CustomerPaymentMethodService.new(@requestor)
16
- @funding_instructions = Stripe::CustomerFundingInstructionsService.new(@requestor)
17
17
  end
18
18
 
19
19
  class DeleteParams < Stripe::RequestParams; end
@@ -60,7 +60,7 @@ module Stripe
60
60
  attr_accessor :expand
61
61
  # The link isn't usable after this future timestamp.
62
62
  attr_accessor :expires_at
63
- # The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
63
+ # The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, `terminal_android_apk`, or `terminal_reader_splashscreen`.
64
64
  attr_accessor :file
65
65
  # Set of [key-value pairs](https://stripe.com/docs/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`.
66
66
  attr_accessor :metadata
@@ -53,7 +53,7 @@ module Stripe
53
53
 
54
54
  class CreateParams < Stripe::RequestParams
55
55
  class FileLinkData < Stripe::RequestParams
56
- # Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
56
+ # Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, `terminal_android_apk`, or `terminal_reader_splashscreen`.
57
57
  attr_accessor :create
58
58
  # The link isn't available after this future timestamp.
59
59
  attr_accessor :expires_at
@@ -7,7 +7,7 @@ module Stripe
7
7
  class Payment < Stripe::RequestParams
8
8
  # Only return invoice payments associated by this payment intent ID.
9
9
  attr_accessor :payment_intent
10
- # Attribute for param field payment_record
10
+ # Only return invoice payments associated by this payment record ID.
11
11
  attr_accessor :payment_record
12
12
  # Only return invoice payments associated by this payment type.
13
13
  attr_accessor :type