# frozen_string_literal: true module CapitalOnTap class Configuration attr_accessor :client_id, :client_secret, :username, :password, :env attr_writer :debug AUTH_DOMAINS = { production: 'https://api-auth.capitalontap.com', development: 'https://prelive-api-auth.capitalontap.com' } API_DOMAINS = { production: 'https://api-partner.capitalontap.com', development: 'https://prelive-api-partner.capitalontap.com' } def initialize @client_id = '' @client_secret = '' @username = '' @password = '' @env = defined?(Rails) ? Rails.env : :development @debug = false end def debug? @debug end def base_auth_url AUTH_DOMAINS[@env.to_sym] end def base_url API_DOMAINS[@env.to_sym] end end end