sigep_web 0.2.1 → 0.2.2
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/sigep_web/request_xml_plp.rb +28 -0
- data/lib/sigep_web/version.rb +1 -1
- data/lib/sigep_web/web_service_interface_api.rb +2 -6
- data/lib/sigep_web.rb +5 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c41ec42477892fa6e4458479ca03b3585d001f5
|
4
|
+
data.tar.gz: 9ee34acb51e6a741ae296fe288f671c2d998c78a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a7413f97edb6a3911e440333e7d27f6db1be4db5aeaca4822c24bbba4e0221bc49b7a252e46294ada693a283f76468c9920b4f13e164c386522a68b580e3d8f
|
7
|
+
data.tar.gz: fd6504adb863c49eb17446a0b1d056977eae610f5172755714c985cc9df5693cba1382cb0baca7effef5c523789f21037db873cac37f84a53327f03907ed10ee
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module SigepWeb
|
2
|
+
class RequestXmlPlp < WebServiceInterfaceApi
|
3
|
+
def initialize(options = {})
|
4
|
+
@id_plp = options[:id_plp]
|
5
|
+
|
6
|
+
super()
|
7
|
+
end
|
8
|
+
|
9
|
+
def request
|
10
|
+
authenticate = SigepWeb.configuration.authenticate
|
11
|
+
|
12
|
+
begin
|
13
|
+
response = process(:solicita_xml_plp, {
|
14
|
+
idPlpMaster: @id_plp,
|
15
|
+
usuario: authenticate.user,
|
16
|
+
senha: authenticate.password
|
17
|
+
}).to_hash[:solicita_xml_plp_response][:return]
|
18
|
+
|
19
|
+
response
|
20
|
+
rescue Savon::SOAPFault => msg
|
21
|
+
{
|
22
|
+
success: false,
|
23
|
+
error: msg
|
24
|
+
}
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/sigep_web/version.rb
CHANGED
@@ -1,11 +1,7 @@
|
|
1
1
|
module SigepWeb
|
2
2
|
class WebServiceInterfaceApi
|
3
|
-
def initialize
|
4
|
-
|
5
|
-
@client = Savon.client({ wsdl: url, ssl_verify_mode: :none, encoding: options[:encoding] })
|
6
|
-
else
|
7
|
-
@client = Savon.client({ wsdl: url, ssl_verify_mode: :none })
|
8
|
-
end
|
3
|
+
def initialize
|
4
|
+
@client = Savon.client({ wsdl: url, ssl_verify_mode: :none })
|
9
5
|
end
|
10
6
|
|
11
7
|
def process(method, message)
|
data/lib/sigep_web.rb
CHANGED
@@ -19,6 +19,7 @@ require 'sigep_web/request_labels'
|
|
19
19
|
require 'sigep_web/generate_labels_digit_verifier'
|
20
20
|
require 'sigep_web/request_plp_services'
|
21
21
|
require 'sigep_web/postage_card_status'
|
22
|
+
require 'sigep_web/request_xml_plp'
|
22
23
|
require 'savon'
|
23
24
|
require 'nokogiri'
|
24
25
|
|
@@ -58,4 +59,8 @@ module SigepWeb
|
|
58
59
|
def self.postage_card_status(options = {})
|
59
60
|
PostageCardStatus.new(options)
|
60
61
|
end
|
62
|
+
|
63
|
+
def self.request_xml_plp(options = {})
|
64
|
+
RequestXmlPlp.new(options)
|
65
|
+
end
|
61
66
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sigep_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- |+
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-01-
|
13
|
+
date: 2016-01-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: savon
|
@@ -118,6 +118,7 @@ files:
|
|
118
118
|
- lib/sigep_web/postage_card_status.rb
|
119
119
|
- lib/sigep_web/request_labels.rb
|
120
120
|
- lib/sigep_web/request_plp_services.rb
|
121
|
+
- lib/sigep_web/request_xml_plp.rb
|
121
122
|
- lib/sigep_web/search_client.rb
|
122
123
|
- lib/sigep_web/service_availability.rb
|
123
124
|
- lib/sigep_web/version.rb
|