Class: OnebusawaySDK::Resources::ReportProblemWithStop
- Inherits:
-
Object
- Object
- OnebusawaySDK::Resources::ReportProblemWithStop
- Defined in:
- lib/onebusaway_sdk/resources/report_problem_with_stop.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ ReportProblemWithStop
constructor
private
A new instance of ReportProblemWithStop.
-
#retrieve(stop_id, code: nil, user_comment: nil, user_lat: nil, user_location_accuracy: nil, user_lon: nil, request_options: {}) ⇒ OnebusawaySDK::Models::ResponseWrapper
Submit a user-generated problem report for a stop.
Constructor Details
#initialize(client:) ⇒ ReportProblemWithStop
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 ReportProblemWithStop.
46 47 48 |
# File 'lib/onebusaway_sdk/resources/report_problem_with_stop.rb', line 46 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(stop_id, code: nil, user_comment: nil, user_lat: nil, user_location_accuracy: nil, user_lon: nil, request_options: {}) ⇒ OnebusawaySDK::Models::ResponseWrapper
Submit a user-generated problem report for a stop
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/onebusaway_sdk/resources/report_problem_with_stop.rb', line 27 def retrieve(stop_id, params = {}) parsed, = OnebusawaySDK::ReportProblemWithStopRetrieveParams.dump_request(params) @client.request( method: :get, path: ["api/where/report-problem-with-stop/%1$s.json", stop_id], query: parsed.transform_keys( user_comment: "userComment", user_lat: "userLat", user_location_accuracy: "userLocationAccuracy", user_lon: "userLon" ), model: OnebusawaySDK::ResponseWrapper, options: ) end |