Class: Paystack::Resources::Customer
- Inherits:
-
BaseResource
- Object
- BaseResource
- Paystack::Resources::Customer
- Defined in:
- lib/paystack/resources/customer.rb
Instance Method Summary collapse
-
#create(body = {}) ⇒ Object
Create Customer POST /customer.
-
#deactivate_authorization(body = {}) ⇒ Object
Deactivate Authorization POST /customer/authorization/deactivate.
-
#direct_debit_activation_charge(id, body = {}) ⇒ Object
Direct Debit Activation Charge PUT /customer/id/directdebit-activation-charge.
-
#fetch(code) ⇒ Object
Fetch Customer GET /customer/code.
-
#fetch_mandate_authorizations(id) ⇒ Object
Fetch Mandate Authorizations GET /customer/id/directdebit-mandate-authorizations.
-
#initialize_authorization(body = {}) ⇒ Object
Initialize Authorization POST /customer/authorization/initialize.
-
#initialize_direct_debit(id, body = {}) ⇒ Object
Initialize Direct Debit POST /customer/id/initialize-direct-debit.
-
#list(query = {}) ⇒ Object
List Customers GET /customer.
-
#risk_action(body = {}) ⇒ Object
Set Risk Action POST /customer/set_risk_action.
-
#update(code, body = {}) ⇒ Object
Update Customer PUT /customer/code.
-
#validate(code, body = {}) ⇒ Object
Validate Customer POST /customer/code/identification.
-
#verify_authorization(reference) ⇒ Object
Verify Authorization GET /customer/authorization/verify/reference.
Methods inherited from BaseResource
Instance Method Details
#create(body = {}) ⇒ Object
Create Customer POST /customer
10 11 12 |
# File 'lib/paystack/resources/customer.rb', line 10 def create(body = {}) @transport.post("/customer", body: body) end |
#deactivate_authorization(body = {}) ⇒ Object
Deactivate Authorization POST /customer/authorization/deactivate
17 18 19 |
# File 'lib/paystack/resources/customer.rb', line 17 def (body = {}) @transport.post("/customer/authorization/deactivate", body: body) end |
#direct_debit_activation_charge(id, body = {}) ⇒ Object
Direct Debit Activation Charge PUT /customer/id/directdebit-activation-charge
24 25 26 |
# File 'lib/paystack/resources/customer.rb', line 24 def direct_debit_activation_charge(id, body = {}) @transport.put("/customer/#{id}/directdebit-activation-charge", body: body) end |
#fetch(code) ⇒ Object
Fetch Customer GET /customer/code
31 32 33 |
# File 'lib/paystack/resources/customer.rb', line 31 def fetch(code) @transport.get("/customer/#{code}") end |
#fetch_mandate_authorizations(id) ⇒ Object
Fetch Mandate Authorizations GET /customer/id/directdebit-mandate-authorizations
38 39 40 |
# File 'lib/paystack/resources/customer.rb', line 38 def (id) @transport.get("/customer/#{id}/directdebit-mandate-authorizations") end |
#initialize_authorization(body = {}) ⇒ Object
Initialize Authorization POST /customer/authorization/initialize
45 46 47 |
# File 'lib/paystack/resources/customer.rb', line 45 def (body = {}) @transport.post("/customer/authorization/initialize", body: body) end |
#initialize_direct_debit(id, body = {}) ⇒ Object
Initialize Direct Debit POST /customer/id/initialize-direct-debit
52 53 54 |
# File 'lib/paystack/resources/customer.rb', line 52 def initialize_direct_debit(id, body = {}) @transport.post("/customer/#{id}/initialize-direct-debit", body: body) end |
#list(query = {}) ⇒ Object
List Customers GET /customer
59 60 61 |
# File 'lib/paystack/resources/customer.rb', line 59 def list(query = {}) @transport.get("/customer", query: query) end |
#risk_action(body = {}) ⇒ Object
Set Risk Action POST /customer/set_risk_action
66 67 68 |
# File 'lib/paystack/resources/customer.rb', line 66 def risk_action(body = {}) @transport.post("/customer/set_risk_action", body: body) end |
#update(code, body = {}) ⇒ Object
Update Customer PUT /customer/code
73 74 75 |
# File 'lib/paystack/resources/customer.rb', line 73 def update(code, body = {}) @transport.put("/customer/#{code}", body: body) end |
#validate(code, body = {}) ⇒ Object
Validate Customer POST /customer/code/identification
80 81 82 |
# File 'lib/paystack/resources/customer.rb', line 80 def validate(code, body = {}) @transport.post("/customer/#{code}/identification", body: body) end |
#verify_authorization(reference) ⇒ Object
Verify Authorization GET /customer/authorization/verify/reference
87 88 89 |
# File 'lib/paystack/resources/customer.rb', line 87 def (reference) @transport.get("/customer/authorization/verify/#{reference}") end |