cobro_digital 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cobro_digital.rb +18 -2
- data/lib/cobro_digital/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72af0ffb1e9e86abfb1b0c7aaad4cdd8538cef934b9c862ebae09a05a8b71714
|
4
|
+
data.tar.gz: 282710fc8dc2e695f9193a5e41e8e10afc601c6d7b9f813b3d30fe243041e9e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d1f2e2e2bac08d734eb8a4adb12a1bf4edba60943d4889a9a62485c56ee5d4e4942743b7606689d596557cb31f7efc2499e93359017ddfdca87b084d1b769d8
|
7
|
+
data.tar.gz: 8866ce3a1f5b9f0097d0235166edf71ed923d6c8ada6bf15fe3c1567741cf8091cd07d0525c8a476369b791a167edfc39c2ceae2518d1ba334a5ec138927d46e
|
data/lib/cobro_digital.rb
CHANGED
@@ -16,6 +16,7 @@ module CobroDigital
|
|
16
16
|
CLIENTS = [SOAP, HTTPS]
|
17
17
|
URI = 'https://www.cobrodigital.com:14365/ws3/'
|
18
18
|
WSDL = 'https://www.cobrodigital.com:14365/ws3/?wsdl'
|
19
|
+
TIMEOUT = 300
|
19
20
|
|
20
21
|
module Https
|
21
22
|
POST = 'Post'
|
@@ -39,10 +40,17 @@ module CobroDigital
|
|
39
40
|
end
|
40
41
|
|
41
42
|
def soap_client(params)
|
42
|
-
client = Savon.client(
|
43
|
+
client = Savon.client(
|
44
|
+
wsdl: CobroDigital::WSDL,
|
45
|
+
log_level: :debug,
|
46
|
+
pretty_print_xml: true,
|
47
|
+
open_timeout: CobroDigital::TIMEOUT,
|
48
|
+
read_timeout: CobroDigital::TIMEOUT
|
49
|
+
)
|
43
50
|
operation = client.operation(:webservice_cobrodigital)
|
44
51
|
request = operation.build(message: { 'parametros_de_entrada' => params.to_json })
|
45
52
|
@request_xml = request.pretty
|
53
|
+
|
46
54
|
client.call(:webservice_cobrodigital, message: { 'parametros_de_entrada' => params.to_json })
|
47
55
|
end
|
48
56
|
|
@@ -57,7 +65,15 @@ module CobroDigital
|
|
57
65
|
req = "Net::HTTP::#{http_method}".constantize.new(uri)
|
58
66
|
end
|
59
67
|
|
60
|
-
Net::HTTP.start(
|
68
|
+
Net::HTTP.start(
|
69
|
+
uri.hostname,
|
70
|
+
uri.port,
|
71
|
+
use_ssl: uri.scheme == CobroDigital::HTTPS,
|
72
|
+
open_timeout: CobroDigital::TIMEOUT,
|
73
|
+
read_timeout: CobroDigital::TIMEOUT
|
74
|
+
) do |http|
|
75
|
+
http.request(req)
|
76
|
+
end
|
61
77
|
end
|
62
78
|
|
63
79
|
def call(request)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cobro_digital
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- g.edera
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
156
|
rubyforge_project:
|
157
|
-
rubygems_version: 2.7.
|
157
|
+
rubygems_version: 2.7.7
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: Adaptador CobroDigital
|