Module: Uber::API::Requests
- Included in:
- Uber::API
- Defined in:
- lib/uber/api/requests.rb
Instance Method Summary collapse
- #trip_cancel(request_id) ⇒ Object
- #trip_details(request_id) ⇒ Object
- #trip_estimate(*args) ⇒ Object
- #trip_map(request_id) ⇒ Object
- #trip_request(*args) ⇒ Object
- #trip_update(request_id, status) ⇒ Object
Instance Method Details
#trip_cancel(request_id) ⇒ Object
32 33 34 |
# File 'lib/uber/api/requests.rb', line 32 def trip_cancel(request_id) perform_with_object(:delete, "v1/requests/#{request_id}", {}, Request) end |
#trip_details(request_id) ⇒ Object
20 21 22 |
# File 'lib/uber/api/requests.rb', line 20 def trip_details(request_id) perform_with_object(:get, "v1/requests/#{request_id}", {}, Request) end |
#trip_estimate(*args) ⇒ Object
10 11 12 13 |
# File 'lib/uber/api/requests.rb', line 10 def trip_estimate(*args) arguments = Uber::Arguments.new(args) perform_with_object(:post, "v1/requests/estimate", arguments., Estimate) end |
#trip_map(request_id) ⇒ Object
24 25 26 |
# File 'lib/uber/api/requests.rb', line 24 def trip_map(request_id) perform_with_object(:get, "v1/requests/#{request_id}/map", {}, Map) end |
#trip_request(*args) ⇒ Object
15 16 17 18 |
# File 'lib/uber/api/requests.rb', line 15 def trip_request(*args) arguments = Uber::Arguments.new(args) perform_with_object(:post, "v1/requests", arguments., Request) end |
#trip_update(request_id, status) ⇒ Object
28 29 30 |
# File 'lib/uber/api/requests.rb', line 28 def trip_update(request_id, status) perform_with_object(:put, "v1/sandbox/requests/#{request_id}", {status: status}, Request) end |