bloom_remit_client 0.16.2 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -3
- data/lib/bloom_remit_client.rb +9 -3
- data/lib/bloom_remit_client/client.rb +1 -0
- data/lib/bloom_remit_client/models/deposit_target.rb +23 -0
- data/lib/bloom_remit_client/requests/get_deposit_targets_request.rb +13 -0
- data/lib/bloom_remit_client/responses/create_txn_response.rb +5 -0
- data/lib/bloom_remit_client/responses/get_deposit_targets_response.rb +14 -0
- data/lib/bloom_remit_client/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4f4ff66ac8ee1b8dc1a7aeeab7665e75e605bbe8a3a17c11b8a0f4118ae5062
|
4
|
+
data.tar.gz: b9f4a49ce06f28019207492a2592a7fa9fa6e604f5489ec1ca5d235fe2f22712
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64ec567416a2f7166bc678046f5a5151d65b5243c8cf231d12bc8b1cbed9c7ff417baa17607075f7d9b3d88353de4dc62241c10a6f5d08d39b7968873ea406cf
|
7
|
+
data.tar.gz: 27bc88758fbfea05e6445c0a3d88cf70d60b755fe91480993d515eba4c1ac36a0bddb1d5eec6baf7e6904c261fab44b153e4bbff275f98a8fc9758c2f2b95696
|
data/CHANGELOG.md
CHANGED
@@ -2,15 +2,35 @@
|
|
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.
|
5
|
+
## [0.18.0] - 2021-03-10
|
6
|
+
### Changed
|
7
|
+
- Pass `message_id` of 0 so it reads logs from the start on boot
|
8
|
+
|
9
|
+
## [0.17.3] - 2021-02-19
|
10
|
+
### Fixed
|
11
|
+
- Pass `Authorization` header to BloomRemit
|
12
|
+
|
13
|
+
## [0.17.2] - 2021-02-11
|
14
|
+
### Changed
|
15
|
+
- Update messagebus channel to `/v2/tx_events` (from `/v2/txns`)
|
16
|
+
|
17
|
+
## [0.17.1] - 2021-02-03
|
18
|
+
### Added
|
19
|
+
- Add `create_txn#errors` to easily access errors
|
20
|
+
|
21
|
+
## [0.17.0] - 2021-02-01
|
22
|
+
### Added
|
23
|
+
- `#get_deposit_targets` to list all deposit targets
|
24
|
+
|
25
|
+
## [0.16.2] - 2021-01-26
|
6
26
|
### Changed
|
7
27
|
- `CreateTxnPreviewResponse#errors` change from `Hash` to `Array`
|
8
28
|
|
9
|
-
## [0.16.1] -
|
29
|
+
## [0.16.1] - 2021-01-19
|
10
30
|
### Changed
|
11
31
|
- Allow nil for both `partner_id` and `api_secret
|
12
32
|
|
13
|
-
## [0.16.0] -
|
33
|
+
## [0.16.0] - 2021-01-18
|
14
34
|
### Changed
|
15
35
|
- Removed all API methods (complete overhaul)
|
16
36
|
|
data/lib/bloom_remit_client.rb
CHANGED
@@ -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
|
|
@@ -23,7 +26,7 @@ module BloomRemitClient
|
|
23
26
|
|
24
27
|
include APIClientBase::Base.module
|
25
28
|
|
26
|
-
TXN_UPDATES_CHANNEL = "/v2/
|
29
|
+
TXN_UPDATES_CHANNEL = "/v2/tx_events".freeze
|
27
30
|
|
28
31
|
with_configuration do
|
29
32
|
has :host, classes: String, default: STAGING
|
@@ -45,10 +48,13 @@ module BloomRemitClient
|
|
45
48
|
|
46
49
|
MessageBusClientWorker.subscribe(configuration.host, {
|
47
50
|
headers: {
|
48
|
-
"
|
51
|
+
"Authorization" => "Basic #{token}"
|
49
52
|
},
|
50
53
|
channels: {
|
51
|
-
TXN_UPDATES_CHANNEL => {
|
54
|
+
TXN_UPDATES_CHANNEL => {
|
55
|
+
processor: configuration.on_txn_update,
|
56
|
+
message_id: 0,
|
57
|
+
},
|
52
58
|
}
|
53
59
|
})
|
54
60
|
end
|
@@ -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
|
@@ -1,8 +1,13 @@
|
|
1
1
|
module BloomRemitClient
|
2
2
|
class CreateTxnResponse < BaseResponse
|
3
3
|
|
4
|
+
attribute :errors, Array, lazy: true, default: :default_errors
|
4
5
|
attribute :txn, Txn, lazy: true, default: :default_txn
|
5
6
|
|
7
|
+
def default_errors
|
8
|
+
Array(parsed_body[:errors])
|
9
|
+
end
|
10
|
+
|
6
11
|
def default_txn
|
7
12
|
Txn.new(parsed_body[:txn])
|
8
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
|
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.
|
4
|
+
version: 0.18.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-
|
11
|
+
date: 2021-03-10 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:
|