Class: OnebusawaySDK::Resources::TripDetails
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::TripDetails
- Defined in:
- lib/onebusaway_sdk/resources/trip_details.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ TripDetails
constructor
private
A new instance of TripDetails.
-
#retrieve(trip_id, include_schedule: nil, include_status: nil, include_trip: nil, service_date: nil, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::TripDetailRetrieveResponse
Some parameter documentations has been truncated, see Models::TripDetailRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ TripDetails
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 TripDetails.
49 50 51 |
# File 'lib/onebusaway_sdk/resources/trip_details.rb', line 49 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(trip_id, include_schedule: nil, include_status: nil, include_trip: nil, service_date: nil, time: nil, request_options: {}) ⇒ OnebusawaySDK::Models::TripDetailRetrieveResponse
Some parameter documentations has been truncated, see Models::TripDetailRetrieveParams for more details.
Retrieve Trip Details
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/onebusaway_sdk/resources/trip_details.rb', line 30 def retrieve(trip_id, params = {}) parsed, = OnebusawaySDK::TripDetailRetrieveParams.dump_request(params) @client.request( method: :get, path: ["api/where/trip-details/%1$s.json", trip_id], query: parsed.transform_keys( include_schedule: "includeSchedule", include_status: "includeStatus", include_trip: "includeTrip", service_date: "serviceDate" ), model: OnebusawaySDK::Models::TripDetailRetrieveResponse, options: ) end |