varejonline 0.5.0 → 0.6.0
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 -5
- data/README.md +1 -0
- data/lib/varejonline/api/units.rb +17 -0
- data/lib/varejonline/client.rb +5 -1
- data/lib/varejonline/entity/operational/unit.rb +11 -0
- data/lib/varejonline/version.rb +1 -1
- metadata +14 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d28fa499453df65a9be21dbe1285d26b516c5703
|
4
|
+
data.tar.gz: 50873c201f2c77d53f956092420bd800529d974a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a91e81d7fa3e5138c57087deedce95c2351c592bf650055d48ccc46f995aba889c9d1ae58a8e1ac55834ba6897d864d7f9a49aa1a5809fa00accd3e4cc013bd3
|
7
|
+
data.tar.gz: 2a4474678ac8c217c8a02cf924d5b950315bd032da2e8ce76db3ef404dbcb891c22abef7daf8012107eb296e4c086e39865e3c04a3a00a1512e0c855abf23f6c
|
data/README.md
CHANGED
@@ -50,6 +50,7 @@ With the client instance, you can access the following resources:
|
|
50
50
|
* Baixas (client.payments) **Only creation**
|
51
51
|
* Negociações de Cartão (client.card_negotiations) **Only listing**
|
52
52
|
* Dados Login (client.user_data)
|
53
|
+
* Unidades (client.units) **Listing and finding**
|
53
54
|
|
54
55
|
## Using the resources
|
55
56
|
### Listing
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Varejonline
|
2
|
+
module API
|
3
|
+
class Units < Client
|
4
|
+
require_all 'varejonline/entity/operational', 'unit'
|
5
|
+
|
6
|
+
base_uri "#{Varejonline::API_ADDRESS}/unidades"
|
7
|
+
|
8
|
+
def list
|
9
|
+
return parse_response(self.class.get('/', body: build_body, headers: header))
|
10
|
+
end
|
11
|
+
|
12
|
+
def find(id)
|
13
|
+
return parse_response(self.class.get("/#{id}", body: build_body, headers: header))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/varejonline/client.rb
CHANGED
@@ -12,7 +12,7 @@ module Varejonline
|
|
12
12
|
|
13
13
|
require_all 'varejonline/api', 'third_parties', 'entities', 'default_entries', 'provisions', 'user_data', 'installments', 'credit_limits',
|
14
14
|
'client_classes', 'receivables', 'payables', 'sales_history', 'orders', 'companies', 'sellers', 'products', 'category_levels', 'product_categories',
|
15
|
-
'payment_conditions', 'payments', 'card_negotiations'
|
15
|
+
'payment_conditions', 'payments', 'card_negotiations', 'units'
|
16
16
|
|
17
17
|
attr_accessor :access_token
|
18
18
|
|
@@ -100,6 +100,10 @@ module Varejonline
|
|
100
100
|
def card_negotiations
|
101
101
|
Varejonline::API::CardNegotiations.new(@access_token)
|
102
102
|
end
|
103
|
+
|
104
|
+
def units
|
105
|
+
Varejonline::API::Units.new(@access_token)
|
106
|
+
end
|
103
107
|
|
104
108
|
protected
|
105
109
|
def header
|
data/lib/varejonline/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: varejonline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Coyô
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: httparty
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.14'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.14'
|
41
41
|
description: 'Integração com as APIs do Varejonline, para mais informações sobre a
|
@@ -46,9 +46,9 @@ executables: []
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
-
-
|
50
|
-
-
|
51
|
-
-
|
49
|
+
- .gitignore
|
50
|
+
- .rspec
|
51
|
+
- .travis.yml
|
52
52
|
- Gemfile
|
53
53
|
- README.md
|
54
54
|
- Rakefile
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- lib/varejonline/api/sales_history.rb
|
75
75
|
- lib/varejonline/api/sellers.rb
|
76
76
|
- lib/varejonline/api/third_parties.rb
|
77
|
+
- lib/varejonline/api/units.rb
|
77
78
|
- lib/varejonline/api/user_data.rb
|
78
79
|
- lib/varejonline/client.rb
|
79
80
|
- lib/varejonline/entity/administrative/address.rb
|
@@ -88,6 +89,7 @@ files:
|
|
88
89
|
- lib/varejonline/entity/financial/card_negotiation.rb
|
89
90
|
- lib/varejonline/entity/operational/category_level.rb
|
90
91
|
- lib/varejonline/entity/operational/product_category.rb
|
92
|
+
- lib/varejonline/entity/operational/unit.rb
|
91
93
|
- lib/varejonline/init_from_hash.rb
|
92
94
|
- lib/varejonline/searcher/administrative/company_searcher.rb
|
93
95
|
- lib/varejonline/searcher/administrative/entity_searcher.rb
|
@@ -115,17 +117,17 @@ require_paths:
|
|
115
117
|
- lib
|
116
118
|
required_ruby_version: !ruby/object:Gem::Requirement
|
117
119
|
requirements:
|
118
|
-
- -
|
120
|
+
- - '>='
|
119
121
|
- !ruby/object:Gem::Version
|
120
122
|
version: '0'
|
121
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
124
|
requirements:
|
123
|
-
- -
|
125
|
+
- - '>='
|
124
126
|
- !ruby/object:Gem::Version
|
125
127
|
version: '0'
|
126
128
|
requirements: []
|
127
129
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
130
|
+
rubygems_version: 2.6.12
|
129
131
|
signing_key:
|
130
132
|
specification_version: 4
|
131
133
|
summary: Integração com as APIs do Varejonline
|