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