Class: Subsify::Card

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Card

Returns a new instance of Card.



5
6
7
8
9
# File 'lib/subsify/card.rb', line 5

def initialize(data)
  @last_four = data['last_four']
  @type = data['card_type']
  @expires_on = Date.parse(data['expires_on'])
end

Instance Attribute Details

#expires_onObject (readonly)

Returns the value of attribute expires_on.



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

def expires_on
  @expires_on
end

#last_fourObject (readonly)

Returns the value of attribute last_four.



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

def last_four
  @last_four
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end