class ConstantContact::Components::EventItem
Attributes
attributes[RW]
default_quantity_available[RW]
default_quantity_total[RW]
description[RW]
id[RW]
name[RW]
per_registrant_limit[RW]
price[RW]
show_quantity_available[RW]
Public Class Methods
create(props)
click to toggle source
Factory method to create an EventItem
object from a hash @param [Hash] props - properties to create object from @return [EventItem]
# File lib/constantcontact/components/event_spot/event_item.rb, line 16 def self.create(props) obj = EventItem.new if props props.each do |key, value| if key == 'attributes' if value obj.attributes = [] value.each do |attribute| obj.attributes << Components::EventItemAttribute.create(attribute) end end else obj.send("#{key}=", value) if obj.respond_to? key end end end obj end