Module: LondonCab::Api::Endpoints::Ride

Included in:
LondonCab::Api::Endpoints
Defined in:
lib/london_cab/api/endpoints/ride.rb

Instance Method Summary collapse

Instance Method Details

#ride_cancel(ride_id:) ⇒ Object



21
22
23
# File 'lib/london_cab/api/endpoints/ride.rb', line 21

def ride_cancel(ride_id:)
  post("CancelRide/#{ride_id}")['Result']['IsCanceled']
end

#ride_now(pickup_latitude:, pickup_longitude:, dropoff_latitude:, dropoff_longitude:, customer_name:, customer_phone:, customer_email:) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/london_cab/api/endpoints/ride.rb', line 5

def ride_now(pickup_latitude:,
             pickup_longitude:,
             dropoff_latitude:,
             dropoff_longitude:,
             customer_name:,
             customer_phone:,
             customer_email:)
  post('ConfirmBookNowRide', 'PickupLat'     => pickup_latitude,
                             'PickupLong'    => pickup_longitude,
                             'DropoffLat'    => dropoff_latitude,
                             'DropoffLong'   => dropoff_longitude,
                             'CustomerName'  => customer_name,
                             'CustomerPhone' => customer_phone,
                             'CustomerEmail' => customer_email)['Result']
end