correios-sro-xml 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.travis.yml +5 -0
- data/CHANGELOG.rdoc +3 -0
- data/README.rdoc +1 -0
- data/bin/console +14 -0
- data/lib/correios-sro-xml.rb +1 -0
- data/lib/correios/sro/object.rb +6 -0
- data/lib/correios/sro/parser.rb +2 -3
- data/lib/correios/sro/request_builder.rb +55 -0
- data/lib/correios/sro/tracker.rb +3 -3
- data/lib/correios/sro/version.rb +1 -1
- data/lib/correios/sro/web_service.rb +8 -13
- data/misc/Guia_Tecnico_Rastreamento_XML_Cliente-Versao_e-commerce_v_1.7.pdf +0 -0
- data/spec/correios/sro/parser_spec.rb +14 -19
- data/spec/correios/sro/tracker_spec.rb +7 -5
- data/spec/correios/sro/web_service_spec.rb +4 -2
- data/spec/correios/sro/xml_builder_spec.rb +51 -0
- data/spec/fixtures/cassettes/sro_found_last.yml +43 -35
- data/spec/fixtures/sro_many_objects.xml +222 -186
- data/spec/fixtures/sro_not_found.xml +17 -6
- data/spec/fixtures/sro_one_object.xml +118 -87
- metadata +18 -14
- data/spec/fixtures/sro_many_objects_international.xml +0 -110
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
OTczMTMwMmNmNTlkOTc5OTc4NmJkNDM0Y2NjYTQ5MTEyMzFlZDI2YQ==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8b4c3bd92172a23de831757bd0baa3c424c739b5
|
4
|
+
data.tar.gz: 3465ad05393df1da106d1298c5e574ee65bcb24d
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
ZjkwMjE1ZTg1ZWIyY2MwMWUzZGVkZWU2NWJlNjg3NmQyNjc1Y2FiMGE5MjY0
|
11
|
-
ZTBmOWQxOGE1NGU3N2RhMWMxMWE0ZWM4ZjJhZTVmZDU3NDgxOGQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NmNiNzhjMTYzOTVkYTE0ZjRiZDE5MWEzNjk5ZGUzZDIwM2U5NThjNzFmMDgy
|
14
|
-
ZDdhMzcxNzNkMjM5NDA0ZmUwNDkzODg5ZjgyOTM2ZWU1NjBkN2RhODEwNmI2
|
15
|
-
N2E3ODcwYzYzMzI1MGU5YjdiMWZiYjEyMGEwNjljMzNkOWJhZTA=
|
6
|
+
metadata.gz: d54c42ad7a14b7234206400cf71afa834b4d5b95ef40771d3f35d5b2345bdcae84ad1560bb1376dd027b906024746a4370a3147e8049acc65a64d7530365d356
|
7
|
+
data.tar.gz: ba68368e66770f980916f5e07c0e4663b96c9059843a7be983d2fd84df79d5d09f45360be8c1abdc1d5ade86f2aee86fbc6c3f1cfbcb6122519710e1da3d073b
|
data/.travis.yml
CHANGED
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -163,6 +163,7 @@ You can disable the log and configure other log output.
|
|
163
163
|
- {Fernando Hamasaki de Amorim (prodis)}[http://prodis.blog.br]
|
164
164
|
|
165
165
|
== Collaborators
|
166
|
+
- {Lennon Manchester (lemanchester)}[https://github.com/lemanchester]
|
166
167
|
- {Thiago Ganzarolli (tganzarolli)}[https://github.com/tganzarolli]
|
167
168
|
|
168
169
|
== Contributing to correios-sro-xml
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require 'correios-sro-xml'
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/lib/correios-sro-xml.rb
CHANGED
data/lib/correios/sro/object.rb
CHANGED
data/lib/correios/sro/parser.rb
CHANGED
@@ -5,11 +5,10 @@ module Correios
|
|
5
5
|
class Parser
|
6
6
|
def objects(xml)
|
7
7
|
objects = {}
|
8
|
-
xml.encode!("UTF-8", "ISO-8859-1")
|
9
8
|
|
10
|
-
|
11
|
-
doc.xpath("//objeto").each do |element|
|
9
|
+
Nokogiri::XML(xml).xpath("//objeto").each do |element|
|
12
10
|
object = Correios::SRO::Object.parse(element.to_xml)
|
11
|
+
return objects if object.has_error?
|
13
12
|
objects[object.number] = object
|
14
13
|
end
|
15
14
|
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Correios
|
2
|
+
module SRO
|
3
|
+
class RequestBuilder
|
4
|
+
|
5
|
+
QUERY_TYPES = { list: "L", range: "F" }.freeze
|
6
|
+
|
7
|
+
RESULT_MODES = { all: "T", last: "U" }.freeze
|
8
|
+
|
9
|
+
LANGUAGE = { pt: "101", en: "102" }.freeze
|
10
|
+
|
11
|
+
NAMESPACES = {
|
12
|
+
"xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/",
|
13
|
+
"xmlns:res" => "http://resource.webservice.correios.com.br/"
|
14
|
+
}.freeze
|
15
|
+
|
16
|
+
def initialize(tracker)
|
17
|
+
@tracker = tracker
|
18
|
+
end
|
19
|
+
|
20
|
+
def build_xml
|
21
|
+
Nokogiri::XML::Builder.new do |builder|
|
22
|
+
builder[:soapenv].Envelope(NAMESPACES) {
|
23
|
+
builder[:soapenv].Header { }
|
24
|
+
builder[:soapenv].Body {
|
25
|
+
builder[:res].buscaEventosLista() {
|
26
|
+
builder.usuario(@tracker.user) {
|
27
|
+
builder.parent.namespace = nil
|
28
|
+
}
|
29
|
+
builder.senha(@tracker.password) {
|
30
|
+
builder.parent.namespace = nil
|
31
|
+
}
|
32
|
+
builder.tipo(QUERY_TYPES[@tracker.query_type]) {
|
33
|
+
builder.parent.namespace = nil
|
34
|
+
}
|
35
|
+
builder.resultado(RESULT_MODES[@tracker.result_mode]) {
|
36
|
+
builder.parent.namespace = nil
|
37
|
+
}
|
38
|
+
builder.lingua(LANGUAGE[@tracker.language]) {
|
39
|
+
builder.parent.namespace = nil
|
40
|
+
}
|
41
|
+
@tracker.object_numbers.each do |object_number|
|
42
|
+
builder.objetos(object_number) {
|
43
|
+
builder.parent.namespace = nil
|
44
|
+
}
|
45
|
+
end
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
end.to_xml
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
data/lib/correios/sro/tracker.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
module Correios
|
2
2
|
module SRO
|
3
3
|
class Tracker
|
4
|
-
|
5
|
-
attr_accessor :query_type, :result_mode
|
4
|
+
|
5
|
+
attr_accessor :user, :password, :query_type, :result_mode, :language
|
6
6
|
attr_reader :object_numbers
|
7
7
|
|
8
|
-
DEFAULT_OPTIONS = { query_type: :list, result_mode: :last }.freeze
|
8
|
+
DEFAULT_OPTIONS = { query_type: :list, result_mode: :last, language: :pt }.freeze
|
9
9
|
|
10
10
|
def initialize(options = {})
|
11
11
|
DEFAULT_OPTIONS.merge(options).each do |attr, value|
|
data/lib/correios/sro/version.rb
CHANGED
@@ -4,9 +4,7 @@ require 'uri'
|
|
4
4
|
module Correios
|
5
5
|
module SRO
|
6
6
|
class WebService
|
7
|
-
URL = "http://
|
8
|
-
QUERY_TYPES = { list: "L", range: "F" }
|
9
|
-
RESULT_MODES = { all: "T", last: "U" }
|
7
|
+
URL = "http://webservice.correios.com.br:80/service/rastro"
|
10
8
|
|
11
9
|
def initialize(tracker)
|
12
10
|
@uri = URI.parse(URL)
|
@@ -20,9 +18,10 @@ module Correios
|
|
20
18
|
Correios::SRO.log_request request, @uri.to_s
|
21
19
|
|
22
20
|
response = http.request(request)
|
21
|
+
|
23
22
|
Correios::SRO.log_response response
|
24
23
|
|
25
|
-
response.body
|
24
|
+
response.body.force_encoding('utf-8')
|
26
25
|
end
|
27
26
|
|
28
27
|
private
|
@@ -35,18 +34,14 @@ module Correios
|
|
35
34
|
|
36
35
|
def build_request
|
37
36
|
request = Net::HTTP::Post.new(@uri.path)
|
38
|
-
request.
|
37
|
+
request.content_type = 'text/xml;charset=UTF-8'
|
38
|
+
request.add_field("Accept-Encoding", "UTF-8")
|
39
|
+
request.body = request_body
|
39
40
|
request
|
40
41
|
end
|
41
42
|
|
42
|
-
def
|
43
|
-
|
44
|
-
Usuario: @tracker.user,
|
45
|
-
Senha: @tracker.password,
|
46
|
-
Tipo: QUERY_TYPES[@tracker.query_type],
|
47
|
-
Resultado: RESULT_MODES[@tracker.result_mode],
|
48
|
-
Objetos: @tracker.object_numbers.join
|
49
|
-
}
|
43
|
+
def request_body
|
44
|
+
RequestBuilder.new(@tracker).build_xml
|
50
45
|
end
|
51
46
|
end
|
52
47
|
end
|
@@ -4,11 +4,6 @@ describe Correios::SRO::Parser do
|
|
4
4
|
describe "#objects" do
|
5
5
|
let(:xml) { Fixture.load :sro_many_objects }
|
6
6
|
|
7
|
-
it "encodes from ISO-8859-1 to UTF-8" do
|
8
|
-
expect(xml).to receive(:encode!).with("UTF-8", "ISO-8859-1")
|
9
|
-
subject.objects(xml)
|
10
|
-
end
|
11
|
-
|
12
7
|
["SI047624825BR", "SX104110463BR"].each do |number|
|
13
8
|
it "returns object number" do
|
14
9
|
objects = subject.objects(xml)
|
@@ -22,11 +17,11 @@ describe Correios::SRO::Parser do
|
|
22
17
|
{ "SI047624825BR" => {
|
23
18
|
type: "BDI",
|
24
19
|
status: "01",
|
25
|
-
date: "26/12/
|
20
|
+
date: "26/12/2016",
|
26
21
|
hour: "15:22",
|
27
|
-
description: "
|
28
|
-
receiver: "",
|
29
|
-
document: "",
|
22
|
+
description: "Objeto entregue ao destinatário",
|
23
|
+
receiver: "?",
|
24
|
+
document: "?",
|
30
25
|
comment: "?",
|
31
26
|
place: "AC CENTRAL DE SAO PAULO",
|
32
27
|
code: "01009972",
|
@@ -37,15 +32,15 @@ describe Correios::SRO::Parser do
|
|
37
32
|
"SX104110463BR" => {
|
38
33
|
type: "BDE",
|
39
34
|
status: "01",
|
40
|
-
date: "
|
41
|
-
hour: "
|
42
|
-
description: "
|
43
|
-
receiver:
|
44
|
-
document:
|
45
|
-
comment:
|
46
|
-
place: "
|
47
|
-
code: "
|
48
|
-
city: "
|
35
|
+
date: "26/12/2016",
|
36
|
+
hour: "15:22",
|
37
|
+
description: "Objeto entregue ao destinatário",
|
38
|
+
receiver: nil,
|
39
|
+
document: nil,
|
40
|
+
comment: nil,
|
41
|
+
place: "AC CENTRAL DE SAO PAULO",
|
42
|
+
code: "01009972",
|
43
|
+
city: "SAO PAULO",
|
49
44
|
state: "SP",
|
50
45
|
sto: "74654209"
|
51
46
|
},
|
@@ -65,7 +60,7 @@ describe Correios::SRO::Parser do
|
|
65
60
|
{ "SI047624825BR" => {
|
66
61
|
place: "CTE VILA MARIA",
|
67
62
|
code: "02170975",
|
68
|
-
city: "
|
63
|
+
city: "Sao Paulo",
|
69
64
|
neighborhood: "PQ NOVO MUNDO",
|
70
65
|
state: "SP"
|
71
66
|
},
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Correios::SRO::Tracker do
|
4
|
+
|
4
5
|
describe ".new" do
|
5
6
|
it "creates with default values" do
|
6
7
|
expect(subject.query_type).to eql :list
|
@@ -58,7 +59,7 @@ describe Correios::SRO::Tracker do
|
|
58
59
|
end
|
59
60
|
|
60
61
|
let(:subject) { Correios::SRO::Tracker.new(user: "PRODIS", password: "pim321") }
|
61
|
-
|
62
|
+
|
62
63
|
before { Correios::SRO::WebService.any_instance.stub(:request!).and_return(response) }
|
63
64
|
|
64
65
|
context "to many objects" do
|
@@ -84,10 +85,10 @@ describe Correios::SRO::Tracker do
|
|
84
85
|
expect(objects.size).to eql 2
|
85
86
|
|
86
87
|
expect(objects["SI047624825BR"].number).to eql "SI047624825BR"
|
87
|
-
expect(objects["SI047624825BR"].events.first.description).to eql "
|
88
|
+
expect(objects["SI047624825BR"].events.first.description).to eql "Objeto entregue ao destinatário"
|
88
89
|
|
89
90
|
expect(objects["SX104110463BR"].number).to eql "SX104110463BR"
|
90
|
-
expect(objects["SX104110463BR"].events.first.description).to eql "
|
91
|
+
expect(objects["SX104110463BR"].events.first.description).to eql "Objeto entregue ao destinatário"
|
91
92
|
end
|
92
93
|
|
93
94
|
context "when only one object found" do
|
@@ -103,7 +104,7 @@ describe Correios::SRO::Tracker do
|
|
103
104
|
|
104
105
|
expect(objects.size).to eql 1
|
105
106
|
expect(objects["SI047624825BR"].number).to eql "SI047624825BR"
|
106
|
-
expect(objects["SI047624825BR"].events.first.description).to eql "
|
107
|
+
expect(objects["SI047624825BR"].events.first.description).to eql "Objeto entregue ao destinatário"
|
107
108
|
end
|
108
109
|
|
109
110
|
it "returns nil in object not found" do
|
@@ -115,6 +116,7 @@ describe Correios::SRO::Tracker do
|
|
115
116
|
|
116
117
|
context "to one object" do
|
117
118
|
let(:response) { Fixture.load :sro_one_object }
|
119
|
+
let(:object_number) { "SI047624825BR" }
|
118
120
|
|
119
121
|
it "sets object number" do
|
120
122
|
subject.get("SI047624825BR")
|
@@ -125,7 +127,7 @@ describe Correios::SRO::Tracker do
|
|
125
127
|
it "returns only one object" do
|
126
128
|
object = subject.get("SI047624825BR")
|
127
129
|
expect(object.number).to eql "SI047624825BR"
|
128
|
-
expect(object.events.first.description).to eql "
|
130
|
+
expect(object.events.first.description).to eql "Objeto entregue ao destinatário"
|
129
131
|
end
|
130
132
|
|
131
133
|
context "when object not found" do
|
@@ -2,6 +2,8 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Correios::SRO::WebService do
|
4
4
|
describe "#request" do
|
5
|
+
let(:object_number) { "SS123456789BR" }
|
6
|
+
|
5
7
|
around do |example|
|
6
8
|
Correios::SRO.configure { |config| config.log_enabled = false }
|
7
9
|
example.run
|
@@ -10,13 +12,13 @@ describe Correios::SRO::WebService do
|
|
10
12
|
|
11
13
|
let(:tracker) do
|
12
14
|
sro = Correios::SRO::Tracker.new(user: "ECT", password: "SRO")
|
13
|
-
sro.instance_variable_set :@object_numbers, [
|
15
|
+
sro.instance_variable_set :@object_numbers, [object_number]
|
14
16
|
sro
|
15
17
|
end
|
16
18
|
let(:subject) { Correios::SRO::WebService.new(tracker) }
|
17
19
|
|
18
20
|
it "returns XML response", vcr: { cassette_name: "sro_found_last" } do
|
19
|
-
expect(subject.request!).to include("<numero
|
21
|
+
expect(subject.request!).to include("<numero>#{object_number}</numero>")
|
20
22
|
end
|
21
23
|
end
|
22
24
|
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Correios::SRO::RequestBuilder do
|
4
|
+
|
5
|
+
describe ".build_xml" do
|
6
|
+
|
7
|
+
let(:subject) { described_class.new(tracker).build_xml }
|
8
|
+
|
9
|
+
context "given one tracking object" do
|
10
|
+
let(:tracker) do
|
11
|
+
sro = Correios::SRO::Tracker.new(user: "EXT", password: "APQ",
|
12
|
+
query_type: :list,
|
13
|
+
result_mode: :all
|
14
|
+
)
|
15
|
+
sro.instance_variable_set :@object_numbers, ["SS123456789BR"]
|
16
|
+
sro
|
17
|
+
end
|
18
|
+
|
19
|
+
it { expect(subject).to include("<usuario>EXT</usuario>") }
|
20
|
+
it { expect(subject).to include("<senha>APQ</senha>") }
|
21
|
+
it { expect(subject).to include("<tipo>L</tipo>") }
|
22
|
+
it { expect(subject).to include("<resultado>T</resultado>") }
|
23
|
+
it { expect(subject).to include("<lingua>101</lingua>") }
|
24
|
+
it { expect(subject).to include("<objetos>SS123456789BR</objetos>") }
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
context "given more than one tracking object" do
|
29
|
+
let(:tracker) do
|
30
|
+
sro = Correios::SRO::Tracker.new(user: "ECT", password: "SRO",
|
31
|
+
language: :en,
|
32
|
+
query_type: :range,
|
33
|
+
result_mode: :last
|
34
|
+
)
|
35
|
+
sro.instance_variable_set :@object_numbers, ["SS123456730BR", "SS12345650BR"]
|
36
|
+
sro
|
37
|
+
end
|
38
|
+
|
39
|
+
it { expect(subject).to include("<usuario>ECT</usuario>") }
|
40
|
+
it { expect(subject).to include("<senha>SRO</senha>") }
|
41
|
+
it { expect(subject).to include("<tipo>F</tipo>") }
|
42
|
+
it { expect(subject).to include("<resultado>U</resultado>") }
|
43
|
+
it { expect(subject).to include("<lingua>102</lingua>") }
|
44
|
+
it { expect(subject).to include("<objetos>SS123456730BR</objetos>") }
|
45
|
+
it { expect(subject).to include("<objetos>SS12345650BR</objetos>") }
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
@@ -2,10 +2,24 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: http://
|
5
|
+
uri: http://webservice.correios.com.br/service/rastro
|
6
6
|
body:
|
7
|
-
encoding:
|
8
|
-
string:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: |
|
9
|
+
<?xml version="1.0"?>
|
10
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:res="http://resource.webservice.correios.com.br/">
|
11
|
+
<soapenv:Header/>
|
12
|
+
<soapenv:Body>
|
13
|
+
<res:buscaEventosLista>
|
14
|
+
<usuario>ECT</usuario>
|
15
|
+
<senha>SRO</senha>
|
16
|
+
<tipo>L</tipo>
|
17
|
+
<resultado>U</resultado>
|
18
|
+
<lingua>101</lingua>
|
19
|
+
<objetos>SS123456789BR</objetos>
|
20
|
+
</res:buscaEventosLista>
|
21
|
+
</soapenv:Body>
|
22
|
+
</soapenv:Envelope>
|
9
23
|
headers:
|
10
24
|
Accept-Encoding:
|
11
25
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
@@ -14,44 +28,38 @@ http_interactions:
|
|
14
28
|
User-Agent:
|
15
29
|
- Ruby
|
16
30
|
Content-Type:
|
17
|
-
-
|
31
|
+
- text/xml
|
18
32
|
response:
|
19
33
|
status:
|
20
34
|
code: 200
|
21
35
|
message: OK
|
22
36
|
headers:
|
23
37
|
Date:
|
24
|
-
- Mon,
|
25
|
-
|
26
|
-
-
|
38
|
+
- Mon, 27 Jun 2016 13:10:36 GMT
|
39
|
+
X-Powered-By:
|
40
|
+
- Servlet/3.0
|
41
|
+
X-Opnet-Transaction-Trace:
|
42
|
+
- a2_05669c39-8570-4f65-b8b8-3c2c86883d68
|
27
43
|
Content-Length:
|
28
|
-
- '
|
44
|
+
- '1093'
|
45
|
+
Set-Cookie:
|
46
|
+
- _op_aixPageId=a2_05669c39-8570-4f65-b8b8-3c2c86883d68; Path=/
|
47
|
+
Expires:
|
48
|
+
- Thu, 01 Dec 1994 16:00:00 GMT
|
49
|
+
Cache-Control:
|
50
|
+
- no-cache="set-cookie, set-cookie2"
|
29
51
|
Content-Type:
|
30
|
-
- text/
|
31
|
-
|
32
|
-
-
|
52
|
+
- text/xml; charset=UTF-8
|
53
|
+
Content-Language:
|
54
|
+
- pt-BR
|
33
55
|
body:
|
34
|
-
encoding:
|
35
|
-
string:
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
aG9yYT4xMzo0ODwvaG9yYT4KICAgICAgICAgIDxkZXNjcmljYW8+RW5jYW1p
|
45
|
-
bmhhZG88L2Rlc2NyaWNhbz4KICAgICAgICAgIDxsb2NhbD5MQUJPUkFUT1JJ
|
46
|
-
TzAxLVNST0lJL0NFPC9sb2NhbD4KICAgICAgICAgIDxjb2RpZ28+NjAwMDA5
|
47
|
-
MDE8L2NvZGlnbz4KICAgICAgICAgIDxjaWRhZGU+Rk9SVEFMRVpBPC9jaWRh
|
48
|
-
ZGU+CiAgICAgICAgICA8dWY+Q0U8L3VmPgogICAgICAgICAgPHN0bz45OTk5
|
49
|
-
OTk5OTwvc3RvPgogICAgICAgPGRlc3Rpbm8+CiAgICAgICAgICA8bG9jYWw+
|
50
|
-
TEFCT1JBVE9SSU8wMi1TUk9JSS9DRTwvbG9jYWw+CiAgICAgICAgICA8Y29k
|
51
|
-
aWdvPjYwMDAwOTAyPC9jb2RpZ28+CiAgICAgICAgICA8Y2lkYWRlPkZPUlRB
|
52
|
-
TEVaQTwvY2lkYWRlPgogICAgICAgICAgPGJhaXJybz5BTERFT1RBPC9iYWly
|
53
|
-
cm8+CiAgICAgICAgICA8dWY+Q0U8L3VmPgogICAgICAgPC9kZXN0aW5vPgog
|
54
|
-
ICAgICA8L2V2ZW50bz4KICAgICA8L29iamV0bz4KPC9zcm94bWw+Cg==
|
55
|
-
http_version:
|
56
|
-
recorded_at: Mon, 24 Feb 2014 01:12:40 GMT
|
57
|
-
recorded_with: VCR 2.8.0
|
56
|
+
encoding: UTF-8
|
57
|
+
string: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><X-OPNET-Transaction-Trace:X-OPNET-Transaction-Trace
|
58
|
+
xmlns:X-OPNET-Transaction-Trace="http://opnet.com">pid=135270,requestid=0ba77bf1a686bb8ac2d2956daab521c191713276963afdd8</X-OPNET-Transaction-Trace:X-OPNET-Transaction-Trace></soapenv:Header><soapenv:Body><ns2:buscaEventosListaResponse
|
59
|
+
xmlns:ns2="http://resource.webservice.correios.com.br/"><return><versao>2.0</versao><qtd>1</qtd><objeto><numero>SS123456789BR</numero><sigla>DG</sigla><nome>ENCOMENDA
|
60
|
+
SEDEX (ETIQ LOGICA)</nome><categoria>SEDEX</categoria><evento><tipo>RO</tipo><status>01</status><data>25/06/2016</data><hora>08:54</hora><descricao>Objeto
|
61
|
+
encaminhado </descricao><local>CDD JOAO MONLEVADE</local><codigo>35930971</codigo><cidade>Joao
|
62
|
+
Monlevade</cidade><uf>MG</uf><destino><local>AC ALVINOPOLIS</local><codigo>35950970</codigo><cidade>Alvinopolis</cidade><bairro>Centro</bairro><uf>MG</uf></destino></evento></objeto></return></ns2:buscaEventosListaResponse></soapenv:Body></soapenv:Envelope>
|
63
|
+
http_version:
|
64
|
+
recorded_at: Mon, 27 Jun 2016 13:10:38 GMT
|
65
|
+
recorded_with: VCR 2.9.3
|