Class: PaystackSubscriptions
- Inherits:
-
PaystackBaseObject
- Object
- PaystackBaseObject
- PaystackSubscriptions
- Defined in:
- lib/paystack/objects/subscriptions.rb
Instance Attribute Summary
Attributes inherited from PaystackBaseObject
Class Method Summary collapse
- .create(paystackObj, data) ⇒ Object
- .disable(paystackObj, data) ⇒ Object
- .enable(paystackObj, data = {}) ⇒ Object
- .get(paystackObj, subscription_id) ⇒ Object
Instance Method Summary collapse
- #create(data = {}) ⇒ Object
- #disable(data = {}) ⇒ Object
- #enable(data = {}) ⇒ Object
- #get(subscription_id) ⇒ Object
Methods inherited from PaystackBaseObject
Constructor Details
This class inherits a constructor from PaystackBaseObject
Class Method Details
.create(paystackObj, data) ⇒ Object
23 24 25 |
# File 'lib/paystack/objects/subscriptions.rb', line 23 def PaystackSubscriptions.create(paystackObj, data) initPostRequest(paystackObj, "#{API::SUBSCRIPTION_PATH}", data) end |
.disable(paystackObj, data) ⇒ Object
35 36 37 |
# File 'lib/paystack/objects/subscriptions.rb', line 35 def PaystackSubscriptions.disable(paystackObj, data) initPostRequest(paystackObj, "#{API::SUBSCRIPTION_PATH}/disable", data) end |
.enable(paystackObj, data = {}) ⇒ Object
31 32 33 |
# File 'lib/paystack/objects/subscriptions.rb', line 31 def PaystackSubscriptions.enable(paystackObj, data={}) initPostRequest(paystackObj, "#{API::SUBSCRIPTION_PATH}/enable", data) end |
.get(paystackObj, subscription_id) ⇒ Object
27 28 29 |
# File 'lib/paystack/objects/subscriptions.rb', line 27 def PaystackSubscriptions.get(paystackObj, subscription_id) initGetRequest(paystackObj, "#{API::SUBSCRIPTION_PATH}/#{subscription_id}") end |
Instance Method Details
#create(data = {}) ⇒ Object
6 7 8 |
# File 'lib/paystack/objects/subscriptions.rb', line 6 def create(data={}) return PaystackSubscriptions.create(@paystack, data) end |
#disable(data = {}) ⇒ Object
14 15 16 |
# File 'lib/paystack/objects/subscriptions.rb', line 14 def disable(data={}) return PaystackSubscriptions.disable(@paystack, data) end |
#enable(data = {}) ⇒ Object
18 19 20 |
# File 'lib/paystack/objects/subscriptions.rb', line 18 def enable(data={}) return PaystackSubscriptions.enable(@paystack, data) end |
#get(subscription_id) ⇒ Object
10 11 12 |
# File 'lib/paystack/objects/subscriptions.rb', line 10 def get(subscription_id) return PaystackSubscriptions.get(@paystack, subscription_id) end |