class ConstantContact::Components::EventSpot::Guest

Attributes

guest_id[RW]
guest_section[RW]

Public Class Methods

create(props) click to toggle source

Factory method to create a Guest object from a hash @param [Hash] props - hash of properties to create object from @return [Guest]

# File lib/constantcontact/components/event_spot/guest.rb, line 16
def self.create(props)
  obj = Guest.new
  props.each do |key, value|
    key = key.to_s
    if key == 'guest_section'
      obj.send("#{key}=", Components::EventSpot::GuestSection.create(value))
    else
      obj.send("#{key}=", value) if obj.respond_to?("#{key}=")
    end
  end
  obj
end