Class: PaystackCustomers
Instance Attribute Summary
#paystack
Class Method Summary
collapse
Instance Method Summary
collapse
#initialize
Class Method Details
.create(paystackObj, data) ⇒ Object
22
23
24
|
# File 'lib/paystack/objects/customers.rb', line 22
def PaystackCustomers.create(paystackObj, data)
initPostRequest(paystackObj,"#{API::CUSTOMER_PATH}", data)
end
|
.get(paystackObj, customer_id) ⇒ Object
30
31
32
|
# File 'lib/paystack/objects/customers.rb', line 30
def PaystackCustomers.get(paystackObj, customer_id)
initGetRequest(paystackObj, "#{API::CUSTOMER_PATH}/#{customer_id}")
end
|
.list(paystackObj, page = 1) ⇒ Object
34
35
36
|
# File 'lib/paystack/objects/customers.rb', line 34
def PaystackCustomers.list(paystackObj, page=1)
initGetRequest(paystackObj, "#{API::CUSTOMER_PATH}?page=#{page}")
end
|
.update(paystackObj, customer_id, data) ⇒ Object
26
27
28
|
# File 'lib/paystack/objects/customers.rb', line 26
def PaystackCustomers.update(paystackObj, customer_id, data)
initPutRequest(paystackObj,"#{API::CUSTOMER_PATH}/#{customer_id}", data)
end
|
Instance Method Details
#create(data = {}) ⇒ Object
4
5
6
|
# File 'lib/paystack/objects/customers.rb', line 4
def create(data={})
return PaystackCustomers.create(@paystack, data)
end
|
#get(customer_id) ⇒ Object
8
9
10
|
# File 'lib/paystack/objects/customers.rb', line 8
def get(customer_id)
return PaystackCustomers.get(@paystack, customer_id)
end
|
#list(page = 1) ⇒ Object
17
18
19
|
# File 'lib/paystack/objects/customers.rb', line 17
def list(page=1)
return PaystackCustomers.list(@paystack, page)
end
|
#update(customer_id, data = {}) ⇒ Object
13
14
15
|
# File 'lib/paystack/objects/customers.rb', line 13
def update(customer_id, data={})
return PaystackCustomers.update(@paystack, customer_id, data)
end
|