stripe 15.4.0.pre.beta.2 → 15.5.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 (87) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +61 -5
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +1 -1
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_version.rb +1 -1
  8. data/lib/stripe/event_types.rb +2 -2
  9. data/lib/stripe/events/{v2_core_account_link_completed_event.rb → v2_core_account_link_returned_event.rb} +2 -2
  10. data/lib/stripe/events/{v2_off_session_payment_requires_capture_event.rb → v2_money_management_payout_method_updated_event.rb} +3 -3
  11. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_failed_event.rb +1 -1
  12. data/lib/stripe/events/v2_payments_off_session_payment_authorization_attempt_started_event.rb +2 -1
  13. data/lib/stripe/events/v2_payments_off_session_payment_canceled_event.rb +1 -1
  14. data/lib/stripe/events/v2_payments_off_session_payment_created_event.rb +1 -1
  15. data/lib/stripe/events/v2_payments_off_session_payment_failed_event.rb +1 -1
  16. data/lib/stripe/events/v2_payments_off_session_payment_succeeded_event.rb +1 -1
  17. data/lib/stripe/object_types.rb +3 -0
  18. data/lib/stripe/resources/account.rb +5 -5
  19. data/lib/stripe/resources/account_link.rb +3 -1
  20. data/lib/stripe/resources/account_session.rb +51 -0
  21. data/lib/stripe/resources/balance_settings.rb +13 -13
  22. data/lib/stripe/resources/billing/credit_grant.rb +1 -1
  23. data/lib/stripe/resources/billing/meter_usage.rb +23 -0
  24. data/lib/stripe/resources/billing/meter_usage_row.rb +28 -0
  25. data/lib/stripe/resources/billing_portal/configuration.rb +46 -2
  26. data/lib/stripe/resources/charge.rb +7 -5
  27. data/lib/stripe/resources/checkout/session.rb +106 -6
  28. data/lib/stripe/resources/confirmation_token.rb +3 -3
  29. data/lib/stripe/resources/customer.rb +1 -1
  30. data/lib/stripe/resources/dispute.rb +10 -1
  31. data/lib/stripe/resources/event.rb +14 -26
  32. data/lib/stripe/resources/fx_quote.rb +6 -4
  33. data/lib/stripe/resources/invoice.rb +101 -8
  34. data/lib/stripe/resources/invoice_item.rb +1 -1
  35. data/lib/stripe/resources/payment_attempt_record.rb +6 -4
  36. data/lib/stripe/resources/payment_intent.rb +815 -4
  37. data/lib/stripe/resources/payment_link.rb +83 -5
  38. data/lib/stripe/resources/payment_method.rb +4 -4
  39. data/lib/stripe/resources/payment_record.rb +6 -4
  40. data/lib/stripe/resources/quote.rb +1 -1
  41. data/lib/stripe/resources/quote_preview_invoice.rb +17 -0
  42. data/lib/stripe/resources/radar/value_list.rb +2 -2
  43. data/lib/stripe/resources/refund.rb +1 -1
  44. data/lib/stripe/resources/review.rb +2 -2
  45. data/lib/stripe/resources/setup_attempt.rb +1 -1
  46. data/lib/stripe/resources/subscription.rb +79 -2
  47. data/lib/stripe/resources/subscription_item.rb +2 -2
  48. data/lib/stripe/resources/subscription_schedule.rb +35 -3
  49. data/lib/stripe/resources/tax/registration.rb +408 -30
  50. data/lib/stripe/resources/terminal/configuration.rb +196 -0
  51. data/lib/stripe/resources/terminal/onboarding_link.rb +84 -0
  52. data/lib/stripe/resources/v2/core/account.rb +11 -0
  53. data/lib/stripe/resources/v2/core/account_link.rb +18 -2
  54. data/lib/stripe/resources/v2/money_management/payout_method.rb +2 -0
  55. data/lib/stripe/resources/v2/payments/off_session_payment.rb +40 -23
  56. data/lib/stripe/resources.rb +5 -2
  57. data/lib/stripe/services/account_link_service.rb +3 -1
  58. data/lib/stripe/services/account_service.rb +3 -3
  59. data/lib/stripe/services/account_session_service.rb +34 -0
  60. data/lib/stripe/services/balance_settings_service.rb +10 -10
  61. data/lib/stripe/services/billing/credit_grant_service.rb +1 -1
  62. data/lib/stripe/services/billing/meter_usage_service.rb +76 -0
  63. data/lib/stripe/services/billing_portal/configuration_service.rb +36 -2
  64. data/lib/stripe/services/billing_service.rb +2 -1
  65. data/lib/stripe/services/checkout/session_service.rb +93 -5
  66. data/lib/stripe/services/invoice_item_service.rb +1 -1
  67. data/lib/stripe/services/invoice_service.rb +84 -8
  68. data/lib/stripe/services/payment_intent_service.rb +809 -3
  69. data/lib/stripe/services/payment_link_service.rb +81 -5
  70. data/lib/stripe/services/payment_method_service.rb +1 -1
  71. data/lib/stripe/services/quote_service.rb +1 -1
  72. data/lib/stripe/services/radar/value_list_service.rb +1 -1
  73. data/lib/stripe/services/subscription_item_service.rb +2 -2
  74. data/lib/stripe/services/subscription_schedule_service.rb +35 -3
  75. data/lib/stripe/services/subscription_service.rb +62 -2
  76. data/lib/stripe/services/tax/registration_service.rb +360 -30
  77. data/lib/stripe/services/terminal/configuration_service.rb +152 -0
  78. data/lib/stripe/services/terminal/onboarding_link_service.rb +56 -0
  79. data/lib/stripe/services/terminal_service.rb +2 -1
  80. data/lib/stripe/services/v2/core/account_link_service.rb +41 -3
  81. data/lib/stripe/services/v2/core/account_service.rb +38 -2
  82. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +34 -19
  83. data/lib/stripe/services/v2/test_helpers/financial_address_service.rb +4 -0
  84. data/lib/stripe/services.rb +2 -0
  85. data/lib/stripe/version.rb +1 -1
  86. data/rbi/stripe.rbi +4893 -390
  87. metadata +9 -4
@@ -39,6 +39,15 @@ module Stripe
39
39
  end
40
40
 
41
41
  class Tipping < Stripe::StripeObject
42
+ class Aed < Stripe::StripeObject
43
+ # Fixed amounts displayed when collecting a tip
44
+ attr_reader :fixed_amounts
45
+ # Percentages displayed when collecting a tip
46
+ attr_reader :percentages
47
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
48
+ attr_reader :smart_tip_threshold
49
+ end
50
+
42
51
  class Aud < Stripe::StripeObject
43
52
  # Fixed amounts displayed when collecting a tip
44
53
  attr_reader :fixed_amounts
@@ -48,6 +57,15 @@ module Stripe
48
57
  attr_reader :smart_tip_threshold
49
58
  end
50
59
 
60
+ class Bgn < Stripe::StripeObject
61
+ # Fixed amounts displayed when collecting a tip
62
+ attr_reader :fixed_amounts
63
+ # Percentages displayed when collecting a tip
64
+ attr_reader :percentages
65
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
66
+ attr_reader :smart_tip_threshold
67
+ end
68
+
51
69
  class Cad < Stripe::StripeObject
52
70
  # Fixed amounts displayed when collecting a tip
53
71
  attr_reader :fixed_amounts
@@ -111,6 +129,15 @@ module Stripe
111
129
  attr_reader :smart_tip_threshold
112
130
  end
113
131
 
132
+ class Huf < Stripe::StripeObject
133
+ # Fixed amounts displayed when collecting a tip
134
+ attr_reader :fixed_amounts
135
+ # Percentages displayed when collecting a tip
136
+ attr_reader :percentages
137
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
138
+ attr_reader :smart_tip_threshold
139
+ end
140
+
114
141
  class Jpy < Stripe::StripeObject
115
142
  # Fixed amounts displayed when collecting a tip
116
143
  attr_reader :fixed_amounts
@@ -156,6 +183,15 @@ module Stripe
156
183
  attr_reader :smart_tip_threshold
157
184
  end
158
185
 
186
+ class Ron < Stripe::StripeObject
187
+ # Fixed amounts displayed when collecting a tip
188
+ attr_reader :fixed_amounts
189
+ # Percentages displayed when collecting a tip
190
+ attr_reader :percentages
191
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
192
+ attr_reader :smart_tip_threshold
193
+ end
194
+
159
195
  class Sek < Stripe::StripeObject
160
196
  # Fixed amounts displayed when collecting a tip
161
197
  attr_reader :fixed_amounts
@@ -182,8 +218,12 @@ module Stripe
182
218
  # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
183
219
  attr_reader :smart_tip_threshold
184
220
  end
221
+ # Attribute for field aed
222
+ attr_reader :aed
185
223
  # Attribute for field aud
186
224
  attr_reader :aud
225
+ # Attribute for field bgn
226
+ attr_reader :bgn
187
227
  # Attribute for field cad
188
228
  attr_reader :cad
189
229
  # Attribute for field chf
@@ -198,6 +238,8 @@ module Stripe
198
238
  attr_reader :gbp
199
239
  # Attribute for field hkd
200
240
  attr_reader :hkd
241
+ # Attribute for field huf
242
+ attr_reader :huf
201
243
  # Attribute for field jpy
202
244
  attr_reader :jpy
203
245
  # Attribute for field myr
@@ -208,6 +250,8 @@ module Stripe
208
250
  attr_reader :nzd
209
251
  # Attribute for field pln
210
252
  attr_reader :pln
253
+ # Attribute for field ron
254
+ attr_reader :ron
211
255
  # Attribute for field sek
212
256
  attr_reader :sek
213
257
  # Attribute for field sgd
@@ -305,6 +349,21 @@ module Stripe
305
349
  end
306
350
 
307
351
  class Tipping < Stripe::RequestParams
352
+ class Aed < Stripe::RequestParams
353
+ # Fixed amounts displayed when collecting a tip
354
+ attr_accessor :fixed_amounts
355
+ # Percentages displayed when collecting a tip
356
+ attr_accessor :percentages
357
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
358
+ attr_accessor :smart_tip_threshold
359
+
360
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
361
+ @fixed_amounts = fixed_amounts
362
+ @percentages = percentages
363
+ @smart_tip_threshold = smart_tip_threshold
364
+ end
365
+ end
366
+
308
367
  class Aud < Stripe::RequestParams
309
368
  # Fixed amounts displayed when collecting a tip
310
369
  attr_accessor :fixed_amounts
@@ -320,6 +379,21 @@ module Stripe
320
379
  end
321
380
  end
322
381
 
382
+ class Bgn < Stripe::RequestParams
383
+ # Fixed amounts displayed when collecting a tip
384
+ attr_accessor :fixed_amounts
385
+ # Percentages displayed when collecting a tip
386
+ attr_accessor :percentages
387
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
388
+ attr_accessor :smart_tip_threshold
389
+
390
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
391
+ @fixed_amounts = fixed_amounts
392
+ @percentages = percentages
393
+ @smart_tip_threshold = smart_tip_threshold
394
+ end
395
+ end
396
+
323
397
  class Cad < Stripe::RequestParams
324
398
  # Fixed amounts displayed when collecting a tip
325
399
  attr_accessor :fixed_amounts
@@ -425,6 +499,21 @@ module Stripe
425
499
  end
426
500
  end
427
501
 
502
+ class Huf < Stripe::RequestParams
503
+ # Fixed amounts displayed when collecting a tip
504
+ attr_accessor :fixed_amounts
505
+ # Percentages displayed when collecting a tip
506
+ attr_accessor :percentages
507
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
508
+ attr_accessor :smart_tip_threshold
509
+
510
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
511
+ @fixed_amounts = fixed_amounts
512
+ @percentages = percentages
513
+ @smart_tip_threshold = smart_tip_threshold
514
+ end
515
+ end
516
+
428
517
  class Jpy < Stripe::RequestParams
429
518
  # Fixed amounts displayed when collecting a tip
430
519
  attr_accessor :fixed_amounts
@@ -500,6 +589,21 @@ module Stripe
500
589
  end
501
590
  end
502
591
 
592
+ class Ron < Stripe::RequestParams
593
+ # Fixed amounts displayed when collecting a tip
594
+ attr_accessor :fixed_amounts
595
+ # Percentages displayed when collecting a tip
596
+ attr_accessor :percentages
597
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
598
+ attr_accessor :smart_tip_threshold
599
+
600
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
601
+ @fixed_amounts = fixed_amounts
602
+ @percentages = percentages
603
+ @smart_tip_threshold = smart_tip_threshold
604
+ end
605
+ end
606
+
503
607
  class Sek < Stripe::RequestParams
504
608
  # Fixed amounts displayed when collecting a tip
505
609
  attr_accessor :fixed_amounts
@@ -544,8 +648,12 @@ module Stripe
544
648
  @smart_tip_threshold = smart_tip_threshold
545
649
  end
546
650
  end
651
+ # Tipping configuration for AED
652
+ attr_accessor :aed
547
653
  # Tipping configuration for AUD
548
654
  attr_accessor :aud
655
+ # Tipping configuration for BGN
656
+ attr_accessor :bgn
549
657
  # Tipping configuration for CAD
550
658
  attr_accessor :cad
551
659
  # Tipping configuration for CHF
@@ -560,6 +668,8 @@ module Stripe
560
668
  attr_accessor :gbp
561
669
  # Tipping configuration for HKD
562
670
  attr_accessor :hkd
671
+ # Tipping configuration for HUF
672
+ attr_accessor :huf
563
673
  # Tipping configuration for JPY
564
674
  attr_accessor :jpy
565
675
  # Tipping configuration for MYR
@@ -570,6 +680,8 @@ module Stripe
570
680
  attr_accessor :nzd
571
681
  # Tipping configuration for PLN
572
682
  attr_accessor :pln
683
+ # Tipping configuration for RON
684
+ attr_accessor :ron
573
685
  # Tipping configuration for SEK
574
686
  attr_accessor :sek
575
687
  # Tipping configuration for SGD
@@ -578,7 +690,9 @@ module Stripe
578
690
  attr_accessor :usd
579
691
 
580
692
  def initialize(
693
+ aed: nil,
581
694
  aud: nil,
695
+ bgn: nil,
582
696
  cad: nil,
583
697
  chf: nil,
584
698
  czk: nil,
@@ -586,16 +700,20 @@ module Stripe
586
700
  eur: nil,
587
701
  gbp: nil,
588
702
  hkd: nil,
703
+ huf: nil,
589
704
  jpy: nil,
590
705
  myr: nil,
591
706
  nok: nil,
592
707
  nzd: nil,
593
708
  pln: nil,
709
+ ron: nil,
594
710
  sek: nil,
595
711
  sgd: nil,
596
712
  usd: nil
597
713
  )
714
+ @aed = aed
598
715
  @aud = aud
716
+ @bgn = bgn
599
717
  @cad = cad
600
718
  @chf = chf
601
719
  @czk = czk
@@ -603,11 +721,13 @@ module Stripe
603
721
  @eur = eur
604
722
  @gbp = gbp
605
723
  @hkd = hkd
724
+ @huf = huf
606
725
  @jpy = jpy
607
726
  @myr = myr
608
727
  @nok = nok
609
728
  @nzd = nzd
610
729
  @pln = pln
730
+ @ron = ron
611
731
  @sek = sek
612
732
  @sgd = sgd
613
733
  @usd = usd
@@ -811,6 +931,21 @@ module Stripe
811
931
  end
812
932
 
813
933
  class Tipping < Stripe::RequestParams
934
+ class Aed < Stripe::RequestParams
935
+ # Fixed amounts displayed when collecting a tip
936
+ attr_accessor :fixed_amounts
937
+ # Percentages displayed when collecting a tip
938
+ attr_accessor :percentages
939
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
940
+ attr_accessor :smart_tip_threshold
941
+
942
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
943
+ @fixed_amounts = fixed_amounts
944
+ @percentages = percentages
945
+ @smart_tip_threshold = smart_tip_threshold
946
+ end
947
+ end
948
+
814
949
  class Aud < Stripe::RequestParams
815
950
  # Fixed amounts displayed when collecting a tip
816
951
  attr_accessor :fixed_amounts
@@ -826,6 +961,21 @@ module Stripe
826
961
  end
827
962
  end
828
963
 
964
+ class Bgn < Stripe::RequestParams
965
+ # Fixed amounts displayed when collecting a tip
966
+ attr_accessor :fixed_amounts
967
+ # Percentages displayed when collecting a tip
968
+ attr_accessor :percentages
969
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
970
+ attr_accessor :smart_tip_threshold
971
+
972
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
973
+ @fixed_amounts = fixed_amounts
974
+ @percentages = percentages
975
+ @smart_tip_threshold = smart_tip_threshold
976
+ end
977
+ end
978
+
829
979
  class Cad < Stripe::RequestParams
830
980
  # Fixed amounts displayed when collecting a tip
831
981
  attr_accessor :fixed_amounts
@@ -931,6 +1081,21 @@ module Stripe
931
1081
  end
932
1082
  end
933
1083
 
1084
+ class Huf < Stripe::RequestParams
1085
+ # Fixed amounts displayed when collecting a tip
1086
+ attr_accessor :fixed_amounts
1087
+ # Percentages displayed when collecting a tip
1088
+ attr_accessor :percentages
1089
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
1090
+ attr_accessor :smart_tip_threshold
1091
+
1092
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
1093
+ @fixed_amounts = fixed_amounts
1094
+ @percentages = percentages
1095
+ @smart_tip_threshold = smart_tip_threshold
1096
+ end
1097
+ end
1098
+
934
1099
  class Jpy < Stripe::RequestParams
935
1100
  # Fixed amounts displayed when collecting a tip
936
1101
  attr_accessor :fixed_amounts
@@ -1006,6 +1171,21 @@ module Stripe
1006
1171
  end
1007
1172
  end
1008
1173
 
1174
+ class Ron < Stripe::RequestParams
1175
+ # Fixed amounts displayed when collecting a tip
1176
+ attr_accessor :fixed_amounts
1177
+ # Percentages displayed when collecting a tip
1178
+ attr_accessor :percentages
1179
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
1180
+ attr_accessor :smart_tip_threshold
1181
+
1182
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
1183
+ @fixed_amounts = fixed_amounts
1184
+ @percentages = percentages
1185
+ @smart_tip_threshold = smart_tip_threshold
1186
+ end
1187
+ end
1188
+
1009
1189
  class Sek < Stripe::RequestParams
1010
1190
  # Fixed amounts displayed when collecting a tip
1011
1191
  attr_accessor :fixed_amounts
@@ -1050,8 +1230,12 @@ module Stripe
1050
1230
  @smart_tip_threshold = smart_tip_threshold
1051
1231
  end
1052
1232
  end
1233
+ # Tipping configuration for AED
1234
+ attr_accessor :aed
1053
1235
  # Tipping configuration for AUD
1054
1236
  attr_accessor :aud
1237
+ # Tipping configuration for BGN
1238
+ attr_accessor :bgn
1055
1239
  # Tipping configuration for CAD
1056
1240
  attr_accessor :cad
1057
1241
  # Tipping configuration for CHF
@@ -1066,6 +1250,8 @@ module Stripe
1066
1250
  attr_accessor :gbp
1067
1251
  # Tipping configuration for HKD
1068
1252
  attr_accessor :hkd
1253
+ # Tipping configuration for HUF
1254
+ attr_accessor :huf
1069
1255
  # Tipping configuration for JPY
1070
1256
  attr_accessor :jpy
1071
1257
  # Tipping configuration for MYR
@@ -1076,6 +1262,8 @@ module Stripe
1076
1262
  attr_accessor :nzd
1077
1263
  # Tipping configuration for PLN
1078
1264
  attr_accessor :pln
1265
+ # Tipping configuration for RON
1266
+ attr_accessor :ron
1079
1267
  # Tipping configuration for SEK
1080
1268
  attr_accessor :sek
1081
1269
  # Tipping configuration for SGD
@@ -1084,7 +1272,9 @@ module Stripe
1084
1272
  attr_accessor :usd
1085
1273
 
1086
1274
  def initialize(
1275
+ aed: nil,
1087
1276
  aud: nil,
1277
+ bgn: nil,
1088
1278
  cad: nil,
1089
1279
  chf: nil,
1090
1280
  czk: nil,
@@ -1092,16 +1282,20 @@ module Stripe
1092
1282
  eur: nil,
1093
1283
  gbp: nil,
1094
1284
  hkd: nil,
1285
+ huf: nil,
1095
1286
  jpy: nil,
1096
1287
  myr: nil,
1097
1288
  nok: nil,
1098
1289
  nzd: nil,
1099
1290
  pln: nil,
1291
+ ron: nil,
1100
1292
  sek: nil,
1101
1293
  sgd: nil,
1102
1294
  usd: nil
1103
1295
  )
1296
+ @aed = aed
1104
1297
  @aud = aud
1298
+ @bgn = bgn
1105
1299
  @cad = cad
1106
1300
  @chf = chf
1107
1301
  @czk = czk
@@ -1109,11 +1303,13 @@ module Stripe
1109
1303
  @eur = eur
1110
1304
  @gbp = gbp
1111
1305
  @hkd = hkd
1306
+ @huf = huf
1112
1307
  @jpy = jpy
1113
1308
  @myr = myr
1114
1309
  @nok = nok
1115
1310
  @nzd = nzd
1116
1311
  @pln = pln
1312
+ @ron = ron
1117
1313
  @sek = sek
1118
1314
  @sgd = sgd
1119
1315
  @usd = usd
@@ -0,0 +1,84 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Terminal
6
+ # Returns redirect links used for onboarding onto Tap to Pay on iPhone.
7
+ class OnboardingLink < APIResource
8
+ extend Stripe::APIOperations::Create
9
+
10
+ OBJECT_NAME = "terminal.onboarding_link"
11
+ def self.object_name
12
+ "terminal.onboarding_link"
13
+ end
14
+
15
+ class LinkOptions < Stripe::StripeObject
16
+ class AppleTermsAndConditions < Stripe::StripeObject
17
+ # Whether the link should also support users relinking their Apple account.
18
+ attr_reader :allow_relinking
19
+ # The business name of the merchant accepting Apple's Terms and Conditions.
20
+ attr_reader :merchant_display_name
21
+ end
22
+ # The options associated with the Apple Terms and Conditions link type.
23
+ attr_reader :apple_terms_and_conditions
24
+ end
25
+
26
+ class CreateParams < Stripe::RequestParams
27
+ class LinkOptions < Stripe::RequestParams
28
+ class AppleTermsAndConditions < Stripe::RequestParams
29
+ # Whether the link should also support users relinking their Apple account.
30
+ attr_accessor :allow_relinking
31
+ # The business name of the merchant accepting Apple's Terms and Conditions.
32
+ attr_accessor :merchant_display_name
33
+
34
+ def initialize(allow_relinking: nil, merchant_display_name: nil)
35
+ @allow_relinking = allow_relinking
36
+ @merchant_display_name = merchant_display_name
37
+ end
38
+ end
39
+ # The options associated with the Apple Terms and Conditions link type.
40
+ attr_accessor :apple_terms_and_conditions
41
+
42
+ def initialize(apple_terms_and_conditions: nil)
43
+ @apple_terms_and_conditions = apple_terms_and_conditions
44
+ end
45
+ end
46
+ # Specifies which fields in the response should be expanded.
47
+ attr_accessor :expand
48
+ # Specific fields needed to generate the desired link type.
49
+ attr_accessor :link_options
50
+ # The type of link being generated.
51
+ attr_accessor :link_type
52
+ # Stripe account ID to generate the link for.
53
+ attr_accessor :on_behalf_of
54
+
55
+ def initialize(expand: nil, link_options: nil, link_type: nil, on_behalf_of: nil)
56
+ @expand = expand
57
+ @link_options = link_options
58
+ @link_type = link_type
59
+ @on_behalf_of = on_behalf_of
60
+ end
61
+ end
62
+ # Link type options associated with the current onboarding link object.
63
+ attr_reader :link_options
64
+ # The type of link being generated.
65
+ attr_reader :link_type
66
+ # Attribute for field object
67
+ attr_reader :object
68
+ # Stripe account ID to generate the link for.
69
+ attr_reader :on_behalf_of
70
+ # The link passed back to the user for their onboarding.
71
+ attr_reader :redirect_url
72
+
73
+ # Creates a new OnboardingLink object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone.
74
+ def self.create(params = {}, opts = {})
75
+ request_stripe_object(
76
+ method: :post,
77
+ path: "/v1/terminal/onboarding_links",
78
+ params: params,
79
+ opts: opts
80
+ )
81
+ end
82
+ end
83
+ end
84
+ end
@@ -1306,8 +1306,19 @@ module Stripe
1306
1306
  # The user agent of the browser from which the Account's representative accepted the terms of service.
1307
1307
  attr_reader :user_agent
1308
1308
  end
1309
+
1310
+ class Storer < Stripe::StripeObject
1311
+ # The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
1312
+ attr_reader :date
1313
+ # The IP address from which the Account's representative accepted the terms of service.
1314
+ attr_reader :ip
1315
+ # The user agent of the browser from which the Account's representative accepted the terms of service.
1316
+ attr_reader :user_agent
1317
+ end
1309
1318
  # Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance).
1310
1319
  attr_reader :account
1320
+ # Details on the Account's acceptance of Treasury-specific terms of service.
1321
+ attr_reader :storer
1311
1322
  end
1312
1323
  # This hash is used to attest that the directors information provided to Stripe is both current and correct.
1313
1324
  attr_reader :directorship_declaration
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module V2
6
6
  module Core
7
- # AccountLinks are the means by which a Merchant grants an Account permission to access Stripe-hosted applications, such as Recipient Onboarding. This API is only available for users enrolled in the public preview for Global Payouts.
7
+ # AccountLinks are the means by which a Merchant grants an Account permission to access Stripe-hosted applications, such as Recipient Onboarding. This API is only available for users enrolled in the public preview for Accounts v2.
8
8
  class AccountLink < APIResource
9
9
  OBJECT_NAME = "v2.core.account_link"
10
10
  def self.object_name
@@ -13,7 +13,15 @@ module Stripe
13
13
 
14
14
  class UseCase < Stripe::StripeObject
15
15
  class AccountOnboarding < Stripe::StripeObject
16
- # Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s.
16
+ class CollectionOptions < Stripe::StripeObject
17
+ # Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don’t specify collection_options, the default value is currently_due.
18
+ attr_reader :fields
19
+ # Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
20
+ attr_reader :future_requirements
21
+ end
22
+ # Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow.
23
+ attr_reader :collection_options
24
+ # Open Enum. A v2/core/account can be configured to enable certain functionality. The configuration param targets the v2/core/account_link to collect information for the specified v2/core/account configuration/s.
17
25
  attr_reader :configurations
18
26
  # The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink’s URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party.
19
27
  attr_reader :refresh_url
@@ -22,6 +30,14 @@ module Stripe
22
30
  end
23
31
 
24
32
  class AccountUpdate < Stripe::StripeObject
33
+ class CollectionOptions < Stripe::StripeObject
34
+ # Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don’t specify collection_options, the default value is currently_due.
35
+ attr_reader :fields
36
+ # Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
37
+ attr_reader :future_requirements
38
+ end
39
+ # Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow.
40
+ attr_reader :collection_options
25
41
  # Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s.
26
42
  attr_reader :configurations
27
43
  # The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink’s URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party.
@@ -23,6 +23,8 @@ module Stripe
23
23
  # the /archive API, and they will not be automatically archived by Stripe. Archived PayoutMethodBankAccount objects
24
24
  # cannot be used as payout methods and will not appear in the payout method list.
25
25
  attr_reader :archived
26
+ # The type of bank account (checking or savings).
27
+ attr_reader :bank_account_type
26
28
  # The name of the bank this bank account is in. This field is populated automatically by Stripe.
27
29
  attr_reader :bank_name
28
30
  # The country code of the bank account.
@@ -4,7 +4,7 @@
4
4
  module Stripe
5
5
  module V2
6
6
  module Payments
7
- # Off-session payment resource.
7
+ # OffSessionPayment resource.
8
8
  class OffSessionPayment < APIResource
9
9
  OBJECT_NAME = "v2.payments.off_session_payment"
10
10
  def self.object_name
@@ -14,57 +14,74 @@ module Stripe
14
14
  class RetryDetails < Stripe::StripeObject
15
15
  # Number of authorization attempts so far.
16
16
  attr_reader :attempts
17
- # How you want Stripe to retry the payment.
17
+ # Indicates the strategy for how you want Stripe to retry the payment.
18
18
  attr_reader :retry_strategy
19
19
  end
20
20
 
21
21
  class TransferData < Stripe::StripeObject
22
- # Amount in minor units that you want to transfer.
22
+ # The amount transferred to the destination account. This transfer will occur
23
+ # automatically after the payment succeeds. If no amount is specified, by default
24
+ # the entire payment amount is transferred to the destination account. The amount
25
+ # must be less than or equal to the
26
+ # [amount_requested](https://docs.corp.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested),
27
+ # and must be a positive integer representing how much to transfer in the smallest
28
+ # currency unit (e.g., 100 cents to charge $1.00).
23
29
  attr_reader :amount
24
- # ID of the connected account where you want money to go.
30
+ # The account (if any) that the payment is attributed to for tax reporting, and
31
+ # where funds from the payment are transferred to after payment success.
25
32
  attr_reader :destination
26
33
  end
27
- # The amount you requested to be collected on the OSP upon creation.
34
+ # The “presentment amount to be collected from the customer.
28
35
  attr_reader :amount_requested
29
- # The frequency of the underlying payment that this OSP represents.
36
+ # The frequency of the underlying payment.
30
37
  attr_reader :cadence
31
- # ID of owning compartment.
38
+ # ID of the owning compartment.
32
39
  attr_reader :compartment_id
33
- # Timestamp of creation.
40
+ # Creation time of the OffSessionPayment. Represented as a RFC 3339 date & time UTC
41
+ # value in millisecond precision, for example: 2022-09-18T13:22:18.123Z.
34
42
  attr_reader :created
35
- # Customer owning the supplied payment method.
43
+ # ID of the Customer to which this OffSessionPayment belongs.
36
44
  attr_reader :customer
37
- # Reason why the OSP failed.
45
+ # The reason why the OffSessionPayment failed.
38
46
  attr_reader :failure_reason
39
- # ID of the OSP.
47
+ # Unique identifier for the object..
40
48
  attr_reader :id
41
- # Last error returned by the financial partner for a failed authorization.
49
+ # The payment error encountered in the previous attempt to authorize the payment.
42
50
  attr_reader :last_authorization_attempt_error
43
51
  # Payment attempt record for the latest attempt, if one exists.
44
52
  attr_reader :latest_payment_attempt_record
45
- # True if the txn is livemode, false otherwise.
53
+ # Has the value true if the object exists in live mode or the value false if the object exists in test mode.
46
54
  attr_reader :livemode
47
- # Metadata you provided.
55
+ # Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can
56
+ # attach to an object. This can be useful for storing additional information about
57
+ # the object in a structured format. Learn more about
58
+ # [storing information in metadata](https://docs.corp.stripe.com/payments/payment-intents#storing-information-in-metadata).
48
59
  attr_reader :metadata
49
60
  # String representing the object's type. Objects of the same type share the same value of the object field.
50
61
  attr_reader :object
51
- # OBO, same as on the PI.
62
+ # The account (if any) for which the funds of the OffSessionPayment are intended.
52
63
  attr_reader :on_behalf_of
53
- # ID of payment method.
64
+ # ID of the payment method used in this OffSessionPayment.
54
65
  attr_reader :payment_method
55
- # Payment record associated with the OSP. consistent across attempts.
66
+ # Payment record associated with the OffSessionPayment.
56
67
  attr_reader :payment_record
57
- # Details about the OSP retries.
68
+ # Details about the OffSessionPayment retries.
58
69
  attr_reader :retry_details
59
- # Statement descriptor you provided.
70
+ # Text that appears on the customer’s statement as the statement descriptor for a
71
+ # non-card charge. This value overrides the account’s default statement descriptor.
72
+ # For information about requirements, including the 22-character limit, see the
73
+ # [Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
60
74
  attr_reader :statement_descriptor
61
- # Statement descriptor suffix you provided, similar to that on the PI.
75
+ # Provides information about a card charge. Concatenated to the account’s
76
+ # [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static)
77
+ # to form the complete statement descriptor that appears on the customer’s statement.
62
78
  attr_reader :statement_descriptor_suffix
63
- # Status of the OSP.
79
+ # Status of this OffSessionPayment, one of `pending`, `pending_retry`, `processing`,
80
+ # `failed`, `canceled`, `requires_capture`, or `succeeded`.
64
81
  attr_reader :status
65
- # Test clock to be used to advance the retry attempts.
82
+ # Test clock that can be used to advance the retry attempts in a sandbox.
66
83
  attr_reader :test_clock
67
- # Instructions for the transfer to be made with this OSP after successful money movement.
84
+ # The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.corp.stripe.com/payments/connected-accounts).
68
85
  attr_reader :transfer_data
69
86
  end
70
87
  end