Class: RestfulKashflow::ApiService

Inherits:
Object
  • Object
show all
Defined in:
lib/restful_kashflow/api_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username, password, memorable_word, url, options) ⇒ ApiService

Returns a new instance of ApiService.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/restful_kashflow/api_service.rb', line 9

def initialize(username, password, memorable_word, url, options)

  @username = username
  @password = password
  @memorable_word = memorable_word
  @url = url
  @options = options

  # Send the username and password, returning a temporary token and
  # list of letters places to be extracted from the memorable word
  start_first_connection

  # Send the temporary token and letters from the memorable word, as
  # requested and get a permanent token in return.
  start_second_connection
end

Instance Attribute Details

#session_tokenObject (readonly)

Returns the value of attribute session_token.



7
8
9
# File 'lib/restful_kashflow/api_service.rb', line 7

def session_token
  @session_token
end

#urlObject (readonly)

Returns the value of attribute url.



7
8
9
# File 'lib/restful_kashflow/api_service.rb', line 7

def url
  @url
end