Class: ConstantContact::Components::Event

Inherits:
Component
  • Object
show all
Defined in:
lib/constantcontact/components/event_spot/event.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Component

#to_hash, to_hash_value, #to_json

Instance Attribute Details

#active_dateObject

Returns the value of attribute active_date



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def active_date
  @active_date
end

#addressObject

Returns the value of attribute address



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def address
  @address
end

#are_registrants_publicObject

Returns the value of attribute are_registrants_public



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def are_registrants_public
  @are_registrants_public
end

#cancelled_dateObject

Returns the value of attribute cancelled_date



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def cancelled_date
  @cancelled_date
end

#contactObject

Returns the value of attribute contact



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def contact
  @contact
end

#created_dateObject

Returns the value of attribute created_date



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def created_date
  @created_date
end

#currency_typeObject

Returns the value of attribute currency_type



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def currency_type
  @currency_type
end

#deleted_dateObject

Returns the value of attribute deleted_date



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def deleted_date
  @deleted_date
end

#descriptionObject

Returns the value of attribute description



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def description
  @description
end

#end_dateObject

Returns the value of attribute end_date



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def end_date
  @end_date
end

#google_analytics_keyObject

Returns the value of attribute google_analytics_key



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def google_analytics_key
  @google_analytics_key
end

#google_merchant_idObject

Returns the value of attribute google_merchant_id



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def google_merchant_id
  @google_merchant_id
end

#idObject

Returns the value of attribute id



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def id
  @id
end

#is_calendar_displayedObject

Returns the value of attribute is_calendar_displayed



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def is_calendar_displayed
  @is_calendar_displayed
end

#is_checkin_availableObject

Returns the value of attribute is_checkin_available



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def is_checkin_available
  @is_checkin_available
end

#is_home_page_displayedObject

Returns the value of attribute is_home_page_displayed



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def is_home_page_displayed
  @is_home_page_displayed
end

#is_listed_in_external_directoryObject

Returns the value of attribute is_listed_in_external_directory



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def is_listed_in_external_directory
  @is_listed_in_external_directory
end

#is_map_displayedObject

Returns the value of attribute is_map_displayed



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def is_map_displayed
  @is_map_displayed
end

#is_virtual_eventObject

Returns the value of attribute is_virtual_event



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def is_virtual_event
  @is_virtual_event
end

#locationObject

Returns the value of attribute location



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def location
  @location
end

#meta_data_tagsObject

Returns the value of attribute meta_data_tags



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def 
  @meta_data_tags
end

#nameObject

Returns the value of attribute name



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def name
  @name
end

#notification_optionsObject

Returns the value of attribute notification_options



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def notification_options
  @notification_options
end

#online_meetingObject

Returns the value of attribute online_meeting



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def online_meeting
  @online_meeting
end

#payable_toObject

Returns the value of attribute payable_to



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def payable_to
  @payable_to
end

#payment_addressObject

Returns the value of attribute payment_address



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def payment_address
  @payment_address
end

#payment_optionsObject

Returns the value of attribute payment_options



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def payment_options
  @payment_options
end

#paypal_account_emailObject

Returns the value of attribute paypal_account_email



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def 
  @paypal_account_email
end

#registration_urlObject

Returns the value of attribute registration_url



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def registration_url
  @registration_url
end

#start_dateObject

Returns the value of attribute start_date



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def start_date
  @start_date
end

#statusObject

Returns the value of attribute status



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def status
  @status
end

#theme_nameObject

Returns the value of attribute theme_name



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def theme_name
  @theme_name
end

#time_zone_descriptionObject

Returns the value of attribute time_zone_description



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def time_zone_description
  @time_zone_description
end

#time_zone_idObject

Returns the value of attribute time_zone_id



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def time_zone_id
  @time_zone_id
end

#titleObject

Returns the value of attribute title



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def title
  @title
end

#total_registered_countObject

Returns the value of attribute total_registered_count



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def total_registered_count
  @total_registered_count
end

#track_informationObject

Returns the value of attribute track_information



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def track_information
  @track_information
end

#twitter_hash_tagObject

Returns the value of attribute twitter_hash_tag



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def twitter_hash_tag
  @twitter_hash_tag
end

#typeObject

Returns the value of attribute type



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def type
  @type
end

#updated_dateObject

Returns the value of attribute updated_date



10
11
12
# File 'lib/constantcontact/components/event_spot/event.rb', line 10

def updated_date
  @updated_date
end

Class Method Details

.create(props) ⇒ Event

Factory method to create an Event object from a hash

Parameters:

  • props (Hash)
    • hash of properties to create object from

Returns:



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/constantcontact/components/event_spot/event.rb', line 22

def self.create(props)
  obj = Event.new
  if props
    props.each do |key, value|
      key = key.to_s
      if key == 'address'
        obj.address = Components::EventSpot::EventAddress.create(value)
      elsif key == 'contact'
        obj.contact = Components::EventSpot::Contact.create(value)
      elsif key == 'notification_options'
        value ||= []
        obj.notification_options = value.collect{|option| Components::EventSpot::NotificationOption.create(option) }
      elsif key == 'online_meeting'
        obj.online_meeting = Components::EventSpot::OnlineMeeting.create(value)
      elsif key == 'payment_adress'
        obj.payment_adress = Components::EventSpot::PaymentAddress.create(value)
      elsif key == 'track_information'
        value ||= []
        obj.track_information = Components::EventSpot::EventTrack.create(value)
      else
        obj.send("#{key}=", value) if obj.respond_to?("#{key}=")
      end
    end
  end
  obj
end

.create_summary(props) ⇒ Event

Factory method to create a summary Event object from a hash

Parameters:

  • props (Hash)
    • hash of properties to create object from

Returns:



52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/constantcontact/components/event_spot/event.rb', line 52

def self.create_summary(props)
  obj = Event.new
  if props
    props.each do |key, value|
      key = key.to_s
      if key == 'address'
        obj.address = Components::EventSpot::EventAddress.create(value)
      else
        obj.send("#{key}=", value) if obj.respond_to?("#{key}=")
      end
    end
  end
  obj
end