Class: ZohoBooks::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/zoho_books/config.rb

Constant Summary collapse

DEFAULT_BASE_URL =
'https://accounts.zoho.eu'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config = {}) ⇒ Config

Returns a new instance of Config.



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/zoho_books/config.rb', line 10

def initialize(config = {})
  @base_url = config['base_url'] || DEFAULT_BASE_URL
  @portal_id = config['portal_id']
  @access_token = config['access_token']
  @client_id = config['client_id']
  @client_secret = config['client_secret']
  @redirect_uri = config['redirect_uri']
  @organization_id = config['organization_id']
  @refresh_token = config['refresh_token']

  @access_token_expires_at = nil
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



5
6
7
# File 'lib/zoho_books/config.rb', line 5

def access_token
  @access_token
end

#access_token_expires_atObject

Returns the value of attribute access_token_expires_at.



5
6
7
# File 'lib/zoho_books/config.rb', line 5

def access_token_expires_at
  @access_token_expires_at
end

#base_urlObject

Returns the value of attribute base_url.



5
6
7
# File 'lib/zoho_books/config.rb', line 5

def base_url
  @base_url
end

#client_idObject

Returns the value of attribute client_id.



5
6
7
# File 'lib/zoho_books/config.rb', line 5

def client_id
  @client_id
end

#client_secretObject

Returns the value of attribute client_secret.



5
6
7
# File 'lib/zoho_books/config.rb', line 5

def client_secret
  @client_secret
end

#organization_idObject

Returns the value of attribute organization_id.



5
6
7
# File 'lib/zoho_books/config.rb', line 5

def organization_id
  @organization_id
end

#portal_idObject

Returns the value of attribute portal_id.



5
6
7
# File 'lib/zoho_books/config.rb', line 5

def portal_id
  @portal_id
end

#redirect_uriObject

Returns the value of attribute redirect_uri.



5
6
7
# File 'lib/zoho_books/config.rb', line 5

def redirect_uri
  @redirect_uri
end

#refresh_tokenObject

Returns the value of attribute refresh_token.



5
6
7
# File 'lib/zoho_books/config.rb', line 5

def refresh_token
  @refresh_token
end