cobrato-client 0.1.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/Gemfile.lock +16 -13
- data/README.md +5 -9
- data/lib/cobrato.rb +2 -0
- data/lib/cobrato/client.rb +4 -0
- data/lib/cobrato/entities/bank_billet.rb +11 -0
- data/lib/cobrato/entities/charge.rb +1 -1
- data/lib/cobrato/entities/charge_account.rb +1 -1
- data/lib/cobrato/entities/webhook.rb +2 -2
- data/lib/cobrato/resources/charging_type.rb +21 -0
- data/lib/cobrato/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7dac4a2565afba57b24e1fbce7ae87c45b05d41
|
4
|
+
data.tar.gz: 3c947fffed2c2c1d48342e4f7bc6031f01a8ed22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0117f1e78e3d31859afe34152043fdbc756a15f2004ddafa6a003a5133666a1d66bec1e72fe393388334eb2a930e1345bd5fc7006653203ad04446f4f944eba2
|
7
|
+
data.tar.gz: 517254f5cee98ca536faf52a8a542b7d4f1c0cbc19407193347a3ddbe2f076e8e18cec7ad60e968c99ceab3af42bcd3bb91509dc869f7a3f0dc338234d6c1ca4
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cobrato-client (0.1
|
4
|
+
cobrato-client (0.2.1)
|
5
5
|
multi_json (~> 1.11.1)
|
6
6
|
typhoeus (~> 0.7.2)
|
7
7
|
virtus (~> 1.0.5)
|
@@ -14,9 +14,9 @@ GEM
|
|
14
14
|
descendants_tracker (~> 0.0.4)
|
15
15
|
ice_nine (~> 0.11.0)
|
16
16
|
thread_safe (~> 0.3, >= 0.3.1)
|
17
|
-
byebug (
|
17
|
+
byebug (5.0.0)
|
18
18
|
columnize (= 0.9.0)
|
19
|
-
codeclimate-test-reporter (0.4.
|
19
|
+
codeclimate-test-reporter (0.4.8)
|
20
20
|
simplecov (>= 0.7.1, < 1.0.0)
|
21
21
|
coderay (1.1.0)
|
22
22
|
coercible (1.0.0)
|
@@ -27,31 +27,31 @@ GEM
|
|
27
27
|
diff-lcs (1.2.5)
|
28
28
|
docile (1.1.5)
|
29
29
|
equalizer (0.0.11)
|
30
|
-
ethon (0.
|
30
|
+
ethon (0.8.0)
|
31
31
|
ffi (>= 1.3.0)
|
32
32
|
ffi (1.9.10)
|
33
33
|
ice_nine (0.11.1)
|
34
34
|
json (1.8.3)
|
35
35
|
method_source (0.8.2)
|
36
|
-
multi_json (1.11.
|
37
|
-
pry (0.10.
|
36
|
+
multi_json (1.11.2)
|
37
|
+
pry (0.10.2)
|
38
38
|
coderay (~> 1.1.0)
|
39
39
|
method_source (~> 0.8.1)
|
40
40
|
slop (~> 3.4)
|
41
|
-
pry-byebug (3.
|
42
|
-
byebug (~>
|
41
|
+
pry-byebug (3.2.0)
|
42
|
+
byebug (~> 5.0)
|
43
43
|
pry (~> 0.10)
|
44
44
|
rake (10.4.2)
|
45
45
|
rspec (3.3.0)
|
46
46
|
rspec-core (~> 3.3.0)
|
47
47
|
rspec-expectations (~> 3.3.0)
|
48
48
|
rspec-mocks (~> 3.3.0)
|
49
|
-
rspec-core (3.3.
|
49
|
+
rspec-core (3.3.2)
|
50
50
|
rspec-support (~> 3.3.0)
|
51
|
-
rspec-expectations (3.3.
|
51
|
+
rspec-expectations (3.3.1)
|
52
52
|
diff-lcs (>= 1.2.0, < 2.0)
|
53
53
|
rspec-support (~> 3.3.0)
|
54
|
-
rspec-mocks (3.3.
|
54
|
+
rspec-mocks (3.3.2)
|
55
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
56
56
|
rspec-support (~> 3.3.0)
|
57
57
|
rspec-support (3.3.0)
|
@@ -62,7 +62,7 @@ GEM
|
|
62
62
|
simplecov-html (0.10.0)
|
63
63
|
slop (3.6.0)
|
64
64
|
thread_safe (0.3.5)
|
65
|
-
typhoeus (0.7.
|
65
|
+
typhoeus (0.7.3)
|
66
66
|
ethon (>= 0.7.4)
|
67
67
|
vcr (2.9.3)
|
68
68
|
virtus (1.0.5)
|
@@ -70,7 +70,7 @@ GEM
|
|
70
70
|
coercible (~> 1.0)
|
71
71
|
descendants_tracker (~> 0.0, >= 0.0.3)
|
72
72
|
equalizer (~> 0.0, >= 0.0.9)
|
73
|
-
wisper (1.6.
|
73
|
+
wisper (1.6.1)
|
74
74
|
|
75
75
|
PLATFORMS
|
76
76
|
ruby
|
@@ -84,3 +84,6 @@ DEPENDENCIES
|
|
84
84
|
rspec (~> 3.3)
|
85
85
|
simplecov (~> 0.10)
|
86
86
|
vcr (~> 2.9)
|
87
|
+
|
88
|
+
BUNDLED WITH
|
89
|
+
1.10.6
|
data/README.md
CHANGED
@@ -109,15 +109,11 @@ end
|
|
109
109
|
| PUT | [api/v1/webhooks/:id](http://myfreecomm.github.io/cobrato//api/v1/webhooks/index.html#update) | client.webhooks.update |
|
110
110
|
| DELETE | [api/v1/webhooks/:id](http://myfreecomm.github.io/cobrato//api/v1/webhooks/index.html#delete) | client.webhooks.destroy |
|
111
111
|
|
112
|
-
#### [
|
113
|
-
|
114
|
-
| HTTP method | Endpoint
|
115
|
-
| ----------- |
|
116
|
-
|
|
117
|
-
| GET | [api/v1/webhooks](#todo) | client.webhooks.list |
|
118
|
-
| GET | [api/v1/webhooks/:id](#todo) | client.webhooks.show |
|
119
|
-
| PUT | [api/v1/webhooks/:id](#todo) | client.webhooks.update |
|
120
|
-
| DELETE | [api/v1/webhooks/:id](#todo) | client.webhooks.destroy |
|
112
|
+
#### [Charging types](#todo)
|
113
|
+
|
114
|
+
| HTTP method | Endpoint | Client method |
|
115
|
+
| ----------- | ------------------------------------- | -------------------------- |
|
116
|
+
| GET | [api/v1/charging_types](#todo) | client.changing_types.list |
|
121
117
|
|
122
118
|
## Callbacks
|
123
119
|
|
data/lib/cobrato.rb
CHANGED
@@ -13,6 +13,7 @@ require "cobrato/entities/bank_account"
|
|
13
13
|
require "cobrato/entities/charge_account"
|
14
14
|
require "cobrato/entities/charge"
|
15
15
|
require "cobrato/entities/webhook"
|
16
|
+
require "cobrato/entities/bank_billet"
|
16
17
|
|
17
18
|
require "cobrato/resources/base"
|
18
19
|
require "cobrato/resources/payee"
|
@@ -20,6 +21,7 @@ require "cobrato/resources/bank_account"
|
|
20
21
|
require "cobrato/resources/charge_account"
|
21
22
|
require "cobrato/resources/charge"
|
22
23
|
require "cobrato/resources/webhook"
|
24
|
+
require "cobrato/resources/charging_type"
|
23
25
|
|
24
26
|
module Cobrato
|
25
27
|
def self.configuration
|
data/lib/cobrato/client.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
module Cobrato
|
2
|
+
module Resources
|
3
|
+
class ChargingType < Base
|
4
|
+
|
5
|
+
def collection_name
|
6
|
+
'charging_types'
|
7
|
+
end
|
8
|
+
|
9
|
+
def list
|
10
|
+
http.get(resource_base_path) do |response|
|
11
|
+
bank_billets = parsed_body(response)[collection_name]['bank_billets'].map do |item|
|
12
|
+
Cobrato::Entities::BankBillet.new(item)
|
13
|
+
end
|
14
|
+
|
15
|
+
Struct.new(:bank_billets).new(bank_billets)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/cobrato/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cobrato-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcio Ricardo Santos, Rodrigo Tassinari de Oliveira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -175,6 +175,7 @@ extra_rdoc_files: []
|
|
175
175
|
files:
|
176
176
|
- ".gitignore"
|
177
177
|
- ".hound.yml"
|
178
|
+
- ".rspec"
|
178
179
|
- ".travis.yml"
|
179
180
|
- Gemfile
|
180
181
|
- Gemfile.lock
|
@@ -188,6 +189,7 @@ files:
|
|
188
189
|
- lib/cobrato/client.rb
|
189
190
|
- lib/cobrato/configuration.rb
|
190
191
|
- lib/cobrato/entities/bank_account.rb
|
192
|
+
- lib/cobrato/entities/bank_billet.rb
|
191
193
|
- lib/cobrato/entities/base.rb
|
192
194
|
- lib/cobrato/entities/charge.rb
|
193
195
|
- lib/cobrato/entities/charge_account.rb
|
@@ -200,6 +202,7 @@ files:
|
|
200
202
|
- lib/cobrato/resources/base.rb
|
201
203
|
- lib/cobrato/resources/charge.rb
|
202
204
|
- lib/cobrato/resources/charge_account.rb
|
205
|
+
- lib/cobrato/resources/charging_type.rb
|
203
206
|
- lib/cobrato/resources/hooks.rb
|
204
207
|
- lib/cobrato/resources/payee.rb
|
205
208
|
- lib/cobrato/resources/webhook.rb
|