Class: ConstantContact::Components::EventSpot::NotificationOption

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

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Component

#to_hash, to_hash_value, #to_json

Instance Attribute Details

#is_opted_inObject

Returns the value of attribute is_opted_in



11
12
13
# File 'lib/constantcontact/components/event_spot/notification_option.rb', line 11

def is_opted_in
  @is_opted_in
end

#notification_typeObject

Returns the value of attribute notification_type



11
12
13
# File 'lib/constantcontact/components/event_spot/notification_option.rb', line 11

def notification_type
  @notification_type
end

Class Method Details

.create(props) ⇒ NotificationOption

Factory method to create an event NotificationOption object from a hash

Parameters:

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

Returns:



16
17
18
19
20
21
22
23
# File 'lib/constantcontact/components/event_spot/notification_option.rb', line 16

def self.create(props)
  obj = NotificationOption.new
  props.each do |key, value|
    key = key.to_s
    obj.send("#{key}=", value) if obj.respond_to? key
  end if props
  obj
end