onebusaway-sdk 0.1.0.pre.alpha.205 → 0.1.0.pre.alpha.207

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 (150) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +32 -20
  3. data/lib/onebusaway-sdk/base_client.rb +63 -91
  4. data/lib/onebusaway-sdk/base_model.rb +489 -514
  5. data/lib/onebusaway-sdk/base_page.rb +35 -15
  6. data/lib/onebusaway-sdk/client.rb +1 -3
  7. data/lib/onebusaway-sdk/errors.rb +15 -19
  8. data/lib/onebusaway-sdk/extern.rb +1 -4
  9. data/lib/onebusaway-sdk/models/references.rb +0 -21
  10. data/lib/onebusaway-sdk/models/report_problem_with_stop_retrieve_params.rb +0 -21
  11. data/lib/onebusaway-sdk/models/report_problem_with_trip_retrieve_params.rb +0 -23
  12. data/lib/onebusaway-sdk/pooled_net_requester.rb +53 -54
  13. data/lib/onebusaway-sdk/request_options.rb +4 -11
  14. data/lib/onebusaway-sdk/resources/agencies_with_coverage.rb +0 -2
  15. data/lib/onebusaway-sdk/resources/agency.rb +0 -2
  16. data/lib/onebusaway-sdk/resources/arrival_and_departure.rb +0 -3
  17. data/lib/onebusaway-sdk/resources/block.rb +0 -2
  18. data/lib/onebusaway-sdk/resources/config.rb +0 -2
  19. data/lib/onebusaway-sdk/resources/current_time.rb +0 -2
  20. data/lib/onebusaway-sdk/resources/report_problem_with_stop.rb +0 -2
  21. data/lib/onebusaway-sdk/resources/report_problem_with_trip.rb +0 -2
  22. data/lib/onebusaway-sdk/resources/route.rb +0 -2
  23. data/lib/onebusaway-sdk/resources/route_ids_for_agency.rb +0 -2
  24. data/lib/onebusaway-sdk/resources/routes_for_agency.rb +0 -2
  25. data/lib/onebusaway-sdk/resources/routes_for_location.rb +0 -2
  26. data/lib/onebusaway-sdk/resources/schedule_for_route.rb +0 -2
  27. data/lib/onebusaway-sdk/resources/schedule_for_stop.rb +0 -2
  28. data/lib/onebusaway-sdk/resources/search_for_route.rb +0 -2
  29. data/lib/onebusaway-sdk/resources/search_for_stop.rb +0 -2
  30. data/lib/onebusaway-sdk/resources/shape.rb +0 -2
  31. data/lib/onebusaway-sdk/resources/stop.rb +0 -2
  32. data/lib/onebusaway-sdk/resources/stop_ids_for_agency.rb +0 -2
  33. data/lib/onebusaway-sdk/resources/stops_for_agency.rb +0 -2
  34. data/lib/onebusaway-sdk/resources/stops_for_location.rb +0 -2
  35. data/lib/onebusaway-sdk/resources/stops_for_route.rb +0 -2
  36. data/lib/onebusaway-sdk/resources/trip.rb +0 -2
  37. data/lib/onebusaway-sdk/resources/trip_details.rb +0 -2
  38. data/lib/onebusaway-sdk/resources/trip_for_vehicle.rb +0 -2
  39. data/lib/onebusaway-sdk/resources/trips_for_location.rb +0 -2
  40. data/lib/onebusaway-sdk/resources/trips_for_route.rb +0 -2
  41. data/lib/onebusaway-sdk/resources/vehicles_for_agency.rb +0 -2
  42. data/lib/onebusaway-sdk/util.rb +297 -96
  43. data/lib/onebusaway-sdk/version.rb +1 -1
  44. data/lib/onebusaway-sdk.rb +1 -0
  45. data/manifest.yaml +1 -0
  46. data/rbi/lib/onebusaway-sdk/base_client.rbi +52 -35
  47. data/rbi/lib/onebusaway-sdk/base_model.rbi +400 -256
  48. data/rbi/lib/onebusaway-sdk/base_page.rbi +3 -4
  49. data/rbi/lib/onebusaway-sdk/client.rbi +7 -2
  50. data/rbi/lib/onebusaway-sdk/errors.rbi +44 -10
  51. data/rbi/lib/onebusaway-sdk/extern.rbi +1 -1
  52. data/rbi/lib/onebusaway-sdk/models/agencies_with_coverage_list_params.rbi +5 -2
  53. data/rbi/lib/onebusaway-sdk/models/agencies_with_coverage_list_response.rbi +9 -6
  54. data/rbi/lib/onebusaway-sdk/models/agency_retrieve_params.rbi +5 -2
  55. data/rbi/lib/onebusaway-sdk/models/agency_retrieve_response.rbi +6 -6
  56. data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_list_params.rbi +5 -2
  57. data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_list_response.rbi +95 -14
  58. data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_retrieve_params.rbi +2 -9
  59. data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_retrieve_response.rbi +93 -12
  60. data/rbi/lib/onebusaway-sdk/models/block_retrieve_params.rbi +5 -2
  61. data/rbi/lib/onebusaway-sdk/models/block_retrieve_response.rbi +14 -20
  62. data/rbi/lib/onebusaway-sdk/models/config_retrieve_params.rbi +5 -2
  63. data/rbi/lib/onebusaway-sdk/models/config_retrieve_response.rbi +8 -14
  64. data/rbi/lib/onebusaway-sdk/models/current_time_retrieve_params.rbi +5 -2
  65. data/rbi/lib/onebusaway-sdk/models/current_time_retrieve_response.rbi +6 -6
  66. data/rbi/lib/onebusaway-sdk/models/references.rbi +60 -43
  67. data/rbi/lib/onebusaway-sdk/models/report_problem_with_stop_retrieve_params.rbi +10 -6
  68. data/rbi/lib/onebusaway-sdk/models/report_problem_with_trip_retrieve_params.rbi +15 -6
  69. data/rbi/lib/onebusaway-sdk/models/response_wrapper.rbi +4 -2
  70. data/rbi/lib/onebusaway-sdk/models/route_ids_for_agency_list_params.rbi +5 -2
  71. data/rbi/lib/onebusaway-sdk/models/route_ids_for_agency_list_response.rbi +4 -4
  72. data/rbi/lib/onebusaway-sdk/models/route_retrieve_params.rbi +5 -2
  73. data/rbi/lib/onebusaway-sdk/models/route_retrieve_response.rbi +6 -6
  74. data/rbi/lib/onebusaway-sdk/models/routes_for_agency_list_params.rbi +5 -2
  75. data/rbi/lib/onebusaway-sdk/models/routes_for_agency_list_response.rbi +6 -6
  76. data/rbi/lib/onebusaway-sdk/models/routes_for_location_list_params.rbi +2 -2
  77. data/rbi/lib/onebusaway-sdk/models/routes_for_location_list_response.rbi +6 -6
  78. data/rbi/lib/onebusaway-sdk/models/schedule_for_route_retrieve_params.rbi +5 -8
  79. data/rbi/lib/onebusaway-sdk/models/schedule_for_route_retrieve_response.rbi +19 -16
  80. data/rbi/lib/onebusaway-sdk/models/schedule_for_stop_retrieve_params.rbi +5 -8
  81. data/rbi/lib/onebusaway-sdk/models/schedule_for_stop_retrieve_response.rbi +14 -14
  82. data/rbi/lib/onebusaway-sdk/models/search_for_route_list_params.rbi +4 -2
  83. data/rbi/lib/onebusaway-sdk/models/search_for_route_list_response.rbi +6 -6
  84. data/rbi/lib/onebusaway-sdk/models/search_for_stop_list_params.rbi +4 -2
  85. data/rbi/lib/onebusaway-sdk/models/search_for_stop_list_response.rbi +6 -6
  86. data/rbi/lib/onebusaway-sdk/models/shape_retrieve_params.rbi +5 -2
  87. data/rbi/lib/onebusaway-sdk/models/shape_retrieve_response.rbi +7 -6
  88. data/rbi/lib/onebusaway-sdk/models/stop_ids_for_agency_list_params.rbi +5 -2
  89. data/rbi/lib/onebusaway-sdk/models/stop_ids_for_agency_list_response.rbi +4 -4
  90. data/rbi/lib/onebusaway-sdk/models/stop_retrieve_params.rbi +5 -2
  91. data/rbi/lib/onebusaway-sdk/models/stop_retrieve_response.rbi +6 -6
  92. data/rbi/lib/onebusaway-sdk/models/stops_for_agency_list_params.rbi +5 -2
  93. data/rbi/lib/onebusaway-sdk/models/stops_for_agency_list_response.rbi +4 -4
  94. data/rbi/lib/onebusaway-sdk/models/stops_for_location_list_params.rbi +6 -2
  95. data/rbi/lib/onebusaway-sdk/models/stops_for_location_list_response.rbi +6 -6
  96. data/rbi/lib/onebusaway-sdk/models/stops_for_route_list_params.rbi +4 -2
  97. data/rbi/lib/onebusaway-sdk/models/stops_for_route_list_response.rbi +14 -14
  98. data/rbi/lib/onebusaway-sdk/models/trip_detail_retrieve_params.rbi +10 -2
  99. data/rbi/lib/onebusaway-sdk/models/trip_detail_retrieve_response.rbi +54 -23
  100. data/rbi/lib/onebusaway-sdk/models/trip_for_vehicle_retrieve_params.rbi +9 -8
  101. data/rbi/lib/onebusaway-sdk/models/trip_for_vehicle_retrieve_response.rbi +54 -23
  102. data/rbi/lib/onebusaway-sdk/models/trip_retrieve_params.rbi +5 -2
  103. data/rbi/lib/onebusaway-sdk/models/trip_retrieve_response.rbi +6 -6
  104. data/rbi/lib/onebusaway-sdk/models/trips_for_location_list_params.rbi +12 -12
  105. data/rbi/lib/onebusaway-sdk/models/trips_for_location_list_response.rbi +56 -16
  106. data/rbi/lib/onebusaway-sdk/models/trips_for_route_list_params.rbi +6 -2
  107. data/rbi/lib/onebusaway-sdk/models/trips_for_route_list_response.rbi +54 -16
  108. data/rbi/lib/onebusaway-sdk/models/vehicles_for_agency_list_params.rbi +3 -2
  109. data/rbi/lib/onebusaway-sdk/models/vehicles_for_agency_list_response.rbi +52 -14
  110. data/rbi/lib/onebusaway-sdk/pooled_net_requester.rbi +28 -13
  111. data/rbi/lib/onebusaway-sdk/request_options.rbi +25 -2
  112. data/rbi/lib/onebusaway-sdk/resources/agencies_with_coverage.rbi +4 -2
  113. data/rbi/lib/onebusaway-sdk/resources/agency.rbi +8 -3
  114. data/rbi/lib/onebusaway-sdk/resources/arrival_and_departure.rbi +14 -3
  115. data/rbi/lib/onebusaway-sdk/resources/block.rbi +8 -3
  116. data/rbi/lib/onebusaway-sdk/resources/config.rbi +3 -2
  117. data/rbi/lib/onebusaway-sdk/resources/current_time.rbi +3 -2
  118. data/rbi/lib/onebusaway-sdk/resources/report_problem_with_stop.rbi +9 -2
  119. data/rbi/lib/onebusaway-sdk/resources/report_problem_with_trip.rbi +14 -2
  120. data/rbi/lib/onebusaway-sdk/resources/route.rbi +8 -3
  121. data/rbi/lib/onebusaway-sdk/resources/route_ids_for_agency.rbi +8 -3
  122. data/rbi/lib/onebusaway-sdk/resources/routes_for_agency.rbi +8 -3
  123. data/rbi/lib/onebusaway-sdk/resources/routes_for_location.rbi +3 -2
  124. data/rbi/lib/onebusaway-sdk/resources/schedule_for_route.rbi +11 -3
  125. data/rbi/lib/onebusaway-sdk/resources/schedule_for_stop.rbi +11 -3
  126. data/rbi/lib/onebusaway-sdk/resources/search_for_route.rbi +10 -3
  127. data/rbi/lib/onebusaway-sdk/resources/search_for_stop.rbi +10 -3
  128. data/rbi/lib/onebusaway-sdk/resources/shape.rbi +8 -3
  129. data/rbi/lib/onebusaway-sdk/resources/stop.rbi +8 -3
  130. data/rbi/lib/onebusaway-sdk/resources/stop_ids_for_agency.rbi +8 -3
  131. data/rbi/lib/onebusaway-sdk/resources/stops_for_agency.rbi +8 -3
  132. data/rbi/lib/onebusaway-sdk/resources/stops_for_location.rbi +16 -3
  133. data/rbi/lib/onebusaway-sdk/resources/stops_for_route.rbi +12 -3
  134. data/rbi/lib/onebusaway-sdk/resources/trip.rbi +8 -3
  135. data/rbi/lib/onebusaway-sdk/resources/trip_details.rbi +12 -2
  136. data/rbi/lib/onebusaway-sdk/resources/trip_for_vehicle.rbi +11 -2
  137. data/rbi/lib/onebusaway-sdk/resources/trips_for_location.rbi +12 -2
  138. data/rbi/lib/onebusaway-sdk/resources/trips_for_route.rbi +15 -3
  139. data/rbi/lib/onebusaway-sdk/resources/vehicles_for_agency.rbi +10 -3
  140. data/rbi/lib/onebusaway-sdk/util.rbi +214 -83
  141. data/rbi/lib/onebusaway-sdk/version.rbi +1 -1
  142. data/sig/onebusaway-sdk/base_client.rbs +9 -8
  143. data/sig/onebusaway-sdk/base_model.rbs +8 -6
  144. data/sig/onebusaway-sdk/base_page.rbs +1 -1
  145. data/sig/onebusaway-sdk/errors.rbs +6 -5
  146. data/sig/onebusaway-sdk/pooled_net_requester.rbs +11 -4
  147. data/sig/onebusaway-sdk/request_options.rbs +4 -0
  148. data/sig/onebusaway-sdk/util.rbs +46 -2
  149. data/sig/onebusaway-sdk/version.rbs +1 -1
  150. metadata +4 -4
@@ -14,8 +14,8 @@ module OnebusawaySDK
14
14
  def data=(_)
15
15
  end
16
16
 
17
- sig { params(data: OnebusawaySDK::Models::StopRetrieveResponse::Data).void }
18
- def initialize(data:)
17
+ sig { params(data: OnebusawaySDK::Models::StopRetrieveResponse::Data).returns(T.attached_class) }
18
+ def self.new(data:)
19
19
  end
20
20
 
21
21
  sig { override.returns({data: OnebusawaySDK::Models::StopRetrieveResponse::Data}) }
@@ -47,9 +47,9 @@ module OnebusawaySDK
47
47
  entry: OnebusawaySDK::Models::StopRetrieveResponse::Data::Entry,
48
48
  references: OnebusawaySDK::Models::References
49
49
  )
50
- .void
50
+ .returns(T.attached_class)
51
51
  end
52
- def initialize(entry:, references:)
52
+ def self.new(entry:, references:)
53
53
  end
54
54
 
55
55
  sig do
@@ -167,9 +167,9 @@ module OnebusawaySDK
167
167
  location_type: Integer,
168
168
  wheelchair_boarding: String
169
169
  )
170
- .void
170
+ .returns(T.attached_class)
171
171
  end
172
- def initialize(
172
+ def self.new(
173
173
  id:,
174
174
  lat:,
175
175
  lon:,
@@ -6,8 +6,11 @@ module OnebusawaySDK
6
6
  extend OnebusawaySDK::RequestParameters::Converter
7
7
  include OnebusawaySDK::RequestParameters
8
8
 
9
- sig { params(request_options: T.any(OnebusawaySDK::RequestOptions, T::Hash[Symbol, T.anything])).void }
10
- def initialize(request_options: {})
9
+ sig do
10
+ params(request_options: T.any(OnebusawaySDK::RequestOptions, T::Hash[Symbol, T.anything]))
11
+ .returns(T.attached_class)
12
+ end
13
+ def self.new(request_options: {})
11
14
  end
12
15
 
13
16
  sig { override.returns({request_options: OnebusawaySDK::RequestOptions}) }
@@ -45,9 +45,9 @@ module OnebusawaySDK
45
45
  references: OnebusawaySDK::Models::References,
46
46
  out_of_range: T::Boolean
47
47
  )
48
- .void
48
+ .returns(T.attached_class)
49
49
  end
50
- def initialize(limit_exceeded:, list:, references:, out_of_range: nil)
50
+ def self.new(limit_exceeded:, list:, references:, out_of_range: nil)
51
51
  end
52
52
 
53
53
  sig do
@@ -167,9 +167,9 @@ module OnebusawaySDK
167
167
  location_type: Integer,
168
168
  wheelchair_boarding: String
169
169
  )
170
- .void
170
+ .returns(T.attached_class)
171
171
  end
172
- def initialize(
172
+ def self.new(
173
173
  id:,
174
174
  lat:,
175
175
  lon:,
@@ -22,6 +22,7 @@ module OnebusawaySDK
22
22
  def lon=(_)
23
23
  end
24
24
 
25
+ # An alternative to radius to set the search bounding box (optional)
25
26
  sig { returns(T.nilable(Float)) }
26
27
  def lat_span
27
28
  end
@@ -30,6 +31,7 @@ module OnebusawaySDK
30
31
  def lat_span=(_)
31
32
  end
32
33
 
34
+ # An alternative to radius to set the search bounding box (optional)
33
35
  sig { returns(T.nilable(Float)) }
34
36
  def lon_span
35
37
  end
@@ -38,6 +40,7 @@ module OnebusawaySDK
38
40
  def lon_span=(_)
39
41
  end
40
42
 
43
+ # A search query string to filter the results
41
44
  sig { returns(T.nilable(String)) }
42
45
  def query
43
46
  end
@@ -46,6 +49,7 @@ module OnebusawaySDK
46
49
  def query=(_)
47
50
  end
48
51
 
52
+ # The radius in meters to search within
49
53
  sig { returns(T.nilable(Float)) }
50
54
  def radius
51
55
  end
@@ -64,9 +68,9 @@ module OnebusawaySDK
64
68
  radius: Float,
65
69
  request_options: T.any(OnebusawaySDK::RequestOptions, T::Hash[Symbol, T.anything])
66
70
  )
67
- .void
71
+ .returns(T.attached_class)
68
72
  end
69
- def initialize(lat:, lon:, lat_span: nil, lon_span: nil, query: nil, radius: nil, request_options: {})
73
+ def self.new(lat:, lon:, lat_span: nil, lon_span: nil, query: nil, radius: nil, request_options: {})
70
74
  end
71
75
 
72
76
  sig do
@@ -14,8 +14,8 @@ module OnebusawaySDK
14
14
  def data=(_)
15
15
  end
16
16
 
17
- sig { params(data: OnebusawaySDK::Models::StopsForLocationListResponse::Data).void }
18
- def initialize(data:)
17
+ sig { params(data: OnebusawaySDK::Models::StopsForLocationListResponse::Data).returns(T.attached_class) }
18
+ def self.new(data:)
19
19
  end
20
20
 
21
21
  sig { override.returns({data: OnebusawaySDK::Models::StopsForLocationListResponse::Data}) }
@@ -65,9 +65,9 @@ module OnebusawaySDK
65
65
  references: OnebusawaySDK::Models::References,
66
66
  out_of_range: T::Boolean
67
67
  )
68
- .void
68
+ .returns(T.attached_class)
69
69
  end
70
- def initialize(limit_exceeded:, list:, references:, out_of_range: nil)
70
+ def self.new(limit_exceeded:, list:, references:, out_of_range: nil)
71
71
  end
72
72
 
73
73
  sig do
@@ -187,9 +187,9 @@ module OnebusawaySDK
187
187
  location_type: Integer,
188
188
  wheelchair_boarding: String
189
189
  )
190
- .void
190
+ .returns(T.attached_class)
191
191
  end
192
- def initialize(
192
+ def self.new(
193
193
  id:,
194
194
  lat:,
195
195
  lon:,
@@ -6,6 +6,7 @@ module OnebusawaySDK
6
6
  extend OnebusawaySDK::RequestParameters::Converter
7
7
  include OnebusawaySDK::RequestParameters
8
8
 
9
+ # Include polyline elements in the response (default true)
9
10
  sig { returns(T.nilable(T::Boolean)) }
10
11
  def include_polylines
11
12
  end
@@ -14,6 +15,7 @@ module OnebusawaySDK
14
15
  def include_polylines=(_)
15
16
  end
16
17
 
18
+ # Specify service date (YYYY-MM-DD or epoch) (default today)
17
19
  sig { returns(T.nilable(String)) }
18
20
  def time
19
21
  end
@@ -28,9 +30,9 @@ module OnebusawaySDK
28
30
  time: String,
29
31
  request_options: T.any(OnebusawaySDK::RequestOptions, T::Hash[Symbol, T.anything])
30
32
  )
31
- .void
33
+ .returns(T.attached_class)
32
34
  end
33
- def initialize(include_polylines: nil, time: nil, request_options: {})
35
+ def self.new(include_polylines: nil, time: nil, request_options: {})
34
36
  end
35
37
 
36
38
  sig do
@@ -14,8 +14,8 @@ module OnebusawaySDK
14
14
  def data=(_)
15
15
  end
16
16
 
17
- sig { params(data: OnebusawaySDK::Models::StopsForRouteListResponse::Data).void }
18
- def initialize(data:)
17
+ sig { params(data: OnebusawaySDK::Models::StopsForRouteListResponse::Data).returns(T.attached_class) }
18
+ def self.new(data:)
19
19
  end
20
20
 
21
21
  sig { override.returns({data: OnebusawaySDK::Models::StopsForRouteListResponse::Data}) }
@@ -47,9 +47,9 @@ module OnebusawaySDK
47
47
  entry: OnebusawaySDK::Models::StopsForRouteListResponse::Data::Entry,
48
48
  references: OnebusawaySDK::Models::References
49
49
  )
50
- .void
50
+ .returns(T.attached_class)
51
51
  end
52
- def initialize(entry:, references:)
52
+ def self.new(entry:, references:)
53
53
  end
54
54
 
55
55
  sig do
@@ -110,9 +110,9 @@ module OnebusawaySDK
110
110
  stop_groupings: T::Array[OnebusawaySDK::Models::StopsForRouteListResponse::Data::Entry::StopGrouping],
111
111
  stop_ids: T::Array[String]
112
112
  )
113
- .void
113
+ .returns(T.attached_class)
114
114
  end
115
- def initialize(polylines: nil, route_id: nil, stop_groupings: nil, stop_ids: nil)
115
+ def self.new(polylines: nil, route_id: nil, stop_groupings: nil, stop_ids: nil)
116
116
  end
117
117
 
118
118
  sig do
@@ -154,8 +154,8 @@ module OnebusawaySDK
154
154
  def points=(_)
155
155
  end
156
156
 
157
- sig { params(length: Integer, levels: String, points: String).void }
158
- def initialize(length: nil, levels: nil, points: nil)
157
+ sig { params(length: Integer, levels: String, points: String).returns(T.attached_class) }
158
+ def self.new(length: nil, levels: nil, points: nil)
159
159
  end
160
160
 
161
161
  sig { override.returns({length: Integer, levels: String, points: String}) }
@@ -213,9 +213,9 @@ module OnebusawaySDK
213
213
  polylines: T::Array[OnebusawaySDK::Models::StopsForRouteListResponse::Data::Entry::StopGrouping::Polyline],
214
214
  stop_ids: T::Array[String]
215
215
  )
216
- .void
216
+ .returns(T.attached_class)
217
217
  end
218
- def initialize(id: nil, name: nil, polylines: nil, stop_ids: nil)
218
+ def self.new(id: nil, name: nil, polylines: nil, stop_ids: nil)
219
219
  end
220
220
 
221
221
  sig do
@@ -257,8 +257,8 @@ module OnebusawaySDK
257
257
  def type=(_)
258
258
  end
259
259
 
260
- sig { params(name: String, names: T::Array[String], type: String).void }
261
- def initialize(name: nil, names: nil, type: nil)
260
+ sig { params(name: String, names: T::Array[String], type: String).returns(T.attached_class) }
261
+ def self.new(name: nil, names: nil, type: nil)
262
262
  end
263
263
 
264
264
  sig { override.returns({name: String, names: T::Array[String], type: String}) }
@@ -291,8 +291,8 @@ module OnebusawaySDK
291
291
  def points=(_)
292
292
  end
293
293
 
294
- sig { params(length: Integer, levels: String, points: String).void }
295
- def initialize(length: nil, levels: nil, points: nil)
294
+ sig { params(length: Integer, levels: String, points: String).returns(T.attached_class) }
295
+ def self.new(length: nil, levels: nil, points: nil)
296
296
  end
297
297
 
298
298
  sig { override.returns({length: Integer, levels: String, points: String}) }
@@ -6,6 +6,8 @@ module OnebusawaySDK
6
6
  extend OnebusawaySDK::RequestParameters::Converter
7
7
  include OnebusawaySDK::RequestParameters
8
8
 
9
+ # Whether to include the full schedule element in the tripDetails section
10
+ # (defaults to true).
9
11
  sig { returns(T.nilable(T::Boolean)) }
10
12
  def include_schedule
11
13
  end
@@ -14,6 +16,8 @@ module OnebusawaySDK
14
16
  def include_schedule=(_)
15
17
  end
16
18
 
19
+ # Whether to include the full status element in the tripDetails section (defaults
20
+ # to true).
17
21
  sig { returns(T.nilable(T::Boolean)) }
18
22
  def include_status
19
23
  end
@@ -22,6 +26,8 @@ module OnebusawaySDK
22
26
  def include_status=(_)
23
27
  end
24
28
 
29
+ # Whether to include the full trip element in the references section (defaults to
30
+ # true).
25
31
  sig { returns(T.nilable(T::Boolean)) }
26
32
  def include_trip
27
33
  end
@@ -30,6 +36,7 @@ module OnebusawaySDK
30
36
  def include_trip=(_)
31
37
  end
32
38
 
39
+ # Service date for the trip as Unix time in milliseconds (optional).
33
40
  sig { returns(T.nilable(Integer)) }
34
41
  def service_date
35
42
  end
@@ -38,6 +45,7 @@ module OnebusawaySDK
38
45
  def service_date=(_)
39
46
  end
40
47
 
48
+ # Time parameter to query the system at a specific time (optional).
41
49
  sig { returns(T.nilable(Integer)) }
42
50
  def time
43
51
  end
@@ -55,9 +63,9 @@ module OnebusawaySDK
55
63
  time: Integer,
56
64
  request_options: T.any(OnebusawaySDK::RequestOptions, T::Hash[Symbol, T.anything])
57
65
  )
58
- .void
66
+ .returns(T.attached_class)
59
67
  end
60
- def initialize(
68
+ def self.new(
61
69
  include_schedule: nil,
62
70
  include_status: nil,
63
71
  include_trip: nil,
@@ -14,8 +14,8 @@ module OnebusawaySDK
14
14
  def data=(_)
15
15
  end
16
16
 
17
- sig { params(data: OnebusawaySDK::Models::TripDetailRetrieveResponse::Data).void }
18
- def initialize(data:)
17
+ sig { params(data: OnebusawaySDK::Models::TripDetailRetrieveResponse::Data).returns(T.attached_class) }
18
+ def self.new(data:)
19
19
  end
20
20
 
21
21
  sig { override.returns({data: OnebusawaySDK::Models::TripDetailRetrieveResponse::Data}) }
@@ -47,9 +47,9 @@ module OnebusawaySDK
47
47
  entry: OnebusawaySDK::Models::TripDetailRetrieveResponse::Data::Entry,
48
48
  references: OnebusawaySDK::Models::References
49
49
  )
50
- .void
50
+ .returns(T.attached_class)
51
51
  end
52
- def initialize(entry:, references:)
52
+ def self.new(entry:, references:)
53
53
  end
54
54
 
55
55
  sig do
@@ -128,16 +128,9 @@ module OnebusawaySDK
128
128
  situation_ids: T::Array[String],
129
129
  status: OnebusawaySDK::Models::TripDetailRetrieveResponse::Data::Entry::Status
130
130
  )
131
- .void
131
+ .returns(T.attached_class)
132
132
  end
133
- def initialize(
134
- trip_id:,
135
- frequency: nil,
136
- schedule: nil,
137
- service_date: nil,
138
- situation_ids: nil,
139
- status: nil
140
- )
133
+ def self.new(trip_id:, frequency: nil, schedule: nil, service_date: nil, situation_ids: nil, status: nil)
141
134
  end
142
135
 
143
136
  sig do
@@ -208,9 +201,9 @@ module OnebusawaySDK
208
201
  time_zone: String,
209
202
  frequency: T.nilable(String)
210
203
  )
211
- .void
204
+ .returns(T.attached_class)
212
205
  end
213
- def initialize(next_trip_id:, previous_trip_id:, stop_times:, time_zone:, frequency: nil)
206
+ def self.new(next_trip_id:, previous_trip_id:, stop_times:, time_zone:, frequency: nil)
214
207
  end
215
208
 
216
209
  sig do
@@ -286,9 +279,9 @@ module OnebusawaySDK
286
279
  stop_headsign: String,
287
280
  stop_id: String
288
281
  )
289
- .void
282
+ .returns(T.attached_class)
290
283
  end
291
- def initialize(
284
+ def self.new(
292
285
  arrival_time: nil,
293
286
  departure_time: nil,
294
287
  distance_along_trip: nil,
@@ -317,6 +310,7 @@ module OnebusawaySDK
317
310
  end
318
311
 
319
312
  class Status < OnebusawaySDK::BaseModel
313
+ # Trip ID of the trip the vehicle is actively serving.
320
314
  sig { returns(String) }
321
315
  def active_trip_id
322
316
  end
@@ -325,6 +319,7 @@ module OnebusawaySDK
325
319
  def active_trip_id=(_)
326
320
  end
327
321
 
322
+ # Index of the active trip into the sequence of trips for the active block.
328
323
  sig { returns(Integer) }
329
324
  def block_trip_sequence
330
325
  end
@@ -333,6 +328,7 @@ module OnebusawaySDK
333
328
  def block_trip_sequence=(_)
334
329
  end
335
330
 
331
+ # ID of the closest stop to the current location of the transit vehicle.
336
332
  sig { returns(String) }
337
333
  def closest_stop
338
334
  end
@@ -341,6 +337,7 @@ module OnebusawaySDK
341
337
  def closest_stop=(_)
342
338
  end
343
339
 
340
+ # Distance, in meters, the transit vehicle has progressed along the active trip.
344
341
  sig { returns(Float) }
345
342
  def distance_along_trip
346
343
  end
@@ -349,6 +346,8 @@ module OnebusawaySDK
349
346
  def distance_along_trip=(_)
350
347
  end
351
348
 
349
+ # Last known distance along the trip received in real-time from the transit
350
+ # vehicle.
352
351
  sig { returns(Float) }
353
352
  def last_known_distance_along_trip
354
353
  end
@@ -357,6 +356,7 @@ module OnebusawaySDK
357
356
  def last_known_distance_along_trip=(_)
358
357
  end
359
358
 
359
+ # Timestamp of the last known real-time location update from the transit vehicle.
360
360
  sig { returns(Integer) }
361
361
  def last_location_update_time
362
362
  end
@@ -365,6 +365,7 @@ module OnebusawaySDK
365
365
  def last_location_update_time=(_)
366
366
  end
367
367
 
368
+ # Timestamp of the last known real-time update from the transit vehicle.
368
369
  sig { returns(Integer) }
369
370
  def last_update_time
370
371
  end
@@ -373,6 +374,7 @@ module OnebusawaySDK
373
374
  def last_update_time=(_)
374
375
  end
375
376
 
377
+ # Capacity of the transit vehicle in terms of occupancy.
376
378
  sig { returns(Integer) }
377
379
  def occupancy_capacity
378
380
  end
@@ -381,6 +383,7 @@ module OnebusawaySDK
381
383
  def occupancy_capacity=(_)
382
384
  end
383
385
 
386
+ # Current count of occupants in the transit vehicle.
384
387
  sig { returns(Integer) }
385
388
  def occupancy_count
386
389
  end
@@ -389,6 +392,7 @@ module OnebusawaySDK
389
392
  def occupancy_count=(_)
390
393
  end
391
394
 
395
+ # Current occupancy status of the transit vehicle.
392
396
  sig { returns(String) }
393
397
  def occupancy_status
394
398
  end
@@ -397,6 +401,7 @@ module OnebusawaySDK
397
401
  def occupancy_status=(_)
398
402
  end
399
403
 
404
+ # Current journey phase of the trip.
400
405
  sig { returns(String) }
401
406
  def phase
402
407
  end
@@ -405,6 +410,7 @@ module OnebusawaySDK
405
410
  def phase=(_)
406
411
  end
407
412
 
413
+ # Indicates if real-time arrival info is available for this trip.
408
414
  sig { returns(T::Boolean) }
409
415
  def predicted
410
416
  end
@@ -413,6 +419,7 @@ module OnebusawaySDK
413
419
  def predicted=(_)
414
420
  end
415
421
 
422
+ # Deviation from the schedule in seconds (positive for late, negative for early).
416
423
  sig { returns(Integer) }
417
424
  def schedule_deviation
418
425
  end
@@ -421,6 +428,8 @@ module OnebusawaySDK
421
428
  def schedule_deviation=(_)
422
429
  end
423
430
 
431
+ # Time, in milliseconds since the Unix epoch, of midnight for the start of the
432
+ # service date for the trip.
424
433
  sig { returns(Integer) }
425
434
  def service_date
426
435
  end
@@ -429,6 +438,7 @@ module OnebusawaySDK
429
438
  def service_date=(_)
430
439
  end
431
440
 
441
+ # Current status modifiers for the trip.
432
442
  sig { returns(String) }
433
443
  def status
434
444
  end
@@ -437,6 +447,7 @@ module OnebusawaySDK
437
447
  def status=(_)
438
448
  end
439
449
 
450
+ # Total length of the trip, in meters.
440
451
  sig { returns(Float) }
441
452
  def total_distance_along_trip
442
453
  end
@@ -445,6 +456,8 @@ module OnebusawaySDK
445
456
  def total_distance_along_trip=(_)
446
457
  end
447
458
 
459
+ # Time offset from the closest stop to the current position of the transit vehicle
460
+ # (in seconds).
448
461
  sig { returns(T.nilable(Integer)) }
449
462
  def closest_stop_time_offset
450
463
  end
@@ -453,6 +466,7 @@ module OnebusawaySDK
453
466
  def closest_stop_time_offset=(_)
454
467
  end
455
468
 
469
+ # Information about frequency-based scheduling, if applicable to the trip.
456
470
  sig { returns(T.nilable(String)) }
457
471
  def frequency
458
472
  end
@@ -461,6 +475,7 @@ module OnebusawaySDK
461
475
  def frequency=(_)
462
476
  end
463
477
 
478
+ # Last known location of the transit vehicle.
464
479
  sig do
465
480
  returns(
466
481
  T.nilable(OnebusawaySDK::Models::TripDetailRetrieveResponse::Data::Entry::Status::LastKnownLocation)
@@ -476,6 +491,7 @@ module OnebusawaySDK
476
491
  def last_known_location=(_)
477
492
  end
478
493
 
494
+ # Last known orientation value received in real-time from the transit vehicle.
479
495
  sig { returns(T.nilable(Float)) }
480
496
  def last_known_orientation
481
497
  end
@@ -484,6 +500,7 @@ module OnebusawaySDK
484
500
  def last_known_orientation=(_)
485
501
  end
486
502
 
503
+ # ID of the next stop the transit vehicle is scheduled to arrive at.
487
504
  sig { returns(T.nilable(String)) }
488
505
  def next_stop
489
506
  end
@@ -492,6 +509,8 @@ module OnebusawaySDK
492
509
  def next_stop=(_)
493
510
  end
494
511
 
512
+ # Time offset from the next stop to the current position of the transit vehicle
513
+ # (in seconds).
495
514
  sig { returns(T.nilable(Integer)) }
496
515
  def next_stop_time_offset
497
516
  end
@@ -500,6 +519,7 @@ module OnebusawaySDK
500
519
  def next_stop_time_offset=(_)
501
520
  end
502
521
 
522
+ # Orientation of the transit vehicle, represented as an angle in degrees.
503
523
  sig { returns(T.nilable(Float)) }
504
524
  def orientation
505
525
  end
@@ -508,6 +528,7 @@ module OnebusawaySDK
508
528
  def orientation=(_)
509
529
  end
510
530
 
531
+ # Current position of the transit vehicle.
511
532
  sig { returns(T.nilable(OnebusawaySDK::Models::TripDetailRetrieveResponse::Data::Entry::Status::Position)) }
512
533
  def position
513
534
  end
@@ -519,6 +540,8 @@ module OnebusawaySDK
519
540
  def position=(_)
520
541
  end
521
542
 
543
+ # Distance, in meters, the transit vehicle is scheduled to have progressed along
544
+ # the active trip.
522
545
  sig { returns(T.nilable(Float)) }
523
546
  def scheduled_distance_along_trip
524
547
  end
@@ -527,6 +550,7 @@ module OnebusawaySDK
527
550
  def scheduled_distance_along_trip=(_)
528
551
  end
529
552
 
553
+ # References to situation elements (if any) applicable to this trip.
530
554
  sig { returns(T.nilable(T::Array[String])) }
531
555
  def situation_ids
532
556
  end
@@ -535,6 +559,7 @@ module OnebusawaySDK
535
559
  def situation_ids=(_)
536
560
  end
537
561
 
562
+ # ID of the transit vehicle currently serving the trip.
538
563
  sig { returns(T.nilable(String)) }
539
564
  def vehicle_id
540
565
  end
@@ -573,9 +598,9 @@ module OnebusawaySDK
573
598
  situation_ids: T::Array[String],
574
599
  vehicle_id: String
575
600
  )
576
- .void
601
+ .returns(T.attached_class)
577
602
  end
578
- def initialize(
603
+ def self.new(
579
604
  active_trip_id:,
580
605
  block_trip_sequence:,
581
606
  closest_stop:,
@@ -644,6 +669,7 @@ module OnebusawaySDK
644
669
  end
645
670
 
646
671
  class LastKnownLocation < OnebusawaySDK::BaseModel
672
+ # Latitude of the last known location of the transit vehicle.
647
673
  sig { returns(T.nilable(Float)) }
648
674
  def lat
649
675
  end
@@ -652,6 +678,7 @@ module OnebusawaySDK
652
678
  def lat=(_)
653
679
  end
654
680
 
681
+ # Longitude of the last known location of the transit vehicle.
655
682
  sig { returns(T.nilable(Float)) }
656
683
  def lon
657
684
  end
@@ -660,8 +687,9 @@ module OnebusawaySDK
660
687
  def lon=(_)
661
688
  end
662
689
 
663
- sig { params(lat: Float, lon: Float).void }
664
- def initialize(lat: nil, lon: nil)
690
+ # Last known location of the transit vehicle.
691
+ sig { params(lat: Float, lon: Float).returns(T.attached_class) }
692
+ def self.new(lat: nil, lon: nil)
665
693
  end
666
694
 
667
695
  sig { override.returns({lat: Float, lon: Float}) }
@@ -670,6 +698,7 @@ module OnebusawaySDK
670
698
  end
671
699
 
672
700
  class Position < OnebusawaySDK::BaseModel
701
+ # Latitude of the current position of the transit vehicle.
673
702
  sig { returns(T.nilable(Float)) }
674
703
  def lat
675
704
  end
@@ -678,6 +707,7 @@ module OnebusawaySDK
678
707
  def lat=(_)
679
708
  end
680
709
 
710
+ # Longitude of the current position of the transit vehicle.
681
711
  sig { returns(T.nilable(Float)) }
682
712
  def lon
683
713
  end
@@ -686,8 +716,9 @@ module OnebusawaySDK
686
716
  def lon=(_)
687
717
  end
688
718
 
689
- sig { params(lat: Float, lon: Float).void }
690
- def initialize(lat: nil, lon: nil)
719
+ # Current position of the transit vehicle.
720
+ sig { params(lat: Float, lon: Float).returns(T.attached_class) }
721
+ def self.new(lat: nil, lon: nil)
691
722
  end
692
723
 
693
724
  sig { override.returns({lat: Float, lon: Float}) }