bloom_remit_client 0.16.2 → 0.17.0

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
  SHA256:
3
- metadata.gz: '004937907860669c021508a70c07195e00d0ca70dde5077b22528d25229a626e'
4
- data.tar.gz: 4e9ea25dd2e7ae3c18491eac7bea98b1a8fb75a42a71a41b8e57a4b78e6d4918
3
+ metadata.gz: fe2d3c89254fb6d42b0b71b36a9257822156e278c5b6b6ee404df92de89adf88
4
+ data.tar.gz: e23d7e43db64bc42dbc1ea4b6e1ce1304fa0ebbdbb85f4964337185db5e038b6
5
5
  SHA512:
6
- metadata.gz: 4b14558a559a026896d45a4c423d899f5f8e7f8eae1e1dd2ce6d8e86d88133ec1491d979f4db5ac91a6c5a8eac065929cdf0f36d195386e17fc1af536e2dd1ce
7
- data.tar.gz: 71aa7d7d1db260fb1eb02339d01231dc48a3b911be1898a0c3b3906ebe4af31170fad104835be3a5ab5f7ec24968eb57930c8949c9bc84d8735c4f0cd1370d1c
6
+ metadata.gz: c3aca8a98842a779685825388f26f85fd882919ba5cdc8f28796df92ae592c0a20bb24439b9a4905f5fd469d1e185ecaca645e6378d59e8d3353b01ff1e479be
7
+ data.tar.gz: 8cff30a08e0663f88fa264bf7bce4edc92ddfca77b46e4a22a2a145ac46d8fc3abb9202a068665eede0e1d0f4a927f06e4d5dd2936bc2324e4129049208cecf6
@@ -2,15 +2,19 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
- ## [0.16.2] - 2020-01-26
5
+ ## [0.17.0] - 2021-02-01
6
+ ### Added
7
+ - `#get_deposit_targets` to list all deposit targets
8
+
9
+ ## [0.16.2] - 2021-01-26
6
10
  ### Changed
7
11
  - `CreateTxnPreviewResponse#errors` change from `Hash` to `Array`
8
12
 
9
- ## [0.16.1] - 2020-01-19
13
+ ## [0.16.1] - 2021-01-19
10
14
  ### Changed
11
15
  - Allow nil for both `partner_id` and `api_secret
12
16
 
13
- ## [0.16.0] - 2020-01-18
17
+ ## [0.16.0] - 2021-01-18
14
18
  ### Changed
15
19
  - Removed all API methods (complete overhaul)
16
20
 
@@ -8,13 +8,16 @@ require "bloom_remit_client/version"
8
8
  require "bloom_remit_client/client"
9
9
  require "bloom_remit_client/models/txn"
10
10
  require "bloom_remit_client/models/txn_preview"
11
+ require "bloom_remit_client/models/deposit_target"
11
12
  require "bloom_remit_client/requests"
12
13
  require "bloom_remit_client/requests/base_request"
13
14
  require "bloom_remit_client/requests/create_txn_request"
14
15
  require "bloom_remit_client/requests/create_txn_preview_request"
16
+ require "bloom_remit_client/requests/get_deposit_targets_request"
15
17
  require "bloom_remit_client/responses/base_response"
16
18
  require "bloom_remit_client/responses/create_txn_response"
17
19
  require "bloom_remit_client/responses/create_txn_preview_response"
20
+ require "bloom_remit_client/responses/get_deposit_targets_response"
18
21
 
19
22
  module BloomRemitClient
20
23
 
@@ -9,6 +9,7 @@ module BloomRemitClient
9
9
 
10
10
  api_action :create_txn
11
11
  api_action :create_txn_preview
12
+ api_action :get_deposit_targets
12
13
 
13
14
  def default_opts
14
15
  { host: host, partner_id: partner_id, api_secret: api_secret }
@@ -0,0 +1,23 @@
1
+ module BloomRemitClient
2
+ class DepositTarget
3
+
4
+ include Virtus.model
5
+
6
+ attribute :slug, String
7
+ attribute :name, String
8
+ attribute :active, Boolean
9
+ attribute :wait_time, String
10
+ attribute :support_line, String
11
+ attribute :sameday_cutoff, Integer
12
+ attribute :maximum, BigDecimal
13
+ attribute :availability, Array
14
+ attribute :availability_daynames, String
15
+ attribute :currencies, Array
16
+ attribute :required_fields, Array
17
+ attribute :type, String
18
+ attribute :iso_code, String
19
+ attribute :data, Hash
20
+ attribute :country, String
21
+
22
+ end
23
+ end
@@ -0,0 +1,13 @@
1
+ module BloomRemitClient
2
+ class GetDepositTargetsRequest < BaseRequest
3
+
4
+ def default_action
5
+ :get
6
+ end
7
+
8
+ def path
9
+ "/api/v1/strategies"
10
+ end
11
+
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ module BloomRemitClient
2
+ class GetDepositTargetsResponse < BaseResponse
3
+
4
+ attribute :deposit_targets, Array, lazy: true, default: :default_deposit_targets
5
+
6
+ def default_deposit_targets
7
+ JSON.parse(body).map do |deposit_target_hash|
8
+ hash = deposit_target_hash.with_indifferent_access
9
+ DepositTarget.new(hash)
10
+ end
11
+ end
12
+
13
+ end
14
+ end
@@ -1,3 +1,3 @@
1
1
  module BloomRemitClient
2
- VERSION = "0.16.2"
2
+ VERSION = "0.17.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bloom_remit_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.2
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-26 00:00:00.000000000 Z
11
+ date: 2021-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -204,15 +204,18 @@ files:
204
204
  - lib/bloom_remit_client/client.rb
205
205
  - lib/bloom_remit_client/coercers/indifferent_hash.rb
206
206
  - lib/bloom_remit_client/factories.rb
207
+ - lib/bloom_remit_client/models/deposit_target.rb
207
208
  - lib/bloom_remit_client/models/txn.rb
208
209
  - lib/bloom_remit_client/models/txn_preview.rb
209
210
  - lib/bloom_remit_client/requests.rb
210
211
  - lib/bloom_remit_client/requests/base_request.rb
211
212
  - lib/bloom_remit_client/requests/create_txn_preview_request.rb
212
213
  - lib/bloom_remit_client/requests/create_txn_request.rb
214
+ - lib/bloom_remit_client/requests/get_deposit_targets_request.rb
213
215
  - lib/bloom_remit_client/responses/base_response.rb
214
216
  - lib/bloom_remit_client/responses/create_txn_preview_response.rb
215
217
  - lib/bloom_remit_client/responses/create_txn_response.rb
218
+ - lib/bloom_remit_client/responses/get_deposit_targets_response.rb
216
219
  - lib/bloom_remit_client/version.rb
217
220
  homepage: https://github.com/imacchiato/bloom_remit_client-ruby
218
221
  licenses: