Class: ConstantContact::Components::EventItemAttribute

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

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Component

#to_hash, to_hash_value, #to_json

Instance Attribute Details

#idObject

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

#nameObject

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_availableObject

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_totalObject

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

Parameters:

  • props (Hash)
    • properties to create object from

Returns:



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