zaui_zapi 0.2.1 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/version.rb +1 -1
- data/lib/zapi_agent.rb +5 -0
- data/lib/zapi_xml.rb +10 -2
- data/lib/zaui.rb +8 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18b6cb66e22ec9fca359ba12c411a167230e1ee4
|
4
|
+
data.tar.gz: 7dbedaa8ec489d1ed8a4de6d0f24e7ed479dad9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b2f75d67852783db6345f3006d483bae07d813fef8a83faf1fe80e3f77e4d6dfe41458429308d298fa537de480d8643c7e1cb4b7b1611ab54b071f75edf0527
|
7
|
+
data.tar.gz: c5c35e66dc9420f499b6af0159ad73a57b482f615ffd591c70e5cbbb00cbd784a5e8131a1391e6756a6810a1f95d0201e375008c7cfd82f91680d04339750a40
|
data/lib/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VERSION = '0.2.
|
1
|
+
VERSION = '0.2.4'
|
data/lib/zapi_agent.rb
CHANGED
data/lib/zapi_xml.rb
CHANGED
@@ -13,6 +13,14 @@ class ZapiXML
|
|
13
13
|
)
|
14
14
|
end
|
15
15
|
|
16
|
+
def agents_get_profile agent_id:, agent_hash:
|
17
|
+
_wrap_xml_request({
|
18
|
+
"methodName" => 'zapiAgents_GetProfile',
|
19
|
+
"agentID" => agent_id,
|
20
|
+
'agentHashKey' => agent_hash
|
21
|
+
})
|
22
|
+
end
|
23
|
+
|
16
24
|
def mobile_login username:, password:
|
17
25
|
_wrap_xml_request(
|
18
26
|
{ "methodName" => 'zapiMobileLogin' },
|
@@ -181,8 +189,8 @@ class ZapiXML
|
|
181
189
|
"activityId" => hash[:activity_id],
|
182
190
|
"activityDate" => hash[:activity_date],
|
183
191
|
"activityEndDate" => hash[:activity_end_date],
|
184
|
-
"rentalStartTime" =>
|
185
|
-
"rentalEndTime" =>
|
192
|
+
"rentalStartTime" => hash[:rental_start_time],
|
193
|
+
"rentalEndTime" => hash[:rental_end_time],
|
186
194
|
"pricingOptions" => nil,
|
187
195
|
"passengers" => {
|
188
196
|
},
|
data/lib/zaui.rb
CHANGED
@@ -8,6 +8,10 @@ class Zaui
|
|
8
8
|
@responder = responder || ZapiObject
|
9
9
|
end
|
10
10
|
|
11
|
+
def agents_get_profile agent_id:, agent_hash:
|
12
|
+
raw = _zapi(xml.agents_get_profile(agent_id: agent_id, agent_hash: agent_hash))
|
13
|
+
end
|
14
|
+
|
11
15
|
def get_products
|
12
16
|
raw = _zapi(xml.get_activity_and_product_catalog).try(:[],'products').try(:[],'product')
|
13
17
|
end
|
@@ -40,13 +44,16 @@ class Zaui
|
|
40
44
|
raw = _zapi(xml.get_activity_details_by_activity_id(id, date: date)).try(:[],'activity')
|
41
45
|
end
|
42
46
|
|
43
|
-
def add_activity_to_cart id:, date:, passengers: {adults: 0, children: 0, infants: 0}, pickup_location_id: nil
|
47
|
+
def add_activity_to_cart id:, date:, end_date:, passengers: {adults: 0, children: 0, infants: 0}, pickup_location_id: nil, rental: {start_time: nil, end_time: nil}
|
44
48
|
hash = {
|
45
49
|
activity_id: id,
|
46
50
|
activity_date: date,
|
51
|
+
activity_end_date: end_date,
|
47
52
|
adults: passengers[:adults],
|
48
53
|
children: passengers[:children],
|
49
54
|
infants: passengers[:infants],
|
55
|
+
rental_start_time: rental[:start_time],
|
56
|
+
rental_end_time: rental[:end_time],
|
50
57
|
pickup_location_id: pickup_location_id
|
51
58
|
}
|
52
59
|
raw = _zapi(xml.add_activity_to_cart(hash: hash))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zaui_zapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Kretzmann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|