Class: SaasRunner::Resource::Subscriber

Inherits:
Object
  • Object
show all
Defined in:
lib/saas_runner/resource/subscriber.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientObject (readonly)

Returns the value of attribute client.



4
5
6
# File 'lib/saas_runner/resource/subscriber.rb', line 4

def client
  @client
end

#responseObject (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