class OnebusawaySDK::Resources::ReportProblemWithTrip

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::ReportProblemWithTripRetrieveParams -

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

Parameters:
  • request_options (OnebusawaySDK::RequestOptions, Hash{Symbol=>Object}, nil) --
  • vehicle_id (String) -- The vehicle actively serving the trip
  • user_vehicle_number (String) -- The vehicle number, as reported by the user
  • user_on_vehicle (Boolean) -- Indicator if the user is on the transit vehicle experiencing the problem
  • user_lon (Float) -- The reporting user’s current longitude
  • user_location_accuracy (Float) -- The reporting user’s location accuracy, in meters
  • user_lat (Float) -- The reporting user’s current latitude
  • user_comment (String) -- Additional comment text supplied by the user describing the problem
  • stop_id (String) -- A stop ID indicating where the user is experiencing the problem
  • service_date (Integer) -- The service date of the trip
  • code (Symbol, OnebusawaySDK::Models::ReportProblemWithTripRetrieveParams::Code) -- A string code identifying the nature of the problem
  • trip_id (String) -- The ID of the trip

Overloads:
  • retrieve(trip_id, code: nil, service_date: nil, stop_id: nil, user_comment: nil, user_lat: nil, user_location_accuracy: nil, user_lon: nil, user_on_vehicle: nil, user_vehicle_number: nil, vehicle_id: nil, request_options: {})
def retrieve(trip_id, params = {})
  parsed, options = OnebusawaySDK::ReportProblemWithTripRetrieveParams.dump_request(params)
  @client.request(
    method: :get,
    path: ["api/where/report-problem-with-trip/%1$s.json", trip_id],
    query: parsed.transform_keys(
      service_date: "serviceDate",
      stop_id: "stopID",
      user_comment: "userComment",
      user_lat: "userLat",
      user_location_accuracy: "userLocationAccuracy",
      user_lon: "userLon",
      user_on_vehicle: "userOnVehicle",
      user_vehicle_number: "userVehicleNumber",
      vehicle_id: "vehicleID"
    ),
    model: OnebusawaySDK::ResponseWrapper,
    options: options
  )
end