api/ConnectApi.js

/**
 * Docusign eSignature REST API
 * The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign.
 *
 * OpenAPI spec version: v2.1
 * Contact: devcenter@docusign.com
 *
 * NOTE: This class is auto generated. Do not edit the class manually and submit a new issue instead.
 *
 */

(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
	define(['Configuration', 'ApiClient', 'model/ConnectConfigResults', 'model/ConnectCustomConfiguration', 'model/ConnectDeleteFailureResult', 'model/ConnectFailureFilter', 'model/ConnectFailureResults', 'model/ConnectLog', 'model/ConnectLogs', 'model/ConnectOAuthConfig', 'model/ErrorDetails', 'model/IntegratedConnectUserInfoList', 'model/IntegratedUserInfoList', 'model/MobileNotifierConfigurationInformation'], factory);
  } else if (typeof module === 'object' && module.exports) {
    // CommonJS-like environments that support module.exports, like Node.
    module.exports = factory(require('../Configuration'), require('../ApiClient'), require('../model/ConnectConfigResults'), require('../model/ConnectCustomConfiguration'), require('../model/ConnectDeleteFailureResult'), require('../model/ConnectFailureFilter'), require('../model/ConnectFailureResults'), require('../model/ConnectLog'), require('../model/ConnectLogs'), require('../model/ConnectOAuthConfig'), require('../model/ErrorDetails'), require('../model/IntegratedConnectUserInfoList'), require('../model/IntegratedUserInfoList'), require('../model/MobileNotifierConfigurationInformation'));
  } else {
    // Browser globals (root is window)
    if (!root.Docusign) {
      root.Docusign = {};
    }
    root.Docusign.ConnectApi = factory(root.Docusign.Configuration, root.Docusign.ApiClient, root.Docusign.ConnectConfigResults, root.Docusign.ConnectCustomConfiguration, root.Docusign.ConnectDeleteFailureResult, root.Docusign.ConnectFailureFilter, root.Docusign.ConnectFailureResults, root.Docusign.ConnectLog, root.Docusign.ConnectLogs, root.Docusign.ConnectOAuthConfig, root.Docusign.ErrorDetails, root.Docusign.IntegratedConnectUserInfoList, root.Docusign.IntegratedUserInfoList, root.Docusign.MobileNotifierConfigurationInformation);
  }
}(this, function(Configuration, ApiClient, ConnectConfigResults, ConnectCustomConfiguration, ConnectDeleteFailureResult, ConnectFailureFilter, ConnectFailureResults, ConnectLog, ConnectLogs, ConnectOAuthConfig, ErrorDetails, IntegratedConnectUserInfoList, IntegratedUserInfoList, MobileNotifierConfigurationInformation) {
  'use strict';

  /**
   * Connect service.
   * @module api/ConnectApi
   */

  /**
   * Constructs a new ConnectApi. 
   * @alias module:api/ConnectApi
   * @class
   * @param {module:ApiClient} apiClient Optional API client implementation to use,
   * default to {@link module:ApiClient#instance} if unspecified.
   */
  var exports = function(apiClient) {
    this.apiClient = apiClient || Configuration.default.getDefaultApiClient() || ApiClient.instance;


    this.setApiClient = function(apiClient) {
      this.apiClient = apiClient;
    };

    this.getApiClient = function() {
      return this.apiClient;
    };


    /**
     * (Optional) Callback function to receive the result of the createConfiguration operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~createConfigurationCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectCustomConfiguration} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Creates a connect configuration for the specified account.
     * Creates a DocuSign Custom Connect definition for your account. DocuSign Connect enables the sending of real-time data updates to external applications. These updates are generated by user transactions as the envelope progresses through actions to completion. The Connect Service provides updated information about the status of these transactions and returns updates that include the actual content of document form fields. Be aware that, these updates might or might not include the document itself. For more information about Connect, see the [ML:DocuSign Connect Service Guide].

###### Note: Connect must be enabled for your account to use this function. This cannot be used to set up Connect configurations for Salesforce or eOriginal.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
     * @param {module:model/ConnectCustomConfiguration} optsOrCallback.connectCustomConfiguration 
     * @param {module:api/ConnectApi~createConfigurationCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectCustomConfiguration}
     */
    this.createConfiguration = function(accountId, optsOrCallback, callback) {
      optsOrCallback = optsOrCallback || {};

      if (typeof optsOrCallback === 'function') {
        callback = optsOrCallback;
        optsOrCallback = {};
      }

      var postBody = optsOrCallback['connectCustomConfiguration'];

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling createConfiguration");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectCustomConfiguration;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the createConnectOAuthConfig operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~createConnectOAuthConfigCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectOAuthConfig} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Sets the Connect OAuth Config for the account.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
     * @param {module:model/ConnectOAuthConfig} optsOrCallback.connectOAuthConfig 
     * @param {module:api/ConnectApi~createConnectOAuthConfigCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectOAuthConfig}
     */
    this.createConnectOAuthConfig = function(accountId, optsOrCallback, callback) {
      optsOrCallback = optsOrCallback || {};

      if (typeof optsOrCallback === 'function') {
        callback = optsOrCallback;
        optsOrCallback = {};
      }

      var postBody = optsOrCallback['connectOAuthConfig'];

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling createConnectOAuthConfig");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectOAuthConfig;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/oauth', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the deleteConfiguration operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~deleteConfigurationCallback
     * @param {String} error Error message, if any.
     * @param data This operation does not return a value.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Deletes the specified connect configuration.
     * Deletes the specified DocuSign Connect configuration.

###### Note: Connect must be enabled for your account to use this function.

 

     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {String} connectId The ID of the custom Connect configuration being accessed.
     * @param {module:api/ConnectApi~deleteConfigurationCallback} callback The callback function, accepting three arguments: error, data, response
     */
    this.deleteConfiguration = function(accountId, connectId, callback) {
      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling deleteConfiguration");
      }

      // verify the required parameter 'connectId' is set
      if (connectId === undefined || connectId === null) {
        throw new Error("Missing the required parameter 'connectId' when calling deleteConfiguration");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId,
        'connectId': connectId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = null;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/{connectId}', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the deleteConnectOAuthConfig operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~deleteConnectOAuthConfigCallback
     * @param {String} error Error message, if any.
     * @param data This operation does not return a value.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Sets the Connect OAuth Config for the account.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {module:api/ConnectApi~deleteConnectOAuthConfigCallback} callback The callback function, accepting three arguments: error, data, response
     */
    this.deleteConnectOAuthConfig = function(accountId, callback) {
      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling deleteConnectOAuthConfig");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = null;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/oauth', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the deleteEventFailureLog operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~deleteEventFailureLogCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectDeleteFailureResult} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Deletes a Connect failure log entry.
     * Deletes the Connect failure log information for the specified entry.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {String} failureId The ID of the failed connect log entry.
     * @param {module:api/ConnectApi~deleteEventFailureLogCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectDeleteFailureResult}
     */
    this.deleteEventFailureLog = function(accountId, failureId, callback) {
      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling deleteEventFailureLog");
      }

      // verify the required parameter 'failureId' is set
      if (failureId === undefined || failureId === null) {
        throw new Error("Missing the required parameter 'failureId' when calling deleteEventFailureLog");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId,
        'failureId': failureId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectDeleteFailureResult;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/failures/{failureId}', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the deleteEventLog operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~deleteEventLogCallback
     * @param {String} error Error message, if any.
     * @param data This operation does not return a value.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Deletes a specified Connect log entry.
     * Deletes a specified entry from the Connect Log.

     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {String} logId The ID of the connect log entry
     * @param {module:api/ConnectApi~deleteEventLogCallback} callback The callback function, accepting three arguments: error, data, response
     */
    this.deleteEventLog = function(accountId, logId, callback) {
      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling deleteEventLog");
      }

      // verify the required parameter 'logId' is set
      if (logId === undefined || logId === null) {
        throw new Error("Missing the required parameter 'logId' when calling deleteEventLog");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId,
        'logId': logId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = null;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/logs/{logId}', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the deleteEventLogs operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~deleteEventLogsCallback
     * @param {String} error Error message, if any.
     * @param data This operation does not return a value.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Gets a list of Connect log entries.
     * Retrieves a list of connect log entries for your account.

###### Note: The `enableLog` property in the Connect configuration must be set to **true** to enable logging. If logging is not enabled, then no log entries are recorded.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {module:api/ConnectApi~deleteEventLogsCallback} callback The callback function, accepting three arguments: error, data, response
     */
    this.deleteEventLogs = function(accountId, callback) {
      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling deleteEventLogs");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = null;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/logs', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the deleteMobileNotifiers operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~deleteMobileNotifiersCallback
     * @param {String} error Error message, if any.
     * @param {module:model/MobileNotifierConfigurationInformation} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Reserved
     * Reserved:
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
     * @param {module:model/MobileNotifierConfigurationInformation} optsOrCallback.mobileNotifierConfigurationInformation 
     * @param {module:api/ConnectApi~deleteMobileNotifiersCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/MobileNotifierConfigurationInformation}
     */
    this.deleteMobileNotifiers = function(accountId, optsOrCallback, callback) {
      optsOrCallback = optsOrCallback || {};

      if (typeof optsOrCallback === 'function') {
        callback = optsOrCallback;
        optsOrCallback = {};
      }

      var postBody = optsOrCallback['mobileNotifierConfigurationInformation'];

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling deleteMobileNotifiers");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = MobileNotifierConfigurationInformation;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/mobile_notifiers', 'DELETE',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the getConfiguration operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~getConfigurationCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectConfigResults} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Get a Connect Configuration Information
     * Retrieves the information for the specified DocuSign Connect configuration.

###### Note: Connect must be enabled for your account to use this function.

     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {String} connectId The ID of the custom Connect configuration being accessed.
     * @param {module:api/ConnectApi~getConfigurationCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectConfigResults}
     */
    this.getConfiguration = function(accountId, connectId, callback) {
      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling getConfiguration");
      }

      // verify the required parameter 'connectId' is set
      if (connectId === undefined || connectId === null) {
        throw new Error("Missing the required parameter 'connectId' when calling getConfiguration");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId,
        'connectId': connectId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectConfigResults;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/{connectId}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the getConnectAllUsers operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~getConnectAllUsersCallback
     * @param {String} error Error message, if any.
     * @param {module:model/IntegratedConnectUserInfoList} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Returns all users from the configured Connect service.
     * 
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {String} connectId The ID of the custom Connect configuration being accessed.
     * @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
     * @param {String} optsOrCallback.count 
     * @param {String} optsOrCallback.domainUsersOnly 
     * @param {String} optsOrCallback.emailSubstring 
     * @param {String} optsOrCallback.startPosition 
     * @param {String} optsOrCallback.status 
     * @param {String} optsOrCallback.userNameSubstring 
     * @param {module:api/ConnectApi~getConnectAllUsersCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/IntegratedConnectUserInfoList}
     */
    this.getConnectAllUsers = function(accountId, connectId, optsOrCallback, callback) {
      optsOrCallback = optsOrCallback || {};

      if (typeof optsOrCallback === 'function') {
        callback = optsOrCallback;
        optsOrCallback = {};
      }

      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling getConnectAllUsers");
      }

      // verify the required parameter 'connectId' is set
      if (connectId === undefined || connectId === null) {
        throw new Error("Missing the required parameter 'connectId' when calling getConnectAllUsers");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId,
        'connectId': connectId
      };
      var queryParams = {
        'count': optsOrCallback['count'],
        'domain_users_only': optsOrCallback['domainUsersOnly'],
        'email_substring': optsOrCallback['emailSubstring'],
        'start_position': optsOrCallback['startPosition'],
        'status': optsOrCallback['status'],
        'user_name_substring': optsOrCallback['userNameSubstring']
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = IntegratedConnectUserInfoList;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/{connectId}/all/users', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the getConnectOAuthConfig operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~getConnectOAuthConfigCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectOAuthConfig} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Sets the Connect OAuth Config for the account.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {module:api/ConnectApi~getConnectOAuthConfigCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectOAuthConfig}
     */
    this.getConnectOAuthConfig = function(accountId, callback) {
      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling getConnectOAuthConfig");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectOAuthConfig;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/oauth', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the getEventLog operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~getEventLogCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectLog} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Get the specified Connect log entry.
     * Retrieves the specified Connect log entry for your account.

###### Note: The `enableLog` setting in the Connect configuration must be set to true to enable logging. If logging is not enabled, then no log entries are recorded. 
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {String} logId The ID of the connect log entry
     * @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
     * @param {String} optsOrCallback.additionalInfo When true, the connectDebugLog information is included in the response.
     * @param {module:api/ConnectApi~getEventLogCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectLog}
     */
    this.getEventLog = function(accountId, logId, optsOrCallback, callback) {
      optsOrCallback = optsOrCallback || {};

      if (typeof optsOrCallback === 'function') {
        callback = optsOrCallback;
        optsOrCallback = {};
      }

      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling getEventLog");
      }

      // verify the required parameter 'logId' is set
      if (logId === undefined || logId === null) {
        throw new Error("Missing the required parameter 'logId' when calling getEventLog");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId,
        'logId': logId
      };
      var queryParams = {
        'additional_info': optsOrCallback['additionalInfo']
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectLog;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/logs/{logId}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the listConfigurations operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~listConfigurationsCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectConfigResults} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Get Connect Configuration Information
     * Retrieves all the DocuSign Custom Connect definitions for the specified account.

###### Note: Connect must be enabled for your account to use this function. This does not retrieve information for Connect configurations for Box, eOriginal, or Salesforce.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {module:api/ConnectApi~listConfigurationsCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectConfigResults}
     */
    this.listConfigurations = function(accountId, callback) {
      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling listConfigurations");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectConfigResults;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the listEventFailureLogs operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~listEventFailureLogsCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectLogs} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Gets the Connect failure log information.
     * Retrieves the Connect Failure Log information. It can be used to determine which envelopes failed to post, so a republish request can be created.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
     * @param {String} optsOrCallback.fromDate 
     * @param {String} optsOrCallback.toDate 
     * @param {module:api/ConnectApi~listEventFailureLogsCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectLogs}
     */
    this.listEventFailureLogs = function(accountId, optsOrCallback, callback) {
      optsOrCallback = optsOrCallback || {};

      if (typeof optsOrCallback === 'function') {
        callback = optsOrCallback;
        optsOrCallback = {};
      }

      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling listEventFailureLogs");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
        'from_date': optsOrCallback['fromDate'],
        'to_date': optsOrCallback['toDate']
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectLogs;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/failures', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the listEventLogs operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~listEventLogsCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectLogs} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Gets the Connect log.
     * Retrieves a list of connect log entries for your account.

###### Note: The `enableLog` setting in the Connect configuration must be set to true to enable logging. If logging is not enabled, then no log entries are recorded. 
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
     * @param {String} optsOrCallback.fromDate 
     * @param {String} optsOrCallback.toDate 
     * @param {module:api/ConnectApi~listEventLogsCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectLogs}
     */
    this.listEventLogs = function(accountId, optsOrCallback, callback) {
      optsOrCallback = optsOrCallback || {};

      if (typeof optsOrCallback === 'function') {
        callback = optsOrCallback;
        optsOrCallback = {};
      }

      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling listEventLogs");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
        'from_date': optsOrCallback['fromDate'],
        'to_date': optsOrCallback['toDate']
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectLogs;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/logs', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the listMobileNotifiers operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~listMobileNotifiersCallback
     * @param {String} error Error message, if any.
     * @param {module:model/MobileNotifierConfigurationInformation} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Reserved
     * Reserved:
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {module:api/ConnectApi~listMobileNotifiersCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/MobileNotifierConfigurationInformation}
     */
    this.listMobileNotifiers = function(accountId, callback) {
      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling listMobileNotifiers");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = MobileNotifierConfigurationInformation;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/mobile_notifiers', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the listUsers operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~listUsersCallback
     * @param {String} error Error message, if any.
     * @param {module:model/IntegratedUserInfoList} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Returns users from the configured Connect service.
     * Returns users from the configured Connect service.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {String} connectId The ID of the custom Connect configuration being accessed.
     * @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
     * @param {String} optsOrCallback.count 
     * @param {String} optsOrCallback.emailSubstring 
     * @param {String} optsOrCallback.listIncludedUsers 
     * @param {String} optsOrCallback.startPosition 
     * @param {String} optsOrCallback.status 
     * @param {String} optsOrCallback.userNameSubstring 
     * @param {module:api/ConnectApi~listUsersCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/IntegratedUserInfoList}
     */
    this.listUsers = function(accountId, connectId, optsOrCallback, callback) {
      optsOrCallback = optsOrCallback || {};

      if (typeof optsOrCallback === 'function') {
        callback = optsOrCallback;
        optsOrCallback = {};
      }

      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling listUsers");
      }

      // verify the required parameter 'connectId' is set
      if (connectId === undefined || connectId === null) {
        throw new Error("Missing the required parameter 'connectId' when calling listUsers");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId,
        'connectId': connectId
      };
      var queryParams = {
        'count': optsOrCallback['count'],
        'email_substring': optsOrCallback['emailSubstring'],
        'list_included_users': optsOrCallback['listIncludedUsers'],
        'start_position': optsOrCallback['startPosition'],
        'status': optsOrCallback['status'],
        'user_name_substring': optsOrCallback['userNameSubstring']
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = IntegratedUserInfoList;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/{connectId}/users', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the retryEventForEnvelope operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~retryEventForEnvelopeCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectFailureResults} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Republishes Connect information for the specified envelope.
     * Republishes Connect information for the specified envelope.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {String} envelopeId The envelopeId Guid of the envelope being accessed.
     * @param {module:api/ConnectApi~retryEventForEnvelopeCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectFailureResults}
     */
    this.retryEventForEnvelope = function(accountId, envelopeId, callback) {
      var postBody = null;

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling retryEventForEnvelope");
      }

      // verify the required parameter 'envelopeId' is set
      if (envelopeId === undefined || envelopeId === null) {
        throw new Error("Missing the required parameter 'envelopeId' when calling retryEventForEnvelope");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId,
        'envelopeId': envelopeId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectFailureResults;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/envelopes/{envelopeId}/retry_queue', 'PUT',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the retryEventForEnvelopes operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~retryEventForEnvelopesCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectFailureResults} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Republishes Connect information for multiple envelopes.
     * Republishes Connect information for the  specified set of envelopes. The primary use is to republish Connect post failures by including envelope IDs for the envelopes that failed to post in the request. The list of envelope IDs that failed to post correctly can be retrieved by calling to [ML:GetConnectLog] retrieve the failure log.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
     * @param {module:model/ConnectFailureFilter} optsOrCallback.connectFailureFilter 
     * @param {module:api/ConnectApi~retryEventForEnvelopesCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectFailureResults}
     */
    this.retryEventForEnvelopes = function(accountId, optsOrCallback, callback) {
      optsOrCallback = optsOrCallback || {};

      if (typeof optsOrCallback === 'function') {
        callback = optsOrCallback;
        optsOrCallback = {};
      }

      var postBody = optsOrCallback['connectFailureFilter'];

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling retryEventForEnvelopes");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectFailureResults;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/envelopes/retry_queue', 'PUT',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the updateConfiguration operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~updateConfigurationCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectCustomConfiguration} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Updates a specified Connect configuration.
     * Updates the specified DocuSign Connect configuration in your account.

###### Note: Connect must be enabled for your account to use this function. This cannot be used to update Connect configurations for Box, eOriginal, or Salesforce.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
     * @param {module:model/ConnectCustomConfiguration} optsOrCallback.connectCustomConfiguration 
     * @param {module:api/ConnectApi~updateConfigurationCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectCustomConfiguration}
     */
    this.updateConfiguration = function(accountId, optsOrCallback, callback) {
      optsOrCallback = optsOrCallback || {};

      if (typeof optsOrCallback === 'function') {
        callback = optsOrCallback;
        optsOrCallback = {};
      }

      var postBody = optsOrCallback['connectCustomConfiguration'];

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling updateConfiguration");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectCustomConfiguration;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect', 'PUT',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the updateConnectOAuthConfig operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~updateConnectOAuthConfigCallback
     * @param {String} error Error message, if any.
     * @param {module:model/ConnectOAuthConfig} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Updates the existing Connect OAuth Config for the account.
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
     * @param {module:model/ConnectOAuthConfig} optsOrCallback.connectOAuthConfig 
     * @param {module:api/ConnectApi~updateConnectOAuthConfigCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/ConnectOAuthConfig}
     */
    this.updateConnectOAuthConfig = function(accountId, optsOrCallback, callback) {
      optsOrCallback = optsOrCallback || {};

      if (typeof optsOrCallback === 'function') {
        callback = optsOrCallback;
        optsOrCallback = {};
      }

      var postBody = optsOrCallback['connectOAuthConfig'];

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling updateConnectOAuthConfig");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = ConnectOAuthConfig;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/oauth', 'PUT',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };

    /**
     * (Optional) Callback function to receive the result of the updateMobileNotifiers operation. If none specified a Promise will be returned.
     * @callback module:api/ConnectApi~updateMobileNotifiersCallback
     * @param {String} error Error message, if any.
     * @param {module:model/MobileNotifierConfigurationInformation} data The data returned by the service call.
     * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data.
     */

    /**
     * Reserved
     * Reserved:
     * @param {String} accountId The external account number (int) or account ID Guid.
     * @param {Object} optsOrCallback Optional parameters, if you are passing no optional parameters, you can either pass a null or omit this parameter entirely.
     * @param {module:model/MobileNotifierConfigurationInformation} optsOrCallback.mobileNotifierConfigurationInformation 
     * @param {module:api/ConnectApi~updateMobileNotifiersCallback} callback The callback function, accepting three arguments: error, data, response
     * data is of type: {@link module:model/MobileNotifierConfigurationInformation}
     */
    this.updateMobileNotifiers = function(accountId, optsOrCallback, callback) {
      optsOrCallback = optsOrCallback || {};

      if (typeof optsOrCallback === 'function') {
        callback = optsOrCallback;
        optsOrCallback = {};
      }

      var postBody = optsOrCallback['mobileNotifierConfigurationInformation'];

      // verify the required parameter 'accountId' is set
      if (accountId === undefined || accountId === null) {
        throw new Error("Missing the required parameter 'accountId' when calling updateMobileNotifiers");
      }

      if (typeof callback !== 'function' &&  arguments.length && typeof arguments[arguments.length-1] === 'function'){
        if (typeof optsOrCallback !== 'undefined') {
          optsOrCallback = callback;
        }
        callback = arguments[arguments.length-1];
      }

      var pathParams = {
        'accountId': accountId
      };
      var queryParams = {
      };
      var headerParams = {
      };
      var formParams = {
      };

      var authNames = ['docusignAccessCode'];
      var contentTypes = [];
      var accepts = ['application/json'];
      var returnType = MobileNotifierConfigurationInformation;

      return this.apiClient.callApi(
        '/v2.1/accounts/{accountId}/connect/mobile_notifiers', 'PUT',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, callback
      );
    };
  };

  return exports;
}));