abacos 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.rspec +1 -0
  4. data/Gemfile +4 -0
  5. data/Gemfile.lock +72 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +29 -0
  8. data/Rakefile +4 -0
  9. data/abacos.gemspec +30 -0
  10. data/lib/abacos.rb +27 -0
  11. data/lib/abacos/base.rb +68 -0
  12. data/lib/abacos/carrier.rb +9 -0
  13. data/lib/abacos/customer.rb +10 -0
  14. data/lib/abacos/inventory.rb +4 -0
  15. data/lib/abacos/invoice.rb +7 -0
  16. data/lib/abacos/order.rb +24 -0
  17. data/lib/abacos/order_data.rb +4 -0
  18. data/lib/abacos/order_status.rb +6 -0
  19. data/lib/abacos/payment_condition.rb +9 -0
  20. data/lib/abacos/payment_method.rb +9 -0
  21. data/lib/abacos/price.rb +10 -0
  22. data/lib/abacos/product.rb +18 -0
  23. data/lib/abacos/response.rb +32 -0
  24. data/lib/abacos/shipping.rb +11 -0
  25. data/lib/abacos/stock.rb +10 -0
  26. data/lib/abacos/version.rb +3 -0
  27. data/spec/abacos/carrier_spec.rb +11 -0
  28. data/spec/abacos/customer_spec.rb +13 -0
  29. data/spec/abacos/inventory_spec.rb +11 -0
  30. data/spec/abacos/invoice_spec.rb +19 -0
  31. data/spec/abacos/order_spec.rb +39 -0
  32. data/spec/abacos/order_status_spec.rb +11 -0
  33. data/spec/abacos/payment_condition_spec.rb +11 -0
  34. data/spec/abacos/payment_method_spec.rb +11 -0
  35. data/spec/abacos/price_spec.rb +27 -0
  36. data/spec/abacos/product_spec.rb +53 -0
  37. data/spec/abacos/shipping_spec.rb +11 -0
  38. data/spec/abacos/stock_spec.rb +25 -0
  39. data/spec/cassettes/customer_success.yml +501 -0
  40. data/spec/cassettes/order_confirm_payment.yml +86 -0
  41. data/spec/cassettes/order_statuses_confirm.yml +1543 -0
  42. data/spec/cassettes/order_success.yml +1542 -0
  43. data/spec/cassettes/orders_exist.yml +100 -0
  44. data/spec/cassettes/orders_statuses.yml +70 -0
  45. data/spec/cassettes/prices_available.yml +4031 -0
  46. data/spec/cassettes/prices_confirm.yml +75 -0
  47. data/spec/cassettes/products_available.yml +4031 -0
  48. data/spec/cassettes/products_available_empty.yml +76 -0
  49. data/spec/cassettes/products_available_one.yml +76 -0
  50. data/spec/cassettes/products_confirm.yml +74 -0
  51. data/spec/cassettes/stocks_available.yml +4031 -0
  52. data/spec/cassettes/stocks_confirm.yml +75 -0
  53. data/spec/config.yml.example +14 -0
  54. data/spec/spec_helper.rb +17 -0
  55. metadata +237 -0
@@ -0,0 +1,75 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://abacos2.isupply.com.br:8034/abacoswebsvc/AbacosWSProdutos.asmx
6
+ body:
7
+ encoding: UTF-8
8
+ string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
9
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.kplsolucoes.com.br/ABACOSWebService"
10
+ xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://www.kplsolucoes.com.br/ABACOSWebService/AbstractTypes"><env:Body><tns:ConfirmarRecebimentoEstoque><tns:ProtocoloEstoque>8b09848d-556f-4658-9fd6-b7cf335e0294</tns:ProtocoloEstoque></tns:ConfirmarRecebimentoEstoque></env:Body></env:Envelope>
11
+ headers:
12
+ Soapaction:
13
+ - '"http://www.kplsolucoes.com.br/ABACOSWebService/ConfirmarRecebimentoEstoque"'
14
+ Content-Type:
15
+ - text/xml;charset=UTF-8
16
+ Content-Length:
17
+ - '522'
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ Accept:
21
+ - "*/*"
22
+ User-Agent:
23
+ - Ruby
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Cache-Control:
30
+ - private, max-age=0
31
+ Content-Type:
32
+ - text/xml; charset=utf-8
33
+ Server:
34
+ - Microsoft-IIS/7.5
35
+ X-Aspnet-Version:
36
+ - 2.0.50727
37
+ X-Powered-By:
38
+ - ASP.NET
39
+ Date:
40
+ - Fri, 17 Jul 2015 19:53:55 GMT
41
+ Content-Length:
42
+ - '819'
43
+ X-Cache:
44
+ - MISS from localhost
45
+ X-Cache-Lookup:
46
+ - MISS from localhost:3128
47
+ Via:
48
+ - 1.1 localhost (squid/3.3.10)
49
+ Connection:
50
+ - keep-alive
51
+ body:
52
+ encoding: ASCII-8BIT
53
+ string: !binary |-
54
+ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c29hcDpF
55
+ bnZlbG9wZSB4bWxuczpzb2FwPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9y
56
+ Zy9zb2FwL2VudmVsb3BlLyIgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9y
57
+ Zy8yMDAxL1hNTFNjaGVtYS1pbnN0YW5jZSIgeG1sbnM6eHNkPSJodHRwOi8v
58
+ d3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSI+PHNvYXA6Qm9keT48Q29uZmly
59
+ bWFyUmVjZWJpbWVudG9Fc3RvcXVlUmVzcG9uc2UgeG1sbnM9Imh0dHA6Ly93
60
+ d3cua3Bsc29sdWNvZXMuY29tLmJyL0FCQUNPU1dlYlNlcnZpY2UiPjxDb25m
61
+ aXJtYXJSZWNlYmltZW50b0VzdG9xdWVSZXN1bHQ+PENvZGlnbz4zMDAwMDU8
62
+ L0NvZGlnbz48RGVzY3JpY2FvPkEgZXhlY3XDp8OjbyBkYSByb3RpbmEgZ2Vy
63
+ b3UgdW1hIGNyw610aWNhLiBEZXRhbGhlczogKiBPcmlnZW06IENvbmZpcm1h
64
+ ciBhIGluY2x1c8OjbyBkb3MgZGFkb3MgZGUgZXN0b3F1ZSAqIExpbmhhIGVt
65
+ IHF1ZSBvY29ycmV1IG8gZXJybzogNTMgKiBOb21lIGRvIG9iamV0byBvbmRl
66
+ IG9jb3JyZXUgbyBlcnJvOiBQR0VOX1BfUkFJU0VSUk9SICogQ8OzZGlnbyBk
67
+ ZSBlcnJvIGRvIGJhbmNvIGRlIGRhZG9zOiA1MDAwMDwvRGVzY3JpY2FvPjxU
68
+ aXBvPnRkcmVFcnJvRGF0YUJhc2U8L1RpcG8+PEV4Y2VwdGlvbk1lc3NhZ2U+
69
+ UHJvdG9jb2xvIGluZXhpc3RlbnRlPC9FeGNlcHRpb25NZXNzYWdlPjwvQ29u
70
+ ZmlybWFyUmVjZWJpbWVudG9Fc3RvcXVlUmVzdWx0PjwvQ29uZmlybWFyUmVj
71
+ ZWJpbWVudG9Fc3RvcXVlUmVzcG9uc2U+PC9zb2FwOkJvZHk+PC9zb2FwOkVu
72
+ dmVsb3BlPg0K
73
+ http_version:
74
+ recorded_at: Fri, 17 Jul 2015 19:51:23 GMT
75
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,14 @@
1
+ ws:
2
+ endpoint: "http://0.0.0.0/abacoswebsvc"
3
+ db:
4
+ host: 0.0.0.0
5
+ password: password
6
+ port: 1434
7
+ username: user
8
+ token: "FD803D46-5C5E-4754-930C-358446DFA79E"
9
+ token_no_products: "67FCF2E1-04A0-4705-8355-49D36122E30E"
10
+ token_one_product: "39BECD91-9548-4312-8D67-201B604BB80A"
11
+ token_prices: "67FCF2E1-04A0-4705-8355-49D36122E30E"
12
+ token_stocks: "67FCF2E1-04A0-4705-8355-49D36122E30E"
13
+ token_payment: "E307DE7F-ABE5-4783-9D9B-A36C6A52B8CF"
14
+ token_orders_statuses: "E307DE7F-ABE5-4783-9D9B-A36C6A52B8CF"
@@ -0,0 +1,17 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ require 'abacos'
4
+ require 'pry'
5
+ require 'vcr'
6
+ require 'webmock'
7
+
8
+ VCR.configure do |c|
9
+ c.cassette_library_dir = 'spec/cassettes'
10
+ c.hook_into :webmock
11
+ end
12
+
13
+ RSpec.configure do |config|
14
+ end
15
+
16
+ ABACOS_CONFIG = YAML.load_file("spec/config.yml")
17
+ Abacos.config! 'ws' => ABACOS_CONFIG['ws'], 'db' => ABACOS_CONFIG['db'], 'log' => false
metadata ADDED
@@ -0,0 +1,237 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: abacos
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ platform: ruby
6
+ authors:
7
+ - Diego Carrion
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-08-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: savon
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: tiny_tds
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
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: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.5'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.5'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: vcr
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: webmock
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: ''
126
+ email:
127
+ - dc.rec1@gmail.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".gitignore"
133
+ - ".rspec"
134
+ - Gemfile
135
+ - Gemfile.lock
136
+ - LICENSE.txt
137
+ - README.md
138
+ - Rakefile
139
+ - abacos.gemspec
140
+ - lib/abacos.rb
141
+ - lib/abacos/base.rb
142
+ - lib/abacos/carrier.rb
143
+ - lib/abacos/customer.rb
144
+ - lib/abacos/inventory.rb
145
+ - lib/abacos/invoice.rb
146
+ - lib/abacos/order.rb
147
+ - lib/abacos/order_data.rb
148
+ - lib/abacos/order_status.rb
149
+ - lib/abacos/payment_condition.rb
150
+ - lib/abacos/payment_method.rb
151
+ - lib/abacos/price.rb
152
+ - lib/abacos/product.rb
153
+ - lib/abacos/response.rb
154
+ - lib/abacos/shipping.rb
155
+ - lib/abacos/stock.rb
156
+ - lib/abacos/version.rb
157
+ - spec/abacos/carrier_spec.rb
158
+ - spec/abacos/customer_spec.rb
159
+ - spec/abacos/inventory_spec.rb
160
+ - spec/abacos/invoice_spec.rb
161
+ - spec/abacos/order_spec.rb
162
+ - spec/abacos/order_status_spec.rb
163
+ - spec/abacos/payment_condition_spec.rb
164
+ - spec/abacos/payment_method_spec.rb
165
+ - spec/abacos/price_spec.rb
166
+ - spec/abacos/product_spec.rb
167
+ - spec/abacos/shipping_spec.rb
168
+ - spec/abacos/stock_spec.rb
169
+ - spec/cassettes/customer_success.yml
170
+ - spec/cassettes/order_confirm_payment.yml
171
+ - spec/cassettes/order_statuses_confirm.yml
172
+ - spec/cassettes/order_success.yml
173
+ - spec/cassettes/orders_exist.yml
174
+ - spec/cassettes/orders_statuses.yml
175
+ - spec/cassettes/prices_available.yml
176
+ - spec/cassettes/prices_confirm.yml
177
+ - spec/cassettes/products_available.yml
178
+ - spec/cassettes/products_available_empty.yml
179
+ - spec/cassettes/products_available_one.yml
180
+ - spec/cassettes/products_confirm.yml
181
+ - spec/cassettes/stocks_available.yml
182
+ - spec/cassettes/stocks_confirm.yml
183
+ - spec/config.yml.example
184
+ - spec/spec_helper.rb
185
+ homepage: ''
186
+ licenses:
187
+ - MIT
188
+ metadata: {}
189
+ post_install_message:
190
+ rdoc_options: []
191
+ require_paths:
192
+ - lib
193
+ required_ruby_version: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - ">="
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ required_rubygems_version: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - ">="
201
+ - !ruby/object:Gem::Version
202
+ version: '0'
203
+ requirements: []
204
+ rubyforge_project:
205
+ rubygems_version: 2.2.2
206
+ signing_key:
207
+ specification_version: 4
208
+ summary: Ruby API to Abacos
209
+ test_files:
210
+ - spec/abacos/carrier_spec.rb
211
+ - spec/abacos/customer_spec.rb
212
+ - spec/abacos/inventory_spec.rb
213
+ - spec/abacos/invoice_spec.rb
214
+ - spec/abacos/order_spec.rb
215
+ - spec/abacos/order_status_spec.rb
216
+ - spec/abacos/payment_condition_spec.rb
217
+ - spec/abacos/payment_method_spec.rb
218
+ - spec/abacos/price_spec.rb
219
+ - spec/abacos/product_spec.rb
220
+ - spec/abacos/shipping_spec.rb
221
+ - spec/abacos/stock_spec.rb
222
+ - spec/cassettes/customer_success.yml
223
+ - spec/cassettes/order_confirm_payment.yml
224
+ - spec/cassettes/order_statuses_confirm.yml
225
+ - spec/cassettes/order_success.yml
226
+ - spec/cassettes/orders_exist.yml
227
+ - spec/cassettes/orders_statuses.yml
228
+ - spec/cassettes/prices_available.yml
229
+ - spec/cassettes/prices_confirm.yml
230
+ - spec/cassettes/products_available.yml
231
+ - spec/cassettes/products_available_empty.yml
232
+ - spec/cassettes/products_available_one.yml
233
+ - spec/cassettes/products_confirm.yml
234
+ - spec/cassettes/stocks_available.yml
235
+ - spec/cassettes/stocks_confirm.yml
236
+ - spec/config.yml.example
237
+ - spec/spec_helper.rb