onebusaway-sdk 0.1.0.pre.alpha.206 → 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.
- checksums.yaml +4 -4
- data/README.md +32 -20
- data/lib/onebusaway-sdk/base_client.rb +41 -49
- data/lib/onebusaway-sdk/base_model.rb +489 -514
- data/lib/onebusaway-sdk/base_page.rb +35 -15
- data/lib/onebusaway-sdk/client.rb +1 -3
- data/lib/onebusaway-sdk/errors.rb +12 -17
- data/lib/onebusaway-sdk/extern.rb +1 -4
- data/lib/onebusaway-sdk/models/references.rb +0 -21
- data/lib/onebusaway-sdk/models/report_problem_with_stop_retrieve_params.rb +0 -21
- data/lib/onebusaway-sdk/models/report_problem_with_trip_retrieve_params.rb +0 -23
- data/lib/onebusaway-sdk/pooled_net_requester.rb +40 -46
- data/lib/onebusaway-sdk/request_options.rb +4 -11
- data/lib/onebusaway-sdk/resources/agencies_with_coverage.rb +0 -2
- data/lib/onebusaway-sdk/resources/agency.rb +0 -2
- data/lib/onebusaway-sdk/resources/arrival_and_departure.rb +0 -3
- data/lib/onebusaway-sdk/resources/block.rb +0 -2
- data/lib/onebusaway-sdk/resources/config.rb +0 -2
- data/lib/onebusaway-sdk/resources/current_time.rb +0 -2
- data/lib/onebusaway-sdk/resources/report_problem_with_stop.rb +0 -2
- data/lib/onebusaway-sdk/resources/report_problem_with_trip.rb +0 -2
- data/lib/onebusaway-sdk/resources/route.rb +0 -2
- data/lib/onebusaway-sdk/resources/route_ids_for_agency.rb +0 -2
- data/lib/onebusaway-sdk/resources/routes_for_agency.rb +0 -2
- data/lib/onebusaway-sdk/resources/routes_for_location.rb +0 -2
- data/lib/onebusaway-sdk/resources/schedule_for_route.rb +0 -2
- data/lib/onebusaway-sdk/resources/schedule_for_stop.rb +0 -2
- data/lib/onebusaway-sdk/resources/search_for_route.rb +0 -2
- data/lib/onebusaway-sdk/resources/search_for_stop.rb +0 -2
- data/lib/onebusaway-sdk/resources/shape.rb +0 -2
- data/lib/onebusaway-sdk/resources/stop.rb +0 -2
- data/lib/onebusaway-sdk/resources/stop_ids_for_agency.rb +0 -2
- data/lib/onebusaway-sdk/resources/stops_for_agency.rb +0 -2
- data/lib/onebusaway-sdk/resources/stops_for_location.rb +0 -2
- data/lib/onebusaway-sdk/resources/stops_for_route.rb +0 -2
- data/lib/onebusaway-sdk/resources/trip.rb +0 -2
- data/lib/onebusaway-sdk/resources/trip_details.rb +0 -2
- data/lib/onebusaway-sdk/resources/trip_for_vehicle.rb +0 -2
- data/lib/onebusaway-sdk/resources/trips_for_location.rb +0 -2
- data/lib/onebusaway-sdk/resources/trips_for_route.rb +0 -2
- data/lib/onebusaway-sdk/resources/vehicles_for_agency.rb +0 -2
- data/lib/onebusaway-sdk/util.rb +201 -118
- data/lib/onebusaway-sdk/version.rb +1 -1
- data/lib/onebusaway-sdk.rb +1 -0
- data/manifest.yaml +1 -0
- data/rbi/lib/onebusaway-sdk/base_client.rbi +46 -21
- data/rbi/lib/onebusaway-sdk/base_model.rbi +400 -256
- data/rbi/lib/onebusaway-sdk/base_page.rbi +3 -4
- data/rbi/lib/onebusaway-sdk/client.rbi +7 -2
- data/rbi/lib/onebusaway-sdk/errors.rbi +41 -8
- data/rbi/lib/onebusaway-sdk/extern.rbi +1 -1
- data/rbi/lib/onebusaway-sdk/models/agencies_with_coverage_list_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/agencies_with_coverage_list_response.rbi +9 -6
- data/rbi/lib/onebusaway-sdk/models/agency_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/agency_retrieve_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_list_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_list_response.rbi +95 -14
- data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_retrieve_params.rbi +2 -9
- data/rbi/lib/onebusaway-sdk/models/arrival_and_departure_retrieve_response.rbi +93 -12
- data/rbi/lib/onebusaway-sdk/models/block_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/block_retrieve_response.rbi +14 -20
- data/rbi/lib/onebusaway-sdk/models/config_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/config_retrieve_response.rbi +8 -14
- data/rbi/lib/onebusaway-sdk/models/current_time_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/current_time_retrieve_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/references.rbi +60 -43
- data/rbi/lib/onebusaway-sdk/models/report_problem_with_stop_retrieve_params.rbi +10 -6
- data/rbi/lib/onebusaway-sdk/models/report_problem_with_trip_retrieve_params.rbi +15 -6
- data/rbi/lib/onebusaway-sdk/models/response_wrapper.rbi +4 -2
- data/rbi/lib/onebusaway-sdk/models/route_ids_for_agency_list_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/route_ids_for_agency_list_response.rbi +4 -4
- data/rbi/lib/onebusaway-sdk/models/route_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/route_retrieve_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/routes_for_agency_list_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/routes_for_agency_list_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/routes_for_location_list_params.rbi +2 -2
- data/rbi/lib/onebusaway-sdk/models/routes_for_location_list_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/schedule_for_route_retrieve_params.rbi +5 -8
- data/rbi/lib/onebusaway-sdk/models/schedule_for_route_retrieve_response.rbi +19 -16
- data/rbi/lib/onebusaway-sdk/models/schedule_for_stop_retrieve_params.rbi +5 -8
- data/rbi/lib/onebusaway-sdk/models/schedule_for_stop_retrieve_response.rbi +14 -14
- data/rbi/lib/onebusaway-sdk/models/search_for_route_list_params.rbi +4 -2
- data/rbi/lib/onebusaway-sdk/models/search_for_route_list_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/search_for_stop_list_params.rbi +4 -2
- data/rbi/lib/onebusaway-sdk/models/search_for_stop_list_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/shape_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/shape_retrieve_response.rbi +7 -6
- data/rbi/lib/onebusaway-sdk/models/stop_ids_for_agency_list_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/stop_ids_for_agency_list_response.rbi +4 -4
- data/rbi/lib/onebusaway-sdk/models/stop_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/stop_retrieve_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/stops_for_agency_list_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/stops_for_agency_list_response.rbi +4 -4
- data/rbi/lib/onebusaway-sdk/models/stops_for_location_list_params.rbi +6 -2
- data/rbi/lib/onebusaway-sdk/models/stops_for_location_list_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/stops_for_route_list_params.rbi +4 -2
- data/rbi/lib/onebusaway-sdk/models/stops_for_route_list_response.rbi +14 -14
- data/rbi/lib/onebusaway-sdk/models/trip_detail_retrieve_params.rbi +10 -2
- data/rbi/lib/onebusaway-sdk/models/trip_detail_retrieve_response.rbi +54 -23
- data/rbi/lib/onebusaway-sdk/models/trip_for_vehicle_retrieve_params.rbi +9 -8
- data/rbi/lib/onebusaway-sdk/models/trip_for_vehicle_retrieve_response.rbi +54 -23
- data/rbi/lib/onebusaway-sdk/models/trip_retrieve_params.rbi +5 -2
- data/rbi/lib/onebusaway-sdk/models/trip_retrieve_response.rbi +6 -6
- data/rbi/lib/onebusaway-sdk/models/trips_for_location_list_params.rbi +12 -12
- data/rbi/lib/onebusaway-sdk/models/trips_for_location_list_response.rbi +56 -16
- data/rbi/lib/onebusaway-sdk/models/trips_for_route_list_params.rbi +6 -2
- data/rbi/lib/onebusaway-sdk/models/trips_for_route_list_response.rbi +54 -16
- data/rbi/lib/onebusaway-sdk/models/vehicles_for_agency_list_params.rbi +3 -2
- data/rbi/lib/onebusaway-sdk/models/vehicles_for_agency_list_response.rbi +52 -14
- data/rbi/lib/onebusaway-sdk/pooled_net_requester.rbi +28 -13
- data/rbi/lib/onebusaway-sdk/request_options.rbi +25 -2
- data/rbi/lib/onebusaway-sdk/resources/agencies_with_coverage.rbi +4 -2
- data/rbi/lib/onebusaway-sdk/resources/agency.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/arrival_and_departure.rbi +14 -3
- data/rbi/lib/onebusaway-sdk/resources/block.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/config.rbi +3 -2
- data/rbi/lib/onebusaway-sdk/resources/current_time.rbi +3 -2
- data/rbi/lib/onebusaway-sdk/resources/report_problem_with_stop.rbi +9 -2
- data/rbi/lib/onebusaway-sdk/resources/report_problem_with_trip.rbi +14 -2
- data/rbi/lib/onebusaway-sdk/resources/route.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/route_ids_for_agency.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/routes_for_agency.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/routes_for_location.rbi +3 -2
- data/rbi/lib/onebusaway-sdk/resources/schedule_for_route.rbi +11 -3
- data/rbi/lib/onebusaway-sdk/resources/schedule_for_stop.rbi +11 -3
- data/rbi/lib/onebusaway-sdk/resources/search_for_route.rbi +10 -3
- data/rbi/lib/onebusaway-sdk/resources/search_for_stop.rbi +10 -3
- data/rbi/lib/onebusaway-sdk/resources/shape.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/stop.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/stop_ids_for_agency.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/stops_for_agency.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/stops_for_location.rbi +16 -3
- data/rbi/lib/onebusaway-sdk/resources/stops_for_route.rbi +12 -3
- data/rbi/lib/onebusaway-sdk/resources/trip.rbi +8 -3
- data/rbi/lib/onebusaway-sdk/resources/trip_details.rbi +12 -2
- data/rbi/lib/onebusaway-sdk/resources/trip_for_vehicle.rbi +11 -2
- data/rbi/lib/onebusaway-sdk/resources/trips_for_location.rbi +12 -2
- data/rbi/lib/onebusaway-sdk/resources/trips_for_route.rbi +15 -3
- data/rbi/lib/onebusaway-sdk/resources/vehicles_for_agency.rbi +10 -3
- data/rbi/lib/onebusaway-sdk/util.rbi +207 -105
- data/rbi/lib/onebusaway-sdk/version.rbi +1 -1
- data/sig/onebusaway-sdk/base_client.rbs +6 -1
- data/sig/onebusaway-sdk/base_model.rbs +8 -6
- data/sig/onebusaway-sdk/base_page.rbs +1 -1
- data/sig/onebusaway-sdk/errors.rbs +4 -4
- data/sig/onebusaway-sdk/pooled_net_requester.rbs +11 -4
- data/sig/onebusaway-sdk/request_options.rbs +4 -0
- data/sig/onebusaway-sdk/util.rbs +33 -8
- data/sig/onebusaway-sdk/version.rbs +1 -1
- metadata +4 -4
@@ -14,8 +14,8 @@ module OnebusawaySDK
|
|
14
14
|
def data=(_)
|
15
15
|
end
|
16
16
|
|
17
|
-
sig { params(data: OnebusawaySDK::Models::ConfigRetrieveResponse::Data).
|
18
|
-
def
|
17
|
+
sig { params(data: OnebusawaySDK::Models::ConfigRetrieveResponse::Data).returns(T.attached_class) }
|
18
|
+
def self.new(data:)
|
19
19
|
end
|
20
20
|
|
21
21
|
sig { override.returns({data: OnebusawaySDK::Models::ConfigRetrieveResponse::Data}) }
|
@@ -47,9 +47,9 @@ module OnebusawaySDK
|
|
47
47
|
entry: OnebusawaySDK::Models::ConfigRetrieveResponse::Data::Entry,
|
48
48
|
references: OnebusawaySDK::Models::References
|
49
49
|
)
|
50
|
-
.
|
50
|
+
.returns(T.attached_class)
|
51
51
|
end
|
52
|
-
def
|
52
|
+
def self.new(entry:, references:)
|
53
53
|
end
|
54
54
|
|
55
55
|
sig do
|
@@ -116,15 +116,9 @@ module OnebusawaySDK
|
|
116
116
|
service_date_from: String,
|
117
117
|
service_date_to: String
|
118
118
|
)
|
119
|
-
.
|
119
|
+
.returns(T.attached_class)
|
120
120
|
end
|
121
|
-
def
|
122
|
-
id: nil,
|
123
|
-
git_properties: nil,
|
124
|
-
name: nil,
|
125
|
-
service_date_from: nil,
|
126
|
-
service_date_to: nil
|
127
|
-
)
|
121
|
+
def self.new(id: nil, git_properties: nil, name: nil, service_date_from: nil, service_date_to: nil)
|
128
122
|
end
|
129
123
|
|
130
124
|
sig do
|
@@ -326,9 +320,9 @@ module OnebusawaySDK
|
|
326
320
|
git_remote_origin_url: String,
|
327
321
|
git_tags: String
|
328
322
|
)
|
329
|
-
.
|
323
|
+
.returns(T.attached_class)
|
330
324
|
end
|
331
|
-
def
|
325
|
+
def self.new(
|
332
326
|
git_branch: nil,
|
333
327
|
git_build_host: nil,
|
334
328
|
git_build_time: nil,
|
@@ -6,8 +6,11 @@ module OnebusawaySDK
|
|
6
6
|
extend OnebusawaySDK::RequestParameters::Converter
|
7
7
|
include OnebusawaySDK::RequestParameters
|
8
8
|
|
9
|
-
sig
|
10
|
-
|
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}) }
|
@@ -14,8 +14,8 @@ module OnebusawaySDK
|
|
14
14
|
def data=(_)
|
15
15
|
end
|
16
16
|
|
17
|
-
sig { params(data: OnebusawaySDK::Models::CurrentTimeRetrieveResponse::Data).
|
18
|
-
def
|
17
|
+
sig { params(data: OnebusawaySDK::Models::CurrentTimeRetrieveResponse::Data).returns(T.attached_class) }
|
18
|
+
def self.new(data:)
|
19
19
|
end
|
20
20
|
|
21
21
|
sig { override.returns({data: OnebusawaySDK::Models::CurrentTimeRetrieveResponse::Data}) }
|
@@ -47,9 +47,9 @@ module OnebusawaySDK
|
|
47
47
|
entry: OnebusawaySDK::Models::CurrentTimeRetrieveResponse::Data::Entry,
|
48
48
|
references: OnebusawaySDK::Models::References
|
49
49
|
)
|
50
|
-
.
|
50
|
+
.returns(T.attached_class)
|
51
51
|
end
|
52
|
-
def
|
52
|
+
def self.new(entry:, references:)
|
53
53
|
end
|
54
54
|
|
55
55
|
sig do
|
@@ -81,8 +81,8 @@ module OnebusawaySDK
|
|
81
81
|
def time=(_)
|
82
82
|
end
|
83
83
|
|
84
|
-
sig { params(readable_time: String, time: Integer).
|
85
|
-
def
|
84
|
+
sig { params(readable_time: String, time: Integer).returns(T.attached_class) }
|
85
|
+
def self.new(readable_time: nil, time: nil)
|
86
86
|
end
|
87
87
|
|
88
88
|
sig { override.returns({readable_time: String, time: Integer}) }
|
@@ -78,9 +78,9 @@ module OnebusawaySDK
|
|
78
78
|
stop_times: T::Array[OnebusawaySDK::Models::References::StopTime],
|
79
79
|
trips: T::Array[OnebusawaySDK::Models::References::Trip]
|
80
80
|
)
|
81
|
-
.
|
81
|
+
.returns(T.attached_class)
|
82
82
|
end
|
83
|
-
def
|
83
|
+
def self.new(agencies:, routes:, situations:, stops:, stop_times:, trips:)
|
84
84
|
end
|
85
85
|
|
86
86
|
sig do
|
@@ -193,9 +193,9 @@ module OnebusawaySDK
|
|
193
193
|
phone: String,
|
194
194
|
private_service: T::Boolean
|
195
195
|
)
|
196
|
-
.
|
196
|
+
.returns(T.attached_class)
|
197
197
|
end
|
198
|
-
def
|
198
|
+
def self.new(
|
199
199
|
id:,
|
200
200
|
name:,
|
201
201
|
timezone:,
|
@@ -324,9 +324,9 @@ module OnebusawaySDK
|
|
324
324
|
text_color: String,
|
325
325
|
url: String
|
326
326
|
)
|
327
|
-
.
|
327
|
+
.returns(T.attached_class)
|
328
328
|
end
|
329
|
-
def
|
329
|
+
def self.new(
|
330
330
|
id:,
|
331
331
|
agency_id:,
|
332
332
|
type:,
|
@@ -362,6 +362,7 @@ module OnebusawaySDK
|
|
362
362
|
end
|
363
363
|
|
364
364
|
class Situation < OnebusawaySDK::BaseModel
|
365
|
+
# Unique identifier for the situation.
|
365
366
|
sig { returns(String) }
|
366
367
|
def id
|
367
368
|
end
|
@@ -370,6 +371,7 @@ module OnebusawaySDK
|
|
370
371
|
def id=(_)
|
371
372
|
end
|
372
373
|
|
374
|
+
# Unix timestamp of when this situation was created.
|
373
375
|
sig { returns(Integer) }
|
374
376
|
def creation_time
|
375
377
|
end
|
@@ -400,6 +402,7 @@ module OnebusawaySDK
|
|
400
402
|
def all_affects=(_)
|
401
403
|
end
|
402
404
|
|
405
|
+
# Message regarding the consequence of the situation.
|
403
406
|
sig { returns(T.nilable(String)) }
|
404
407
|
def consequence_message
|
405
408
|
end
|
@@ -441,6 +444,7 @@ module OnebusawaySDK
|
|
441
444
|
def publication_windows=(_)
|
442
445
|
end
|
443
446
|
|
447
|
+
# Reason for the service alert, taken from TPEG codes.
|
444
448
|
sig { returns(T.nilable(Symbol)) }
|
445
449
|
def reason
|
446
450
|
end
|
@@ -449,6 +453,7 @@ module OnebusawaySDK
|
|
449
453
|
def reason=(_)
|
450
454
|
end
|
451
455
|
|
456
|
+
# Severity of the situation.
|
452
457
|
sig { returns(T.nilable(String)) }
|
453
458
|
def severity
|
454
459
|
end
|
@@ -494,9 +499,9 @@ module OnebusawaySDK
|
|
494
499
|
summary: OnebusawaySDK::Models::References::Situation::Summary,
|
495
500
|
url: OnebusawaySDK::Models::References::Situation::URL
|
496
501
|
)
|
497
|
-
.
|
502
|
+
.returns(T.attached_class)
|
498
503
|
end
|
499
|
-
def
|
504
|
+
def self.new(
|
500
505
|
id:,
|
501
506
|
creation_time:,
|
502
507
|
active_windows: nil,
|
@@ -535,6 +540,7 @@ module OnebusawaySDK
|
|
535
540
|
end
|
536
541
|
|
537
542
|
class ActiveWindow < OnebusawaySDK::BaseModel
|
543
|
+
# Start time of the active window as a Unix timestamp.
|
538
544
|
sig { returns(T.nilable(Integer)) }
|
539
545
|
def from
|
540
546
|
end
|
@@ -543,6 +549,7 @@ module OnebusawaySDK
|
|
543
549
|
def from=(_)
|
544
550
|
end
|
545
551
|
|
552
|
+
# End time of the active window as a Unix timestamp.
|
546
553
|
sig { returns(T.nilable(Integer)) }
|
547
554
|
def to
|
548
555
|
end
|
@@ -551,8 +558,8 @@ module OnebusawaySDK
|
|
551
558
|
def to=(_)
|
552
559
|
end
|
553
560
|
|
554
|
-
sig { params(from: Integer, to: Integer).
|
555
|
-
def
|
561
|
+
sig { params(from: Integer, to: Integer).returns(T.attached_class) }
|
562
|
+
def self.new(from: nil, to: nil)
|
556
563
|
end
|
557
564
|
|
558
565
|
sig { override.returns({from: Integer, to: Integer}) }
|
@@ -561,6 +568,7 @@ module OnebusawaySDK
|
|
561
568
|
end
|
562
569
|
|
563
570
|
class AllAffect < OnebusawaySDK::BaseModel
|
571
|
+
# Identifier for the agency.
|
564
572
|
sig { returns(T.nilable(String)) }
|
565
573
|
def agency_id
|
566
574
|
end
|
@@ -569,6 +577,7 @@ module OnebusawaySDK
|
|
569
577
|
def agency_id=(_)
|
570
578
|
end
|
571
579
|
|
580
|
+
# Identifier for the application.
|
572
581
|
sig { returns(T.nilable(String)) }
|
573
582
|
def application_id
|
574
583
|
end
|
@@ -577,6 +586,7 @@ module OnebusawaySDK
|
|
577
586
|
def application_id=(_)
|
578
587
|
end
|
579
588
|
|
589
|
+
# Identifier for the direction.
|
580
590
|
sig { returns(T.nilable(String)) }
|
581
591
|
def direction_id
|
582
592
|
end
|
@@ -585,6 +595,7 @@ module OnebusawaySDK
|
|
585
595
|
def direction_id=(_)
|
586
596
|
end
|
587
597
|
|
598
|
+
# Identifier for the route.
|
588
599
|
sig { returns(T.nilable(String)) }
|
589
600
|
def route_id
|
590
601
|
end
|
@@ -593,6 +604,7 @@ module OnebusawaySDK
|
|
593
604
|
def route_id=(_)
|
594
605
|
end
|
595
606
|
|
607
|
+
# Identifier for the stop.
|
596
608
|
sig { returns(T.nilable(String)) }
|
597
609
|
def stop_id
|
598
610
|
end
|
@@ -601,6 +613,7 @@ module OnebusawaySDK
|
|
601
613
|
def stop_id=(_)
|
602
614
|
end
|
603
615
|
|
616
|
+
# Identifier for the trip.
|
604
617
|
sig { returns(T.nilable(String)) }
|
605
618
|
def trip_id
|
606
619
|
end
|
@@ -618,16 +631,9 @@ module OnebusawaySDK
|
|
618
631
|
stop_id: String,
|
619
632
|
trip_id: String
|
620
633
|
)
|
621
|
-
.
|
634
|
+
.returns(T.attached_class)
|
622
635
|
end
|
623
|
-
def
|
624
|
-
agency_id: nil,
|
625
|
-
application_id: nil,
|
626
|
-
direction_id: nil,
|
627
|
-
route_id: nil,
|
628
|
-
stop_id: nil,
|
629
|
-
trip_id: nil
|
630
|
-
)
|
636
|
+
def self.new(agency_id: nil, application_id: nil, direction_id: nil, route_id: nil, stop_id: nil, trip_id: nil)
|
631
637
|
end
|
632
638
|
|
633
639
|
sig do
|
@@ -648,6 +654,7 @@ module OnebusawaySDK
|
|
648
654
|
end
|
649
655
|
|
650
656
|
class Consequence < OnebusawaySDK::BaseModel
|
657
|
+
# Condition of the consequence.
|
651
658
|
sig { returns(T.nilable(String)) }
|
652
659
|
def condition
|
653
660
|
end
|
@@ -672,9 +679,9 @@ module OnebusawaySDK
|
|
672
679
|
condition: String,
|
673
680
|
condition_details: OnebusawaySDK::Models::References::Situation::Consequence::ConditionDetails
|
674
681
|
)
|
675
|
-
.
|
682
|
+
.returns(T.attached_class)
|
676
683
|
end
|
677
|
-
def
|
684
|
+
def self.new(condition: nil, condition_details: nil)
|
678
685
|
end
|
679
686
|
|
680
687
|
sig do
|
@@ -718,9 +725,9 @@ module OnebusawaySDK
|
|
718
725
|
diversion_path: OnebusawaySDK::Models::References::Situation::Consequence::ConditionDetails::DiversionPath,
|
719
726
|
diversion_stop_ids: T::Array[String]
|
720
727
|
)
|
721
|
-
.
|
728
|
+
.returns(T.attached_class)
|
722
729
|
end
|
723
|
-
def
|
730
|
+
def self.new(diversion_path: nil, diversion_stop_ids: nil)
|
724
731
|
end
|
725
732
|
|
726
733
|
sig do
|
@@ -736,6 +743,7 @@ module OnebusawaySDK
|
|
736
743
|
end
|
737
744
|
|
738
745
|
class DiversionPath < OnebusawaySDK::BaseModel
|
746
|
+
# Length of the diversion path.
|
739
747
|
sig { returns(T.nilable(Integer)) }
|
740
748
|
def length
|
741
749
|
end
|
@@ -744,6 +752,7 @@ module OnebusawaySDK
|
|
744
752
|
def length=(_)
|
745
753
|
end
|
746
754
|
|
755
|
+
# Levels of the diversion path.
|
747
756
|
sig { returns(T.nilable(String)) }
|
748
757
|
def levels
|
749
758
|
end
|
@@ -752,6 +761,7 @@ module OnebusawaySDK
|
|
752
761
|
def levels=(_)
|
753
762
|
end
|
754
763
|
|
764
|
+
# Points of the diversion path.
|
755
765
|
sig { returns(T.nilable(String)) }
|
756
766
|
def points
|
757
767
|
end
|
@@ -760,8 +770,8 @@ module OnebusawaySDK
|
|
760
770
|
def points=(_)
|
761
771
|
end
|
762
772
|
|
763
|
-
sig { params(length: Integer, levels: String, points: String).
|
764
|
-
def
|
773
|
+
sig { params(length: Integer, levels: String, points: String).returns(T.attached_class) }
|
774
|
+
def self.new(length: nil, levels: nil, points: nil)
|
765
775
|
end
|
766
776
|
|
767
777
|
sig { override.returns({length: Integer, levels: String, points: String}) }
|
@@ -772,6 +782,7 @@ module OnebusawaySDK
|
|
772
782
|
end
|
773
783
|
|
774
784
|
class Description < OnebusawaySDK::BaseModel
|
785
|
+
# Language of the description.
|
775
786
|
sig { returns(T.nilable(String)) }
|
776
787
|
def lang
|
777
788
|
end
|
@@ -780,6 +791,7 @@ module OnebusawaySDK
|
|
780
791
|
def lang=(_)
|
781
792
|
end
|
782
793
|
|
794
|
+
# Longer description of the situation.
|
783
795
|
sig { returns(T.nilable(String)) }
|
784
796
|
def value
|
785
797
|
end
|
@@ -788,8 +800,8 @@ module OnebusawaySDK
|
|
788
800
|
def value=(_)
|
789
801
|
end
|
790
802
|
|
791
|
-
sig { params(lang: String, value: String).
|
792
|
-
def
|
803
|
+
sig { params(lang: String, value: String).returns(T.attached_class) }
|
804
|
+
def self.new(lang: nil, value: nil)
|
793
805
|
end
|
794
806
|
|
795
807
|
sig { override.returns({lang: String, value: String}) }
|
@@ -798,6 +810,7 @@ module OnebusawaySDK
|
|
798
810
|
end
|
799
811
|
|
800
812
|
class PublicationWindow < OnebusawaySDK::BaseModel
|
813
|
+
# Start time of the time window as a Unix timestamp.
|
801
814
|
sig { returns(Integer) }
|
802
815
|
def from
|
803
816
|
end
|
@@ -806,6 +819,7 @@ module OnebusawaySDK
|
|
806
819
|
def from=(_)
|
807
820
|
end
|
808
821
|
|
822
|
+
# End time of the time window as a Unix timestamp.
|
809
823
|
sig { returns(Integer) }
|
810
824
|
def to
|
811
825
|
end
|
@@ -814,8 +828,8 @@ module OnebusawaySDK
|
|
814
828
|
def to=(_)
|
815
829
|
end
|
816
830
|
|
817
|
-
sig { params(from: Integer, to: Integer).
|
818
|
-
def
|
831
|
+
sig { params(from: Integer, to: Integer).returns(T.attached_class) }
|
832
|
+
def self.new(from:, to:)
|
819
833
|
end
|
820
834
|
|
821
835
|
sig { override.returns({from: Integer, to: Integer}) }
|
@@ -823,21 +837,21 @@ module OnebusawaySDK
|
|
823
837
|
end
|
824
838
|
end
|
825
839
|
|
840
|
+
# Reason for the service alert, taken from TPEG codes.
|
826
841
|
class Reason < OnebusawaySDK::Enum
|
827
842
|
abstract!
|
828
843
|
|
844
|
+
Value = type_template(:out) { {fixed: Symbol} }
|
845
|
+
|
829
846
|
EQUIPMENT_REASON = :equipmentReason
|
830
847
|
ENVIRONMENT_REASON = :environmentReason
|
831
848
|
PERSONNEL_REASON = :personnelReason
|
832
849
|
MISCELLANEOUS_REASON = :miscellaneousReason
|
833
850
|
SECURITY_ALERT = :securityAlert
|
834
|
-
|
835
|
-
sig { override.returns(T::Array[Symbol]) }
|
836
|
-
def self.values
|
837
|
-
end
|
838
851
|
end
|
839
852
|
|
840
853
|
class Summary < OnebusawaySDK::BaseModel
|
854
|
+
# Language of the summary.
|
841
855
|
sig { returns(T.nilable(String)) }
|
842
856
|
def lang
|
843
857
|
end
|
@@ -846,6 +860,7 @@ module OnebusawaySDK
|
|
846
860
|
def lang=(_)
|
847
861
|
end
|
848
862
|
|
863
|
+
# Short summary of the situation.
|
849
864
|
sig { returns(T.nilable(String)) }
|
850
865
|
def value
|
851
866
|
end
|
@@ -854,8 +869,8 @@ module OnebusawaySDK
|
|
854
869
|
def value=(_)
|
855
870
|
end
|
856
871
|
|
857
|
-
sig { params(lang: String, value: String).
|
858
|
-
def
|
872
|
+
sig { params(lang: String, value: String).returns(T.attached_class) }
|
873
|
+
def self.new(lang: nil, value: nil)
|
859
874
|
end
|
860
875
|
|
861
876
|
sig { override.returns({lang: String, value: String}) }
|
@@ -864,6 +879,7 @@ module OnebusawaySDK
|
|
864
879
|
end
|
865
880
|
|
866
881
|
class URL < OnebusawaySDK::BaseModel
|
882
|
+
# Language of the URL.
|
867
883
|
sig { returns(T.nilable(String)) }
|
868
884
|
def lang
|
869
885
|
end
|
@@ -872,6 +888,7 @@ module OnebusawaySDK
|
|
872
888
|
def lang=(_)
|
873
889
|
end
|
874
890
|
|
891
|
+
# URL for more information about the situation.
|
875
892
|
sig { returns(T.nilable(String)) }
|
876
893
|
def value
|
877
894
|
end
|
@@ -880,8 +897,8 @@ module OnebusawaySDK
|
|
880
897
|
def value=(_)
|
881
898
|
end
|
882
899
|
|
883
|
-
sig { params(lang: String, value: String).
|
884
|
-
def
|
900
|
+
sig { params(lang: String, value: String).returns(T.attached_class) }
|
901
|
+
def self.new(lang: nil, value: nil)
|
885
902
|
end
|
886
903
|
|
887
904
|
sig { override.returns({lang: String, value: String}) }
|
@@ -993,9 +1010,9 @@ module OnebusawaySDK
|
|
993
1010
|
location_type: Integer,
|
994
1011
|
wheelchair_boarding: String
|
995
1012
|
)
|
996
|
-
.
|
1013
|
+
.returns(T.attached_class)
|
997
1014
|
end
|
998
|
-
def
|
1015
|
+
def self.new(
|
999
1016
|
id:,
|
1000
1017
|
lat:,
|
1001
1018
|
lon:,
|
@@ -1090,9 +1107,9 @@ module OnebusawaySDK
|
|
1090
1107
|
stop_headsign: String,
|
1091
1108
|
stop_id: String
|
1092
1109
|
)
|
1093
|
-
.
|
1110
|
+
.returns(T.attached_class)
|
1094
1111
|
end
|
1095
|
-
def
|
1112
|
+
def self.new(
|
1096
1113
|
arrival_time: nil,
|
1097
1114
|
departure_time: nil,
|
1098
1115
|
distance_along_trip: nil,
|
@@ -1222,9 +1239,9 @@ module OnebusawaySDK
|
|
1222
1239
|
trip_headsign: String,
|
1223
1240
|
trip_short_name: String
|
1224
1241
|
)
|
1225
|
-
.
|
1242
|
+
.returns(T.attached_class)
|
1226
1243
|
end
|
1227
|
-
def
|
1244
|
+
def self.new(
|
1228
1245
|
id:,
|
1229
1246
|
route_id:,
|
1230
1247
|
service_id:,
|
@@ -6,6 +6,7 @@ module OnebusawaySDK
|
|
6
6
|
extend OnebusawaySDK::RequestParameters::Converter
|
7
7
|
include OnebusawaySDK::RequestParameters
|
8
8
|
|
9
|
+
# A string code identifying the nature of the problem
|
9
10
|
sig { returns(T.nilable(Symbol)) }
|
10
11
|
def code
|
11
12
|
end
|
@@ -14,6 +15,7 @@ module OnebusawaySDK
|
|
14
15
|
def code=(_)
|
15
16
|
end
|
16
17
|
|
18
|
+
# Additional comment text supplied by the user describing the problem
|
17
19
|
sig { returns(T.nilable(String)) }
|
18
20
|
def user_comment
|
19
21
|
end
|
@@ -22,6 +24,7 @@ module OnebusawaySDK
|
|
22
24
|
def user_comment=(_)
|
23
25
|
end
|
24
26
|
|
27
|
+
# The reporting user’s current latitude
|
25
28
|
sig { returns(T.nilable(Float)) }
|
26
29
|
def user_lat
|
27
30
|
end
|
@@ -30,6 +33,7 @@ module OnebusawaySDK
|
|
30
33
|
def user_lat=(_)
|
31
34
|
end
|
32
35
|
|
36
|
+
# The reporting user’s location accuracy, in meters
|
33
37
|
sig { returns(T.nilable(Float)) }
|
34
38
|
def user_location_accuracy
|
35
39
|
end
|
@@ -38,6 +42,7 @@ module OnebusawaySDK
|
|
38
42
|
def user_location_accuracy=(_)
|
39
43
|
end
|
40
44
|
|
45
|
+
# The reporting user’s current longitude
|
41
46
|
sig { returns(T.nilable(Float)) }
|
42
47
|
def user_lon
|
43
48
|
end
|
@@ -55,9 +60,9 @@ module OnebusawaySDK
|
|
55
60
|
user_lon: Float,
|
56
61
|
request_options: T.any(OnebusawaySDK::RequestOptions, T::Hash[Symbol, T.anything])
|
57
62
|
)
|
58
|
-
.
|
63
|
+
.returns(T.attached_class)
|
59
64
|
end
|
60
|
-
def
|
65
|
+
def self.new(
|
61
66
|
code: nil,
|
62
67
|
user_comment: nil,
|
63
68
|
user_lat: nil,
|
@@ -83,18 +88,17 @@ module OnebusawaySDK
|
|
83
88
|
def to_hash
|
84
89
|
end
|
85
90
|
|
91
|
+
# A string code identifying the nature of the problem
|
86
92
|
class Code < OnebusawaySDK::Enum
|
87
93
|
abstract!
|
88
94
|
|
95
|
+
Value = type_template(:out) { {fixed: Symbol} }
|
96
|
+
|
89
97
|
STOP_NAME_WRONG = :stop_name_wrong
|
90
98
|
STOP_NUMBER_WRONG = :stop_number_wrong
|
91
99
|
STOP_LOCATION_WRONG = :stop_location_wrong
|
92
100
|
ROUTE_OR_TRIP_MISSING = :route_or_trip_missing
|
93
101
|
OTHER = :other
|
94
|
-
|
95
|
-
sig { override.returns(T::Array[Symbol]) }
|
96
|
-
def self.values
|
97
|
-
end
|
98
102
|
end
|
99
103
|
end
|
100
104
|
end
|
@@ -6,6 +6,7 @@ module OnebusawaySDK
|
|
6
6
|
extend OnebusawaySDK::RequestParameters::Converter
|
7
7
|
include OnebusawaySDK::RequestParameters
|
8
8
|
|
9
|
+
# A string code identifying the nature of the problem
|
9
10
|
sig { returns(T.nilable(Symbol)) }
|
10
11
|
def code
|
11
12
|
end
|
@@ -14,6 +15,7 @@ module OnebusawaySDK
|
|
14
15
|
def code=(_)
|
15
16
|
end
|
16
17
|
|
18
|
+
# The service date of the trip
|
17
19
|
sig { returns(T.nilable(Integer)) }
|
18
20
|
def service_date
|
19
21
|
end
|
@@ -22,6 +24,7 @@ module OnebusawaySDK
|
|
22
24
|
def service_date=(_)
|
23
25
|
end
|
24
26
|
|
27
|
+
# A stop ID indicating where the user is experiencing the problem
|
25
28
|
sig { returns(T.nilable(String)) }
|
26
29
|
def stop_id
|
27
30
|
end
|
@@ -30,6 +33,7 @@ module OnebusawaySDK
|
|
30
33
|
def stop_id=(_)
|
31
34
|
end
|
32
35
|
|
36
|
+
# Additional comment text supplied by the user describing the problem
|
33
37
|
sig { returns(T.nilable(String)) }
|
34
38
|
def user_comment
|
35
39
|
end
|
@@ -38,6 +42,7 @@ module OnebusawaySDK
|
|
38
42
|
def user_comment=(_)
|
39
43
|
end
|
40
44
|
|
45
|
+
# The reporting user’s current latitude
|
41
46
|
sig { returns(T.nilable(Float)) }
|
42
47
|
def user_lat
|
43
48
|
end
|
@@ -46,6 +51,7 @@ module OnebusawaySDK
|
|
46
51
|
def user_lat=(_)
|
47
52
|
end
|
48
53
|
|
54
|
+
# The reporting user’s location accuracy, in meters
|
49
55
|
sig { returns(T.nilable(Float)) }
|
50
56
|
def user_location_accuracy
|
51
57
|
end
|
@@ -54,6 +60,7 @@ module OnebusawaySDK
|
|
54
60
|
def user_location_accuracy=(_)
|
55
61
|
end
|
56
62
|
|
63
|
+
# The reporting user’s current longitude
|
57
64
|
sig { returns(T.nilable(Float)) }
|
58
65
|
def user_lon
|
59
66
|
end
|
@@ -62,6 +69,7 @@ module OnebusawaySDK
|
|
62
69
|
def user_lon=(_)
|
63
70
|
end
|
64
71
|
|
72
|
+
# Indicator if the user is on the transit vehicle experiencing the problem
|
65
73
|
sig { returns(T.nilable(T::Boolean)) }
|
66
74
|
def user_on_vehicle
|
67
75
|
end
|
@@ -70,6 +78,7 @@ module OnebusawaySDK
|
|
70
78
|
def user_on_vehicle=(_)
|
71
79
|
end
|
72
80
|
|
81
|
+
# The vehicle number, as reported by the user
|
73
82
|
sig { returns(T.nilable(String)) }
|
74
83
|
def user_vehicle_number
|
75
84
|
end
|
@@ -78,6 +87,7 @@ module OnebusawaySDK
|
|
78
87
|
def user_vehicle_number=(_)
|
79
88
|
end
|
80
89
|
|
90
|
+
# The vehicle actively serving the trip
|
81
91
|
sig { returns(T.nilable(String)) }
|
82
92
|
def vehicle_id
|
83
93
|
end
|
@@ -100,9 +110,9 @@ module OnebusawaySDK
|
|
100
110
|
vehicle_id: String,
|
101
111
|
request_options: T.any(OnebusawaySDK::RequestOptions, T::Hash[Symbol, T.anything])
|
102
112
|
)
|
103
|
-
.
|
113
|
+
.returns(T.attached_class)
|
104
114
|
end
|
105
|
-
def
|
115
|
+
def self.new(
|
106
116
|
code: nil,
|
107
117
|
service_date: nil,
|
108
118
|
stop_id: nil,
|
@@ -138,19 +148,18 @@ module OnebusawaySDK
|
|
138
148
|
def to_hash
|
139
149
|
end
|
140
150
|
|
151
|
+
# A string code identifying the nature of the problem
|
141
152
|
class Code < OnebusawaySDK::Enum
|
142
153
|
abstract!
|
143
154
|
|
155
|
+
Value = type_template(:out) { {fixed: Symbol} }
|
156
|
+
|
144
157
|
VEHICLE_NEVER_CAME = :vehicle_never_came
|
145
158
|
VEHICLE_CAME_EARLY = :vehicle_came_early
|
146
159
|
VEHICLE_CAME_LATE = :vehicle_came_late
|
147
160
|
WRONG_HEADSIGN = :wrong_headsign
|
148
161
|
VEHICLE_DOES_NOT_STOP_HERE = :vehicle_does_not_stop_here
|
149
162
|
OTHER = :other
|
150
|
-
|
151
|
-
sig { override.returns(T::Array[Symbol]) }
|
152
|
-
def self.values
|
153
|
-
end
|
154
163
|
end
|
155
164
|
end
|
156
165
|
end
|
@@ -35,8 +35,10 @@ module OnebusawaySDK
|
|
35
35
|
def version=(_)
|
36
36
|
end
|
37
37
|
|
38
|
-
sig
|
39
|
-
|
38
|
+
sig do
|
39
|
+
params(code: Integer, current_time: Integer, text: String, version: Integer).returns(T.attached_class)
|
40
|
+
end
|
41
|
+
def self.new(code:, current_time:, text:, version:)
|
40
42
|
end
|
41
43
|
|
42
44
|
sig { override.returns({code: Integer, current_time: Integer, text: String, version: Integer}) }
|