Class: FolioApiClient::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/folio_api_client/configuration.rb

Overview

Data structure that stores FolioApiClient configuration options.

Constant Summary collapse

DEFAULT_TIMEOUT =
60
DEFAULT_USER_AGENT =
'FolioApiClient'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url:, username:, password:, tenant:, timeout: DEFAULT_TIMEOUT, user_agent: DEFAULT_USER_AGENT) ⇒ Configuration

Returns a new instance of Configuration.



12
13
14
15
16
17
18
19
# File 'lib/folio_api_client/configuration.rb', line 12

def initialize(url:, username:, password:, tenant:, timeout: DEFAULT_TIMEOUT, user_agent: DEFAULT_USER_AGENT)
  @url = url
  @username = username
  @password = password
  @tenant = tenant
  @timeout = timeout
  @user_agent = user_agent
end

Instance Attribute Details

#passwordObject (readonly)

Returns the value of attribute password.



9
10
11
# File 'lib/folio_api_client/configuration.rb', line 9

def password
  @password
end

#tenantObject (readonly)

Returns the value of attribute tenant.



9
10
11
# File 'lib/folio_api_client/configuration.rb', line 9

def tenant
  @tenant
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



9
10
11
# File 'lib/folio_api_client/configuration.rb', line 9

def timeout
  @timeout
end

#tokenObject

Returns the value of attribute token.



10
11
12
# File 'lib/folio_api_client/configuration.rb', line 10

def token
  @token
end

#urlObject (readonly)

Returns the value of attribute url.



9
10
11
# File 'lib/folio_api_client/configuration.rb', line 9

def url
  @url
end

#user_agentObject (readonly)

Returns the value of attribute user_agent.



9
10
11
# File 'lib/folio_api_client/configuration.rb', line 9

def user_agent
  @user_agent
end

#usernameObject (readonly)

Returns the value of attribute username.



9
10
11
# File 'lib/folio_api_client/configuration.rb', line 9

def username
  @username
end