Class: PaystackPlans
Instance Attribute Summary
#paystack
Class Method Summary
collapse
Instance Method Summary
collapse
#initialize
Class Method Details
.create(paystackObj, data) ⇒ Object
23
24
25
|
# File 'lib/paystack/objects/plans.rb', line 23
def PaystackPlans.create(paystackObj, data)
initPostRequest(paystackObj,"#{API::PLAN_PATH}", data)
end
|
.get(paystackObj, plan_id) ⇒ Object
31
32
33
|
# File 'lib/paystack/objects/plans.rb', line 31
def PaystackPlans.get(paystackObj, plan_id)
initGetRequest(paystackObj, "#{API::PLAN_PATH}/#{plan_id}")
end
|
.list(paystackObj, page = 1) ⇒ Object
35
36
37
|
# File 'lib/paystack/objects/plans.rb', line 35
def PaystackPlans.list(paystackObj, page=1)
initGetRequest(paystackObj, "#{API::PLAN_PATH}?page=#{page}")
end
|
.update(paystackObj, plan_id, data) ⇒ Object
27
28
29
|
# File 'lib/paystack/objects/plans.rb', line 27
def PaystackPlans.update(paystackObj, plan_id, data)
initPutRequest(paystackObj,"#{API::PLAN_PATH}/#{plan_id}", data)
end
|
Instance Method Details
#create(data = {}) ⇒ Object
5
6
7
|
# File 'lib/paystack/objects/plans.rb', line 5
def create(data={})
return PaystackPlans.create(@paystack, data)
end
|
#get(plan_id) ⇒ Object
9
10
11
|
# File 'lib/paystack/objects/plans.rb', line 9
def get(plan_id)
return PaystackPlans.get(@paystack, plan_id)
end
|
#list(page = 1) ⇒ Object
18
19
20
|
# File 'lib/paystack/objects/plans.rb', line 18
def list(page=1)
return PaystackPlans.list(@paystack, page)
end
|
#update(plan_id, data = {}) ⇒ Object
14
15
16
|
# File 'lib/paystack/objects/plans.rb', line 14
def update(plan_id, data={})
return PaystackPlans.update(@paystack, plan_id, data)
end
|