cobrato-client 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/cobrato-client-ruby.gemspec +2 -2
- data/lib/cobrato/entities/charge.rb +29 -20
- data/lib/cobrato/entities/charge_account.rb +1 -0
- data/lib/cobrato/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 112ba1eabefa989e34a00aac464a9be27a066364
|
4
|
+
data.tar.gz: 4f27f61021173a1ebdb28a326e752b32c64effb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9930905765eb2ba4aa66ae78513d2b9eb53cef230358163ab79a0f308ef25ea8e71dc19f37d1a0172ae008eb0f94935575bf2b50e2cb95763299d87b5318015
|
7
|
+
data.tar.gz: 1f5d842b53e737f96852a798282f6c1f6a055c550ec935315d56ac3f2d4ae73c0f3cdb0feae3e1a7519784a47055d43b2bfdc10ca02e1726a1a0fdd5dacfc758
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cobrato-client (0.2.
|
4
|
+
cobrato-client (0.2.2)
|
5
5
|
multi_json (~> 1.11.1)
|
6
6
|
typhoeus (~> 0.7.2)
|
7
7
|
virtus (~> 1.0.5)
|
@@ -34,7 +34,7 @@ GEM
|
|
34
34
|
json (1.8.3)
|
35
35
|
method_source (0.8.2)
|
36
36
|
multi_json (1.11.2)
|
37
|
-
pry (0.10.
|
37
|
+
pry (0.10.3)
|
38
38
|
coderay (~> 1.1.0)
|
39
39
|
method_source (~> 0.8.1)
|
40
40
|
slop (~> 3.4)
|
data/cobrato-client-ruby.gemspec
CHANGED
@@ -6,8 +6,8 @@ require 'cobrato/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "cobrato-client"
|
8
8
|
spec.version = Cobrato::VERSION
|
9
|
-
spec.authors = ["Marcio Ricardo Santos, Rodrigo Tassinari de Oliveira"]
|
10
|
-
spec.email = ["mrsantos.caxias@gmail.com", "rodrigo@pittlandia.net"]
|
9
|
+
spec.authors = ["Marcio Ricardo Santos", "Rodrigo Tassinari de Oliveira", "Hugo Maia Vieira"]
|
10
|
+
spec.email = ["mrsantos.caxias@gmail.com", "rodrigo@pittlandia.net", "hugomaiavieira@gmail.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{This is the official Ruby client for the Cobrato API.}
|
13
13
|
spec.description = %q{This is the official Ruby client for the Cobrato API. See https://app.cobrato.com for more information.}
|
@@ -1,26 +1,35 @@
|
|
1
1
|
module Cobrato
|
2
2
|
module Entities
|
3
3
|
class Charge < Base
|
4
|
-
attribute :id,
|
5
|
-
attribute :charge_account_id,
|
6
|
-
attribute :due_date,
|
7
|
-
attribute :processing_date,
|
8
|
-
attribute :document_kind,
|
9
|
-
attribute :document_date,
|
10
|
-
attribute :document_number,
|
11
|
-
attribute :custom_our_number,
|
12
|
-
attribute :our_number,
|
13
|
-
attribute :our_number_digit,
|
14
|
-
attribute :total_amount,
|
15
|
-
attribute :instructions,
|
16
|
-
attribute :demonstrative,
|
17
|
-
attribute :payer_emails,
|
18
|
-
attribute :
|
19
|
-
attribute :
|
20
|
-
attribute :
|
21
|
-
attribute :
|
22
|
-
attribute :
|
23
|
-
attribute :
|
4
|
+
attribute :id, Integer
|
5
|
+
attribute :charge_account_id, Integer
|
6
|
+
attribute :due_date, Date
|
7
|
+
attribute :processing_date, Date
|
8
|
+
attribute :document_kind, String
|
9
|
+
attribute :document_date, Date
|
10
|
+
attribute :document_number, String
|
11
|
+
attribute :custom_our_number, Boolean
|
12
|
+
attribute :our_number, String
|
13
|
+
attribute :our_number_digit, String
|
14
|
+
attribute :total_amount, Decimal
|
15
|
+
attribute :instructions, String
|
16
|
+
attribute :demonstrative, String
|
17
|
+
attribute :payer_emails, String
|
18
|
+
attribute :payer_info, String
|
19
|
+
attribute :received, Boolean
|
20
|
+
attribute :received_amount, Decimal
|
21
|
+
attribute :received_at, Date
|
22
|
+
attribute :processing_date, Date
|
23
|
+
attribute :for_homologation, Boolean
|
24
|
+
attribute :payment_method, String
|
25
|
+
attribute :has_cnab_remittance, Boolean
|
26
|
+
attribute :billet_url, String
|
27
|
+
|
28
|
+
def initialize(attrs)
|
29
|
+
attrs = JSON.parse(attrs.to_json, symbolize_names: true)
|
30
|
+
attrs[:billet_url] = attrs[:_links].find { |l| l[:rel] == 'billet' }[:href]
|
31
|
+
super attrs
|
32
|
+
end
|
24
33
|
end
|
25
34
|
end
|
26
35
|
end
|
data/lib/cobrato/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cobrato-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Marcio Ricardo Santos
|
7
|
+
- Marcio Ricardo Santos
|
8
|
+
- Rodrigo Tassinari de Oliveira
|
9
|
+
- Hugo Maia Vieira
|
8
10
|
autorequire:
|
9
11
|
bindir: exe
|
10
12
|
cert_chain: []
|
11
|
-
date: 2015-
|
13
|
+
date: 2015-10-15 00:00:00.000000000 Z
|
12
14
|
dependencies:
|
13
15
|
- !ruby/object:Gem::Dependency
|
14
16
|
name: typhoeus
|
@@ -169,6 +171,7 @@ description: This is the official Ruby client for the Cobrato API. See https://a
|
|
169
171
|
email:
|
170
172
|
- mrsantos.caxias@gmail.com
|
171
173
|
- rodrigo@pittlandia.net
|
174
|
+
- hugomaiavieira@gmail.com
|
172
175
|
executables: []
|
173
176
|
extensions: []
|
174
177
|
extra_rdoc_files: []
|
@@ -228,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
228
231
|
version: '0'
|
229
232
|
requirements: []
|
230
233
|
rubyforge_project:
|
231
|
-
rubygems_version: 2.4.5
|
234
|
+
rubygems_version: 2.4.5.1
|
232
235
|
signing_key:
|
233
236
|
specification_version: 4
|
234
237
|
summary: This is the official Ruby client for the Cobrato API.
|