Class: Subsify::Plan

Inherits:
Object
  • Object
show all
Defined in:
lib/subsify/plan.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#amountObject (readonly)

Returns the value of attribute amount.



4
5
6
# File 'lib/subsify/plan.rb', line 4

def amount
  @amount
end

#currencyObject (readonly)

Returns the value of attribute currency.



4
5
6
# File 'lib/subsify/plan.rb', line 4

def currency
  @currency
end

#currency_symbolObject (readonly)

Returns the value of attribute currency_symbol.



4
5
6
# File 'lib/subsify/plan.rb', line 4

def currency_symbol
  @currency_symbol
end

#descriptionObject (readonly)

Returns the value of attribute description.



4
5
6
# File 'lib/subsify/plan.rb', line 4

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/subsify/plan.rb', line 4

def id
  @id
end

#intervalObject (readonly)

Returns the value of attribute interval.



4
5
6
# File 'lib/subsify/plan.rb', line 4

def interval
  @interval
end