def get_token
      full_path = build_request_path("/GetToken")
      response = conn.post do |req|
        req.url(full_path)
        req.body = { Username: @username, Password: @password }.to_json
      end

      raise(GetTokenError, response.body) unless response.status == 200
      @token = response.body
    end
def get_token
      full_path = build_request_path("/GetToken")
      response = conn.post do |req|
        req.url(full_path)
        req.body = { Username: @username, Password: @password }.to_json
      end

      raise(GetTokenError, response.body) unless response.status == 200
      @token = response.body
    end
Instantiation of the Client

 @param url [String] Allscripts URL to be used to make Unity API calls
 @param app_name [String] app name assigned by Allscripts
 @param app_username [String] the app username supplied by Allscripts
 @param app_password [String] the app password supplied by Allscripts
 Gets security token necessary in all workflows
 @return [String] security token