stannp 0.1.0 → 0.2.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 +5 -4
- data/lib/stannp/objects/receipt.rb +5 -0
- data/lib/stannp/resources/account.rb +6 -0
- data/lib/stannp/version.rb +1 -1
- data/lib/stannp.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59a7326c7fc932044cc7706a6e13769012cc269b253efa3ec51dae2b7c2517ea
|
4
|
+
data.tar.gz: f5cb65cc496bbe21d4657a65053af6518fc812a573590648a5ccb2949e23ce02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb4f1277029da2883fc36eea3e5ba72ba7b61d29fe10580f69d98894669952d6581d3208933d5c1ef67934a14ec4881ec194776e83e2a617da1930bb964466c4
|
7
|
+
data.tar.gz: 882d0899a9beaaf8877bf944645e76fe3f32c208630da4700e5b4aa7dc26a5a02e0e7c5cbab0aa6b2f98379cc77117ce5a27cd72ef220b98307946b27d5da846
|
data/CHANGELOG.md
CHANGED
@@ -6,5 +6,11 @@ module Stannp
|
|
6
6
|
url = "https://dash.stannp.com/api/v1/accounts/balance?api_key=#{client.api_key}}"
|
7
7
|
get_request(url).body['data']['balance']
|
8
8
|
end
|
9
|
+
|
10
|
+
def top_up(amount:)
|
11
|
+
url = "https://dash.stannp.com/api/v1/accounts/topup?api_key=#{client.api_key}}"
|
12
|
+
url = post_request(url, body: { net: amount.to_f.to_s }).body['data']['receipt_pdf']
|
13
|
+
Stannp::Receipt.new(url: url)
|
14
|
+
end
|
9
15
|
end
|
10
16
|
end
|
data/lib/stannp/version.rb
CHANGED
data/lib/stannp.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stannp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k-p-jones
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -58,6 +58,7 @@ files:
|
|
58
58
|
- lib/stannp/error.rb
|
59
59
|
- lib/stannp/list.rb
|
60
60
|
- lib/stannp/object.rb
|
61
|
+
- lib/stannp/objects/receipt.rb
|
61
62
|
- lib/stannp/objects/recipient.rb
|
62
63
|
- lib/stannp/objects/user.rb
|
63
64
|
- lib/stannp/resource.rb
|