Class: AcceptOn::PromoCode
- Inherits:
-
Base
- Object
- Base
- AcceptOn::PromoCode
show all
- Defined in:
- lib/accepton/promo_code.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Constructor Details
This class inherits a constructor from AcceptOn::Base
Instance Attribute Details
#created_at ⇒ Object
9
10
11
|
# File 'lib/accepton/promo_code.rb', line 9
def created_at
@created_at
end
|
#name ⇒ Object
21
22
23
|
# File 'lib/accepton/promo_code.rb', line 21
def name
@name
end
|
#original_name ⇒ String
Gets the original name of the promo code
9
10
11
|
# File 'lib/accepton/promo_code.rb', line 9
def original_name
@original_name
end
|
21
22
23
|
# File 'lib/accepton/promo_code.rb', line 21
def promo_type
@promo_type
end
|
#value ⇒ Object
21
22
23
|
# File 'lib/accepton/promo_code.rb', line 21
def value
@value
end
|
Instance Method Details
#as_params ⇒ Hash
Creates a hash representation of the promo code's current values
26
27
28
|
# File 'lib/accepton/promo_code.rb', line 26
def as_params
{name: name, promo_type: promo_type, value: value}
end
|