lib/ringcentral_sdk/rest/configuration.rb in ringcentral_sdk-3.0.1 vs lib/ringcentral_sdk/rest/configuration.rb in ringcentral_sdk-3.1.0

- old
+ new

@@ -7,27 +7,18 @@ module RingCentralSdk module REST # Configuration class populated by Client constructor block class Configuration - attr_accessor :server_url - attr_accessor :client_id - attr_accessor :client_secret - attr_accessor :redirect_url + attr_accessor :server_url, + :client_id, :client_secret, + :redirect_url, + :jwt, :token, :token_file, + :load_env, + :headers, :retry, :retry_options, + :logger - attr_accessor :username - attr_accessor :extension - attr_accessor :password - attr_accessor :token - attr_accessor :token_file - - attr_accessor :load_env - attr_accessor :headers - attr_accessor :retry - attr_accessor :retry_options - attr_accessor :logger - def inflate @logger = default_logger if !defined?(@logger) || @logger.nil? load_environment if load_env inflate_headers inflate_retry @@ -45,12 +36,13 @@ Dotenv.load @server_url = ENV['RINGCENTRAL_SERVER_URL'] if ENV.key? 'RINGCENTRAL_SERVER_URL' @client_id = ENV['RINGCENTRAL_CLIENT_ID'] if ENV.key? 'RINGCENTRAL_CLIENT_ID' @client_secret = ENV['RINGCENTRAL_CLIENT_SECRET'] if ENV.key? 'RINGCENTRAL_CLIENT_SECRET' @redirect_url = ENV['RINGCENTRAL_REDIRECT_URL'] if ENV.key? 'RINGCENTRAL_REDIRECT_URL' - @username = ENV['RINGCENTRAL_USERNAME'] if ENV.key? 'RINGCENTRAL_USERNAME' - @extension = ENV['RINGCENTRAL_EXTENSION'] if ENV.key? 'RINGCENTRAL_EXTENSION' - @password = ENV['RINGCENTRAL_PASSWORD'] if ENV.key? 'RINGCENTRAL_PASSWORD' + # @username = ENV['RINGCENTRAL_USERNAME'] if ENV.key? 'RINGCENTRAL_USERNAME' + # @extension = ENV['RINGCENTRAL_EXTENSION'] if ENV.key? 'RINGCENTRAL_EXTENSION' + # @password = ENV['RINGCENTRAL_PASSWORD'] if ENV.key? 'RINGCENTRAL_PASSWORD' + @jwt = ENV['RINGCENTRAL_JWT'] if ENV.key? 'RINGCENTRAL_JWT' @token = ENV['RINGCENTRAL_TOKEN'] if ENV.key? 'RINGCENTRAL_TOKEN' @token_file = ENV['RINGCENTRAL_TOKEN_FILE'] if ENV.key? 'RINGCENTRAL_TOKEN_FILE' @retry = ENV['RINGCENTRAL_RETRY'] if ENV.key? 'RINGCENTRAL_RETRY' @retry_options = ENV['RINGCENTRAL_RETRY_OPTIONS'] if ENV.key? 'RINGCENTRAL_RETRY_OPTIONS' @headers = ENV['RINGCENTRAL_HEADERS'] if ENV.key? 'RINGCENTRAL_HEADERS'