coins_paid_api 1.2.0 → 1.3.0
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 +4 -4
- data/coins_paid_api.gemspec +1 -1
- data/lib/coins_paid/api/withdrawal.rb +1 -1
- data/spec/withdrawal_spec.rb +8 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37ab167accc89938d66af72334820f588f3eb25c27394b648ddac3b98ab90ef1
|
4
|
+
data.tar.gz: 0efb54ff9fb942ad1c689ed350a5d8bef491f963181dba8918b6240cf1259a85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df5a0d70589d54e6fc919da11bbdf37bcf1ca8ec4df40a80f2f14d424c0e2c56a73169fe6bf23a9bd142a0f1e7160ad5ada5b455292441722e2a455107c0f925
|
7
|
+
data.tar.gz: 0b0a112f21a5d88455af67b2be4aeefc0e45a7d125c1d341cafd3f4b1785d486864a6bdf73b19ee57c2600713ffbf2e1cddd3144e1108e6632babcdad416e58c
|
data/coins_paid_api.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'coins_paid_api'
|
3
3
|
s.authors = ['Artem Biserov(artembiserov)', 'Oleg Ivanov(morhekil)']
|
4
|
-
s.version = '1.
|
4
|
+
s.version = '1.3.0'
|
5
5
|
s.files = `git ls-files`.split("\n")
|
6
6
|
s.summary = 'Coins Paid Integration'
|
7
7
|
s.license = 'MIT'
|
@@ -7,8 +7,8 @@ module CoinsPaid
|
|
7
7
|
attribute :foreign_id, Types::Coercible::String
|
8
8
|
attribute :amount, Types::Coercible::String
|
9
9
|
attribute :currency, Types::String
|
10
|
-
attribute :convert_to, Types::String
|
11
10
|
attribute :address, Types::String
|
11
|
+
attribute? :convert_to, Types::String
|
12
12
|
attribute? :tag, Types::String
|
13
13
|
end
|
14
14
|
|
data/spec/withdrawal_spec.rb
CHANGED
@@ -48,20 +48,24 @@ describe CoinsPaid::API, '.withdraw' do
|
|
48
48
|
{
|
49
49
|
foreign_id: 'user-id:2048',
|
50
50
|
amount: '0.01',
|
51
|
-
currency: '
|
52
|
-
convert_to: 'BTC',
|
51
|
+
currency: 'BTC',
|
53
52
|
address: 'abc123'
|
54
53
|
}
|
55
54
|
end
|
56
55
|
let(:request_body) { request_data.to_json }
|
57
56
|
|
57
|
+
context 'request does not include tag parameter or convert_to' do
|
58
|
+
let(:request_data) { base_request_data }
|
59
|
+
it_behaves_like 'CoinsPaid API withdrawal'
|
60
|
+
end
|
61
|
+
|
58
62
|
context 'request includes tag parameter' do
|
59
63
|
let(:request_data) { base_request_data.merge(tag: 'thetag') }
|
60
64
|
it_behaves_like 'CoinsPaid API withdrawal'
|
61
65
|
end
|
62
66
|
|
63
|
-
context 'request
|
64
|
-
let(:request_data) { base_request_data }
|
67
|
+
context 'request includes convert_to' do
|
68
|
+
let(:request_data) { base_request_data.merge(currency: 'EUR', convert_to: 'BTC') }
|
65
69
|
it_behaves_like 'CoinsPaid API withdrawal'
|
66
70
|
end
|
67
71
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coins_paid_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artem Biserov(artembiserov)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-04-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dry-struct
|