Class: Paystack::Resources::Subscription
- Inherits:
-
BaseResource
- Object
- BaseResource
- Paystack::Resources::Subscription
- Defined in:
- lib/paystack/resources/subscription.rb
Instance Method Summary collapse
-
#create(body = {}) ⇒ Object
Create Subscription POST /subscription.
-
#disable(body = {}) ⇒ Object
Disable Subscription POST /subscription/disable.
-
#enable(body = {}) ⇒ Object
Enable Subscription POST /subscription/enable.
-
#fetch(code) ⇒ Object
Fetch Subscription GET /subscription/code.
-
#list(query = {}) ⇒ Object
List Subscriptions GET /subscription.
-
#manage_email(code) ⇒ Object
Send Update Subscription Link POST /subscription/code/manage/email.
-
#manage_link(code) ⇒ Object
Generate Update Subscription Link GET /subscription/code/manage/link.
Methods inherited from BaseResource
Instance Method Details
#create(body = {}) ⇒ Object
Create Subscription POST /subscription
10 11 12 |
# File 'lib/paystack/resources/subscription.rb', line 10 def create(body = {}) @transport.post("/subscription", body: body) end |
#disable(body = {}) ⇒ Object
Disable Subscription POST /subscription/disable
17 18 19 |
# File 'lib/paystack/resources/subscription.rb', line 17 def disable(body = {}) @transport.post("/subscription/disable", body: body) end |
#enable(body = {}) ⇒ Object
Enable Subscription POST /subscription/enable
24 25 26 |
# File 'lib/paystack/resources/subscription.rb', line 24 def enable(body = {}) @transport.post("/subscription/enable", body: body) end |
#fetch(code) ⇒ Object
Fetch Subscription GET /subscription/code
31 32 33 |
# File 'lib/paystack/resources/subscription.rb', line 31 def fetch(code) @transport.get("/subscription/#{code}") end |
#list(query = {}) ⇒ Object
List Subscriptions GET /subscription
38 39 40 |
# File 'lib/paystack/resources/subscription.rb', line 38 def list(query = {}) @transport.get("/subscription", query: query) end |
#manage_email(code) ⇒ Object
Send Update Subscription Link POST /subscription/code/manage/email
45 46 47 |
# File 'lib/paystack/resources/subscription.rb', line 45 def manage_email(code) @transport.post("/subscription/#{code}/manage/email") end |
#manage_link(code) ⇒ Object
Generate Update Subscription Link GET /subscription/code/manage/link
52 53 54 |
# File 'lib/paystack/resources/subscription.rb', line 52 def manage_link(code) @transport.get("/subscription/#{code}/manage/link") end |