Class: Payjp::Subscription
- Inherits:
-
APIResource
- Object
- PayjpObject
- APIResource
- Payjp::Subscription
- Defined in:
- lib/payjp/subscription.rb
Instance Method Summary collapse
- #cancel(params = {}, opts = {}) ⇒ Object
- #pause(params = {}, opts = {}) ⇒ Object
- #resume(params = {}, opts = {}) ⇒ Object
Methods included from APIOperations::Delete
Methods included from APIOperations::Update
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods inherited from APIResource
class_name, #refresh, retrieve, url, #url
Methods included from APIOperations::Request
Methods inherited from PayjpObject
#[], #[]=, #_dump, _load, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #respond_to?, #serialize_nested_object, serialize_params, #to_hash, #to_json, #to_s, #values
Constructor Details
This class inherits a constructor from Payjp::PayjpObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Payjp::PayjpObject
Instance Method Details
#cancel(params = {}, opts = {}) ⇒ Object
18 19 20 21 |
# File 'lib/payjp/subscription.rb', line 18 def cancel(params = {}, opts = {}) response, opts = request(:post, cancel_url, params, opts) refresh_from(response, opts) end |
#pause(params = {}, opts = {}) ⇒ Object
8 9 10 11 |
# File 'lib/payjp/subscription.rb', line 8 def pause(params = {}, opts = {}) response, opts = request(:post, pause_url, params, opts) refresh_from(response, opts) end |
#resume(params = {}, opts = {}) ⇒ Object
13 14 15 16 |
# File 'lib/payjp/subscription.rb', line 13 def resume(params = {}, opts = {}) response, opts = request(:post, resume_url, params, opts) refresh_from(response, opts) end |