fastshop_catalog 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.DS_Store +0 -0
  3. data/.gitignore +20 -0
  4. data/Gemfile +4 -0
  5. data/Gemfile.lock +52 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +69 -0
  8. data/Rakefile +5 -0
  9. data/fastshop_catalog.gemspec +25 -0
  10. data/lib/fastshop_catalog/base_entity.rb +30 -0
  11. data/lib/fastshop_catalog/base_service.rb +71 -0
  12. data/lib/fastshop_catalog/catalog_service.rb +17 -0
  13. data/lib/fastshop_catalog/check_availability_service.rb +23 -0
  14. data/lib/fastshop_catalog/crypto.rb +41 -0
  15. data/lib/fastshop_catalog/entity/address.rb +30 -0
  16. data/lib/fastshop_catalog/entity/business_unity.rb +9 -0
  17. data/lib/fastshop_catalog/entity/order.rb +12 -0
  18. data/lib/fastshop_catalog/entity/order_item.rb +7 -0
  19. data/lib/fastshop_catalog/entity/participant.rb +15 -0
  20. data/lib/fastshop_catalog/external_dne_service.rb +17 -0
  21. data/lib/fastshop_catalog/order_placement_service.rb +20 -0
  22. data/lib/fastshop_catalog/order_status_service.rb +18 -0
  23. data/lib/fastshop_catalog/participant_service.rb +20 -0
  24. data/lib/fastshop_catalog/product_service.rb +17 -0
  25. data/lib/fastshop_catalog/service_exception.rb +11 -0
  26. data/lib/fastshop_catalog/time.rb +15 -0
  27. data/lib/fastshop_catalog/version.rb +3 -0
  28. data/lib/fastshop_catalog.rb +20 -0
  29. data/password_util.rb +48 -0
  30. data/spec/.DS_Store +0 -0
  31. data/spec/fastshop_catalog/.DS_Store +0 -0
  32. data/spec/fastshop_catalog/base_service_spec.rb +44 -0
  33. data/spec/fastshop_catalog/catalog_service_spec.rb +43 -0
  34. data/spec/fastshop_catalog/check_availability_service_spec.rb +44 -0
  35. data/spec/fastshop_catalog/external_dne_service_spec.rb +60 -0
  36. data/spec/fastshop_catalog/integration/catalog_service_integration_spec.rb +15 -0
  37. data/spec/fastshop_catalog/integration/check_availability_service_integration_spec.rb +30 -0
  38. data/spec/fastshop_catalog/integration/external_dne_service_integration_spec.rb +12 -0
  39. data/spec/fastshop_catalog/integration/order_placement_service_integration_spec.rb +41 -0
  40. data/spec/fastshop_catalog/integration/order_status_service_integration_spec.rb +31 -0
  41. data/spec/fastshop_catalog/integration/participant_service_integration_spec.rb +34 -0
  42. data/spec/fastshop_catalog/integration/product_service_integration_spec.rb +23 -0
  43. data/spec/fastshop_catalog/order_placement_service_spec.rb +60 -0
  44. data/spec/fastshop_catalog/order_status_service_spec.rb +62 -0
  45. data/spec/fastshop_catalog/participant_factory.rb +40 -0
  46. data/spec/fastshop_catalog/participant_service_spec.rb +60 -0
  47. data/spec/fastshop_catalog/product_service_spec.rb +60 -0
  48. data/spec/fixtures/catalog_service_successful_response.xml +11 -0
  49. data/spec/fixtures/catalog_service_wrong_contract_response.xml +10 -0
  50. data/spec/fixtures/check_availability_not_available_response.xml +11 -0
  51. data/spec/fixtures/external_dne_service_successful_response.xml +11 -0
  52. data/spec/fixtures/external_dne_service_wrong_contract_response.xml +11 -0
  53. data/spec/fixtures/external_dne_service_wrong_zip_response.xml +11 -0
  54. data/spec/fixtures/order_placement_cart_not_identified.xml +11 -0
  55. data/spec/fixtures/order_placement_successful_delivery_payload.json +4 -0
  56. data/spec/fixtures/order_placement_successful_payload.json +1 -0
  57. data/spec/fixtures/order_status_service_order_not_found_response.xml +11 -0
  58. data/spec/fixtures/order_status_service_successful_response.xml +11 -0
  59. data/spec/fixtures/participant_service_successful_response.xml +11 -0
  60. data/spec/fixtures/participant_service_successful_token_response.xml +11 -0
  61. data/spec/fixtures/participant_successful_payload.json +1 -0
  62. data/spec/fixtures/product_service_successful_response.xml +11 -0
  63. data/spec/fixtures/product_service_wrong_contract_response.xml +11 -0
  64. data/spec/fixtures/product_service_wrong_sku_response.xml +11 -0
  65. data/spec/spec_helper.rb +10 -0
  66. data/wsdls/catalog.wsdl +49 -0
  67. data/wsdls/participante.wsdl +52 -0
  68. metadata +202 -0
@@ -0,0 +1,10 @@
1
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
2
+ <s:Header>
3
+ <a:Action s:mustUnderstand="1">http://tempuri.org/ICatalogo/BuscaCatalogoResponse</a:Action>
4
+ </s:Header>
5
+ <s:Body>
6
+ <BuscaCatalogoResponse xmlns="http://tempuri.org/">
7
+ <BuscaCatalogoResult>{"EntradaParametros":null,"Lista":null,"Retorno":{"IdRetorno":2,"MsgRetorno":"Contrato invalido"}}</BuscaCatalogoResult>
8
+ </BuscaCatalogoResponse>
9
+ </s:Body>
10
+ </s:Envelope>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://tempuri.org/IConsultaDisponibilidade/RetornaDadosResponse</a:Action>
5
+ </s:Header>
6
+ <s:Body>
7
+ <RetornaDadosResponse xmlns="http://tempuri.org/">
8
+ <RetornaDadosResult>{"Disponibilidade":null,"Retorno":{"IdRetorno":36,"MsgRetorno":"Pedido indisponível"}}</RetornaDadosResult>
9
+ </RetornaDadosResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://tempuri.org/IConsultaDneExterno/ConsultarResponse</a:Action>
5
+ </s:Header>
6
+ <s:Body>
7
+ <ConsultarResponse xmlns="http://tempuri.org/">
8
+ <ConsultarResult>{"Dne":{"Bairro":"BROOKLIN PAULISTA","Cidade":"SAO PAULO","Endereco":"ARANDU","Estado":"SP","TipoEndereco":"R"},"EntradaParametros":{"Cep":"04562030","Contrato":"1234567890"},"Retorno":{"IdRetorno":0,"MsgRetorno":"OK"}}</ConsultarResult>
9
+ </ConsultarResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://tempuri.org/IConsultaDneExterno/ConsultarResponse</a:Action>
5
+ </s:Header>
6
+ <s:Body>
7
+ <ConsultarResponse xmlns="http://tempuri.org/">
8
+ <ConsultarResult>{"Dne":null,"EntradaParametros":null,"Retorno":{"IdRetorno":2,"MsgRetorno":"Contrato invalido"}}</ConsultarResult>
9
+ </ConsultarResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://tempuri.org/IConsultaDneExterno/ConsultarResponse</a:Action>
5
+ </s:Header>
6
+ <s:Body>
7
+ <ConsultarResponse xmlns="http://tempuri.org/">
8
+ <ConsultarResult>{"Dne":null,"EntradaParametros":null,"Retorno":{"IdRetorno":9,"MsgRetorno":"CEP invalido"}}</ConsultarResult>
9
+ </ConsultarResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://tempuri.org/IColocacaoPedido/IncluirPedidoResponse</a:Action>
5
+ </s:Header>
6
+ <s:Body>
7
+ <IncluirPedidoResponse xmlns="http://tempuri.org/">
8
+ <IncluirPedidoResult>{"NumeroPedidoFast":null,"Retorno":{"IdRetorno":37,"MsgRetorno":"Carrinho nao identificado no sistema"}}</IncluirPedidoResult>
9
+ </IncluirPedidoResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -0,0 +1,4 @@
1
+ {"Contrato":"1234567890", "NumeroPedidoParceiro":"1234568119", "Cpf":"73978898160",
2
+ "Cep":"02029001", "Numero":"1560", "ValorTotal":69.00, "TipoEntrega":"D", "DataEntrega":"24/12/2013", "PeriodoId":"12",
3
+ "PeriodNome":"Tarde", "Itens":[ {"Sku":"IVIEP314RED", "Quantidade":1, "ValorUnitario": 69.00 }]}
4
+
@@ -0,0 +1 @@
1
+ {"Cep":"02029001","Contrato":"1234567890","Cpf":"73978898160","Itens":[{"Quantidade":1,"Sku":"IVIEP314RED","ValorUnitario":"69.00"}],"Numero":"1560","NumeroPedidoParceiro":"1234568119","TipoEntrega":"P","ValorTotal":"69.00"}
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://tempuri.org/IConsultaStatusPedido/RetornaDadosResponse</a:Action>
5
+ </s:Header>
6
+ <s:Body>
7
+ <RetornaDadosResponse xmlns="http://tempuri.org/">
8
+ <RetornaDadosResult>{"EntradaParametros":null,"Lista":null,"Retorno":{"IdRetorno":21,"MsgRetorno":"Pedido nao encontrado"}}</RetornaDadosResult>
9
+ </RetornaDadosResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://tempuri.org/IConsultaStatusPedido/RetornaDadosResponse</a:Action>
5
+ </s:Header>
6
+ <s:Body>
7
+ <RetornaDadosResponse xmlns="http://tempuri.org/">
8
+ <RetornaDadosResult>{"EntradaParametros":{"Contrato":"1234567890","NumeroPedidoFast":"3353496","NumeroPedidoParceiro":"12121"},"Lista":[{"Data":"\/Date(1361399184887-0300)\/","Nome":"Fone de Ouvido com entradas intra - auriculares \/ Vermelho - iLuv - IVIEP314RED","Sku":"IVIEP314RED","StatusDescricao":"Em processamento"}],"Retorno":{"IdRetorno":0,"MsgRetorno":"OK"}}</RetornaDadosResult>
9
+ </RetornaDadosResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://tempuri.org/IParticipante/CadastrarParticipanteResponse</a:Action>
5
+ </s:Header>
6
+ <s:Body>
7
+ <CadastrarParticipanteResponse xmlns="http://tempuri.org/">
8
+ <CadastrarParticipanteResult>{"Retorno":{"IdRetorno":0,"MsgRetorno":"OK"},"Token":null}</CadastrarParticipanteResult>
9
+ </CadastrarParticipanteResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://tempuri.org/IParticipante/CadastrarParticipanteResponse</a:Action>
5
+ </s:Header>
6
+ <s:Body>
7
+ <CadastrarParticipanteResponse xmlns="http://tempuri.org/">
8
+ <CadastrarParticipanteResult>{"Retorno":{"IdRetorno":0,"MsgRetorno":"OK"},"Token":"xpto"}</CadastrarParticipanteResult>
9
+ </CadastrarParticipanteResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -0,0 +1 @@
1
+ {"Categoria":"Vendedor","Celular":"11111111","Contrato":"1234567890","Cpf":"73978898160","DataNascimento":"\/Date(315543600000-10800)\/","DddCelular":"11","DddComercial":"11","DddResidencial":"11","Email":"teste@teste.com.br","Endereco":{"Bairro":"BROOKLIN PAULISTA","Cep":"04562030","Cidade":"SAO PAULO","Complemento":"","Descricao":"FASTSHOP","Endereco":"ARANDU","Estado":"SP","Numero":"1560","TipoEndereco":"R","TipoMoradiaDescricao":"EMPRESA","TipoMoradiaId":"4"},"Nome":"TESTE PARTICIPANTE","RG":"11111111","Sexo":"M","Status":"A","TelefoneComercial":"11111111","TelefoneResidencial":"11111111","TipoOperacao":"0","UnidadeNegocio":{"Cnpj":"03792703000198","Fantasia":"TESTE UNI","RazaoSocial":"TESTE UNID LTD"}}
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://tempuri.org/IConsultaProduto/BuscaProdutoResponse</a:Action>
5
+ </s:Header>
6
+ <s:Body>
7
+ <BuscaProdutoResponse xmlns="http://tempuri.org/">
8
+ <BuscaProdutoResult><![CDATA[{"EntradaParametros":{"Contrato":"1234567890","ProdutoId":"A5IMT237"},"ProdutoDados":{"Caracteristicas":"","Departamentos":[{"DepartamentoId":1631,"DepartamentoPai":0,"Descricao":"","Nome":"ÁUDIO","Ordem":2},{"DepartamentoId":1694,"DepartamentoPai":1631,"Descricao":"","Nome":"cabos e acessórios","Ordem":11},{"DepartamentoId":1761,"DepartamentoPai":1694,"Descricao":"","Nome":"outros","Ordem":6}],"Descricao":"<html>\u000d\u000a\u000d\u000a<head>\u000d\u000a<meta http-equiv=\"Content-Type\"\u000d\u000acontent=\"text\/html; charset=iso-8859-1\">\u000d\u000a<title>Untitled <\/title>\u000d\u000a<\/head>\u000d\u000a\u000d\u000a<body>\u000d\u000a\u000d\u000a<ul>\u000d\u000a <li><font size=\"1\" face=\"Verdana\">Alto-falente ultra portátil\u000d\u000a para MP3.<\/font><\/li>\u000d\u000a <li><font size=\"1\" face=\"Verdana\">CD Player.<\/font><\/li>\u000d\u000a <li><font size=\"1\" face=\"Verdana\">Aparelhos com dispositivo\u000d\u000a para fone.<\/font><\/li>\u000d\u000a<\/ul>\u000d\u000a\u000d\u000a<hr>\u000d\u000a\u000d\u000a<p><font size=\"1\" face=\"Verdana\"><br>\u000d\u000a<\/font><font size=\"2\" face=\"Verdana\"><strong>Características<\/strong><\/font><\/p>\u000d\u000a\u000d\u000a<ul>\u000d\u000a <li><font size=\"1\" face=\"Verdana\">O Alto-falante órbita é\u000d\u000a compacto, portátil e ideal para seu MP3, CD Player e\u000d\u000a aparelhos com dispositivo para fone.<\/font><\/li>\u000d\u000a <li><font size=\"1\" face=\"Verdana\">Fácil de usar em qualquer\u000d\u000a lugar e qualquer hora.<\/font><\/li>\u000d\u000a <li><font size=\"1\" face=\"Verdana\">Possui uma bolsa para\u000d\u000a revestimento e proteção do aparelho.<\/font><\/li>\u000d\u000a <li><font size=\"1\" face=\"Verdana\">Apenas plugue e toque para\u000d\u000a desfrutar de um incrível som encorpado, de 360 graus vai\u000d\u000a surpreender os seus amigos com sua claridade e amplitude.<\/font><\/li>\u000d\u000a<\/ul>\u000d\u000a\u000d\u000a<hr>\u000d\u000a\u000d\u000a<p><font size=\"1\" face=\"Verdana\"><br>\u000d\u000a<\/font><font size=\"2\" face=\"Verdana\"><strong>Especificações Técnicas<\/strong><\/font><\/p>\u000d\u000a\u000d\u000a<ul>\u000d\u000a <li><font size=\"1\" face=\"Verdana\">Cor : Prata.<\/font><\/li>\u000d\u000a <li><font size=\"1\" face=\"Verdana\">Garantia de 6 meses.<\/font><\/li>\u000d\u000a<\/ul>\u000d\u000a\u000d\u000a<hr>\u000d\u000a\u000d\u000a<p><font size=\"1\" face=\"Verdana\"><br>\u000d\u000a<\/font><font size=\"2\" face=\"Verdana\"><strong>Acessórios Inclusos<\/strong><\/font><\/p>\u000d\u000a\u000d\u000a<ul>\u000d\u000a <li><font size=\"1\" face=\"Verdana\">1 Auto falante portátíl.<\/font><\/li>\u000d\u000a <li><font size=\"1\" face=\"Verdana\">1Capa de proteção.<br>\u000d\u000a <\/font><\/li>\u000d\u000a<\/ul>\u000d\u000a<\/body>\u000d\u000a<\/html>\u000d\u000a","Fabricante":"ALTEC LANSING","ImagemGrande":"http:\/\/imagens.fastshop.com.br\/imgprod\/A5IMT237_G.JPG;http:\/\/imagens.fastshop.com.br\/imgprod\/A5IMT237_G1.JPG;","ImagemNormal":"http:\/\/imagens.fastshop.com.br\/imgprod\/A5IMT237_N.JPG","ImagemPequena":"http:\/\/imagens.fastshop.com.br\/imgprod\/A5IMT237_P.JPG","ImagemThumb":"http:\/\/imagens.fastshop.com.br\/imgprod\/A5IMT237_T.JPG","Nome":"Alto Falante Ultra Portátil Prata - Altec Lansing - IMT237 ","PrecoVenda":79.00,"ProdutoId":"A5IMT237","ProdutoSkus":[{"Descricao":"","Nome":"","Sku":"A5IMT237"}],"Status":"A"},"Retorno":{"IdRetorno":0,"MsgRetorno":"OK"}}]]></BuscaProdutoResult>
9
+ </BuscaProdutoResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://tempuri.org/IConsultaProduto/BuscaProdutoResponse</a:Action>
5
+ </s:Header>
6
+ <s:Body>
7
+ <BuscaProdutoResponse xmlns="http://tempuri.org/">
8
+ <BuscaProdutoResult>{"EntradaParametros":null,"ProdutoDados":null,"Retorno":{"IdRetorno":2,"MsgRetorno":"Contrato invalido"}}</BuscaProdutoResult>
9
+ </BuscaProdutoResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
3
+ <s:Header>
4
+ <a:Action s:mustUnderstand="1">http://tempuri.org/IConsultaProduto/BuscaProdutoResponse</a:Action>
5
+ </s:Header>
6
+ <s:Body>
7
+ <BuscaProdutoResponse xmlns="http://tempuri.org/">
8
+ <BuscaProdutoResult>{"EntradaParametros":null,"ProdutoDados":null,"Retorno":{"IdRetorno":43,"MsgRetorno":"Produto invalido"}}</BuscaProdutoResult>
9
+ </BuscaProdutoResponse>
10
+ </s:Body>
11
+ </s:Envelope>
@@ -0,0 +1,10 @@
1
+ require 'savon/mock/spec_helper'
2
+ require 'json'
3
+ require_relative '../lib/fastshop_catalog'
4
+ FastshopCatalog::BaseService.log_level = :debug
5
+ FastshopCatalog::BaseService::AUX_LOG.level = Logger::DEBUG
6
+ if ENV['integration'] == 'false'
7
+ RSpec.configure do |c|
8
+ c.filter_run_excluding :integration => true
9
+ end
10
+ end
@@ -0,0 +1,49 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="Catalogo" targetNamespace="http://tempuri.org/">
3
+ <wsp:Policy wsu:Id="WSHttpBinding_ICatalogo_policy">
4
+ <wsp:ExactlyOne>
5
+ <wsp:All>
6
+ <wsaw:UsingAddressing/>
7
+ </wsp:All>
8
+ </wsp:ExactlyOne>
9
+ </wsp:Policy>
10
+ <wsdl:types>
11
+ <xsd:schema targetNamespace="http://tempuri.org/Imports">
12
+ <xsd:import schemaLocation="http://www.fastincentivos.com.br/FastServices.WsCatalogo/Catalogo.svc/service?xsd=xsd0" namespace="http://tempuri.org/"/>
13
+ <xsd:import schemaLocation="http://www.fastincentivos.com.br/FastServices.WsCatalogo/Catalogo.svc/service?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
14
+ </xsd:schema>
15
+ </wsdl:types>
16
+ <wsdl:message name="ICatalogo_BuscaCatalogo_InputMessage">
17
+ <wsdl:part name="parameters" element="tns:BuscaCatalogo"/>
18
+ </wsdl:message>
19
+ <wsdl:message name="ICatalogo_BuscaCatalogo_OutputMessage">
20
+ <wsdl:part name="parameters" element="tns:BuscaCatalogoResponse"/>
21
+ </wsdl:message>
22
+ <wsdl:portType name="ICatalogo">
23
+ <wsdl:operation name="BuscaCatalogo">
24
+ <wsdl:input wsaw:Action="http://tempuri.org/ICatalogo/BuscaCatalogo" message="tns:ICatalogo_BuscaCatalogo_InputMessage"/>
25
+ <wsdl:output wsaw:Action="http://tempuri.org/ICatalogo/BuscaCatalogoResponse" message="tns:ICatalogo_BuscaCatalogo_OutputMessage"/>
26
+ </wsdl:operation>
27
+ </wsdl:portType>
28
+ <wsdl:binding name="WSHttpBinding_ICatalogo" type="tns:ICatalogo">
29
+ <wsp:PolicyReference URI="#WSHttpBinding_ICatalogo_policy"/>
30
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
31
+ <wsdl:operation name="BuscaCatalogo">
32
+ <soap12:operation soapAction="http://tempuri.org/ICatalogo/BuscaCatalogo" style="document"/>
33
+ <wsdl:input>
34
+ <soap12:body use="literal"/>
35
+ </wsdl:input>
36
+ <wsdl:output>
37
+ <soap12:body use="literal"/>
38
+ </wsdl:output>
39
+ </wsdl:operation>
40
+ </wsdl:binding>
41
+ <wsdl:service name="Catalogo">
42
+ <wsdl:port name="WSHttpBinding_ICatalogo" binding="tns:WSHttpBinding_ICatalogo">
43
+ <soap12:address location="http://www.fastincentivos.com.br/FastServices.WsCatalogo/Catalogo.svc/service"/>
44
+ <wsa10:EndpointReference>
45
+ <wsa10:Address>http://www.fastincentivos.com.br/FastServices.WsCatalogo/Catalogo.svc/service</wsa10:Address>
46
+ </wsa10:EndpointReference>
47
+ </wsdl:port>
48
+ </wsdl:service>
49
+ </wsdl:definitions>
@@ -0,0 +1,52 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="Participante" targetNamespace="http://tempuri.org/">
3
+ <wsp:Policy wsu:Id="WSHttpBinding_IParticipante_policy">
4
+ <wsp:ExactlyOne>
5
+ <wsp:All>
6
+ <wsaw:UsingAddressing/>
7
+ </wsp:All>
8
+ </wsp:ExactlyOne>
9
+ </wsp:Policy>
10
+ <wsdl:types>
11
+ <xsd:schema targetNamespace="http://tempuri.org/Imports">
12
+ <xsd:import schemaLocation="http://www.fastincentivos.com.br/FastServices.WsParticipante/Participante.svc/service?xsd=xsd0" namespace="http://tempuri.org/"/>
13
+ <xsd:import schemaLocation="http://www.fastincentivos.com.br/FastServices.WsParticipante/Participante.svc/service?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
14
+ </xsd:schema>
15
+ </wsdl:types>
16
+ <wsdl:message name="IParticipante_CadastrarParticipante_InputMessage">
17
+ <wsdl:part name="parameters" element="tns:CadastrarParticipante"/>
18
+ </wsdl:message>
19
+ <wsdl:message name="IParticipante_CadastrarParticipante_OutputMessage">
20
+ <wsdl:part name="parameters" element="tns:CadastrarParticipanteResponse"/>
21
+ </wsdl:message>
22
+ <wsdl:portType name="IParticipante">
23
+ <wsdl:operation name="CadastrarParticipante">
24
+ <wsdl:input wsaw:Action="http://tempuri.org/IParticipante/CadastrarParticipante" message="tns:IParticipante_CadastrarParticipante_InputMessage"/>
25
+ <wsdl:output wsaw:Action="http://tempuri.org/IParticipante/CadastrarParticipanteResponse" message="tns:IParticipante_CadastrarParticipante_OutputMessage"/>
26
+ </wsdl:operation>
27
+ </wsdl:portType>
28
+ <wsdl:binding name="WSHttpBinding_IParticipante" type="tns:IParticipante">
29
+ <wsp:PolicyReference URI="#WSHttpBinding_IParticipante_policy"/>
30
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
31
+ <wsdl:operation name="CadastrarParticipante">
32
+ <soap12:operation soapAction="http://tempuri.org/IParticipante/CadastrarParticipante" style="document"/>
33
+ <wsdl:input>
34
+ <soap12:body use="literal"/>
35
+ </wsdl:input>
36
+ <wsdl:output>
37
+ <soap12:body use="literal"/>
38
+ </wsdl:output>
39
+ </wsdl:operation>
40
+ </wsdl:binding>
41
+ <wsdl:service name="Participante">
42
+ <wsdl:port name="WSHttpBinding_IParticipante" binding="tns:WSHttpBinding_IParticipante">
43
+ <soap12:address location="http://www.fastincentivos.com.br/FastServices.WsParticipante/Participante.svc/service"/>
44
+ <wsa10:EndpointReference>
45
+ <wsa10:Address>http://www.fastincentivos.com.br/FastServices.WsParticipante/Participante.svc/service</wsa10:Address>
46
+ <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
47
+ <Dns>localhost</Dns>
48
+ </Identity>
49
+ </wsa10:EndpointReference>
50
+ </wsdl:port>
51
+ </wsdl:service>
52
+ </wsdl:definitions>
metadata ADDED
@@ -0,0 +1,202 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fastshop_catalog
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Thiago Ganzarolli
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-10-21 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: savon
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Integração com webservices da FastShop
70
+ email:
71
+ - thiago.ganzarolli@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - .DS_Store
77
+ - .gitignore
78
+ - Gemfile
79
+ - Gemfile.lock
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - fastshop_catalog.gemspec
84
+ - lib/fastshop_catalog.rb
85
+ - lib/fastshop_catalog/base_entity.rb
86
+ - lib/fastshop_catalog/base_service.rb
87
+ - lib/fastshop_catalog/catalog_service.rb
88
+ - lib/fastshop_catalog/check_availability_service.rb
89
+ - lib/fastshop_catalog/crypto.rb
90
+ - lib/fastshop_catalog/entity/address.rb
91
+ - lib/fastshop_catalog/entity/business_unity.rb
92
+ - lib/fastshop_catalog/entity/order.rb
93
+ - lib/fastshop_catalog/entity/order_item.rb
94
+ - lib/fastshop_catalog/entity/participant.rb
95
+ - lib/fastshop_catalog/external_dne_service.rb
96
+ - lib/fastshop_catalog/order_placement_service.rb
97
+ - lib/fastshop_catalog/order_status_service.rb
98
+ - lib/fastshop_catalog/participant_service.rb
99
+ - lib/fastshop_catalog/product_service.rb
100
+ - lib/fastshop_catalog/service_exception.rb
101
+ - lib/fastshop_catalog/time.rb
102
+ - lib/fastshop_catalog/version.rb
103
+ - password_util.rb
104
+ - spec/.DS_Store
105
+ - spec/fastshop_catalog/.DS_Store
106
+ - spec/fastshop_catalog/base_service_spec.rb
107
+ - spec/fastshop_catalog/catalog_service_spec.rb
108
+ - spec/fastshop_catalog/check_availability_service_spec.rb
109
+ - spec/fastshop_catalog/external_dne_service_spec.rb
110
+ - spec/fastshop_catalog/integration/catalog_service_integration_spec.rb
111
+ - spec/fastshop_catalog/integration/check_availability_service_integration_spec.rb
112
+ - spec/fastshop_catalog/integration/external_dne_service_integration_spec.rb
113
+ - spec/fastshop_catalog/integration/order_placement_service_integration_spec.rb
114
+ - spec/fastshop_catalog/integration/order_status_service_integration_spec.rb
115
+ - spec/fastshop_catalog/integration/participant_service_integration_spec.rb
116
+ - spec/fastshop_catalog/integration/product_service_integration_spec.rb
117
+ - spec/fastshop_catalog/order_placement_service_spec.rb
118
+ - spec/fastshop_catalog/order_status_service_spec.rb
119
+ - spec/fastshop_catalog/participant_factory.rb
120
+ - spec/fastshop_catalog/participant_service_spec.rb
121
+ - spec/fastshop_catalog/product_service_spec.rb
122
+ - spec/fixtures/catalog_service_successful_response.xml
123
+ - spec/fixtures/catalog_service_wrong_contract_response.xml
124
+ - spec/fixtures/check_availability_not_available_response.xml
125
+ - spec/fixtures/external_dne_service_successful_response.xml
126
+ - spec/fixtures/external_dne_service_wrong_contract_response.xml
127
+ - spec/fixtures/external_dne_service_wrong_zip_response.xml
128
+ - spec/fixtures/order_placement_cart_not_identified.xml
129
+ - spec/fixtures/order_placement_successful_delivery_payload.json
130
+ - spec/fixtures/order_placement_successful_payload.json
131
+ - spec/fixtures/order_status_service_order_not_found_response.xml
132
+ - spec/fixtures/order_status_service_successful_response.xml
133
+ - spec/fixtures/participant_service_successful_response.xml
134
+ - spec/fixtures/participant_service_successful_token_response.xml
135
+ - spec/fixtures/participant_successful_payload.json
136
+ - spec/fixtures/product_service_successful_response.xml
137
+ - spec/fixtures/product_service_wrong_contract_response.xml
138
+ - spec/fixtures/product_service_wrong_sku_response.xml
139
+ - spec/spec_helper.rb
140
+ - wsdls/catalog.wsdl
141
+ - wsdls/participante.wsdl
142
+ homepage: ''
143
+ licenses:
144
+ - MIT
145
+ metadata: {}
146
+ post_install_message:
147
+ rdoc_options: []
148
+ require_paths:
149
+ - lib
150
+ required_ruby_version: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - '>='
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ required_rubygems_version: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ requirements: []
161
+ rubyforge_project:
162
+ rubygems_version: 2.1.6
163
+ signing_key:
164
+ specification_version: 4
165
+ summary: FastShop integrações
166
+ test_files:
167
+ - spec/.DS_Store
168
+ - spec/fastshop_catalog/.DS_Store
169
+ - spec/fastshop_catalog/base_service_spec.rb
170
+ - spec/fastshop_catalog/catalog_service_spec.rb
171
+ - spec/fastshop_catalog/check_availability_service_spec.rb
172
+ - spec/fastshop_catalog/external_dne_service_spec.rb
173
+ - spec/fastshop_catalog/integration/catalog_service_integration_spec.rb
174
+ - spec/fastshop_catalog/integration/check_availability_service_integration_spec.rb
175
+ - spec/fastshop_catalog/integration/external_dne_service_integration_spec.rb
176
+ - spec/fastshop_catalog/integration/order_placement_service_integration_spec.rb
177
+ - spec/fastshop_catalog/integration/order_status_service_integration_spec.rb
178
+ - spec/fastshop_catalog/integration/participant_service_integration_spec.rb
179
+ - spec/fastshop_catalog/integration/product_service_integration_spec.rb
180
+ - spec/fastshop_catalog/order_placement_service_spec.rb
181
+ - spec/fastshop_catalog/order_status_service_spec.rb
182
+ - spec/fastshop_catalog/participant_factory.rb
183
+ - spec/fastshop_catalog/participant_service_spec.rb
184
+ - spec/fastshop_catalog/product_service_spec.rb
185
+ - spec/fixtures/catalog_service_successful_response.xml
186
+ - spec/fixtures/catalog_service_wrong_contract_response.xml
187
+ - spec/fixtures/check_availability_not_available_response.xml
188
+ - spec/fixtures/external_dne_service_successful_response.xml
189
+ - spec/fixtures/external_dne_service_wrong_contract_response.xml
190
+ - spec/fixtures/external_dne_service_wrong_zip_response.xml
191
+ - spec/fixtures/order_placement_cart_not_identified.xml
192
+ - spec/fixtures/order_placement_successful_delivery_payload.json
193
+ - spec/fixtures/order_placement_successful_payload.json
194
+ - spec/fixtures/order_status_service_order_not_found_response.xml
195
+ - spec/fixtures/order_status_service_successful_response.xml
196
+ - spec/fixtures/participant_service_successful_response.xml
197
+ - spec/fixtures/participant_service_successful_token_response.xml
198
+ - spec/fixtures/participant_successful_payload.json
199
+ - spec/fixtures/product_service_successful_response.xml
200
+ - spec/fixtures/product_service_wrong_contract_response.xml
201
+ - spec/fixtures/product_service_wrong_sku_response.xml
202
+ - spec/spec_helper.rb