london_cab 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d9e0d267201dedee13c90e915a83be291835d39
4
- data.tar.gz: c272bc19d38e2465d78a9b74b621338508c8ea5e
3
+ metadata.gz: a779440daaa2b8711d4859471278b5e9a351d3ef
4
+ data.tar.gz: 3cee35b5efec8c6cf320c80377bee421fe34cd09
5
5
  SHA512:
6
- metadata.gz: c7e9e2cb76dd0ef7b9322e3a520aad715317794dce7a1b95de8f6c1cd952d3aaa83e8d2da92315f7ff08bf2c9069faea4b254dbc9d07584dfd5ca8788c3f4027
7
- data.tar.gz: 7b748fc18fdbc833f2b657de37d842539d9814a23f4c5a348f8cc089a3252d43d7f0dce222091f1355f5f31ba58e551a448d11c63267582026c12d59c0b731cf
6
+ metadata.gz: 50f4c988d13dfb2175c75579c2c91b6af2765c9e77f399aaf6f924e13a3402870142f30a40c96eef921d3ffa7f82f49a720de39722912c41f623b51e4e76f9fe
7
+ data.tar.gz: 8585fb7853c6b6017f938431a87fd71b2adee57d563094ed80e381d2c8f010cdd740625efb7b3ee5066e9f05f47248cb93d56289f043fdd894f446dd9cc6d55d
data/README.md CHANGED
@@ -86,7 +86,7 @@ client.ride_request(PickupLong: '31.276942',
86
86
 
87
87
  ## History
88
88
 
89
- The structure of this gem is based on [slack-ruby-gem](https://github.com/slack-ruby/slack-ruby-client).
89
+ The structure of this gem is based on [slack-ruby-client](https://github.com/slack-ruby/slack-ruby-client).
90
90
 
91
91
  ## Development
92
92
 
@@ -0,0 +1,17 @@
1
+ module LondonCab
2
+ module Api
3
+ module Endpoints
4
+ module Request
5
+ def request_now(pickup_latitude:,
6
+ pickup_longitude:,
7
+ dropoff_latitude:,
8
+ dropoff_longitude:)
9
+ post('RequestRideNow', 'PickupLat' => pickup_latitude,
10
+ 'PickupLong' => pickup_longitude,
11
+ 'DropoffLat' => dropoff_latitude,
12
+ 'DropoffLong' => dropoff_longitude)['Result']
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -2,8 +2,24 @@ module LondonCab
2
2
  module Api
3
3
  module Endpoints
4
4
  module Ride
5
- def ride_request(options = {})
6
- post('RequestRide', options)
5
+ def ride_now(pickup_latitude:,
6
+ pickup_longitude:,
7
+ dropoff_latitude:,
8
+ dropoff_longitude:,
9
+ customer_name:,
10
+ customer_phone:,
11
+ customer_email:)
12
+ post('ConfirmBookNowRide', 'PickupLat' => pickup_latitude,
13
+ 'PickupLong' => pickup_longitude,
14
+ 'DropoffLat' => dropoff_latitude,
15
+ 'DropoffLong' => dropoff_longitude,
16
+ 'CustomerName' => customer_name,
17
+ 'CustomerPhone' => customer_phone,
18
+ 'CustomerEmail' => customer_email)['Result']
19
+ end
20
+
21
+ def ride_cancel(ride_id:)
22
+ post("CancelRide/#{ride_id}")['Result']['IsCanceled']
7
23
  end
8
24
  end
9
25
  end
@@ -1,8 +1,10 @@
1
+ require 'london_cab/api/endpoints/request'
1
2
  require 'london_cab/api/endpoints/ride'
2
3
 
3
4
  module LondonCab
4
5
  module Api
5
6
  module Endpoints
7
+ include Request
6
8
  include Ride
7
9
  end
8
10
  end
@@ -1,3 +1,3 @@
1
1
  module LondonCab
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: london_cab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramy Aboul Naga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-03 00:00:00.000000000 Z
11
+ date: 2017-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -140,6 +140,7 @@ files:
140
140
  - bin/setup
141
141
  - lib/london_cab.rb
142
142
  - lib/london_cab/api/endpoints.rb
143
+ - lib/london_cab/api/endpoints/request.rb
143
144
  - lib/london_cab/api/endpoints/ride.rb
144
145
  - lib/london_cab/api/error.rb
145
146
  - lib/london_cab/client.rb