Class: SabyVok::Config

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

Overview

Examples:

Configure once and reuse the client

SabyVok.configure do |config|
  config.client_id = ENV.fetch("SABY_CLIENT_ID")
  config.client_secret = ENV.fetch("SABY_CLIENT_SECRET")
  config.secret_key = ENV.fetch("SABY_SECRET_KEY")
end

requisites = SabyVok.client.req(inn: "7605016030")
puts requisites.first["company_name"]

Instance Attribute Summary collapse

Instance Attribute Details

#client_idObject

Returns the value of attribute client_id.



21
22
23
# File 'lib/saby_vok.rb', line 21

def client_id
  @client_id
end

#client_secretObject

Returns the value of attribute client_secret.



21
22
23
# File 'lib/saby_vok.rb', line 21

def client_secret
  @client_secret
end

#hostObject

Returns the value of attribute host.



21
22
23
# File 'lib/saby_vok.rb', line 21

def host
  @host
end

#loggerObject

Returns the value of attribute logger.



21
22
23
# File 'lib/saby_vok.rb', line 21

def logger
  @logger
end

#oauth_urlObject

Returns the value of attribute oauth_url.



21
22
23
# File 'lib/saby_vok.rb', line 21

def oauth_url
  @oauth_url
end

#retriesObject

Returns the value of attribute retries.



21
22
23
# File 'lib/saby_vok.rb', line 21

def retries
  @retries
end

#secret_keyObject

Returns the value of attribute secret_key.



21
22
23
# File 'lib/saby_vok.rb', line 21

def secret_key
  @secret_key
end

#timeoutObject

Returns the value of attribute timeout.



21
22
23
# File 'lib/saby_vok.rb', line 21

def timeout
  @timeout
end