dannysmith_coolpay 0.1.5 → 0.1.6

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: ebf4cea55158599af3163e7e4282c57af9f939e4
4
- data.tar.gz: b0b80d34f59bb2cf9827bede92128887ea456ca9
3
+ metadata.gz: 4bfcb8b487ecea68c3a6bc711af4085a82d957df
4
+ data.tar.gz: eaf50d5ccb00de46c031c775a5f753a4e6e223a7
5
5
  SHA512:
6
- metadata.gz: cc4316bb2ff350c2ac1e025450702ffa7c4a9b66b243155f0bfe4e1f533d51392033e642adcfe98af1c510470b74ef2917069b09df6183627ca5d200dc00f31e
7
- data.tar.gz: 9b27bb9a7111411fdb53c288e824fe57e03cd898aa39b4cb36a58e7328d1d1e72871b6c1187bce17bb03d5798642377396abd41addbb02c45249e768097409dd
6
+ metadata.gz: 43e3ce113d3f4687beda7fe31c06286876ddec5db113fe1f553900d521a78de727eb9f94ecac34cc3fa0a3535abf8ac6d1270d16437d740230c1d0f85086e61c
7
+ data.tar.gz: 30d8655f4fa45408f465b8255436a8757b28b616d5de2b5cb8002544ca0780f1d4455ebe8dad3b37c2ffafb490d921f916ec2c4c236904925ef01142da84423f
@@ -33,10 +33,11 @@ module Coolpay
33
33
  res = call_api '/payments', method: :post, body: {
34
34
  payment: {amount: amount, recipient_id: recipient_id, currency: currency}
35
35
  }
36
+ recipient_list = recipients()
36
37
  if res.code == 201
37
38
  Payment.new(
38
39
  amount: res['payment']['amount'],
39
- recipient: find_by_id(res['payment']['recipient_id'], recipients),
40
+ recipient: find_by_id(res['payment']['recipient_id'], recipient_list),
40
41
  id: res['payment']['id'],
41
42
  currency: res['payment']['currency'],
42
43
  status: res['payment']['status']
@@ -46,11 +47,12 @@ module Coolpay
46
47
 
47
48
  def payments
48
49
  res = call_api '/payments', method: :get
50
+ recipient_list = recipients()
49
51
  if res.code == 200
50
52
  res['payments'].map{ |r| Payment.new(
51
53
  id: r['id'],
52
54
  amount: r['amount'],
53
- recipient: find_by_id(r['recipient_id'], recipients),
55
+ recipient: find_by_id(r['recipient_id'], recipient_list),
54
56
  status: r['status'],
55
57
  currency: r['currency']
56
58
  ) }
@@ -1,3 +1,3 @@
1
1
  module Coolpay
2
- VERSION = '0.1.5'.freeze
2
+ VERSION = '0.1.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dannysmith_coolpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Smith