Class: Paystack::Resources::Page
- Inherits:
-
BaseResource
- Object
- BaseResource
- Paystack::Resources::Page
- Defined in:
- lib/paystack/resources/page.rb
Instance Method Summary collapse
-
#add_products(id, body = {}) ⇒ Object
Add Products POST /page/id/product.
-
#check_slug_availability(slug) ⇒ Object
Check Slug Availability GET /page/check_slug_availability/slug.
-
#create(body = {}) ⇒ Object
Create Page POST /page.
-
#fetch(id) ⇒ Object
Fetch Page GET /page/id.
-
#list(query = {}) ⇒ Object
List Pages GET /page.
-
#update(id, body = {}) ⇒ Object
Update Page PUT /page/id.
Methods inherited from BaseResource
Instance Method Details
#add_products(id, body = {}) ⇒ Object
Add Products POST /page/id/product
10 11 12 |
# File 'lib/paystack/resources/page.rb', line 10 def add_products(id, body = {}) @transport.post("/page/#{id}/product", body: body) end |
#check_slug_availability(slug) ⇒ Object
Check Slug Availability GET /page/check_slug_availability/slug
17 18 19 |
# File 'lib/paystack/resources/page.rb', line 17 def check_slug_availability(slug) @transport.get("/page/check_slug_availability/#{slug}") end |
#create(body = {}) ⇒ Object
Create Page POST /page
24 25 26 |
# File 'lib/paystack/resources/page.rb', line 24 def create(body = {}) @transport.post("/page", body: body) end |
#fetch(id) ⇒ Object
Fetch Page GET /page/id
31 32 33 |
# File 'lib/paystack/resources/page.rb', line 31 def fetch(id) @transport.get("/page/#{id}") end |
#list(query = {}) ⇒ Object
List Pages GET /page
38 39 40 |
# File 'lib/paystack/resources/page.rb', line 38 def list(query = {}) @transport.get("/page", query: query) end |
#update(id, body = {}) ⇒ Object
Update Page PUT /page/id
45 46 47 |
# File 'lib/paystack/resources/page.rb', line 45 def update(id, body = {}) @transport.put("/page/#{id}", body: body) end |