onebusaway-sdk 1.0.2 → 1.0.3

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 (127) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +4 -4
  4. data/SECURITY.md +2 -2
  5. data/lib/onebusaway_sdk/internal/type/array_of.rb +8 -0
  6. data/lib/onebusaway_sdk/internal/type/base_model.rb +7 -0
  7. data/lib/onebusaway_sdk/internal/type/boolean.rb +8 -0
  8. data/lib/onebusaway_sdk/internal/type/enum.rb +12 -0
  9. data/lib/onebusaway_sdk/internal/type/file_input.rb +7 -0
  10. data/lib/onebusaway_sdk/internal/type/hash_of.rb +8 -0
  11. data/lib/onebusaway_sdk/internal/type/union.rb +12 -0
  12. data/lib/onebusaway_sdk/internal/type/unknown.rb +8 -0
  13. data/lib/onebusaway_sdk/internal/util.rb +54 -1
  14. data/lib/onebusaway_sdk/internal.rb +3 -0
  15. data/lib/onebusaway_sdk/models/agencies_with_coverage_list_response.rb +2 -2
  16. data/lib/onebusaway_sdk/models/agency_retrieve_response.rb +2 -2
  17. data/lib/onebusaway_sdk/models/arrival_and_departure_list_response.rb +2 -2
  18. data/lib/onebusaway_sdk/models/arrival_and_departure_retrieve_response.rb +2 -2
  19. data/lib/onebusaway_sdk/models/block_retrieve_response.rb +2 -2
  20. data/lib/onebusaway_sdk/models/config_retrieve_response.rb +2 -2
  21. data/lib/onebusaway_sdk/models/current_time_retrieve_response.rb +2 -2
  22. data/lib/onebusaway_sdk/models/references.rb +38 -38
  23. data/lib/onebusaway_sdk/models/report_problem_with_stop_retrieve_params.rb +2 -2
  24. data/lib/onebusaway_sdk/models/report_problem_with_trip_retrieve_params.rb +2 -2
  25. data/lib/onebusaway_sdk/models/route_ids_for_agency_list_response.rb +2 -2
  26. data/lib/onebusaway_sdk/models/route_retrieve_response.rb +2 -2
  27. data/lib/onebusaway_sdk/models/routes_for_agency_list_response.rb +2 -2
  28. data/lib/onebusaway_sdk/models/routes_for_location_list_response.rb +2 -2
  29. data/lib/onebusaway_sdk/models/schedule_for_stop_retrieve_response.rb +2 -2
  30. data/lib/onebusaway_sdk/models/search_for_route_list_response.rb +2 -2
  31. data/lib/onebusaway_sdk/models/search_for_stop_list_response.rb +2 -2
  32. data/lib/onebusaway_sdk/models/shape_retrieve_response.rb +2 -2
  33. data/lib/onebusaway_sdk/models/stop_ids_for_agency_list_response.rb +2 -2
  34. data/lib/onebusaway_sdk/models/stop_retrieve_response.rb +2 -2
  35. data/lib/onebusaway_sdk/models/stops_for_agency_list_response.rb +2 -2
  36. data/lib/onebusaway_sdk/models/stops_for_location_list_response.rb +2 -2
  37. data/lib/onebusaway_sdk/models/stops_for_route_list_response.rb +2 -2
  38. data/lib/onebusaway_sdk/models/trip_detail_retrieve_response.rb +2 -2
  39. data/lib/onebusaway_sdk/models/trip_for_vehicle_retrieve_response.rb +2 -2
  40. data/lib/onebusaway_sdk/models/trip_retrieve_response.rb +2 -2
  41. data/lib/onebusaway_sdk/models/trips_for_location_list_response.rb +2 -2
  42. data/lib/onebusaway_sdk/models/trips_for_route_list_response.rb +2 -2
  43. data/lib/onebusaway_sdk/models/vehicles_for_agency_list_response.rb +2 -2
  44. data/lib/onebusaway_sdk/models.rb +30 -19
  45. data/lib/onebusaway_sdk/resources/report_problem_with_stop.rb +2 -2
  46. data/lib/onebusaway_sdk/resources/report_problem_with_trip.rb +2 -2
  47. data/lib/onebusaway_sdk/version.rb +1 -1
  48. data/lib/onebusaway_sdk.rb +3 -1
  49. data/rbi/onebusaway_sdk/internal/type/array_of.rbi +6 -0
  50. data/rbi/onebusaway_sdk/internal/type/base_model.rbi +5 -0
  51. data/rbi/onebusaway_sdk/internal/type/boolean.rbi +6 -0
  52. data/rbi/onebusaway_sdk/internal/type/enum.rbi +5 -0
  53. data/rbi/onebusaway_sdk/internal/type/file_input.rbi +5 -0
  54. data/rbi/onebusaway_sdk/internal/type/hash_of.rbi +6 -0
  55. data/rbi/onebusaway_sdk/internal/type/union.rbi +5 -0
  56. data/rbi/onebusaway_sdk/internal/type/unknown.rbi +6 -0
  57. data/rbi/onebusaway_sdk/internal/util.rbi +34 -0
  58. data/rbi/onebusaway_sdk/internal.rbi +5 -0
  59. data/sig/onebusaway_sdk/internal/type/array_of.rbs +3 -0
  60. data/sig/onebusaway_sdk/internal/type/base_model.rbs +2 -0
  61. data/sig/onebusaway_sdk/internal/type/boolean.rbs +3 -0
  62. data/sig/onebusaway_sdk/internal/type/enum.rbs +2 -0
  63. data/sig/onebusaway_sdk/internal/type/file_input.rbs +2 -0
  64. data/sig/onebusaway_sdk/internal/type/hash_of.rbs +3 -0
  65. data/sig/onebusaway_sdk/internal/type/union.rbs +2 -0
  66. data/sig/onebusaway_sdk/internal/type/unknown.rbs +3 -0
  67. data/sig/onebusaway_sdk/internal/util.rbs +12 -0
  68. data/sig/onebusaway_sdk/internal.rbs +3 -0
  69. data/sig/onebusaway_sdk/models/agencies_with_coverage_list_params.rbs +2 -0
  70. data/sig/onebusaway_sdk/models/agencies_with_coverage_list_response.rbs +18 -0
  71. data/sig/onebusaway_sdk/models/agency_retrieve_params.rbs +2 -0
  72. data/sig/onebusaway_sdk/models/agency_retrieve_response.rbs +23 -0
  73. data/sig/onebusaway_sdk/models/arrival_and_departure_list_params.rbs +7 -0
  74. data/sig/onebusaway_sdk/models/arrival_and_departure_list_response.rbs +84 -0
  75. data/sig/onebusaway_sdk/models/arrival_and_departure_retrieve_params.rbs +9 -0
  76. data/sig/onebusaway_sdk/models/arrival_and_departure_retrieve_response.rbs +80 -0
  77. data/sig/onebusaway_sdk/models/block_retrieve_params.rbs +2 -0
  78. data/sig/onebusaway_sdk/models/block_retrieve_response.rbs +42 -0
  79. data/sig/onebusaway_sdk/models/config_retrieve_params.rbs +2 -0
  80. data/sig/onebusaway_sdk/models/config_retrieve_response.rbs +40 -0
  81. data/sig/onebusaway_sdk/models/current_time_retrieve_params.rbs +2 -0
  82. data/sig/onebusaway_sdk/models/current_time_retrieve_response.rbs +11 -0
  83. data/sig/onebusaway_sdk/models/references.rbs +128 -6
  84. data/sig/onebusaway_sdk/models/report_problem_with_stop_retrieve_params.rbs +9 -0
  85. data/sig/onebusaway_sdk/models/report_problem_with_trip_retrieve_params.rbs +14 -0
  86. data/sig/onebusaway_sdk/models/response_wrapper.rbs +7 -0
  87. data/sig/onebusaway_sdk/models/route_ids_for_agency_list_params.rbs +2 -0
  88. data/sig/onebusaway_sdk/models/route_ids_for_agency_list_response.rbs +10 -0
  89. data/sig/onebusaway_sdk/models/route_retrieve_params.rbs +2 -0
  90. data/sig/onebusaway_sdk/models/route_retrieve_response.rbs +22 -0
  91. data/sig/onebusaway_sdk/models/routes_for_agency_list_params.rbs +2 -0
  92. data/sig/onebusaway_sdk/models/routes_for_agency_list_response.rbs +23 -0
  93. data/sig/onebusaway_sdk/models/routes_for_location_list_params.rbs +10 -0
  94. data/sig/onebusaway_sdk/models/routes_for_location_list_response.rbs +24 -0
  95. data/sig/onebusaway_sdk/models/schedule_for_route_retrieve_params.rbs +5 -0
  96. data/sig/onebusaway_sdk/models/schedule_for_route_retrieve_response.rbs +69 -0
  97. data/sig/onebusaway_sdk/models/schedule_for_stop_retrieve_params.rbs +5 -0
  98. data/sig/onebusaway_sdk/models/schedule_for_stop_retrieve_response.rbs +45 -0
  99. data/sig/onebusaway_sdk/models/search_for_route_list_params.rbs +6 -0
  100. data/sig/onebusaway_sdk/models/search_for_route_list_response.rbs +24 -0
  101. data/sig/onebusaway_sdk/models/search_for_stop_list_params.rbs +6 -0
  102. data/sig/onebusaway_sdk/models/search_for_stop_list_response.rbs +25 -0
  103. data/sig/onebusaway_sdk/models/shape_retrieve_params.rbs +2 -0
  104. data/sig/onebusaway_sdk/models/shape_retrieve_response.rbs +11 -0
  105. data/sig/onebusaway_sdk/models/stop_ids_for_agency_list_params.rbs +2 -0
  106. data/sig/onebusaway_sdk/models/stop_ids_for_agency_list_response.rbs +10 -0
  107. data/sig/onebusaway_sdk/models/stop_retrieve_params.rbs +2 -0
  108. data/sig/onebusaway_sdk/models/stop_retrieve_response.rbs +23 -0
  109. data/sig/onebusaway_sdk/models/stops_for_agency_list_params.rbs +2 -0
  110. data/sig/onebusaway_sdk/models/stops_for_agency_list_response.rbs +21 -0
  111. data/sig/onebusaway_sdk/models/stops_for_location_list_params.rbs +10 -0
  112. data/sig/onebusaway_sdk/models/stops_for_location_list_response.rbs +25 -0
  113. data/sig/onebusaway_sdk/models/stops_for_route_list_params.rbs +6 -0
  114. data/sig/onebusaway_sdk/models/stops_for_route_list_response.rbs +37 -0
  115. data/sig/onebusaway_sdk/models/trip_detail_retrieve_params.rbs +9 -0
  116. data/sig/onebusaway_sdk/models/trip_detail_retrieve_response.rbs +69 -0
  117. data/sig/onebusaway_sdk/models/trip_for_vehicle_retrieve_params.rbs +8 -0
  118. data/sig/onebusaway_sdk/models/trip_for_vehicle_retrieve_response.rbs +69 -0
  119. data/sig/onebusaway_sdk/models/trip_retrieve_params.rbs +2 -0
  120. data/sig/onebusaway_sdk/models/trip_retrieve_response.rbs +23 -0
  121. data/sig/onebusaway_sdk/models/trips_for_location_list_params.rbs +11 -0
  122. data/sig/onebusaway_sdk/models/trips_for_location_list_response.rbs +71 -0
  123. data/sig/onebusaway_sdk/models/trips_for_route_list_params.rbs +7 -0
  124. data/sig/onebusaway_sdk/models/trips_for_route_list_response.rbs +70 -0
  125. data/sig/onebusaway_sdk/models/vehicles_for_agency_list_params.rbs +5 -0
  126. data/sig/onebusaway_sdk/models/vehicles_for_agency_list_response.rbs +60 -0
  127. metadata +2 -2
@@ -8,29 +8,40 @@ module OnebusawaySDK
8
8
  cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, OnebusawaySDK::Internal::AnyHash) } }
9
9
  end
10
10
 
11
- [
12
- *OnebusawaySDK::Internal::Type::Enum.included_modules,
13
- *OnebusawaySDK::Internal::Type::Union.included_modules
14
- ].each do |cls|
15
- cls.constants.each do |name|
16
- case cls.const_get(name)
17
- in true | false
18
- cls.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, cls) } }
19
- cls.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
20
- in Integer
21
- cls.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, cls) } }
22
- cls.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
23
- in Float
24
- cls.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, cls) } }
25
- cls.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
26
- in Symbol
27
- cls.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, cls) } }
28
- cls.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
29
- else
11
+ OnebusawaySDK::Internal::Util.walk_namespaces(OnebusawaySDK::Models).each do |mod|
12
+ case mod
13
+ in OnebusawaySDK::Internal::Type::Enum | OnebusawaySDK::Internal::Type::Union
14
+ mod.constants.each do |name|
15
+ case mod.const_get(name)
16
+ in true | false
17
+ mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, mod) } }
18
+ mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
19
+ in Integer
20
+ mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, mod) } }
21
+ mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
22
+ in Float
23
+ mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, mod) } }
24
+ mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
25
+ in Symbol
26
+ mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, mod) } }
27
+ mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
28
+ else
29
+ end
30
30
  end
31
+ else
31
32
  end
32
33
  end
33
34
 
35
+ OnebusawaySDK::Internal::Util.walk_namespaces(OnebusawaySDK::Models)
36
+ .lazy
37
+ .grep(OnebusawaySDK::Internal::Type::Union)
38
+ .each do |mod|
39
+ const = :Variants
40
+ next if mod.sorbet_constant_defined?(const)
41
+
42
+ mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
43
+ end
44
+
34
45
  AgenciesWithCoverageListParams = OnebusawaySDK::Models::AgenciesWithCoverageListParams
35
46
 
36
47
  AgencyRetrieveParams = OnebusawaySDK::Models::AgencyRetrieveParams
@@ -9,7 +9,7 @@ module OnebusawaySDK
9
9
  #
10
10
  # @param stop_id [String] The ID of the stop
11
11
  #
12
- # @param code [Symbol, OnebusawaySDK::ReportProblemWithStopRetrieveParams::Code] A string code identifying the nature of the problem
12
+ # @param code [Symbol, OnebusawaySDK::Models::ReportProblemWithStopRetrieveParams::Code] A string code identifying the nature of the problem
13
13
  #
14
14
  # @param user_comment [String] Additional comment text supplied by the user describing the problem
15
15
  #
@@ -21,7 +21,7 @@ module OnebusawaySDK
21
21
  #
22
22
  # @param request_options [OnebusawaySDK::RequestOptions, Hash{Symbol=>Object}, nil]
23
23
  #
24
- # @return [OnebusawaySDK::ResponseWrapper]
24
+ # @return [OnebusawaySDK::Models::ResponseWrapper]
25
25
  #
26
26
  # @see OnebusawaySDK::Models::ReportProblemWithStopRetrieveParams
27
27
  def retrieve(stop_id, params = {})
@@ -9,7 +9,7 @@ module OnebusawaySDK
9
9
  #
10
10
  # @param trip_id [String] The ID of the trip
11
11
  #
12
- # @param code [Symbol, OnebusawaySDK::ReportProblemWithTripRetrieveParams::Code] A string code identifying the nature of the problem
12
+ # @param code [Symbol, OnebusawaySDK::Models::ReportProblemWithTripRetrieveParams::Code] A string code identifying the nature of the problem
13
13
  #
14
14
  # @param service_date [Integer] The service date of the trip
15
15
  #
@@ -31,7 +31,7 @@ module OnebusawaySDK
31
31
  #
32
32
  # @param request_options [OnebusawaySDK::RequestOptions, Hash{Symbol=>Object}, nil]
33
33
  #
34
- # @return [OnebusawaySDK::ResponseWrapper]
34
+ # @return [OnebusawaySDK::Models::ResponseWrapper]
35
35
  #
36
36
  # @see OnebusawaySDK::Models::ReportProblemWithTripRetrieveParams
37
37
  def retrieve(trip_id, params = {})
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OnebusawaySDK
4
- VERSION = "1.0.2"
4
+ VERSION = "1.0.3"
5
5
  end
@@ -20,7 +20,9 @@ require "uri"
20
20
 
21
21
  # We already ship the preferred sorbet manifests in the package itself.
22
22
  # `tapioca` currently does not offer us a way to opt out of unnecessary compilation.
23
- if Object.const_defined?(:Tapioca) && caller.chain([$PROGRAM_NAME]).chain(ARGV).grep(/tapioca/)
23
+ if Object.const_defined?(:Tapioca) &&
24
+ caller.chain([$PROGRAM_NAME]).chain(ARGV).any?(/tapioca/) &&
25
+ ARGV.none?(/dsl/)
24
26
  return
25
27
  end
26
28
 
@@ -8,6 +8,7 @@ module OnebusawaySDK
8
8
  # Array of items of a given type.
9
9
  class ArrayOf
10
10
  include OnebusawaySDK::Internal::Type::Converter
11
+ include OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
11
12
 
12
13
  abstract!
13
14
 
@@ -63,6 +64,11 @@ module OnebusawaySDK
63
64
  def dump(value, state:)
64
65
  end
65
66
 
67
+ # @api private
68
+ sig { returns(T.anything) }
69
+ def to_sorbet_type
70
+ end
71
+
66
72
  # @api private
67
73
  sig { returns(Elem) }
68
74
  protected def item_type
@@ -205,6 +205,11 @@ module OnebusawaySDK
205
205
  end
206
206
  def dump(value, state:)
207
207
  end
208
+
209
+ # @api private
210
+ sig { returns(T.anything) }
211
+ def to_sorbet_type
212
+ end
208
213
  end
209
214
 
210
215
  class << self
@@ -8,6 +8,7 @@ module OnebusawaySDK
8
8
  # Ruby has no Boolean class; this is something for models to refer to.
9
9
  class Boolean
10
10
  extend OnebusawaySDK::Internal::Type::Converter
11
+ extend OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
11
12
 
12
13
  abstract!
13
14
 
@@ -43,6 +44,11 @@ module OnebusawaySDK
43
44
  end
44
45
  def dump(value, state:)
45
46
  end
47
+
48
+ # @api private
49
+ sig { returns(T.anything) }
50
+ def to_sorbet_type
51
+ end
46
52
  end
47
53
  end
48
54
  end
@@ -67,6 +67,11 @@ module OnebusawaySDK
67
67
  def dump(value, state:)
68
68
  end
69
69
 
70
+ # @api private
71
+ sig { returns(T.anything) }
72
+ def to_sorbet_type
73
+ end
74
+
70
75
  # @api private
71
76
  sig { params(depth: Integer).returns(String) }
72
77
  def inspect(depth: 0)
@@ -47,6 +47,11 @@ module OnebusawaySDK
47
47
  end
48
48
  def dump(value, state:)
49
49
  end
50
+
51
+ # @api private
52
+ sig { returns(T.anything) }
53
+ def to_sorbet_type
54
+ end
50
55
  end
51
56
  end
52
57
  end
@@ -8,6 +8,7 @@ module OnebusawaySDK
8
8
  # Hash of items of a given type.
9
9
  class HashOf
10
10
  include OnebusawaySDK::Internal::Type::Converter
11
+ include OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
11
12
 
12
13
  abstract!
13
14
 
@@ -63,6 +64,11 @@ module OnebusawaySDK
63
64
  def dump(value, state:)
64
65
  end
65
66
 
67
+ # @api private
68
+ sig { returns(T.anything) }
69
+ def to_sorbet_type
70
+ end
71
+
66
72
  # @api private
67
73
  sig { returns(Elem) }
68
74
  protected def item_type
@@ -101,6 +101,11 @@ module OnebusawaySDK
101
101
  def dump(value, state:)
102
102
  end
103
103
 
104
+ # @api private
105
+ sig { returns(T.anything) }
106
+ def to_sorbet_type
107
+ end
108
+
104
109
  # @api private
105
110
  sig { params(depth: Integer).returns(String) }
106
111
  def inspect(depth: 0)
@@ -8,6 +8,7 @@ module OnebusawaySDK
8
8
  # When we don't know what to expect for the value.
9
9
  class Unknown
10
10
  extend OnebusawaySDK::Internal::Type::Converter
11
+ extend OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
11
12
 
12
13
  abstract!
13
14
 
@@ -43,6 +44,11 @@ module OnebusawaySDK
43
44
  end
44
45
  def dump(value, state:)
45
46
  end
47
+
48
+ # @api private
49
+ sig { returns(T.anything) }
50
+ def to_sorbet_type
51
+ end
46
52
  end
47
53
  end
48
54
  end
@@ -11,6 +11,15 @@ module OnebusawaySDK
11
11
  def self.monotonic_secs
12
12
  end
13
13
 
14
+ # @api private
15
+ sig do
16
+ params(ns: T.any(Module, T::Class[T.anything])).returns(
17
+ T::Enumerable[T.any(Module, T::Class[T.anything])]
18
+ )
19
+ end
20
+ def self.walk_namespaces(ns)
21
+ end
22
+
14
23
  class << self
15
24
  # @api private
16
25
  sig { returns(String) }
@@ -441,10 +450,35 @@ module OnebusawaySDK
441
450
  def const_missing(name)
442
451
  end
443
452
 
453
+ # @api private
454
+ sig { params(name: Symbol).returns(T::Boolean) }
455
+ def sorbet_constant_defined?(name)
456
+ end
457
+
444
458
  # @api private
445
459
  sig { params(name: Symbol, blk: T.proc.returns(T.anything)).void }
446
460
  def define_sorbet_constant!(name, &blk)
447
461
  end
462
+
463
+ # @api private
464
+ sig { returns(T.anything) }
465
+ def to_sorbet_type
466
+ end
467
+
468
+ class << self
469
+ # @api private
470
+ sig do
471
+ params(
472
+ type:
473
+ T.any(
474
+ OnebusawaySDK::Internal::Util::SorbetRuntimeSupport,
475
+ T.anything
476
+ )
477
+ ).returns(T.anything)
478
+ end
479
+ def to_sorbet_type(type)
480
+ end
481
+ end
448
482
  end
449
483
  end
450
484
  end
@@ -8,6 +8,11 @@ module OnebusawaySDK
8
8
  # this alias might be refined in the future.
9
9
  AnyHash = T.type_alias { T::Hash[Symbol, T.anything] }
10
10
 
11
+ FileInput =
12
+ T.type_alias do
13
+ T.any(Pathname, StringIO, IO, String, OnebusawaySDK::FilePart)
14
+ end
15
+
11
16
  OMIT = T.let(Object.new.freeze, T.anything)
12
17
  end
13
18
  end
@@ -3,6 +3,7 @@ module OnebusawaySDK
3
3
  module Type
4
4
  class ArrayOf[Elem]
5
5
  include OnebusawaySDK::Internal::Type::Converter
6
+ include OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
6
7
 
7
8
  def self.[]: (
8
9
  ::Hash[Symbol, top]
@@ -27,6 +28,8 @@ module OnebusawaySDK
27
28
  state: OnebusawaySDK::Internal::Type::Converter::dump_state
28
29
  ) -> (::Array[top] | top)
29
30
 
31
+ def to_sorbet_type: -> top
32
+
30
33
  def item_type: -> Elem
31
34
 
32
35
  def nilable?: -> bool
@@ -70,6 +70,8 @@ module OnebusawaySDK
70
70
  state: OnebusawaySDK::Internal::Type::Converter::dump_state
71
71
  ) -> (::Hash[top, top] | top)
72
72
 
73
+ def self.to_sorbet_type: -> top
74
+
73
75
  def self.recursively_to_h: (
74
76
  OnebusawaySDK::Internal::Type::BaseModel model,
75
77
  convert: bool
@@ -3,6 +3,7 @@ module OnebusawaySDK
3
3
  module Type
4
4
  class Boolean
5
5
  extend OnebusawaySDK::Internal::Type::Converter
6
+ extend OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
6
7
 
7
8
  def self.===: (top other) -> bool
8
9
 
@@ -17,6 +18,8 @@ module OnebusawaySDK
17
18
  bool | top value,
18
19
  state: OnebusawaySDK::Internal::Type::Converter::dump_state
19
20
  ) -> (bool | top)
21
+
22
+ def self.to_sorbet_type: -> top
20
23
  end
21
24
  end
22
25
  end
@@ -23,6 +23,8 @@ module OnebusawaySDK
23
23
  state: OnebusawaySDK::Internal::Type::Converter::dump_state
24
24
  ) -> (Symbol | top)
25
25
 
26
+ def to_sorbet_type: -> top
27
+
26
28
  def inspect: (?depth: Integer) -> String
27
29
  end
28
30
  end
@@ -17,6 +17,8 @@ module OnebusawaySDK
17
17
  Pathname | StringIO | IO | String | top value,
18
18
  state: OnebusawaySDK::Internal::Type::Converter::dump_state
19
19
  ) -> (Pathname | StringIO | IO | String | top)
20
+
21
+ def self.to_sorbet_type: -> top
20
22
  end
21
23
  end
22
24
  end
@@ -3,6 +3,7 @@ module OnebusawaySDK
3
3
  module Type
4
4
  class HashOf[Elem]
5
5
  include OnebusawaySDK::Internal::Type::Converter
6
+ include OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
6
7
 
7
8
  def self.[]: (
8
9
  ::Hash[Symbol, top]
@@ -27,6 +28,8 @@ module OnebusawaySDK
27
28
  state: OnebusawaySDK::Internal::Type::Converter::dump_state
28
29
  ) -> (::Hash[Symbol, top] | top)
29
30
 
31
+ def to_sorbet_type: -> top
32
+
30
33
  def item_type: -> Elem
31
34
 
32
35
  def nilable?: -> bool
@@ -43,6 +43,8 @@ module OnebusawaySDK
43
43
  state: OnebusawaySDK::Internal::Type::Converter::dump_state
44
44
  ) -> top
45
45
 
46
+ def to_sorbet_type: -> top
47
+
46
48
  def inspect: (?depth: Integer) -> String
47
49
  end
48
50
  end
@@ -3,6 +3,7 @@ module OnebusawaySDK
3
3
  module Type
4
4
  class Unknown
5
5
  extend OnebusawaySDK::Internal::Type::Converter
6
+ extend OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
6
7
 
7
8
  def self.===: (top other) -> bool
8
9
 
@@ -17,6 +18,8 @@ module OnebusawaySDK
17
18
  top value,
18
19
  state: OnebusawaySDK::Internal::Type::Converter::dump_state
19
20
  ) -> top
21
+
22
+ def self.to_sorbet_type: -> top
20
23
  end
21
24
  end
22
25
  end
@@ -5,6 +5,10 @@ module OnebusawaySDK
5
5
 
6
6
  def self?.monotonic_secs: -> Float
7
7
 
8
+ def self?.walk_namespaces: (
9
+ Module | Class ns
10
+ ) -> Enumerable[(Module | Class)]
11
+
8
12
  def self?.arch: -> String
9
13
 
10
14
  def self?.os: -> String
@@ -166,7 +170,15 @@ module OnebusawaySDK
166
170
 
167
171
  def const_missing: (Symbol name) -> void
168
172
 
173
+ def sorbet_constant_defined?: (Symbol name) -> bool
174
+
169
175
  def define_sorbet_constant!: (Symbol name) { -> top } -> void
176
+
177
+ def to_sorbet_type: -> top
178
+
179
+ def self.to_sorbet_type: (
180
+ OnebusawaySDK::Internal::Util::SorbetRuntimeSupport | top `type`
181
+ ) -> top
170
182
  end
171
183
  end
172
184
  end
@@ -2,6 +2,9 @@ module OnebusawaySDK
2
2
  module Internal
3
3
  extend OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
4
4
 
5
+ type file_input =
6
+ Pathname | StringIO | IO | String | OnebusawaySDK::FilePart
7
+
5
8
  OMIT: Object
6
9
  end
7
10
  end
@@ -8,6 +8,8 @@ module OnebusawaySDK
8
8
  include OnebusawaySDK::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: OnebusawaySDK::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: OnebusawaySDK::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -14,6 +14,10 @@ module OnebusawaySDK
14
14
  data: OnebusawaySDK::Models::AgenciesWithCoverageListResponse::Data
15
15
  ) -> void
16
16
 
17
+ def to_hash: -> {
18
+ data: OnebusawaySDK::Models::AgenciesWithCoverageListResponse::Data
19
+ }
20
+
17
21
  type data =
18
22
  {
19
23
  limit_exceeded: bool,
@@ -34,6 +38,12 @@ module OnebusawaySDK
34
38
  references: OnebusawaySDK::References
35
39
  ) -> void
36
40
 
41
+ def to_hash: -> {
42
+ limit_exceeded: bool,
43
+ list: ::Array[OnebusawaySDK::Models::AgenciesWithCoverageListResponse::Data::List],
44
+ references: OnebusawaySDK::References
45
+ }
46
+
37
47
  type list =
38
48
  {
39
49
  agency_id: String,
@@ -61,6 +71,14 @@ module OnebusawaySDK
61
71
  lon: Float,
62
72
  lon_span: Float
63
73
  ) -> void
74
+
75
+ def to_hash: -> {
76
+ agency_id: String,
77
+ lat: Float,
78
+ lat_span: Float,
79
+ lon: Float,
80
+ lon_span: Float
81
+ }
64
82
  end
65
83
  end
66
84
  end
@@ -8,6 +8,8 @@ module OnebusawaySDK
8
8
  include OnebusawaySDK::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: OnebusawaySDK::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: OnebusawaySDK::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -14,6 +14,10 @@ module OnebusawaySDK
14
14
  data: OnebusawaySDK::Models::AgencyRetrieveResponse::Data
15
15
  ) -> void
16
16
 
17
+ def to_hash: -> {
18
+ data: OnebusawaySDK::Models::AgencyRetrieveResponse::Data
19
+ }
20
+
17
21
  type data =
18
22
  {
19
23
  entry: OnebusawaySDK::Models::AgencyRetrieveResponse::Data::Entry,
@@ -34,6 +38,12 @@ module OnebusawaySDK
34
38
  references: OnebusawaySDK::References
35
39
  ) -> void
36
40
 
41
+ def to_hash: -> {
42
+ entry: OnebusawaySDK::Models::AgencyRetrieveResponse::Data::Entry,
43
+ limit_exceeded: bool,
44
+ references: OnebusawaySDK::References
45
+ }
46
+
37
47
  type entry =
38
48
  {
39
49
  id: String,
@@ -93,6 +103,19 @@ module OnebusawaySDK
93
103
  ?phone: String,
94
104
  ?private_service: bool
95
105
  ) -> void
106
+
107
+ def to_hash: -> {
108
+ id: String,
109
+ name: String,
110
+ timezone: String,
111
+ url: String,
112
+ disclaimer: String,
113
+ email: String,
114
+ fare_url: String,
115
+ lang: String,
116
+ phone: String,
117
+ private_service: bool
118
+ }
96
119
  end
97
120
  end
98
121
  end
@@ -26,6 +26,13 @@ module OnebusawaySDK
26
26
  ?time: Time,
27
27
  ?request_options: OnebusawaySDK::request_opts
28
28
  ) -> void
29
+
30
+ def to_hash: -> {
31
+ minutes_after: Integer,
32
+ minutes_before: Integer,
33
+ time: Time,
34
+ request_options: OnebusawaySDK::RequestOptions
35
+ }
29
36
  end
30
37
  end
31
38
  end