Class: SaasRunner::Resource::Event

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Event

Returns a new instance of Event.



6
7
8
# File 'lib/saas_runner/resource/event.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/event.rb', line 4

def client
  @client
end

#responseObject (readonly)

Returns the value of attribute response.



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

def response
  @response
end

Instance Method Details

#destroy!(id, params = {}) ⇒ Object



20
21
22
23
# File 'lib/saas_runner/resource/event.rb', line 20

def destroy!(id, params = {})
  @response = client.delete("/events/#{id}", params)
  @response.body
end

#index(params = {}) ⇒ Object



10
11
12
13
# File 'lib/saas_runner/resource/event.rb', line 10

def index(params = {})
  @response = client.get('/events', params)
  @response.body
end

#show(id, params = {}) ⇒ Object



15
16
17
18
# File 'lib/saas_runner/resource/event.rb', line 15

def show(id, params = {})
  @response = client.get("/events/#{id}", params)
  @response.body
end