Class: ConstantContact::Components::EventSpot::RegistrantField

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

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Component

#to_hash, to_hash_value, #to_json

Instance Attribute Details

#labelObject

Returns the value of attribute label



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

def label
  @label
end

#nameObject

Returns the value of attribute name



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

def name
  @name
end

#typeObject

Returns the value of attribute type



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

def type
  @type
end

#valueObject

Returns the value of attribute value



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

def value
  @value
end

#valuesObject

Returns the value of attribute values



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

def values
  @values
end

Class Method Details

.create(props) ⇒ Campaign

Factory method to create an event Fee 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/registrant_field.rb', line 16

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