ebanx 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a285d61c2b6152a7d0f1318c2d78ab42df5d7e09
4
- data.tar.gz: 329ae1fe890674380ff872df88a15081682d3205
3
+ metadata.gz: b01d3492add2a5f5eaf0d81c9d29408c2ac7f9e8
4
+ data.tar.gz: d4f018d7bcd044fd8ed0a62a0921b347f6f13286
5
5
  SHA512:
6
- metadata.gz: 3fbf6811a105c632ed59017065124fe9fdb31d02412a9c2c6b4271c1b103e460f7f5a36009a2aa526df763ef414cf392145fc171d5c075ee915039cbd8352075
7
- data.tar.gz: 47e4bb4c846eeb3fb27f7d94e47d32c53f5fc4fabefa60230526143f6097a77f2e488a337c9b7a803b061372a72e0565cd8f763a42efc77eb606d012593be187
6
+ metadata.gz: b3d2ff8740dd2e0a24389f1d01b5447713921b9a9d2da2dcf758bf4ab74b8ee79859b9537b20912f526a7f3ef5540b512aa04d7c583a9b8de178a1c805a6506d
7
+ data.tar.gz: 9ff6b8332cce085d4f5f71a7516363be6f6a9e61ddbb422fff88ea417ed221d72b6084b58bc4f6bbd560977a685c6b9a28e3db4ba5b8c692330884802ea4b8c3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.3.1
@@ -8,6 +8,7 @@ require_relative 'ebanx/command/cancel'
8
8
  require_relative 'ebanx/command/capture'
9
9
  require_relative 'ebanx/command/direct'
10
10
  require_relative 'ebanx/command/document_balance'
11
+ require_relative 'ebanx/command/due_date'
11
12
  require_relative 'ebanx/command/exchange'
12
13
  require_relative 'ebanx/command/print'
13
14
  require_relative 'ebanx/command/get_merchant_integration_properties'
@@ -16,7 +17,9 @@ require_relative 'ebanx/command/query'
16
17
  require_relative 'ebanx/command/refund'
17
18
  require_relative 'ebanx/command/refund_or_cancel'
18
19
  require_relative 'ebanx/command/get_merchant_settlement_info'
20
+ require_relative 'ebanx/command/get_merchant_settlement_extract'
19
21
  require_relative 'ebanx/command/create_merchant_settlement_request'
22
+ require_relative 'ebanx/command/get_merchant_amount_balance_by_country'
20
23
  require_relative 'ebanx/command/request'
21
24
  require_relative 'ebanx/command/token'
22
25
  require_relative 'ebanx/command/zipcode'
@@ -86,4 +89,4 @@ module Ebanx
86
89
  class_name = 'Ebanx::Command::' + method.split('_').map { |w| w.capitalize }.join
87
90
  Object.const_get class_name
88
91
  end
89
- end
92
+ end
@@ -0,0 +1,17 @@
1
+ module Ebanx
2
+ module Command
3
+ class DueDate < Command
4
+ def initialize(params)
5
+ @params = params
6
+ @request_method = :post
7
+ @request_action = 'duedate'
8
+ @response_type = :json
9
+ end
10
+
11
+ def validate
12
+ validate_presence :due_date
13
+ validate_presence :hash
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,16 @@
1
+ module Ebanx
2
+ module Command
3
+ class GetMerchantAmountBalanceByCountry < Command
4
+ def initialize(params)
5
+ @params = params
6
+ @request_method = :get
7
+ @request_action = 'merchantSettlement/getAmountBalanceByCountry'
8
+ @response_type = :json
9
+ end
10
+
11
+ def validate
12
+ validate_presence :country_abbreviation
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,20 @@
1
+ module Ebanx
2
+ module Command
3
+ class GetMerchantSettlementExtract < Command
4
+ def initialize(params)
5
+ @params = params
6
+ @request_method = :get
7
+ @request_action = 'merchantSettlement/getExtract'
8
+ @response_type = :json
9
+ end
10
+
11
+ def validate
12
+ validate_presence :country_abbreviation
13
+ validate_presence :currency_code
14
+ validate_presence :date_field
15
+ validate_presence :date
16
+ validate_presence :hour
17
+ end
18
+ end
19
+ end
20
+ end
@@ -1,3 +1,3 @@
1
1
  module Ebanx
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
@@ -0,0 +1,14 @@
1
+ require_relative '../test_helper'
2
+
3
+ describe Ebanx::Command::GetMerchantAmountBalanceByCountry do
4
+ it 'performs a successful account balance by country' do
5
+ params = { country_abbreviation: 'br' }
6
+ response = ebanx.do_get_merchant_amount_balance_by_country params
7
+ response.http_code.must_equal 200
8
+ response.response['status'].must_equal 'SUCCESS'
9
+ end
10
+
11
+ it "can't run without arguments" do
12
+ lambda { ebanx.do_get_merchant_amount_balance_by_country }.must_raise ArgumentError
13
+ end
14
+ end
@@ -0,0 +1,21 @@
1
+ require_relative '../test_helper'
2
+
3
+ describe Ebanx::Command::GetMerchantSettlementExtract do
4
+ it "can't run without arguments" do
5
+ lambda { ebanx.do_get_merchant_settlement_extract }.must_raise ArgumentError
6
+ end
7
+
8
+ it 'performs a successful settlement extract' do
9
+ params = {
10
+ country_abbreviation: 'br',
11
+ currency_code: 'USD',
12
+ date_field: 'open_date',
13
+ date: '2010-10-10',
14
+ hour: '10:10'
15
+ }
16
+
17
+ response = ebanx.do_get_merchant_settlement_extract params
18
+ response.http_code.must_equal 200
19
+ response.response['status'].must_equal 'SUCCESS'
20
+ end
21
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebanx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gustavo Henrique Mascarenhas Machado
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-15 00:00:00.000000000 Z
11
+ date: 2016-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -118,9 +118,12 @@ files:
118
118
  - lib/ebanx/command/create_merchant_settlement_request.rb
119
119
  - lib/ebanx/command/direct.rb
120
120
  - lib/ebanx/command/document_balance.rb
121
+ - lib/ebanx/command/due_date.rb
121
122
  - lib/ebanx/command/edit_merchant_integration_properties.rb
122
123
  - lib/ebanx/command/exchange.rb
124
+ - lib/ebanx/command/get_merchant_amount_balance_by_country.rb
123
125
  - lib/ebanx/command/get_merchant_integration_properties.rb
126
+ - lib/ebanx/command/get_merchant_settlement_extract.rb
124
127
  - lib/ebanx/command/get_merchant_settlement_info.rb
125
128
  - lib/ebanx/command/print.rb
126
129
  - lib/ebanx/command/query.rb
@@ -135,7 +138,9 @@ files:
135
138
  - test/ebanx/create_merchant_settlement_request_command_test.rb
136
139
  - test/ebanx/direct_command_test.rb
137
140
  - test/ebanx/edit_merchant_integration_properties_command_test.rb
141
+ - test/ebanx/get_merchant_amount_balance_by_country_command_test.rb
138
142
  - test/ebanx/get_merchant_integration_properties_command_test.rb
143
+ - test/ebanx/get_merchant_settlement_extract_command_test.rb
139
144
  - test/ebanx/get_merchant_settlement_info_command_test.rb
140
145
  - test/ebanx/request_command_test.rb
141
146
  - test/ebanx/zipcode_command_test.rb
@@ -169,7 +174,9 @@ test_files:
169
174
  - test/ebanx/create_merchant_settlement_request_command_test.rb
170
175
  - test/ebanx/direct_command_test.rb
171
176
  - test/ebanx/edit_merchant_integration_properties_command_test.rb
177
+ - test/ebanx/get_merchant_amount_balance_by_country_command_test.rb
172
178
  - test/ebanx/get_merchant_integration_properties_command_test.rb
179
+ - test/ebanx/get_merchant_settlement_extract_command_test.rb
173
180
  - test/ebanx/get_merchant_settlement_info_command_test.rb
174
181
  - test/ebanx/request_command_test.rb
175
182
  - test/ebanx/zipcode_command_test.rb