Class: Subsify::Plan
- Inherits:
-
Object
- Object
- Subsify::Plan
- Defined in:
- lib/subsify/plan.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#currency_symbol ⇒ Object
readonly
Returns the value of attribute currency_symbol.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
Instance Method Summary collapse
-
#initialize(data) ⇒ Plan
constructor
A new instance of Plan.
Constructor Details
#initialize(data) ⇒ Plan
Returns a new instance of Plan.
5 6 7 8 9 10 11 12 |
# File 'lib/subsify/plan.rb', line 5 def initialize(data) @id = data['id'] @description = data['description'] @amount = data['amount'] @currency = data['currency'] @currency_symbol = data['currency_symbol'] @interval = data['interval'] end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
4 5 6 |
# File 'lib/subsify/plan.rb', line 4 def amount @amount end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
4 5 6 |
# File 'lib/subsify/plan.rb', line 4 def currency @currency end |
#currency_symbol ⇒ Object (readonly)
Returns the value of attribute currency_symbol.
4 5 6 |
# File 'lib/subsify/plan.rb', line 4 def currency_symbol @currency_symbol end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/subsify/plan.rb', line 4 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/subsify/plan.rb', line 4 def id @id end |
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
4 5 6 |
# File 'lib/subsify/plan.rb', line 4 def interval @interval end |