zumata 0.0.3 → 0.0.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/zumata/client.rb +5 -3
- data/lib/zumata/version.rb +1 -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: 2161e2f108bebaf0c5c741fc399cdab134bf271e
|
|
4
|
+
data.tar.gz: 83a71789edf2881443f01677eeeb10fae5fb1619
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff9cc787c7a5cc6b3f36c45a43f510dcda4db98c4b3a656f15307a84bc6b22149e441cb319dc8ac0c4a5250f9301dc060d1a7e689673e546e57ae764fe02a24c
|
|
7
|
+
data.tar.gz: cb073063f18a070d5050d4cc2ac0b2e885aab1d47a83dd2596427ad731604a4d4fbdf5ea3160e7e1cbcf03593131a1442d516f1db26ec159b34a211d5479795a
|
data/lib/zumata/client.rb
CHANGED
|
@@ -51,14 +51,16 @@ module Zumata
|
|
|
51
51
|
|
|
52
52
|
# raise InvalidRequestError unless valid_guest_params?(guest)
|
|
53
53
|
# raise InvalidRequestError unless valid_payment_params?(payment)
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
|
|
55
|
+
api_key = opts[:api_key] || get_api_key
|
|
56
|
+
q_params = { api_key: api_key}
|
|
57
|
+
body_params = { api_key: api_key,
|
|
56
58
|
booking_key: booking_key,
|
|
57
59
|
affiliate_key: opts[:affiliate_key],
|
|
58
60
|
guest: guest,
|
|
59
61
|
payment: payment }
|
|
60
62
|
|
|
61
|
-
res = self.class.post("#{@api_url}/book", body: body_params.to_json, headers: { 'Content-Type' => 'application/json' }, timeout: @timeout)
|
|
63
|
+
res = self.class.post("#{@api_url}/book", query: q_params, body: body_params.to_json, headers: { 'Content-Type' => 'application/json' }, timeout: @timeout)
|
|
62
64
|
|
|
63
65
|
status_code = res.code.to_i
|
|
64
66
|
raise Zumata::GeneralError, res.body unless VALID_STATUS_CODES.include?(status_code)
|
data/lib/zumata/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zumata
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathan Gomez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-11-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|