Class: SaasRunner::Resource::Subscriber
- Inherits:
-
Object
- Object
- SaasRunner::Resource::Subscriber
- Defined in:
- lib/saas_runner/resource/subscriber.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #create!(params = {}) ⇒ Object
-
#initialize(client) ⇒ Subscriber
constructor
A new instance of Subscriber.
Constructor Details
#initialize(client) ⇒ Subscriber
Returns a new instance of Subscriber.
6 7 8 |
# File 'lib/saas_runner/resource/subscriber.rb', line 6 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
4 5 6 |
# File 'lib/saas_runner/resource/subscriber.rb', line 4 def client @client end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
4 5 6 |
# File 'lib/saas_runner/resource/subscriber.rb', line 4 def response @response end |
Instance Method Details
#create!(params = {}) ⇒ Object
10 11 12 13 |
# File 'lib/saas_runner/resource/subscriber.rb', line 10 def create!(params = {}) @response = client.post('/subscribers', { subscriber: params }) @response.body end |