Class: EventType

Inherits:
Object
  • Object
show all
Defined in:
lib/tacklebox/components/event_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ EventType

Returns a new instance of EventType.



6
7
8
# File 'lib/tacklebox/components/event_type.rb', line 6

def initialize(config)
  self.api = EventTypeApi.new(config)
end

Instance Attribute Details

#apiObject

Returns the value of attribute api.



4
5
6
# File 'lib/tacklebox/components/event_type.rb', line 4

def api
  @api
end

Instance Method Details

#create(service_id, event_type_data) ⇒ Object



14
15
16
# File 'lib/tacklebox/components/event_type.rb', line 14

def create(service_id, event_type_data)
  self.api.createEventType(service_id, event_type_data)
end

#delete(service_id, event_type_id) ⇒ Object



22
23
24
# File 'lib/tacklebox/components/event_type.rb', line 22

def delete(service_id, event_type_id)
  self.api.deleteEventType(service_id, event_type_id)
end

#get(service_id, event_type_id) ⇒ Object



18
19
20
# File 'lib/tacklebox/components/event_type.rb', line 18

def get(service_id, event_type_id)
  self.api.getEventType(service_id, event_type_id)
end

#list(service_id) ⇒ Object



10
11
12
# File 'lib/tacklebox/components/event_type.rb', line 10

def list(service_id)
  self.api.list_event_types(service_id)
end