Class: ConstantContact::Components::EventSpot::RegistrantPromoCodeInfo

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

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Component

#to_hash, to_hash_value, #to_json

Instance Attribute Details

#code_nameObject

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_typeObject

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_amountObject

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_scopeObject

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_typeObject

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_countObject

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

Parameters:

  • props (Hash)
    • hash of properties to create object from

Returns:



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