Class: ConstantContact::Components::EventSpot::RegistrantPromoCodeInfo
- Inherits:
-
Component
- Object
- Component
- ConstantContact::Components::EventSpot::RegistrantPromoCodeInfo
- Defined in:
- lib/constantcontact/components/event_spot/registrant_promo_code_info.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_scope ⇒ Object
Returns the value of attribute discount_scope.
-
#discount_type ⇒ Object
Returns the value of attribute discount_type.
-
#redemption_count ⇒ Object
Returns the value of attribute redemption_count.
Class Method Summary collapse
-
.create(props) ⇒ RegistrantPromoCodeInfo
Factory method to create a RegistrantPromoCode 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
11 12 13 |
# File 'lib/constantcontact/components/event_spot/registrant_promo_code_info.rb', line 11 def code_name @code_name end |
#code_type ⇒ Object
Returns the value of attribute code_type
11 12 13 |
# File 'lib/constantcontact/components/event_spot/registrant_promo_code_info.rb', line 11 def code_type @code_type end |
#discount_amount ⇒ Object
Returns the value of attribute discount_amount
11 12 13 |
# File 'lib/constantcontact/components/event_spot/registrant_promo_code_info.rb', line 11 def discount_amount @discount_amount end |
#discount_scope ⇒ Object
Returns the value of attribute discount_scope
11 12 13 |
# File 'lib/constantcontact/components/event_spot/registrant_promo_code_info.rb', line 11 def discount_scope @discount_scope end |
#discount_type ⇒ Object
Returns the value of attribute discount_type
11 12 13 |
# File 'lib/constantcontact/components/event_spot/registrant_promo_code_info.rb', line 11 def discount_type @discount_type end |
#redemption_count ⇒ Object
Returns the value of attribute redemption_count
11 12 13 |
# File 'lib/constantcontact/components/event_spot/registrant_promo_code_info.rb', line 11 def redemption_count @redemption_count end |
Class Method Details
.create(props) ⇒ RegistrantPromoCodeInfo
Factory method to create a RegistrantPromoCode object from a hash
16 17 18 19 20 21 22 23 |
# File 'lib/constantcontact/components/event_spot/registrant_promo_code_info.rb', line 16 def self.create(props) obj = RegistrantPromoCodeInfo.new props.each do |key, value| key = key.to_s obj.send("#{key}=", value) if obj.respond_to? key end if props obj end |