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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7dac4a2565afba57b24e1fbce7ae87c45b05d41
4
- data.tar.gz: 3c947fffed2c2c1d48342e4f7bc6031f01a8ed22
3
+ metadata.gz: 112ba1eabefa989e34a00aac464a9be27a066364
4
+ data.tar.gz: 4f27f61021173a1ebdb28a326e752b32c64effb6
5
5
  SHA512:
6
- metadata.gz: 0117f1e78e3d31859afe34152043fdbc756a15f2004ddafa6a003a5133666a1d66bec1e72fe393388334eb2a930e1345bd5fc7006653203ad04446f4f944eba2
7
- data.tar.gz: 517254f5cee98ca536faf52a8a542b7d4f1c0cbc19407193347a3ddbe2f076e8e18cec7ad60e968c99ceab3af42bcd3bb91509dc869f7a3f0dc338234d6c1ca4
6
+ metadata.gz: c9930905765eb2ba4aa66ae78513d2b9eb53cef230358163ab79a0f308ef25ea8e71dc19f37d1a0172ae008eb0f94935575bf2b50e2cb95763299d87b5318015
7
+ data.tar.gz: 1f5d842b53e737f96852a798282f6c1f6a055c550ec935315d56ac3f2d4ae73c0f3cdb0feae3e1a7519784a47055d43b2bfdc10ca02e1726a1a0fdd5dacfc758
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cobrato-client (0.2.1)
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.2)
37
+ pry (0.10.3)
38
38
  coderay (~> 1.1.0)
39
39
  method_source (~> 0.8.1)
40
40
  slop (~> 3.4)
@@ -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, 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 :received, Boolean
19
- attribute :received_amount, Decimal
20
- attribute :received_at, Date
21
- attribute :processing_date, Date
22
- attribute :for_homologation, Boolean
23
- attribute :billet, String
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
@@ -11,6 +11,7 @@ module Cobrato
11
11
  attribute :current_number, Integer
12
12
  attribute :end_number, Integer
13
13
  attribute :status, String
14
+ attribute :payment_methods, Array
14
15
  end
15
16
  end
16
17
  end
@@ -1,3 +1,3 @@
1
1
  module Cobrato
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
- - Marcio Ricardo Santos, Rodrigo Tassinari de Oliveira
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-09-25 00:00:00.000000000 Z
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.