cobrato-client 1.1.3 → 1.1.4

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: 55adddfbda7379f5065a8bf12734d5db070e68ed
4
- data.tar.gz: 9924f5fa5c943dc2f8f7d472831426701d31fa4d
3
+ metadata.gz: 29fdf154aa5a24f615d2d98b85c853a08afab6fd
4
+ data.tar.gz: aa5fb8ef28e17ae49bc7cdb6984a66cfed71aad7
5
5
  SHA512:
6
- metadata.gz: 91cdc555d6aa9ea997e126aa1578739cb40042443b49e61ab1335f207ab1d0677b620677de90fe15c91c3983e3386b05992850a4f9ff7f1c2c65efa6f5c01213
7
- data.tar.gz: 04d6edea291057eb4a37a3e3f06b093cc3c8d7c2338cd20c4cf2236fe660deef8ce3037d845761a3449dce672936ba6ea3420b32392ef7443af5001241b47dea
6
+ metadata.gz: 6ae8049afe0378e15f758a5e95a22701899e0a144537ac84e16fd9a6dbd671abdbd807301e50fe7b5eb316f6b22a1355186814a83ec891e4d224f0aacd5e4fc9
7
+ data.tar.gz: b26647b4c8588d533784549b8e67bd11bd4d78f623858547f16a1ef3b8c304a06becc727c40c0c83cf52b9778387e11173c7f4b0b5fb6bbfa0b8e7938a9b1c80
@@ -2,7 +2,13 @@
2
2
 
3
3
  ## Next version
4
4
 
5
- - Add support for register error
5
+ ## v1.1.4
6
+
7
+ - Add `payment_methods#list` endpoint
8
+
9
+ ## v1.1.3
10
+
11
+ - Add `payments#reschedule` endpoint
6
12
 
7
13
  ## v1.1.2
8
14
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cobrato-client (1.1.3)
4
+ cobrato-client (1.1.4)
5
5
  multi_json (~> 1.11)
6
6
  typhoeus (~> 0.8.0)
7
7
  virtus (~> 1.0.5)
data/README.md CHANGED
@@ -219,6 +219,13 @@ Now you have acess to every API endpoint:
219
219
  | POST | [api/v1/payments/:id/reschedule](http://docs.cobrato.com/#reagendar-pagamento) | client.payments.reschedule |
220
220
 
221
221
 
222
+ #### [PaymentMethod](http://docs.cobrato.com/#m-todo-de-pagamento)
223
+
224
+ | HTTP method | Endpoint | Client method |
225
+ | ----------- | --------------------------------------------------------------------------------------------------- | ------------------------------ |
226
+ | GET | [api/v1/payment_methods](http://docs.cobrato.com/#lista-de-todos-os-m-todos-de-pagamento) | client.payment_methods.list |
227
+
228
+
222
229
  ## Payload signature check
223
230
 
224
231
  You can check the [Cobrato signature](http://docs.cobrato.com/#assinatura-do-payload) on the payload request:
@@ -16,6 +16,7 @@ require "cobrato/entities/person"
16
16
  require "cobrato/entities/bank_account"
17
17
  require "cobrato/entities/charge_config"
18
18
  require "cobrato/entities/payment_config"
19
+ require "cobrato/entities/payment_method"
19
20
  require "cobrato/entities/payment"
20
21
  require "cobrato/entities/charge"
21
22
  require "cobrato/entities/webhook"
@@ -33,6 +34,7 @@ require "cobrato/resources/bank_account"
33
34
  require "cobrato/resources/charge_config"
34
35
  require "cobrato/resources/payment_config"
35
36
  require "cobrato/resources/payment"
37
+ require "cobrato/resources/payment_method"
36
38
  require "cobrato/resources/charge"
37
39
  require "cobrato/resources/webhook"
38
40
  require "cobrato/resources/charging_type"
@@ -0,0 +1,9 @@
1
+ module Cobrato
2
+ module Entities
3
+ class PaymentMethod < Base
4
+ attribute :identifier, String
5
+ attribute :group, String
6
+ attribute :label, String
7
+ end
8
+ end
9
+ end
@@ -108,7 +108,6 @@ module Cobrato
108
108
  @entity_klass ||= Cobrato::Entities.const_get(class_name.to_sym)
109
109
  end
110
110
 
111
-
112
111
  def underscore_pluralized(str)
113
112
  irregular_resource_name || "#{str.gsub(/(.)([A-Z])/, '\1_\2').downcase}s"
114
113
  end
@@ -0,0 +1,8 @@
1
+ module Cobrato
2
+ module Resources
3
+ class PaymentMethod < Base
4
+ crud :list
5
+
6
+ end
7
+ end
8
+ end
@@ -1,3 +1,3 @@
1
1
  module Cobrato
2
- VERSION = '1.1.3'
2
+ VERSION = '1.1.4'
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: 1.1.3
4
+ version: 1.1.4
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: 2018-10-22 00:00:00.000000000 Z
13
+ date: 2018-11-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: typhoeus
@@ -206,6 +206,7 @@ files:
206
206
  - lib/cobrato/entities/payer.rb
207
207
  - lib/cobrato/entities/payment.rb
208
208
  - lib/cobrato/entities/payment_config.rb
209
+ - lib/cobrato/entities/payment_method.rb
209
210
  - lib/cobrato/entities/person.rb
210
211
  - lib/cobrato/entities/regress_cnab.rb
211
212
  - lib/cobrato/entities/remittance_cnab.rb
@@ -225,6 +226,7 @@ files:
225
226
  - lib/cobrato/resources/payer.rb
226
227
  - lib/cobrato/resources/payment.rb
227
228
  - lib/cobrato/resources/payment_config.rb
229
+ - lib/cobrato/resources/payment_method.rb
228
230
  - lib/cobrato/resources/person.rb
229
231
  - lib/cobrato/resources/regress_cnab.rb
230
232
  - lib/cobrato/resources/remittance_cnab.rb