Class: OnebusawaySDK::Resources::ReportProblemWithTrip
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::ReportProblemWithTrip
- Defined in:
- lib/onebusaway_sdk/resources/report_problem_with_trip.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ ReportProblemWithTrip
constructor
private
A new instance of ReportProblemWithTrip.
-
#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: {}) ⇒ OnebusawaySDK::Models::ResponseWrapper
Submit a user-generated problem report for a particular trip.
Constructor Details
#initialize(client:) ⇒ ReportProblemWithTrip
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 ReportProblemWithTrip.
61 62 63 |
# File 'lib/onebusaway_sdk/resources/report_problem_with_trip.rb', line 61 def initialize(client:) @client = client end |
Instance Method Details
#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: {}) ⇒ OnebusawaySDK::Models::ResponseWrapper
Submit a user-generated problem report for a particular trip.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/onebusaway_sdk/resources/report_problem_with_trip.rb', line 37 def retrieve(trip_id, params = {}) parsed, = 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: ) end |