lib/ringcentral_sdk/rest/client.rb in ringcentral_sdk-1.2.0 vs lib/ringcentral_sdk/rest/client.rb in ringcentral_sdk-1.2.1

- old
+ new

@@ -27,12 +27,12 @@ attr_reader :instance_headers def initialize(app_key='', app_secret='', server_url=RingCentralSdk::RC_SERVER_SANDBOX, opts={}) init_attributes() - self.app_config = RingCentralSdk::REST::ConfigApp.new( - app_key, app_secret, server_url, opts) + self.set_app_config( RingCentralSdk::REST::ConfigApp.new( + app_key, app_secret, server_url, opts) ) if opts.key?(:username) && opts.key?(:password) extension = opts.key?(:extension) ? opts[:extension] : '' authorize_password(opts[:username], extension, opts[:password]) end @@ -40,10 +40,10 @@ @instance_headers = opts[:headers] || {} @messages = RingCentralSdk::REST::Messages.new self end - def app_config=(new_app_config) + def set_app_config(new_app_config) @app_config = new_app_config @oauth2client = new_oauth2_client() end def init_attributes()