directlog 0.0.4 → 0.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f42411e0a06af73f8959b7ca5e9cd81ad1c66bc
4
- data.tar.gz: ff7fc4cf45eb638be97d20b58df3d4e526e33f44
3
+ metadata.gz: 0e4a94e4bb07e89baee4c14fd0270c7cd374e37b
4
+ data.tar.gz: ee6f3b97178fbd4f57e33f9f01ff590eab9a089d
5
5
  SHA512:
6
- metadata.gz: 1def94b7255bab188034c26661bf978880b8d7ea34b079375d47563110cab4e7788abd1bb496dde395d5af2c6aee858a606c46897364db6bb362b9ab42f0e59a
7
- data.tar.gz: 2659e7eb22a718445cead418d909e2c22c9603d70eb53e4cfde5687b45709800978ec45088010b25246c47fe81b9d5c2d9fd97a4b0025f24d34fe465fd20f055
6
+ metadata.gz: 8ea314be9b0f87c22f7ac1e1e3f480d19505b8d22402a708875751c555783915c9347cfd2755f2e66622c0a832abcf353836a6e6a78e18e1cd7a0d31c06c9063
7
+ data.tar.gz: bf1f245d96e1eb709ecd97fdf8bd966e85fcb17026ad279106523b339854e29524c05fdd26847fa7c1b55738ace1ad286ef848a401ca7cfd474b28409495d62c
data/README.md CHANGED
@@ -31,6 +31,13 @@ Directlog::Freight.calculate(weight: '', zip_code_destination: '', amount: '')
31
31
  :prazoentrega=>nil}}
32
32
  ```
33
33
 
34
+ Orders
35
+
36
+ ```ruby
37
+ Directlog::Order.create!(xml)
38
+
39
+ Directlog::Order.find_by_number(xml)
40
+ ```
34
41
 
35
42
  ## Contributing
36
43
 
@@ -5,7 +5,11 @@ module Directlog
5
5
  end
6
6
 
7
7
  def self.find_by_number(*xml)
8
- call(:consulta_status_entrega, { 'xml' => xml, 'type' => 'DEFAULT'}).result[:wsdirectlog][:retorno]
8
+ call(:consulta_status_entrega, { 'xml' => xml, 'type' => 'DEFAULT'}).nresult
9
+ end
10
+
11
+ def self.get_states
12
+ call(:get_ultimos_status, {}).result[:wsdirectlog][:retorno]
9
13
  end
10
14
  end
11
15
  end
@@ -15,6 +15,10 @@ module Directlog
15
15
  @result = doc
16
16
  end
17
17
 
18
+ def nresult
19
+ xml_parser(node_response[:xml])
20
+ end
21
+
18
22
  private
19
23
 
20
24
  def doc
@@ -1,3 +1,3 @@
1
1
  module Directlog
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -29,7 +29,7 @@ http_interactions:
29
29
  X-Powered-By:
30
30
  - ASP.NET
31
31
  Date:
32
- - Mon, 03 Aug 2015 20:32:31 GMT
32
+ - Tue, 20 Oct 2015 14:59:35 GMT
33
33
  Content-Length:
34
34
  - '13962'
35
35
  X-Cache:
@@ -355,7 +355,7 @@ http_interactions:
355
355
  CiAgICA8L3dzZGw6cG9ydD4NCiAgPC93c2RsOnNlcnZpY2U+DQo8L3dzZGw6
356
356
  ZGVmaW5pdGlvbnM+
357
357
  http_version:
358
- recorded_at: Mon, 03 Aug 2015 20:32:31 GMT
358
+ recorded_at: Tue, 20 Oct 2015 15:00:45 GMT
359
359
  - request:
360
360
  method: post
361
361
  uri: http://wsdirect.directlog.com.br/dev/wsdirectlog.asmx
@@ -363,14 +363,14 @@ http_interactions:
363
363
  encoding: UTF-8
364
364
  string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
365
365
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.directlog.com.br/"
366
- xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:CalcularFrete><tns:peso></tns:peso><tns:cepDestino></tns:cepDestino><tns:valor></tns:valor><tns:login>8333</tns:login></tns:CalcularFrete></env:Body></env:Envelope>
366
+ xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:CalcularFrete><tns:peso></tns:peso><tns:cepDestino></tns:cepDestino><tns:valor></tns:valor><tns:login>8333</tns:login><tns:password>h@m@l@g5F</tns:password></tns:CalcularFrete></env:Body></env:Envelope>
367
367
  headers:
368
368
  Soapaction:
369
369
  - '"http://www.directlog.com.br/CalcularFrete"'
370
370
  Content-Type:
371
371
  - text/xml;charset=UTF-8
372
372
  Content-Length:
373
- - '425'
373
+ - '463'
374
374
  Accept-Encoding:
375
375
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
376
376
  Accept:
@@ -393,7 +393,7 @@ http_interactions:
393
393
  X-Powered-By:
394
394
  - ASP.NET
395
395
  Date:
396
- - Mon, 03 Aug 2015 20:32:31 GMT
396
+ - Tue, 20 Oct 2015 14:59:37 GMT
397
397
  Content-Length:
398
398
  - '779'
399
399
  X-Cache:
@@ -426,5 +426,5 @@ http_interactions:
426
426
  UmVzdWx0PjwvQ2FsY3VsYXJGcmV0ZVJlc3BvbnNlPjwvc29hcDpCb2R5Pjwv
427
427
  c29hcDpFbnZlbG9wZT4=
428
428
  http_version:
429
- recorded_at: Mon, 03 Aug 2015 20:32:31 GMT
429
+ recorded_at: Tue, 20 Oct 2015 15:00:48 GMT
430
430
  recorded_with: VCR 2.9.3
@@ -29,7 +29,7 @@ http_interactions:
29
29
  X-Powered-By:
30
30
  - ASP.NET
31
31
  Date:
32
- - Thu, 06 Aug 2015 20:53:53 GMT
32
+ - Tue, 20 Oct 2015 14:59:37 GMT
33
33
  Content-Length:
34
34
  - '13962'
35
35
  X-Cache:
@@ -355,7 +355,7 @@ http_interactions:
355
355
  CiAgICA8L3dzZGw6cG9ydD4NCiAgPC93c2RsOnNlcnZpY2U+DQo8L3dzZGw6
356
356
  ZGVmaW5pdGlvbnM+
357
357
  http_version:
358
- recorded_at: Thu, 06 Aug 2015 20:53:54 GMT
358
+ recorded_at: Tue, 20 Oct 2015 15:00:48 GMT
359
359
  - request:
360
360
  method: post
361
361
  uri: http://wsdirect.directlog.com.br/dev/wsdirectlog.asmx
@@ -448,7 +448,7 @@ http_interactions:
448
448
  X-Powered-By:
449
449
  - ASP.NET
450
450
  Date:
451
- - Thu, 06 Aug 2015 20:53:55 GMT
451
+ - Tue, 20 Oct 2015 15:00:03 GMT
452
452
  Content-Length:
453
453
  - '983'
454
454
  X-Cache:
@@ -465,12 +465,12 @@ http_interactions:
465
465
  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><RecebePedidosNotasResponse
466
466
  xmlns=\"http://www.directlog.com.br/\"><RecebePedidosNotasResult>&lt;?xml
467
467
  version=\"1.0\" encoding=\"ISO-8859-1\" ?&gt;\r\n&lt;wsdirectlog&gt;\r\n &lt;retorno&gt;\r\n
468
- \ &lt;protocolo&gt;38329610 &lt;/protocolo&gt;\r\n &lt;pedidos&gt;\r\n
468
+ \ &lt;protocolo&gt;39528564 &lt;/protocolo&gt;\r\n &lt;pedidos&gt;\r\n
469
469
  \ &lt;pedido&gt;\r\n &lt;numeropedido&gt;5188376&lt;/numeropedido&gt;\r\n
470
470
  \ &lt;notafiscal&gt;isupply123&lt;/notafiscal&gt;\r\n &lt;mensagens&gt;\r\n
471
471
  \ &lt;mensagem&gt;Pedido cadastrado com sucesso!&lt;/mensagem&gt;\r\n
472
472
  \ &lt;/mensagens&gt;\r\n &lt;/pedido&gt;\r\n &lt;/pedidos&gt;\r\n
473
473
  \ &lt;/retorno&gt;\r\n&lt;/wsdirectlog&gt;\r\n</RecebePedidosNotasResult></RecebePedidosNotasResponse></soap:Body></soap:Envelope>"
474
474
  http_version:
475
- recorded_at: Thu, 06 Aug 2015 20:53:55 GMT
475
+ recorded_at: Tue, 20 Oct 2015 15:01:12 GMT
476
476
  recorded_with: VCR 2.9.3
@@ -29,7 +29,7 @@ http_interactions:
29
29
  X-Powered-By:
30
30
  - ASP.NET
31
31
  Date:
32
- - Mon, 21 Sep 2015 14:04:53 GMT
32
+ - Tue, 20 Oct 2015 15:00:03 GMT
33
33
  Content-Length:
34
34
  - '13962'
35
35
  X-Cache:
@@ -39,7 +39,7 @@ http_interactions:
39
39
  Via:
40
40
  - 1.1 localhost (squid/3.3.10)
41
41
  Connection:
42
- - close
42
+ - keep-alive
43
43
  body:
44
44
  encoding: ASCII-8BIT
45
45
  string: !binary |-
@@ -355,7 +355,7 @@ http_interactions:
355
355
  CiAgICA8L3dzZGw6cG9ydD4NCiAgPC93c2RsOnNlcnZpY2U+DQo8L3dzZGw6
356
356
  ZGVmaW5pdGlvbnM+
357
357
  http_version:
358
- recorded_at: Mon, 21 Sep 2015 14:04:53 GMT
358
+ recorded_at: Tue, 20 Oct 2015 15:01:13 GMT
359
359
  - request:
360
360
  method: post
361
361
  uri: http://wsdirect.directlog.com.br/dev/wsdirectlog.asmx
@@ -397,7 +397,7 @@ http_interactions:
397
397
  X-Powered-By:
398
398
  - ASP.NET
399
399
  Date:
400
- - Mon, 21 Sep 2015 14:05:24 GMT
400
+ - Tue, 20 Oct 2015 15:00:03 GMT
401
401
  Content-Length:
402
402
  - '789'
403
403
  X-Cache:
@@ -407,7 +407,7 @@ http_interactions:
407
407
  Via:
408
408
  - 1.1 localhost (squid/3.3.10)
409
409
  Connection:
410
- - close
410
+ - keep-alive
411
411
  body:
412
412
  encoding: ASCII-8BIT
413
413
  string: !binary |-
@@ -421,7 +421,7 @@ http_interactions:
421
421
  ZmFsc2U8L0NvbnN1bHRhU3RhdHVzRW50cmVnYVJlc3VsdD48eG1sPiZsdDs/
422
422
  eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9IklTTy04ODU5LTEiID8mZ3Q7
423
423
  Jmx0O3dzZGlyZWN0bG9nJmd0Ow0KICAgICAmbHQ7cmV0b3JubyZndDsNCiAg
424
- ICAgICAgICZsdDtwcm90b2NvbG8mZ3Q7Mzg4MTk2NzUgICAgJmx0Oy9wcm90
424
+ ICAgICAgICZsdDtwcm90b2NvbG8mZ3Q7Mzk1Mjg1NjUgICAgJmx0Oy9wcm90
425
425
  b2NvbG8mZ3Q7DQogICAgICAgICAmbHQ7bWVuc2FnZW5zJmd0Ow0KICAgICAg
426
426
  ICAgICAgICZsdDttZW5zYWdlbSZndDtOw6NvIGZvaSBlbmNvbnRyYWRvIG5l
427
427
  bmh1bSBwZWRpZG8gY29tIG8ocykgcGFyYW1ldHJvKHMpIGVudmlhZG8ocyku
@@ -430,5 +430,5 @@ http_interactions:
430
430
  Ow0KPC94bWw+PC9Db25zdWx0YVN0YXR1c0VudHJlZ2FSZXNwb25zZT48L3Nv
431
431
  YXA6Qm9keT48L3NvYXA6RW52ZWxvcGU+
432
432
  http_version:
433
- recorded_at: Mon, 21 Sep 2015 14:05:25 GMT
433
+ recorded_at: Tue, 20 Oct 2015 15:01:13 GMT
434
434
  recorded_with: VCR 2.9.3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: directlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wesley Conde
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-21 00:00:00.000000000 Z
11
+ date: 2015-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon