Class: ConstantContact::Components::EventItemAttribute
- Defined in:
- lib/constantcontact/components/event_spot/event_item_attribute.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#quantity_available ⇒ Object
Returns the value of attribute quantity_available.
-
#quantity_total ⇒ Object
Returns the value of attribute quantity_total.
Class Method Summary collapse
-
.create(props) ⇒ EventItemAttribute
Factory method to create an EventItemAttribute object from a hash.
Methods inherited from Component
#to_hash, to_hash_value, #to_json
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
10 11 12 |
# File 'lib/constantcontact/components/event_spot/event_item_attribute.rb', line 10 def id @id end |
#name ⇒ Object
Returns the value of attribute name
10 11 12 |
# File 'lib/constantcontact/components/event_spot/event_item_attribute.rb', line 10 def name @name end |
#quantity_available ⇒ Object
Returns the value of attribute quantity_available
10 11 12 |
# File 'lib/constantcontact/components/event_spot/event_item_attribute.rb', line 10 def quantity_available @quantity_available end |
#quantity_total ⇒ Object
Returns the value of attribute quantity_total
10 11 12 |
# File 'lib/constantcontact/components/event_spot/event_item_attribute.rb', line 10 def quantity_total @quantity_total end |
Class Method Details
.create(props) ⇒ EventItemAttribute
Factory method to create an EventItemAttribute object from a hash
15 16 17 18 19 20 21 22 23 |
# File 'lib/constantcontact/components/event_spot/event_item_attribute.rb', line 15 def self.create(props) obj = EventItemAttribute.new if props props.each do |key, value| obj.send("#{key}=", value) if obj.respond_to? key end end obj end |