Module: Uber::API::Requests

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

Instance Method Summary collapse

Instance Method Details

#trip_cancel(request_id) ⇒ Object



33
34
35
# File 'lib/uber/api/requests.rb', line 33

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

#trip_details(request_id) ⇒ Object



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

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

#trip_estimate(*args) ⇒ Object



11
12
13
14
# File 'lib/uber/api/requests.rb', line 11

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

#trip_map(request_id) ⇒ Object



25
26
27
# File 'lib/uber/api/requests.rb', line 25

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

#trip_receipt(request_id) ⇒ Object Also known as: ride_receipt



37
38
39
# File 'lib/uber/api/requests.rb', line 37

def trip_receipt(request_id)
  perform_with_object(:get, "v1.2/requests/#{request_id}/receipt", {}, Receipt)
end

#trip_request(*args) ⇒ Object



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

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



29
30
31
# File 'lib/uber/api/requests.rb', line 29

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