Class: Paystack::Resources::Subaccount
- Inherits:
-
BaseResource
- Object
- BaseResource
- Paystack::Resources::Subaccount
- Defined in:
- lib/paystack/resources/subaccount.rb
Instance Method Summary collapse
-
#create(body = {}) ⇒ Object
Create Subaccount POST /subaccount.
-
#fetch(code) ⇒ Object
Fetch Subaccount GET /subaccount/code.
-
#list(query = {}) ⇒ Object
List Subaccounts GET /subaccount.
-
#update(code, body = {}) ⇒ Object
Update Subaccount PUT /subaccount/code.
Methods inherited from BaseResource
Instance Method Details
#create(body = {}) ⇒ Object
Create Subaccount POST /subaccount
10 11 12 |
# File 'lib/paystack/resources/subaccount.rb', line 10 def create(body = {}) @transport.post("/subaccount", body: body) end |
#fetch(code) ⇒ Object
Fetch Subaccount GET /subaccount/code
17 18 19 |
# File 'lib/paystack/resources/subaccount.rb', line 17 def fetch(code) @transport.get("/subaccount/#{code}") end |
#list(query = {}) ⇒ Object
List Subaccounts GET /subaccount
24 25 26 |
# File 'lib/paystack/resources/subaccount.rb', line 24 def list(query = {}) @transport.get("/subaccount", query: query) end |
#update(code, body = {}) ⇒ Object
Update Subaccount PUT /subaccount/code
31 32 33 |
# File 'lib/paystack/resources/subaccount.rb', line 31 def update(code, body = {}) @transport.put("/subaccount/#{code}", body: body) end |