class PaystackSubaccounts
Public Class Methods
create(paystackObj, data)
click to toggle source
# File lib/paystack/objects/subaccounts.rb, line 22 def PaystackSubaccounts.create(paystackObj, data) initPostRequest(paystackObj,"#{API::SUBACCOUNT_PATH}", data) end
get(paystackObj, subaccount_id)
click to toggle source
# File lib/paystack/objects/subaccounts.rb, line 30 def PaystackSubaccounts.get(paystackObj, subaccount_id) initGetRequest(paystackObj, "#{API::SUBACCOUNT_PATH}/#{subaccount_id}") end
list(paystackObj, page=1)
click to toggle source
# File lib/paystack/objects/subaccounts.rb, line 34 def PaystackSubaccounts.list(paystackObj, page=1) initGetRequest(paystackObj, "#{API::SUBACCOUNT_PATH}?page=#{page}") end
update(paystackObj, subaccount_id, data)
click to toggle source
# File lib/paystack/objects/subaccounts.rb, line 26 def PaystackSubaccounts.update(paystackObj, subaccount_id, data) initPutRequest(paystackObj,"#{API::SUBACCOUNT_PATH}/#{subaccount_id}", data) end
Public Instance Methods
create(data={})
click to toggle source
# File lib/paystack/objects/subaccounts.rb, line 4 def create(data={}) return PaystackSubaccounts.create(@paystack, data) end
get(subaccount_id)
click to toggle source
# File lib/paystack/objects/subaccounts.rb, line 8 def get(subaccount_id) return PaystackSubaccounts.get(@paystack, subaccount_id) end
list(page=1)
click to toggle source
# File lib/paystack/objects/subaccounts.rb, line 17 def list(page=1) return PaystackSubaccounts.list(@paystack, page) end
update(subaccount_id, data={})
click to toggle source
# File lib/paystack/objects/subaccounts.rb, line 13 def update(subaccount_id, data={}) return PaystackSubaccounts.update(@paystack, subaccount_id, data) end