|
12 | 12 | (function(root, factory) { |
13 | 13 | if (typeof define === 'function' && define.amd) { |
14 | 14 | // AMD. Register as an anonymous module. |
15 | | - define(['Configuration', 'ApiClient', 'model/MemberGroupsResponse', 'model/OrganizationsResponse', 'model/PermissionsResponse'], factory); |
| 15 | + define(['Configuration', 'ApiClient', 'model/IndividualMembershipDataRedactionRequest', 'model/IndividualUserDataRedactionResponse', 'model/MemberGroupsResponse', 'model/OrganizationsResponse', 'model/PermissionsResponse'], factory); |
16 | 16 | } else if (typeof module === 'object' && module.exports) { |
17 | 17 | // CommonJS-like environments that support module.exports, like Node. |
18 | | - module.exports = factory(require('../Configuration'), require('../ApiClient'), require('../model/MemberGroupsResponse'), require('../model/OrganizationsResponse'), require('../model/PermissionsResponse')); |
| 18 | + module.exports = factory(require('../Configuration'), require('../ApiClient'), require('../model/IndividualMembershipDataRedactionRequest'), require('../model/IndividualUserDataRedactionResponse'), require('../model/MemberGroupsResponse'), require('../model/OrganizationsResponse'), require('../model/PermissionsResponse')); |
19 | 19 | } else { |
20 | 20 | // Browser globals (root is window) |
21 | 21 | if (!root.DocusignAdmin) { |
22 | 22 | root.DocusignAdmin = {}; |
23 | 23 | } |
24 | | - root.DocusignAdmin.AccountsApi = factory(root.DocusignAdmin.Configuration, root.DocusignAdmin.ApiClient, root.DocusignAdmin.MemberGroupsResponse, root.DocusignAdmin.OrganizationsResponse, root.DocusignAdmin.PermissionsResponse); |
| 24 | + root.DocusignAdmin.AccountsApi = factory(root.DocusignAdmin.Configuration, root.DocusignAdmin.ApiClient, root.DocusignAdmin.IndividualMembershipDataRedactionRequest, root.DocusignAdmin.IndividualUserDataRedactionResponse, root.DocusignAdmin.MemberGroupsResponse, root.DocusignAdmin.OrganizationsResponse, root.DocusignAdmin.PermissionsResponse); |
25 | 25 | } |
26 | | -}(this, function(Configuration, ApiClient, MemberGroupsResponse, OrganizationsResponse, PermissionsResponse) { |
| 26 | +}(this, function(Configuration, ApiClient, IndividualMembershipDataRedactionRequest, IndividualUserDataRedactionResponse, MemberGroupsResponse, OrganizationsResponse, PermissionsResponse) { |
27 | 27 | 'use strict'; |
28 | 28 |
|
29 | 29 | /** |
|
237 | 237 | authNames, contentTypes, accepts, returnType, callback |
238 | 238 | ); |
239 | 239 | }; |
| 240 | + |
| 241 | + /** |
| 242 | + * (Optional) Callback function to receive the result of the redactIndividualMembershipData operation. If none specified a Promise will be returned. |
| 243 | + * @callback module:api/AccountsApi~redactIndividualMembershipDataCallback |
| 244 | + * @param {String} error Error message, if any. |
| 245 | + * @param {module:model/IndividualUserDataRedactionResponse} data The data returned by the service call. |
| 246 | + * @param {String} If a callback was specified, the response The complete HTTP response, else a Promise resolving the response Data. |
| 247 | + */ |
| 248 | + |
| 249 | + /** |
| 250 | + * Redacts membership data for users with memberships in an account. |
| 251 | + * Required scopes: user_data_redact |
| 252 | + * @param {String} accountId The account ID Guid |
| 253 | + * @param {module:model/IndividualMembershipDataRedactionRequest} requestModel The request body describing the membership to be redacted |
| 254 | + * @param {module:api/AccountsApi~redactIndividualMembershipDataCallback} callback The callback function, accepting three arguments: error, data, response |
| 255 | + * data is of type: {@link module:model/IndividualUserDataRedactionResponse} |
| 256 | + */ |
| 257 | + this.redactIndividualMembershipData = function(requestModel, accountId, callback) { |
| 258 | + var postBody = requestModel; |
| 259 | + |
| 260 | + // verify the required parameter 'accountId' is set |
| 261 | + if (accountId === undefined || accountId === null) { |
| 262 | + throw new Error("Missing the required parameter 'accountId' when calling redactIndividualMembershipData"); |
| 263 | + } |
| 264 | + |
| 265 | + // verify the required parameter 'requestModel' is set |
| 266 | + if (requestModel === undefined || requestModel === null) { |
| 267 | + throw new Error("Missing the required parameter 'requestModel' when calling redactIndividualMembershipData"); |
| 268 | + } |
| 269 | + |
| 270 | + if (typeof callback !== 'function' && arguments.length && typeof arguments[arguments.length-1] === 'function'){ |
| 271 | + if (typeof optsOrCallback !== 'undefined') { |
| 272 | + optsOrCallback = callback; |
| 273 | + } |
| 274 | + callback = arguments[arguments.length-1]; |
| 275 | + } |
| 276 | + |
| 277 | + var pathParams = { |
| 278 | + 'accountId': accountId |
| 279 | + }; |
| 280 | + var queryParams = { |
| 281 | + }; |
| 282 | + var headerParams = { |
| 283 | + }; |
| 284 | + var formParams = { |
| 285 | + }; |
| 286 | + |
| 287 | + var authNames = []; |
| 288 | + var contentTypes = ['application/json']; |
| 289 | + var accepts = ['application/json']; |
| 290 | + var returnType = IndividualUserDataRedactionResponse; |
| 291 | + |
| 292 | + return this.apiClient.callApi( |
| 293 | + '/v2/data_redaction/accounts/{accountId}/user', 'POST', |
| 294 | + pathParams, queryParams, headerParams, formParams, postBody, |
| 295 | + authNames, contentTypes, accepts, returnType, callback |
| 296 | + ); |
| 297 | + }; |
240 | 298 | }; |
241 | 299 |
|
242 | 300 | return exports; |
|
0 commit comments