parsec_client 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parsec/request/base.rb +4 -8
- data/lib/parsec/request/order.rb +0 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54bdb65b9781cf6257d6d994ad99a9ae9b3831093c5e473baa663cac43a8293a
|
4
|
+
data.tar.gz: 419a20db82910f817f1eacfcfcc73899feae88703feac0bfb8bc42efcd0d4ed5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eab31b3599574e562b769980505dc79e9850500d7e00612a27577eb4a561da788f86a9a9d374c0d9029410dce657cab6cb3afb923aa071e25f070514ee0851e
|
7
|
+
data.tar.gz: af69156f6d44b15d23fb148a28fadcd3b611fdd52d153601782e99cf3095b681b1ade6092dec6c320504d2ed8616ff80199122024fbe4f8350552b83ccc39d91
|
data/lib/parsec/request/base.rb
CHANGED
@@ -24,7 +24,7 @@ module Parsec
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def client(endpoint)
|
27
|
-
Savon.client endpoint: "#{
|
27
|
+
Savon.client endpoint: "#{ParsecClient.configuration.host}/NewAvailabilityServlet/#{RESOURCES[endpoint]}",
|
28
28
|
namespace: NAMESPACE,
|
29
29
|
convert_request_keys_to: :camelcase,
|
30
30
|
soap_header: security_tag
|
@@ -48,19 +48,15 @@ module Parsec
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def username
|
51
|
-
@integration&.parsec_username.presence ||
|
51
|
+
@integration&.parsec_username.presence || ParsecClient.configuration.username
|
52
52
|
end
|
53
53
|
|
54
54
|
def password
|
55
|
-
@integration&.parsec_password.presence ||
|
55
|
+
@integration&.parsec_password.presence || ParsecClient.configuration.password
|
56
56
|
end
|
57
57
|
|
58
58
|
def context
|
59
|
-
|
60
|
-
end
|
61
|
-
|
62
|
-
def logger
|
63
|
-
@my_logger ||= Logger.new("#{Rails.root}/log/parsec.log")
|
59
|
+
ParsecClient.configuration.context
|
64
60
|
end
|
65
61
|
end
|
66
62
|
end
|
data/lib/parsec/request/order.rb
CHANGED
@@ -72,8 +72,6 @@ module Parsec
|
|
72
72
|
response = client(:reservation).call('OTA_HotelResRQ', attributes: attributes, message: message)
|
73
73
|
if type == 'Booking'
|
74
74
|
request = client(:reservation).build_request('OTA_HotelResRQ', attributes: attributes, message: message)
|
75
|
-
logger.info('BOOKING REQUEST') { request }
|
76
|
-
logger.info('BOOKING RESPONSE') { response.http.body }
|
77
75
|
end
|
78
76
|
|
79
77
|
response.body
|
@@ -87,8 +85,6 @@ module Parsec
|
|
87
85
|
response = client(:cancel).call('OTA_CancelRQ', attributes: attributes, message: message)
|
88
86
|
if type == 'Cancel'
|
89
87
|
request = client(:reservation).build_request('OTA_HotelResRQ', attributes: attributes, message: message)
|
90
|
-
logger.info('CANCEL REQUEST') { request }
|
91
|
-
logger.info('CANCEL RESPONSE') { response.http.body }
|
92
88
|
end
|
93
89
|
|
94
90
|
response.body
|