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
@@ -56,6 +56,21 @@ module Stripe
56
56
  end
57
57
 
58
58
  class Tipping < Stripe::RequestParams
59
+ class Aed < Stripe::RequestParams
60
+ # Fixed amounts displayed when collecting a tip
61
+ attr_accessor :fixed_amounts
62
+ # Percentages displayed when collecting a tip
63
+ attr_accessor :percentages
64
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
65
+ attr_accessor :smart_tip_threshold
66
+
67
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
68
+ @fixed_amounts = fixed_amounts
69
+ @percentages = percentages
70
+ @smart_tip_threshold = smart_tip_threshold
71
+ end
72
+ end
73
+
59
74
  class Aud < Stripe::RequestParams
60
75
  # Fixed amounts displayed when collecting a tip
61
76
  attr_accessor :fixed_amounts
@@ -71,6 +86,21 @@ module Stripe
71
86
  end
72
87
  end
73
88
 
89
+ class Bgn < Stripe::RequestParams
90
+ # Fixed amounts displayed when collecting a tip
91
+ attr_accessor :fixed_amounts
92
+ # Percentages displayed when collecting a tip
93
+ attr_accessor :percentages
94
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
95
+ attr_accessor :smart_tip_threshold
96
+
97
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
98
+ @fixed_amounts = fixed_amounts
99
+ @percentages = percentages
100
+ @smart_tip_threshold = smart_tip_threshold
101
+ end
102
+ end
103
+
74
104
  class Cad < Stripe::RequestParams
75
105
  # Fixed amounts displayed when collecting a tip
76
106
  attr_accessor :fixed_amounts
@@ -176,6 +206,21 @@ module Stripe
176
206
  end
177
207
  end
178
208
 
209
+ class Huf < Stripe::RequestParams
210
+ # Fixed amounts displayed when collecting a tip
211
+ attr_accessor :fixed_amounts
212
+ # Percentages displayed when collecting a tip
213
+ attr_accessor :percentages
214
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
215
+ attr_accessor :smart_tip_threshold
216
+
217
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
218
+ @fixed_amounts = fixed_amounts
219
+ @percentages = percentages
220
+ @smart_tip_threshold = smart_tip_threshold
221
+ end
222
+ end
223
+
179
224
  class Jpy < Stripe::RequestParams
180
225
  # Fixed amounts displayed when collecting a tip
181
226
  attr_accessor :fixed_amounts
@@ -251,6 +296,21 @@ module Stripe
251
296
  end
252
297
  end
253
298
 
299
+ class Ron < Stripe::RequestParams
300
+ # Fixed amounts displayed when collecting a tip
301
+ attr_accessor :fixed_amounts
302
+ # Percentages displayed when collecting a tip
303
+ attr_accessor :percentages
304
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
305
+ attr_accessor :smart_tip_threshold
306
+
307
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
308
+ @fixed_amounts = fixed_amounts
309
+ @percentages = percentages
310
+ @smart_tip_threshold = smart_tip_threshold
311
+ end
312
+ end
313
+
254
314
  class Sek < Stripe::RequestParams
255
315
  # Fixed amounts displayed when collecting a tip
256
316
  attr_accessor :fixed_amounts
@@ -295,8 +355,12 @@ module Stripe
295
355
  @smart_tip_threshold = smart_tip_threshold
296
356
  end
297
357
  end
358
+ # Tipping configuration for AED
359
+ attr_accessor :aed
298
360
  # Tipping configuration for AUD
299
361
  attr_accessor :aud
362
+ # Tipping configuration for BGN
363
+ attr_accessor :bgn
300
364
  # Tipping configuration for CAD
301
365
  attr_accessor :cad
302
366
  # Tipping configuration for CHF
@@ -311,6 +375,8 @@ module Stripe
311
375
  attr_accessor :gbp
312
376
  # Tipping configuration for HKD
313
377
  attr_accessor :hkd
378
+ # Tipping configuration for HUF
379
+ attr_accessor :huf
314
380
  # Tipping configuration for JPY
315
381
  attr_accessor :jpy
316
382
  # Tipping configuration for MYR
@@ -321,6 +387,8 @@ module Stripe
321
387
  attr_accessor :nzd
322
388
  # Tipping configuration for PLN
323
389
  attr_accessor :pln
390
+ # Tipping configuration for RON
391
+ attr_accessor :ron
324
392
  # Tipping configuration for SEK
325
393
  attr_accessor :sek
326
394
  # Tipping configuration for SGD
@@ -329,7 +397,9 @@ module Stripe
329
397
  attr_accessor :usd
330
398
 
331
399
  def initialize(
400
+ aed: nil,
332
401
  aud: nil,
402
+ bgn: nil,
333
403
  cad: nil,
334
404
  chf: nil,
335
405
  czk: nil,
@@ -337,16 +407,20 @@ module Stripe
337
407
  eur: nil,
338
408
  gbp: nil,
339
409
  hkd: nil,
410
+ huf: nil,
340
411
  jpy: nil,
341
412
  myr: nil,
342
413
  nok: nil,
343
414
  nzd: nil,
344
415
  pln: nil,
416
+ ron: nil,
345
417
  sek: nil,
346
418
  sgd: nil,
347
419
  usd: nil
348
420
  )
421
+ @aed = aed
349
422
  @aud = aud
423
+ @bgn = bgn
350
424
  @cad = cad
351
425
  @chf = chf
352
426
  @czk = czk
@@ -354,11 +428,13 @@ module Stripe
354
428
  @eur = eur
355
429
  @gbp = gbp
356
430
  @hkd = hkd
431
+ @huf = huf
357
432
  @jpy = jpy
358
433
  @myr = myr
359
434
  @nok = nok
360
435
  @nzd = nzd
361
436
  @pln = pln
437
+ @ron = ron
362
438
  @sek = sek
363
439
  @sgd = sgd
364
440
  @usd = usd
@@ -562,6 +638,21 @@ module Stripe
562
638
  end
563
639
 
564
640
  class Tipping < Stripe::RequestParams
641
+ class Aed < Stripe::RequestParams
642
+ # Fixed amounts displayed when collecting a tip
643
+ attr_accessor :fixed_amounts
644
+ # Percentages displayed when collecting a tip
645
+ attr_accessor :percentages
646
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
647
+ attr_accessor :smart_tip_threshold
648
+
649
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
650
+ @fixed_amounts = fixed_amounts
651
+ @percentages = percentages
652
+ @smart_tip_threshold = smart_tip_threshold
653
+ end
654
+ end
655
+
565
656
  class Aud < Stripe::RequestParams
566
657
  # Fixed amounts displayed when collecting a tip
567
658
  attr_accessor :fixed_amounts
@@ -577,6 +668,21 @@ module Stripe
577
668
  end
578
669
  end
579
670
 
671
+ class Bgn < Stripe::RequestParams
672
+ # Fixed amounts displayed when collecting a tip
673
+ attr_accessor :fixed_amounts
674
+ # Percentages displayed when collecting a tip
675
+ attr_accessor :percentages
676
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
677
+ attr_accessor :smart_tip_threshold
678
+
679
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
680
+ @fixed_amounts = fixed_amounts
681
+ @percentages = percentages
682
+ @smart_tip_threshold = smart_tip_threshold
683
+ end
684
+ end
685
+
580
686
  class Cad < Stripe::RequestParams
581
687
  # Fixed amounts displayed when collecting a tip
582
688
  attr_accessor :fixed_amounts
@@ -682,6 +788,21 @@ module Stripe
682
788
  end
683
789
  end
684
790
 
791
+ class Huf < Stripe::RequestParams
792
+ # Fixed amounts displayed when collecting a tip
793
+ attr_accessor :fixed_amounts
794
+ # Percentages displayed when collecting a tip
795
+ attr_accessor :percentages
796
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
797
+ attr_accessor :smart_tip_threshold
798
+
799
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
800
+ @fixed_amounts = fixed_amounts
801
+ @percentages = percentages
802
+ @smart_tip_threshold = smart_tip_threshold
803
+ end
804
+ end
805
+
685
806
  class Jpy < Stripe::RequestParams
686
807
  # Fixed amounts displayed when collecting a tip
687
808
  attr_accessor :fixed_amounts
@@ -757,6 +878,21 @@ module Stripe
757
878
  end
758
879
  end
759
880
 
881
+ class Ron < Stripe::RequestParams
882
+ # Fixed amounts displayed when collecting a tip
883
+ attr_accessor :fixed_amounts
884
+ # Percentages displayed when collecting a tip
885
+ attr_accessor :percentages
886
+ # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
887
+ attr_accessor :smart_tip_threshold
888
+
889
+ def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil)
890
+ @fixed_amounts = fixed_amounts
891
+ @percentages = percentages
892
+ @smart_tip_threshold = smart_tip_threshold
893
+ end
894
+ end
895
+
760
896
  class Sek < Stripe::RequestParams
761
897
  # Fixed amounts displayed when collecting a tip
762
898
  attr_accessor :fixed_amounts
@@ -801,8 +937,12 @@ module Stripe
801
937
  @smart_tip_threshold = smart_tip_threshold
802
938
  end
803
939
  end
940
+ # Tipping configuration for AED
941
+ attr_accessor :aed
804
942
  # Tipping configuration for AUD
805
943
  attr_accessor :aud
944
+ # Tipping configuration for BGN
945
+ attr_accessor :bgn
806
946
  # Tipping configuration for CAD
807
947
  attr_accessor :cad
808
948
  # Tipping configuration for CHF
@@ -817,6 +957,8 @@ module Stripe
817
957
  attr_accessor :gbp
818
958
  # Tipping configuration for HKD
819
959
  attr_accessor :hkd
960
+ # Tipping configuration for HUF
961
+ attr_accessor :huf
820
962
  # Tipping configuration for JPY
821
963
  attr_accessor :jpy
822
964
  # Tipping configuration for MYR
@@ -827,6 +969,8 @@ module Stripe
827
969
  attr_accessor :nzd
828
970
  # Tipping configuration for PLN
829
971
  attr_accessor :pln
972
+ # Tipping configuration for RON
973
+ attr_accessor :ron
830
974
  # Tipping configuration for SEK
831
975
  attr_accessor :sek
832
976
  # Tipping configuration for SGD
@@ -835,7 +979,9 @@ module Stripe
835
979
  attr_accessor :usd
836
980
 
837
981
  def initialize(
982
+ aed: nil,
838
983
  aud: nil,
984
+ bgn: nil,
839
985
  cad: nil,
840
986
  chf: nil,
841
987
  czk: nil,
@@ -843,16 +989,20 @@ module Stripe
843
989
  eur: nil,
844
990
  gbp: nil,
845
991
  hkd: nil,
992
+ huf: nil,
846
993
  jpy: nil,
847
994
  myr: nil,
848
995
  nok: nil,
849
996
  nzd: nil,
850
997
  pln: nil,
998
+ ron: nil,
851
999
  sek: nil,
852
1000
  sgd: nil,
853
1001
  usd: nil
854
1002
  )
1003
+ @aed = aed
855
1004
  @aud = aud
1005
+ @bgn = bgn
856
1006
  @cad = cad
857
1007
  @chf = chf
858
1008
  @czk = czk
@@ -860,11 +1010,13 @@ module Stripe
860
1010
  @eur = eur
861
1011
  @gbp = gbp
862
1012
  @hkd = hkd
1013
+ @huf = huf
863
1014
  @jpy = jpy
864
1015
  @myr = myr
865
1016
  @nok = nok
866
1017
  @nzd = nzd
867
1018
  @pln = pln
1019
+ @ron = ron
868
1020
  @sek = sek
869
1021
  @sgd = sgd
870
1022
  @usd = usd
@@ -0,0 +1,56 @@
1
+ # File generated from our OpenAPI spec
2
+ # frozen_string_literal: true
3
+
4
+ module Stripe
5
+ module Terminal
6
+ class OnboardingLinkService < StripeService
7
+ class CreateParams < Stripe::RequestParams
8
+ class LinkOptions < Stripe::RequestParams
9
+ class AppleTermsAndConditions < Stripe::RequestParams
10
+ # Whether the link should also support users relinking their Apple account.
11
+ attr_accessor :allow_relinking
12
+ # The business name of the merchant accepting Apple's Terms and Conditions.
13
+ attr_accessor :merchant_display_name
14
+
15
+ def initialize(allow_relinking: nil, merchant_display_name: nil)
16
+ @allow_relinking = allow_relinking
17
+ @merchant_display_name = merchant_display_name
18
+ end
19
+ end
20
+ # The options associated with the Apple Terms and Conditions link type.
21
+ attr_accessor :apple_terms_and_conditions
22
+
23
+ def initialize(apple_terms_and_conditions: nil)
24
+ @apple_terms_and_conditions = apple_terms_and_conditions
25
+ end
26
+ end
27
+ # Specifies which fields in the response should be expanded.
28
+ attr_accessor :expand
29
+ # Specific fields needed to generate the desired link type.
30
+ attr_accessor :link_options
31
+ # The type of link being generated.
32
+ attr_accessor :link_type
33
+ # Stripe account ID to generate the link for.
34
+ attr_accessor :on_behalf_of
35
+
36
+ def initialize(expand: nil, link_options: nil, link_type: nil, on_behalf_of: nil)
37
+ @expand = expand
38
+ @link_options = link_options
39
+ @link_type = link_type
40
+ @on_behalf_of = on_behalf_of
41
+ end
42
+ end
43
+
44
+ # Creates a new OnboardingLink object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone.
45
+ def create(params = {}, opts = {})
46
+ request(
47
+ method: :post,
48
+ path: "/v1/terminal/onboarding_links",
49
+ params: params,
50
+ opts: opts,
51
+ base_address: :api
52
+ )
53
+ end
54
+ end
55
+ end
56
+ end
@@ -3,13 +3,14 @@
3
3
 
4
4
  module Stripe
5
5
  class TerminalService < StripeService
6
- attr_reader :configurations, :connection_tokens, :locations, :readers, :reader_collected_data
6
+ attr_reader :configurations, :connection_tokens, :locations, :onboarding_links, :readers, :reader_collected_data
7
7
 
8
8
  def initialize(requestor)
9
9
  super
10
10
  @configurations = Stripe::Terminal::ConfigurationService.new(@requestor)
11
11
  @connection_tokens = Stripe::Terminal::ConnectionTokenService.new(@requestor)
12
12
  @locations = Stripe::Terminal::LocationService.new(@requestor)
13
+ @onboarding_links = Stripe::Terminal::OnboardingLinkService.new(@requestor)
13
14
  @readers = Stripe::Terminal::ReaderService.new(@requestor)
14
15
  @reader_collected_data = Stripe::Terminal::ReaderCollectedDataService.new(@requestor)
15
16
  end
@@ -8,14 +8,33 @@ module Stripe
8
8
  class CreateParams < Stripe::RequestParams
9
9
  class UseCase < Stripe::RequestParams
10
10
  class AccountOnboarding < Stripe::RequestParams
11
- # 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.
11
+ class CollectionOptions < Stripe::RequestParams
12
+ # 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.
13
+ attr_accessor :fields
14
+ # Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
15
+ attr_accessor :future_requirements
16
+
17
+ def initialize(fields: nil, future_requirements: nil)
18
+ @fields = fields
19
+ @future_requirements = future_requirements
20
+ end
21
+ end
22
+ # Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow.
23
+ attr_accessor :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.
12
25
  attr_accessor :configurations
13
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.
14
27
  attr_accessor :refresh_url
15
28
  # The URL that the user will be redirected to upon completing the linked flow.
16
29
  attr_accessor :return_url
17
30
 
18
- def initialize(configurations: nil, refresh_url: nil, return_url: nil)
31
+ def initialize(
32
+ collection_options: nil,
33
+ configurations: nil,
34
+ refresh_url: nil,
35
+ return_url: nil
36
+ )
37
+ @collection_options = collection_options
19
38
  @configurations = configurations
20
39
  @refresh_url = refresh_url
21
40
  @return_url = return_url
@@ -23,6 +42,19 @@ module Stripe
23
42
  end
24
43
 
25
44
  class AccountUpdate < Stripe::RequestParams
45
+ class CollectionOptions < Stripe::RequestParams
46
+ # 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.
47
+ attr_accessor :fields
48
+ # Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
49
+ attr_accessor :future_requirements
50
+
51
+ def initialize(fields: nil, future_requirements: nil)
52
+ @fields = fields
53
+ @future_requirements = future_requirements
54
+ end
55
+ end
56
+ # Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow.
57
+ attr_accessor :collection_options
26
58
  # 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.
27
59
  attr_accessor :configurations
28
60
  # 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.
@@ -30,7 +62,13 @@ module Stripe
30
62
  # The URL that the user will be redirected to upon completing the linked flow.
31
63
  attr_accessor :return_url
32
64
 
33
- def initialize(configurations: nil, refresh_url: nil, return_url: nil)
65
+ def initialize(
66
+ collection_options: nil,
67
+ configurations: nil,
68
+ refresh_url: nil,
69
+ return_url: nil
70
+ )
71
+ @collection_options = collection_options
34
72
  @configurations = configurations
35
73
  @refresh_url = refresh_url
36
74
  @return_url = return_url
@@ -1254,11 +1254,29 @@ module Stripe
1254
1254
  @user_agent = user_agent
1255
1255
  end
1256
1256
  end
1257
+
1258
+ class Storer < Stripe::RequestParams
1259
+ # 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.
1260
+ attr_accessor :date
1261
+ # The IP address from which the Account's representative accepted the terms of service.
1262
+ attr_accessor :ip
1263
+ # The user agent of the browser from which the Account's representative accepted the terms of service.
1264
+ attr_accessor :user_agent
1265
+
1266
+ def initialize(date: nil, ip: nil, user_agent: nil)
1267
+ @date = date
1268
+ @ip = ip
1269
+ @user_agent = user_agent
1270
+ end
1271
+ end
1257
1272
  # Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance).
1258
1273
  attr_accessor :account
1274
+ # Details on the Account's acceptance of Treasury-specific terms of service.
1275
+ attr_accessor :storer
1259
1276
 
1260
- def initialize(account: nil)
1277
+ def initialize(account: nil, storer: nil)
1261
1278
  @account = account
1279
+ @storer = storer
1262
1280
  end
1263
1281
  end
1264
1282
  # This hash is used to attest that the directors information provided to Stripe is both current and correct.
@@ -3462,11 +3480,29 @@ module Stripe
3462
3480
  @user_agent = user_agent
3463
3481
  end
3464
3482
  end
3483
+
3484
+ class Storer < Stripe::RequestParams
3485
+ # 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.
3486
+ attr_accessor :date
3487
+ # The IP address from which the Account's representative accepted the terms of service.
3488
+ attr_accessor :ip
3489
+ # The user agent of the browser from which the Account's representative accepted the terms of service.
3490
+ attr_accessor :user_agent
3491
+
3492
+ def initialize(date: nil, ip: nil, user_agent: nil)
3493
+ @date = date
3494
+ @ip = ip
3495
+ @user_agent = user_agent
3496
+ end
3497
+ end
3465
3498
  # Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance).
3466
3499
  attr_accessor :account
3500
+ # Details on the Account's acceptance of Treasury-specific terms of service.
3501
+ attr_accessor :storer
3467
3502
 
3468
- def initialize(account: nil)
3503
+ def initialize(account: nil, storer: nil)
3469
3504
  @account = account
3505
+ @storer = storer
3470
3506
  end
3471
3507
  end
3472
3508
  # This hash is used to attest that the directors information provided to Stripe is both current and correct.
@@ -6,7 +6,7 @@ module Stripe
6
6
  module Payments
7
7
  class OffSessionPaymentService < StripeService
8
8
  class ListParams < Stripe::RequestParams
9
- # The page size limit, if not provided the default is 20.
9
+ # The page size limit. If not provided, the default is 20.
10
10
  attr_accessor :limit
11
11
 
12
12
  def initialize(limit: nil)
@@ -16,7 +16,7 @@ module Stripe
16
16
 
17
17
  class CreateParams < Stripe::RequestParams
18
18
  class RetryDetails < Stripe::RequestParams
19
- # How you want Stripe to retry the payment.
19
+ # Indicates the strategy for how you want Stripe to retry the payment.
20
20
  attr_accessor :retry_strategy
21
21
 
22
22
  def initialize(retry_strategy: nil)
@@ -25,9 +25,16 @@ module Stripe
25
25
  end
26
26
 
27
27
  class TransferData < Stripe::RequestParams
28
- # Amount in minor units that you want to transfer.
28
+ # The amount transferred to the destination account. This transfer will occur
29
+ # automatically after the payment succeeds. If no amount is specified, by default
30
+ # the entire payment amount is transferred to the destination account. The amount
31
+ # must be less than or equal to the
32
+ # [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),
33
+ # and must be a positive integer representing how much to transfer in the smallest
34
+ # currency unit (e.g., 100 cents to charge $1.00).
29
35
  attr_accessor :amount
30
- # ID of the connected account where you want money to go.
36
+ # The account (if any) that the payment is attributed to for tax reporting, and
37
+ # where funds from the payment are transferred to after payment success.
31
38
  attr_accessor :destination
32
39
 
33
40
  def initialize(amount: nil, destination: nil)
@@ -35,27 +42,35 @@ module Stripe
35
42
  @destination = destination
36
43
  end
37
44
  end
38
- # Amount you want to collect.
45
+ # The “presentment amount” to be collected from the customer.
39
46
  attr_accessor :amount
40
- # The frequency of the OSP.
47
+ # The frequency of the underlying payment.
41
48
  attr_accessor :cadence
42
- # Customer that owns the provided payment method.
49
+ # ID of the Customer to which this OffSessionPayment belongs.
43
50
  attr_accessor :customer
44
- # Any of your internal data you want to track here.
51
+ # Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can
52
+ # attach to an object. This can be useful for storing additional information about
53
+ # the object in a structured format. Learn more about
54
+ # [storing information in metadata](https://docs.corp.stripe.com/payments/payment-intents#storing-information-in-metadata).
45
55
  attr_accessor :metadata
46
- # The OBO merchant you want to use.
56
+ # The account (if any) for which the funds of the OffSessionPayment are intended.
47
57
  attr_accessor :on_behalf_of
48
- # Payment method you want to debit. Must be attached to a customer and set up for off-session usage.
58
+ # ID of the payment method used in this OffSessionPayment.
49
59
  attr_accessor :payment_method
50
- # How you want stripe to retry the OSP.
60
+ # Details about the OffSessionPayment retries.
51
61
  attr_accessor :retry_details
52
- # String you want to appear on your customer's statement.
62
+ # Text that appears on the customers statement as the statement descriptor for a
63
+ # non-card charge. This value overrides the account’s default statement descriptor.
64
+ # For information about requirements, including the 22-character limit, see the
65
+ # [Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
53
66
  attr_accessor :statement_descriptor
54
- # Suffix appended to your account level descriptor.
67
+ # Provides information about a card charge. Concatenated to the account’s
68
+ # [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static)
69
+ # to form the complete statement descriptor that appears on the customer’s statement.
55
70
  attr_accessor :statement_descriptor_suffix
56
- # Test clock to be used for testing your retry handling. Only usable in a sandbox.
71
+ # Test clock that can be used to advance the retry attempts in a sandbox.
57
72
  attr_accessor :test_clock
58
- # How you want to transfer the funds to your connected accounts.
73
+ # 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).
59
74
  attr_accessor :transfer_data
60
75
 
61
76
  def initialize(
@@ -88,7 +103,7 @@ module Stripe
88
103
  class RetrieveParams < Stripe::RequestParams; end
89
104
  class CancelParams < Stripe::RequestParams; end
90
105
 
91
- # Cancel OSP.
106
+ # Cancel an OffSessionPayment that has previously been created.
92
107
  def cancel(id, params = {}, opts = {})
93
108
  request(
94
109
  method: :post,
@@ -99,7 +114,7 @@ module Stripe
99
114
  )
100
115
  end
101
116
 
102
- # Create OSP.
117
+ # Creates an OffSessionPayment object.
103
118
  def create(params = {}, opts = {})
104
119
  request(
105
120
  method: :post,
@@ -110,7 +125,7 @@ module Stripe
110
125
  )
111
126
  end
112
127
 
113
- # List OSPs matching filter.
128
+ # Returns a list of OffSessionPayments matching a filter.
114
129
  def list(params = {}, opts = {})
115
130
  request(
116
131
  method: :get,
@@ -121,7 +136,7 @@ module Stripe
121
136
  )
122
137
  end
123
138
 
124
- # Retrieve OSP by ID.
139
+ # Retrieves the details of an OffSessionPayment that has previously been created.
125
140
  def retrieve(id, params = {}, opts = {})
126
141
  request(
127
142
  method: :get,
@@ -23,6 +23,8 @@ module Stripe
23
23
  class GenerateMicrodepositsParams < Stripe::RequestParams; end
24
24
 
25
25
  # Simulate crediting a FinancialAddress in a Sandbox environment. This can be used to add virtual funds and increase your balance for testing.
26
+ #
27
+ # ** raises FeatureNotEnabledError
26
28
  def credit(id, params = {}, opts = {})
27
29
  request(
28
30
  method: :post,
@@ -34,6 +36,8 @@ module Stripe
34
36
  end
35
37
 
36
38
  # Generates microdeposits for a FinancialAddress in a Sandbox environment.
39
+ #
40
+ # ** raises FeatureNotEnabledError
37
41
  def generate_microdeposits(id, params = {}, opts = {})
38
42
  request(
39
43
  method: :post,