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
@@ -15,91 +15,98 @@ module Stripe
15
15
  "balance_settings"
16
16
  end
17
17
 
18
- class Payouts < Stripe::StripeObject
19
- class Schedule < Stripe::StripeObject
20
- # How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.
21
- attr_reader :interval
22
- # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.
23
- attr_reader :monthly_payout_days
24
- # The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly.
25
- attr_reader :weekly_payout_days
18
+ class Payments < Stripe::StripeObject
19
+ class Payouts < Stripe::StripeObject
20
+ class Schedule < Stripe::StripeObject
21
+ # How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`.
22
+ attr_reader :interval
23
+ # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months.
24
+ attr_reader :monthly_payout_days
25
+ # The days of the week when available funds are paid out, specified as an array, for example, [`monday`, `tuesday`]. Only shown if `interval` is weekly.
26
+ attr_reader :weekly_payout_days
27
+ end
28
+ # Details on when funds from charges are available, and when they are paid out to an external account. See our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation for details.
29
+ attr_reader :schedule
30
+ # 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.
31
+ attr_reader :statement_descriptor
32
+ # Whether the funds in this account can be paid out.
33
+ attr_reader :status
26
34
  end
27
- # Details on when funds from charges are available, and when they are paid out to an external account. See our [Setting Bank and Debit Card Payouts](https://stripe.com/docs/connect/bank-transfers#payout-information) documentation for details.
28
- attr_reader :schedule
29
- # 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.
30
- attr_reader :statement_descriptor
31
- # Whether the funds in this account can be paid out.
32
- attr_reader :status
33
- end
34
35
 
35
- class SettlementTiming < Stripe::StripeObject
36
- # The number of days charge funds are held before becoming available.
37
- attr_reader :delay_days
36
+ class SettlementTiming < Stripe::StripeObject
37
+ # The number of days charge funds are held before becoming available.
38
+ attr_reader :delay_days
39
+ end
40
+ # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`.
41
+ attr_reader :debit_negative_balances
42
+ # Settings specific to the account's payouts.
43
+ attr_reader :payouts
44
+ # Attribute for field settlement_timing
45
+ attr_reader :settlement_timing
38
46
  end
39
47
 
40
48
  class UpdateParams < Stripe::RequestParams
41
- class Payouts < Stripe::RequestParams
42
- class Schedule < Stripe::RequestParams
43
- # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
44
- attr_accessor :interval
45
- # 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`.
46
- attr_accessor :monthly_payout_days
47
- # 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`.)
48
- attr_accessor :weekly_payout_days
49
+ class Payments < Stripe::RequestParams
50
+ class Payouts < Stripe::RequestParams
51
+ class Schedule < Stripe::RequestParams
52
+ # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`.
53
+ attr_accessor :interval
54
+ # 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`.
55
+ attr_accessor :monthly_payout_days
56
+ # 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`.)
57
+ attr_accessor :weekly_payout_days
49
58
 
50
- def initialize(interval: nil, monthly_payout_days: nil, weekly_payout_days: nil)
51
- @interval = interval
52
- @monthly_payout_days = monthly_payout_days
53
- @weekly_payout_days = weekly_payout_days
59
+ def initialize(interval: nil, monthly_payout_days: nil, weekly_payout_days: nil)
60
+ @interval = interval
61
+ @monthly_payout_days = monthly_payout_days
62
+ @weekly_payout_days = weekly_payout_days
63
+ end
54
64
  end
55
- end
56
- # 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.
57
- attr_accessor :schedule
58
- # 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.
59
- attr_accessor :statement_descriptor
65
+ # 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.
66
+ attr_accessor :schedule
67
+ # 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.
68
+ attr_accessor :statement_descriptor
60
69
 
61
- def initialize(schedule: nil, statement_descriptor: nil)
62
- @schedule = schedule
63
- @statement_descriptor = statement_descriptor
70
+ def initialize(schedule: nil, statement_descriptor: nil)
71
+ @schedule = schedule
72
+ @statement_descriptor = statement_descriptor
73
+ end
64
74
  end
65
- end
66
75
 
67
- class SettlementTiming < Stripe::RequestParams
68
- # 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).
69
- attr_accessor :delay_days_override
76
+ class SettlementTiming < Stripe::RequestParams
77
+ # 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).
78
+ attr_accessor :delay_days_override
79
+
80
+ def initialize(delay_days_override: nil)
81
+ @delay_days_override = delay_days_override
82
+ end
83
+ end
84
+ # 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).
85
+ attr_accessor :debit_negative_balances
86
+ # Settings specific to the account's payouts.
87
+ attr_accessor :payouts
88
+ # Settings related to the account's balance settlement timing.
89
+ attr_accessor :settlement_timing
70
90
 
71
- def initialize(delay_days_override: nil)
72
- @delay_days_override = delay_days_override
91
+ def initialize(debit_negative_balances: nil, payouts: nil, settlement_timing: nil)
92
+ @debit_negative_balances = debit_negative_balances
93
+ @payouts = payouts
94
+ @settlement_timing = settlement_timing
73
95
  end
74
96
  end
75
- # 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).
76
- attr_accessor :debit_negative_balances
77
97
  # Specifies which fields in the response should be expanded.
78
98
  attr_accessor :expand
79
- # Settings specific to the account's payouts.
80
- attr_accessor :payouts
81
- # Settings related to the account's balance settlement timing.
82
- attr_accessor :settlement_timing
99
+ # Settings that apply to the [Payments Balance](https://docs.stripe.com/api/balance).
100
+ attr_accessor :payments
83
101
 
84
- def initialize(
85
- debit_negative_balances: nil,
86
- expand: nil,
87
- payouts: nil,
88
- settlement_timing: nil
89
- )
90
- @debit_negative_balances = debit_negative_balances
102
+ def initialize(expand: nil, payments: nil)
91
103
  @expand = expand
92
- @payouts = payouts
93
- @settlement_timing = settlement_timing
104
+ @payments = payments
94
105
  end
95
106
  end
96
- # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`.
97
- attr_reader :debit_negative_balances
98
107
  # String representing the object's type. Objects of the same type share the same value.
99
108
  attr_reader :object
100
- # Settings specific to the account's payouts.
101
- attr_reader :payouts
102
- # Attribute for field settlement_timing
103
- attr_reader :settlement_timing
109
+ # Attribute for field payments
110
+ attr_reader :payments
104
111
  end
105
112
  end
@@ -108,7 +108,7 @@ module Stripe
108
108
  attr_accessor :display_name
109
109
  # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
110
110
  attr_accessor :event_name
111
- # The time window to pre-aggregate meter events for, if any.
111
+ # The time window which meter events have been pre-aggregated for, if any.
112
112
  attr_accessor :event_time_window
113
113
  # Specifies which fields in the response should be expanded.
114
114
  attr_accessor :expand
@@ -173,7 +173,7 @@ module Stripe
173
173
  attr_reader :display_name
174
174
  # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
175
175
  attr_reader :event_name
176
- # The time window to pre-aggregate meter events for, if any.
176
+ # The time window which meter events have been pre-aggregated for, if any.
177
177
  attr_reader :event_time_window
178
178
  # Unique identifier for the object.
179
179
  attr_reader :id
@@ -19,7 +19,7 @@ module Stripe
19
19
  attr_reader :dimensions
20
20
  # Unique identifier for the object.
21
21
  attr_reader :id
22
- # The unique identifier for the meter.
22
+ # The unique identifier for the meter. Null if no meters were provided and usage was aggregated across all meters.
23
23
  attr_reader :meter_id
24
24
  # String representing the object's type. Objects of the same type share the same value.
25
25
  attr_reader :object
@@ -345,6 +345,8 @@ module Stripe
345
345
  attr_accessor :login_page
346
346
  # 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`.
347
347
  attr_accessor :metadata
348
+ # The name of the configuration.
349
+ attr_accessor :name
348
350
 
349
351
  def initialize(
350
352
  business_profile: nil,
@@ -352,7 +354,8 @@ module Stripe
352
354
  expand: nil,
353
355
  features: nil,
354
356
  login_page: nil,
355
- metadata: nil
357
+ metadata: nil,
358
+ name: nil
356
359
  )
357
360
  @business_profile = business_profile
358
361
  @default_return_url = default_return_url
@@ -360,6 +363,7 @@ module Stripe
360
363
  @features = features
361
364
  @login_page = login_page
362
365
  @metadata = metadata
366
+ @name = name
363
367
  end
364
368
  end
365
369
 
@@ -565,6 +569,8 @@ module Stripe
565
569
  attr_accessor :login_page
566
570
  # 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`.
567
571
  attr_accessor :metadata
572
+ # The name of the configuration.
573
+ attr_accessor :name
568
574
 
569
575
  def initialize(
570
576
  active: nil,
@@ -573,7 +579,8 @@ module Stripe
573
579
  expand: nil,
574
580
  features: nil,
575
581
  login_page: nil,
576
- metadata: nil
582
+ metadata: nil,
583
+ name: nil
577
584
  )
578
585
  @active = active
579
586
  @business_profile = business_profile
@@ -582,6 +589,7 @@ module Stripe
582
589
  @features = features
583
590
  @login_page = login_page
584
591
  @metadata = metadata
592
+ @name = name
585
593
  end
586
594
  end
587
595
  # Whether the configuration is active and can be used to create portal sessions.
@@ -606,6 +614,8 @@ module Stripe
606
614
  attr_reader :login_page
607
615
  # 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.
608
616
  attr_reader :metadata
617
+ # The name of the configuration.
618
+ attr_reader :name
609
619
  # String representing the object's type. Objects of the same type share the same value.
610
620
  attr_reader :object
611
621
  # Time at which the object was last updated. Measured in seconds since the Unix epoch.
@@ -96,11 +96,11 @@ module Stripe
96
96
  attr_reader :advice_code
97
97
  # For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error.
98
98
  attr_reader :network_advice_code
99
- # For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed.
99
+ # For charges declined by the network, an alphanumeric code which indicates the reason the charge failed.
100
100
  attr_reader :network_decline_code
101
101
  # Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement.
102
102
  attr_reader :network_status
103
- # An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.
103
+ # An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges blocked because the payment is unlikely to be authorized have the value `low_probability_of_authorization`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details.
104
104
  attr_reader :reason
105
105
  # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar.
106
106
  attr_reader :risk_level
@@ -181,7 +181,16 @@ module Stripe
181
181
  attr_reader :transaction_id
182
182
  end
183
183
 
184
- class Alma < Stripe::StripeObject; end
184
+ class Alma < Stripe::StripeObject
185
+ class Installments < Stripe::StripeObject
186
+ # The number of installments.
187
+ attr_reader :count
188
+ end
189
+ # Attribute for field installments
190
+ attr_reader :installments
191
+ # The Alma transaction ID associated with this payment.
192
+ attr_reader :transaction_id
193
+ end
185
194
 
186
195
  class AmazonPay < Stripe::StripeObject
187
196
  class Funding < Stripe::StripeObject
@@ -208,6 +217,8 @@ module Stripe
208
217
  end
209
218
  # Attribute for field funding
210
219
  attr_reader :funding
220
+ # The Amazon Pay transaction ID associated with this payment.
221
+ attr_reader :transaction_id
211
222
  end
212
223
 
213
224
  class AuBecsDebit < Stripe::StripeObject
@@ -253,7 +264,10 @@ module Stripe
253
264
  attr_reader :verified_name
254
265
  end
255
266
 
256
- class Billie < Stripe::StripeObject; end
267
+ class Billie < Stripe::StripeObject
268
+ # The Billie transaction ID associated with this payment.
269
+ attr_reader :transaction_id
270
+ end
257
271
 
258
272
  class Blik < Stripe::StripeObject
259
273
  # A unique and immutable identifier assigned by BLIK to every buyer.
@@ -762,6 +776,8 @@ module Stripe
762
776
  class KakaoPay < Stripe::StripeObject
763
777
  # A unique identifier for the buyer as determined by the local payment processor.
764
778
  attr_reader :buyer_id
779
+ # The Kakao Pay transaction ID associated with this payment.
780
+ attr_reader :transaction_id
765
781
  end
766
782
 
767
783
  class Klarna < Stripe::StripeObject
@@ -799,6 +815,8 @@ module Stripe
799
815
  attr_reader :buyer_id
800
816
  # The last four digits of the card. This may not be present for American Express cards.
801
817
  attr_reader :last4
818
+ # The Korean Card transaction ID associated with this payment.
819
+ attr_reader :transaction_id
802
820
  end
803
821
 
804
822
  class Link < Stripe::StripeObject
@@ -836,6 +854,8 @@ module Stripe
836
854
  class NaverPay < Stripe::StripeObject
837
855
  # A unique identifier for the buyer as determined by the local payment processor.
838
856
  attr_reader :buyer_id
857
+ # The Naver Pay transaction ID associated with this payment.
858
+ attr_reader :transaction_id
839
859
  end
840
860
 
841
861
  class NzBankAccount < Stripe::StripeObject
@@ -874,9 +894,15 @@ module Stripe
874
894
  class Payco < Stripe::StripeObject
875
895
  # A unique identifier for the buyer as determined by the local payment processor.
876
896
  attr_reader :buyer_id
897
+ # The Payco transaction ID associated with this payment.
898
+ attr_reader :transaction_id
877
899
  end
878
900
 
879
901
  class Paynow < Stripe::StripeObject
902
+ # ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to.
903
+ attr_reader :location
904
+ # ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on.
905
+ attr_reader :reader
880
906
  # Reference number associated with this PayNow payment
881
907
  attr_reader :reference
882
908
  end
@@ -962,6 +988,8 @@ module Stripe
962
988
  class Pix < Stripe::StripeObject
963
989
  # Unique transaction id generated by BCB
964
990
  attr_reader :bank_transaction_id
991
+ # ID of the multi use Mandate generated by the PaymentIntent
992
+ attr_reader :mandate
965
993
  end
966
994
 
967
995
  class Promptpay < Stripe::StripeObject
@@ -997,14 +1025,21 @@ module Stripe
997
1025
  end
998
1026
  # Attribute for field funding
999
1027
  attr_reader :funding
1028
+ # The Revolut Pay transaction ID associated with this payment.
1029
+ attr_reader :transaction_id
1000
1030
  end
1001
1031
 
1002
1032
  class SamsungPay < Stripe::StripeObject
1003
1033
  # A unique identifier for the buyer as determined by the local payment processor.
1004
1034
  attr_reader :buyer_id
1035
+ # The Samsung Pay transaction ID associated with this payment.
1036
+ attr_reader :transaction_id
1005
1037
  end
1006
1038
 
1007
- class Satispay < Stripe::StripeObject; end
1039
+ class Satispay < Stripe::StripeObject
1040
+ # The Satispay transaction ID associated with this payment.
1041
+ attr_reader :transaction_id
1042
+ end
1008
1043
 
1009
1044
  class SepaCreditTransfer < Stripe::StripeObject
1010
1045
  # Name of the bank associated with the bank account.
@@ -28,7 +28,7 @@ module Stripe
28
28
  end
29
29
 
30
30
  class AdaptivePricing < Stripe::StripeObject
31
- # Whether Adaptive Pricing is enabled.
31
+ # If enabled, Adaptive Pricing is available on [eligible sessions](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing?payment-ui=stripe-hosted#restrictions).
32
32
  attr_reader :enabled
33
33
  end
34
34
 
@@ -795,8 +795,30 @@ module Stripe
795
795
  end
796
796
 
797
797
  class Pix < Stripe::StripeObject
798
+ class MandateOptions < Stripe::StripeObject
799
+ # Amount to be charged for future payments.
800
+ attr_reader :amount
801
+ # Determines if the amount includes the IOF tax.
802
+ attr_reader :amount_includes_iof
803
+ # Type of amount.
804
+ attr_reader :amount_type
805
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
806
+ attr_reader :currency
807
+ # Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`.
808
+ attr_reader :end_date
809
+ # Schedule at which the future payments will be charged.
810
+ attr_reader :payment_schedule
811
+ # Subscription name displayed to buyers in their bank app.
812
+ attr_reader :reference
813
+ # Start date of the mandate, in `YYYY-MM-DD`.
814
+ attr_reader :start_date
815
+ end
816
+ # Determines if the amount includes the IOF tax.
817
+ attr_reader :amount_includes_iof
798
818
  # The number of seconds after which Pix payment will expire.
799
819
  attr_reader :expires_after_seconds
820
+ # Attribute for field mandate_options
821
+ attr_reader :mandate_options
800
822
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
801
823
  #
802
824
  # 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.
@@ -1203,7 +1225,7 @@ module Stripe
1203
1225
 
1204
1226
  class CreateParams < Stripe::RequestParams
1205
1227
  class AdaptivePricing < Stripe::RequestParams
1206
- # 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).
1228
+ # 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).
1207
1229
  attr_accessor :enabled
1208
1230
 
1209
1231
  def initialize(enabled: nil)
@@ -1464,13 +1486,46 @@ module Stripe
1464
1486
  end
1465
1487
 
1466
1488
  class Discount < Stripe::RequestParams
1489
+ class CouponData < Stripe::RequestParams
1490
+ # A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
1491
+ attr_accessor :amount_off
1492
+ # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).
1493
+ attr_accessor :currency
1494
+ # Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
1495
+ attr_accessor :duration
1496
+ # 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`.
1497
+ attr_accessor :metadata
1498
+ # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
1499
+ attr_accessor :name
1500
+ # 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).
1501
+ attr_accessor :percent_off
1502
+
1503
+ def initialize(
1504
+ amount_off: nil,
1505
+ currency: nil,
1506
+ duration: nil,
1507
+ metadata: nil,
1508
+ name: nil,
1509
+ percent_off: nil
1510
+ )
1511
+ @amount_off = amount_off
1512
+ @currency = currency
1513
+ @duration = duration
1514
+ @metadata = metadata
1515
+ @name = name
1516
+ @percent_off = percent_off
1517
+ end
1518
+ end
1467
1519
  # The ID of the coupon to apply to this Session.
1468
1520
  attr_accessor :coupon
1521
+ # 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.
1522
+ attr_accessor :coupon_data
1469
1523
  # The ID of a promotion code to apply to this Session.
1470
1524
  attr_accessor :promotion_code
1471
1525
 
1472
- def initialize(coupon: nil, promotion_code: nil)
1526
+ def initialize(coupon: nil, coupon_data: nil, promotion_code: nil)
1473
1527
  @coupon = coupon
1528
+ @coupon_data = coupon_data
1474
1529
  @promotion_code = promotion_code
1475
1530
  end
1476
1531
  end
@@ -2596,8 +2651,50 @@ module Stripe
2596
2651
  end
2597
2652
 
2598
2653
  class Pix < Stripe::RequestParams
2654
+ class MandateOptions < Stripe::RequestParams
2655
+ # Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
2656
+ attr_accessor :amount
2657
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
2658
+ attr_accessor :amount_includes_iof
2659
+ # Type of amount. Defaults to `maximum`.
2660
+ attr_accessor :amount_type
2661
+ # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
2662
+ attr_accessor :currency
2663
+ # 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.
2664
+ attr_accessor :end_date
2665
+ # Schedule at which the future payments will be charged. Defaults to `weekly`.
2666
+ attr_accessor :payment_schedule
2667
+ # Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
2668
+ attr_accessor :reference
2669
+ # 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.
2670
+ attr_accessor :start_date
2671
+
2672
+ def initialize(
2673
+ amount: nil,
2674
+ amount_includes_iof: nil,
2675
+ amount_type: nil,
2676
+ currency: nil,
2677
+ end_date: nil,
2678
+ payment_schedule: nil,
2679
+ reference: nil,
2680
+ start_date: nil
2681
+ )
2682
+ @amount = amount
2683
+ @amount_includes_iof = amount_includes_iof
2684
+ @amount_type = amount_type
2685
+ @currency = currency
2686
+ @end_date = end_date
2687
+ @payment_schedule = payment_schedule
2688
+ @reference = reference
2689
+ @start_date = start_date
2690
+ end
2691
+ end
2692
+ # Determines if the amount includes the IOF tax. Defaults to `never`.
2693
+ attr_accessor :amount_includes_iof
2599
2694
  # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
2600
2695
  attr_accessor :expires_after_seconds
2696
+ # Additional fields for mandate creation.
2697
+ attr_accessor :mandate_options
2601
2698
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2602
2699
  #
2603
2700
  # 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.
@@ -2607,8 +2704,15 @@ module Stripe
2607
2704
  # 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).
2608
2705
  attr_accessor :setup_future_usage
2609
2706
 
2610
- def initialize(expires_after_seconds: nil, setup_future_usage: nil)
2707
+ def initialize(
2708
+ amount_includes_iof: nil,
2709
+ expires_after_seconds: nil,
2710
+ mandate_options: nil,
2711
+ setup_future_usage: nil
2712
+ )
2713
+ @amount_includes_iof = amount_includes_iof
2611
2714
  @expires_after_seconds = expires_after_seconds
2715
+ @mandate_options = mandate_options
2612
2716
  @setup_future_usage = setup_future_usage
2613
2717
  end
2614
2718
  end
@@ -3361,7 +3465,7 @@ module Stripe
3361
3465
  #
3362
3466
  # 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.
3363
3467
  attr_accessor :optional_items
3364
- # 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`.
3468
+ # Where the user is coming from. This informs the optimizations that are applied to the session.
3365
3469
  attr_accessor :origin_context
3366
3470
  # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
3367
3471
  attr_accessor :payment_intent_data
@@ -201,7 +201,7 @@ module Stripe
201
201
  class Refund < Stripe::RequestParams
202
202
  # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
203
203
  attr_accessor :amount_refunded
204
- # ID of an existing refund to link this credit note to.
204
+ # ID of an existing refund to link this credit note to. Required when `type` is `refund`.
205
205
  attr_accessor :refund
206
206
 
207
207
  def initialize(amount_refunded: nil, refund: nil)
@@ -356,7 +356,7 @@ module Stripe
356
356
  class Refund < Stripe::RequestParams
357
357
  # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
358
358
  attr_accessor :amount_refunded
359
- # ID of an existing refund to link this credit note to.
359
+ # ID of an existing refund to link this credit note to. Required when `type` is `refund`.
360
360
  attr_accessor :refund
361
361
 
362
362
  def initialize(amount_refunded: nil, refund: nil)
@@ -496,7 +496,7 @@ module Stripe
496
496
  class Refund < Stripe::RequestParams
497
497
  # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
498
498
  attr_accessor :amount_refunded
499
- # ID of an existing refund to link this credit note to.
499
+ # ID of an existing refund to link this credit note to. Required when `type` is `refund`.
500
500
  attr_accessor :refund
501
501
 
502
502
  def initialize(amount_refunded: nil, refund: nil)
@@ -634,7 +634,7 @@ module Stripe
634
634
  attr_reader :reason
635
635
  # Attribute for field smart_disputes
636
636
  attr_reader :smart_disputes
637
- # Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`.
637
+ # The current status of a dispute. Possible values include:`warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, `lost`, or `prevented`.
638
638
  attr_reader :status
639
639
 
640
640
  # Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
@@ -68,7 +68,7 @@ module Stripe
68
68
 
69
69
  class CreateParams < Stripe::RequestParams
70
70
  class FileLinkData < Stripe::RequestParams
71
- # 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`.
71
+ # 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`.
72
72
  attr_accessor :create
73
73
  # The link isn't available after this future timestamp.
74
74
  attr_accessor :expires_at
@@ -72,7 +72,7 @@ module Stripe
72
72
  attr_accessor :expand
73
73
  # The link isn't usable after this future timestamp.
74
74
  attr_accessor :expires_at
75
- # 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`.
75
+ # 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`.
76
76
  attr_accessor :file
77
77
  # 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`.
78
78
  attr_accessor :metadata