class OnebusawaySDK::Resources::TripDetails

def initialize(client:)

Parameters:
  • client (OnebusawaySDK::Client) --

Other tags:
    Api: - private
def initialize(client:)
  @client = client
end

def retrieve(trip_id, params = {})

Other tags:
    See: OnebusawaySDK::Models::TripDetailRetrieveParams -

Returns:
  • (OnebusawaySDK::Models::TripDetailRetrieveResponse) -

Parameters:
  • request_options (OnebusawaySDK::RequestOptions, Hash{Symbol=>Object}, nil) --
  • time (Integer) -- Time parameter to query the system at a specific time (optional).
  • service_date (Integer) -- Service date for the trip as Unix time in milliseconds (optional).
  • include_trip (Boolean) -- Whether to include the full trip element in the references section (defaults to
  • include_status (Boolean) -- Whether to include the full status element in the tripDetails section (defaults
  • include_schedule (Boolean) -- Whether to include the full schedule element in the tripDetails section (default
  • trip_id (String) -- ID of the trip to retrieve details for.

Overloads:
  • retrieve(trip_id, include_schedule: nil, include_status: nil, include_trip: nil, service_date: nil, time: nil, request_options: {})
def retrieve(trip_id, params = {})
  parsed, options = 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: options
  )
end