tinyerp_ruby 0.4.4 → 0.4.6
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 +5 -13
- data/README.md +1 -1
- data/lib/tinyerp_ruby/poster.rb +6 -2
- data/lib/tinyerp_ruby/version.rb +1 -1
- data/spec/support/vcr/TinyerpRuby_Poster/_call/output_a_hash.yml +12 -11
- data/spec/support/vcr/TinyerpRuby_Poster/_call/output_keys_as_symbols.yml +12 -11
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_alterar_contato_service_as_a_valid_service.yml +15 -16
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_alterar_contato_xml_as_a_valid_service.yml +39 -67
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_alterar_grupo_tag_service_as_a_valid_service.yml +34 -65
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_alterar_grupo_tag_xml_as_a_valid_service.yml +39 -67
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_alterar_produto_service_as_a_valid_service.yml +13 -16
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_alterar_produto_xml_as_a_valid_service.yml +65 -37
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_alterar_tag_service_as_a_valid_service.yml +34 -65
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_alterar_tag_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_gerar_ordem_produca_pedido_service_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_contato_service_as_a_valid_service.yml +13 -16
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_contato_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_contrato_service_as_a_valid_service.yml +15 -16
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_contrato_xml_as_a_valid_service.yml +10 -10
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_grupo_tag_service_as_a_valid_service.yml +13 -16
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_grupo_tag_xml_as_a_valid_service.yml +65 -37
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_nota_fiscal_service_as_a_valid_service.yml +16 -16
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_nota_fiscal_xml_as_a_valid_service.yml +10 -10
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_nota_servico_service_as_a_valid_service.yml +17 -16
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_nota_servico_xml_as_a_valid_service.yml +37 -65
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_pedido_service_as_a_valid_service.yml +15 -16
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_pedido_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_produto_service_as_a_valid_service.yml +15 -16
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_produto_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_tag_service_as_a_valid_service.yml +34 -65
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_incluir_tag_xml_as_a_valid_service.yml +37 -65
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_lista_atualizacoes_estoque_service_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_lista_atualizacoes_estoque_xml_as_a_valid_service.yml +19 -19
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_lista_atualizacoes_produtos_service_as_a_valid_service.yml +36 -66
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_lista_atualizacoes_produtos_xml_as_a_valid_service.yml +19 -18
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_contato_service_as_a_valid_service.yml +36 -64
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_contato_xml_as_a_valid_service.yml +35 -65
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_contrato_service_as_a_valid_service.yml +35 -64
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_contrato_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_estoque_produto_service_as_a_valid_service.yml +35 -66
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_estoque_produto_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_estrutura_produto_service_as_a_valid_service.yml +35 -66
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_estrutura_produto_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_nota_fiscal_service_as_a_valid_service.yml +35 -65
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_nota_fiscal_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_nota_servico_service_as_a_valid_service.yml +36 -64
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_nota_servico_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_pedido_service_as_a_valid_service.yml +36 -64
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_pedido_xml_as_a_valid_service.yml +18 -17
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_produto_service_as_a_valid_service.yml +36 -64
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_produto_xml_as_a_valid_service.yml +17 -18
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_tags_produto_service_as_a_valid_service.yml +35 -66
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_tags_produto_xml_as_a_valid_service.yml +18 -17
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_obter_xml_nota_fiscal_as_a_valid_service.yml +15 -16
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_contatos_service_as_a_valid_service.yml +37 -66
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_contatos_xml_as_a_valid_service.yml +36 -65
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_contratos_service_as_a_valid_service.yml +17 -19
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_contratos_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_grupos_tag_service_as_a_valid_service.yml +35 -64
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_grupos_tag_xml_as_a_valid_service.yml +17 -18
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_notas_fiscais_service_as_a_valid_service.yml +18 -19
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_notas_fiscais_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_notas_servico_service_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_notas_servico_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_pedidos_service_as_a_valid_service.yml +19 -17
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_pedidos_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_produtos_service_as_a_valid_service.yml +35 -66
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_produtos_xml_as_a_valid_service.yml +8 -8
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_tag_service_as_a_valid_service.yml +17 -18
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_tag_xml_as_a_valid_service.yml +20 -19
- data/spec/support/vcr/TinyerpRuby_Service/accepts/_pesquisar_vendedores_service_as_a_valid_service.yml +35 -66
- data/spec/tinyerp_ruby/service_spec.rb +5 -4
- metadata +14 -16
- data/spec/support/vcr/TinyerpRuby_Service/accepts/poster_post.yml +0 -1582
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
data.tar.gz: !binary |-
|
|
6
|
-
NGU1MTlkNzQ0OWY0MWI4OGZjMjg4NGIxNGE0N2M1ZWRmMzIxMjllZQ==
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 1bcfeb3fd10e99be0c5e90ba9661f8cb27e163c8
|
|
4
|
+
data.tar.gz: b7d0ed9e5b1a399f9f83440d4a1298b1f283b124
|
|
7
5
|
SHA512:
|
|
8
|
-
metadata.gz:
|
|
9
|
-
|
|
10
|
-
YTMzZjdhNTRmMjEyNDhmZjMzMmRkYTFjNjU0NjZjZDlmMzEwNTI3OGFkMjQw
|
|
11
|
-
ZDFiZmVjYzIyM2FmMDM5YjlhMGRlZTM2NzQ2MjA1OGJkMDMwNmU=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
MWEwNmVlYzc0ZTJhZWY3MTQ2MThjMDU3ZWU5MDQ1ZTEzNWFkNjU2MTgwYjk4
|
|
14
|
-
MjkxYjBkZWRhY2FhMWY0MTU5NmVkOGRkNDZkNmY3OGUyMmYxNWU4OTE5ZmI3
|
|
15
|
-
MDk0MWMzYTZkYmExNTZlZjhkMzNjMTVhNWU3MTA0ZjZjMmE3YTk=
|
|
6
|
+
metadata.gz: 92d32c4794a5083e0216f630e647785a9c8b9015c2c299ba7f34029fc24982169d1ad63c168d20cad641104e05d005e89e7e9c7e8d8c0076de4d186b8b076506
|
|
7
|
+
data.tar.gz: 7532b5c52dd14e8f8faaf14052d0312a38ac5e90c023f3c049ce54ea0fd4e86fc1627f29140bbc4e3dcd4b72ee7cd23298271fc861aff780555e0d2b79341469
|
data/README.md
CHANGED
|
@@ -37,7 +37,7 @@ Then we create a service object.
|
|
|
37
37
|
|
|
38
38
|
poster = TinyerpRuby::Service.new connection
|
|
39
39
|
|
|
40
|
-
With service object created we just need to call the api methods and pass a hash according api description. Keep note that you must pass a hash of size one, where the key is the symbol with the parameter according to Tiny API and the value is
|
|
40
|
+
With service object created we just need to call the api methods and pass a hash according api description. Keep note that you must pass a hash of size one, where the key is the symbol with the parameter according to Tiny API and the value is an hash formatted according to Tiny API too or a string for api calls that uses only one param.
|
|
41
41
|
|
|
42
42
|
params = {....}
|
|
43
43
|
return_params = poster.pesquisar_vendedores_service(id: params)
|
data/lib/tinyerp_ruby/poster.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
#encoding: utf-8
|
|
2
|
+
|
|
1
3
|
require 'savon'
|
|
2
4
|
|
|
3
5
|
module TinyerpRuby
|
|
@@ -7,7 +9,7 @@ module TinyerpRuby
|
|
|
7
9
|
|
|
8
10
|
def call(connection, service, params)
|
|
9
11
|
@connection = connection
|
|
10
|
-
webservice = Savon.client(wsdl: @connection.base_url, convert_request_keys_to: :none)
|
|
12
|
+
webservice = Savon.client(wsdl: @connection.base_url, convert_request_keys_to: :none, filters: [:token])
|
|
11
13
|
response = webservice.call(service, message: formatted_params(params))
|
|
12
14
|
parse service, response
|
|
13
15
|
end
|
|
@@ -15,9 +17,11 @@ module TinyerpRuby
|
|
|
15
17
|
private
|
|
16
18
|
def formatted_params(params)
|
|
17
19
|
params = params.first
|
|
20
|
+
param_value = params.last.kind_of?(Hash) ? params.last.to_json : params.last
|
|
21
|
+
|
|
18
22
|
formatted = { token: @connection.api_key }
|
|
19
23
|
formatted.delete(:formato)
|
|
20
|
-
formatted.merge!({params.first =>
|
|
24
|
+
formatted.merge!({params.first => param_value})
|
|
21
25
|
formatted.merge!({formato: 'json'})
|
|
22
26
|
formatted
|
|
23
27
|
end
|
data/lib/tinyerp_ruby/version.rb
CHANGED
|
@@ -21,7 +21,7 @@ http_interactions:
|
|
|
21
21
|
Content-Type:
|
|
22
22
|
- text/xml; charset=ISO-8859-1
|
|
23
23
|
Date:
|
|
24
|
-
- Tue, 08 Apr 2014
|
|
24
|
+
- Tue, 08 Apr 2014 13:46:18 GMT
|
|
25
25
|
Expires:
|
|
26
26
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
|
27
27
|
Pragma:
|
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
|
29
29
|
Server:
|
|
30
30
|
- Apache/2.2.25 (Amazon)
|
|
31
31
|
Set-Cookie:
|
|
32
|
-
- PHPSESSID=
|
|
32
|
+
- PHPSESSID=ch4th08aauugfcam4bvs40u1koq37e2k; path=/
|
|
33
33
|
X-Powered-By:
|
|
34
34
|
- PHP/5.3.27
|
|
35
35
|
Transfer-Encoding:
|
|
@@ -1494,7 +1494,7 @@ http_interactions:
|
|
|
1494
1494
|
aW9uPSJodHRwOi8vd3d3LnRpbnkuY29tLmJyL2FwaTIucGhwIi8+CiAgPC9w
|
|
1495
1495
|
b3J0Pgo8L3NlcnZpY2U+CjwvZGVmaW5pdGlvbnM+
|
|
1496
1496
|
http_version:
|
|
1497
|
-
recorded_at: Tue, 08 Apr 2014
|
|
1497
|
+
recorded_at: Tue, 08 Apr 2014 13:46:18 GMT
|
|
1498
1498
|
- request:
|
|
1499
1499
|
method: post
|
|
1500
1500
|
uri: http://www.tiny.com.br/api2.php
|
|
@@ -1502,14 +1502,14 @@ http_interactions:
|
|
|
1502
1502
|
encoding: US-ASCII
|
|
1503
1503
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
1504
1504
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="urn:tinywsdl"
|
|
1505
|
-
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:obterContatoXML><token><APIKEY></token><id
|
|
1505
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:obterContatoXML><token><APIKEY></token><id>"1234"</id><formato>json</formato></tns:obterContatoXML></env:Body></env:Envelope>
|
|
1506
1506
|
headers:
|
|
1507
1507
|
Soapaction:
|
|
1508
1508
|
- ! '"urn:tinywsdl#obterContatoXML"'
|
|
1509
1509
|
Content-Type:
|
|
1510
1510
|
- text/xml;charset=UTF-8
|
|
1511
1511
|
Content-Length:
|
|
1512
|
-
- '
|
|
1512
|
+
- '412'
|
|
1513
1513
|
Accept:
|
|
1514
1514
|
- ! '*/*'
|
|
1515
1515
|
User-Agent:
|
|
@@ -1524,7 +1524,7 @@ http_interactions:
|
|
|
1524
1524
|
Content-Type:
|
|
1525
1525
|
- text/xml; charset=UTF-8
|
|
1526
1526
|
Date:
|
|
1527
|
-
- Tue, 08 Apr 2014
|
|
1527
|
+
- Tue, 08 Apr 2014 13:46:18 GMT
|
|
1528
1528
|
Expires:
|
|
1529
1529
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
|
1530
1530
|
Pragma:
|
|
@@ -1532,13 +1532,13 @@ http_interactions:
|
|
|
1532
1532
|
Server:
|
|
1533
1533
|
- Apache/2.2.25 (Amazon)
|
|
1534
1534
|
Set-Cookie:
|
|
1535
|
-
- PHPSESSID=
|
|
1535
|
+
- PHPSESSID=2kmkta7k0311vteiiich4cfbip3221cq; path=/
|
|
1536
1536
|
X-Powered-By:
|
|
1537
1537
|
- PHP/5.3.27
|
|
1538
1538
|
X-Soap-Server:
|
|
1539
1539
|
- NuSOAP/0.9.5 (1.1)
|
|
1540
1540
|
Content-Length:
|
|
1541
|
-
- '
|
|
1541
|
+
- '794'
|
|
1542
1542
|
Connection:
|
|
1543
1543
|
- keep-alive
|
|
1544
1544
|
body:
|
|
@@ -1546,8 +1546,9 @@ http_interactions:
|
|
|
1546
1546
|
string: <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
|
1547
1547
|
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
1548
1548
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:obterContatoXMLResponse
|
|
1549
|
-
xmlns:ns1="urn:tinywsdl"><return xsi:type="xsd:string">{"retorno":{"status_processamento"
|
|
1550
|
-
|
|
1549
|
+
xmlns:ns1="urn:tinywsdl"><return xsi:type="xsd:string">{"retorno":{"status_processamento":1,"status":"Erro","codigo_erro":"6","erros":{"erro":"API
|
|
1550
|
+
Bloqueada - Excedido o n\u00famero de acessos a API, aguarde alguns minutos
|
|
1551
|
+
e tente novamente"}}}</return></ns1:obterContatoXMLResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
|
1551
1552
|
http_version:
|
|
1552
|
-
recorded_at: Tue, 08 Apr 2014
|
|
1553
|
+
recorded_at: Tue, 08 Apr 2014 13:46:19 GMT
|
|
1553
1554
|
recorded_with: VCR 2.9.0
|
|
@@ -21,7 +21,7 @@ http_interactions:
|
|
|
21
21
|
Content-Type:
|
|
22
22
|
- text/xml; charset=ISO-8859-1
|
|
23
23
|
Date:
|
|
24
|
-
- Tue, 08 Apr 2014
|
|
24
|
+
- Tue, 08 Apr 2014 13:46:19 GMT
|
|
25
25
|
Expires:
|
|
26
26
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
|
27
27
|
Pragma:
|
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
|
29
29
|
Server:
|
|
30
30
|
- Apache/2.2.25 (Amazon)
|
|
31
31
|
Set-Cookie:
|
|
32
|
-
- PHPSESSID=
|
|
32
|
+
- PHPSESSID=a34qrashpqoacgltgmbcq5gt821comm8; path=/
|
|
33
33
|
X-Powered-By:
|
|
34
34
|
- PHP/5.3.27
|
|
35
35
|
Transfer-Encoding:
|
|
@@ -1494,7 +1494,7 @@ http_interactions:
|
|
|
1494
1494
|
aW9uPSJodHRwOi8vd3d3LnRpbnkuY29tLmJyL2FwaTIucGhwIi8+CiAgPC9w
|
|
1495
1495
|
b3J0Pgo8L3NlcnZpY2U+CjwvZGVmaW5pdGlvbnM+
|
|
1496
1496
|
http_version:
|
|
1497
|
-
recorded_at: Tue, 08 Apr 2014
|
|
1497
|
+
recorded_at: Tue, 08 Apr 2014 13:46:19 GMT
|
|
1498
1498
|
- request:
|
|
1499
1499
|
method: post
|
|
1500
1500
|
uri: http://www.tiny.com.br/api2.php
|
|
@@ -1502,14 +1502,14 @@ http_interactions:
|
|
|
1502
1502
|
encoding: US-ASCII
|
|
1503
1503
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
1504
1504
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="urn:tinywsdl"
|
|
1505
|
-
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:obterContatoXML><token><APIKEY></token><id
|
|
1505
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:obterContatoXML><token><APIKEY></token><id>"1234"</id><formato>json</formato></tns:obterContatoXML></env:Body></env:Envelope>
|
|
1506
1506
|
headers:
|
|
1507
1507
|
Soapaction:
|
|
1508
1508
|
- ! '"urn:tinywsdl#obterContatoXML"'
|
|
1509
1509
|
Content-Type:
|
|
1510
1510
|
- text/xml;charset=UTF-8
|
|
1511
1511
|
Content-Length:
|
|
1512
|
-
- '
|
|
1512
|
+
- '412'
|
|
1513
1513
|
Accept:
|
|
1514
1514
|
- ! '*/*'
|
|
1515
1515
|
User-Agent:
|
|
@@ -1524,7 +1524,7 @@ http_interactions:
|
|
|
1524
1524
|
Content-Type:
|
|
1525
1525
|
- text/xml; charset=UTF-8
|
|
1526
1526
|
Date:
|
|
1527
|
-
- Tue, 08 Apr 2014
|
|
1527
|
+
- Tue, 08 Apr 2014 13:46:19 GMT
|
|
1528
1528
|
Expires:
|
|
1529
1529
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
|
1530
1530
|
Pragma:
|
|
@@ -1532,13 +1532,13 @@ http_interactions:
|
|
|
1532
1532
|
Server:
|
|
1533
1533
|
- Apache/2.2.25 (Amazon)
|
|
1534
1534
|
Set-Cookie:
|
|
1535
|
-
- PHPSESSID=
|
|
1535
|
+
- PHPSESSID=dn69o9d4g43h49pnc1ol4gdl0bjtbndm; path=/
|
|
1536
1536
|
X-Powered-By:
|
|
1537
1537
|
- PHP/5.3.27
|
|
1538
1538
|
X-Soap-Server:
|
|
1539
1539
|
- NuSOAP/0.9.5 (1.1)
|
|
1540
1540
|
Content-Length:
|
|
1541
|
-
- '
|
|
1541
|
+
- '794'
|
|
1542
1542
|
Connection:
|
|
1543
1543
|
- keep-alive
|
|
1544
1544
|
body:
|
|
@@ -1546,8 +1546,9 @@ http_interactions:
|
|
|
1546
1546
|
string: <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
|
1547
1547
|
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
1548
1548
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:obterContatoXMLResponse
|
|
1549
|
-
xmlns:ns1="urn:tinywsdl"><return xsi:type="xsd:string">{"retorno":{"status_processamento"
|
|
1550
|
-
|
|
1549
|
+
xmlns:ns1="urn:tinywsdl"><return xsi:type="xsd:string">{"retorno":{"status_processamento":1,"status":"Erro","codigo_erro":"6","erros":{"erro":"API
|
|
1550
|
+
Bloqueada - Excedido o n\u00famero de acessos a API, aguarde alguns minutos
|
|
1551
|
+
e tente novamente"}}}</return></ns1:obterContatoXMLResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
|
1551
1552
|
http_version:
|
|
1552
|
-
recorded_at: Tue, 08 Apr 2014
|
|
1553
|
+
recorded_at: Tue, 08 Apr 2014 13:46:19 GMT
|
|
1553
1554
|
recorded_with: VCR 2.9.0
|
data/spec/support/vcr/TinyerpRuby_Service/accepts/_alterar_contato_service_as_a_valid_service.yml
CHANGED
|
@@ -21,7 +21,7 @@ http_interactions:
|
|
|
21
21
|
Content-Type:
|
|
22
22
|
- text/xml; charset=ISO-8859-1
|
|
23
23
|
Date:
|
|
24
|
-
- Tue, 08 Apr 2014
|
|
24
|
+
- Tue, 08 Apr 2014 13:46:13 GMT
|
|
25
25
|
Expires:
|
|
26
26
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
|
27
27
|
Pragma:
|
|
@@ -29,7 +29,7 @@ http_interactions:
|
|
|
29
29
|
Server:
|
|
30
30
|
- Apache/2.2.25 (Amazon)
|
|
31
31
|
Set-Cookie:
|
|
32
|
-
- PHPSESSID=
|
|
32
|
+
- PHPSESSID=gs6d9ah700esuu9ateah82449s260cdp; path=/
|
|
33
33
|
X-Powered-By:
|
|
34
34
|
- PHP/5.3.27
|
|
35
35
|
Transfer-Encoding:
|
|
@@ -1494,7 +1494,7 @@ http_interactions:
|
|
|
1494
1494
|
aW9uPSJodHRwOi8vd3d3LnRpbnkuY29tLmJyL2FwaTIucGhwIi8+CiAgPC9w
|
|
1495
1495
|
b3J0Pgo8L3NlcnZpY2U+CjwvZGVmaW5pdGlvbnM+
|
|
1496
1496
|
http_version:
|
|
1497
|
-
recorded_at: Tue, 08 Apr 2014
|
|
1497
|
+
recorded_at: Tue, 08 Apr 2014 13:46:13 GMT
|
|
1498
1498
|
- request:
|
|
1499
1499
|
method: post
|
|
1500
1500
|
uri: http://www.tiny.com.br/api2.php
|
|
@@ -1502,14 +1502,14 @@ http_interactions:
|
|
|
1502
1502
|
encoding: US-ASCII
|
|
1503
1503
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
1504
1504
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="urn:tinywsdl"
|
|
1505
|
-
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:alterarContatoService><token><APIKEY></token><formato>json</formato></tns:alterarContatoService></env:Body></env:Envelope>
|
|
1505
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:alterarContatoService><token><APIKEY></token><foo>"bar"</foo><formato>json</formato></tns:alterarContatoService></env:Body></env:Envelope>
|
|
1506
1506
|
headers:
|
|
1507
1507
|
Soapaction:
|
|
1508
1508
|
- ! '"urn:tinywsdl#alterarContatoService"'
|
|
1509
1509
|
Content-Type:
|
|
1510
1510
|
- text/xml;charset=UTF-8
|
|
1511
1511
|
Content-Length:
|
|
1512
|
-
- '
|
|
1512
|
+
- '425'
|
|
1513
1513
|
Accept:
|
|
1514
1514
|
- ! '*/*'
|
|
1515
1515
|
User-Agent:
|
|
@@ -1524,7 +1524,7 @@ http_interactions:
|
|
|
1524
1524
|
Content-Type:
|
|
1525
1525
|
- text/xml; charset=UTF-8
|
|
1526
1526
|
Date:
|
|
1527
|
-
- Tue, 08 Apr 2014
|
|
1527
|
+
- Tue, 08 Apr 2014 13:46:13 GMT
|
|
1528
1528
|
Expires:
|
|
1529
1529
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
|
1530
1530
|
Pragma:
|
|
@@ -1532,24 +1532,23 @@ http_interactions:
|
|
|
1532
1532
|
Server:
|
|
1533
1533
|
- Apache/2.2.25 (Amazon)
|
|
1534
1534
|
Set-Cookie:
|
|
1535
|
-
- PHPSESSID=
|
|
1535
|
+
- PHPSESSID=8usnpuaj0f0c845s3i3koi2c5te67gev; path=/
|
|
1536
1536
|
X-Powered-By:
|
|
1537
1537
|
- PHP/5.3.27
|
|
1538
1538
|
X-Soap-Server:
|
|
1539
1539
|
- NuSOAP/0.9.5 (1.1)
|
|
1540
1540
|
Content-Length:
|
|
1541
|
-
- '
|
|
1541
|
+
- '806'
|
|
1542
1542
|
Connection:
|
|
1543
1543
|
- keep-alive
|
|
1544
1544
|
body:
|
|
1545
1545
|
encoding: US-ASCII
|
|
1546
|
-
string:
|
|
1547
|
-
xmlns:SOAP-ENV
|
|
1548
|
-
xmlns:xsi
|
|
1549
|
-
xmlns:ns1
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
tag expected, '&lt;' not found\n</erro></erros></retorno></return></ns1:alterarContatoServiceResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>"
|
|
1546
|
+
string: <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
|
|
1547
|
+
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
1548
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:alterarContatoServiceResponse
|
|
1549
|
+
xmlns:ns1="urn:tinywsdl"><return xsi:type="xsd:string">{"retorno":{"status_processamento":1,"status":"Erro","codigo_erro":"6","erros":{"erro":"API
|
|
1550
|
+
Bloqueada - Excedido o n\u00famero de acessos a API, aguarde alguns minutos
|
|
1551
|
+
e tente novamente"}}}</return></ns1:alterarContatoServiceResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
|
1553
1552
|
http_version:
|
|
1554
|
-
recorded_at: Tue, 08 Apr 2014
|
|
1553
|
+
recorded_at: Tue, 08 Apr 2014 13:46:13 GMT
|
|
1555
1554
|
recorded_with: VCR 2.9.0
|
data/spec/support/vcr/TinyerpRuby_Service/accepts/_alterar_contato_xml_as_a_valid_service.yml
CHANGED
|
@@ -21,7 +21,7 @@ http_interactions:
|
|
|
21
21
|
Content-Type:
|
|
22
22
|
- text/xml; charset=ISO-8859-1
|
|
23
23
|
Date:
|
|
24
|
-
- Tue, 08 Apr 2014
|
|
24
|
+
- Tue, 08 Apr 2014 13:45:52 GMT
|
|
25
25
|
Expires:
|
|
26
26
|
- Thu, 19 Nov 1981 08:52:00 GMT
|
|
27
27
|
Pragma:
|
|
@@ -29,11 +29,11 @@ http_interactions:
|
|
|
29
29
|
Server:
|
|
30
30
|
- Apache/2.2.25 (Amazon)
|
|
31
31
|
Set-Cookie:
|
|
32
|
-
- PHPSESSID=
|
|
32
|
+
- PHPSESSID=5j14oanjgicgr3gq34bc4pifl5q6pp3m; path=/
|
|
33
33
|
X-Powered-By:
|
|
34
34
|
- PHP/5.3.27
|
|
35
|
-
|
|
36
|
-
-
|
|
35
|
+
Content-Length:
|
|
36
|
+
- '65415'
|
|
37
37
|
Connection:
|
|
38
38
|
- keep-alive
|
|
39
39
|
body:
|
|
@@ -1494,7 +1494,7 @@ http_interactions:
|
|
|
1494
1494
|
aW9uPSJodHRwOi8vd3d3LnRpbnkuY29tLmJyL2FwaTIucGhwIi8+CiAgPC9w
|
|
1495
1495
|
b3J0Pgo8L3NlcnZpY2U+CjwvZGVmaW5pdGlvbnM+
|
|
1496
1496
|
http_version:
|
|
1497
|
-
recorded_at: Tue, 08 Apr 2014
|
|
1497
|
+
recorded_at: Tue, 08 Apr 2014 13:45:52 GMT
|
|
1498
1498
|
- request:
|
|
1499
1499
|
method: post
|
|
1500
1500
|
uri: http://www.tiny.com.br/api2.php
|
|
@@ -1502,14 +1502,14 @@ http_interactions:
|
|
|
1502
1502
|
encoding: US-ASCII
|
|
1503
1503
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
1504
1504
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="urn:tinywsdl"
|
|
1505
|
-
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:alterarContatoXML><token><APIKEY></token><formato>json</formato></tns:alterarContatoXML></env:Body></env:Envelope>
|
|
1505
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body><tns:alterarContatoXML><token><APIKEY></token><foo>"bar"</foo><formato>json</formato></tns:alterarContatoXML></env:Body></env:Envelope>
|
|
1506
1506
|
headers:
|
|
1507
1507
|
Soapaction:
|
|
1508
1508
|
- ! '"urn:tinywsdl#alterarContatoXML"'
|
|
1509
1509
|
Content-Type:
|
|
1510
1510
|
- text/xml;charset=UTF-8
|
|
1511
1511
|
Content-Length:
|
|
1512
|
-
- '
|
|
1512
|
+
- '417'
|
|
1513
1513
|
Accept:
|
|
1514
1514
|
- ! '*/*'
|
|
1515
1515
|
User-Agent:
|
|
@@ -1517,67 +1517,39 @@ http_interactions:
|
|
|
1517
1517
|
response:
|
|
1518
1518
|
status:
|
|
1519
1519
|
code: 200
|
|
1520
|
-
message:
|
|
1521
|
-
T0s=
|
|
1520
|
+
message: OK
|
|
1522
1521
|
headers:
|
|
1523
|
-
|
|
1524
|
-
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
YXRoPS8=
|
|
1546
|
-
!binary "WC1Qb3dlcmVkLUJ5":
|
|
1547
|
-
- !binary |-
|
|
1548
|
-
UEhQLzUuMy4yNw==
|
|
1549
|
-
!binary "WC1Tb2FwLVNlcnZlcg==":
|
|
1550
|
-
- !binary |-
|
|
1551
|
-
TnVTT0FQLzAuOS41ICgxLjEp
|
|
1552
|
-
!binary "Q29udGVudC1MZW5ndGg=":
|
|
1553
|
-
- !binary |-
|
|
1554
|
-
ODkw
|
|
1555
|
-
!binary "Q29ubmVjdGlvbg==":
|
|
1556
|
-
- !binary |-
|
|
1557
|
-
a2VlcC1hbGl2ZQ==
|
|
1522
|
+
Cache-Control:
|
|
1523
|
+
- no-store, no-cache, must-revalidate, post-check=0, pre-check=0
|
|
1524
|
+
Content-Type:
|
|
1525
|
+
- text/xml; charset=UTF-8
|
|
1526
|
+
Date:
|
|
1527
|
+
- Tue, 08 Apr 2014 13:45:52 GMT
|
|
1528
|
+
Expires:
|
|
1529
|
+
- Thu, 19 Nov 1981 08:52:00 GMT
|
|
1530
|
+
Pragma:
|
|
1531
|
+
- no-cache
|
|
1532
|
+
Server:
|
|
1533
|
+
- Apache/2.2.25 (Amazon)
|
|
1534
|
+
Set-Cookie:
|
|
1535
|
+
- PHPSESSID=o89amo1hjnmr05ikjcuoh8fik52rkbvd; path=/
|
|
1536
|
+
X-Powered-By:
|
|
1537
|
+
- PHP/5.3.27
|
|
1538
|
+
X-Soap-Server:
|
|
1539
|
+
- NuSOAP/0.9.5 (1.1)
|
|
1540
|
+
Content-Length:
|
|
1541
|
+
- '932'
|
|
1542
|
+
Connection:
|
|
1543
|
+
- keep-alive
|
|
1558
1544
|
body:
|
|
1559
|
-
encoding: ASCII
|
|
1560
|
-
string: !
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
YS1pbnN0YW5jZSIgeG1sbnM6U09BUC1FTkM9Imh0dHA6Ly9zY2hlbWFzLnht
|
|
1568
|
-
bHNvYXAub3JnL3NvYXAvZW5jb2RpbmcvIj48U09BUC1FTlY6Qm9keT48bnMx
|
|
1569
|
-
OmFsdGVyYXJDb250YXRvWE1MUmVzcG9uc2UgeG1sbnM6bnMxPSJ1cm46dGlu
|
|
1570
|
-
eXdzZGwiPjxyZXR1cm4geHNpOnR5cGU9InhzZDpzdHJpbmciPiZsdDs/eG1s
|
|
1571
|
-
IHZlcnNpb249JnF1b3Q7MS4wJnF1b3Q7IGVuY29kaW5nPSZxdW90O1VURi04
|
|
1572
|
-
JnF1b3Q7PyZndDsmbHQ7cmV0b3JubyZndDsmbHQ7c3RhdHVzX3Byb2Nlc3Nh
|
|
1573
|
-
bWVudG8mZ3Q7MSZsdDsvc3RhdHVzX3Byb2Nlc3NhbWVudG8mZ3Q7Jmx0O3N0
|
|
1574
|
-
YXR1cyZndDtFcnJvJmx0Oy9zdGF0dXMmZ3Q7Jmx0O2NvZGlnb19lcnJvJmd0
|
|
1575
|
-
OzYmbHQ7L2NvZGlnb19lcnJvJmd0OyZsdDtlcnJvcyZndDsmbHQ7ZXJybyZn
|
|
1576
|
-
dDtBUEkgQmxvcXVlYWRhIC0gRXhjZWRpZG8gbyBuw7ptZXJvIGRlIGFjZXNz
|
|
1577
|
-
b3MgYSBBUEksIGFndWFyZGUgYWxndW5zIG1pbnV0b3MgZSB0ZW50ZSBub3Zh
|
|
1578
|
-
bWVudGUmbHQ7L2Vycm8mZ3Q7Jmx0Oy9lcnJvcyZndDsmbHQ7L3JldG9ybm8m
|
|
1579
|
-
Z3Q7PC9yZXR1cm4+PC9uczE6YWx0ZXJhckNvbnRhdG9YTUxSZXNwb25zZT48
|
|
1580
|
-
L1NPQVAtRU5WOkJvZHk+PC9TT0FQLUVOVjpFbnZlbG9wZT4=
|
|
1545
|
+
encoding: US-ASCII
|
|
1546
|
+
string: ! "<?xml version=\"1.0\" encoding=\"UTF-8\"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"
|
|
1547
|
+
xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
|
|
1548
|
+
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\"><SOAP-ENV:Body><ns1:alterarContatoXMLResponse
|
|
1549
|
+
xmlns:ns1=\"urn:tinywsdl\"><return xsi:type=\"xsd:string\"><?xml version="1.0"
|
|
1550
|
+
encoding="UTF-8"?><retorno><status_processamento>1</status_processamento><status>Erro</status><codigo_erro>3</codigo_erro><erros><erro>ERRO
|
|
1551
|
+
XML mal formado, mensagem:\tStart tag expected, '&lt;' not found\n\tStart
|
|
1552
|
+
tag expected, '&lt;' not found\n</erro></erros></retorno></return></ns1:alterarContatoXMLResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>"
|
|
1581
1553
|
http_version:
|
|
1582
|
-
recorded_at: Tue, 08 Apr 2014
|
|
1554
|
+
recorded_at: Tue, 08 Apr 2014 13:45:52 GMT
|
|
1583
1555
|
recorded_with: VCR 2.9.0
|