Class: ZohoBooks::Config
- Inherits:
-
Object
- Object
- ZohoBooks::Config
- Defined in:
- lib/zoho_books/config.rb
Constant Summary collapse
- DEFAULT_BASE_URL =
"https://accounts.zoho.eu".freeze
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#access_token_expires_at ⇒ Object
Returns the value of attribute access_token_expires_at.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#portal_id ⇒ Object
Returns the value of attribute portal_id.
-
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
-
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(config = {}) ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/zoho_books/config.rb', line 8 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_token ⇒ Object
Returns the value of attribute access_token.
3 4 5 |
# File 'lib/zoho_books/config.rb', line 3 def access_token @access_token end |
#access_token_expires_at ⇒ Object
Returns the value of attribute access_token_expires_at.
3 4 5 |
# File 'lib/zoho_books/config.rb', line 3 def access_token_expires_at @access_token_expires_at end |
#base_url ⇒ Object
Returns the value of attribute base_url.
3 4 5 |
# File 'lib/zoho_books/config.rb', line 3 def base_url @base_url end |
#client_id ⇒ Object
Returns the value of attribute client_id.
3 4 5 |
# File 'lib/zoho_books/config.rb', line 3 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
3 4 5 |
# File 'lib/zoho_books/config.rb', line 3 def client_secret @client_secret end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
3 4 5 |
# File 'lib/zoho_books/config.rb', line 3 def organization_id @organization_id end |
#portal_id ⇒ Object
Returns the value of attribute portal_id.
3 4 5 |
# File 'lib/zoho_books/config.rb', line 3 def portal_id @portal_id end |
#redirect_uri ⇒ Object
Returns the value of attribute redirect_uri.
3 4 5 |
# File 'lib/zoho_books/config.rb', line 3 def redirect_uri @redirect_uri end |
#refresh_token ⇒ Object
Returns the value of attribute refresh_token.
3 4 5 |
# File 'lib/zoho_books/config.rb', line 3 def refresh_token @refresh_token end |