Class: EventBright::Attendee

Inherits:
ApiObject show all
Defined in:
lib/eventbright/api_objects/attendee.rb

Instance Attribute Summary collapse

Attributes inherited from ApiObject

#attributes, #collections, #dirty, #dirty_collections, #dirty_relations, #id, #owner, #relations

Instance Method Summary collapse

Methods inherited from ApiObject

#after_attribute_set, #after_load, #after_new, #after_save, #after_update, #api_hash, #attribute_get, #attribute_set, #before_save, #clean!, #dirty?, #get_hash, #init, #init_with_hash, #inspect, #load, #load!, #loaded?, #nested_hash, #new_hash, #preinit, #prep_api_hash, #to_s, #updatable_hash, #update_hash

Methods included from ApiObjectClassMethods

#collection, #collections, #has, #ignores, #plural_name, #readable, #readable_date, #reformats, #relations, #remap, #renames, #requires, #singlet_name, #updatable, #updatable_date

Methods included from ApiObjectRelationships

#collection_clean!, #collection_dirty!, #collection_dirty?, #collection_get, #collection_set, #collections_save, #load_collections_with_hash, #load_relations_with_hash, #relation_clean!, #relation_dirty!, #relation_dirty?, #relation_get, #relation_set, #relations_save, #unnest_child_response

Constructor Details

#initialize(event = nil, hash = {}) ⇒ Attendee

Attendees can’t live outside events, so we override standard owner to be event.

Raises:

  • (ArgumentError)


29
30
31
32
33
34
35
36
# File 'lib/eventbright/api_objects/attendee.rb', line 29

def initialize(event = nil, hash = {})
  preinit
  raise ArgumentError unless event.is_a? EventBright::Event
  @id = hash.delete(:id)
  @event = event
  @owner = event.owner
  init_with_hash(hash, true)
end

Instance Attribute Details

#eventObject

Returns the value of attribute event.



25
26
27
# File 'lib/eventbright/api_objects/attendee.rb', line 25

def event
  @event
end

Instance Method Details

#save(*args) ⇒ Object



38
39
40
# File 'lib/eventbright/api_objects/attendee.rb', line 38

def save(*args)
  # noop. Attendees can't be altered via api
end