UNPKG

docusign-rooms

Version:
101 lines (87 loc) 3.78 kB
/** * DocuSign Rooms API - v2 * An API for an integrator to access the features of DocuSign Rooms * * OpenAPI spec version: v2 * 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/ApiError', 'model/GlobalClosingStatuses'], 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/ApiError'), require('../model/GlobalClosingStatuses')); } else { // Browser globals (root is window) if (!root.DocusignRooms) { root.DocusignRooms = {}; } root.DocusignRooms.ClosingStatusesApi = factory(root.DocusignRooms.Configuration, root.DocusignRooms.ApiClient, root.DocusignRooms.ApiError, root.DocusignRooms.GlobalClosingStatuses); } }(this, function(Configuration, ApiClient, ApiError, GlobalClosingStatuses) { 'use strict'; /** * ClosingStatuses service. * @module api/ClosingStatusesApi */ /** * Constructs a new ClosingStatusesApi. * @alias module:api/ClosingStatusesApi * @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 getClosingStatuses operation. If none specified a Promise will be returned. * @callback module:api/ClosingStatusesApi~getClosingStatusesCallback * @param {String} error Error message, if any. * @param {module:model/GlobalClosingStatuses} 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. */ /** * Retrieves the list of valid closing statuses. * Returns a list of closing statuses, or valid reasons for closing a room. * @param {module:api/ClosingStatusesApi~getClosingStatusesCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/GlobalClosingStatuses} */ this.getClosingStatuses = function(callback) { var postBody = null; 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 = { }; var queryParams = { }; var headerParams = { }; var formParams = { }; var authNames = ['docusignAccessCode']; var contentTypes = ['application/json-patch+json', 'application/json', 'text/json', 'application/_*+json']; var accepts = ['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']; var returnType = GlobalClosingStatuses; return this.apiClient.callApi( '/v2/closing_statuses', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); }; }; return exports; }));