Class: CTM::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/ctm/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Token

Returns a new instance of Token.



5
6
7
8
# File 'lib/ctm/token.rb', line 5

def initialize(data)
  @token = data['token']
  @expires = data['expires']
end

Instance Attribute Details

#expiresObject (readonly)

Returns the value of attribute expires.



3
4
5
# File 'lib/ctm/token.rb', line 3

def expires
  @expires
end

#tokenObject (readonly)

Returns the value of attribute token.



3
4
5
# File 'lib/ctm/token.rb', line 3

def token
  @token
end

Instance Method Details

#accounts(options = {}) ⇒ Object



10
11
12
# File 'lib/ctm/token.rb', line 10

def accounts(options={})
  CTM::List.new('Account', options, @token)
end