module Idnow
Constants
- ENVIRONMENTS
Public Class Methods
api_key=(api_key)
click to toggle source
# File lib/idnow.rb, line 63 def api_key=(api_key) @client = nil @api_key = api_key end
client()
click to toggle source
# File lib/idnow.rb, line 82 def client @client ||= Idnow::Client.new(env: @env, company_id: @company_id, api_key: @api_key, sftp_options: @sftp_options || {}) end
company_id=(company_id)
click to toggle source
# File lib/idnow.rb, line 58 def company_id=(company_id) @client = nil @company_id = company_id end
custom_environments=(custom_environments)
click to toggle source
# File lib/idnow.rb, line 73 def custom_environments=(custom_environments) @client = nil @custom_environments = custom_environments end
endpoint(env, host)
click to toggle source
# File lib/idnow.rb, line 78 def endpoint(env, host) (@custom_environments || {}).dig(env, host) || Idnow::ENVIRONMENTS[env][host] end
env=(env)
click to toggle source
# File lib/idnow.rb, line 51 def env=(env) raise ArgumentError, 'Please provide a valid enviroment, :test or :live' unless ENVIRONMENTS.keys.include?(env) @client = nil @env = env end
sftp_options=(sftp_options)
click to toggle source
# File lib/idnow.rb, line 68 def sftp_options=(sftp_options) @client = nil @sftp_options = sftp_options end
Private Instance Methods
api_key=(api_key)
click to toggle source
# File lib/idnow.rb, line 63 def api_key=(api_key) @client = nil @api_key = api_key end
client()
click to toggle source
# File lib/idnow.rb, line 82 def client @client ||= Idnow::Client.new(env: @env, company_id: @company_id, api_key: @api_key, sftp_options: @sftp_options || {}) end
company_id=(company_id)
click to toggle source
# File lib/idnow.rb, line 58 def company_id=(company_id) @client = nil @company_id = company_id end
custom_environments=(custom_environments)
click to toggle source
# File lib/idnow.rb, line 73 def custom_environments=(custom_environments) @client = nil @custom_environments = custom_environments end
endpoint(env, host)
click to toggle source
# File lib/idnow.rb, line 78 def endpoint(env, host) (@custom_environments || {}).dig(env, host) || Idnow::ENVIRONMENTS[env][host] end
env=(env)
click to toggle source
# File lib/idnow.rb, line 51 def env=(env) raise ArgumentError, 'Please provide a valid enviroment, :test or :live' unless ENVIRONMENTS.keys.include?(env) @client = nil @env = env end
sftp_options=(sftp_options)
click to toggle source
# File lib/idnow.rb, line 68 def sftp_options=(sftp_options) @client = nil @sftp_options = sftp_options end