coins_paid_api 1.2.0 → 1.3.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: 14dc12db1d0e7f9f90746feb4e0ec39f491bdf2533984282e197cc87babad6dd
4
- data.tar.gz: 34baccc03be0e0fd327f7240f71a58fa181805ae835a105e158db3863722610b
3
+ metadata.gz: 37ab167accc89938d66af72334820f588f3eb25c27394b648ddac3b98ab90ef1
4
+ data.tar.gz: 0efb54ff9fb942ad1c689ed350a5d8bef491f963181dba8918b6240cf1259a85
5
5
  SHA512:
6
- metadata.gz: cb016be8a69caefbb956d4d7939164f78e4d6fed5b6f3d3b1dba050284a57e6c882725e60a7f2439a80483aad724e3eb9b6647ba76286ffff696bfa1edd70e2d
7
- data.tar.gz: 345be14c726a21cd9f4f21ac98dc11aa46ff1a95b92cf690a445f0d2dbad90252106bf1d4fb7aec0f1f41fc59d42f497f83b04bdcfaeec7b303f498a8cacab50
6
+ metadata.gz: df5a0d70589d54e6fc919da11bbdf37bcf1ca8ec4df40a80f2f14d424c0e2c56a73169fe6bf23a9bd142a0f1e7160ad5ada5b455292441722e2a455107c0f925
7
+ data.tar.gz: 0b0a112f21a5d88455af67b2be4aeefc0e45a7d125c1d341cafd3f4b1785d486864a6bdf73b19ee57c2600713ffbf2e1cddd3144e1108e6632babcdad416e58c
@@ -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.2.0'
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
 
@@ -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: 'EUR',
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 does not include tag parameter' do
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.2.0
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-03-31 00:00:00.000000000 Z
12
+ date: 2022-04-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dry-struct