zaui_zapi 0.1.7 → 0.1.9
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_xml.rb +14 -16
- data/lib/zaui.rb +0 -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: ceb13ccb4a5113a33016f6cfd417607a3d34d4fb
|
|
4
|
+
data.tar.gz: 91c94c720b602a23d3b5355b57ce70fd0cb35c96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 48bc7321a4e497895e8351251a3b0300d6600e32535b0c2f9f3661c96f7ee231a2306b8d2db10dfea512fbb4f1a5261ec5a0e96670d4cbc325457348c96c6eb3
|
|
7
|
+
data.tar.gz: fd505a11fcfd57e2aff4812350e51c9cc240eaae70fd8935c506ca2d88f4a9c750e81c5ff86898fb23af7f04e2474c3c381bfe19ef4189d162d8c78a9c1a6cfd
|
data/lib/version.rb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = '0.1.
|
|
1
|
+
VERSION = '0.1.9'
|
data/lib/zapi_xml.rb
CHANGED
|
@@ -169,31 +169,29 @@ class ZapiXML
|
|
|
169
169
|
end
|
|
170
170
|
|
|
171
171
|
def add_activity_to_cart hash: {}
|
|
172
|
-
|
|
172
|
+
for_xml = {
|
|
173
173
|
"methodName" => 'zapiAddActivityToCart',
|
|
174
174
|
"cartId" => session.cart_id,
|
|
175
175
|
"activityId" => hash[:activity_id],
|
|
176
176
|
"activityDate" => hash[:activity_date],
|
|
177
177
|
"activityEndDate" => hash[:activity_end_date],
|
|
178
|
-
"rentalStartTime" =>
|
|
179
|
-
"rentalEndTime" =>
|
|
180
|
-
"pricingOptions" =>
|
|
181
|
-
"option" => {
|
|
182
|
-
"optionId" => hash[:pricing_option_id],
|
|
183
|
-
"quantity" => hash[:pricing_option_quantity]
|
|
184
|
-
}
|
|
185
|
-
},
|
|
178
|
+
"rentalStartTime" => nil,
|
|
179
|
+
"rentalEndTime" => nil,
|
|
180
|
+
"pricingOptions" => nil,
|
|
186
181
|
"passengers" => {
|
|
187
|
-
"seniors" => hash[:seniors].to_i,
|
|
188
|
-
"adults" => hash[:adults].to_i,
|
|
189
|
-
"students" => hash[:students].to_i,
|
|
190
|
-
"children" => hash[:children].to_i,
|
|
191
|
-
"infants" => hash[:infants].to_i
|
|
192
182
|
},
|
|
193
183
|
"activityTime" => hash[:activity_time],
|
|
194
|
-
"pickupLocationId" =>
|
|
184
|
+
"pickupLocationId" => nil,
|
|
195
185
|
"dropOffLocationId" => hash[:dropoff_location_id]
|
|
196
|
-
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
for_xml['passengers']['adults'] = hash[:adults].to_i unless hash[:adults].to_i == 0
|
|
190
|
+
for_xml['passengers']['children'] = hash[:children].to_i unless hash[:children].to_i == 0
|
|
191
|
+
for_xml['passengers']['infants'] = hash[:infants].to_i unless hash[:infants].to_i == 0
|
|
192
|
+
for_xml['pickupLocationId'] = hash[:pickup_location_id].to_i unless hash[:pickup_location_id].blank?
|
|
193
|
+
|
|
194
|
+
_wrap_xml_request(for_xml)
|
|
197
195
|
end
|
|
198
196
|
|
|
199
197
|
def remove_activity_cart_item activity_id:, date: nil
|
data/lib/zaui.rb
CHANGED
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.1.
|
|
4
|
+
version: 0.1.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shane Kretzmann
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-10-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|