cobrato-client 0.23.0.beta3 → 0.23.0.beta4

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: a18ddc51912b5e55a9b7e0b35f09597fe9fd818b
4
- data.tar.gz: e5abaaf41d8ea713f05a81331692921d8301bb3d
3
+ metadata.gz: 4168db3f83cbcd116274e08c8510111a09216e72
4
+ data.tar.gz: '019282a3de99cf8ec3c18f51bab5d4027ec65272'
5
5
  SHA512:
6
- metadata.gz: 5f6cc2f4cdfa6311eac9a1b330bdf57e5fef4f5680062534c5633023105dbd57a58ef872328c939a70ebec91601373b4f984d01da33bfdec9ee9d9cdedee1a4e
7
- data.tar.gz: d0cb486daf70253ee519de3faaf069227e1f84543960ecaac4f73ab496f7aa8028fcec80698996edd43aa5851a4a38f14abd09b76114be80236be9d313ca7efc
6
+ metadata.gz: 003a1d0745e3ab78710056fb8fd8454bd918071e59aa599550afacac6de314bb9cd06f604ca25be2eaa32067479353a2aa2dd7baaea95721f69a2849ca8392ff
7
+ data.tar.gz: 1727eace46e08c88bad1f8d03b1f3a2c7de92834a2aed190d745f77c3df9d66d0d9ff8ccca64d346bf5fdfb80fbc05874246f9f72b9e1b7596c7b4602d3e3f0a
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## v0.23.0.beta4
6
+
7
+ - Add changes on RegressCnab API:
8
+ - The use of `charge_config_id` for RemittanceCnab creation is now DEPRECATED. Use `config_id` instead.
9
+ - `RegressCnab#charge_config_id` is DEPRECATED. Use `RegressCnab#config_id` instead.
10
+ - Add `RegressCnab#type`.
11
+ - Remove `RegressCnab#report`.
12
+ - Add `RemittanceCnab#type`
13
+
5
14
  ## v0.23.0.beta3
6
15
 
7
16
  - Add `writing_off_deadline` to `ChargeConfig` entity.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cobrato-client (0.23.0.beta3)
4
+ cobrato-client (0.23.0.beta4)
5
5
  multi_json (~> 1.11.2)
6
6
  typhoeus (~> 0.8.0)
7
7
  virtus (~> 1.0.5)
data/lib/cobrato.rb CHANGED
@@ -9,6 +9,7 @@ require "cobrato/http"
9
9
  require "cobrato/signature"
10
10
 
11
11
  require "cobrato/entities/base"
12
+ require "cobrato/entities/cnab"
12
13
  require "cobrato/entities/payee"
13
14
  require "cobrato/entities/payer"
14
15
  require "cobrato/entities/bank_account"
@@ -0,0 +1,16 @@
1
+ module Cobrato
2
+ module Entities
3
+ class Cnab < Base
4
+ attribute :id, Integer
5
+ attribute :type, String
6
+ attribute :status, String
7
+ attribute :config_id, Integer
8
+ attribute :charge_config_id, Integer # DEPRECATED
9
+
10
+ def charge_config_id
11
+ puts "Warning: 'charge_config_id' is deprecated. Use 'config_id' instead."
12
+ super
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,10 +1,6 @@
1
1
  module Cobrato
2
2
  module Entities
3
- class RegressCnab < Base
4
- attribute :id, Integer
5
- attribute :charge_config_id, Integer
6
- attribute :status, String
7
- attribute :report, Hash
3
+ class RegressCnab < Cnab
8
4
  end
9
5
  end
10
6
  end
@@ -1,15 +1,6 @@
1
1
  module Cobrato
2
2
  module Entities
3
- class RemittanceCnab < Base
4
- attribute :id, Integer
5
- attribute :charge_config_id, Integer # DEPRECATED
6
- attribute :config_id, Integer
7
- attribute :status, String
8
-
9
- def charge_config_id
10
- puts "Warning: 'charge_config_id' is deprecated. Use 'config_id' instead."
11
- super
12
- end
3
+ class RemittanceCnab < Cnab
13
4
  end
14
5
  end
15
6
  end
@@ -5,6 +5,11 @@ module Cobrato
5
5
  class RegressCnab < Base
6
6
  crud :create, :show, :list, :destroy
7
7
 
8
+ def create(params)
9
+ deprecate(params, %w[charge_config_id])
10
+ super
11
+ end
12
+
8
13
  def file(id)
9
14
  http.get("#{resource_base_path}/#{id}/file") do |response|
10
15
  respond_with_openstruct(response)
@@ -1,3 +1,3 @@
1
1
  module Cobrato
2
- VERSION = '0.23.0.beta3'
2
+ VERSION = '0.23.0.beta4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cobrato-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0.beta3
4
+ version: 0.23.0.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcio Ricardo Santos
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2017-12-08 00:00:00.000000000 Z
13
+ date: 2017-12-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: typhoeus
@@ -200,6 +200,7 @@ files:
200
200
  - lib/cobrato/entities/charge.rb
201
201
  - lib/cobrato/entities/charge_config.rb
202
202
  - lib/cobrato/entities/charge_template.rb
203
+ - lib/cobrato/entities/cnab.rb
203
204
  - lib/cobrato/entities/credit_card.rb
204
205
  - lib/cobrato/entities/payee.rb
205
206
  - lib/cobrato/entities/payer.rb