Class: ConstantContact::Components::Promocode
- Defined in:
- lib/constantcontact/components/event_spot/promocode.rb
Instance Attribute Summary collapse
-
#code_name ⇒ Object
Returns the value of attribute code_name.
-
#code_type ⇒ Object
Returns the value of attribute code_type.
-
#discount_amount ⇒ Object
Returns the value of attribute discount_amount.
-
#discount_percent ⇒ Object
Returns the value of attribute discount_percent.
-
#discount_scope ⇒ Object
Returns the value of attribute discount_scope.
-
#discount_type ⇒ Object
Returns the value of attribute discount_type.
-
#fee_ids ⇒ Object
Returns the value of attribute fee_ids.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_paused ⇒ Object
Returns the value of attribute is_paused.
-
#quantity_available ⇒ Object
Returns the value of attribute quantity_available.
-
#quantity_total ⇒ Object
Returns the value of attribute quantity_total.
-
#quantity_used ⇒ Object
Returns the value of attribute quantity_used.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
-
.create(props) ⇒ Promocode
Factory method to create an event Promocode object from a hash.
Methods inherited from Component
#to_hash, to_hash_value, #to_json
Instance Attribute Details
#code_name ⇒ Object
Returns the value of attribute code_name
10 11 12 |
# File 'lib/constantcontact/components/event_spot/promocode.rb', line 10 def code_name @code_name end |
#code_type ⇒ Object
Returns the value of attribute code_type
10 11 12 |
# File 'lib/constantcontact/components/event_spot/promocode.rb', line 10 def code_type @code_type end |
#discount_amount ⇒ Object
Returns the value of attribute discount_amount
10 11 12 |
# File 'lib/constantcontact/components/event_spot/promocode.rb', line 10 def discount_amount @discount_amount end |
#discount_percent ⇒ Object
Returns the value of attribute discount_percent
10 11 12 |
# File 'lib/constantcontact/components/event_spot/promocode.rb', line 10 def discount_percent @discount_percent end |
#discount_scope ⇒ Object
Returns the value of attribute discount_scope
10 11 12 |
# File 'lib/constantcontact/components/event_spot/promocode.rb', line 10 def discount_scope @discount_scope end |
#discount_type ⇒ Object
Returns the value of attribute discount_type
10 11 12 |
# File 'lib/constantcontact/components/event_spot/promocode.rb', line 10 def discount_type @discount_type end |
#fee_ids ⇒ Object
Returns the value of attribute fee_ids
10 11 12 |
# File 'lib/constantcontact/components/event_spot/promocode.rb', line 10 def fee_ids @fee_ids end |
#id ⇒ Object
Returns the value of attribute id
10 11 12 |
# File 'lib/constantcontact/components/event_spot/promocode.rb', line 10 def id @id end |
#is_paused ⇒ Object
Returns the value of attribute is_paused
10 11 12 |
# File 'lib/constantcontact/components/event_spot/promocode.rb', line 10 def is_paused @is_paused end |
#quantity_available ⇒ Object
Returns the value of attribute quantity_available
10 11 12 |
# File 'lib/constantcontact/components/event_spot/promocode.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/promocode.rb', line 10 def quantity_total @quantity_total end |
#quantity_used ⇒ Object
Returns the value of attribute quantity_used
10 11 12 |
# File 'lib/constantcontact/components/event_spot/promocode.rb', line 10 def quantity_used @quantity_used end |
#status ⇒ Object
Returns the value of attribute status
10 11 12 |
# File 'lib/constantcontact/components/event_spot/promocode.rb', line 10 def status @status end |
Class Method Details
.create(props) ⇒ Promocode
Factory method to create an event Promocode object from a hash
16 17 18 19 20 21 22 |
# File 'lib/constantcontact/components/event_spot/promocode.rb', line 16 def self.create(props) obj = Promocode.new props.each do |key, value| obj.send("#{key}=", value) if obj.respond_to? key end obj end |