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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ae8e6284abf3217caed4431540242dcc7ec79fac
4
- data.tar.gz: ff9e3e54dcf80cd650cf1315ee307a9eac5a84d6
3
+ metadata.gz: bb366e37dbe506cf360fd40f6cb062d666ea7f2a
4
+ data.tar.gz: 9dc2efb61e565d8b186bfb475e5c04fd8ff97b5f
5
5
  SHA512:
6
- metadata.gz: fa1c3e4e8ac03be75742784b883bad76cb2c9c570c59dfcf6f9371c9017688727cfc1468f8ca86bbe23bc08c9a03732d9b1ceeeb99fa8f2c579bf9b97aa0d73e
7
- data.tar.gz: 231967b9e5724e016da55b3c1db6618d6184e9c8415c508963da8286eee2be83de8ac360f27ac1fa12b0946837ac0068482dc745c96fcd04a0462861df0d1088
6
+ metadata.gz: 5680617e95a07aa69db0285af5022a10f90ade70dd64eb6a33f3d98616d2ca7292b3a5bf7bbead4bde8a62f5d26104e26db9e2ffb7f1b87add86c9bbbfc76b5f
7
+ data.tar.gz: cc8141ba0e7c4ea5e97de5fb1f869acd0bde317a1c0bb2a49d70490809890bf80bdc881305d280e1220237c534b76f471002d930a41185db7b7b9d4a81d558d6
@@ -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
-
@@ -5,4 +5,6 @@ module API
5
5
  PLAN_PATH = "/plan"
6
6
  CUSTOMER_PATH = "/customer"
7
7
  SUBSCRIPTION_PATH = "/subscription"
8
+ BANK_PATH = "/bank"
9
+ SUBACCOUNT_PATH = "/subaccount"
8
10
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Paystack
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
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.5
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-10-02 00:00:00.000000000 Z
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