Module: Uber::API::Requests

Included in:
Uber::API
Defined in:
lib/uber/api/requests.rb

Instance Method Summary collapse

Instance Method Details

#trip_details(request_id) ⇒ Object



14
15
16
# File 'lib/uber/api/requests.rb', line 14

def trip_details(request_id)
  perform_with_object(:get, "v1/requests/#{request_id}", {}, Request)
end

#trip_map(request_id) ⇒ Object



18
19
20
# File 'lib/uber/api/requests.rb', line 18

def trip_map(request_id)
  perform_with_object(:get, "v1/requests/#{request_id}/map", {}, Map)
end

#trip_request(*args) ⇒ Object



9
10
11
12
# File 'lib/uber/api/requests.rb', line 9

def trip_request(*args)
  arguments = Uber::Arguments.new(args)
  perform_with_object(:post, "v1/requests", arguments.options, Request)
end

#trip_update(request_id, status) ⇒ Object



22
23
24
# File 'lib/uber/api/requests.rb', line 22

def trip_update(request_id, status)
  perform_with_object(:put, "v1/sandbox/requests/#{request_id}", {status: status}, Request)
end