selida-wlc-ruby 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wlc/resources/product.rb +7 -1
- data/lib/wlc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 798b14cee7a2263e804237b2593f5556afcb04a55d3c3585592b84c2a9303b1b
|
4
|
+
data.tar.gz: 5ff85cc11d38e99a10d4dbb164880d6d256a5d74ed40969e6f1ab8e1b15db8d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c465a51c40ad5ed96f7caca43f49e8627ba4b88c98ca238776249ade81b342fc6f83ff518124336bcc66d3d13f93a14d3b2dd18f19aec1076f80b64f95cac61
|
7
|
+
data.tar.gz: 79694d3d1a32c10c4df5cc45d2ac67dffe54a91e1895bc4f8bf9af978a354fe8925188e2e8c922db42382df9d89474a3cb7fb8a59326e24fe8eedf6650677e3e
|
@@ -3,7 +3,8 @@ module Wlc
|
|
3
3
|
class Product < Resource
|
4
4
|
ENDPOINTS = { index: '/Produtos/Produto/ConsultaProdutos',
|
5
5
|
find: '/Produtos/Produto/ConsultaProduto',
|
6
|
-
availability: '/Produtos/Produto/ConsultaDisponibilidadeProduto'
|
6
|
+
availability: '/Produtos/Produto/ConsultaDisponibilidadeProduto',
|
7
|
+
category: '/Produtos/Produto/ConsultaCategorias' }
|
7
8
|
|
8
9
|
def all
|
9
10
|
response = client.get(ENDPOINTS[:index])
|
@@ -19,6 +20,11 @@ module Wlc
|
|
19
20
|
response = client.get(ENDPOINTS[:availability], { Codigo: codigo })
|
20
21
|
response['obj_return'][:disponivel]
|
21
22
|
end
|
23
|
+
|
24
|
+
def categories
|
25
|
+
response = client.get(ENDPOINTS[:category])
|
26
|
+
response['success'] ? response['obj_return'] : response
|
27
|
+
end
|
22
28
|
end
|
23
29
|
end
|
24
30
|
end
|
data/lib/wlc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selida-wlc-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ellen Fiscina
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-08-
|
12
|
+
date: 2018-08-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|