Class: OnebusawaySDK::Resources::TripForVehicle
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::TripForVehicle
- Defined in:
- lib/onebusaway_sdk/resources/trip_for_vehicle.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ TripForVehicle
constructor
private
A new instance of TripForVehicle.
-
#retrieve(vehicle_id, include_schedule: nil, include_status: nil, include_trip: nil, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::TripForVehicleRetrieveResponse
Some parameter documentations has been truncated, see Models::TripForVehicleRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ TripForVehicle
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of TripForVehicle.
46 47 48 |
# File 'lib/onebusaway_sdk/resources/trip_for_vehicle.rb', line 46 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(vehicle_id, include_schedule: nil, include_status: nil, include_trip: nil, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::TripForVehicleRetrieveResponse
Some parameter documentations has been truncated, see Models::TripForVehicleRetrieveParams for more details.
Retrieve trip for a specific vehicle
28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/onebusaway_sdk/resources/trip_for_vehicle.rb', line 28 def retrieve(vehicle_id, params = {}) parsed, = OnebusawaySDK::TripForVehicleRetrieveParams.dump_request(params) @client.request( method: :get, path: ["api/where/trip-for-vehicle/%1$s.json", vehicle_id], query: parsed.transform_keys( include_schedule: "includeSchedule", include_status: "includeStatus", include_trip: "includeTrip" ), model: OnebusawaySDK::Models::TripForVehicleRetrieveResponse, options: ) end |