Class: FolioClient::Config

Inherits:
Struct
  • Object
show all
Defined in:
lib/folio_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#login_paramsObject

Returns the value of attribute login_params

Returns:

  • (Object)

    the current value of login_params



52
53
54
# File 'lib/folio_client.rb', line 52

def 
  @login_params
end

#tenant_idObject

Returns the value of attribute tenant_id

Returns:

  • (Object)

    the current value of tenant_id



52
53
54
# File 'lib/folio_client.rb', line 52

def tenant_id
  @tenant_id
end

#timeoutObject

Returns the value of attribute timeout

Returns:

  • (Object)

    the current value of timeout



52
53
54
# File 'lib/folio_client.rb', line 52

def timeout
  @timeout
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



52
53
54
# File 'lib/folio_client.rb', line 52

def url
  @url
end

#user_agentObject

Returns the value of attribute user_agent

Returns:

  • (Object)

    the current value of user_agent



52
53
54
# File 'lib/folio_client.rb', line 52

def user_agent
  @user_agent
end

Instance Method Details

#headersHash<Symbol,String>

Build default headers for Folio-bound requests.

Returns:

  • (Hash<Symbol,String>)

    default request headers



55
56
57
58
59
60
61
62
# File 'lib/folio_client.rb', line 55

def headers
  {
    accept: 'application/json, text/plain',
    content_type: 'application/json',
    user_agent: user_agent,
    'X-Okapi-Tenant': tenant_id
  }
end