paystack 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paystack.rb +1 -1
- data/lib/paystack/modules/api.rb +2 -0
- data/lib/paystack/objects/banks.rb +12 -0
- data/lib/paystack/objects/subaccounts.rb +37 -0
- data/lib/paystack/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb366e37dbe506cf360fd40f6cb062d666ea7f2a
|
4
|
+
data.tar.gz: 9dc2efb61e565d8b186bfb475e5c04fd8ff97b5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5680617e95a07aa69db0285af5022a10f90ade70dd64eb6a33f3d98616d2ca7292b3a5bf7bbead4bde8a62f5d26104e26db9e2ffb7f1b87add86c9bbbfc76b5f
|
7
|
+
data.tar.gz: cc8141ba0e7c4ea5e97de5fb1f869acd0bde317a1c0bb2a49d70490809890bf80bdc881305d280e1220237c534b76f471002d930a41185db7b7b9d4a81d558d6
|
data/lib/paystack.rb
CHANGED
@@ -7,6 +7,7 @@ require 'paystack/objects/customers.rb'
|
|
7
7
|
require 'paystack/objects/plans.rb'
|
8
8
|
require 'paystack/objects/subscriptions.rb'
|
9
9
|
require 'paystack/objects/transactions.rb'
|
10
|
+
require 'paystack/objects/banks.rb'
|
10
11
|
|
11
12
|
|
12
13
|
class Paystack
|
@@ -52,4 +53,3 @@ class Paystack
|
|
52
53
|
end
|
53
54
|
|
54
55
|
end
|
55
|
-
|
data/lib/paystack/modules/api.rb
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'paystack/objects/base.rb'
|
2
|
+
|
3
|
+
class PaystackBanks < PaystackBaseObject
|
4
|
+
def list(page=1)
|
5
|
+
return PaystackBanks.list(@paystack, page)
|
6
|
+
end
|
7
|
+
|
8
|
+
|
9
|
+
def PaystackBanks.list(paystackObj, page=1)
|
10
|
+
initGetRequest(paystackObj, "#{API::BANK_PATH}?page=#{page}")
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'paystack/objects/base.rb'
|
2
|
+
|
3
|
+
class PaystackSubaccounts < PaystackBaseObject
|
4
|
+
def create(data={})
|
5
|
+
return PaystackSubaccounts.create(@paystack, data)
|
6
|
+
end
|
7
|
+
|
8
|
+
def get(subaccount_id)
|
9
|
+
return PaystackSubaccounts.get(@paystack, subaccount_id)
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
def update(subaccount_id, data={})
|
14
|
+
return PaystackSubaccounts.update(@paystack, subaccount_id, data)
|
15
|
+
end
|
16
|
+
|
17
|
+
def list(page=1)
|
18
|
+
return PaystackSubaccounts.list(@paystack, page)
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
def PaystackSubaccounts.create(paystackObj, data)
|
23
|
+
initPostRequest(paystackObj,"#{API::SUBACCOUNT_PATH}", data)
|
24
|
+
end
|
25
|
+
|
26
|
+
def PaystackSubaccounts.update(paystackObj, subaccount_id, data)
|
27
|
+
initPutRequest(paystackObj,"#{API::SUBACCOUNT_PATH}/#{subaccount_id}", data)
|
28
|
+
end
|
29
|
+
|
30
|
+
def PaystackSubaccounts.get(paystackObj, subaccount_id)
|
31
|
+
initGetRequest(paystackObj, "#{API::SUBACCOUNT_PATH}/#{subaccount_id}")
|
32
|
+
end
|
33
|
+
|
34
|
+
def PaystackSubaccounts.list(paystackObj, page=1)
|
35
|
+
initGetRequest(paystackObj, "#{API::SUBACCOUNT_PATH}?page=#{page}")
|
36
|
+
end
|
37
|
+
end
|
data/lib/paystack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paystack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Ikoro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,10 +86,12 @@ files:
|
|
86
86
|
- lib/paystack.rb
|
87
87
|
- lib/paystack/error.rb
|
88
88
|
- lib/paystack/modules/api.rb
|
89
|
+
- lib/paystack/objects/banks.rb
|
89
90
|
- lib/paystack/objects/base.rb
|
90
91
|
- lib/paystack/objects/card.rb
|
91
92
|
- lib/paystack/objects/customers.rb
|
92
93
|
- lib/paystack/objects/plans.rb
|
94
|
+
- lib/paystack/objects/subaccounts.rb
|
93
95
|
- lib/paystack/objects/subscriptions.rb
|
94
96
|
- lib/paystack/objects/transactions.rb
|
95
97
|
- lib/paystack/utils/utils.rb
|