docusign_esign.apis.users_api
Docusign eSignature REST API
The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. # noqa: E501
OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git
1# coding: utf-8 2 3""" 4 Docusign eSignature REST API 5 6 The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. # noqa: E501 7 8 OpenAPI spec version: v2.1 9 Contact: devcenter@docusign.com 10 Generated by: https://github.com/swagger-api/swagger-codegen.git 11""" 12 13 14from __future__ import absolute_import 15 16import sys 17import os 18import re 19 20# python 2 and python 3 compatibility library 21from six import iteritems 22 23from ..client.configuration import Configuration 24from ..client.api_client import ApiClient 25 26 27class UsersApi(object): 28 """ 29 NOTE: This class is auto generated by the swagger code generator program. 30 Do not edit the class manually. 31 Ref: https://github.com/swagger-api/swagger-codegen 32 """ 33 34 def __init__(self, api_client=None): 35 config = Configuration() 36 if api_client: 37 self.api_client = api_client 38 else: 39 if not config.api_client: 40 config.api_client = ApiClient() 41 self.api_client = config.api_client 42 43 def create(self, account_id, **kwargs): 44 """ 45 Adds news user to the specified account. 46 Adds new users to your account. Set the `userSettings` property in the request to specify the actions the users can perform on the account. 47 This method makes a synchronous HTTP request by default. To make an 48 asynchronous HTTP request, please define a `callback` function 49 to be invoked when receiving the response. 50 >>> def callback_function(response): 51 >>> pprint(response) 52 >>> 53 >>> thread = api.create(account_id, callback=callback_function) 54 55 :param callback function: The callback function 56 for asynchronous request. (optional) 57 :param str account_id: The external account number (int) or account ID Guid. (required) 58 :param NewUsersDefinition new_users_definition: 59 :return: NewUsersSummary 60 If the method is called asynchronously, 61 returns the request thread. 62 """ 63 kwargs['_return_http_data_only'] = True 64 if kwargs.get('callback'): 65 return self.create_with_http_info(account_id, **kwargs) 66 else: 67 (data) = self.create_with_http_info(account_id, **kwargs) 68 return data 69 70 def create_with_http_info(self, account_id, **kwargs): 71 """ 72 Adds news user to the specified account. 73 Adds new users to your account. Set the `userSettings` property in the request to specify the actions the users can perform on the account. 74 This method makes a synchronous HTTP request by default. To make an 75 asynchronous HTTP request, please define a `callback` function 76 to be invoked when receiving the response. 77 >>> def callback_function(response): 78 >>> pprint(response) 79 >>> 80 >>> thread = api.create_with_http_info(account_id, callback=callback_function) 81 82 :param callback function: The callback function 83 for asynchronous request. (optional) 84 :param str account_id: The external account number (int) or account ID Guid. (required) 85 :param NewUsersDefinition new_users_definition: 86 :return: NewUsersSummary 87 If the method is called asynchronously, 88 returns the request thread. 89 """ 90 91 all_params = ['account_id', 'new_users_definition'] 92 all_params.append('callback') 93 all_params.append('_return_http_data_only') 94 all_params.append('_preload_content') 95 all_params.append('_request_timeout') 96 97 params = locals() 98 for key, val in iteritems(params['kwargs']): 99 if key not in all_params: 100 raise TypeError( 101 "Got an unexpected keyword argument '%s'" 102 " to method create" % key 103 ) 104 params[key] = val 105 del params['kwargs'] 106 # verify the required parameter 'account_id' is set 107 if ('account_id' not in params) or (params['account_id'] is None): 108 raise ValueError("Missing the required parameter `account_id` when calling `create`") 109 110 111 collection_formats = {} 112 113 resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json') 114 path_params = {} 115 if 'account_id' in params: 116 path_params['accountId'] = params['account_id'] 117 118 query_params = {} 119 120 header_params = {} 121 122 form_params = [] 123 local_var_files = {} 124 125 body_params = None 126 if 'new_users_definition' in params: 127 body_params = params['new_users_definition'] 128 # HTTP header `Accept` 129 header_params['Accept'] = self.api_client.\ 130 select_header_accept(['application/json']) 131 132 # Authentication setting 133 auth_settings = [] 134 135 return self.api_client.call_api(resource_path, 'POST', 136 path_params, 137 query_params, 138 header_params, 139 body=body_params, 140 post_params=form_params, 141 files=local_var_files, 142 response_type='NewUsersSummary', 143 auth_settings=auth_settings, 144 callback=params.get('callback'), 145 _return_http_data_only=params.get('_return_http_data_only'), 146 _preload_content=params.get('_preload_content', True), 147 _request_timeout=params.get('_request_timeout'), 148 collection_formats=collection_formats) 149 150 def create_signatures(self, account_id, user_id, **kwargs): 151 """ 152 Adds user Signature and initials images to a Signature. 153 Adds a user signature image and/or user initials image to the specified user. The userId property specified in the endpoint must match the authenticated user's userId and the user must be a member of the account. The rules and processes associated with this are: * If Content-Type is set to application/json, then the default behavior for creating a default signature image, based on the name and a DocuSign font, is used. * If Content-Type is set to multipart/form-data, then the request must contain a first part with the user signature information, followed by parts that contain the images. For each Image part, the Content-Disposition header has a \"filename\" value that is used to map to the `signatureName` and/or `signatureInitials` properties in the JSON to the image. For example: `Content-Disposition: file; filename=\"Ron Test20121127083900\"` If no matching image (by filename value) is found, then the image is not set. One, both, or neither of the signature and initials images can be set with this call. The Content-Transfer-Encoding: base64 header, set in the header for the part containing the image, can be set to indicate that the images are formatted as base64 instead of as binary. If successful, 200-OK is returned, and a JSON structure containing the signature information is provided, note that the signatureId can change with each API POST, PUT, or DELETE since the changes to the signature structure cause the current signature to be closed, and a new signature record to be created. 154 This method makes a synchronous HTTP request by default. To make an 155 asynchronous HTTP request, please define a `callback` function 156 to be invoked when receiving the response. 157 >>> def callback_function(response): 158 >>> pprint(response) 159 >>> 160 >>> thread = api.create_signatures(account_id, user_id, callback=callback_function) 161 162 :param callback function: The callback function 163 for asynchronous request. (optional) 164 :param str account_id: The external account number (int) or account ID Guid. (required) 165 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 166 :param UserSignaturesInformation user_signatures_information: 167 :return: UserSignaturesInformation 168 If the method is called asynchronously, 169 returns the request thread. 170 """ 171 kwargs['_return_http_data_only'] = True 172 if kwargs.get('callback'): 173 return self.create_signatures_with_http_info(account_id, user_id, **kwargs) 174 else: 175 (data) = self.create_signatures_with_http_info(account_id, user_id, **kwargs) 176 return data 177 178 def create_signatures_with_http_info(self, account_id, user_id, **kwargs): 179 """ 180 Adds user Signature and initials images to a Signature. 181 Adds a user signature image and/or user initials image to the specified user. The userId property specified in the endpoint must match the authenticated user's userId and the user must be a member of the account. The rules and processes associated with this are: * If Content-Type is set to application/json, then the default behavior for creating a default signature image, based on the name and a DocuSign font, is used. * If Content-Type is set to multipart/form-data, then the request must contain a first part with the user signature information, followed by parts that contain the images. For each Image part, the Content-Disposition header has a \"filename\" value that is used to map to the `signatureName` and/or `signatureInitials` properties in the JSON to the image. For example: `Content-Disposition: file; filename=\"Ron Test20121127083900\"` If no matching image (by filename value) is found, then the image is not set. One, both, or neither of the signature and initials images can be set with this call. The Content-Transfer-Encoding: base64 header, set in the header for the part containing the image, can be set to indicate that the images are formatted as base64 instead of as binary. If successful, 200-OK is returned, and a JSON structure containing the signature information is provided, note that the signatureId can change with each API POST, PUT, or DELETE since the changes to the signature structure cause the current signature to be closed, and a new signature record to be created. 182 This method makes a synchronous HTTP request by default. To make an 183 asynchronous HTTP request, please define a `callback` function 184 to be invoked when receiving the response. 185 >>> def callback_function(response): 186 >>> pprint(response) 187 >>> 188 >>> thread = api.create_signatures_with_http_info(account_id, user_id, callback=callback_function) 189 190 :param callback function: The callback function 191 for asynchronous request. (optional) 192 :param str account_id: The external account number (int) or account ID Guid. (required) 193 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 194 :param UserSignaturesInformation user_signatures_information: 195 :return: UserSignaturesInformation 196 If the method is called asynchronously, 197 returns the request thread. 198 """ 199 200 all_params = ['account_id', 'user_id', 'user_signatures_information'] 201 all_params.append('callback') 202 all_params.append('_return_http_data_only') 203 all_params.append('_preload_content') 204 all_params.append('_request_timeout') 205 206 params = locals() 207 for key, val in iteritems(params['kwargs']): 208 if key not in all_params: 209 raise TypeError( 210 "Got an unexpected keyword argument '%s'" 211 " to method create_signatures" % key 212 ) 213 params[key] = val 214 del params['kwargs'] 215 # verify the required parameter 'account_id' is set 216 if ('account_id' not in params) or (params['account_id'] is None): 217 raise ValueError("Missing the required parameter `account_id` when calling `create_signatures`") 218 # verify the required parameter 'user_id' is set 219 if ('user_id' not in params) or (params['user_id'] is None): 220 raise ValueError("Missing the required parameter `user_id` when calling `create_signatures`") 221 222 223 collection_formats = {} 224 225 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json') 226 path_params = {} 227 if 'account_id' in params: 228 path_params['accountId'] = params['account_id'] 229 if 'user_id' in params: 230 path_params['userId'] = params['user_id'] 231 232 query_params = {} 233 234 header_params = {} 235 236 form_params = [] 237 local_var_files = {} 238 239 body_params = None 240 if 'user_signatures_information' in params: 241 body_params = params['user_signatures_information'] 242 # HTTP header `Accept` 243 header_params['Accept'] = self.api_client.\ 244 select_header_accept(['application/json']) 245 246 # Authentication setting 247 auth_settings = [] 248 249 return self.api_client.call_api(resource_path, 'POST', 250 path_params, 251 query_params, 252 header_params, 253 body=body_params, 254 post_params=form_params, 255 files=local_var_files, 256 response_type='UserSignaturesInformation', 257 auth_settings=auth_settings, 258 callback=params.get('callback'), 259 _return_http_data_only=params.get('_return_http_data_only'), 260 _preload_content=params.get('_preload_content', True), 261 _request_timeout=params.get('_request_timeout'), 262 collection_formats=collection_formats) 263 264 def delete(self, account_id, **kwargs): 265 """ 266 Removes users account privileges. 267 This closes one or more user records in the account. Users are never deleted from an account, but closing a user prevents them from using account functions. The response returns whether the API execution was successful (200 - OK) or if it failed. The response contains a user structure similar to the request and includes the user changes. If an error occurred during the DELETE operation for any of the users, the response for that user contains an `errorDetails` node with `errorCode` and `message` properties. 268 This method makes a synchronous HTTP request by default. To make an 269 asynchronous HTTP request, please define a `callback` function 270 to be invoked when receiving the response. 271 >>> def callback_function(response): 272 >>> pprint(response) 273 >>> 274 >>> thread = api.delete(account_id, callback=callback_function) 275 276 :param callback function: The callback function 277 for asynchronous request. (optional) 278 :param str account_id: The external account number (int) or account ID Guid. (required) 279 :param str delete: 280 :param UserInfoList user_info_list: 281 :return: UsersResponse 282 If the method is called asynchronously, 283 returns the request thread. 284 """ 285 kwargs['_return_http_data_only'] = True 286 if kwargs.get('callback'): 287 return self.delete_with_http_info(account_id, **kwargs) 288 else: 289 (data) = self.delete_with_http_info(account_id, **kwargs) 290 return data 291 292 def delete_with_http_info(self, account_id, **kwargs): 293 """ 294 Removes users account privileges. 295 This closes one or more user records in the account. Users are never deleted from an account, but closing a user prevents them from using account functions. The response returns whether the API execution was successful (200 - OK) or if it failed. The response contains a user structure similar to the request and includes the user changes. If an error occurred during the DELETE operation for any of the users, the response for that user contains an `errorDetails` node with `errorCode` and `message` properties. 296 This method makes a synchronous HTTP request by default. To make an 297 asynchronous HTTP request, please define a `callback` function 298 to be invoked when receiving the response. 299 >>> def callback_function(response): 300 >>> pprint(response) 301 >>> 302 >>> thread = api.delete_with_http_info(account_id, callback=callback_function) 303 304 :param callback function: The callback function 305 for asynchronous request. (optional) 306 :param str account_id: The external account number (int) or account ID Guid. (required) 307 :param str delete: 308 :param UserInfoList user_info_list: 309 :return: UsersResponse 310 If the method is called asynchronously, 311 returns the request thread. 312 """ 313 314 all_params = ['account_id', 'delete', 'user_info_list'] 315 all_params.append('callback') 316 all_params.append('_return_http_data_only') 317 all_params.append('_preload_content') 318 all_params.append('_request_timeout') 319 320 params = locals() 321 for key, val in iteritems(params['kwargs']): 322 if key not in all_params: 323 raise TypeError( 324 "Got an unexpected keyword argument '%s'" 325 " to method delete" % key 326 ) 327 params[key] = val 328 del params['kwargs'] 329 # verify the required parameter 'account_id' is set 330 if ('account_id' not in params) or (params['account_id'] is None): 331 raise ValueError("Missing the required parameter `account_id` when calling `delete`") 332 333 334 collection_formats = {} 335 336 resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json') 337 path_params = {} 338 if 'account_id' in params: 339 path_params['accountId'] = params['account_id'] 340 341 query_params = {} 342 if 'delete' in params: 343 query_params['delete'] = params['delete'] 344 345 header_params = {} 346 347 form_params = [] 348 local_var_files = {} 349 350 body_params = None 351 if 'user_info_list' in params: 352 body_params = params['user_info_list'] 353 # HTTP header `Accept` 354 header_params['Accept'] = self.api_client.\ 355 select_header_accept(['application/json']) 356 357 # Authentication setting 358 auth_settings = [] 359 360 return self.api_client.call_api(resource_path, 'DELETE', 361 path_params, 362 query_params, 363 header_params, 364 body=body_params, 365 post_params=form_params, 366 files=local_var_files, 367 response_type='UsersResponse', 368 auth_settings=auth_settings, 369 callback=params.get('callback'), 370 _return_http_data_only=params.get('_return_http_data_only'), 371 _preload_content=params.get('_preload_content', True), 372 _request_timeout=params.get('_request_timeout'), 373 collection_formats=collection_formats) 374 375 def delete_contact_with_id(self, account_id, contact_id, **kwargs): 376 """ 377 Replaces a particular contact associated with an account for the DocuSign service. 378 This method deletes a contact associated with an account. 379 This method makes a synchronous HTTP request by default. To make an 380 asynchronous HTTP request, please define a `callback` function 381 to be invoked when receiving the response. 382 >>> def callback_function(response): 383 >>> pprint(response) 384 >>> 385 >>> thread = api.delete_contact_with_id(account_id, contact_id, callback=callback_function) 386 387 :param callback function: The callback function 388 for asynchronous request. (optional) 389 :param str account_id: The external account number (int) or account ID Guid. (required) 390 :param str contact_id: The unique identifier of a person in the contacts address book. (required) 391 :return: ContactUpdateResponse 392 If the method is called asynchronously, 393 returns the request thread. 394 """ 395 kwargs['_return_http_data_only'] = True 396 if kwargs.get('callback'): 397 return self.delete_contact_with_id_with_http_info(account_id, contact_id, **kwargs) 398 else: 399 (data) = self.delete_contact_with_id_with_http_info(account_id, contact_id, **kwargs) 400 return data 401 402 def delete_contact_with_id_with_http_info(self, account_id, contact_id, **kwargs): 403 """ 404 Replaces a particular contact associated with an account for the DocuSign service. 405 This method deletes a contact associated with an account. 406 This method makes a synchronous HTTP request by default. To make an 407 asynchronous HTTP request, please define a `callback` function 408 to be invoked when receiving the response. 409 >>> def callback_function(response): 410 >>> pprint(response) 411 >>> 412 >>> thread = api.delete_contact_with_id_with_http_info(account_id, contact_id, callback=callback_function) 413 414 :param callback function: The callback function 415 for asynchronous request. (optional) 416 :param str account_id: The external account number (int) or account ID Guid. (required) 417 :param str contact_id: The unique identifier of a person in the contacts address book. (required) 418 :return: ContactUpdateResponse 419 If the method is called asynchronously, 420 returns the request thread. 421 """ 422 423 all_params = ['account_id', 'contact_id'] 424 all_params.append('callback') 425 all_params.append('_return_http_data_only') 426 all_params.append('_preload_content') 427 all_params.append('_request_timeout') 428 429 params = locals() 430 for key, val in iteritems(params['kwargs']): 431 if key not in all_params: 432 raise TypeError( 433 "Got an unexpected keyword argument '%s'" 434 " to method delete_contact_with_id" % key 435 ) 436 params[key] = val 437 del params['kwargs'] 438 # verify the required parameter 'account_id' is set 439 if ('account_id' not in params) or (params['account_id'] is None): 440 raise ValueError("Missing the required parameter `account_id` when calling `delete_contact_with_id`") 441 # verify the required parameter 'contact_id' is set 442 if ('contact_id' not in params) or (params['contact_id'] is None): 443 raise ValueError("Missing the required parameter `contact_id` when calling `delete_contact_with_id`") 444 445 446 collection_formats = {} 447 448 resource_path = '/v2.1/accounts/{accountId}/contacts/{contactId}'.replace('{format}', 'json') 449 path_params = {} 450 if 'account_id' in params: 451 path_params['accountId'] = params['account_id'] 452 if 'contact_id' in params: 453 path_params['contactId'] = params['contact_id'] 454 455 query_params = {} 456 457 header_params = {} 458 459 form_params = [] 460 local_var_files = {} 461 462 body_params = None 463 # HTTP header `Accept` 464 header_params['Accept'] = self.api_client.\ 465 select_header_accept(['application/json']) 466 467 # Authentication setting 468 auth_settings = [] 469 470 return self.api_client.call_api(resource_path, 'DELETE', 471 path_params, 472 query_params, 473 header_params, 474 body=body_params, 475 post_params=form_params, 476 files=local_var_files, 477 response_type='ContactUpdateResponse', 478 auth_settings=auth_settings, 479 callback=params.get('callback'), 480 _return_http_data_only=params.get('_return_http_data_only'), 481 _preload_content=params.get('_preload_content', True), 482 _request_timeout=params.get('_request_timeout'), 483 collection_formats=collection_formats) 484 485 def delete_contacts(self, account_id, **kwargs): 486 """ 487 Delete contacts associated with an account for the DocuSign service. 488 This method deletes multiple contacts associated with an account. 489 This method makes a synchronous HTTP request by default. To make an 490 asynchronous HTTP request, please define a `callback` function 491 to be invoked when receiving the response. 492 >>> def callback_function(response): 493 >>> pprint(response) 494 >>> 495 >>> thread = api.delete_contacts(account_id, callback=callback_function) 496 497 :param callback function: The callback function 498 for asynchronous request. (optional) 499 :param str account_id: The external account number (int) or account ID Guid. (required) 500 :param ContactModRequest contact_mod_request: 501 :return: ContactUpdateResponse 502 If the method is called asynchronously, 503 returns the request thread. 504 """ 505 kwargs['_return_http_data_only'] = True 506 if kwargs.get('callback'): 507 return self.delete_contacts_with_http_info(account_id, **kwargs) 508 else: 509 (data) = self.delete_contacts_with_http_info(account_id, **kwargs) 510 return data 511 512 def delete_contacts_with_http_info(self, account_id, **kwargs): 513 """ 514 Delete contacts associated with an account for the DocuSign service. 515 This method deletes multiple contacts associated with an account. 516 This method makes a synchronous HTTP request by default. To make an 517 asynchronous HTTP request, please define a `callback` function 518 to be invoked when receiving the response. 519 >>> def callback_function(response): 520 >>> pprint(response) 521 >>> 522 >>> thread = api.delete_contacts_with_http_info(account_id, callback=callback_function) 523 524 :param callback function: The callback function 525 for asynchronous request. (optional) 526 :param str account_id: The external account number (int) or account ID Guid. (required) 527 :param ContactModRequest contact_mod_request: 528 :return: ContactUpdateResponse 529 If the method is called asynchronously, 530 returns the request thread. 531 """ 532 533 all_params = ['account_id', 'contact_mod_request'] 534 all_params.append('callback') 535 all_params.append('_return_http_data_only') 536 all_params.append('_preload_content') 537 all_params.append('_request_timeout') 538 539 params = locals() 540 for key, val in iteritems(params['kwargs']): 541 if key not in all_params: 542 raise TypeError( 543 "Got an unexpected keyword argument '%s'" 544 " to method delete_contacts" % key 545 ) 546 params[key] = val 547 del params['kwargs'] 548 # verify the required parameter 'account_id' is set 549 if ('account_id' not in params) or (params['account_id'] is None): 550 raise ValueError("Missing the required parameter `account_id` when calling `delete_contacts`") 551 552 553 collection_formats = {} 554 555 resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json') 556 path_params = {} 557 if 'account_id' in params: 558 path_params['accountId'] = params['account_id'] 559 560 query_params = {} 561 562 header_params = {} 563 564 form_params = [] 565 local_var_files = {} 566 567 body_params = None 568 if 'contact_mod_request' in params: 569 body_params = params['contact_mod_request'] 570 # HTTP header `Accept` 571 header_params['Accept'] = self.api_client.\ 572 select_header_accept(['application/json']) 573 574 # Authentication setting 575 auth_settings = [] 576 577 return self.api_client.call_api(resource_path, 'DELETE', 578 path_params, 579 query_params, 580 header_params, 581 body=body_params, 582 post_params=form_params, 583 files=local_var_files, 584 response_type='ContactUpdateResponse', 585 auth_settings=auth_settings, 586 callback=params.get('callback'), 587 _return_http_data_only=params.get('_return_http_data_only'), 588 _preload_content=params.get('_preload_content', True), 589 _request_timeout=params.get('_request_timeout'), 590 collection_formats=collection_formats) 591 592 def delete_custom_settings(self, account_id, user_id, **kwargs): 593 """ 594 Deletes custom user settings for a specified user. 595 Deletes the specified custom user settings for a single user. ###Deleting Grouped Custom User Settings### If the custom user settings you want to delete are grouped, you must include the following information in the header, after Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are deleted. 596 This method makes a synchronous HTTP request by default. To make an 597 asynchronous HTTP request, please define a `callback` function 598 to be invoked when receiving the response. 599 >>> def callback_function(response): 600 >>> pprint(response) 601 >>> 602 >>> thread = api.delete_custom_settings(account_id, user_id, callback=callback_function) 603 604 :param callback function: The callback function 605 for asynchronous request. (optional) 606 :param str account_id: The external account number (int) or account ID Guid. (required) 607 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 608 :param CustomSettingsInformation custom_settings_information: 609 :return: CustomSettingsInformation 610 If the method is called asynchronously, 611 returns the request thread. 612 """ 613 kwargs['_return_http_data_only'] = True 614 if kwargs.get('callback'): 615 return self.delete_custom_settings_with_http_info(account_id, user_id, **kwargs) 616 else: 617 (data) = self.delete_custom_settings_with_http_info(account_id, user_id, **kwargs) 618 return data 619 620 def delete_custom_settings_with_http_info(self, account_id, user_id, **kwargs): 621 """ 622 Deletes custom user settings for a specified user. 623 Deletes the specified custom user settings for a single user. ###Deleting Grouped Custom User Settings### If the custom user settings you want to delete are grouped, you must include the following information in the header, after Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are deleted. 624 This method makes a synchronous HTTP request by default. To make an 625 asynchronous HTTP request, please define a `callback` function 626 to be invoked when receiving the response. 627 >>> def callback_function(response): 628 >>> pprint(response) 629 >>> 630 >>> thread = api.delete_custom_settings_with_http_info(account_id, user_id, callback=callback_function) 631 632 :param callback function: The callback function 633 for asynchronous request. (optional) 634 :param str account_id: The external account number (int) or account ID Guid. (required) 635 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 636 :param CustomSettingsInformation custom_settings_information: 637 :return: CustomSettingsInformation 638 If the method is called asynchronously, 639 returns the request thread. 640 """ 641 642 all_params = ['account_id', 'user_id', 'custom_settings_information'] 643 all_params.append('callback') 644 all_params.append('_return_http_data_only') 645 all_params.append('_preload_content') 646 all_params.append('_request_timeout') 647 648 params = locals() 649 for key, val in iteritems(params['kwargs']): 650 if key not in all_params: 651 raise TypeError( 652 "Got an unexpected keyword argument '%s'" 653 " to method delete_custom_settings" % key 654 ) 655 params[key] = val 656 del params['kwargs'] 657 # verify the required parameter 'account_id' is set 658 if ('account_id' not in params) or (params['account_id'] is None): 659 raise ValueError("Missing the required parameter `account_id` when calling `delete_custom_settings`") 660 # verify the required parameter 'user_id' is set 661 if ('user_id' not in params) or (params['user_id'] is None): 662 raise ValueError("Missing the required parameter `user_id` when calling `delete_custom_settings`") 663 664 665 collection_formats = {} 666 667 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json') 668 path_params = {} 669 if 'account_id' in params: 670 path_params['accountId'] = params['account_id'] 671 if 'user_id' in params: 672 path_params['userId'] = params['user_id'] 673 674 query_params = {} 675 676 header_params = {} 677 678 form_params = [] 679 local_var_files = {} 680 681 body_params = None 682 if 'custom_settings_information' in params: 683 body_params = params['custom_settings_information'] 684 # HTTP header `Accept` 685 header_params['Accept'] = self.api_client.\ 686 select_header_accept(['application/json']) 687 688 # Authentication setting 689 auth_settings = [] 690 691 return self.api_client.call_api(resource_path, 'DELETE', 692 path_params, 693 query_params, 694 header_params, 695 body=body_params, 696 post_params=form_params, 697 files=local_var_files, 698 response_type='CustomSettingsInformation', 699 auth_settings=auth_settings, 700 callback=params.get('callback'), 701 _return_http_data_only=params.get('_return_http_data_only'), 702 _preload_content=params.get('_preload_content', True), 703 _request_timeout=params.get('_request_timeout'), 704 collection_formats=collection_formats) 705 706 def delete_profile_image(self, account_id, user_id, **kwargs): 707 """ 708 Deletes the user profile image for the specified user. 709 Deletes the user profile image from the specified user's profile. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. 710 This method makes a synchronous HTTP request by default. To make an 711 asynchronous HTTP request, please define a `callback` function 712 to be invoked when receiving the response. 713 >>> def callback_function(response): 714 >>> pprint(response) 715 >>> 716 >>> thread = api.delete_profile_image(account_id, user_id, callback=callback_function) 717 718 :param callback function: The callback function 719 for asynchronous request. (optional) 720 :param str account_id: The external account number (int) or account ID Guid. (required) 721 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 722 :return: None 723 If the method is called asynchronously, 724 returns the request thread. 725 """ 726 kwargs['_return_http_data_only'] = True 727 if kwargs.get('callback'): 728 return self.delete_profile_image_with_http_info(account_id, user_id, **kwargs) 729 else: 730 (data) = self.delete_profile_image_with_http_info(account_id, user_id, **kwargs) 731 return data 732 733 def delete_profile_image_with_http_info(self, account_id, user_id, **kwargs): 734 """ 735 Deletes the user profile image for the specified user. 736 Deletes the user profile image from the specified user's profile. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. 737 This method makes a synchronous HTTP request by default. To make an 738 asynchronous HTTP request, please define a `callback` function 739 to be invoked when receiving the response. 740 >>> def callback_function(response): 741 >>> pprint(response) 742 >>> 743 >>> thread = api.delete_profile_image_with_http_info(account_id, user_id, callback=callback_function) 744 745 :param callback function: The callback function 746 for asynchronous request. (optional) 747 :param str account_id: The external account number (int) or account ID Guid. (required) 748 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 749 :return: None 750 If the method is called asynchronously, 751 returns the request thread. 752 """ 753 754 all_params = ['account_id', 'user_id'] 755 all_params.append('callback') 756 all_params.append('_return_http_data_only') 757 all_params.append('_preload_content') 758 all_params.append('_request_timeout') 759 760 params = locals() 761 for key, val in iteritems(params['kwargs']): 762 if key not in all_params: 763 raise TypeError( 764 "Got an unexpected keyword argument '%s'" 765 " to method delete_profile_image" % key 766 ) 767 params[key] = val 768 del params['kwargs'] 769 # verify the required parameter 'account_id' is set 770 if ('account_id' not in params) or (params['account_id'] is None): 771 raise ValueError("Missing the required parameter `account_id` when calling `delete_profile_image`") 772 # verify the required parameter 'user_id' is set 773 if ('user_id' not in params) or (params['user_id'] is None): 774 raise ValueError("Missing the required parameter `user_id` when calling `delete_profile_image`") 775 776 777 collection_formats = {} 778 779 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json') 780 path_params = {} 781 if 'account_id' in params: 782 path_params['accountId'] = params['account_id'] 783 if 'user_id' in params: 784 path_params['userId'] = params['user_id'] 785 786 query_params = {} 787 788 header_params = {} 789 790 form_params = [] 791 local_var_files = {} 792 793 body_params = None 794 # HTTP header `Accept` 795 header_params['Accept'] = self.api_client.\ 796 select_header_accept(['application/json']) 797 798 # Authentication setting 799 auth_settings = [] 800 801 return self.api_client.call_api(resource_path, 'DELETE', 802 path_params, 803 query_params, 804 header_params, 805 body=body_params, 806 post_params=form_params, 807 files=local_var_files, 808 response_type=None, 809 auth_settings=auth_settings, 810 callback=params.get('callback'), 811 _return_http_data_only=params.get('_return_http_data_only'), 812 _preload_content=params.get('_preload_content', True), 813 _request_timeout=params.get('_request_timeout'), 814 collection_formats=collection_formats) 815 816 def delete_signature(self, account_id, signature_id, user_id, **kwargs): 817 """ 818 Removes removes signature information for the specified user. 819 Removes the signature information for the user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 820 This method makes a synchronous HTTP request by default. To make an 821 asynchronous HTTP request, please define a `callback` function 822 to be invoked when receiving the response. 823 >>> def callback_function(response): 824 >>> pprint(response) 825 >>> 826 >>> thread = api.delete_signature(account_id, signature_id, user_id, callback=callback_function) 827 828 :param callback function: The callback function 829 for asynchronous request. (optional) 830 :param str account_id: The external account number (int) or account ID Guid. (required) 831 :param str signature_id: The ID of the signature being accessed. (required) 832 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 833 :return: None 834 If the method is called asynchronously, 835 returns the request thread. 836 """ 837 kwargs['_return_http_data_only'] = True 838 if kwargs.get('callback'): 839 return self.delete_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 840 else: 841 (data) = self.delete_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 842 return data 843 844 def delete_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs): 845 """ 846 Removes removes signature information for the specified user. 847 Removes the signature information for the user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 848 This method makes a synchronous HTTP request by default. To make an 849 asynchronous HTTP request, please define a `callback` function 850 to be invoked when receiving the response. 851 >>> def callback_function(response): 852 >>> pprint(response) 853 >>> 854 >>> thread = api.delete_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function) 855 856 :param callback function: The callback function 857 for asynchronous request. (optional) 858 :param str account_id: The external account number (int) or account ID Guid. (required) 859 :param str signature_id: The ID of the signature being accessed. (required) 860 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 861 :return: None 862 If the method is called asynchronously, 863 returns the request thread. 864 """ 865 866 all_params = ['account_id', 'signature_id', 'user_id'] 867 all_params.append('callback') 868 all_params.append('_return_http_data_only') 869 all_params.append('_preload_content') 870 all_params.append('_request_timeout') 871 872 params = locals() 873 for key, val in iteritems(params['kwargs']): 874 if key not in all_params: 875 raise TypeError( 876 "Got an unexpected keyword argument '%s'" 877 " to method delete_signature" % key 878 ) 879 params[key] = val 880 del params['kwargs'] 881 # verify the required parameter 'account_id' is set 882 if ('account_id' not in params) or (params['account_id'] is None): 883 raise ValueError("Missing the required parameter `account_id` when calling `delete_signature`") 884 # verify the required parameter 'signature_id' is set 885 if ('signature_id' not in params) or (params['signature_id'] is None): 886 raise ValueError("Missing the required parameter `signature_id` when calling `delete_signature`") 887 # verify the required parameter 'user_id' is set 888 if ('user_id' not in params) or (params['user_id'] is None): 889 raise ValueError("Missing the required parameter `user_id` when calling `delete_signature`") 890 891 892 collection_formats = {} 893 894 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json') 895 path_params = {} 896 if 'account_id' in params: 897 path_params['accountId'] = params['account_id'] 898 if 'signature_id' in params: 899 path_params['signatureId'] = params['signature_id'] 900 if 'user_id' in params: 901 path_params['userId'] = params['user_id'] 902 903 query_params = {} 904 905 header_params = {} 906 907 form_params = [] 908 local_var_files = {} 909 910 body_params = None 911 # HTTP header `Accept` 912 header_params['Accept'] = self.api_client.\ 913 select_header_accept(['application/json']) 914 915 # Authentication setting 916 auth_settings = [] 917 918 return self.api_client.call_api(resource_path, 'DELETE', 919 path_params, 920 query_params, 921 header_params, 922 body=body_params, 923 post_params=form_params, 924 files=local_var_files, 925 response_type=None, 926 auth_settings=auth_settings, 927 callback=params.get('callback'), 928 _return_http_data_only=params.get('_return_http_data_only'), 929 _preload_content=params.get('_preload_content', True), 930 _request_timeout=params.get('_request_timeout'), 931 collection_formats=collection_formats) 932 933 def delete_signature_image(self, account_id, image_type, signature_id, user_id, **kwargs): 934 """ 935 Deletes the user initials image or the user signature image for the specified user. 936 Deletes the specified initials image or signature image for the specified user. The function deletes one or the other of the image types, to delete both the initials image and signature image you must call the endpoint twice. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 937 This method makes a synchronous HTTP request by default. To make an 938 asynchronous HTTP request, please define a `callback` function 939 to be invoked when receiving the response. 940 >>> def callback_function(response): 941 >>> pprint(response) 942 >>> 943 >>> thread = api.delete_signature_image(account_id, image_type, signature_id, user_id, callback=callback_function) 944 945 :param callback function: The callback function 946 for asynchronous request. (optional) 947 :param str account_id: The external account number (int) or account ID Guid. (required) 948 :param str image_type: One of **signature_image** or **initials_image**. (required) 949 :param str signature_id: The ID of the signature being accessed. (required) 950 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 951 :return: UserSignature 952 If the method is called asynchronously, 953 returns the request thread. 954 """ 955 kwargs['_return_http_data_only'] = True 956 if kwargs.get('callback'): 957 return self.delete_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs) 958 else: 959 (data) = self.delete_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs) 960 return data 961 962 def delete_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, **kwargs): 963 """ 964 Deletes the user initials image or the user signature image for the specified user. 965 Deletes the specified initials image or signature image for the specified user. The function deletes one or the other of the image types, to delete both the initials image and signature image you must call the endpoint twice. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 966 This method makes a synchronous HTTP request by default. To make an 967 asynchronous HTTP request, please define a `callback` function 968 to be invoked when receiving the response. 969 >>> def callback_function(response): 970 >>> pprint(response) 971 >>> 972 >>> thread = api.delete_signature_image_with_http_info(account_id, image_type, signature_id, user_id, callback=callback_function) 973 974 :param callback function: The callback function 975 for asynchronous request. (optional) 976 :param str account_id: The external account number (int) or account ID Guid. (required) 977 :param str image_type: One of **signature_image** or **initials_image**. (required) 978 :param str signature_id: The ID of the signature being accessed. (required) 979 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 980 :return: UserSignature 981 If the method is called asynchronously, 982 returns the request thread. 983 """ 984 985 all_params = ['account_id', 'image_type', 'signature_id', 'user_id'] 986 all_params.append('callback') 987 all_params.append('_return_http_data_only') 988 all_params.append('_preload_content') 989 all_params.append('_request_timeout') 990 991 params = locals() 992 for key, val in iteritems(params['kwargs']): 993 if key not in all_params: 994 raise TypeError( 995 "Got an unexpected keyword argument '%s'" 996 " to method delete_signature_image" % key 997 ) 998 params[key] = val 999 del params['kwargs'] 1000 # verify the required parameter 'account_id' is set 1001 if ('account_id' not in params) or (params['account_id'] is None): 1002 raise ValueError("Missing the required parameter `account_id` when calling `delete_signature_image`") 1003 # verify the required parameter 'image_type' is set 1004 if ('image_type' not in params) or (params['image_type'] is None): 1005 raise ValueError("Missing the required parameter `image_type` when calling `delete_signature_image`") 1006 # verify the required parameter 'signature_id' is set 1007 if ('signature_id' not in params) or (params['signature_id'] is None): 1008 raise ValueError("Missing the required parameter `signature_id` when calling `delete_signature_image`") 1009 # verify the required parameter 'user_id' is set 1010 if ('user_id' not in params) or (params['user_id'] is None): 1011 raise ValueError("Missing the required parameter `user_id` when calling `delete_signature_image`") 1012 1013 1014 collection_formats = {} 1015 1016 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json') 1017 path_params = {} 1018 if 'account_id' in params: 1019 path_params['accountId'] = params['account_id'] 1020 if 'image_type' in params: 1021 path_params['imageType'] = params['image_type'] 1022 if 'signature_id' in params: 1023 path_params['signatureId'] = params['signature_id'] 1024 if 'user_id' in params: 1025 path_params['userId'] = params['user_id'] 1026 1027 query_params = {} 1028 1029 header_params = {} 1030 1031 form_params = [] 1032 local_var_files = {} 1033 1034 body_params = None 1035 # HTTP header `Accept` 1036 header_params['Accept'] = self.api_client.\ 1037 select_header_accept(['application/json']) 1038 1039 # Authentication setting 1040 auth_settings = [] 1041 1042 return self.api_client.call_api(resource_path, 'DELETE', 1043 path_params, 1044 query_params, 1045 header_params, 1046 body=body_params, 1047 post_params=form_params, 1048 files=local_var_files, 1049 response_type='UserSignature', 1050 auth_settings=auth_settings, 1051 callback=params.get('callback'), 1052 _return_http_data_only=params.get('_return_http_data_only'), 1053 _preload_content=params.get('_preload_content', True), 1054 _request_timeout=params.get('_request_timeout'), 1055 collection_formats=collection_formats) 1056 1057 def get_contact_by_id(self, account_id, contact_id, **kwargs): 1058 """ 1059 Gets a particular contact associated with the user's account. 1060 This method returns one or more contacts associated with a DocuSign account. You can also retrieve contacts from connected [cloud storage][CloudStorage] providers by using the `cloud_provider` query parameter. By default, contacts are retrieved from the DocuSign account's default address book. To return a specific contact, use the `contactId` query parameter. To return all contacts associated with an account, omit this parameter. [CloudStorage]: /docs/esign-rest-api/reference/cloudstorage/ 1061 This method makes a synchronous HTTP request by default. To make an 1062 asynchronous HTTP request, please define a `callback` function 1063 to be invoked when receiving the response. 1064 >>> def callback_function(response): 1065 >>> pprint(response) 1066 >>> 1067 >>> thread = api.get_contact_by_id(account_id, contact_id, callback=callback_function) 1068 1069 :param callback function: The callback function 1070 for asynchronous request. (optional) 1071 :param str account_id: The external account number (int) or account ID Guid. (required) 1072 :param str contact_id: The unique identifier of a person in the contacts address book. (required) 1073 :param str cloud_provider: 1074 :return: ContactGetResponse 1075 If the method is called asynchronously, 1076 returns the request thread. 1077 """ 1078 kwargs['_return_http_data_only'] = True 1079 if kwargs.get('callback'): 1080 return self.get_contact_by_id_with_http_info(account_id, contact_id, **kwargs) 1081 else: 1082 (data) = self.get_contact_by_id_with_http_info(account_id, contact_id, **kwargs) 1083 return data 1084 1085 def get_contact_by_id_with_http_info(self, account_id, contact_id, **kwargs): 1086 """ 1087 Gets a particular contact associated with the user's account. 1088 This method returns one or more contacts associated with a DocuSign account. You can also retrieve contacts from connected [cloud storage][CloudStorage] providers by using the `cloud_provider` query parameter. By default, contacts are retrieved from the DocuSign account's default address book. To return a specific contact, use the `contactId` query parameter. To return all contacts associated with an account, omit this parameter. [CloudStorage]: /docs/esign-rest-api/reference/cloudstorage/ 1089 This method makes a synchronous HTTP request by default. To make an 1090 asynchronous HTTP request, please define a `callback` function 1091 to be invoked when receiving the response. 1092 >>> def callback_function(response): 1093 >>> pprint(response) 1094 >>> 1095 >>> thread = api.get_contact_by_id_with_http_info(account_id, contact_id, callback=callback_function) 1096 1097 :param callback function: The callback function 1098 for asynchronous request. (optional) 1099 :param str account_id: The external account number (int) or account ID Guid. (required) 1100 :param str contact_id: The unique identifier of a person in the contacts address book. (required) 1101 :param str cloud_provider: 1102 :return: ContactGetResponse 1103 If the method is called asynchronously, 1104 returns the request thread. 1105 """ 1106 1107 all_params = ['account_id', 'contact_id', 'cloud_provider'] 1108 all_params.append('callback') 1109 all_params.append('_return_http_data_only') 1110 all_params.append('_preload_content') 1111 all_params.append('_request_timeout') 1112 1113 params = locals() 1114 for key, val in iteritems(params['kwargs']): 1115 if key not in all_params: 1116 raise TypeError( 1117 "Got an unexpected keyword argument '%s'" 1118 " to method get_contact_by_id" % key 1119 ) 1120 params[key] = val 1121 del params['kwargs'] 1122 # verify the required parameter 'account_id' is set 1123 if ('account_id' not in params) or (params['account_id'] is None): 1124 raise ValueError("Missing the required parameter `account_id` when calling `get_contact_by_id`") 1125 # verify the required parameter 'contact_id' is set 1126 if ('contact_id' not in params) or (params['contact_id'] is None): 1127 raise ValueError("Missing the required parameter `contact_id` when calling `get_contact_by_id`") 1128 1129 1130 collection_formats = {} 1131 1132 resource_path = '/v2.1/accounts/{accountId}/contacts/{contactId}'.replace('{format}', 'json') 1133 path_params = {} 1134 if 'account_id' in params: 1135 path_params['accountId'] = params['account_id'] 1136 if 'contact_id' in params: 1137 path_params['contactId'] = params['contact_id'] 1138 1139 query_params = {} 1140 if 'cloud_provider' in params: 1141 query_params['cloud_provider'] = params['cloud_provider'] 1142 1143 header_params = {} 1144 1145 form_params = [] 1146 local_var_files = {} 1147 1148 body_params = None 1149 # HTTP header `Accept` 1150 header_params['Accept'] = self.api_client.\ 1151 select_header_accept(['application/json']) 1152 1153 # Authentication setting 1154 auth_settings = [] 1155 1156 return self.api_client.call_api(resource_path, 'GET', 1157 path_params, 1158 query_params, 1159 header_params, 1160 body=body_params, 1161 post_params=form_params, 1162 files=local_var_files, 1163 response_type='ContactGetResponse', 1164 auth_settings=auth_settings, 1165 callback=params.get('callback'), 1166 _return_http_data_only=params.get('_return_http_data_only'), 1167 _preload_content=params.get('_preload_content', True), 1168 _request_timeout=params.get('_request_timeout'), 1169 collection_formats=collection_formats) 1170 1171 def get_information(self, account_id, user_id, **kwargs): 1172 """ 1173 Gets the user information for a specified user. 1174 Retrieves the user information for the specified user. To return additional user information that details the last login date, login status, and the user's password expiration date, set the optional `additional_info` query string parameter to **true**. 1175 This method makes a synchronous HTTP request by default. To make an 1176 asynchronous HTTP request, please define a `callback` function 1177 to be invoked when receiving the response. 1178 >>> def callback_function(response): 1179 >>> pprint(response) 1180 >>> 1181 >>> thread = api.get_information(account_id, user_id, callback=callback_function) 1182 1183 :param callback function: The callback function 1184 for asynchronous request. (optional) 1185 :param str account_id: The external account number (int) or account ID Guid. (required) 1186 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1187 :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account. 1188 :param str email: 1189 :param str include_license: 1190 :return: UserInformation 1191 If the method is called asynchronously, 1192 returns the request thread. 1193 """ 1194 kwargs['_return_http_data_only'] = True 1195 if kwargs.get('callback'): 1196 return self.get_information_with_http_info(account_id, user_id, **kwargs) 1197 else: 1198 (data) = self.get_information_with_http_info(account_id, user_id, **kwargs) 1199 return data 1200 1201 def get_information_with_http_info(self, account_id, user_id, **kwargs): 1202 """ 1203 Gets the user information for a specified user. 1204 Retrieves the user information for the specified user. To return additional user information that details the last login date, login status, and the user's password expiration date, set the optional `additional_info` query string parameter to **true**. 1205 This method makes a synchronous HTTP request by default. To make an 1206 asynchronous HTTP request, please define a `callback` function 1207 to be invoked when receiving the response. 1208 >>> def callback_function(response): 1209 >>> pprint(response) 1210 >>> 1211 >>> thread = api.get_information_with_http_info(account_id, user_id, callback=callback_function) 1212 1213 :param callback function: The callback function 1214 for asynchronous request. (optional) 1215 :param str account_id: The external account number (int) or account ID Guid. (required) 1216 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1217 :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account. 1218 :param str email: 1219 :param str include_license: 1220 :return: UserInformation 1221 If the method is called asynchronously, 1222 returns the request thread. 1223 """ 1224 1225 all_params = ['account_id', 'user_id', 'additional_info', 'email', 'include_license'] 1226 all_params.append('callback') 1227 all_params.append('_return_http_data_only') 1228 all_params.append('_preload_content') 1229 all_params.append('_request_timeout') 1230 1231 params = locals() 1232 for key, val in iteritems(params['kwargs']): 1233 if key not in all_params: 1234 raise TypeError( 1235 "Got an unexpected keyword argument '%s'" 1236 " to method get_information" % key 1237 ) 1238 params[key] = val 1239 del params['kwargs'] 1240 # verify the required parameter 'account_id' is set 1241 if ('account_id' not in params) or (params['account_id'] is None): 1242 raise ValueError("Missing the required parameter `account_id` when calling `get_information`") 1243 # verify the required parameter 'user_id' is set 1244 if ('user_id' not in params) or (params['user_id'] is None): 1245 raise ValueError("Missing the required parameter `user_id` when calling `get_information`") 1246 1247 1248 collection_formats = {} 1249 1250 resource_path = '/v2.1/accounts/{accountId}/users/{userId}'.replace('{format}', 'json') 1251 path_params = {} 1252 if 'account_id' in params: 1253 path_params['accountId'] = params['account_id'] 1254 if 'user_id' in params: 1255 path_params['userId'] = params['user_id'] 1256 1257 query_params = {} 1258 if 'additional_info' in params: 1259 query_params['additional_info'] = params['additional_info'] 1260 if 'email' in params: 1261 query_params['email'] = params['email'] 1262 if 'include_license' in params: 1263 query_params['include_license'] = params['include_license'] 1264 1265 header_params = {} 1266 1267 form_params = [] 1268 local_var_files = {} 1269 1270 body_params = None 1271 # HTTP header `Accept` 1272 header_params['Accept'] = self.api_client.\ 1273 select_header_accept(['application/json']) 1274 1275 # Authentication setting 1276 auth_settings = [] 1277 1278 return self.api_client.call_api(resource_path, 'GET', 1279 path_params, 1280 query_params, 1281 header_params, 1282 body=body_params, 1283 post_params=form_params, 1284 files=local_var_files, 1285 response_type='UserInformation', 1286 auth_settings=auth_settings, 1287 callback=params.get('callback'), 1288 _return_http_data_only=params.get('_return_http_data_only'), 1289 _preload_content=params.get('_preload_content', True), 1290 _request_timeout=params.get('_request_timeout'), 1291 collection_formats=collection_formats) 1292 1293 def get_profile(self, account_id, user_id, **kwargs): 1294 """ 1295 Retrieves the user profile for a specified user. 1296 Retrieves the user profile information, the privacy settings and personal information (address, phone number, etc.) for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. 1297 This method makes a synchronous HTTP request by default. To make an 1298 asynchronous HTTP request, please define a `callback` function 1299 to be invoked when receiving the response. 1300 >>> def callback_function(response): 1301 >>> pprint(response) 1302 >>> 1303 >>> thread = api.get_profile(account_id, user_id, callback=callback_function) 1304 1305 :param callback function: The callback function 1306 for asynchronous request. (optional) 1307 :param str account_id: The external account number (int) or account ID Guid. (required) 1308 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1309 :return: UserProfile 1310 If the method is called asynchronously, 1311 returns the request thread. 1312 """ 1313 kwargs['_return_http_data_only'] = True 1314 if kwargs.get('callback'): 1315 return self.get_profile_with_http_info(account_id, user_id, **kwargs) 1316 else: 1317 (data) = self.get_profile_with_http_info(account_id, user_id, **kwargs) 1318 return data 1319 1320 def get_profile_with_http_info(self, account_id, user_id, **kwargs): 1321 """ 1322 Retrieves the user profile for a specified user. 1323 Retrieves the user profile information, the privacy settings and personal information (address, phone number, etc.) for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. 1324 This method makes a synchronous HTTP request by default. To make an 1325 asynchronous HTTP request, please define a `callback` function 1326 to be invoked when receiving the response. 1327 >>> def callback_function(response): 1328 >>> pprint(response) 1329 >>> 1330 >>> thread = api.get_profile_with_http_info(account_id, user_id, callback=callback_function) 1331 1332 :param callback function: The callback function 1333 for asynchronous request. (optional) 1334 :param str account_id: The external account number (int) or account ID Guid. (required) 1335 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1336 :return: UserProfile 1337 If the method is called asynchronously, 1338 returns the request thread. 1339 """ 1340 1341 all_params = ['account_id', 'user_id'] 1342 all_params.append('callback') 1343 all_params.append('_return_http_data_only') 1344 all_params.append('_preload_content') 1345 all_params.append('_request_timeout') 1346 1347 params = locals() 1348 for key, val in iteritems(params['kwargs']): 1349 if key not in all_params: 1350 raise TypeError( 1351 "Got an unexpected keyword argument '%s'" 1352 " to method get_profile" % key 1353 ) 1354 params[key] = val 1355 del params['kwargs'] 1356 # verify the required parameter 'account_id' is set 1357 if ('account_id' not in params) or (params['account_id'] is None): 1358 raise ValueError("Missing the required parameter `account_id` when calling `get_profile`") 1359 # verify the required parameter 'user_id' is set 1360 if ('user_id' not in params) or (params['user_id'] is None): 1361 raise ValueError("Missing the required parameter `user_id` when calling `get_profile`") 1362 1363 1364 collection_formats = {} 1365 1366 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile'.replace('{format}', 'json') 1367 path_params = {} 1368 if 'account_id' in params: 1369 path_params['accountId'] = params['account_id'] 1370 if 'user_id' in params: 1371 path_params['userId'] = params['user_id'] 1372 1373 query_params = {} 1374 1375 header_params = {} 1376 1377 form_params = [] 1378 local_var_files = {} 1379 1380 body_params = None 1381 # HTTP header `Accept` 1382 header_params['Accept'] = self.api_client.\ 1383 select_header_accept(['application/json']) 1384 1385 # Authentication setting 1386 auth_settings = [] 1387 1388 return self.api_client.call_api(resource_path, 'GET', 1389 path_params, 1390 query_params, 1391 header_params, 1392 body=body_params, 1393 post_params=form_params, 1394 files=local_var_files, 1395 response_type='UserProfile', 1396 auth_settings=auth_settings, 1397 callback=params.get('callback'), 1398 _return_http_data_only=params.get('_return_http_data_only'), 1399 _preload_content=params.get('_preload_content', True), 1400 _request_timeout=params.get('_request_timeout'), 1401 collection_formats=collection_formats) 1402 1403 def get_profile_image(self, account_id, user_id, **kwargs): 1404 """ 1405 Retrieves the user profile image for the specified user. 1406 Retrieves the user profile picture for the specified user. The image is returned in the same format as uploaded. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. If successful, the response returns a 200 - OK and the user profile image. 1407 This method makes a synchronous HTTP request by default. To make an 1408 asynchronous HTTP request, please define a `callback` function 1409 to be invoked when receiving the response. 1410 >>> def callback_function(response): 1411 >>> pprint(response) 1412 >>> 1413 >>> thread = api.get_profile_image(account_id, user_id, callback=callback_function) 1414 1415 :param callback function: The callback function 1416 for asynchronous request. (optional) 1417 :param str account_id: The external account number (int) or account ID Guid. (required) 1418 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1419 :param str encoding: 1420 :return: file 1421 If the method is called asynchronously, 1422 returns the request thread. 1423 """ 1424 kwargs['_return_http_data_only'] = True 1425 if kwargs.get('callback'): 1426 return self.get_profile_image_with_http_info(account_id, user_id, **kwargs) 1427 else: 1428 (data) = self.get_profile_image_with_http_info(account_id, user_id, **kwargs) 1429 return data 1430 1431 def get_profile_image_with_http_info(self, account_id, user_id, **kwargs): 1432 """ 1433 Retrieves the user profile image for the specified user. 1434 Retrieves the user profile picture for the specified user. The image is returned in the same format as uploaded. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. If successful, the response returns a 200 - OK and the user profile image. 1435 This method makes a synchronous HTTP request by default. To make an 1436 asynchronous HTTP request, please define a `callback` function 1437 to be invoked when receiving the response. 1438 >>> def callback_function(response): 1439 >>> pprint(response) 1440 >>> 1441 >>> thread = api.get_profile_image_with_http_info(account_id, user_id, callback=callback_function) 1442 1443 :param callback function: The callback function 1444 for asynchronous request. (optional) 1445 :param str account_id: The external account number (int) or account ID Guid. (required) 1446 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1447 :param str encoding: 1448 :return: file 1449 If the method is called asynchronously, 1450 returns the request thread. 1451 """ 1452 1453 all_params = ['account_id', 'user_id', 'encoding'] 1454 all_params.append('callback') 1455 all_params.append('_return_http_data_only') 1456 all_params.append('_preload_content') 1457 all_params.append('_request_timeout') 1458 1459 params = locals() 1460 for key, val in iteritems(params['kwargs']): 1461 if key not in all_params: 1462 raise TypeError( 1463 "Got an unexpected keyword argument '%s'" 1464 " to method get_profile_image" % key 1465 ) 1466 params[key] = val 1467 del params['kwargs'] 1468 # verify the required parameter 'account_id' is set 1469 if ('account_id' not in params) or (params['account_id'] is None): 1470 raise ValueError("Missing the required parameter `account_id` when calling `get_profile_image`") 1471 # verify the required parameter 'user_id' is set 1472 if ('user_id' not in params) or (params['user_id'] is None): 1473 raise ValueError("Missing the required parameter `user_id` when calling `get_profile_image`") 1474 1475 1476 collection_formats = {} 1477 1478 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json') 1479 path_params = {} 1480 if 'account_id' in params: 1481 path_params['accountId'] = params['account_id'] 1482 if 'user_id' in params: 1483 path_params['userId'] = params['user_id'] 1484 1485 query_params = {} 1486 if 'encoding' in params: 1487 query_params['encoding'] = params['encoding'] 1488 1489 header_params = {} 1490 1491 form_params = [] 1492 local_var_files = {} 1493 1494 body_params = None 1495 # HTTP header `Accept` 1496 header_params['Accept'] = self.api_client.\ 1497 select_header_accept(['image/gif']) 1498 1499 # Authentication setting 1500 auth_settings = [] 1501 1502 return self.api_client.call_api(resource_path, 'GET', 1503 path_params, 1504 query_params, 1505 header_params, 1506 body=body_params, 1507 post_params=form_params, 1508 files=local_var_files, 1509 response_type='file', 1510 auth_settings=auth_settings, 1511 callback=params.get('callback'), 1512 _return_http_data_only=params.get('_return_http_data_only'), 1513 _preload_content=params.get('_preload_content', True), 1514 _request_timeout=params.get('_request_timeout'), 1515 collection_formats=collection_formats) 1516 1517 def get_settings(self, account_id, user_id, **kwargs): 1518 """ 1519 Gets the user account settings for a specified user. 1520 Retrieves a list of the account settings and email notification information for the specified user. The response returns the account setting name/value information and the email notification settings for the specified user. For more information about the different user settings, see the [ML:userSettings list]. 1521 This method makes a synchronous HTTP request by default. To make an 1522 asynchronous HTTP request, please define a `callback` function 1523 to be invoked when receiving the response. 1524 >>> def callback_function(response): 1525 >>> pprint(response) 1526 >>> 1527 >>> thread = api.get_settings(account_id, user_id, callback=callback_function) 1528 1529 :param callback function: The callback function 1530 for asynchronous request. (optional) 1531 :param str account_id: The external account number (int) or account ID Guid. (required) 1532 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1533 :return: UserSettingsInformation 1534 If the method is called asynchronously, 1535 returns the request thread. 1536 """ 1537 kwargs['_return_http_data_only'] = True 1538 if kwargs.get('callback'): 1539 return self.get_settings_with_http_info(account_id, user_id, **kwargs) 1540 else: 1541 (data) = self.get_settings_with_http_info(account_id, user_id, **kwargs) 1542 return data 1543 1544 def get_settings_with_http_info(self, account_id, user_id, **kwargs): 1545 """ 1546 Gets the user account settings for a specified user. 1547 Retrieves a list of the account settings and email notification information for the specified user. The response returns the account setting name/value information and the email notification settings for the specified user. For more information about the different user settings, see the [ML:userSettings list]. 1548 This method makes a synchronous HTTP request by default. To make an 1549 asynchronous HTTP request, please define a `callback` function 1550 to be invoked when receiving the response. 1551 >>> def callback_function(response): 1552 >>> pprint(response) 1553 >>> 1554 >>> thread = api.get_settings_with_http_info(account_id, user_id, callback=callback_function) 1555 1556 :param callback function: The callback function 1557 for asynchronous request. (optional) 1558 :param str account_id: The external account number (int) or account ID Guid. (required) 1559 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1560 :return: UserSettingsInformation 1561 If the method is called asynchronously, 1562 returns the request thread. 1563 """ 1564 1565 all_params = ['account_id', 'user_id'] 1566 all_params.append('callback') 1567 all_params.append('_return_http_data_only') 1568 all_params.append('_preload_content') 1569 all_params.append('_request_timeout') 1570 1571 params = locals() 1572 for key, val in iteritems(params['kwargs']): 1573 if key not in all_params: 1574 raise TypeError( 1575 "Got an unexpected keyword argument '%s'" 1576 " to method get_settings" % key 1577 ) 1578 params[key] = val 1579 del params['kwargs'] 1580 # verify the required parameter 'account_id' is set 1581 if ('account_id' not in params) or (params['account_id'] is None): 1582 raise ValueError("Missing the required parameter `account_id` when calling `get_settings`") 1583 # verify the required parameter 'user_id' is set 1584 if ('user_id' not in params) or (params['user_id'] is None): 1585 raise ValueError("Missing the required parameter `user_id` when calling `get_settings`") 1586 1587 1588 collection_formats = {} 1589 1590 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/settings'.replace('{format}', 'json') 1591 path_params = {} 1592 if 'account_id' in params: 1593 path_params['accountId'] = params['account_id'] 1594 if 'user_id' in params: 1595 path_params['userId'] = params['user_id'] 1596 1597 query_params = {} 1598 1599 header_params = {} 1600 1601 form_params = [] 1602 local_var_files = {} 1603 1604 body_params = None 1605 # HTTP header `Accept` 1606 header_params['Accept'] = self.api_client.\ 1607 select_header_accept(['application/json']) 1608 1609 # Authentication setting 1610 auth_settings = [] 1611 1612 return self.api_client.call_api(resource_path, 'GET', 1613 path_params, 1614 query_params, 1615 header_params, 1616 body=body_params, 1617 post_params=form_params, 1618 files=local_var_files, 1619 response_type='UserSettingsInformation', 1620 auth_settings=auth_settings, 1621 callback=params.get('callback'), 1622 _return_http_data_only=params.get('_return_http_data_only'), 1623 _preload_content=params.get('_preload_content', True), 1624 _request_timeout=params.get('_request_timeout'), 1625 collection_formats=collection_formats) 1626 1627 def get_signature(self, account_id, signature_id, user_id, **kwargs): 1628 """ 1629 Gets the user signature information for the specified user. 1630 Retrieves the structure of a single signature with a known signature name. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 1631 This method makes a synchronous HTTP request by default. To make an 1632 asynchronous HTTP request, please define a `callback` function 1633 to be invoked when receiving the response. 1634 >>> def callback_function(response): 1635 >>> pprint(response) 1636 >>> 1637 >>> thread = api.get_signature(account_id, signature_id, user_id, callback=callback_function) 1638 1639 :param callback function: The callback function 1640 for asynchronous request. (optional) 1641 :param str account_id: The external account number (int) or account ID Guid. (required) 1642 :param str signature_id: The ID of the signature being accessed. (required) 1643 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1644 :return: UserSignature 1645 If the method is called asynchronously, 1646 returns the request thread. 1647 """ 1648 kwargs['_return_http_data_only'] = True 1649 if kwargs.get('callback'): 1650 return self.get_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 1651 else: 1652 (data) = self.get_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 1653 return data 1654 1655 def get_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs): 1656 """ 1657 Gets the user signature information for the specified user. 1658 Retrieves the structure of a single signature with a known signature name. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 1659 This method makes a synchronous HTTP request by default. To make an 1660 asynchronous HTTP request, please define a `callback` function 1661 to be invoked when receiving the response. 1662 >>> def callback_function(response): 1663 >>> pprint(response) 1664 >>> 1665 >>> thread = api.get_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function) 1666 1667 :param callback function: The callback function 1668 for asynchronous request. (optional) 1669 :param str account_id: The external account number (int) or account ID Guid. (required) 1670 :param str signature_id: The ID of the signature being accessed. (required) 1671 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1672 :return: UserSignature 1673 If the method is called asynchronously, 1674 returns the request thread. 1675 """ 1676 1677 all_params = ['account_id', 'signature_id', 'user_id'] 1678 all_params.append('callback') 1679 all_params.append('_return_http_data_only') 1680 all_params.append('_preload_content') 1681 all_params.append('_request_timeout') 1682 1683 params = locals() 1684 for key, val in iteritems(params['kwargs']): 1685 if key not in all_params: 1686 raise TypeError( 1687 "Got an unexpected keyword argument '%s'" 1688 " to method get_signature" % key 1689 ) 1690 params[key] = val 1691 del params['kwargs'] 1692 # verify the required parameter 'account_id' is set 1693 if ('account_id' not in params) or (params['account_id'] is None): 1694 raise ValueError("Missing the required parameter `account_id` when calling `get_signature`") 1695 # verify the required parameter 'signature_id' is set 1696 if ('signature_id' not in params) or (params['signature_id'] is None): 1697 raise ValueError("Missing the required parameter `signature_id` when calling `get_signature`") 1698 # verify the required parameter 'user_id' is set 1699 if ('user_id' not in params) or (params['user_id'] is None): 1700 raise ValueError("Missing the required parameter `user_id` when calling `get_signature`") 1701 1702 1703 collection_formats = {} 1704 1705 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json') 1706 path_params = {} 1707 if 'account_id' in params: 1708 path_params['accountId'] = params['account_id'] 1709 if 'signature_id' in params: 1710 path_params['signatureId'] = params['signature_id'] 1711 if 'user_id' in params: 1712 path_params['userId'] = params['user_id'] 1713 1714 query_params = {} 1715 1716 header_params = {} 1717 1718 form_params = [] 1719 local_var_files = {} 1720 1721 body_params = None 1722 # HTTP header `Accept` 1723 header_params['Accept'] = self.api_client.\ 1724 select_header_accept(['application/json']) 1725 1726 # Authentication setting 1727 auth_settings = [] 1728 1729 return self.api_client.call_api(resource_path, 'GET', 1730 path_params, 1731 query_params, 1732 header_params, 1733 body=body_params, 1734 post_params=form_params, 1735 files=local_var_files, 1736 response_type='UserSignature', 1737 auth_settings=auth_settings, 1738 callback=params.get('callback'), 1739 _return_http_data_only=params.get('_return_http_data_only'), 1740 _preload_content=params.get('_preload_content', True), 1741 _request_timeout=params.get('_request_timeout'), 1742 collection_formats=collection_formats) 1743 1744 def get_signature_image(self, account_id, image_type, signature_id, user_id, **kwargs): 1745 """ 1746 Retrieves the user initials image or the user signature image for the specified user. 1747 Retrieves the specified initials image or signature image for the specified user. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". ###### Note: Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. 1748 This method makes a synchronous HTTP request by default. To make an 1749 asynchronous HTTP request, please define a `callback` function 1750 to be invoked when receiving the response. 1751 >>> def callback_function(response): 1752 >>> pprint(response) 1753 >>> 1754 >>> thread = api.get_signature_image(account_id, image_type, signature_id, user_id, callback=callback_function) 1755 1756 :param callback function: The callback function 1757 for asynchronous request. (optional) 1758 :param str account_id: The external account number (int) or account ID Guid. (required) 1759 :param str image_type: One of **signature_image** or **initials_image**. (required) 1760 :param str signature_id: The ID of the signature being accessed. (required) 1761 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1762 :param str include_chrome: 1763 :return: file 1764 If the method is called asynchronously, 1765 returns the request thread. 1766 """ 1767 kwargs['_return_http_data_only'] = True 1768 if kwargs.get('callback'): 1769 return self.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs) 1770 else: 1771 (data) = self.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs) 1772 return data 1773 1774 def get_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, **kwargs): 1775 """ 1776 Retrieves the user initials image or the user signature image for the specified user. 1777 Retrieves the specified initials image or signature image for the specified user. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". ###### Note: Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. 1778 This method makes a synchronous HTTP request by default. To make an 1779 asynchronous HTTP request, please define a `callback` function 1780 to be invoked when receiving the response. 1781 >>> def callback_function(response): 1782 >>> pprint(response) 1783 >>> 1784 >>> thread = api.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, callback=callback_function) 1785 1786 :param callback function: The callback function 1787 for asynchronous request. (optional) 1788 :param str account_id: The external account number (int) or account ID Guid. (required) 1789 :param str image_type: One of **signature_image** or **initials_image**. (required) 1790 :param str signature_id: The ID of the signature being accessed. (required) 1791 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1792 :param str include_chrome: 1793 :return: file 1794 If the method is called asynchronously, 1795 returns the request thread. 1796 """ 1797 1798 all_params = ['account_id', 'image_type', 'signature_id', 'user_id', 'include_chrome'] 1799 all_params.append('callback') 1800 all_params.append('_return_http_data_only') 1801 all_params.append('_preload_content') 1802 all_params.append('_request_timeout') 1803 1804 params = locals() 1805 for key, val in iteritems(params['kwargs']): 1806 if key not in all_params: 1807 raise TypeError( 1808 "Got an unexpected keyword argument '%s'" 1809 " to method get_signature_image" % key 1810 ) 1811 params[key] = val 1812 del params['kwargs'] 1813 # verify the required parameter 'account_id' is set 1814 if ('account_id' not in params) or (params['account_id'] is None): 1815 raise ValueError("Missing the required parameter `account_id` when calling `get_signature_image`") 1816 # verify the required parameter 'image_type' is set 1817 if ('image_type' not in params) or (params['image_type'] is None): 1818 raise ValueError("Missing the required parameter `image_type` when calling `get_signature_image`") 1819 # verify the required parameter 'signature_id' is set 1820 if ('signature_id' not in params) or (params['signature_id'] is None): 1821 raise ValueError("Missing the required parameter `signature_id` when calling `get_signature_image`") 1822 # verify the required parameter 'user_id' is set 1823 if ('user_id' not in params) or (params['user_id'] is None): 1824 raise ValueError("Missing the required parameter `user_id` when calling `get_signature_image`") 1825 1826 1827 collection_formats = {} 1828 1829 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json') 1830 path_params = {} 1831 if 'account_id' in params: 1832 path_params['accountId'] = params['account_id'] 1833 if 'image_type' in params: 1834 path_params['imageType'] = params['image_type'] 1835 if 'signature_id' in params: 1836 path_params['signatureId'] = params['signature_id'] 1837 if 'user_id' in params: 1838 path_params['userId'] = params['user_id'] 1839 1840 query_params = {} 1841 if 'include_chrome' in params: 1842 query_params['include_chrome'] = params['include_chrome'] 1843 1844 header_params = {} 1845 1846 form_params = [] 1847 local_var_files = {} 1848 1849 body_params = None 1850 # HTTP header `Accept` 1851 header_params['Accept'] = self.api_client.\ 1852 select_header_accept(['image/gif']) 1853 1854 # Authentication setting 1855 auth_settings = [] 1856 1857 return self.api_client.call_api(resource_path, 'GET', 1858 path_params, 1859 query_params, 1860 header_params, 1861 body=body_params, 1862 post_params=form_params, 1863 files=local_var_files, 1864 response_type='file', 1865 auth_settings=auth_settings, 1866 callback=params.get('callback'), 1867 _return_http_data_only=params.get('_return_http_data_only'), 1868 _preload_content=params.get('_preload_content', True), 1869 _request_timeout=params.get('_request_timeout'), 1870 collection_formats=collection_formats) 1871 1872 def list(self, account_id, **kwargs): 1873 """ 1874 Retrieves the list of users for the specified account. 1875 Retrieves the list of users for the specified account. The response returns the list of users for the account along with the information about the result set. If the `additional_info` query was added to the endpoint and set to **true**, the full user information is returned for each user 1876 This method makes a synchronous HTTP request by default. To make an 1877 asynchronous HTTP request, please define a `callback` function 1878 to be invoked when receiving the response. 1879 >>> def callback_function(response): 1880 >>> pprint(response) 1881 >>> 1882 >>> thread = api.list(account_id, callback=callback_function) 1883 1884 :param callback function: The callback function 1885 for asynchronous request. (optional) 1886 :param str account_id: The external account number (int) or account ID Guid. (required) 1887 :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account. 1888 :param str alternate_admins_only: 1889 :param str count: Number of records to return. The number must be greater than 0 and less than or equal to 100. 1890 :param str domain_users_only: 1891 :param str email: 1892 :param str email_substring: Filters the returned user records by the email address or a sub-string of email address. 1893 :param str group_id: Filters user records returned by one or more group Id's. 1894 :param str include_license: 1895 :param str include_usersettings_for_csv: 1896 :param str login_status: 1897 :param str not_group_id: 1898 :param str start_position: Starting value for the list. 1899 :param str status: 1900 :param str user_name_substring: Filters the user records returned by the user name or a sub-string of user name. 1901 :return: UserInformationList 1902 If the method is called asynchronously, 1903 returns the request thread. 1904 """ 1905 kwargs['_return_http_data_only'] = True 1906 if kwargs.get('callback'): 1907 return self.list_with_http_info(account_id, **kwargs) 1908 else: 1909 (data) = self.list_with_http_info(account_id, **kwargs) 1910 return data 1911 1912 def list_with_http_info(self, account_id, **kwargs): 1913 """ 1914 Retrieves the list of users for the specified account. 1915 Retrieves the list of users for the specified account. The response returns the list of users for the account along with the information about the result set. If the `additional_info` query was added to the endpoint and set to **true**, the full user information is returned for each user 1916 This method makes a synchronous HTTP request by default. To make an 1917 asynchronous HTTP request, please define a `callback` function 1918 to be invoked when receiving the response. 1919 >>> def callback_function(response): 1920 >>> pprint(response) 1921 >>> 1922 >>> thread = api.list_with_http_info(account_id, callback=callback_function) 1923 1924 :param callback function: The callback function 1925 for asynchronous request. (optional) 1926 :param str account_id: The external account number (int) or account ID Guid. (required) 1927 :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account. 1928 :param str alternate_admins_only: 1929 :param str count: Number of records to return. The number must be greater than 0 and less than or equal to 100. 1930 :param str domain_users_only: 1931 :param str email: 1932 :param str email_substring: Filters the returned user records by the email address or a sub-string of email address. 1933 :param str group_id: Filters user records returned by one or more group Id's. 1934 :param str include_license: 1935 :param str include_usersettings_for_csv: 1936 :param str login_status: 1937 :param str not_group_id: 1938 :param str start_position: Starting value for the list. 1939 :param str status: 1940 :param str user_name_substring: Filters the user records returned by the user name or a sub-string of user name. 1941 :return: UserInformationList 1942 If the method is called asynchronously, 1943 returns the request thread. 1944 """ 1945 1946 all_params = ['account_id', 'additional_info', 'alternate_admins_only', 'count', 'domain_users_only', 'email', 'email_substring', 'group_id', 'include_license', 'include_usersettings_for_csv', 'login_status', 'not_group_id', 'start_position', 'status', 'user_name_substring'] 1947 all_params.append('callback') 1948 all_params.append('_return_http_data_only') 1949 all_params.append('_preload_content') 1950 all_params.append('_request_timeout') 1951 1952 params = locals() 1953 for key, val in iteritems(params['kwargs']): 1954 if key not in all_params: 1955 raise TypeError( 1956 "Got an unexpected keyword argument '%s'" 1957 " to method list" % key 1958 ) 1959 params[key] = val 1960 del params['kwargs'] 1961 # verify the required parameter 'account_id' is set 1962 if ('account_id' not in params) or (params['account_id'] is None): 1963 raise ValueError("Missing the required parameter `account_id` when calling `list`") 1964 1965 1966 collection_formats = {} 1967 1968 resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json') 1969 path_params = {} 1970 if 'account_id' in params: 1971 path_params['accountId'] = params['account_id'] 1972 1973 query_params = {} 1974 if 'additional_info' in params: 1975 query_params['additional_info'] = params['additional_info'] 1976 if 'alternate_admins_only' in params: 1977 query_params['alternate_admins_only'] = params['alternate_admins_only'] 1978 if 'count' in params: 1979 query_params['count'] = params['count'] 1980 if 'domain_users_only' in params: 1981 query_params['domain_users_only'] = params['domain_users_only'] 1982 if 'email' in params: 1983 query_params['email'] = params['email'] 1984 if 'email_substring' in params: 1985 query_params['email_substring'] = params['email_substring'] 1986 if 'group_id' in params: 1987 query_params['group_id'] = params['group_id'] 1988 if 'include_license' in params: 1989 query_params['include_license'] = params['include_license'] 1990 if 'include_usersettings_for_csv' in params: 1991 query_params['include_usersettings_for_csv'] = params['include_usersettings_for_csv'] 1992 if 'login_status' in params: 1993 query_params['login_status'] = params['login_status'] 1994 if 'not_group_id' in params: 1995 query_params['not_group_id'] = params['not_group_id'] 1996 if 'start_position' in params: 1997 query_params['start_position'] = params['start_position'] 1998 if 'status' in params: 1999 query_params['status'] = params['status'] 2000 if 'user_name_substring' in params: 2001 query_params['user_name_substring'] = params['user_name_substring'] 2002 2003 header_params = {} 2004 2005 form_params = [] 2006 local_var_files = {} 2007 2008 body_params = None 2009 # HTTP header `Accept` 2010 header_params['Accept'] = self.api_client.\ 2011 select_header_accept(['application/json']) 2012 2013 # Authentication setting 2014 auth_settings = [] 2015 2016 return self.api_client.call_api(resource_path, 'GET', 2017 path_params, 2018 query_params, 2019 header_params, 2020 body=body_params, 2021 post_params=form_params, 2022 files=local_var_files, 2023 response_type='UserInformationList', 2024 auth_settings=auth_settings, 2025 callback=params.get('callback'), 2026 _return_http_data_only=params.get('_return_http_data_only'), 2027 _preload_content=params.get('_preload_content', True), 2028 _request_timeout=params.get('_request_timeout'), 2029 collection_formats=collection_formats) 2030 2031 def list_custom_settings(self, account_id, user_id, **kwargs): 2032 """ 2033 Retrieves the custom user settings for a specified user. 2034 Retrieves a list of custom user settings for a single user. Custom settings provide a flexible way to store and retrieve custom user information that can be used in your own system. ###### Note: Custom user settings are not the same as user account settings. ###Getting Grouped Custom User Settings### If the custom user settings you want to retrieve are grouped, you must include the following information in the header, after Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are retrieved. 2035 This method makes a synchronous HTTP request by default. To make an 2036 asynchronous HTTP request, please define a `callback` function 2037 to be invoked when receiving the response. 2038 >>> def callback_function(response): 2039 >>> pprint(response) 2040 >>> 2041 >>> thread = api.list_custom_settings(account_id, user_id, callback=callback_function) 2042 2043 :param callback function: The callback function 2044 for asynchronous request. (optional) 2045 :param str account_id: The external account number (int) or account ID Guid. (required) 2046 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2047 :return: CustomSettingsInformation 2048 If the method is called asynchronously, 2049 returns the request thread. 2050 """ 2051 kwargs['_return_http_data_only'] = True 2052 if kwargs.get('callback'): 2053 return self.list_custom_settings_with_http_info(account_id, user_id, **kwargs) 2054 else: 2055 (data) = self.list_custom_settings_with_http_info(account_id, user_id, **kwargs) 2056 return data 2057 2058 def list_custom_settings_with_http_info(self, account_id, user_id, **kwargs): 2059 """ 2060 Retrieves the custom user settings for a specified user. 2061 Retrieves a list of custom user settings for a single user. Custom settings provide a flexible way to store and retrieve custom user information that can be used in your own system. ###### Note: Custom user settings are not the same as user account settings. ###Getting Grouped Custom User Settings### If the custom user settings you want to retrieve are grouped, you must include the following information in the header, after Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are retrieved. 2062 This method makes a synchronous HTTP request by default. To make an 2063 asynchronous HTTP request, please define a `callback` function 2064 to be invoked when receiving the response. 2065 >>> def callback_function(response): 2066 >>> pprint(response) 2067 >>> 2068 >>> thread = api.list_custom_settings_with_http_info(account_id, user_id, callback=callback_function) 2069 2070 :param callback function: The callback function 2071 for asynchronous request. (optional) 2072 :param str account_id: The external account number (int) or account ID Guid. (required) 2073 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2074 :return: CustomSettingsInformation 2075 If the method is called asynchronously, 2076 returns the request thread. 2077 """ 2078 2079 all_params = ['account_id', 'user_id'] 2080 all_params.append('callback') 2081 all_params.append('_return_http_data_only') 2082 all_params.append('_preload_content') 2083 all_params.append('_request_timeout') 2084 2085 params = locals() 2086 for key, val in iteritems(params['kwargs']): 2087 if key not in all_params: 2088 raise TypeError( 2089 "Got an unexpected keyword argument '%s'" 2090 " to method list_custom_settings" % key 2091 ) 2092 params[key] = val 2093 del params['kwargs'] 2094 # verify the required parameter 'account_id' is set 2095 if ('account_id' not in params) or (params['account_id'] is None): 2096 raise ValueError("Missing the required parameter `account_id` when calling `list_custom_settings`") 2097 # verify the required parameter 'user_id' is set 2098 if ('user_id' not in params) or (params['user_id'] is None): 2099 raise ValueError("Missing the required parameter `user_id` when calling `list_custom_settings`") 2100 2101 2102 collection_formats = {} 2103 2104 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json') 2105 path_params = {} 2106 if 'account_id' in params: 2107 path_params['accountId'] = params['account_id'] 2108 if 'user_id' in params: 2109 path_params['userId'] = params['user_id'] 2110 2111 query_params = {} 2112 2113 header_params = {} 2114 2115 form_params = [] 2116 local_var_files = {} 2117 2118 body_params = None 2119 # HTTP header `Accept` 2120 header_params['Accept'] = self.api_client.\ 2121 select_header_accept(['application/json']) 2122 2123 # Authentication setting 2124 auth_settings = [] 2125 2126 return self.api_client.call_api(resource_path, 'GET', 2127 path_params, 2128 query_params, 2129 header_params, 2130 body=body_params, 2131 post_params=form_params, 2132 files=local_var_files, 2133 response_type='CustomSettingsInformation', 2134 auth_settings=auth_settings, 2135 callback=params.get('callback'), 2136 _return_http_data_only=params.get('_return_http_data_only'), 2137 _preload_content=params.get('_preload_content', True), 2138 _request_timeout=params.get('_request_timeout'), 2139 collection_formats=collection_formats) 2140 2141 def list_signatures(self, account_id, user_id, **kwargs): 2142 """ 2143 Retrieves a list of user signature definitions for a specified user. 2144 Retrieves the signature definitions for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 2145 This method makes a synchronous HTTP request by default. To make an 2146 asynchronous HTTP request, please define a `callback` function 2147 to be invoked when receiving the response. 2148 >>> def callback_function(response): 2149 >>> pprint(response) 2150 >>> 2151 >>> thread = api.list_signatures(account_id, user_id, callback=callback_function) 2152 2153 :param callback function: The callback function 2154 for asynchronous request. (optional) 2155 :param str account_id: The external account number (int) or account ID Guid. (required) 2156 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2157 :param str stamp_type: 2158 :return: UserSignaturesInformation 2159 If the method is called asynchronously, 2160 returns the request thread. 2161 """ 2162 kwargs['_return_http_data_only'] = True 2163 if kwargs.get('callback'): 2164 return self.list_signatures_with_http_info(account_id, user_id, **kwargs) 2165 else: 2166 (data) = self.list_signatures_with_http_info(account_id, user_id, **kwargs) 2167 return data 2168 2169 def list_signatures_with_http_info(self, account_id, user_id, **kwargs): 2170 """ 2171 Retrieves a list of user signature definitions for a specified user. 2172 Retrieves the signature definitions for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 2173 This method makes a synchronous HTTP request by default. To make an 2174 asynchronous HTTP request, please define a `callback` function 2175 to be invoked when receiving the response. 2176 >>> def callback_function(response): 2177 >>> pprint(response) 2178 >>> 2179 >>> thread = api.list_signatures_with_http_info(account_id, user_id, callback=callback_function) 2180 2181 :param callback function: The callback function 2182 for asynchronous request. (optional) 2183 :param str account_id: The external account number (int) or account ID Guid. (required) 2184 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2185 :param str stamp_type: 2186 :return: UserSignaturesInformation 2187 If the method is called asynchronously, 2188 returns the request thread. 2189 """ 2190 2191 all_params = ['account_id', 'user_id', 'stamp_type'] 2192 all_params.append('callback') 2193 all_params.append('_return_http_data_only') 2194 all_params.append('_preload_content') 2195 all_params.append('_request_timeout') 2196 2197 params = locals() 2198 for key, val in iteritems(params['kwargs']): 2199 if key not in all_params: 2200 raise TypeError( 2201 "Got an unexpected keyword argument '%s'" 2202 " to method list_signatures" % key 2203 ) 2204 params[key] = val 2205 del params['kwargs'] 2206 # verify the required parameter 'account_id' is set 2207 if ('account_id' not in params) or (params['account_id'] is None): 2208 raise ValueError("Missing the required parameter `account_id` when calling `list_signatures`") 2209 # verify the required parameter 'user_id' is set 2210 if ('user_id' not in params) or (params['user_id'] is None): 2211 raise ValueError("Missing the required parameter `user_id` when calling `list_signatures`") 2212 2213 2214 collection_formats = {} 2215 2216 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json') 2217 path_params = {} 2218 if 'account_id' in params: 2219 path_params['accountId'] = params['account_id'] 2220 if 'user_id' in params: 2221 path_params['userId'] = params['user_id'] 2222 2223 query_params = {} 2224 if 'stamp_type' in params: 2225 query_params['stamp_type'] = params['stamp_type'] 2226 2227 header_params = {} 2228 2229 form_params = [] 2230 local_var_files = {} 2231 2232 body_params = None 2233 # HTTP header `Accept` 2234 header_params['Accept'] = self.api_client.\ 2235 select_header_accept(['application/json']) 2236 2237 # Authentication setting 2238 auth_settings = [] 2239 2240 return self.api_client.call_api(resource_path, 'GET', 2241 path_params, 2242 query_params, 2243 header_params, 2244 body=body_params, 2245 post_params=form_params, 2246 files=local_var_files, 2247 response_type='UserSignaturesInformation', 2248 auth_settings=auth_settings, 2249 callback=params.get('callback'), 2250 _return_http_data_only=params.get('_return_http_data_only'), 2251 _preload_content=params.get('_preload_content', True), 2252 _request_timeout=params.get('_request_timeout'), 2253 collection_formats=collection_formats) 2254 2255 def post_contacts(self, account_id, **kwargs): 2256 """ 2257 Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type). 2258 This method adds multiple contacts into a contacts list. 2259 This method makes a synchronous HTTP request by default. To make an 2260 asynchronous HTTP request, please define a `callback` function 2261 to be invoked when receiving the response. 2262 >>> def callback_function(response): 2263 >>> pprint(response) 2264 >>> 2265 >>> thread = api.post_contacts(account_id, callback=callback_function) 2266 2267 :param callback function: The callback function 2268 for asynchronous request. (optional) 2269 :param str account_id: The external account number (int) or account ID Guid. (required) 2270 :param ContactModRequest contact_mod_request: 2271 :return: ContactUpdateResponse 2272 If the method is called asynchronously, 2273 returns the request thread. 2274 """ 2275 kwargs['_return_http_data_only'] = True 2276 if kwargs.get('callback'): 2277 return self.post_contacts_with_http_info(account_id, **kwargs) 2278 else: 2279 (data) = self.post_contacts_with_http_info(account_id, **kwargs) 2280 return data 2281 2282 def post_contacts_with_http_info(self, account_id, **kwargs): 2283 """ 2284 Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type). 2285 This method adds multiple contacts into a contacts list. 2286 This method makes a synchronous HTTP request by default. To make an 2287 asynchronous HTTP request, please define a `callback` function 2288 to be invoked when receiving the response. 2289 >>> def callback_function(response): 2290 >>> pprint(response) 2291 >>> 2292 >>> thread = api.post_contacts_with_http_info(account_id, callback=callback_function) 2293 2294 :param callback function: The callback function 2295 for asynchronous request. (optional) 2296 :param str account_id: The external account number (int) or account ID Guid. (required) 2297 :param ContactModRequest contact_mod_request: 2298 :return: ContactUpdateResponse 2299 If the method is called asynchronously, 2300 returns the request thread. 2301 """ 2302 2303 all_params = ['account_id', 'contact_mod_request'] 2304 all_params.append('callback') 2305 all_params.append('_return_http_data_only') 2306 all_params.append('_preload_content') 2307 all_params.append('_request_timeout') 2308 2309 params = locals() 2310 for key, val in iteritems(params['kwargs']): 2311 if key not in all_params: 2312 raise TypeError( 2313 "Got an unexpected keyword argument '%s'" 2314 " to method post_contacts" % key 2315 ) 2316 params[key] = val 2317 del params['kwargs'] 2318 # verify the required parameter 'account_id' is set 2319 if ('account_id' not in params) or (params['account_id'] is None): 2320 raise ValueError("Missing the required parameter `account_id` when calling `post_contacts`") 2321 2322 2323 collection_formats = {} 2324 2325 resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json') 2326 path_params = {} 2327 if 'account_id' in params: 2328 path_params['accountId'] = params['account_id'] 2329 2330 query_params = {} 2331 2332 header_params = {} 2333 2334 form_params = [] 2335 local_var_files = {} 2336 2337 body_params = None 2338 if 'contact_mod_request' in params: 2339 body_params = params['contact_mod_request'] 2340 # HTTP header `Accept` 2341 header_params['Accept'] = self.api_client.\ 2342 select_header_accept(['application/json']) 2343 2344 # Authentication setting 2345 auth_settings = [] 2346 2347 return self.api_client.call_api(resource_path, 'POST', 2348 path_params, 2349 query_params, 2350 header_params, 2351 body=body_params, 2352 post_params=form_params, 2353 files=local_var_files, 2354 response_type='ContactUpdateResponse', 2355 auth_settings=auth_settings, 2356 callback=params.get('callback'), 2357 _return_http_data_only=params.get('_return_http_data_only'), 2358 _preload_content=params.get('_preload_content', True), 2359 _request_timeout=params.get('_request_timeout'), 2360 collection_formats=collection_formats) 2361 2362 def put_contacts(self, account_id, **kwargs): 2363 """ 2364 Replaces contacts associated with an account for the DocuSign service. 2365 This method updates one or more contacts associated with an account. 2366 This method makes a synchronous HTTP request by default. To make an 2367 asynchronous HTTP request, please define a `callback` function 2368 to be invoked when receiving the response. 2369 >>> def callback_function(response): 2370 >>> pprint(response) 2371 >>> 2372 >>> thread = api.put_contacts(account_id, callback=callback_function) 2373 2374 :param callback function: The callback function 2375 for asynchronous request. (optional) 2376 :param str account_id: The external account number (int) or account ID Guid. (required) 2377 :param ContactModRequest contact_mod_request: 2378 :return: ContactUpdateResponse 2379 If the method is called asynchronously, 2380 returns the request thread. 2381 """ 2382 kwargs['_return_http_data_only'] = True 2383 if kwargs.get('callback'): 2384 return self.put_contacts_with_http_info(account_id, **kwargs) 2385 else: 2386 (data) = self.put_contacts_with_http_info(account_id, **kwargs) 2387 return data 2388 2389 def put_contacts_with_http_info(self, account_id, **kwargs): 2390 """ 2391 Replaces contacts associated with an account for the DocuSign service. 2392 This method updates one or more contacts associated with an account. 2393 This method makes a synchronous HTTP request by default. To make an 2394 asynchronous HTTP request, please define a `callback` function 2395 to be invoked when receiving the response. 2396 >>> def callback_function(response): 2397 >>> pprint(response) 2398 >>> 2399 >>> thread = api.put_contacts_with_http_info(account_id, callback=callback_function) 2400 2401 :param callback function: The callback function 2402 for asynchronous request. (optional) 2403 :param str account_id: The external account number (int) or account ID Guid. (required) 2404 :param ContactModRequest contact_mod_request: 2405 :return: ContactUpdateResponse 2406 If the method is called asynchronously, 2407 returns the request thread. 2408 """ 2409 2410 all_params = ['account_id', 'contact_mod_request'] 2411 all_params.append('callback') 2412 all_params.append('_return_http_data_only') 2413 all_params.append('_preload_content') 2414 all_params.append('_request_timeout') 2415 2416 params = locals() 2417 for key, val in iteritems(params['kwargs']): 2418 if key not in all_params: 2419 raise TypeError( 2420 "Got an unexpected keyword argument '%s'" 2421 " to method put_contacts" % key 2422 ) 2423 params[key] = val 2424 del params['kwargs'] 2425 # verify the required parameter 'account_id' is set 2426 if ('account_id' not in params) or (params['account_id'] is None): 2427 raise ValueError("Missing the required parameter `account_id` when calling `put_contacts`") 2428 2429 2430 collection_formats = {} 2431 2432 resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json') 2433 path_params = {} 2434 if 'account_id' in params: 2435 path_params['accountId'] = params['account_id'] 2436 2437 query_params = {} 2438 2439 header_params = {} 2440 2441 form_params = [] 2442 local_var_files = {} 2443 2444 body_params = None 2445 if 'contact_mod_request' in params: 2446 body_params = params['contact_mod_request'] 2447 # HTTP header `Accept` 2448 header_params['Accept'] = self.api_client.\ 2449 select_header_accept(['application/json']) 2450 2451 # Authentication setting 2452 auth_settings = [] 2453 2454 return self.api_client.call_api(resource_path, 'PUT', 2455 path_params, 2456 query_params, 2457 header_params, 2458 body=body_params, 2459 post_params=form_params, 2460 files=local_var_files, 2461 response_type='ContactUpdateResponse', 2462 auth_settings=auth_settings, 2463 callback=params.get('callback'), 2464 _return_http_data_only=params.get('_return_http_data_only'), 2465 _preload_content=params.get('_preload_content', True), 2466 _request_timeout=params.get('_request_timeout'), 2467 collection_formats=collection_formats) 2468 2469 def update_custom_settings(self, account_id, user_id, **kwargs): 2470 """ 2471 Adds or updates custom user settings for the specified user. 2472 Adds or updates custom user settings for the specified user. ###### Note: Custom user settings are not the same as user account settings. Custom settings provide a flexible way to store and retrieve custom user information that you can use in your own system. **Important**: There is a limit on the size for all the custom user settings for a single user. The limit is 4,000 characters, which includes the XML and JSON structure for the settings. ### Grouping Custom User Settings ### You can group custom user settings when adding them. Grouping allows you to retrieve settings that are in a specific group, instead of retrieving all the user custom settings. To group custom user settings, add the following information in the header, after Content-Type: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. Grouping is shown in the Example Request Body below. When getting or deleting grouped custom user settings, you must include the extra header information. Grouping custom user settings is not required and if the extra header information is not included, the custom user settings are added normally and can be retrieved or deleted without including the additional header. 2473 This method makes a synchronous HTTP request by default. To make an 2474 asynchronous HTTP request, please define a `callback` function 2475 to be invoked when receiving the response. 2476 >>> def callback_function(response): 2477 >>> pprint(response) 2478 >>> 2479 >>> thread = api.update_custom_settings(account_id, user_id, callback=callback_function) 2480 2481 :param callback function: The callback function 2482 for asynchronous request. (optional) 2483 :param str account_id: The external account number (int) or account ID Guid. (required) 2484 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2485 :param CustomSettingsInformation custom_settings_information: 2486 :return: CustomSettingsInformation 2487 If the method is called asynchronously, 2488 returns the request thread. 2489 """ 2490 kwargs['_return_http_data_only'] = True 2491 if kwargs.get('callback'): 2492 return self.update_custom_settings_with_http_info(account_id, user_id, **kwargs) 2493 else: 2494 (data) = self.update_custom_settings_with_http_info(account_id, user_id, **kwargs) 2495 return data 2496 2497 def update_custom_settings_with_http_info(self, account_id, user_id, **kwargs): 2498 """ 2499 Adds or updates custom user settings for the specified user. 2500 Adds or updates custom user settings for the specified user. ###### Note: Custom user settings are not the same as user account settings. Custom settings provide a flexible way to store and retrieve custom user information that you can use in your own system. **Important**: There is a limit on the size for all the custom user settings for a single user. The limit is 4,000 characters, which includes the XML and JSON structure for the settings. ### Grouping Custom User Settings ### You can group custom user settings when adding them. Grouping allows you to retrieve settings that are in a specific group, instead of retrieving all the user custom settings. To group custom user settings, add the following information in the header, after Content-Type: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. Grouping is shown in the Example Request Body below. When getting or deleting grouped custom user settings, you must include the extra header information. Grouping custom user settings is not required and if the extra header information is not included, the custom user settings are added normally and can be retrieved or deleted without including the additional header. 2501 This method makes a synchronous HTTP request by default. To make an 2502 asynchronous HTTP request, please define a `callback` function 2503 to be invoked when receiving the response. 2504 >>> def callback_function(response): 2505 >>> pprint(response) 2506 >>> 2507 >>> thread = api.update_custom_settings_with_http_info(account_id, user_id, callback=callback_function) 2508 2509 :param callback function: The callback function 2510 for asynchronous request. (optional) 2511 :param str account_id: The external account number (int) or account ID Guid. (required) 2512 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2513 :param CustomSettingsInformation custom_settings_information: 2514 :return: CustomSettingsInformation 2515 If the method is called asynchronously, 2516 returns the request thread. 2517 """ 2518 2519 all_params = ['account_id', 'user_id', 'custom_settings_information'] 2520 all_params.append('callback') 2521 all_params.append('_return_http_data_only') 2522 all_params.append('_preload_content') 2523 all_params.append('_request_timeout') 2524 2525 params = locals() 2526 for key, val in iteritems(params['kwargs']): 2527 if key not in all_params: 2528 raise TypeError( 2529 "Got an unexpected keyword argument '%s'" 2530 " to method update_custom_settings" % key 2531 ) 2532 params[key] = val 2533 del params['kwargs'] 2534 # verify the required parameter 'account_id' is set 2535 if ('account_id' not in params) or (params['account_id'] is None): 2536 raise ValueError("Missing the required parameter `account_id` when calling `update_custom_settings`") 2537 # verify the required parameter 'user_id' is set 2538 if ('user_id' not in params) or (params['user_id'] is None): 2539 raise ValueError("Missing the required parameter `user_id` when calling `update_custom_settings`") 2540 2541 2542 collection_formats = {} 2543 2544 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json') 2545 path_params = {} 2546 if 'account_id' in params: 2547 path_params['accountId'] = params['account_id'] 2548 if 'user_id' in params: 2549 path_params['userId'] = params['user_id'] 2550 2551 query_params = {} 2552 2553 header_params = {} 2554 2555 form_params = [] 2556 local_var_files = {} 2557 2558 body_params = None 2559 if 'custom_settings_information' in params: 2560 body_params = params['custom_settings_information'] 2561 # HTTP header `Accept` 2562 header_params['Accept'] = self.api_client.\ 2563 select_header_accept(['application/json']) 2564 2565 # Authentication setting 2566 auth_settings = [] 2567 2568 return self.api_client.call_api(resource_path, 'PUT', 2569 path_params, 2570 query_params, 2571 header_params, 2572 body=body_params, 2573 post_params=form_params, 2574 files=local_var_files, 2575 response_type='CustomSettingsInformation', 2576 auth_settings=auth_settings, 2577 callback=params.get('callback'), 2578 _return_http_data_only=params.get('_return_http_data_only'), 2579 _preload_content=params.get('_preload_content', True), 2580 _request_timeout=params.get('_request_timeout'), 2581 collection_formats=collection_formats) 2582 2583 def update_profile(self, account_id, user_id, **kwargs): 2584 """ 2585 Updates the user profile information for the specified user. 2586 Updates the user's detail information, profile information, privacy settings, and personal information in the user ID card. You can also change a user's name by changing the information in the `userDetails` property. When changing a user's name, you can either change the information in the `userName` property OR change the information in `firstName`, `middleName`, `lastName, suffixName`, and `title` properties. Changes to `firstName`, `middleName`, `lastName`, `suffixName`, and `title` properties take precedence over changes to the `userName` property. 2587 This method makes a synchronous HTTP request by default. To make an 2588 asynchronous HTTP request, please define a `callback` function 2589 to be invoked when receiving the response. 2590 >>> def callback_function(response): 2591 >>> pprint(response) 2592 >>> 2593 >>> thread = api.update_profile(account_id, user_id, callback=callback_function) 2594 2595 :param callback function: The callback function 2596 for asynchronous request. (optional) 2597 :param str account_id: The external account number (int) or account ID Guid. (required) 2598 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2599 :param UserProfile user_profile: 2600 :return: None 2601 If the method is called asynchronously, 2602 returns the request thread. 2603 """ 2604 kwargs['_return_http_data_only'] = True 2605 if kwargs.get('callback'): 2606 return self.update_profile_with_http_info(account_id, user_id, **kwargs) 2607 else: 2608 (data) = self.update_profile_with_http_info(account_id, user_id, **kwargs) 2609 return data 2610 2611 def update_profile_with_http_info(self, account_id, user_id, **kwargs): 2612 """ 2613 Updates the user profile information for the specified user. 2614 Updates the user's detail information, profile information, privacy settings, and personal information in the user ID card. You can also change a user's name by changing the information in the `userDetails` property. When changing a user's name, you can either change the information in the `userName` property OR change the information in `firstName`, `middleName`, `lastName, suffixName`, and `title` properties. Changes to `firstName`, `middleName`, `lastName`, `suffixName`, and `title` properties take precedence over changes to the `userName` property. 2615 This method makes a synchronous HTTP request by default. To make an 2616 asynchronous HTTP request, please define a `callback` function 2617 to be invoked when receiving the response. 2618 >>> def callback_function(response): 2619 >>> pprint(response) 2620 >>> 2621 >>> thread = api.update_profile_with_http_info(account_id, user_id, callback=callback_function) 2622 2623 :param callback function: The callback function 2624 for asynchronous request. (optional) 2625 :param str account_id: The external account number (int) or account ID Guid. (required) 2626 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2627 :param UserProfile user_profile: 2628 :return: None 2629 If the method is called asynchronously, 2630 returns the request thread. 2631 """ 2632 2633 all_params = ['account_id', 'user_id', 'user_profile'] 2634 all_params.append('callback') 2635 all_params.append('_return_http_data_only') 2636 all_params.append('_preload_content') 2637 all_params.append('_request_timeout') 2638 2639 params = locals() 2640 for key, val in iteritems(params['kwargs']): 2641 if key not in all_params: 2642 raise TypeError( 2643 "Got an unexpected keyword argument '%s'" 2644 " to method update_profile" % key 2645 ) 2646 params[key] = val 2647 del params['kwargs'] 2648 # verify the required parameter 'account_id' is set 2649 if ('account_id' not in params) or (params['account_id'] is None): 2650 raise ValueError("Missing the required parameter `account_id` when calling `update_profile`") 2651 # verify the required parameter 'user_id' is set 2652 if ('user_id' not in params) or (params['user_id'] is None): 2653 raise ValueError("Missing the required parameter `user_id` when calling `update_profile`") 2654 2655 2656 collection_formats = {} 2657 2658 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile'.replace('{format}', 'json') 2659 path_params = {} 2660 if 'account_id' in params: 2661 path_params['accountId'] = params['account_id'] 2662 if 'user_id' in params: 2663 path_params['userId'] = params['user_id'] 2664 2665 query_params = {} 2666 2667 header_params = {} 2668 2669 form_params = [] 2670 local_var_files = {} 2671 2672 body_params = None 2673 if 'user_profile' in params: 2674 body_params = params['user_profile'] 2675 # HTTP header `Accept` 2676 header_params['Accept'] = self.api_client.\ 2677 select_header_accept(['application/json']) 2678 2679 # Authentication setting 2680 auth_settings = [] 2681 2682 return self.api_client.call_api(resource_path, 'PUT', 2683 path_params, 2684 query_params, 2685 header_params, 2686 body=body_params, 2687 post_params=form_params, 2688 files=local_var_files, 2689 response_type=None, 2690 auth_settings=auth_settings, 2691 callback=params.get('callback'), 2692 _return_http_data_only=params.get('_return_http_data_only'), 2693 _preload_content=params.get('_preload_content', True), 2694 _request_timeout=params.get('_request_timeout'), 2695 collection_formats=collection_formats) 2696 2697 def update_profile_image(self, account_id, user_id, **kwargs): 2698 """ 2699 Updates the user profile image for a specified user. 2700 Updates the user profile image by uploading an image to the user profile. The supported image formats are: gif, png, jpeg, and bmp. The file must be less than 200K. For best viewing results, DocuSign recommends that the image is no more than 79 pixels wide and high. 2701 This method makes a synchronous HTTP request by default. To make an 2702 asynchronous HTTP request, please define a `callback` function 2703 to be invoked when receiving the response. 2704 >>> def callback_function(response): 2705 >>> pprint(response) 2706 >>> 2707 >>> thread = api.update_profile_image(account_id, user_id, callback=callback_function) 2708 2709 :param callback function: The callback function 2710 for asynchronous request. (optional) 2711 :param str account_id: The external account number (int) or account ID Guid. (required) 2712 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2713 :return: None 2714 If the method is called asynchronously, 2715 returns the request thread. 2716 """ 2717 kwargs['_return_http_data_only'] = True 2718 if kwargs.get('callback'): 2719 return self.update_profile_image_with_http_info(account_id, user_id, **kwargs) 2720 else: 2721 (data) = self.update_profile_image_with_http_info(account_id, user_id, **kwargs) 2722 return data 2723 2724 def update_profile_image_with_http_info(self, account_id, user_id, **kwargs): 2725 """ 2726 Updates the user profile image for a specified user. 2727 Updates the user profile image by uploading an image to the user profile. The supported image formats are: gif, png, jpeg, and bmp. The file must be less than 200K. For best viewing results, DocuSign recommends that the image is no more than 79 pixels wide and high. 2728 This method makes a synchronous HTTP request by default. To make an 2729 asynchronous HTTP request, please define a `callback` function 2730 to be invoked when receiving the response. 2731 >>> def callback_function(response): 2732 >>> pprint(response) 2733 >>> 2734 >>> thread = api.update_profile_image_with_http_info(account_id, user_id, callback=callback_function) 2735 2736 :param callback function: The callback function 2737 for asynchronous request. (optional) 2738 :param str account_id: The external account number (int) or account ID Guid. (required) 2739 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2740 :return: None 2741 If the method is called asynchronously, 2742 returns the request thread. 2743 """ 2744 2745 all_params = ['account_id', 'user_id'] 2746 all_params.append('callback') 2747 all_params.append('_return_http_data_only') 2748 all_params.append('_preload_content') 2749 all_params.append('_request_timeout') 2750 2751 params = locals() 2752 for key, val in iteritems(params['kwargs']): 2753 if key not in all_params: 2754 raise TypeError( 2755 "Got an unexpected keyword argument '%s'" 2756 " to method update_profile_image" % key 2757 ) 2758 params[key] = val 2759 del params['kwargs'] 2760 # verify the required parameter 'account_id' is set 2761 if ('account_id' not in params) or (params['account_id'] is None): 2762 raise ValueError("Missing the required parameter `account_id` when calling `update_profile_image`") 2763 # verify the required parameter 'user_id' is set 2764 if ('user_id' not in params) or (params['user_id'] is None): 2765 raise ValueError("Missing the required parameter `user_id` when calling `update_profile_image`") 2766 2767 2768 collection_formats = {} 2769 2770 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json') 2771 path_params = {} 2772 if 'account_id' in params: 2773 path_params['accountId'] = params['account_id'] 2774 if 'user_id' in params: 2775 path_params['userId'] = params['user_id'] 2776 2777 query_params = {} 2778 2779 header_params = {} 2780 2781 form_params = [] 2782 local_var_files = {} 2783 2784 body_params = None 2785 # HTTP header `Accept` 2786 header_params['Accept'] = self.api_client.\ 2787 select_header_accept(['application/json']) 2788 2789 # HTTP header `Content-Type` 2790 header_params['Content-Type'] = self.api_client.\ 2791 select_header_content_type(['image/gif']) 2792 2793 # Authentication setting 2794 auth_settings = [] 2795 2796 return self.api_client.call_api(resource_path, 'PUT', 2797 path_params, 2798 query_params, 2799 header_params, 2800 body=body_params, 2801 post_params=form_params, 2802 files=local_var_files, 2803 response_type=None, 2804 auth_settings=auth_settings, 2805 callback=params.get('callback'), 2806 _return_http_data_only=params.get('_return_http_data_only'), 2807 _preload_content=params.get('_preload_content', True), 2808 _request_timeout=params.get('_request_timeout'), 2809 collection_formats=collection_formats) 2810 2811 def update_settings(self, account_id, user_id, **kwargs): 2812 """ 2813 Updates the user account settings for a specified user. 2814 Updates the account settings list and email notification types for the specified user. 2815 This method makes a synchronous HTTP request by default. To make an 2816 asynchronous HTTP request, please define a `callback` function 2817 to be invoked when receiving the response. 2818 >>> def callback_function(response): 2819 >>> pprint(response) 2820 >>> 2821 >>> thread = api.update_settings(account_id, user_id, callback=callback_function) 2822 2823 :param callback function: The callback function 2824 for asynchronous request. (optional) 2825 :param str account_id: The external account number (int) or account ID Guid. (required) 2826 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2827 :param str allow_all_languages: 2828 :param UserSettingsInformation user_settings_information: 2829 :return: None 2830 If the method is called asynchronously, 2831 returns the request thread. 2832 """ 2833 kwargs['_return_http_data_only'] = True 2834 if kwargs.get('callback'): 2835 return self.update_settings_with_http_info(account_id, user_id, **kwargs) 2836 else: 2837 (data) = self.update_settings_with_http_info(account_id, user_id, **kwargs) 2838 return data 2839 2840 def update_settings_with_http_info(self, account_id, user_id, **kwargs): 2841 """ 2842 Updates the user account settings for a specified user. 2843 Updates the account settings list and email notification types for the specified user. 2844 This method makes a synchronous HTTP request by default. To make an 2845 asynchronous HTTP request, please define a `callback` function 2846 to be invoked when receiving the response. 2847 >>> def callback_function(response): 2848 >>> pprint(response) 2849 >>> 2850 >>> thread = api.update_settings_with_http_info(account_id, user_id, callback=callback_function) 2851 2852 :param callback function: The callback function 2853 for asynchronous request. (optional) 2854 :param str account_id: The external account number (int) or account ID Guid. (required) 2855 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2856 :param str allow_all_languages: 2857 :param UserSettingsInformation user_settings_information: 2858 :return: None 2859 If the method is called asynchronously, 2860 returns the request thread. 2861 """ 2862 2863 all_params = ['account_id', 'user_id', 'allow_all_languages', 'user_settings_information'] 2864 all_params.append('callback') 2865 all_params.append('_return_http_data_only') 2866 all_params.append('_preload_content') 2867 all_params.append('_request_timeout') 2868 2869 params = locals() 2870 for key, val in iteritems(params['kwargs']): 2871 if key not in all_params: 2872 raise TypeError( 2873 "Got an unexpected keyword argument '%s'" 2874 " to method update_settings" % key 2875 ) 2876 params[key] = val 2877 del params['kwargs'] 2878 # verify the required parameter 'account_id' is set 2879 if ('account_id' not in params) or (params['account_id'] is None): 2880 raise ValueError("Missing the required parameter `account_id` when calling `update_settings`") 2881 # verify the required parameter 'user_id' is set 2882 if ('user_id' not in params) or (params['user_id'] is None): 2883 raise ValueError("Missing the required parameter `user_id` when calling `update_settings`") 2884 2885 2886 collection_formats = {} 2887 2888 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/settings'.replace('{format}', 'json') 2889 path_params = {} 2890 if 'account_id' in params: 2891 path_params['accountId'] = params['account_id'] 2892 if 'user_id' in params: 2893 path_params['userId'] = params['user_id'] 2894 2895 query_params = {} 2896 if 'allow_all_languages' in params: 2897 query_params['allow_all_languages'] = params['allow_all_languages'] 2898 2899 header_params = {} 2900 2901 form_params = [] 2902 local_var_files = {} 2903 2904 body_params = None 2905 if 'user_settings_information' in params: 2906 body_params = params['user_settings_information'] 2907 # HTTP header `Accept` 2908 header_params['Accept'] = self.api_client.\ 2909 select_header_accept(['application/json']) 2910 2911 # Authentication setting 2912 auth_settings = [] 2913 2914 return self.api_client.call_api(resource_path, 'PUT', 2915 path_params, 2916 query_params, 2917 header_params, 2918 body=body_params, 2919 post_params=form_params, 2920 files=local_var_files, 2921 response_type=None, 2922 auth_settings=auth_settings, 2923 callback=params.get('callback'), 2924 _return_http_data_only=params.get('_return_http_data_only'), 2925 _preload_content=params.get('_preload_content', True), 2926 _request_timeout=params.get('_request_timeout'), 2927 collection_formats=collection_formats) 2928 2929 def update_signature(self, account_id, signature_id, user_id, **kwargs): 2930 """ 2931 Updates the user signature for a specified user. 2932 Creates, or updates, the signature font and initials for the specified user. When creating a signature, you use this resource to create the signature name and then add the signature and initials images into the signature. ###### Note: This will also create a default signature for the user when one does not exist. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 2933 This method makes a synchronous HTTP request by default. To make an 2934 asynchronous HTTP request, please define a `callback` function 2935 to be invoked when receiving the response. 2936 >>> def callback_function(response): 2937 >>> pprint(response) 2938 >>> 2939 >>> thread = api.update_signature(account_id, signature_id, user_id, callback=callback_function) 2940 2941 :param callback function: The callback function 2942 for asynchronous request. (optional) 2943 :param str account_id: The external account number (int) or account ID Guid. (required) 2944 :param str signature_id: The ID of the signature being accessed. (required) 2945 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2946 :param str close_existing_signature: When set to **true**, closes the current signature. 2947 :param UserSignatureDefinition user_signature_definition: 2948 :return: UserSignature 2949 If the method is called asynchronously, 2950 returns the request thread. 2951 """ 2952 kwargs['_return_http_data_only'] = True 2953 if kwargs.get('callback'): 2954 return self.update_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 2955 else: 2956 (data) = self.update_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 2957 return data 2958 2959 def update_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs): 2960 """ 2961 Updates the user signature for a specified user. 2962 Creates, or updates, the signature font and initials for the specified user. When creating a signature, you use this resource to create the signature name and then add the signature and initials images into the signature. ###### Note: This will also create a default signature for the user when one does not exist. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 2963 This method makes a synchronous HTTP request by default. To make an 2964 asynchronous HTTP request, please define a `callback` function 2965 to be invoked when receiving the response. 2966 >>> def callback_function(response): 2967 >>> pprint(response) 2968 >>> 2969 >>> thread = api.update_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function) 2970 2971 :param callback function: The callback function 2972 for asynchronous request. (optional) 2973 :param str account_id: The external account number (int) or account ID Guid. (required) 2974 :param str signature_id: The ID of the signature being accessed. (required) 2975 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2976 :param str close_existing_signature: When set to **true**, closes the current signature. 2977 :param UserSignatureDefinition user_signature_definition: 2978 :return: UserSignature 2979 If the method is called asynchronously, 2980 returns the request thread. 2981 """ 2982 2983 all_params = ['account_id', 'signature_id', 'user_id', 'close_existing_signature', 'user_signature_definition'] 2984 all_params.append('callback') 2985 all_params.append('_return_http_data_only') 2986 all_params.append('_preload_content') 2987 all_params.append('_request_timeout') 2988 2989 params = locals() 2990 for key, val in iteritems(params['kwargs']): 2991 if key not in all_params: 2992 raise TypeError( 2993 "Got an unexpected keyword argument '%s'" 2994 " to method update_signature" % key 2995 ) 2996 params[key] = val 2997 del params['kwargs'] 2998 # verify the required parameter 'account_id' is set 2999 if ('account_id' not in params) or (params['account_id'] is None): 3000 raise ValueError("Missing the required parameter `account_id` when calling `update_signature`") 3001 # verify the required parameter 'signature_id' is set 3002 if ('signature_id' not in params) or (params['signature_id'] is None): 3003 raise ValueError("Missing the required parameter `signature_id` when calling `update_signature`") 3004 # verify the required parameter 'user_id' is set 3005 if ('user_id' not in params) or (params['user_id'] is None): 3006 raise ValueError("Missing the required parameter `user_id` when calling `update_signature`") 3007 3008 3009 collection_formats = {} 3010 3011 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json') 3012 path_params = {} 3013 if 'account_id' in params: 3014 path_params['accountId'] = params['account_id'] 3015 if 'signature_id' in params: 3016 path_params['signatureId'] = params['signature_id'] 3017 if 'user_id' in params: 3018 path_params['userId'] = params['user_id'] 3019 3020 query_params = {} 3021 if 'close_existing_signature' in params: 3022 query_params['close_existing_signature'] = params['close_existing_signature'] 3023 3024 header_params = {} 3025 3026 form_params = [] 3027 local_var_files = {} 3028 3029 body_params = None 3030 if 'user_signature_definition' in params: 3031 body_params = params['user_signature_definition'] 3032 # HTTP header `Accept` 3033 header_params['Accept'] = self.api_client.\ 3034 select_header_accept(['application/json']) 3035 3036 # Authentication setting 3037 auth_settings = [] 3038 3039 return self.api_client.call_api(resource_path, 'PUT', 3040 path_params, 3041 query_params, 3042 header_params, 3043 body=body_params, 3044 post_params=form_params, 3045 files=local_var_files, 3046 response_type='UserSignature', 3047 auth_settings=auth_settings, 3048 callback=params.get('callback'), 3049 _return_http_data_only=params.get('_return_http_data_only'), 3050 _preload_content=params.get('_preload_content', True), 3051 _request_timeout=params.get('_request_timeout'), 3052 collection_formats=collection_formats) 3053 3054 def update_signature_image(self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs): 3055 """ 3056 Updates the user signature image or user initials image for the specified user. 3057 Updates the user signature image or user initials image for the specified user. The supported image formats for this file are: gif, png, jpeg, and bmp. The file must be less than 200K. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 3058 This method makes a synchronous HTTP request by default. To make an 3059 asynchronous HTTP request, please define a `callback` function 3060 to be invoked when receiving the response. 3061 >>> def callback_function(response): 3062 >>> pprint(response) 3063 >>> 3064 >>> thread = api.update_signature_image(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function) 3065 3066 :param callback function: The callback function 3067 for asynchronous request. (optional) 3068 :param str account_id: The external account number (int) or account ID Guid. (required) 3069 :param str image_type: One of **signature_image** or **initials_image**. (required) 3070 :param str signature_id: The ID of the signature being accessed. (required) 3071 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3072 :param str transparent_png: 3073 :param str image_bytes: Updated image content. (required) 3074 :return: UserSignature 3075 If the method is called asynchronously, 3076 returns the request thread. 3077 """ 3078 kwargs['_return_http_data_only'] = True 3079 if kwargs.get('callback'): 3080 return self.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, **kwargs) 3081 else: 3082 (data) = self.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, **kwargs) 3083 return data 3084 3085 def update_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs): 3086 """ 3087 Updates the user signature image or user initials image for the specified user. 3088 Updates the user signature image or user initials image for the specified user. The supported image formats for this file are: gif, png, jpeg, and bmp. The file must be less than 200K. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 3089 This method makes a synchronous HTTP request by default. To make an 3090 asynchronous HTTP request, please define a `callback` function 3091 to be invoked when receiving the response. 3092 >>> def callback_function(response): 3093 >>> pprint(response) 3094 >>> 3095 >>> thread = api.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function) 3096 3097 :param callback function: The callback function 3098 for asynchronous request. (optional) 3099 :param str account_id: The external account number (int) or account ID Guid. (required) 3100 :param str image_type: One of **signature_image** or **initials_image**. (required) 3101 :param str signature_id: The ID of the signature being accessed. (required) 3102 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3103 :param str transparent_png: 3104 :param str image_bytes: Updated image content. (required) 3105 :return: UserSignature 3106 If the method is called asynchronously, 3107 returns the request thread. 3108 """ 3109 3110 all_params = ['account_id', 'image_type', 'signature_id', 'user_id', 'transparent_png', 'image_bytes'] 3111 all_params.append('callback') 3112 all_params.append('_return_http_data_only') 3113 all_params.append('_preload_content') 3114 all_params.append('_request_timeout') 3115 3116 params = locals() 3117 for key, val in iteritems(params['kwargs']): 3118 if key not in all_params: 3119 raise TypeError( 3120 "Got an unexpected keyword argument '%s'" 3121 " to method update_signature_image" % key 3122 ) 3123 params[key] = val 3124 del params['kwargs'] 3125 # verify the required parameter 'account_id' is set 3126 if ('account_id' not in params) or (params['account_id'] is None): 3127 raise ValueError("Missing the required parameter `account_id` when calling `update_signature_image`") 3128 # verify the required parameter 'image_type' is set 3129 if ('image_type' not in params) or (params['image_type'] is None): 3130 raise ValueError("Missing the required parameter `image_type` when calling `update_signature_image`") 3131 # verify the required parameter 'signature_id' is set 3132 if ('signature_id' not in params) or (params['signature_id'] is None): 3133 raise ValueError("Missing the required parameter `signature_id` when calling `update_signature_image`") 3134 # verify the required parameter 'user_id' is set 3135 if ('user_id' not in params) or (params['user_id'] is None): 3136 raise ValueError("Missing the required parameter `user_id` when calling `update_signature_image`") 3137 # verify the required parameter 'image_bytes' is set 3138 if ('image_bytes' not in params) or (params['image_bytes'] is None): 3139 raise ValueError("Missing the required parameter `image_bytes` when calling `update_signature_image`") 3140 3141 3142 collection_formats = {} 3143 3144 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json') 3145 path_params = {} 3146 if 'account_id' in params: 3147 path_params['accountId'] = params['account_id'] 3148 if 'image_type' in params: 3149 path_params['imageType'] = params['image_type'] 3150 if 'signature_id' in params: 3151 path_params['signatureId'] = params['signature_id'] 3152 if 'user_id' in params: 3153 path_params['userId'] = params['user_id'] 3154 3155 query_params = {} 3156 if 'transparent_png' in params: 3157 query_params['transparent_png'] = params['transparent_png'] 3158 3159 header_params = {} 3160 3161 form_params = [] 3162 local_var_files = {} 3163 3164 body_params = None 3165 if 'image_bytes' in params: 3166 body_params = params['image_bytes'] 3167 # HTTP header `Accept` 3168 header_params['Accept'] = self.api_client.\ 3169 select_header_accept(['application/json']) 3170 3171 # HTTP header `Content-Type` 3172 header_params['Content-Type'] = self.api_client.\ 3173 select_header_content_type(['image/gif']) 3174 3175 # Authentication setting 3176 auth_settings = [] 3177 3178 return self.api_client.call_api(resource_path, 'PUT', 3179 path_params, 3180 query_params, 3181 header_params, 3182 body=body_params, 3183 post_params=form_params, 3184 files=local_var_files, 3185 response_type='UserSignature', 3186 auth_settings=auth_settings, 3187 callback=params.get('callback'), 3188 _return_http_data_only=params.get('_return_http_data_only'), 3189 _preload_content=params.get('_preload_content', True), 3190 _request_timeout=params.get('_request_timeout'), 3191 collection_formats=collection_formats) 3192 3193 def update_signatures(self, account_id, user_id, **kwargs): 3194 """ 3195 Adds/updates a user signature. 3196 3197 This method makes a synchronous HTTP request by default. To make an 3198 asynchronous HTTP request, please define a `callback` function 3199 to be invoked when receiving the response. 3200 >>> def callback_function(response): 3201 >>> pprint(response) 3202 >>> 3203 >>> thread = api.update_signatures(account_id, user_id, callback=callback_function) 3204 3205 :param callback function: The callback function 3206 for asynchronous request. (optional) 3207 :param str account_id: The external account number (int) or account ID Guid. (required) 3208 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3209 :param UserSignaturesInformation user_signatures_information: 3210 :return: UserSignaturesInformation 3211 If the method is called asynchronously, 3212 returns the request thread. 3213 """ 3214 kwargs['_return_http_data_only'] = True 3215 if kwargs.get('callback'): 3216 return self.update_signatures_with_http_info(account_id, user_id, **kwargs) 3217 else: 3218 (data) = self.update_signatures_with_http_info(account_id, user_id, **kwargs) 3219 return data 3220 3221 def update_signatures_with_http_info(self, account_id, user_id, **kwargs): 3222 """ 3223 Adds/updates a user signature. 3224 3225 This method makes a synchronous HTTP request by default. To make an 3226 asynchronous HTTP request, please define a `callback` function 3227 to be invoked when receiving the response. 3228 >>> def callback_function(response): 3229 >>> pprint(response) 3230 >>> 3231 >>> thread = api.update_signatures_with_http_info(account_id, user_id, callback=callback_function) 3232 3233 :param callback function: The callback function 3234 for asynchronous request. (optional) 3235 :param str account_id: The external account number (int) or account ID Guid. (required) 3236 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3237 :param UserSignaturesInformation user_signatures_information: 3238 :return: UserSignaturesInformation 3239 If the method is called asynchronously, 3240 returns the request thread. 3241 """ 3242 3243 all_params = ['account_id', 'user_id', 'user_signatures_information'] 3244 all_params.append('callback') 3245 all_params.append('_return_http_data_only') 3246 all_params.append('_preload_content') 3247 all_params.append('_request_timeout') 3248 3249 params = locals() 3250 for key, val in iteritems(params['kwargs']): 3251 if key not in all_params: 3252 raise TypeError( 3253 "Got an unexpected keyword argument '%s'" 3254 " to method update_signatures" % key 3255 ) 3256 params[key] = val 3257 del params['kwargs'] 3258 # verify the required parameter 'account_id' is set 3259 if ('account_id' not in params) or (params['account_id'] is None): 3260 raise ValueError("Missing the required parameter `account_id` when calling `update_signatures`") 3261 # verify the required parameter 'user_id' is set 3262 if ('user_id' not in params) or (params['user_id'] is None): 3263 raise ValueError("Missing the required parameter `user_id` when calling `update_signatures`") 3264 3265 3266 collection_formats = {} 3267 3268 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json') 3269 path_params = {} 3270 if 'account_id' in params: 3271 path_params['accountId'] = params['account_id'] 3272 if 'user_id' in params: 3273 path_params['userId'] = params['user_id'] 3274 3275 query_params = {} 3276 3277 header_params = {} 3278 3279 form_params = [] 3280 local_var_files = {} 3281 3282 body_params = None 3283 if 'user_signatures_information' in params: 3284 body_params = params['user_signatures_information'] 3285 # HTTP header `Accept` 3286 header_params['Accept'] = self.api_client.\ 3287 select_header_accept(['application/json']) 3288 3289 # Authentication setting 3290 auth_settings = [] 3291 3292 return self.api_client.call_api(resource_path, 'PUT', 3293 path_params, 3294 query_params, 3295 header_params, 3296 body=body_params, 3297 post_params=form_params, 3298 files=local_var_files, 3299 response_type='UserSignaturesInformation', 3300 auth_settings=auth_settings, 3301 callback=params.get('callback'), 3302 _return_http_data_only=params.get('_return_http_data_only'), 3303 _preload_content=params.get('_preload_content', True), 3304 _request_timeout=params.get('_request_timeout'), 3305 collection_formats=collection_formats) 3306 3307 def update_user(self, account_id, user_id, **kwargs): 3308 """ 3309 Updates the specified user information. 3310 To update user information for a specific user, submit a [Users](#Users) object with updated field values in the request body of this operation. 3311 This method makes a synchronous HTTP request by default. To make an 3312 asynchronous HTTP request, please define a `callback` function 3313 to be invoked when receiving the response. 3314 >>> def callback_function(response): 3315 >>> pprint(response) 3316 >>> 3317 >>> thread = api.update_user(account_id, user_id, callback=callback_function) 3318 3319 :param callback function: The callback function 3320 for asynchronous request. (optional) 3321 :param str account_id: The external account number (int) or account ID Guid. (required) 3322 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3323 :param str allow_all_languages: 3324 :param UserInformation user_information: 3325 :return: UserInformation 3326 If the method is called asynchronously, 3327 returns the request thread. 3328 """ 3329 kwargs['_return_http_data_only'] = True 3330 if kwargs.get('callback'): 3331 return self.update_user_with_http_info(account_id, user_id, **kwargs) 3332 else: 3333 (data) = self.update_user_with_http_info(account_id, user_id, **kwargs) 3334 return data 3335 3336 def update_user_with_http_info(self, account_id, user_id, **kwargs): 3337 """ 3338 Updates the specified user information. 3339 To update user information for a specific user, submit a [Users](#Users) object with updated field values in the request body of this operation. 3340 This method makes a synchronous HTTP request by default. To make an 3341 asynchronous HTTP request, please define a `callback` function 3342 to be invoked when receiving the response. 3343 >>> def callback_function(response): 3344 >>> pprint(response) 3345 >>> 3346 >>> thread = api.update_user_with_http_info(account_id, user_id, callback=callback_function) 3347 3348 :param callback function: The callback function 3349 for asynchronous request. (optional) 3350 :param str account_id: The external account number (int) or account ID Guid. (required) 3351 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3352 :param str allow_all_languages: 3353 :param UserInformation user_information: 3354 :return: UserInformation 3355 If the method is called asynchronously, 3356 returns the request thread. 3357 """ 3358 3359 all_params = ['account_id', 'user_id', 'allow_all_languages', 'user_information'] 3360 all_params.append('callback') 3361 all_params.append('_return_http_data_only') 3362 all_params.append('_preload_content') 3363 all_params.append('_request_timeout') 3364 3365 params = locals() 3366 for key, val in iteritems(params['kwargs']): 3367 if key not in all_params: 3368 raise TypeError( 3369 "Got an unexpected keyword argument '%s'" 3370 " to method update_user" % key 3371 ) 3372 params[key] = val 3373 del params['kwargs'] 3374 # verify the required parameter 'account_id' is set 3375 if ('account_id' not in params) or (params['account_id'] is None): 3376 raise ValueError("Missing the required parameter `account_id` when calling `update_user`") 3377 # verify the required parameter 'user_id' is set 3378 if ('user_id' not in params) or (params['user_id'] is None): 3379 raise ValueError("Missing the required parameter `user_id` when calling `update_user`") 3380 3381 3382 collection_formats = {} 3383 3384 resource_path = '/v2.1/accounts/{accountId}/users/{userId}'.replace('{format}', 'json') 3385 path_params = {} 3386 if 'account_id' in params: 3387 path_params['accountId'] = params['account_id'] 3388 if 'user_id' in params: 3389 path_params['userId'] = params['user_id'] 3390 3391 query_params = {} 3392 if 'allow_all_languages' in params: 3393 query_params['allow_all_languages'] = params['allow_all_languages'] 3394 3395 header_params = {} 3396 3397 form_params = [] 3398 local_var_files = {} 3399 3400 body_params = None 3401 if 'user_information' in params: 3402 body_params = params['user_information'] 3403 # HTTP header `Accept` 3404 header_params['Accept'] = self.api_client.\ 3405 select_header_accept(['application/json']) 3406 3407 # Authentication setting 3408 auth_settings = [] 3409 3410 return self.api_client.call_api(resource_path, 'PUT', 3411 path_params, 3412 query_params, 3413 header_params, 3414 body=body_params, 3415 post_params=form_params, 3416 files=local_var_files, 3417 response_type='UserInformation', 3418 auth_settings=auth_settings, 3419 callback=params.get('callback'), 3420 _return_http_data_only=params.get('_return_http_data_only'), 3421 _preload_content=params.get('_preload_content', True), 3422 _request_timeout=params.get('_request_timeout'), 3423 collection_formats=collection_formats) 3424 3425 def update_users(self, account_id, **kwargs): 3426 """ 3427 Change one or more user in the specified account. 3428 This method updates the information about one or more account users. 3429 This method makes a synchronous HTTP request by default. To make an 3430 asynchronous HTTP request, please define a `callback` function 3431 to be invoked when receiving the response. 3432 >>> def callback_function(response): 3433 >>> pprint(response) 3434 >>> 3435 >>> thread = api.update_users(account_id, callback=callback_function) 3436 3437 :param callback function: The callback function 3438 for asynchronous request. (optional) 3439 :param str account_id: The external account number (int) or account ID Guid. (required) 3440 :param str allow_all_languages: 3441 :param UserInformationList user_information_list: 3442 :return: UserInformationList 3443 If the method is called asynchronously, 3444 returns the request thread. 3445 """ 3446 kwargs['_return_http_data_only'] = True 3447 if kwargs.get('callback'): 3448 return self.update_users_with_http_info(account_id, **kwargs) 3449 else: 3450 (data) = self.update_users_with_http_info(account_id, **kwargs) 3451 return data 3452 3453 def update_users_with_http_info(self, account_id, **kwargs): 3454 """ 3455 Change one or more user in the specified account. 3456 This method updates the information about one or more account users. 3457 This method makes a synchronous HTTP request by default. To make an 3458 asynchronous HTTP request, please define a `callback` function 3459 to be invoked when receiving the response. 3460 >>> def callback_function(response): 3461 >>> pprint(response) 3462 >>> 3463 >>> thread = api.update_users_with_http_info(account_id, callback=callback_function) 3464 3465 :param callback function: The callback function 3466 for asynchronous request. (optional) 3467 :param str account_id: The external account number (int) or account ID Guid. (required) 3468 :param str allow_all_languages: 3469 :param UserInformationList user_information_list: 3470 :return: UserInformationList 3471 If the method is called asynchronously, 3472 returns the request thread. 3473 """ 3474 3475 all_params = ['account_id', 'allow_all_languages', 'user_information_list'] 3476 all_params.append('callback') 3477 all_params.append('_return_http_data_only') 3478 all_params.append('_preload_content') 3479 all_params.append('_request_timeout') 3480 3481 params = locals() 3482 for key, val in iteritems(params['kwargs']): 3483 if key not in all_params: 3484 raise TypeError( 3485 "Got an unexpected keyword argument '%s'" 3486 " to method update_users" % key 3487 ) 3488 params[key] = val 3489 del params['kwargs'] 3490 # verify the required parameter 'account_id' is set 3491 if ('account_id' not in params) or (params['account_id'] is None): 3492 raise ValueError("Missing the required parameter `account_id` when calling `update_users`") 3493 3494 3495 collection_formats = {} 3496 3497 resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json') 3498 path_params = {} 3499 if 'account_id' in params: 3500 path_params['accountId'] = params['account_id'] 3501 3502 query_params = {} 3503 if 'allow_all_languages' in params: 3504 query_params['allow_all_languages'] = params['allow_all_languages'] 3505 3506 header_params = {} 3507 3508 form_params = [] 3509 local_var_files = {} 3510 3511 body_params = None 3512 if 'user_information_list' in params: 3513 body_params = params['user_information_list'] 3514 # HTTP header `Accept` 3515 header_params['Accept'] = self.api_client.\ 3516 select_header_accept(['application/json']) 3517 3518 # Authentication setting 3519 auth_settings = [] 3520 3521 return self.api_client.call_api(resource_path, 'PUT', 3522 path_params, 3523 query_params, 3524 header_params, 3525 body=body_params, 3526 post_params=form_params, 3527 files=local_var_files, 3528 response_type='UserInformationList', 3529 auth_settings=auth_settings, 3530 callback=params.get('callback'), 3531 _return_http_data_only=params.get('_return_http_data_only'), 3532 _preload_content=params.get('_preload_content', True), 3533 _request_timeout=params.get('_request_timeout'), 3534 collection_formats=collection_formats)
28class UsersApi(object): 29 """ 30 NOTE: This class is auto generated by the swagger code generator program. 31 Do not edit the class manually. 32 Ref: https://github.com/swagger-api/swagger-codegen 33 """ 34 35 def __init__(self, api_client=None): 36 config = Configuration() 37 if api_client: 38 self.api_client = api_client 39 else: 40 if not config.api_client: 41 config.api_client = ApiClient() 42 self.api_client = config.api_client 43 44 def create(self, account_id, **kwargs): 45 """ 46 Adds news user to the specified account. 47 Adds new users to your account. Set the `userSettings` property in the request to specify the actions the users can perform on the account. 48 This method makes a synchronous HTTP request by default. To make an 49 asynchronous HTTP request, please define a `callback` function 50 to be invoked when receiving the response. 51 >>> def callback_function(response): 52 >>> pprint(response) 53 >>> 54 >>> thread = api.create(account_id, callback=callback_function) 55 56 :param callback function: The callback function 57 for asynchronous request. (optional) 58 :param str account_id: The external account number (int) or account ID Guid. (required) 59 :param NewUsersDefinition new_users_definition: 60 :return: NewUsersSummary 61 If the method is called asynchronously, 62 returns the request thread. 63 """ 64 kwargs['_return_http_data_only'] = True 65 if kwargs.get('callback'): 66 return self.create_with_http_info(account_id, **kwargs) 67 else: 68 (data) = self.create_with_http_info(account_id, **kwargs) 69 return data 70 71 def create_with_http_info(self, account_id, **kwargs): 72 """ 73 Adds news user to the specified account. 74 Adds new users to your account. Set the `userSettings` property in the request to specify the actions the users can perform on the account. 75 This method makes a synchronous HTTP request by default. To make an 76 asynchronous HTTP request, please define a `callback` function 77 to be invoked when receiving the response. 78 >>> def callback_function(response): 79 >>> pprint(response) 80 >>> 81 >>> thread = api.create_with_http_info(account_id, callback=callback_function) 82 83 :param callback function: The callback function 84 for asynchronous request. (optional) 85 :param str account_id: The external account number (int) or account ID Guid. (required) 86 :param NewUsersDefinition new_users_definition: 87 :return: NewUsersSummary 88 If the method is called asynchronously, 89 returns the request thread. 90 """ 91 92 all_params = ['account_id', 'new_users_definition'] 93 all_params.append('callback') 94 all_params.append('_return_http_data_only') 95 all_params.append('_preload_content') 96 all_params.append('_request_timeout') 97 98 params = locals() 99 for key, val in iteritems(params['kwargs']): 100 if key not in all_params: 101 raise TypeError( 102 "Got an unexpected keyword argument '%s'" 103 " to method create" % key 104 ) 105 params[key] = val 106 del params['kwargs'] 107 # verify the required parameter 'account_id' is set 108 if ('account_id' not in params) or (params['account_id'] is None): 109 raise ValueError("Missing the required parameter `account_id` when calling `create`") 110 111 112 collection_formats = {} 113 114 resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json') 115 path_params = {} 116 if 'account_id' in params: 117 path_params['accountId'] = params['account_id'] 118 119 query_params = {} 120 121 header_params = {} 122 123 form_params = [] 124 local_var_files = {} 125 126 body_params = None 127 if 'new_users_definition' in params: 128 body_params = params['new_users_definition'] 129 # HTTP header `Accept` 130 header_params['Accept'] = self.api_client.\ 131 select_header_accept(['application/json']) 132 133 # Authentication setting 134 auth_settings = [] 135 136 return self.api_client.call_api(resource_path, 'POST', 137 path_params, 138 query_params, 139 header_params, 140 body=body_params, 141 post_params=form_params, 142 files=local_var_files, 143 response_type='NewUsersSummary', 144 auth_settings=auth_settings, 145 callback=params.get('callback'), 146 _return_http_data_only=params.get('_return_http_data_only'), 147 _preload_content=params.get('_preload_content', True), 148 _request_timeout=params.get('_request_timeout'), 149 collection_formats=collection_formats) 150 151 def create_signatures(self, account_id, user_id, **kwargs): 152 """ 153 Adds user Signature and initials images to a Signature. 154 Adds a user signature image and/or user initials image to the specified user. The userId property specified in the endpoint must match the authenticated user's userId and the user must be a member of the account. The rules and processes associated with this are: * If Content-Type is set to application/json, then the default behavior for creating a default signature image, based on the name and a DocuSign font, is used. * If Content-Type is set to multipart/form-data, then the request must contain a first part with the user signature information, followed by parts that contain the images. For each Image part, the Content-Disposition header has a \"filename\" value that is used to map to the `signatureName` and/or `signatureInitials` properties in the JSON to the image. For example: `Content-Disposition: file; filename=\"Ron Test20121127083900\"` If no matching image (by filename value) is found, then the image is not set. One, both, or neither of the signature and initials images can be set with this call. The Content-Transfer-Encoding: base64 header, set in the header for the part containing the image, can be set to indicate that the images are formatted as base64 instead of as binary. If successful, 200-OK is returned, and a JSON structure containing the signature information is provided, note that the signatureId can change with each API POST, PUT, or DELETE since the changes to the signature structure cause the current signature to be closed, and a new signature record to be created. 155 This method makes a synchronous HTTP request by default. To make an 156 asynchronous HTTP request, please define a `callback` function 157 to be invoked when receiving the response. 158 >>> def callback_function(response): 159 >>> pprint(response) 160 >>> 161 >>> thread = api.create_signatures(account_id, user_id, callback=callback_function) 162 163 :param callback function: The callback function 164 for asynchronous request. (optional) 165 :param str account_id: The external account number (int) or account ID Guid. (required) 166 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 167 :param UserSignaturesInformation user_signatures_information: 168 :return: UserSignaturesInformation 169 If the method is called asynchronously, 170 returns the request thread. 171 """ 172 kwargs['_return_http_data_only'] = True 173 if kwargs.get('callback'): 174 return self.create_signatures_with_http_info(account_id, user_id, **kwargs) 175 else: 176 (data) = self.create_signatures_with_http_info(account_id, user_id, **kwargs) 177 return data 178 179 def create_signatures_with_http_info(self, account_id, user_id, **kwargs): 180 """ 181 Adds user Signature and initials images to a Signature. 182 Adds a user signature image and/or user initials image to the specified user. The userId property specified in the endpoint must match the authenticated user's userId and the user must be a member of the account. The rules and processes associated with this are: * If Content-Type is set to application/json, then the default behavior for creating a default signature image, based on the name and a DocuSign font, is used. * If Content-Type is set to multipart/form-data, then the request must contain a first part with the user signature information, followed by parts that contain the images. For each Image part, the Content-Disposition header has a \"filename\" value that is used to map to the `signatureName` and/or `signatureInitials` properties in the JSON to the image. For example: `Content-Disposition: file; filename=\"Ron Test20121127083900\"` If no matching image (by filename value) is found, then the image is not set. One, both, or neither of the signature and initials images can be set with this call. The Content-Transfer-Encoding: base64 header, set in the header for the part containing the image, can be set to indicate that the images are formatted as base64 instead of as binary. If successful, 200-OK is returned, and a JSON structure containing the signature information is provided, note that the signatureId can change with each API POST, PUT, or DELETE since the changes to the signature structure cause the current signature to be closed, and a new signature record to be created. 183 This method makes a synchronous HTTP request by default. To make an 184 asynchronous HTTP request, please define a `callback` function 185 to be invoked when receiving the response. 186 >>> def callback_function(response): 187 >>> pprint(response) 188 >>> 189 >>> thread = api.create_signatures_with_http_info(account_id, user_id, callback=callback_function) 190 191 :param callback function: The callback function 192 for asynchronous request. (optional) 193 :param str account_id: The external account number (int) or account ID Guid. (required) 194 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 195 :param UserSignaturesInformation user_signatures_information: 196 :return: UserSignaturesInformation 197 If the method is called asynchronously, 198 returns the request thread. 199 """ 200 201 all_params = ['account_id', 'user_id', 'user_signatures_information'] 202 all_params.append('callback') 203 all_params.append('_return_http_data_only') 204 all_params.append('_preload_content') 205 all_params.append('_request_timeout') 206 207 params = locals() 208 for key, val in iteritems(params['kwargs']): 209 if key not in all_params: 210 raise TypeError( 211 "Got an unexpected keyword argument '%s'" 212 " to method create_signatures" % key 213 ) 214 params[key] = val 215 del params['kwargs'] 216 # verify the required parameter 'account_id' is set 217 if ('account_id' not in params) or (params['account_id'] is None): 218 raise ValueError("Missing the required parameter `account_id` when calling `create_signatures`") 219 # verify the required parameter 'user_id' is set 220 if ('user_id' not in params) or (params['user_id'] is None): 221 raise ValueError("Missing the required parameter `user_id` when calling `create_signatures`") 222 223 224 collection_formats = {} 225 226 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json') 227 path_params = {} 228 if 'account_id' in params: 229 path_params['accountId'] = params['account_id'] 230 if 'user_id' in params: 231 path_params['userId'] = params['user_id'] 232 233 query_params = {} 234 235 header_params = {} 236 237 form_params = [] 238 local_var_files = {} 239 240 body_params = None 241 if 'user_signatures_information' in params: 242 body_params = params['user_signatures_information'] 243 # HTTP header `Accept` 244 header_params['Accept'] = self.api_client.\ 245 select_header_accept(['application/json']) 246 247 # Authentication setting 248 auth_settings = [] 249 250 return self.api_client.call_api(resource_path, 'POST', 251 path_params, 252 query_params, 253 header_params, 254 body=body_params, 255 post_params=form_params, 256 files=local_var_files, 257 response_type='UserSignaturesInformation', 258 auth_settings=auth_settings, 259 callback=params.get('callback'), 260 _return_http_data_only=params.get('_return_http_data_only'), 261 _preload_content=params.get('_preload_content', True), 262 _request_timeout=params.get('_request_timeout'), 263 collection_formats=collection_formats) 264 265 def delete(self, account_id, **kwargs): 266 """ 267 Removes users account privileges. 268 This closes one or more user records in the account. Users are never deleted from an account, but closing a user prevents them from using account functions. The response returns whether the API execution was successful (200 - OK) or if it failed. The response contains a user structure similar to the request and includes the user changes. If an error occurred during the DELETE operation for any of the users, the response for that user contains an `errorDetails` node with `errorCode` and `message` properties. 269 This method makes a synchronous HTTP request by default. To make an 270 asynchronous HTTP request, please define a `callback` function 271 to be invoked when receiving the response. 272 >>> def callback_function(response): 273 >>> pprint(response) 274 >>> 275 >>> thread = api.delete(account_id, callback=callback_function) 276 277 :param callback function: The callback function 278 for asynchronous request. (optional) 279 :param str account_id: The external account number (int) or account ID Guid. (required) 280 :param str delete: 281 :param UserInfoList user_info_list: 282 :return: UsersResponse 283 If the method is called asynchronously, 284 returns the request thread. 285 """ 286 kwargs['_return_http_data_only'] = True 287 if kwargs.get('callback'): 288 return self.delete_with_http_info(account_id, **kwargs) 289 else: 290 (data) = self.delete_with_http_info(account_id, **kwargs) 291 return data 292 293 def delete_with_http_info(self, account_id, **kwargs): 294 """ 295 Removes users account privileges. 296 This closes one or more user records in the account. Users are never deleted from an account, but closing a user prevents them from using account functions. The response returns whether the API execution was successful (200 - OK) or if it failed. The response contains a user structure similar to the request and includes the user changes. If an error occurred during the DELETE operation for any of the users, the response for that user contains an `errorDetails` node with `errorCode` and `message` properties. 297 This method makes a synchronous HTTP request by default. To make an 298 asynchronous HTTP request, please define a `callback` function 299 to be invoked when receiving the response. 300 >>> def callback_function(response): 301 >>> pprint(response) 302 >>> 303 >>> thread = api.delete_with_http_info(account_id, callback=callback_function) 304 305 :param callback function: The callback function 306 for asynchronous request. (optional) 307 :param str account_id: The external account number (int) or account ID Guid. (required) 308 :param str delete: 309 :param UserInfoList user_info_list: 310 :return: UsersResponse 311 If the method is called asynchronously, 312 returns the request thread. 313 """ 314 315 all_params = ['account_id', 'delete', 'user_info_list'] 316 all_params.append('callback') 317 all_params.append('_return_http_data_only') 318 all_params.append('_preload_content') 319 all_params.append('_request_timeout') 320 321 params = locals() 322 for key, val in iteritems(params['kwargs']): 323 if key not in all_params: 324 raise TypeError( 325 "Got an unexpected keyword argument '%s'" 326 " to method delete" % key 327 ) 328 params[key] = val 329 del params['kwargs'] 330 # verify the required parameter 'account_id' is set 331 if ('account_id' not in params) or (params['account_id'] is None): 332 raise ValueError("Missing the required parameter `account_id` when calling `delete`") 333 334 335 collection_formats = {} 336 337 resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json') 338 path_params = {} 339 if 'account_id' in params: 340 path_params['accountId'] = params['account_id'] 341 342 query_params = {} 343 if 'delete' in params: 344 query_params['delete'] = params['delete'] 345 346 header_params = {} 347 348 form_params = [] 349 local_var_files = {} 350 351 body_params = None 352 if 'user_info_list' in params: 353 body_params = params['user_info_list'] 354 # HTTP header `Accept` 355 header_params['Accept'] = self.api_client.\ 356 select_header_accept(['application/json']) 357 358 # Authentication setting 359 auth_settings = [] 360 361 return self.api_client.call_api(resource_path, 'DELETE', 362 path_params, 363 query_params, 364 header_params, 365 body=body_params, 366 post_params=form_params, 367 files=local_var_files, 368 response_type='UsersResponse', 369 auth_settings=auth_settings, 370 callback=params.get('callback'), 371 _return_http_data_only=params.get('_return_http_data_only'), 372 _preload_content=params.get('_preload_content', True), 373 _request_timeout=params.get('_request_timeout'), 374 collection_formats=collection_formats) 375 376 def delete_contact_with_id(self, account_id, contact_id, **kwargs): 377 """ 378 Replaces a particular contact associated with an account for the DocuSign service. 379 This method deletes a contact associated with an account. 380 This method makes a synchronous HTTP request by default. To make an 381 asynchronous HTTP request, please define a `callback` function 382 to be invoked when receiving the response. 383 >>> def callback_function(response): 384 >>> pprint(response) 385 >>> 386 >>> thread = api.delete_contact_with_id(account_id, contact_id, callback=callback_function) 387 388 :param callback function: The callback function 389 for asynchronous request. (optional) 390 :param str account_id: The external account number (int) or account ID Guid. (required) 391 :param str contact_id: The unique identifier of a person in the contacts address book. (required) 392 :return: ContactUpdateResponse 393 If the method is called asynchronously, 394 returns the request thread. 395 """ 396 kwargs['_return_http_data_only'] = True 397 if kwargs.get('callback'): 398 return self.delete_contact_with_id_with_http_info(account_id, contact_id, **kwargs) 399 else: 400 (data) = self.delete_contact_with_id_with_http_info(account_id, contact_id, **kwargs) 401 return data 402 403 def delete_contact_with_id_with_http_info(self, account_id, contact_id, **kwargs): 404 """ 405 Replaces a particular contact associated with an account for the DocuSign service. 406 This method deletes a contact associated with an account. 407 This method makes a synchronous HTTP request by default. To make an 408 asynchronous HTTP request, please define a `callback` function 409 to be invoked when receiving the response. 410 >>> def callback_function(response): 411 >>> pprint(response) 412 >>> 413 >>> thread = api.delete_contact_with_id_with_http_info(account_id, contact_id, callback=callback_function) 414 415 :param callback function: The callback function 416 for asynchronous request. (optional) 417 :param str account_id: The external account number (int) or account ID Guid. (required) 418 :param str contact_id: The unique identifier of a person in the contacts address book. (required) 419 :return: ContactUpdateResponse 420 If the method is called asynchronously, 421 returns the request thread. 422 """ 423 424 all_params = ['account_id', 'contact_id'] 425 all_params.append('callback') 426 all_params.append('_return_http_data_only') 427 all_params.append('_preload_content') 428 all_params.append('_request_timeout') 429 430 params = locals() 431 for key, val in iteritems(params['kwargs']): 432 if key not in all_params: 433 raise TypeError( 434 "Got an unexpected keyword argument '%s'" 435 " to method delete_contact_with_id" % key 436 ) 437 params[key] = val 438 del params['kwargs'] 439 # verify the required parameter 'account_id' is set 440 if ('account_id' not in params) or (params['account_id'] is None): 441 raise ValueError("Missing the required parameter `account_id` when calling `delete_contact_with_id`") 442 # verify the required parameter 'contact_id' is set 443 if ('contact_id' not in params) or (params['contact_id'] is None): 444 raise ValueError("Missing the required parameter `contact_id` when calling `delete_contact_with_id`") 445 446 447 collection_formats = {} 448 449 resource_path = '/v2.1/accounts/{accountId}/contacts/{contactId}'.replace('{format}', 'json') 450 path_params = {} 451 if 'account_id' in params: 452 path_params['accountId'] = params['account_id'] 453 if 'contact_id' in params: 454 path_params['contactId'] = params['contact_id'] 455 456 query_params = {} 457 458 header_params = {} 459 460 form_params = [] 461 local_var_files = {} 462 463 body_params = None 464 # HTTP header `Accept` 465 header_params['Accept'] = self.api_client.\ 466 select_header_accept(['application/json']) 467 468 # Authentication setting 469 auth_settings = [] 470 471 return self.api_client.call_api(resource_path, 'DELETE', 472 path_params, 473 query_params, 474 header_params, 475 body=body_params, 476 post_params=form_params, 477 files=local_var_files, 478 response_type='ContactUpdateResponse', 479 auth_settings=auth_settings, 480 callback=params.get('callback'), 481 _return_http_data_only=params.get('_return_http_data_only'), 482 _preload_content=params.get('_preload_content', True), 483 _request_timeout=params.get('_request_timeout'), 484 collection_formats=collection_formats) 485 486 def delete_contacts(self, account_id, **kwargs): 487 """ 488 Delete contacts associated with an account for the DocuSign service. 489 This method deletes multiple contacts associated with an account. 490 This method makes a synchronous HTTP request by default. To make an 491 asynchronous HTTP request, please define a `callback` function 492 to be invoked when receiving the response. 493 >>> def callback_function(response): 494 >>> pprint(response) 495 >>> 496 >>> thread = api.delete_contacts(account_id, callback=callback_function) 497 498 :param callback function: The callback function 499 for asynchronous request. (optional) 500 :param str account_id: The external account number (int) or account ID Guid. (required) 501 :param ContactModRequest contact_mod_request: 502 :return: ContactUpdateResponse 503 If the method is called asynchronously, 504 returns the request thread. 505 """ 506 kwargs['_return_http_data_only'] = True 507 if kwargs.get('callback'): 508 return self.delete_contacts_with_http_info(account_id, **kwargs) 509 else: 510 (data) = self.delete_contacts_with_http_info(account_id, **kwargs) 511 return data 512 513 def delete_contacts_with_http_info(self, account_id, **kwargs): 514 """ 515 Delete contacts associated with an account for the DocuSign service. 516 This method deletes multiple contacts associated with an account. 517 This method makes a synchronous HTTP request by default. To make an 518 asynchronous HTTP request, please define a `callback` function 519 to be invoked when receiving the response. 520 >>> def callback_function(response): 521 >>> pprint(response) 522 >>> 523 >>> thread = api.delete_contacts_with_http_info(account_id, callback=callback_function) 524 525 :param callback function: The callback function 526 for asynchronous request. (optional) 527 :param str account_id: The external account number (int) or account ID Guid. (required) 528 :param ContactModRequest contact_mod_request: 529 :return: ContactUpdateResponse 530 If the method is called asynchronously, 531 returns the request thread. 532 """ 533 534 all_params = ['account_id', 'contact_mod_request'] 535 all_params.append('callback') 536 all_params.append('_return_http_data_only') 537 all_params.append('_preload_content') 538 all_params.append('_request_timeout') 539 540 params = locals() 541 for key, val in iteritems(params['kwargs']): 542 if key not in all_params: 543 raise TypeError( 544 "Got an unexpected keyword argument '%s'" 545 " to method delete_contacts" % key 546 ) 547 params[key] = val 548 del params['kwargs'] 549 # verify the required parameter 'account_id' is set 550 if ('account_id' not in params) or (params['account_id'] is None): 551 raise ValueError("Missing the required parameter `account_id` when calling `delete_contacts`") 552 553 554 collection_formats = {} 555 556 resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json') 557 path_params = {} 558 if 'account_id' in params: 559 path_params['accountId'] = params['account_id'] 560 561 query_params = {} 562 563 header_params = {} 564 565 form_params = [] 566 local_var_files = {} 567 568 body_params = None 569 if 'contact_mod_request' in params: 570 body_params = params['contact_mod_request'] 571 # HTTP header `Accept` 572 header_params['Accept'] = self.api_client.\ 573 select_header_accept(['application/json']) 574 575 # Authentication setting 576 auth_settings = [] 577 578 return self.api_client.call_api(resource_path, 'DELETE', 579 path_params, 580 query_params, 581 header_params, 582 body=body_params, 583 post_params=form_params, 584 files=local_var_files, 585 response_type='ContactUpdateResponse', 586 auth_settings=auth_settings, 587 callback=params.get('callback'), 588 _return_http_data_only=params.get('_return_http_data_only'), 589 _preload_content=params.get('_preload_content', True), 590 _request_timeout=params.get('_request_timeout'), 591 collection_formats=collection_formats) 592 593 def delete_custom_settings(self, account_id, user_id, **kwargs): 594 """ 595 Deletes custom user settings for a specified user. 596 Deletes the specified custom user settings for a single user. ###Deleting Grouped Custom User Settings### If the custom user settings you want to delete are grouped, you must include the following information in the header, after Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are deleted. 597 This method makes a synchronous HTTP request by default. To make an 598 asynchronous HTTP request, please define a `callback` function 599 to be invoked when receiving the response. 600 >>> def callback_function(response): 601 >>> pprint(response) 602 >>> 603 >>> thread = api.delete_custom_settings(account_id, user_id, callback=callback_function) 604 605 :param callback function: The callback function 606 for asynchronous request. (optional) 607 :param str account_id: The external account number (int) or account ID Guid. (required) 608 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 609 :param CustomSettingsInformation custom_settings_information: 610 :return: CustomSettingsInformation 611 If the method is called asynchronously, 612 returns the request thread. 613 """ 614 kwargs['_return_http_data_only'] = True 615 if kwargs.get('callback'): 616 return self.delete_custom_settings_with_http_info(account_id, user_id, **kwargs) 617 else: 618 (data) = self.delete_custom_settings_with_http_info(account_id, user_id, **kwargs) 619 return data 620 621 def delete_custom_settings_with_http_info(self, account_id, user_id, **kwargs): 622 """ 623 Deletes custom user settings for a specified user. 624 Deletes the specified custom user settings for a single user. ###Deleting Grouped Custom User Settings### If the custom user settings you want to delete are grouped, you must include the following information in the header, after Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are deleted. 625 This method makes a synchronous HTTP request by default. To make an 626 asynchronous HTTP request, please define a `callback` function 627 to be invoked when receiving the response. 628 >>> def callback_function(response): 629 >>> pprint(response) 630 >>> 631 >>> thread = api.delete_custom_settings_with_http_info(account_id, user_id, callback=callback_function) 632 633 :param callback function: The callback function 634 for asynchronous request. (optional) 635 :param str account_id: The external account number (int) or account ID Guid. (required) 636 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 637 :param CustomSettingsInformation custom_settings_information: 638 :return: CustomSettingsInformation 639 If the method is called asynchronously, 640 returns the request thread. 641 """ 642 643 all_params = ['account_id', 'user_id', 'custom_settings_information'] 644 all_params.append('callback') 645 all_params.append('_return_http_data_only') 646 all_params.append('_preload_content') 647 all_params.append('_request_timeout') 648 649 params = locals() 650 for key, val in iteritems(params['kwargs']): 651 if key not in all_params: 652 raise TypeError( 653 "Got an unexpected keyword argument '%s'" 654 " to method delete_custom_settings" % key 655 ) 656 params[key] = val 657 del params['kwargs'] 658 # verify the required parameter 'account_id' is set 659 if ('account_id' not in params) or (params['account_id'] is None): 660 raise ValueError("Missing the required parameter `account_id` when calling `delete_custom_settings`") 661 # verify the required parameter 'user_id' is set 662 if ('user_id' not in params) or (params['user_id'] is None): 663 raise ValueError("Missing the required parameter `user_id` when calling `delete_custom_settings`") 664 665 666 collection_formats = {} 667 668 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json') 669 path_params = {} 670 if 'account_id' in params: 671 path_params['accountId'] = params['account_id'] 672 if 'user_id' in params: 673 path_params['userId'] = params['user_id'] 674 675 query_params = {} 676 677 header_params = {} 678 679 form_params = [] 680 local_var_files = {} 681 682 body_params = None 683 if 'custom_settings_information' in params: 684 body_params = params['custom_settings_information'] 685 # HTTP header `Accept` 686 header_params['Accept'] = self.api_client.\ 687 select_header_accept(['application/json']) 688 689 # Authentication setting 690 auth_settings = [] 691 692 return self.api_client.call_api(resource_path, 'DELETE', 693 path_params, 694 query_params, 695 header_params, 696 body=body_params, 697 post_params=form_params, 698 files=local_var_files, 699 response_type='CustomSettingsInformation', 700 auth_settings=auth_settings, 701 callback=params.get('callback'), 702 _return_http_data_only=params.get('_return_http_data_only'), 703 _preload_content=params.get('_preload_content', True), 704 _request_timeout=params.get('_request_timeout'), 705 collection_formats=collection_formats) 706 707 def delete_profile_image(self, account_id, user_id, **kwargs): 708 """ 709 Deletes the user profile image for the specified user. 710 Deletes the user profile image from the specified user's profile. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. 711 This method makes a synchronous HTTP request by default. To make an 712 asynchronous HTTP request, please define a `callback` function 713 to be invoked when receiving the response. 714 >>> def callback_function(response): 715 >>> pprint(response) 716 >>> 717 >>> thread = api.delete_profile_image(account_id, user_id, callback=callback_function) 718 719 :param callback function: The callback function 720 for asynchronous request. (optional) 721 :param str account_id: The external account number (int) or account ID Guid. (required) 722 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 723 :return: None 724 If the method is called asynchronously, 725 returns the request thread. 726 """ 727 kwargs['_return_http_data_only'] = True 728 if kwargs.get('callback'): 729 return self.delete_profile_image_with_http_info(account_id, user_id, **kwargs) 730 else: 731 (data) = self.delete_profile_image_with_http_info(account_id, user_id, **kwargs) 732 return data 733 734 def delete_profile_image_with_http_info(self, account_id, user_id, **kwargs): 735 """ 736 Deletes the user profile image for the specified user. 737 Deletes the user profile image from the specified user's profile. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. 738 This method makes a synchronous HTTP request by default. To make an 739 asynchronous HTTP request, please define a `callback` function 740 to be invoked when receiving the response. 741 >>> def callback_function(response): 742 >>> pprint(response) 743 >>> 744 >>> thread = api.delete_profile_image_with_http_info(account_id, user_id, callback=callback_function) 745 746 :param callback function: The callback function 747 for asynchronous request. (optional) 748 :param str account_id: The external account number (int) or account ID Guid. (required) 749 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 750 :return: None 751 If the method is called asynchronously, 752 returns the request thread. 753 """ 754 755 all_params = ['account_id', 'user_id'] 756 all_params.append('callback') 757 all_params.append('_return_http_data_only') 758 all_params.append('_preload_content') 759 all_params.append('_request_timeout') 760 761 params = locals() 762 for key, val in iteritems(params['kwargs']): 763 if key not in all_params: 764 raise TypeError( 765 "Got an unexpected keyword argument '%s'" 766 " to method delete_profile_image" % key 767 ) 768 params[key] = val 769 del params['kwargs'] 770 # verify the required parameter 'account_id' is set 771 if ('account_id' not in params) or (params['account_id'] is None): 772 raise ValueError("Missing the required parameter `account_id` when calling `delete_profile_image`") 773 # verify the required parameter 'user_id' is set 774 if ('user_id' not in params) or (params['user_id'] is None): 775 raise ValueError("Missing the required parameter `user_id` when calling `delete_profile_image`") 776 777 778 collection_formats = {} 779 780 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json') 781 path_params = {} 782 if 'account_id' in params: 783 path_params['accountId'] = params['account_id'] 784 if 'user_id' in params: 785 path_params['userId'] = params['user_id'] 786 787 query_params = {} 788 789 header_params = {} 790 791 form_params = [] 792 local_var_files = {} 793 794 body_params = None 795 # HTTP header `Accept` 796 header_params['Accept'] = self.api_client.\ 797 select_header_accept(['application/json']) 798 799 # Authentication setting 800 auth_settings = [] 801 802 return self.api_client.call_api(resource_path, 'DELETE', 803 path_params, 804 query_params, 805 header_params, 806 body=body_params, 807 post_params=form_params, 808 files=local_var_files, 809 response_type=None, 810 auth_settings=auth_settings, 811 callback=params.get('callback'), 812 _return_http_data_only=params.get('_return_http_data_only'), 813 _preload_content=params.get('_preload_content', True), 814 _request_timeout=params.get('_request_timeout'), 815 collection_formats=collection_formats) 816 817 def delete_signature(self, account_id, signature_id, user_id, **kwargs): 818 """ 819 Removes removes signature information for the specified user. 820 Removes the signature information for the user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 821 This method makes a synchronous HTTP request by default. To make an 822 asynchronous HTTP request, please define a `callback` function 823 to be invoked when receiving the response. 824 >>> def callback_function(response): 825 >>> pprint(response) 826 >>> 827 >>> thread = api.delete_signature(account_id, signature_id, user_id, callback=callback_function) 828 829 :param callback function: The callback function 830 for asynchronous request. (optional) 831 :param str account_id: The external account number (int) or account ID Guid. (required) 832 :param str signature_id: The ID of the signature being accessed. (required) 833 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 834 :return: None 835 If the method is called asynchronously, 836 returns the request thread. 837 """ 838 kwargs['_return_http_data_only'] = True 839 if kwargs.get('callback'): 840 return self.delete_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 841 else: 842 (data) = self.delete_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 843 return data 844 845 def delete_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs): 846 """ 847 Removes removes signature information for the specified user. 848 Removes the signature information for the user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 849 This method makes a synchronous HTTP request by default. To make an 850 asynchronous HTTP request, please define a `callback` function 851 to be invoked when receiving the response. 852 >>> def callback_function(response): 853 >>> pprint(response) 854 >>> 855 >>> thread = api.delete_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function) 856 857 :param callback function: The callback function 858 for asynchronous request. (optional) 859 :param str account_id: The external account number (int) or account ID Guid. (required) 860 :param str signature_id: The ID of the signature being accessed. (required) 861 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 862 :return: None 863 If the method is called asynchronously, 864 returns the request thread. 865 """ 866 867 all_params = ['account_id', 'signature_id', 'user_id'] 868 all_params.append('callback') 869 all_params.append('_return_http_data_only') 870 all_params.append('_preload_content') 871 all_params.append('_request_timeout') 872 873 params = locals() 874 for key, val in iteritems(params['kwargs']): 875 if key not in all_params: 876 raise TypeError( 877 "Got an unexpected keyword argument '%s'" 878 " to method delete_signature" % key 879 ) 880 params[key] = val 881 del params['kwargs'] 882 # verify the required parameter 'account_id' is set 883 if ('account_id' not in params) or (params['account_id'] is None): 884 raise ValueError("Missing the required parameter `account_id` when calling `delete_signature`") 885 # verify the required parameter 'signature_id' is set 886 if ('signature_id' not in params) or (params['signature_id'] is None): 887 raise ValueError("Missing the required parameter `signature_id` when calling `delete_signature`") 888 # verify the required parameter 'user_id' is set 889 if ('user_id' not in params) or (params['user_id'] is None): 890 raise ValueError("Missing the required parameter `user_id` when calling `delete_signature`") 891 892 893 collection_formats = {} 894 895 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json') 896 path_params = {} 897 if 'account_id' in params: 898 path_params['accountId'] = params['account_id'] 899 if 'signature_id' in params: 900 path_params['signatureId'] = params['signature_id'] 901 if 'user_id' in params: 902 path_params['userId'] = params['user_id'] 903 904 query_params = {} 905 906 header_params = {} 907 908 form_params = [] 909 local_var_files = {} 910 911 body_params = None 912 # HTTP header `Accept` 913 header_params['Accept'] = self.api_client.\ 914 select_header_accept(['application/json']) 915 916 # Authentication setting 917 auth_settings = [] 918 919 return self.api_client.call_api(resource_path, 'DELETE', 920 path_params, 921 query_params, 922 header_params, 923 body=body_params, 924 post_params=form_params, 925 files=local_var_files, 926 response_type=None, 927 auth_settings=auth_settings, 928 callback=params.get('callback'), 929 _return_http_data_only=params.get('_return_http_data_only'), 930 _preload_content=params.get('_preload_content', True), 931 _request_timeout=params.get('_request_timeout'), 932 collection_formats=collection_formats) 933 934 def delete_signature_image(self, account_id, image_type, signature_id, user_id, **kwargs): 935 """ 936 Deletes the user initials image or the user signature image for the specified user. 937 Deletes the specified initials image or signature image for the specified user. The function deletes one or the other of the image types, to delete both the initials image and signature image you must call the endpoint twice. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 938 This method makes a synchronous HTTP request by default. To make an 939 asynchronous HTTP request, please define a `callback` function 940 to be invoked when receiving the response. 941 >>> def callback_function(response): 942 >>> pprint(response) 943 >>> 944 >>> thread = api.delete_signature_image(account_id, image_type, signature_id, user_id, callback=callback_function) 945 946 :param callback function: The callback function 947 for asynchronous request. (optional) 948 :param str account_id: The external account number (int) or account ID Guid. (required) 949 :param str image_type: One of **signature_image** or **initials_image**. (required) 950 :param str signature_id: The ID of the signature being accessed. (required) 951 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 952 :return: UserSignature 953 If the method is called asynchronously, 954 returns the request thread. 955 """ 956 kwargs['_return_http_data_only'] = True 957 if kwargs.get('callback'): 958 return self.delete_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs) 959 else: 960 (data) = self.delete_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs) 961 return data 962 963 def delete_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, **kwargs): 964 """ 965 Deletes the user initials image or the user signature image for the specified user. 966 Deletes the specified initials image or signature image for the specified user. The function deletes one or the other of the image types, to delete both the initials image and signature image you must call the endpoint twice. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 967 This method makes a synchronous HTTP request by default. To make an 968 asynchronous HTTP request, please define a `callback` function 969 to be invoked when receiving the response. 970 >>> def callback_function(response): 971 >>> pprint(response) 972 >>> 973 >>> thread = api.delete_signature_image_with_http_info(account_id, image_type, signature_id, user_id, callback=callback_function) 974 975 :param callback function: The callback function 976 for asynchronous request. (optional) 977 :param str account_id: The external account number (int) or account ID Guid. (required) 978 :param str image_type: One of **signature_image** or **initials_image**. (required) 979 :param str signature_id: The ID of the signature being accessed. (required) 980 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 981 :return: UserSignature 982 If the method is called asynchronously, 983 returns the request thread. 984 """ 985 986 all_params = ['account_id', 'image_type', 'signature_id', 'user_id'] 987 all_params.append('callback') 988 all_params.append('_return_http_data_only') 989 all_params.append('_preload_content') 990 all_params.append('_request_timeout') 991 992 params = locals() 993 for key, val in iteritems(params['kwargs']): 994 if key not in all_params: 995 raise TypeError( 996 "Got an unexpected keyword argument '%s'" 997 " to method delete_signature_image" % key 998 ) 999 params[key] = val 1000 del params['kwargs'] 1001 # verify the required parameter 'account_id' is set 1002 if ('account_id' not in params) or (params['account_id'] is None): 1003 raise ValueError("Missing the required parameter `account_id` when calling `delete_signature_image`") 1004 # verify the required parameter 'image_type' is set 1005 if ('image_type' not in params) or (params['image_type'] is None): 1006 raise ValueError("Missing the required parameter `image_type` when calling `delete_signature_image`") 1007 # verify the required parameter 'signature_id' is set 1008 if ('signature_id' not in params) or (params['signature_id'] is None): 1009 raise ValueError("Missing the required parameter `signature_id` when calling `delete_signature_image`") 1010 # verify the required parameter 'user_id' is set 1011 if ('user_id' not in params) or (params['user_id'] is None): 1012 raise ValueError("Missing the required parameter `user_id` when calling `delete_signature_image`") 1013 1014 1015 collection_formats = {} 1016 1017 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json') 1018 path_params = {} 1019 if 'account_id' in params: 1020 path_params['accountId'] = params['account_id'] 1021 if 'image_type' in params: 1022 path_params['imageType'] = params['image_type'] 1023 if 'signature_id' in params: 1024 path_params['signatureId'] = params['signature_id'] 1025 if 'user_id' in params: 1026 path_params['userId'] = params['user_id'] 1027 1028 query_params = {} 1029 1030 header_params = {} 1031 1032 form_params = [] 1033 local_var_files = {} 1034 1035 body_params = None 1036 # HTTP header `Accept` 1037 header_params['Accept'] = self.api_client.\ 1038 select_header_accept(['application/json']) 1039 1040 # Authentication setting 1041 auth_settings = [] 1042 1043 return self.api_client.call_api(resource_path, 'DELETE', 1044 path_params, 1045 query_params, 1046 header_params, 1047 body=body_params, 1048 post_params=form_params, 1049 files=local_var_files, 1050 response_type='UserSignature', 1051 auth_settings=auth_settings, 1052 callback=params.get('callback'), 1053 _return_http_data_only=params.get('_return_http_data_only'), 1054 _preload_content=params.get('_preload_content', True), 1055 _request_timeout=params.get('_request_timeout'), 1056 collection_formats=collection_formats) 1057 1058 def get_contact_by_id(self, account_id, contact_id, **kwargs): 1059 """ 1060 Gets a particular contact associated with the user's account. 1061 This method returns one or more contacts associated with a DocuSign account. You can also retrieve contacts from connected [cloud storage][CloudStorage] providers by using the `cloud_provider` query parameter. By default, contacts are retrieved from the DocuSign account's default address book. To return a specific contact, use the `contactId` query parameter. To return all contacts associated with an account, omit this parameter. [CloudStorage]: /docs/esign-rest-api/reference/cloudstorage/ 1062 This method makes a synchronous HTTP request by default. To make an 1063 asynchronous HTTP request, please define a `callback` function 1064 to be invoked when receiving the response. 1065 >>> def callback_function(response): 1066 >>> pprint(response) 1067 >>> 1068 >>> thread = api.get_contact_by_id(account_id, contact_id, callback=callback_function) 1069 1070 :param callback function: The callback function 1071 for asynchronous request. (optional) 1072 :param str account_id: The external account number (int) or account ID Guid. (required) 1073 :param str contact_id: The unique identifier of a person in the contacts address book. (required) 1074 :param str cloud_provider: 1075 :return: ContactGetResponse 1076 If the method is called asynchronously, 1077 returns the request thread. 1078 """ 1079 kwargs['_return_http_data_only'] = True 1080 if kwargs.get('callback'): 1081 return self.get_contact_by_id_with_http_info(account_id, contact_id, **kwargs) 1082 else: 1083 (data) = self.get_contact_by_id_with_http_info(account_id, contact_id, **kwargs) 1084 return data 1085 1086 def get_contact_by_id_with_http_info(self, account_id, contact_id, **kwargs): 1087 """ 1088 Gets a particular contact associated with the user's account. 1089 This method returns one or more contacts associated with a DocuSign account. You can also retrieve contacts from connected [cloud storage][CloudStorage] providers by using the `cloud_provider` query parameter. By default, contacts are retrieved from the DocuSign account's default address book. To return a specific contact, use the `contactId` query parameter. To return all contacts associated with an account, omit this parameter. [CloudStorage]: /docs/esign-rest-api/reference/cloudstorage/ 1090 This method makes a synchronous HTTP request by default. To make an 1091 asynchronous HTTP request, please define a `callback` function 1092 to be invoked when receiving the response. 1093 >>> def callback_function(response): 1094 >>> pprint(response) 1095 >>> 1096 >>> thread = api.get_contact_by_id_with_http_info(account_id, contact_id, callback=callback_function) 1097 1098 :param callback function: The callback function 1099 for asynchronous request. (optional) 1100 :param str account_id: The external account number (int) or account ID Guid. (required) 1101 :param str contact_id: The unique identifier of a person in the contacts address book. (required) 1102 :param str cloud_provider: 1103 :return: ContactGetResponse 1104 If the method is called asynchronously, 1105 returns the request thread. 1106 """ 1107 1108 all_params = ['account_id', 'contact_id', 'cloud_provider'] 1109 all_params.append('callback') 1110 all_params.append('_return_http_data_only') 1111 all_params.append('_preload_content') 1112 all_params.append('_request_timeout') 1113 1114 params = locals() 1115 for key, val in iteritems(params['kwargs']): 1116 if key not in all_params: 1117 raise TypeError( 1118 "Got an unexpected keyword argument '%s'" 1119 " to method get_contact_by_id" % key 1120 ) 1121 params[key] = val 1122 del params['kwargs'] 1123 # verify the required parameter 'account_id' is set 1124 if ('account_id' not in params) or (params['account_id'] is None): 1125 raise ValueError("Missing the required parameter `account_id` when calling `get_contact_by_id`") 1126 # verify the required parameter 'contact_id' is set 1127 if ('contact_id' not in params) or (params['contact_id'] is None): 1128 raise ValueError("Missing the required parameter `contact_id` when calling `get_contact_by_id`") 1129 1130 1131 collection_formats = {} 1132 1133 resource_path = '/v2.1/accounts/{accountId}/contacts/{contactId}'.replace('{format}', 'json') 1134 path_params = {} 1135 if 'account_id' in params: 1136 path_params['accountId'] = params['account_id'] 1137 if 'contact_id' in params: 1138 path_params['contactId'] = params['contact_id'] 1139 1140 query_params = {} 1141 if 'cloud_provider' in params: 1142 query_params['cloud_provider'] = params['cloud_provider'] 1143 1144 header_params = {} 1145 1146 form_params = [] 1147 local_var_files = {} 1148 1149 body_params = None 1150 # HTTP header `Accept` 1151 header_params['Accept'] = self.api_client.\ 1152 select_header_accept(['application/json']) 1153 1154 # Authentication setting 1155 auth_settings = [] 1156 1157 return self.api_client.call_api(resource_path, 'GET', 1158 path_params, 1159 query_params, 1160 header_params, 1161 body=body_params, 1162 post_params=form_params, 1163 files=local_var_files, 1164 response_type='ContactGetResponse', 1165 auth_settings=auth_settings, 1166 callback=params.get('callback'), 1167 _return_http_data_only=params.get('_return_http_data_only'), 1168 _preload_content=params.get('_preload_content', True), 1169 _request_timeout=params.get('_request_timeout'), 1170 collection_formats=collection_formats) 1171 1172 def get_information(self, account_id, user_id, **kwargs): 1173 """ 1174 Gets the user information for a specified user. 1175 Retrieves the user information for the specified user. To return additional user information that details the last login date, login status, and the user's password expiration date, set the optional `additional_info` query string parameter to **true**. 1176 This method makes a synchronous HTTP request by default. To make an 1177 asynchronous HTTP request, please define a `callback` function 1178 to be invoked when receiving the response. 1179 >>> def callback_function(response): 1180 >>> pprint(response) 1181 >>> 1182 >>> thread = api.get_information(account_id, user_id, callback=callback_function) 1183 1184 :param callback function: The callback function 1185 for asynchronous request. (optional) 1186 :param str account_id: The external account number (int) or account ID Guid. (required) 1187 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1188 :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account. 1189 :param str email: 1190 :param str include_license: 1191 :return: UserInformation 1192 If the method is called asynchronously, 1193 returns the request thread. 1194 """ 1195 kwargs['_return_http_data_only'] = True 1196 if kwargs.get('callback'): 1197 return self.get_information_with_http_info(account_id, user_id, **kwargs) 1198 else: 1199 (data) = self.get_information_with_http_info(account_id, user_id, **kwargs) 1200 return data 1201 1202 def get_information_with_http_info(self, account_id, user_id, **kwargs): 1203 """ 1204 Gets the user information for a specified user. 1205 Retrieves the user information for the specified user. To return additional user information that details the last login date, login status, and the user's password expiration date, set the optional `additional_info` query string parameter to **true**. 1206 This method makes a synchronous HTTP request by default. To make an 1207 asynchronous HTTP request, please define a `callback` function 1208 to be invoked when receiving the response. 1209 >>> def callback_function(response): 1210 >>> pprint(response) 1211 >>> 1212 >>> thread = api.get_information_with_http_info(account_id, user_id, callback=callback_function) 1213 1214 :param callback function: The callback function 1215 for asynchronous request. (optional) 1216 :param str account_id: The external account number (int) or account ID Guid. (required) 1217 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1218 :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account. 1219 :param str email: 1220 :param str include_license: 1221 :return: UserInformation 1222 If the method is called asynchronously, 1223 returns the request thread. 1224 """ 1225 1226 all_params = ['account_id', 'user_id', 'additional_info', 'email', 'include_license'] 1227 all_params.append('callback') 1228 all_params.append('_return_http_data_only') 1229 all_params.append('_preload_content') 1230 all_params.append('_request_timeout') 1231 1232 params = locals() 1233 for key, val in iteritems(params['kwargs']): 1234 if key not in all_params: 1235 raise TypeError( 1236 "Got an unexpected keyword argument '%s'" 1237 " to method get_information" % key 1238 ) 1239 params[key] = val 1240 del params['kwargs'] 1241 # verify the required parameter 'account_id' is set 1242 if ('account_id' not in params) or (params['account_id'] is None): 1243 raise ValueError("Missing the required parameter `account_id` when calling `get_information`") 1244 # verify the required parameter 'user_id' is set 1245 if ('user_id' not in params) or (params['user_id'] is None): 1246 raise ValueError("Missing the required parameter `user_id` when calling `get_information`") 1247 1248 1249 collection_formats = {} 1250 1251 resource_path = '/v2.1/accounts/{accountId}/users/{userId}'.replace('{format}', 'json') 1252 path_params = {} 1253 if 'account_id' in params: 1254 path_params['accountId'] = params['account_id'] 1255 if 'user_id' in params: 1256 path_params['userId'] = params['user_id'] 1257 1258 query_params = {} 1259 if 'additional_info' in params: 1260 query_params['additional_info'] = params['additional_info'] 1261 if 'email' in params: 1262 query_params['email'] = params['email'] 1263 if 'include_license' in params: 1264 query_params['include_license'] = params['include_license'] 1265 1266 header_params = {} 1267 1268 form_params = [] 1269 local_var_files = {} 1270 1271 body_params = None 1272 # HTTP header `Accept` 1273 header_params['Accept'] = self.api_client.\ 1274 select_header_accept(['application/json']) 1275 1276 # Authentication setting 1277 auth_settings = [] 1278 1279 return self.api_client.call_api(resource_path, 'GET', 1280 path_params, 1281 query_params, 1282 header_params, 1283 body=body_params, 1284 post_params=form_params, 1285 files=local_var_files, 1286 response_type='UserInformation', 1287 auth_settings=auth_settings, 1288 callback=params.get('callback'), 1289 _return_http_data_only=params.get('_return_http_data_only'), 1290 _preload_content=params.get('_preload_content', True), 1291 _request_timeout=params.get('_request_timeout'), 1292 collection_formats=collection_formats) 1293 1294 def get_profile(self, account_id, user_id, **kwargs): 1295 """ 1296 Retrieves the user profile for a specified user. 1297 Retrieves the user profile information, the privacy settings and personal information (address, phone number, etc.) for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. 1298 This method makes a synchronous HTTP request by default. To make an 1299 asynchronous HTTP request, please define a `callback` function 1300 to be invoked when receiving the response. 1301 >>> def callback_function(response): 1302 >>> pprint(response) 1303 >>> 1304 >>> thread = api.get_profile(account_id, user_id, callback=callback_function) 1305 1306 :param callback function: The callback function 1307 for asynchronous request. (optional) 1308 :param str account_id: The external account number (int) or account ID Guid. (required) 1309 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1310 :return: UserProfile 1311 If the method is called asynchronously, 1312 returns the request thread. 1313 """ 1314 kwargs['_return_http_data_only'] = True 1315 if kwargs.get('callback'): 1316 return self.get_profile_with_http_info(account_id, user_id, **kwargs) 1317 else: 1318 (data) = self.get_profile_with_http_info(account_id, user_id, **kwargs) 1319 return data 1320 1321 def get_profile_with_http_info(self, account_id, user_id, **kwargs): 1322 """ 1323 Retrieves the user profile for a specified user. 1324 Retrieves the user profile information, the privacy settings and personal information (address, phone number, etc.) for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. 1325 This method makes a synchronous HTTP request by default. To make an 1326 asynchronous HTTP request, please define a `callback` function 1327 to be invoked when receiving the response. 1328 >>> def callback_function(response): 1329 >>> pprint(response) 1330 >>> 1331 >>> thread = api.get_profile_with_http_info(account_id, user_id, callback=callback_function) 1332 1333 :param callback function: The callback function 1334 for asynchronous request. (optional) 1335 :param str account_id: The external account number (int) or account ID Guid. (required) 1336 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1337 :return: UserProfile 1338 If the method is called asynchronously, 1339 returns the request thread. 1340 """ 1341 1342 all_params = ['account_id', 'user_id'] 1343 all_params.append('callback') 1344 all_params.append('_return_http_data_only') 1345 all_params.append('_preload_content') 1346 all_params.append('_request_timeout') 1347 1348 params = locals() 1349 for key, val in iteritems(params['kwargs']): 1350 if key not in all_params: 1351 raise TypeError( 1352 "Got an unexpected keyword argument '%s'" 1353 " to method get_profile" % key 1354 ) 1355 params[key] = val 1356 del params['kwargs'] 1357 # verify the required parameter 'account_id' is set 1358 if ('account_id' not in params) or (params['account_id'] is None): 1359 raise ValueError("Missing the required parameter `account_id` when calling `get_profile`") 1360 # verify the required parameter 'user_id' is set 1361 if ('user_id' not in params) or (params['user_id'] is None): 1362 raise ValueError("Missing the required parameter `user_id` when calling `get_profile`") 1363 1364 1365 collection_formats = {} 1366 1367 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile'.replace('{format}', 'json') 1368 path_params = {} 1369 if 'account_id' in params: 1370 path_params['accountId'] = params['account_id'] 1371 if 'user_id' in params: 1372 path_params['userId'] = params['user_id'] 1373 1374 query_params = {} 1375 1376 header_params = {} 1377 1378 form_params = [] 1379 local_var_files = {} 1380 1381 body_params = None 1382 # HTTP header `Accept` 1383 header_params['Accept'] = self.api_client.\ 1384 select_header_accept(['application/json']) 1385 1386 # Authentication setting 1387 auth_settings = [] 1388 1389 return self.api_client.call_api(resource_path, 'GET', 1390 path_params, 1391 query_params, 1392 header_params, 1393 body=body_params, 1394 post_params=form_params, 1395 files=local_var_files, 1396 response_type='UserProfile', 1397 auth_settings=auth_settings, 1398 callback=params.get('callback'), 1399 _return_http_data_only=params.get('_return_http_data_only'), 1400 _preload_content=params.get('_preload_content', True), 1401 _request_timeout=params.get('_request_timeout'), 1402 collection_formats=collection_formats) 1403 1404 def get_profile_image(self, account_id, user_id, **kwargs): 1405 """ 1406 Retrieves the user profile image for the specified user. 1407 Retrieves the user profile picture for the specified user. The image is returned in the same format as uploaded. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. If successful, the response returns a 200 - OK and the user profile image. 1408 This method makes a synchronous HTTP request by default. To make an 1409 asynchronous HTTP request, please define a `callback` function 1410 to be invoked when receiving the response. 1411 >>> def callback_function(response): 1412 >>> pprint(response) 1413 >>> 1414 >>> thread = api.get_profile_image(account_id, user_id, callback=callback_function) 1415 1416 :param callback function: The callback function 1417 for asynchronous request. (optional) 1418 :param str account_id: The external account number (int) or account ID Guid. (required) 1419 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1420 :param str encoding: 1421 :return: file 1422 If the method is called asynchronously, 1423 returns the request thread. 1424 """ 1425 kwargs['_return_http_data_only'] = True 1426 if kwargs.get('callback'): 1427 return self.get_profile_image_with_http_info(account_id, user_id, **kwargs) 1428 else: 1429 (data) = self.get_profile_image_with_http_info(account_id, user_id, **kwargs) 1430 return data 1431 1432 def get_profile_image_with_http_info(self, account_id, user_id, **kwargs): 1433 """ 1434 Retrieves the user profile image for the specified user. 1435 Retrieves the user profile picture for the specified user. The image is returned in the same format as uploaded. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. If successful, the response returns a 200 - OK and the user profile image. 1436 This method makes a synchronous HTTP request by default. To make an 1437 asynchronous HTTP request, please define a `callback` function 1438 to be invoked when receiving the response. 1439 >>> def callback_function(response): 1440 >>> pprint(response) 1441 >>> 1442 >>> thread = api.get_profile_image_with_http_info(account_id, user_id, callback=callback_function) 1443 1444 :param callback function: The callback function 1445 for asynchronous request. (optional) 1446 :param str account_id: The external account number (int) or account ID Guid. (required) 1447 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1448 :param str encoding: 1449 :return: file 1450 If the method is called asynchronously, 1451 returns the request thread. 1452 """ 1453 1454 all_params = ['account_id', 'user_id', 'encoding'] 1455 all_params.append('callback') 1456 all_params.append('_return_http_data_only') 1457 all_params.append('_preload_content') 1458 all_params.append('_request_timeout') 1459 1460 params = locals() 1461 for key, val in iteritems(params['kwargs']): 1462 if key not in all_params: 1463 raise TypeError( 1464 "Got an unexpected keyword argument '%s'" 1465 " to method get_profile_image" % key 1466 ) 1467 params[key] = val 1468 del params['kwargs'] 1469 # verify the required parameter 'account_id' is set 1470 if ('account_id' not in params) or (params['account_id'] is None): 1471 raise ValueError("Missing the required parameter `account_id` when calling `get_profile_image`") 1472 # verify the required parameter 'user_id' is set 1473 if ('user_id' not in params) or (params['user_id'] is None): 1474 raise ValueError("Missing the required parameter `user_id` when calling `get_profile_image`") 1475 1476 1477 collection_formats = {} 1478 1479 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json') 1480 path_params = {} 1481 if 'account_id' in params: 1482 path_params['accountId'] = params['account_id'] 1483 if 'user_id' in params: 1484 path_params['userId'] = params['user_id'] 1485 1486 query_params = {} 1487 if 'encoding' in params: 1488 query_params['encoding'] = params['encoding'] 1489 1490 header_params = {} 1491 1492 form_params = [] 1493 local_var_files = {} 1494 1495 body_params = None 1496 # HTTP header `Accept` 1497 header_params['Accept'] = self.api_client.\ 1498 select_header_accept(['image/gif']) 1499 1500 # Authentication setting 1501 auth_settings = [] 1502 1503 return self.api_client.call_api(resource_path, 'GET', 1504 path_params, 1505 query_params, 1506 header_params, 1507 body=body_params, 1508 post_params=form_params, 1509 files=local_var_files, 1510 response_type='file', 1511 auth_settings=auth_settings, 1512 callback=params.get('callback'), 1513 _return_http_data_only=params.get('_return_http_data_only'), 1514 _preload_content=params.get('_preload_content', True), 1515 _request_timeout=params.get('_request_timeout'), 1516 collection_formats=collection_formats) 1517 1518 def get_settings(self, account_id, user_id, **kwargs): 1519 """ 1520 Gets the user account settings for a specified user. 1521 Retrieves a list of the account settings and email notification information for the specified user. The response returns the account setting name/value information and the email notification settings for the specified user. For more information about the different user settings, see the [ML:userSettings list]. 1522 This method makes a synchronous HTTP request by default. To make an 1523 asynchronous HTTP request, please define a `callback` function 1524 to be invoked when receiving the response. 1525 >>> def callback_function(response): 1526 >>> pprint(response) 1527 >>> 1528 >>> thread = api.get_settings(account_id, user_id, callback=callback_function) 1529 1530 :param callback function: The callback function 1531 for asynchronous request. (optional) 1532 :param str account_id: The external account number (int) or account ID Guid. (required) 1533 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1534 :return: UserSettingsInformation 1535 If the method is called asynchronously, 1536 returns the request thread. 1537 """ 1538 kwargs['_return_http_data_only'] = True 1539 if kwargs.get('callback'): 1540 return self.get_settings_with_http_info(account_id, user_id, **kwargs) 1541 else: 1542 (data) = self.get_settings_with_http_info(account_id, user_id, **kwargs) 1543 return data 1544 1545 def get_settings_with_http_info(self, account_id, user_id, **kwargs): 1546 """ 1547 Gets the user account settings for a specified user. 1548 Retrieves a list of the account settings and email notification information for the specified user. The response returns the account setting name/value information and the email notification settings for the specified user. For more information about the different user settings, see the [ML:userSettings list]. 1549 This method makes a synchronous HTTP request by default. To make an 1550 asynchronous HTTP request, please define a `callback` function 1551 to be invoked when receiving the response. 1552 >>> def callback_function(response): 1553 >>> pprint(response) 1554 >>> 1555 >>> thread = api.get_settings_with_http_info(account_id, user_id, callback=callback_function) 1556 1557 :param callback function: The callback function 1558 for asynchronous request. (optional) 1559 :param str account_id: The external account number (int) or account ID Guid. (required) 1560 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1561 :return: UserSettingsInformation 1562 If the method is called asynchronously, 1563 returns the request thread. 1564 """ 1565 1566 all_params = ['account_id', 'user_id'] 1567 all_params.append('callback') 1568 all_params.append('_return_http_data_only') 1569 all_params.append('_preload_content') 1570 all_params.append('_request_timeout') 1571 1572 params = locals() 1573 for key, val in iteritems(params['kwargs']): 1574 if key not in all_params: 1575 raise TypeError( 1576 "Got an unexpected keyword argument '%s'" 1577 " to method get_settings" % key 1578 ) 1579 params[key] = val 1580 del params['kwargs'] 1581 # verify the required parameter 'account_id' is set 1582 if ('account_id' not in params) or (params['account_id'] is None): 1583 raise ValueError("Missing the required parameter `account_id` when calling `get_settings`") 1584 # verify the required parameter 'user_id' is set 1585 if ('user_id' not in params) or (params['user_id'] is None): 1586 raise ValueError("Missing the required parameter `user_id` when calling `get_settings`") 1587 1588 1589 collection_formats = {} 1590 1591 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/settings'.replace('{format}', 'json') 1592 path_params = {} 1593 if 'account_id' in params: 1594 path_params['accountId'] = params['account_id'] 1595 if 'user_id' in params: 1596 path_params['userId'] = params['user_id'] 1597 1598 query_params = {} 1599 1600 header_params = {} 1601 1602 form_params = [] 1603 local_var_files = {} 1604 1605 body_params = None 1606 # HTTP header `Accept` 1607 header_params['Accept'] = self.api_client.\ 1608 select_header_accept(['application/json']) 1609 1610 # Authentication setting 1611 auth_settings = [] 1612 1613 return self.api_client.call_api(resource_path, 'GET', 1614 path_params, 1615 query_params, 1616 header_params, 1617 body=body_params, 1618 post_params=form_params, 1619 files=local_var_files, 1620 response_type='UserSettingsInformation', 1621 auth_settings=auth_settings, 1622 callback=params.get('callback'), 1623 _return_http_data_only=params.get('_return_http_data_only'), 1624 _preload_content=params.get('_preload_content', True), 1625 _request_timeout=params.get('_request_timeout'), 1626 collection_formats=collection_formats) 1627 1628 def get_signature(self, account_id, signature_id, user_id, **kwargs): 1629 """ 1630 Gets the user signature information for the specified user. 1631 Retrieves the structure of a single signature with a known signature name. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 1632 This method makes a synchronous HTTP request by default. To make an 1633 asynchronous HTTP request, please define a `callback` function 1634 to be invoked when receiving the response. 1635 >>> def callback_function(response): 1636 >>> pprint(response) 1637 >>> 1638 >>> thread = api.get_signature(account_id, signature_id, user_id, callback=callback_function) 1639 1640 :param callback function: The callback function 1641 for asynchronous request. (optional) 1642 :param str account_id: The external account number (int) or account ID Guid. (required) 1643 :param str signature_id: The ID of the signature being accessed. (required) 1644 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1645 :return: UserSignature 1646 If the method is called asynchronously, 1647 returns the request thread. 1648 """ 1649 kwargs['_return_http_data_only'] = True 1650 if kwargs.get('callback'): 1651 return self.get_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 1652 else: 1653 (data) = self.get_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 1654 return data 1655 1656 def get_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs): 1657 """ 1658 Gets the user signature information for the specified user. 1659 Retrieves the structure of a single signature with a known signature name. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 1660 This method makes a synchronous HTTP request by default. To make an 1661 asynchronous HTTP request, please define a `callback` function 1662 to be invoked when receiving the response. 1663 >>> def callback_function(response): 1664 >>> pprint(response) 1665 >>> 1666 >>> thread = api.get_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function) 1667 1668 :param callback function: The callback function 1669 for asynchronous request. (optional) 1670 :param str account_id: The external account number (int) or account ID Guid. (required) 1671 :param str signature_id: The ID of the signature being accessed. (required) 1672 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1673 :return: UserSignature 1674 If the method is called asynchronously, 1675 returns the request thread. 1676 """ 1677 1678 all_params = ['account_id', 'signature_id', 'user_id'] 1679 all_params.append('callback') 1680 all_params.append('_return_http_data_only') 1681 all_params.append('_preload_content') 1682 all_params.append('_request_timeout') 1683 1684 params = locals() 1685 for key, val in iteritems(params['kwargs']): 1686 if key not in all_params: 1687 raise TypeError( 1688 "Got an unexpected keyword argument '%s'" 1689 " to method get_signature" % key 1690 ) 1691 params[key] = val 1692 del params['kwargs'] 1693 # verify the required parameter 'account_id' is set 1694 if ('account_id' not in params) or (params['account_id'] is None): 1695 raise ValueError("Missing the required parameter `account_id` when calling `get_signature`") 1696 # verify the required parameter 'signature_id' is set 1697 if ('signature_id' not in params) or (params['signature_id'] is None): 1698 raise ValueError("Missing the required parameter `signature_id` when calling `get_signature`") 1699 # verify the required parameter 'user_id' is set 1700 if ('user_id' not in params) or (params['user_id'] is None): 1701 raise ValueError("Missing the required parameter `user_id` when calling `get_signature`") 1702 1703 1704 collection_formats = {} 1705 1706 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json') 1707 path_params = {} 1708 if 'account_id' in params: 1709 path_params['accountId'] = params['account_id'] 1710 if 'signature_id' in params: 1711 path_params['signatureId'] = params['signature_id'] 1712 if 'user_id' in params: 1713 path_params['userId'] = params['user_id'] 1714 1715 query_params = {} 1716 1717 header_params = {} 1718 1719 form_params = [] 1720 local_var_files = {} 1721 1722 body_params = None 1723 # HTTP header `Accept` 1724 header_params['Accept'] = self.api_client.\ 1725 select_header_accept(['application/json']) 1726 1727 # Authentication setting 1728 auth_settings = [] 1729 1730 return self.api_client.call_api(resource_path, 'GET', 1731 path_params, 1732 query_params, 1733 header_params, 1734 body=body_params, 1735 post_params=form_params, 1736 files=local_var_files, 1737 response_type='UserSignature', 1738 auth_settings=auth_settings, 1739 callback=params.get('callback'), 1740 _return_http_data_only=params.get('_return_http_data_only'), 1741 _preload_content=params.get('_preload_content', True), 1742 _request_timeout=params.get('_request_timeout'), 1743 collection_formats=collection_formats) 1744 1745 def get_signature_image(self, account_id, image_type, signature_id, user_id, **kwargs): 1746 """ 1747 Retrieves the user initials image or the user signature image for the specified user. 1748 Retrieves the specified initials image or signature image for the specified user. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". ###### Note: Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. 1749 This method makes a synchronous HTTP request by default. To make an 1750 asynchronous HTTP request, please define a `callback` function 1751 to be invoked when receiving the response. 1752 >>> def callback_function(response): 1753 >>> pprint(response) 1754 >>> 1755 >>> thread = api.get_signature_image(account_id, image_type, signature_id, user_id, callback=callback_function) 1756 1757 :param callback function: The callback function 1758 for asynchronous request. (optional) 1759 :param str account_id: The external account number (int) or account ID Guid. (required) 1760 :param str image_type: One of **signature_image** or **initials_image**. (required) 1761 :param str signature_id: The ID of the signature being accessed. (required) 1762 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1763 :param str include_chrome: 1764 :return: file 1765 If the method is called asynchronously, 1766 returns the request thread. 1767 """ 1768 kwargs['_return_http_data_only'] = True 1769 if kwargs.get('callback'): 1770 return self.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs) 1771 else: 1772 (data) = self.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs) 1773 return data 1774 1775 def get_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, **kwargs): 1776 """ 1777 Retrieves the user initials image or the user signature image for the specified user. 1778 Retrieves the specified initials image or signature image for the specified user. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". ###### Note: Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. 1779 This method makes a synchronous HTTP request by default. To make an 1780 asynchronous HTTP request, please define a `callback` function 1781 to be invoked when receiving the response. 1782 >>> def callback_function(response): 1783 >>> pprint(response) 1784 >>> 1785 >>> thread = api.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, callback=callback_function) 1786 1787 :param callback function: The callback function 1788 for asynchronous request. (optional) 1789 :param str account_id: The external account number (int) or account ID Guid. (required) 1790 :param str image_type: One of **signature_image** or **initials_image**. (required) 1791 :param str signature_id: The ID of the signature being accessed. (required) 1792 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1793 :param str include_chrome: 1794 :return: file 1795 If the method is called asynchronously, 1796 returns the request thread. 1797 """ 1798 1799 all_params = ['account_id', 'image_type', 'signature_id', 'user_id', 'include_chrome'] 1800 all_params.append('callback') 1801 all_params.append('_return_http_data_only') 1802 all_params.append('_preload_content') 1803 all_params.append('_request_timeout') 1804 1805 params = locals() 1806 for key, val in iteritems(params['kwargs']): 1807 if key not in all_params: 1808 raise TypeError( 1809 "Got an unexpected keyword argument '%s'" 1810 " to method get_signature_image" % key 1811 ) 1812 params[key] = val 1813 del params['kwargs'] 1814 # verify the required parameter 'account_id' is set 1815 if ('account_id' not in params) or (params['account_id'] is None): 1816 raise ValueError("Missing the required parameter `account_id` when calling `get_signature_image`") 1817 # verify the required parameter 'image_type' is set 1818 if ('image_type' not in params) or (params['image_type'] is None): 1819 raise ValueError("Missing the required parameter `image_type` when calling `get_signature_image`") 1820 # verify the required parameter 'signature_id' is set 1821 if ('signature_id' not in params) or (params['signature_id'] is None): 1822 raise ValueError("Missing the required parameter `signature_id` when calling `get_signature_image`") 1823 # verify the required parameter 'user_id' is set 1824 if ('user_id' not in params) or (params['user_id'] is None): 1825 raise ValueError("Missing the required parameter `user_id` when calling `get_signature_image`") 1826 1827 1828 collection_formats = {} 1829 1830 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json') 1831 path_params = {} 1832 if 'account_id' in params: 1833 path_params['accountId'] = params['account_id'] 1834 if 'image_type' in params: 1835 path_params['imageType'] = params['image_type'] 1836 if 'signature_id' in params: 1837 path_params['signatureId'] = params['signature_id'] 1838 if 'user_id' in params: 1839 path_params['userId'] = params['user_id'] 1840 1841 query_params = {} 1842 if 'include_chrome' in params: 1843 query_params['include_chrome'] = params['include_chrome'] 1844 1845 header_params = {} 1846 1847 form_params = [] 1848 local_var_files = {} 1849 1850 body_params = None 1851 # HTTP header `Accept` 1852 header_params['Accept'] = self.api_client.\ 1853 select_header_accept(['image/gif']) 1854 1855 # Authentication setting 1856 auth_settings = [] 1857 1858 return self.api_client.call_api(resource_path, 'GET', 1859 path_params, 1860 query_params, 1861 header_params, 1862 body=body_params, 1863 post_params=form_params, 1864 files=local_var_files, 1865 response_type='file', 1866 auth_settings=auth_settings, 1867 callback=params.get('callback'), 1868 _return_http_data_only=params.get('_return_http_data_only'), 1869 _preload_content=params.get('_preload_content', True), 1870 _request_timeout=params.get('_request_timeout'), 1871 collection_formats=collection_formats) 1872 1873 def list(self, account_id, **kwargs): 1874 """ 1875 Retrieves the list of users for the specified account. 1876 Retrieves the list of users for the specified account. The response returns the list of users for the account along with the information about the result set. If the `additional_info` query was added to the endpoint and set to **true**, the full user information is returned for each user 1877 This method makes a synchronous HTTP request by default. To make an 1878 asynchronous HTTP request, please define a `callback` function 1879 to be invoked when receiving the response. 1880 >>> def callback_function(response): 1881 >>> pprint(response) 1882 >>> 1883 >>> thread = api.list(account_id, callback=callback_function) 1884 1885 :param callback function: The callback function 1886 for asynchronous request. (optional) 1887 :param str account_id: The external account number (int) or account ID Guid. (required) 1888 :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account. 1889 :param str alternate_admins_only: 1890 :param str count: Number of records to return. The number must be greater than 0 and less than or equal to 100. 1891 :param str domain_users_only: 1892 :param str email: 1893 :param str email_substring: Filters the returned user records by the email address or a sub-string of email address. 1894 :param str group_id: Filters user records returned by one or more group Id's. 1895 :param str include_license: 1896 :param str include_usersettings_for_csv: 1897 :param str login_status: 1898 :param str not_group_id: 1899 :param str start_position: Starting value for the list. 1900 :param str status: 1901 :param str user_name_substring: Filters the user records returned by the user name or a sub-string of user name. 1902 :return: UserInformationList 1903 If the method is called asynchronously, 1904 returns the request thread. 1905 """ 1906 kwargs['_return_http_data_only'] = True 1907 if kwargs.get('callback'): 1908 return self.list_with_http_info(account_id, **kwargs) 1909 else: 1910 (data) = self.list_with_http_info(account_id, **kwargs) 1911 return data 1912 1913 def list_with_http_info(self, account_id, **kwargs): 1914 """ 1915 Retrieves the list of users for the specified account. 1916 Retrieves the list of users for the specified account. The response returns the list of users for the account along with the information about the result set. If the `additional_info` query was added to the endpoint and set to **true**, the full user information is returned for each user 1917 This method makes a synchronous HTTP request by default. To make an 1918 asynchronous HTTP request, please define a `callback` function 1919 to be invoked when receiving the response. 1920 >>> def callback_function(response): 1921 >>> pprint(response) 1922 >>> 1923 >>> thread = api.list_with_http_info(account_id, callback=callback_function) 1924 1925 :param callback function: The callback function 1926 for asynchronous request. (optional) 1927 :param str account_id: The external account number (int) or account ID Guid. (required) 1928 :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account. 1929 :param str alternate_admins_only: 1930 :param str count: Number of records to return. The number must be greater than 0 and less than or equal to 100. 1931 :param str domain_users_only: 1932 :param str email: 1933 :param str email_substring: Filters the returned user records by the email address or a sub-string of email address. 1934 :param str group_id: Filters user records returned by one or more group Id's. 1935 :param str include_license: 1936 :param str include_usersettings_for_csv: 1937 :param str login_status: 1938 :param str not_group_id: 1939 :param str start_position: Starting value for the list. 1940 :param str status: 1941 :param str user_name_substring: Filters the user records returned by the user name or a sub-string of user name. 1942 :return: UserInformationList 1943 If the method is called asynchronously, 1944 returns the request thread. 1945 """ 1946 1947 all_params = ['account_id', 'additional_info', 'alternate_admins_only', 'count', 'domain_users_only', 'email', 'email_substring', 'group_id', 'include_license', 'include_usersettings_for_csv', 'login_status', 'not_group_id', 'start_position', 'status', 'user_name_substring'] 1948 all_params.append('callback') 1949 all_params.append('_return_http_data_only') 1950 all_params.append('_preload_content') 1951 all_params.append('_request_timeout') 1952 1953 params = locals() 1954 for key, val in iteritems(params['kwargs']): 1955 if key not in all_params: 1956 raise TypeError( 1957 "Got an unexpected keyword argument '%s'" 1958 " to method list" % key 1959 ) 1960 params[key] = val 1961 del params['kwargs'] 1962 # verify the required parameter 'account_id' is set 1963 if ('account_id' not in params) or (params['account_id'] is None): 1964 raise ValueError("Missing the required parameter `account_id` when calling `list`") 1965 1966 1967 collection_formats = {} 1968 1969 resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json') 1970 path_params = {} 1971 if 'account_id' in params: 1972 path_params['accountId'] = params['account_id'] 1973 1974 query_params = {} 1975 if 'additional_info' in params: 1976 query_params['additional_info'] = params['additional_info'] 1977 if 'alternate_admins_only' in params: 1978 query_params['alternate_admins_only'] = params['alternate_admins_only'] 1979 if 'count' in params: 1980 query_params['count'] = params['count'] 1981 if 'domain_users_only' in params: 1982 query_params['domain_users_only'] = params['domain_users_only'] 1983 if 'email' in params: 1984 query_params['email'] = params['email'] 1985 if 'email_substring' in params: 1986 query_params['email_substring'] = params['email_substring'] 1987 if 'group_id' in params: 1988 query_params['group_id'] = params['group_id'] 1989 if 'include_license' in params: 1990 query_params['include_license'] = params['include_license'] 1991 if 'include_usersettings_for_csv' in params: 1992 query_params['include_usersettings_for_csv'] = params['include_usersettings_for_csv'] 1993 if 'login_status' in params: 1994 query_params['login_status'] = params['login_status'] 1995 if 'not_group_id' in params: 1996 query_params['not_group_id'] = params['not_group_id'] 1997 if 'start_position' in params: 1998 query_params['start_position'] = params['start_position'] 1999 if 'status' in params: 2000 query_params['status'] = params['status'] 2001 if 'user_name_substring' in params: 2002 query_params['user_name_substring'] = params['user_name_substring'] 2003 2004 header_params = {} 2005 2006 form_params = [] 2007 local_var_files = {} 2008 2009 body_params = None 2010 # HTTP header `Accept` 2011 header_params['Accept'] = self.api_client.\ 2012 select_header_accept(['application/json']) 2013 2014 # Authentication setting 2015 auth_settings = [] 2016 2017 return self.api_client.call_api(resource_path, 'GET', 2018 path_params, 2019 query_params, 2020 header_params, 2021 body=body_params, 2022 post_params=form_params, 2023 files=local_var_files, 2024 response_type='UserInformationList', 2025 auth_settings=auth_settings, 2026 callback=params.get('callback'), 2027 _return_http_data_only=params.get('_return_http_data_only'), 2028 _preload_content=params.get('_preload_content', True), 2029 _request_timeout=params.get('_request_timeout'), 2030 collection_formats=collection_formats) 2031 2032 def list_custom_settings(self, account_id, user_id, **kwargs): 2033 """ 2034 Retrieves the custom user settings for a specified user. 2035 Retrieves a list of custom user settings for a single user. Custom settings provide a flexible way to store and retrieve custom user information that can be used in your own system. ###### Note: Custom user settings are not the same as user account settings. ###Getting Grouped Custom User Settings### If the custom user settings you want to retrieve are grouped, you must include the following information in the header, after Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are retrieved. 2036 This method makes a synchronous HTTP request by default. To make an 2037 asynchronous HTTP request, please define a `callback` function 2038 to be invoked when receiving the response. 2039 >>> def callback_function(response): 2040 >>> pprint(response) 2041 >>> 2042 >>> thread = api.list_custom_settings(account_id, user_id, callback=callback_function) 2043 2044 :param callback function: The callback function 2045 for asynchronous request. (optional) 2046 :param str account_id: The external account number (int) or account ID Guid. (required) 2047 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2048 :return: CustomSettingsInformation 2049 If the method is called asynchronously, 2050 returns the request thread. 2051 """ 2052 kwargs['_return_http_data_only'] = True 2053 if kwargs.get('callback'): 2054 return self.list_custom_settings_with_http_info(account_id, user_id, **kwargs) 2055 else: 2056 (data) = self.list_custom_settings_with_http_info(account_id, user_id, **kwargs) 2057 return data 2058 2059 def list_custom_settings_with_http_info(self, account_id, user_id, **kwargs): 2060 """ 2061 Retrieves the custom user settings for a specified user. 2062 Retrieves a list of custom user settings for a single user. Custom settings provide a flexible way to store and retrieve custom user information that can be used in your own system. ###### Note: Custom user settings are not the same as user account settings. ###Getting Grouped Custom User Settings### If the custom user settings you want to retrieve are grouped, you must include the following information in the header, after Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are retrieved. 2063 This method makes a synchronous HTTP request by default. To make an 2064 asynchronous HTTP request, please define a `callback` function 2065 to be invoked when receiving the response. 2066 >>> def callback_function(response): 2067 >>> pprint(response) 2068 >>> 2069 >>> thread = api.list_custom_settings_with_http_info(account_id, user_id, callback=callback_function) 2070 2071 :param callback function: The callback function 2072 for asynchronous request. (optional) 2073 :param str account_id: The external account number (int) or account ID Guid. (required) 2074 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2075 :return: CustomSettingsInformation 2076 If the method is called asynchronously, 2077 returns the request thread. 2078 """ 2079 2080 all_params = ['account_id', 'user_id'] 2081 all_params.append('callback') 2082 all_params.append('_return_http_data_only') 2083 all_params.append('_preload_content') 2084 all_params.append('_request_timeout') 2085 2086 params = locals() 2087 for key, val in iteritems(params['kwargs']): 2088 if key not in all_params: 2089 raise TypeError( 2090 "Got an unexpected keyword argument '%s'" 2091 " to method list_custom_settings" % key 2092 ) 2093 params[key] = val 2094 del params['kwargs'] 2095 # verify the required parameter 'account_id' is set 2096 if ('account_id' not in params) or (params['account_id'] is None): 2097 raise ValueError("Missing the required parameter `account_id` when calling `list_custom_settings`") 2098 # verify the required parameter 'user_id' is set 2099 if ('user_id' not in params) or (params['user_id'] is None): 2100 raise ValueError("Missing the required parameter `user_id` when calling `list_custom_settings`") 2101 2102 2103 collection_formats = {} 2104 2105 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json') 2106 path_params = {} 2107 if 'account_id' in params: 2108 path_params['accountId'] = params['account_id'] 2109 if 'user_id' in params: 2110 path_params['userId'] = params['user_id'] 2111 2112 query_params = {} 2113 2114 header_params = {} 2115 2116 form_params = [] 2117 local_var_files = {} 2118 2119 body_params = None 2120 # HTTP header `Accept` 2121 header_params['Accept'] = self.api_client.\ 2122 select_header_accept(['application/json']) 2123 2124 # Authentication setting 2125 auth_settings = [] 2126 2127 return self.api_client.call_api(resource_path, 'GET', 2128 path_params, 2129 query_params, 2130 header_params, 2131 body=body_params, 2132 post_params=form_params, 2133 files=local_var_files, 2134 response_type='CustomSettingsInformation', 2135 auth_settings=auth_settings, 2136 callback=params.get('callback'), 2137 _return_http_data_only=params.get('_return_http_data_only'), 2138 _preload_content=params.get('_preload_content', True), 2139 _request_timeout=params.get('_request_timeout'), 2140 collection_formats=collection_formats) 2141 2142 def list_signatures(self, account_id, user_id, **kwargs): 2143 """ 2144 Retrieves a list of user signature definitions for a specified user. 2145 Retrieves the signature definitions for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 2146 This method makes a synchronous HTTP request by default. To make an 2147 asynchronous HTTP request, please define a `callback` function 2148 to be invoked when receiving the response. 2149 >>> def callback_function(response): 2150 >>> pprint(response) 2151 >>> 2152 >>> thread = api.list_signatures(account_id, user_id, callback=callback_function) 2153 2154 :param callback function: The callback function 2155 for asynchronous request. (optional) 2156 :param str account_id: The external account number (int) or account ID Guid. (required) 2157 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2158 :param str stamp_type: 2159 :return: UserSignaturesInformation 2160 If the method is called asynchronously, 2161 returns the request thread. 2162 """ 2163 kwargs['_return_http_data_only'] = True 2164 if kwargs.get('callback'): 2165 return self.list_signatures_with_http_info(account_id, user_id, **kwargs) 2166 else: 2167 (data) = self.list_signatures_with_http_info(account_id, user_id, **kwargs) 2168 return data 2169 2170 def list_signatures_with_http_info(self, account_id, user_id, **kwargs): 2171 """ 2172 Retrieves a list of user signature definitions for a specified user. 2173 Retrieves the signature definitions for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 2174 This method makes a synchronous HTTP request by default. To make an 2175 asynchronous HTTP request, please define a `callback` function 2176 to be invoked when receiving the response. 2177 >>> def callback_function(response): 2178 >>> pprint(response) 2179 >>> 2180 >>> thread = api.list_signatures_with_http_info(account_id, user_id, callback=callback_function) 2181 2182 :param callback function: The callback function 2183 for asynchronous request. (optional) 2184 :param str account_id: The external account number (int) or account ID Guid. (required) 2185 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2186 :param str stamp_type: 2187 :return: UserSignaturesInformation 2188 If the method is called asynchronously, 2189 returns the request thread. 2190 """ 2191 2192 all_params = ['account_id', 'user_id', 'stamp_type'] 2193 all_params.append('callback') 2194 all_params.append('_return_http_data_only') 2195 all_params.append('_preload_content') 2196 all_params.append('_request_timeout') 2197 2198 params = locals() 2199 for key, val in iteritems(params['kwargs']): 2200 if key not in all_params: 2201 raise TypeError( 2202 "Got an unexpected keyword argument '%s'" 2203 " to method list_signatures" % key 2204 ) 2205 params[key] = val 2206 del params['kwargs'] 2207 # verify the required parameter 'account_id' is set 2208 if ('account_id' not in params) or (params['account_id'] is None): 2209 raise ValueError("Missing the required parameter `account_id` when calling `list_signatures`") 2210 # verify the required parameter 'user_id' is set 2211 if ('user_id' not in params) or (params['user_id'] is None): 2212 raise ValueError("Missing the required parameter `user_id` when calling `list_signatures`") 2213 2214 2215 collection_formats = {} 2216 2217 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json') 2218 path_params = {} 2219 if 'account_id' in params: 2220 path_params['accountId'] = params['account_id'] 2221 if 'user_id' in params: 2222 path_params['userId'] = params['user_id'] 2223 2224 query_params = {} 2225 if 'stamp_type' in params: 2226 query_params['stamp_type'] = params['stamp_type'] 2227 2228 header_params = {} 2229 2230 form_params = [] 2231 local_var_files = {} 2232 2233 body_params = None 2234 # HTTP header `Accept` 2235 header_params['Accept'] = self.api_client.\ 2236 select_header_accept(['application/json']) 2237 2238 # Authentication setting 2239 auth_settings = [] 2240 2241 return self.api_client.call_api(resource_path, 'GET', 2242 path_params, 2243 query_params, 2244 header_params, 2245 body=body_params, 2246 post_params=form_params, 2247 files=local_var_files, 2248 response_type='UserSignaturesInformation', 2249 auth_settings=auth_settings, 2250 callback=params.get('callback'), 2251 _return_http_data_only=params.get('_return_http_data_only'), 2252 _preload_content=params.get('_preload_content', True), 2253 _request_timeout=params.get('_request_timeout'), 2254 collection_formats=collection_formats) 2255 2256 def post_contacts(self, account_id, **kwargs): 2257 """ 2258 Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type). 2259 This method adds multiple contacts into a contacts list. 2260 This method makes a synchronous HTTP request by default. To make an 2261 asynchronous HTTP request, please define a `callback` function 2262 to be invoked when receiving the response. 2263 >>> def callback_function(response): 2264 >>> pprint(response) 2265 >>> 2266 >>> thread = api.post_contacts(account_id, callback=callback_function) 2267 2268 :param callback function: The callback function 2269 for asynchronous request. (optional) 2270 :param str account_id: The external account number (int) or account ID Guid. (required) 2271 :param ContactModRequest contact_mod_request: 2272 :return: ContactUpdateResponse 2273 If the method is called asynchronously, 2274 returns the request thread. 2275 """ 2276 kwargs['_return_http_data_only'] = True 2277 if kwargs.get('callback'): 2278 return self.post_contacts_with_http_info(account_id, **kwargs) 2279 else: 2280 (data) = self.post_contacts_with_http_info(account_id, **kwargs) 2281 return data 2282 2283 def post_contacts_with_http_info(self, account_id, **kwargs): 2284 """ 2285 Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type). 2286 This method adds multiple contacts into a contacts list. 2287 This method makes a synchronous HTTP request by default. To make an 2288 asynchronous HTTP request, please define a `callback` function 2289 to be invoked when receiving the response. 2290 >>> def callback_function(response): 2291 >>> pprint(response) 2292 >>> 2293 >>> thread = api.post_contacts_with_http_info(account_id, callback=callback_function) 2294 2295 :param callback function: The callback function 2296 for asynchronous request. (optional) 2297 :param str account_id: The external account number (int) or account ID Guid. (required) 2298 :param ContactModRequest contact_mod_request: 2299 :return: ContactUpdateResponse 2300 If the method is called asynchronously, 2301 returns the request thread. 2302 """ 2303 2304 all_params = ['account_id', 'contact_mod_request'] 2305 all_params.append('callback') 2306 all_params.append('_return_http_data_only') 2307 all_params.append('_preload_content') 2308 all_params.append('_request_timeout') 2309 2310 params = locals() 2311 for key, val in iteritems(params['kwargs']): 2312 if key not in all_params: 2313 raise TypeError( 2314 "Got an unexpected keyword argument '%s'" 2315 " to method post_contacts" % key 2316 ) 2317 params[key] = val 2318 del params['kwargs'] 2319 # verify the required parameter 'account_id' is set 2320 if ('account_id' not in params) or (params['account_id'] is None): 2321 raise ValueError("Missing the required parameter `account_id` when calling `post_contacts`") 2322 2323 2324 collection_formats = {} 2325 2326 resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json') 2327 path_params = {} 2328 if 'account_id' in params: 2329 path_params['accountId'] = params['account_id'] 2330 2331 query_params = {} 2332 2333 header_params = {} 2334 2335 form_params = [] 2336 local_var_files = {} 2337 2338 body_params = None 2339 if 'contact_mod_request' in params: 2340 body_params = params['contact_mod_request'] 2341 # HTTP header `Accept` 2342 header_params['Accept'] = self.api_client.\ 2343 select_header_accept(['application/json']) 2344 2345 # Authentication setting 2346 auth_settings = [] 2347 2348 return self.api_client.call_api(resource_path, 'POST', 2349 path_params, 2350 query_params, 2351 header_params, 2352 body=body_params, 2353 post_params=form_params, 2354 files=local_var_files, 2355 response_type='ContactUpdateResponse', 2356 auth_settings=auth_settings, 2357 callback=params.get('callback'), 2358 _return_http_data_only=params.get('_return_http_data_only'), 2359 _preload_content=params.get('_preload_content', True), 2360 _request_timeout=params.get('_request_timeout'), 2361 collection_formats=collection_formats) 2362 2363 def put_contacts(self, account_id, **kwargs): 2364 """ 2365 Replaces contacts associated with an account for the DocuSign service. 2366 This method updates one or more contacts associated with an account. 2367 This method makes a synchronous HTTP request by default. To make an 2368 asynchronous HTTP request, please define a `callback` function 2369 to be invoked when receiving the response. 2370 >>> def callback_function(response): 2371 >>> pprint(response) 2372 >>> 2373 >>> thread = api.put_contacts(account_id, callback=callback_function) 2374 2375 :param callback function: The callback function 2376 for asynchronous request. (optional) 2377 :param str account_id: The external account number (int) or account ID Guid. (required) 2378 :param ContactModRequest contact_mod_request: 2379 :return: ContactUpdateResponse 2380 If the method is called asynchronously, 2381 returns the request thread. 2382 """ 2383 kwargs['_return_http_data_only'] = True 2384 if kwargs.get('callback'): 2385 return self.put_contacts_with_http_info(account_id, **kwargs) 2386 else: 2387 (data) = self.put_contacts_with_http_info(account_id, **kwargs) 2388 return data 2389 2390 def put_contacts_with_http_info(self, account_id, **kwargs): 2391 """ 2392 Replaces contacts associated with an account for the DocuSign service. 2393 This method updates one or more contacts associated with an account. 2394 This method makes a synchronous HTTP request by default. To make an 2395 asynchronous HTTP request, please define a `callback` function 2396 to be invoked when receiving the response. 2397 >>> def callback_function(response): 2398 >>> pprint(response) 2399 >>> 2400 >>> thread = api.put_contacts_with_http_info(account_id, callback=callback_function) 2401 2402 :param callback function: The callback function 2403 for asynchronous request. (optional) 2404 :param str account_id: The external account number (int) or account ID Guid. (required) 2405 :param ContactModRequest contact_mod_request: 2406 :return: ContactUpdateResponse 2407 If the method is called asynchronously, 2408 returns the request thread. 2409 """ 2410 2411 all_params = ['account_id', 'contact_mod_request'] 2412 all_params.append('callback') 2413 all_params.append('_return_http_data_only') 2414 all_params.append('_preload_content') 2415 all_params.append('_request_timeout') 2416 2417 params = locals() 2418 for key, val in iteritems(params['kwargs']): 2419 if key not in all_params: 2420 raise TypeError( 2421 "Got an unexpected keyword argument '%s'" 2422 " to method put_contacts" % key 2423 ) 2424 params[key] = val 2425 del params['kwargs'] 2426 # verify the required parameter 'account_id' is set 2427 if ('account_id' not in params) or (params['account_id'] is None): 2428 raise ValueError("Missing the required parameter `account_id` when calling `put_contacts`") 2429 2430 2431 collection_formats = {} 2432 2433 resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json') 2434 path_params = {} 2435 if 'account_id' in params: 2436 path_params['accountId'] = params['account_id'] 2437 2438 query_params = {} 2439 2440 header_params = {} 2441 2442 form_params = [] 2443 local_var_files = {} 2444 2445 body_params = None 2446 if 'contact_mod_request' in params: 2447 body_params = params['contact_mod_request'] 2448 # HTTP header `Accept` 2449 header_params['Accept'] = self.api_client.\ 2450 select_header_accept(['application/json']) 2451 2452 # Authentication setting 2453 auth_settings = [] 2454 2455 return self.api_client.call_api(resource_path, 'PUT', 2456 path_params, 2457 query_params, 2458 header_params, 2459 body=body_params, 2460 post_params=form_params, 2461 files=local_var_files, 2462 response_type='ContactUpdateResponse', 2463 auth_settings=auth_settings, 2464 callback=params.get('callback'), 2465 _return_http_data_only=params.get('_return_http_data_only'), 2466 _preload_content=params.get('_preload_content', True), 2467 _request_timeout=params.get('_request_timeout'), 2468 collection_formats=collection_formats) 2469 2470 def update_custom_settings(self, account_id, user_id, **kwargs): 2471 """ 2472 Adds or updates custom user settings for the specified user. 2473 Adds or updates custom user settings for the specified user. ###### Note: Custom user settings are not the same as user account settings. Custom settings provide a flexible way to store and retrieve custom user information that you can use in your own system. **Important**: There is a limit on the size for all the custom user settings for a single user. The limit is 4,000 characters, which includes the XML and JSON structure for the settings. ### Grouping Custom User Settings ### You can group custom user settings when adding them. Grouping allows you to retrieve settings that are in a specific group, instead of retrieving all the user custom settings. To group custom user settings, add the following information in the header, after Content-Type: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. Grouping is shown in the Example Request Body below. When getting or deleting grouped custom user settings, you must include the extra header information. Grouping custom user settings is not required and if the extra header information is not included, the custom user settings are added normally and can be retrieved or deleted without including the additional header. 2474 This method makes a synchronous HTTP request by default. To make an 2475 asynchronous HTTP request, please define a `callback` function 2476 to be invoked when receiving the response. 2477 >>> def callback_function(response): 2478 >>> pprint(response) 2479 >>> 2480 >>> thread = api.update_custom_settings(account_id, user_id, callback=callback_function) 2481 2482 :param callback function: The callback function 2483 for asynchronous request. (optional) 2484 :param str account_id: The external account number (int) or account ID Guid. (required) 2485 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2486 :param CustomSettingsInformation custom_settings_information: 2487 :return: CustomSettingsInformation 2488 If the method is called asynchronously, 2489 returns the request thread. 2490 """ 2491 kwargs['_return_http_data_only'] = True 2492 if kwargs.get('callback'): 2493 return self.update_custom_settings_with_http_info(account_id, user_id, **kwargs) 2494 else: 2495 (data) = self.update_custom_settings_with_http_info(account_id, user_id, **kwargs) 2496 return data 2497 2498 def update_custom_settings_with_http_info(self, account_id, user_id, **kwargs): 2499 """ 2500 Adds or updates custom user settings for the specified user. 2501 Adds or updates custom user settings for the specified user. ###### Note: Custom user settings are not the same as user account settings. Custom settings provide a flexible way to store and retrieve custom user information that you can use in your own system. **Important**: There is a limit on the size for all the custom user settings for a single user. The limit is 4,000 characters, which includes the XML and JSON structure for the settings. ### Grouping Custom User Settings ### You can group custom user settings when adding them. Grouping allows you to retrieve settings that are in a specific group, instead of retrieving all the user custom settings. To group custom user settings, add the following information in the header, after Content-Type: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. Grouping is shown in the Example Request Body below. When getting or deleting grouped custom user settings, you must include the extra header information. Grouping custom user settings is not required and if the extra header information is not included, the custom user settings are added normally and can be retrieved or deleted without including the additional header. 2502 This method makes a synchronous HTTP request by default. To make an 2503 asynchronous HTTP request, please define a `callback` function 2504 to be invoked when receiving the response. 2505 >>> def callback_function(response): 2506 >>> pprint(response) 2507 >>> 2508 >>> thread = api.update_custom_settings_with_http_info(account_id, user_id, callback=callback_function) 2509 2510 :param callback function: The callback function 2511 for asynchronous request. (optional) 2512 :param str account_id: The external account number (int) or account ID Guid. (required) 2513 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2514 :param CustomSettingsInformation custom_settings_information: 2515 :return: CustomSettingsInformation 2516 If the method is called asynchronously, 2517 returns the request thread. 2518 """ 2519 2520 all_params = ['account_id', 'user_id', 'custom_settings_information'] 2521 all_params.append('callback') 2522 all_params.append('_return_http_data_only') 2523 all_params.append('_preload_content') 2524 all_params.append('_request_timeout') 2525 2526 params = locals() 2527 for key, val in iteritems(params['kwargs']): 2528 if key not in all_params: 2529 raise TypeError( 2530 "Got an unexpected keyword argument '%s'" 2531 " to method update_custom_settings" % key 2532 ) 2533 params[key] = val 2534 del params['kwargs'] 2535 # verify the required parameter 'account_id' is set 2536 if ('account_id' not in params) or (params['account_id'] is None): 2537 raise ValueError("Missing the required parameter `account_id` when calling `update_custom_settings`") 2538 # verify the required parameter 'user_id' is set 2539 if ('user_id' not in params) or (params['user_id'] is None): 2540 raise ValueError("Missing the required parameter `user_id` when calling `update_custom_settings`") 2541 2542 2543 collection_formats = {} 2544 2545 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json') 2546 path_params = {} 2547 if 'account_id' in params: 2548 path_params['accountId'] = params['account_id'] 2549 if 'user_id' in params: 2550 path_params['userId'] = params['user_id'] 2551 2552 query_params = {} 2553 2554 header_params = {} 2555 2556 form_params = [] 2557 local_var_files = {} 2558 2559 body_params = None 2560 if 'custom_settings_information' in params: 2561 body_params = params['custom_settings_information'] 2562 # HTTP header `Accept` 2563 header_params['Accept'] = self.api_client.\ 2564 select_header_accept(['application/json']) 2565 2566 # Authentication setting 2567 auth_settings = [] 2568 2569 return self.api_client.call_api(resource_path, 'PUT', 2570 path_params, 2571 query_params, 2572 header_params, 2573 body=body_params, 2574 post_params=form_params, 2575 files=local_var_files, 2576 response_type='CustomSettingsInformation', 2577 auth_settings=auth_settings, 2578 callback=params.get('callback'), 2579 _return_http_data_only=params.get('_return_http_data_only'), 2580 _preload_content=params.get('_preload_content', True), 2581 _request_timeout=params.get('_request_timeout'), 2582 collection_formats=collection_formats) 2583 2584 def update_profile(self, account_id, user_id, **kwargs): 2585 """ 2586 Updates the user profile information for the specified user. 2587 Updates the user's detail information, profile information, privacy settings, and personal information in the user ID card. You can also change a user's name by changing the information in the `userDetails` property. When changing a user's name, you can either change the information in the `userName` property OR change the information in `firstName`, `middleName`, `lastName, suffixName`, and `title` properties. Changes to `firstName`, `middleName`, `lastName`, `suffixName`, and `title` properties take precedence over changes to the `userName` property. 2588 This method makes a synchronous HTTP request by default. To make an 2589 asynchronous HTTP request, please define a `callback` function 2590 to be invoked when receiving the response. 2591 >>> def callback_function(response): 2592 >>> pprint(response) 2593 >>> 2594 >>> thread = api.update_profile(account_id, user_id, callback=callback_function) 2595 2596 :param callback function: The callback function 2597 for asynchronous request. (optional) 2598 :param str account_id: The external account number (int) or account ID Guid. (required) 2599 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2600 :param UserProfile user_profile: 2601 :return: None 2602 If the method is called asynchronously, 2603 returns the request thread. 2604 """ 2605 kwargs['_return_http_data_only'] = True 2606 if kwargs.get('callback'): 2607 return self.update_profile_with_http_info(account_id, user_id, **kwargs) 2608 else: 2609 (data) = self.update_profile_with_http_info(account_id, user_id, **kwargs) 2610 return data 2611 2612 def update_profile_with_http_info(self, account_id, user_id, **kwargs): 2613 """ 2614 Updates the user profile information for the specified user. 2615 Updates the user's detail information, profile information, privacy settings, and personal information in the user ID card. You can also change a user's name by changing the information in the `userDetails` property. When changing a user's name, you can either change the information in the `userName` property OR change the information in `firstName`, `middleName`, `lastName, suffixName`, and `title` properties. Changes to `firstName`, `middleName`, `lastName`, `suffixName`, and `title` properties take precedence over changes to the `userName` property. 2616 This method makes a synchronous HTTP request by default. To make an 2617 asynchronous HTTP request, please define a `callback` function 2618 to be invoked when receiving the response. 2619 >>> def callback_function(response): 2620 >>> pprint(response) 2621 >>> 2622 >>> thread = api.update_profile_with_http_info(account_id, user_id, callback=callback_function) 2623 2624 :param callback function: The callback function 2625 for asynchronous request. (optional) 2626 :param str account_id: The external account number (int) or account ID Guid. (required) 2627 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2628 :param UserProfile user_profile: 2629 :return: None 2630 If the method is called asynchronously, 2631 returns the request thread. 2632 """ 2633 2634 all_params = ['account_id', 'user_id', 'user_profile'] 2635 all_params.append('callback') 2636 all_params.append('_return_http_data_only') 2637 all_params.append('_preload_content') 2638 all_params.append('_request_timeout') 2639 2640 params = locals() 2641 for key, val in iteritems(params['kwargs']): 2642 if key not in all_params: 2643 raise TypeError( 2644 "Got an unexpected keyword argument '%s'" 2645 " to method update_profile" % key 2646 ) 2647 params[key] = val 2648 del params['kwargs'] 2649 # verify the required parameter 'account_id' is set 2650 if ('account_id' not in params) or (params['account_id'] is None): 2651 raise ValueError("Missing the required parameter `account_id` when calling `update_profile`") 2652 # verify the required parameter 'user_id' is set 2653 if ('user_id' not in params) or (params['user_id'] is None): 2654 raise ValueError("Missing the required parameter `user_id` when calling `update_profile`") 2655 2656 2657 collection_formats = {} 2658 2659 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile'.replace('{format}', 'json') 2660 path_params = {} 2661 if 'account_id' in params: 2662 path_params['accountId'] = params['account_id'] 2663 if 'user_id' in params: 2664 path_params['userId'] = params['user_id'] 2665 2666 query_params = {} 2667 2668 header_params = {} 2669 2670 form_params = [] 2671 local_var_files = {} 2672 2673 body_params = None 2674 if 'user_profile' in params: 2675 body_params = params['user_profile'] 2676 # HTTP header `Accept` 2677 header_params['Accept'] = self.api_client.\ 2678 select_header_accept(['application/json']) 2679 2680 # Authentication setting 2681 auth_settings = [] 2682 2683 return self.api_client.call_api(resource_path, 'PUT', 2684 path_params, 2685 query_params, 2686 header_params, 2687 body=body_params, 2688 post_params=form_params, 2689 files=local_var_files, 2690 response_type=None, 2691 auth_settings=auth_settings, 2692 callback=params.get('callback'), 2693 _return_http_data_only=params.get('_return_http_data_only'), 2694 _preload_content=params.get('_preload_content', True), 2695 _request_timeout=params.get('_request_timeout'), 2696 collection_formats=collection_formats) 2697 2698 def update_profile_image(self, account_id, user_id, **kwargs): 2699 """ 2700 Updates the user profile image for a specified user. 2701 Updates the user profile image by uploading an image to the user profile. The supported image formats are: gif, png, jpeg, and bmp. The file must be less than 200K. For best viewing results, DocuSign recommends that the image is no more than 79 pixels wide and high. 2702 This method makes a synchronous HTTP request by default. To make an 2703 asynchronous HTTP request, please define a `callback` function 2704 to be invoked when receiving the response. 2705 >>> def callback_function(response): 2706 >>> pprint(response) 2707 >>> 2708 >>> thread = api.update_profile_image(account_id, user_id, callback=callback_function) 2709 2710 :param callback function: The callback function 2711 for asynchronous request. (optional) 2712 :param str account_id: The external account number (int) or account ID Guid. (required) 2713 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2714 :return: None 2715 If the method is called asynchronously, 2716 returns the request thread. 2717 """ 2718 kwargs['_return_http_data_only'] = True 2719 if kwargs.get('callback'): 2720 return self.update_profile_image_with_http_info(account_id, user_id, **kwargs) 2721 else: 2722 (data) = self.update_profile_image_with_http_info(account_id, user_id, **kwargs) 2723 return data 2724 2725 def update_profile_image_with_http_info(self, account_id, user_id, **kwargs): 2726 """ 2727 Updates the user profile image for a specified user. 2728 Updates the user profile image by uploading an image to the user profile. The supported image formats are: gif, png, jpeg, and bmp. The file must be less than 200K. For best viewing results, DocuSign recommends that the image is no more than 79 pixels wide and high. 2729 This method makes a synchronous HTTP request by default. To make an 2730 asynchronous HTTP request, please define a `callback` function 2731 to be invoked when receiving the response. 2732 >>> def callback_function(response): 2733 >>> pprint(response) 2734 >>> 2735 >>> thread = api.update_profile_image_with_http_info(account_id, user_id, callback=callback_function) 2736 2737 :param callback function: The callback function 2738 for asynchronous request. (optional) 2739 :param str account_id: The external account number (int) or account ID Guid. (required) 2740 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2741 :return: None 2742 If the method is called asynchronously, 2743 returns the request thread. 2744 """ 2745 2746 all_params = ['account_id', 'user_id'] 2747 all_params.append('callback') 2748 all_params.append('_return_http_data_only') 2749 all_params.append('_preload_content') 2750 all_params.append('_request_timeout') 2751 2752 params = locals() 2753 for key, val in iteritems(params['kwargs']): 2754 if key not in all_params: 2755 raise TypeError( 2756 "Got an unexpected keyword argument '%s'" 2757 " to method update_profile_image" % key 2758 ) 2759 params[key] = val 2760 del params['kwargs'] 2761 # verify the required parameter 'account_id' is set 2762 if ('account_id' not in params) or (params['account_id'] is None): 2763 raise ValueError("Missing the required parameter `account_id` when calling `update_profile_image`") 2764 # verify the required parameter 'user_id' is set 2765 if ('user_id' not in params) or (params['user_id'] is None): 2766 raise ValueError("Missing the required parameter `user_id` when calling `update_profile_image`") 2767 2768 2769 collection_formats = {} 2770 2771 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json') 2772 path_params = {} 2773 if 'account_id' in params: 2774 path_params['accountId'] = params['account_id'] 2775 if 'user_id' in params: 2776 path_params['userId'] = params['user_id'] 2777 2778 query_params = {} 2779 2780 header_params = {} 2781 2782 form_params = [] 2783 local_var_files = {} 2784 2785 body_params = None 2786 # HTTP header `Accept` 2787 header_params['Accept'] = self.api_client.\ 2788 select_header_accept(['application/json']) 2789 2790 # HTTP header `Content-Type` 2791 header_params['Content-Type'] = self.api_client.\ 2792 select_header_content_type(['image/gif']) 2793 2794 # Authentication setting 2795 auth_settings = [] 2796 2797 return self.api_client.call_api(resource_path, 'PUT', 2798 path_params, 2799 query_params, 2800 header_params, 2801 body=body_params, 2802 post_params=form_params, 2803 files=local_var_files, 2804 response_type=None, 2805 auth_settings=auth_settings, 2806 callback=params.get('callback'), 2807 _return_http_data_only=params.get('_return_http_data_only'), 2808 _preload_content=params.get('_preload_content', True), 2809 _request_timeout=params.get('_request_timeout'), 2810 collection_formats=collection_formats) 2811 2812 def update_settings(self, account_id, user_id, **kwargs): 2813 """ 2814 Updates the user account settings for a specified user. 2815 Updates the account settings list and email notification types for the specified user. 2816 This method makes a synchronous HTTP request by default. To make an 2817 asynchronous HTTP request, please define a `callback` function 2818 to be invoked when receiving the response. 2819 >>> def callback_function(response): 2820 >>> pprint(response) 2821 >>> 2822 >>> thread = api.update_settings(account_id, user_id, callback=callback_function) 2823 2824 :param callback function: The callback function 2825 for asynchronous request. (optional) 2826 :param str account_id: The external account number (int) or account ID Guid. (required) 2827 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2828 :param str allow_all_languages: 2829 :param UserSettingsInformation user_settings_information: 2830 :return: None 2831 If the method is called asynchronously, 2832 returns the request thread. 2833 """ 2834 kwargs['_return_http_data_only'] = True 2835 if kwargs.get('callback'): 2836 return self.update_settings_with_http_info(account_id, user_id, **kwargs) 2837 else: 2838 (data) = self.update_settings_with_http_info(account_id, user_id, **kwargs) 2839 return data 2840 2841 def update_settings_with_http_info(self, account_id, user_id, **kwargs): 2842 """ 2843 Updates the user account settings for a specified user. 2844 Updates the account settings list and email notification types for the specified user. 2845 This method makes a synchronous HTTP request by default. To make an 2846 asynchronous HTTP request, please define a `callback` function 2847 to be invoked when receiving the response. 2848 >>> def callback_function(response): 2849 >>> pprint(response) 2850 >>> 2851 >>> thread = api.update_settings_with_http_info(account_id, user_id, callback=callback_function) 2852 2853 :param callback function: The callback function 2854 for asynchronous request. (optional) 2855 :param str account_id: The external account number (int) or account ID Guid. (required) 2856 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2857 :param str allow_all_languages: 2858 :param UserSettingsInformation user_settings_information: 2859 :return: None 2860 If the method is called asynchronously, 2861 returns the request thread. 2862 """ 2863 2864 all_params = ['account_id', 'user_id', 'allow_all_languages', 'user_settings_information'] 2865 all_params.append('callback') 2866 all_params.append('_return_http_data_only') 2867 all_params.append('_preload_content') 2868 all_params.append('_request_timeout') 2869 2870 params = locals() 2871 for key, val in iteritems(params['kwargs']): 2872 if key not in all_params: 2873 raise TypeError( 2874 "Got an unexpected keyword argument '%s'" 2875 " to method update_settings" % key 2876 ) 2877 params[key] = val 2878 del params['kwargs'] 2879 # verify the required parameter 'account_id' is set 2880 if ('account_id' not in params) or (params['account_id'] is None): 2881 raise ValueError("Missing the required parameter `account_id` when calling `update_settings`") 2882 # verify the required parameter 'user_id' is set 2883 if ('user_id' not in params) or (params['user_id'] is None): 2884 raise ValueError("Missing the required parameter `user_id` when calling `update_settings`") 2885 2886 2887 collection_formats = {} 2888 2889 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/settings'.replace('{format}', 'json') 2890 path_params = {} 2891 if 'account_id' in params: 2892 path_params['accountId'] = params['account_id'] 2893 if 'user_id' in params: 2894 path_params['userId'] = params['user_id'] 2895 2896 query_params = {} 2897 if 'allow_all_languages' in params: 2898 query_params['allow_all_languages'] = params['allow_all_languages'] 2899 2900 header_params = {} 2901 2902 form_params = [] 2903 local_var_files = {} 2904 2905 body_params = None 2906 if 'user_settings_information' in params: 2907 body_params = params['user_settings_information'] 2908 # HTTP header `Accept` 2909 header_params['Accept'] = self.api_client.\ 2910 select_header_accept(['application/json']) 2911 2912 # Authentication setting 2913 auth_settings = [] 2914 2915 return self.api_client.call_api(resource_path, 'PUT', 2916 path_params, 2917 query_params, 2918 header_params, 2919 body=body_params, 2920 post_params=form_params, 2921 files=local_var_files, 2922 response_type=None, 2923 auth_settings=auth_settings, 2924 callback=params.get('callback'), 2925 _return_http_data_only=params.get('_return_http_data_only'), 2926 _preload_content=params.get('_preload_content', True), 2927 _request_timeout=params.get('_request_timeout'), 2928 collection_formats=collection_formats) 2929 2930 def update_signature(self, account_id, signature_id, user_id, **kwargs): 2931 """ 2932 Updates the user signature for a specified user. 2933 Creates, or updates, the signature font and initials for the specified user. When creating a signature, you use this resource to create the signature name and then add the signature and initials images into the signature. ###### Note: This will also create a default signature for the user when one does not exist. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 2934 This method makes a synchronous HTTP request by default. To make an 2935 asynchronous HTTP request, please define a `callback` function 2936 to be invoked when receiving the response. 2937 >>> def callback_function(response): 2938 >>> pprint(response) 2939 >>> 2940 >>> thread = api.update_signature(account_id, signature_id, user_id, callback=callback_function) 2941 2942 :param callback function: The callback function 2943 for asynchronous request. (optional) 2944 :param str account_id: The external account number (int) or account ID Guid. (required) 2945 :param str signature_id: The ID of the signature being accessed. (required) 2946 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2947 :param str close_existing_signature: When set to **true**, closes the current signature. 2948 :param UserSignatureDefinition user_signature_definition: 2949 :return: UserSignature 2950 If the method is called asynchronously, 2951 returns the request thread. 2952 """ 2953 kwargs['_return_http_data_only'] = True 2954 if kwargs.get('callback'): 2955 return self.update_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 2956 else: 2957 (data) = self.update_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 2958 return data 2959 2960 def update_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs): 2961 """ 2962 Updates the user signature for a specified user. 2963 Creates, or updates, the signature font and initials for the specified user. When creating a signature, you use this resource to create the signature name and then add the signature and initials images into the signature. ###### Note: This will also create a default signature for the user when one does not exist. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 2964 This method makes a synchronous HTTP request by default. To make an 2965 asynchronous HTTP request, please define a `callback` function 2966 to be invoked when receiving the response. 2967 >>> def callback_function(response): 2968 >>> pprint(response) 2969 >>> 2970 >>> thread = api.update_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function) 2971 2972 :param callback function: The callback function 2973 for asynchronous request. (optional) 2974 :param str account_id: The external account number (int) or account ID Guid. (required) 2975 :param str signature_id: The ID of the signature being accessed. (required) 2976 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2977 :param str close_existing_signature: When set to **true**, closes the current signature. 2978 :param UserSignatureDefinition user_signature_definition: 2979 :return: UserSignature 2980 If the method is called asynchronously, 2981 returns the request thread. 2982 """ 2983 2984 all_params = ['account_id', 'signature_id', 'user_id', 'close_existing_signature', 'user_signature_definition'] 2985 all_params.append('callback') 2986 all_params.append('_return_http_data_only') 2987 all_params.append('_preload_content') 2988 all_params.append('_request_timeout') 2989 2990 params = locals() 2991 for key, val in iteritems(params['kwargs']): 2992 if key not in all_params: 2993 raise TypeError( 2994 "Got an unexpected keyword argument '%s'" 2995 " to method update_signature" % key 2996 ) 2997 params[key] = val 2998 del params['kwargs'] 2999 # verify the required parameter 'account_id' is set 3000 if ('account_id' not in params) or (params['account_id'] is None): 3001 raise ValueError("Missing the required parameter `account_id` when calling `update_signature`") 3002 # verify the required parameter 'signature_id' is set 3003 if ('signature_id' not in params) or (params['signature_id'] is None): 3004 raise ValueError("Missing the required parameter `signature_id` when calling `update_signature`") 3005 # verify the required parameter 'user_id' is set 3006 if ('user_id' not in params) or (params['user_id'] is None): 3007 raise ValueError("Missing the required parameter `user_id` when calling `update_signature`") 3008 3009 3010 collection_formats = {} 3011 3012 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json') 3013 path_params = {} 3014 if 'account_id' in params: 3015 path_params['accountId'] = params['account_id'] 3016 if 'signature_id' in params: 3017 path_params['signatureId'] = params['signature_id'] 3018 if 'user_id' in params: 3019 path_params['userId'] = params['user_id'] 3020 3021 query_params = {} 3022 if 'close_existing_signature' in params: 3023 query_params['close_existing_signature'] = params['close_existing_signature'] 3024 3025 header_params = {} 3026 3027 form_params = [] 3028 local_var_files = {} 3029 3030 body_params = None 3031 if 'user_signature_definition' in params: 3032 body_params = params['user_signature_definition'] 3033 # HTTP header `Accept` 3034 header_params['Accept'] = self.api_client.\ 3035 select_header_accept(['application/json']) 3036 3037 # Authentication setting 3038 auth_settings = [] 3039 3040 return self.api_client.call_api(resource_path, 'PUT', 3041 path_params, 3042 query_params, 3043 header_params, 3044 body=body_params, 3045 post_params=form_params, 3046 files=local_var_files, 3047 response_type='UserSignature', 3048 auth_settings=auth_settings, 3049 callback=params.get('callback'), 3050 _return_http_data_only=params.get('_return_http_data_only'), 3051 _preload_content=params.get('_preload_content', True), 3052 _request_timeout=params.get('_request_timeout'), 3053 collection_formats=collection_formats) 3054 3055 def update_signature_image(self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs): 3056 """ 3057 Updates the user signature image or user initials image for the specified user. 3058 Updates the user signature image or user initials image for the specified user. The supported image formats for this file are: gif, png, jpeg, and bmp. The file must be less than 200K. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 3059 This method makes a synchronous HTTP request by default. To make an 3060 asynchronous HTTP request, please define a `callback` function 3061 to be invoked when receiving the response. 3062 >>> def callback_function(response): 3063 >>> pprint(response) 3064 >>> 3065 >>> thread = api.update_signature_image(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function) 3066 3067 :param callback function: The callback function 3068 for asynchronous request. (optional) 3069 :param str account_id: The external account number (int) or account ID Guid. (required) 3070 :param str image_type: One of **signature_image** or **initials_image**. (required) 3071 :param str signature_id: The ID of the signature being accessed. (required) 3072 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3073 :param str transparent_png: 3074 :param str image_bytes: Updated image content. (required) 3075 :return: UserSignature 3076 If the method is called asynchronously, 3077 returns the request thread. 3078 """ 3079 kwargs['_return_http_data_only'] = True 3080 if kwargs.get('callback'): 3081 return self.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, **kwargs) 3082 else: 3083 (data) = self.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, **kwargs) 3084 return data 3085 3086 def update_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs): 3087 """ 3088 Updates the user signature image or user initials image for the specified user. 3089 Updates the user signature image or user initials image for the specified user. The supported image formats for this file are: gif, png, jpeg, and bmp. The file must be less than 200K. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 3090 This method makes a synchronous HTTP request by default. To make an 3091 asynchronous HTTP request, please define a `callback` function 3092 to be invoked when receiving the response. 3093 >>> def callback_function(response): 3094 >>> pprint(response) 3095 >>> 3096 >>> thread = api.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function) 3097 3098 :param callback function: The callback function 3099 for asynchronous request. (optional) 3100 :param str account_id: The external account number (int) or account ID Guid. (required) 3101 :param str image_type: One of **signature_image** or **initials_image**. (required) 3102 :param str signature_id: The ID of the signature being accessed. (required) 3103 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3104 :param str transparent_png: 3105 :param str image_bytes: Updated image content. (required) 3106 :return: UserSignature 3107 If the method is called asynchronously, 3108 returns the request thread. 3109 """ 3110 3111 all_params = ['account_id', 'image_type', 'signature_id', 'user_id', 'transparent_png', 'image_bytes'] 3112 all_params.append('callback') 3113 all_params.append('_return_http_data_only') 3114 all_params.append('_preload_content') 3115 all_params.append('_request_timeout') 3116 3117 params = locals() 3118 for key, val in iteritems(params['kwargs']): 3119 if key not in all_params: 3120 raise TypeError( 3121 "Got an unexpected keyword argument '%s'" 3122 " to method update_signature_image" % key 3123 ) 3124 params[key] = val 3125 del params['kwargs'] 3126 # verify the required parameter 'account_id' is set 3127 if ('account_id' not in params) or (params['account_id'] is None): 3128 raise ValueError("Missing the required parameter `account_id` when calling `update_signature_image`") 3129 # verify the required parameter 'image_type' is set 3130 if ('image_type' not in params) or (params['image_type'] is None): 3131 raise ValueError("Missing the required parameter `image_type` when calling `update_signature_image`") 3132 # verify the required parameter 'signature_id' is set 3133 if ('signature_id' not in params) or (params['signature_id'] is None): 3134 raise ValueError("Missing the required parameter `signature_id` when calling `update_signature_image`") 3135 # verify the required parameter 'user_id' is set 3136 if ('user_id' not in params) or (params['user_id'] is None): 3137 raise ValueError("Missing the required parameter `user_id` when calling `update_signature_image`") 3138 # verify the required parameter 'image_bytes' is set 3139 if ('image_bytes' not in params) or (params['image_bytes'] is None): 3140 raise ValueError("Missing the required parameter `image_bytes` when calling `update_signature_image`") 3141 3142 3143 collection_formats = {} 3144 3145 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json') 3146 path_params = {} 3147 if 'account_id' in params: 3148 path_params['accountId'] = params['account_id'] 3149 if 'image_type' in params: 3150 path_params['imageType'] = params['image_type'] 3151 if 'signature_id' in params: 3152 path_params['signatureId'] = params['signature_id'] 3153 if 'user_id' in params: 3154 path_params['userId'] = params['user_id'] 3155 3156 query_params = {} 3157 if 'transparent_png' in params: 3158 query_params['transparent_png'] = params['transparent_png'] 3159 3160 header_params = {} 3161 3162 form_params = [] 3163 local_var_files = {} 3164 3165 body_params = None 3166 if 'image_bytes' in params: 3167 body_params = params['image_bytes'] 3168 # HTTP header `Accept` 3169 header_params['Accept'] = self.api_client.\ 3170 select_header_accept(['application/json']) 3171 3172 # HTTP header `Content-Type` 3173 header_params['Content-Type'] = self.api_client.\ 3174 select_header_content_type(['image/gif']) 3175 3176 # Authentication setting 3177 auth_settings = [] 3178 3179 return self.api_client.call_api(resource_path, 'PUT', 3180 path_params, 3181 query_params, 3182 header_params, 3183 body=body_params, 3184 post_params=form_params, 3185 files=local_var_files, 3186 response_type='UserSignature', 3187 auth_settings=auth_settings, 3188 callback=params.get('callback'), 3189 _return_http_data_only=params.get('_return_http_data_only'), 3190 _preload_content=params.get('_preload_content', True), 3191 _request_timeout=params.get('_request_timeout'), 3192 collection_formats=collection_formats) 3193 3194 def update_signatures(self, account_id, user_id, **kwargs): 3195 """ 3196 Adds/updates a user signature. 3197 3198 This method makes a synchronous HTTP request by default. To make an 3199 asynchronous HTTP request, please define a `callback` function 3200 to be invoked when receiving the response. 3201 >>> def callback_function(response): 3202 >>> pprint(response) 3203 >>> 3204 >>> thread = api.update_signatures(account_id, user_id, callback=callback_function) 3205 3206 :param callback function: The callback function 3207 for asynchronous request. (optional) 3208 :param str account_id: The external account number (int) or account ID Guid. (required) 3209 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3210 :param UserSignaturesInformation user_signatures_information: 3211 :return: UserSignaturesInformation 3212 If the method is called asynchronously, 3213 returns the request thread. 3214 """ 3215 kwargs['_return_http_data_only'] = True 3216 if kwargs.get('callback'): 3217 return self.update_signatures_with_http_info(account_id, user_id, **kwargs) 3218 else: 3219 (data) = self.update_signatures_with_http_info(account_id, user_id, **kwargs) 3220 return data 3221 3222 def update_signatures_with_http_info(self, account_id, user_id, **kwargs): 3223 """ 3224 Adds/updates a user signature. 3225 3226 This method makes a synchronous HTTP request by default. To make an 3227 asynchronous HTTP request, please define a `callback` function 3228 to be invoked when receiving the response. 3229 >>> def callback_function(response): 3230 >>> pprint(response) 3231 >>> 3232 >>> thread = api.update_signatures_with_http_info(account_id, user_id, callback=callback_function) 3233 3234 :param callback function: The callback function 3235 for asynchronous request. (optional) 3236 :param str account_id: The external account number (int) or account ID Guid. (required) 3237 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3238 :param UserSignaturesInformation user_signatures_information: 3239 :return: UserSignaturesInformation 3240 If the method is called asynchronously, 3241 returns the request thread. 3242 """ 3243 3244 all_params = ['account_id', 'user_id', 'user_signatures_information'] 3245 all_params.append('callback') 3246 all_params.append('_return_http_data_only') 3247 all_params.append('_preload_content') 3248 all_params.append('_request_timeout') 3249 3250 params = locals() 3251 for key, val in iteritems(params['kwargs']): 3252 if key not in all_params: 3253 raise TypeError( 3254 "Got an unexpected keyword argument '%s'" 3255 " to method update_signatures" % key 3256 ) 3257 params[key] = val 3258 del params['kwargs'] 3259 # verify the required parameter 'account_id' is set 3260 if ('account_id' not in params) or (params['account_id'] is None): 3261 raise ValueError("Missing the required parameter `account_id` when calling `update_signatures`") 3262 # verify the required parameter 'user_id' is set 3263 if ('user_id' not in params) or (params['user_id'] is None): 3264 raise ValueError("Missing the required parameter `user_id` when calling `update_signatures`") 3265 3266 3267 collection_formats = {} 3268 3269 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json') 3270 path_params = {} 3271 if 'account_id' in params: 3272 path_params['accountId'] = params['account_id'] 3273 if 'user_id' in params: 3274 path_params['userId'] = params['user_id'] 3275 3276 query_params = {} 3277 3278 header_params = {} 3279 3280 form_params = [] 3281 local_var_files = {} 3282 3283 body_params = None 3284 if 'user_signatures_information' in params: 3285 body_params = params['user_signatures_information'] 3286 # HTTP header `Accept` 3287 header_params['Accept'] = self.api_client.\ 3288 select_header_accept(['application/json']) 3289 3290 # Authentication setting 3291 auth_settings = [] 3292 3293 return self.api_client.call_api(resource_path, 'PUT', 3294 path_params, 3295 query_params, 3296 header_params, 3297 body=body_params, 3298 post_params=form_params, 3299 files=local_var_files, 3300 response_type='UserSignaturesInformation', 3301 auth_settings=auth_settings, 3302 callback=params.get('callback'), 3303 _return_http_data_only=params.get('_return_http_data_only'), 3304 _preload_content=params.get('_preload_content', True), 3305 _request_timeout=params.get('_request_timeout'), 3306 collection_formats=collection_formats) 3307 3308 def update_user(self, account_id, user_id, **kwargs): 3309 """ 3310 Updates the specified user information. 3311 To update user information for a specific user, submit a [Users](#Users) object with updated field values in the request body of this operation. 3312 This method makes a synchronous HTTP request by default. To make an 3313 asynchronous HTTP request, please define a `callback` function 3314 to be invoked when receiving the response. 3315 >>> def callback_function(response): 3316 >>> pprint(response) 3317 >>> 3318 >>> thread = api.update_user(account_id, user_id, callback=callback_function) 3319 3320 :param callback function: The callback function 3321 for asynchronous request. (optional) 3322 :param str account_id: The external account number (int) or account ID Guid. (required) 3323 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3324 :param str allow_all_languages: 3325 :param UserInformation user_information: 3326 :return: UserInformation 3327 If the method is called asynchronously, 3328 returns the request thread. 3329 """ 3330 kwargs['_return_http_data_only'] = True 3331 if kwargs.get('callback'): 3332 return self.update_user_with_http_info(account_id, user_id, **kwargs) 3333 else: 3334 (data) = self.update_user_with_http_info(account_id, user_id, **kwargs) 3335 return data 3336 3337 def update_user_with_http_info(self, account_id, user_id, **kwargs): 3338 """ 3339 Updates the specified user information. 3340 To update user information for a specific user, submit a [Users](#Users) object with updated field values in the request body of this operation. 3341 This method makes a synchronous HTTP request by default. To make an 3342 asynchronous HTTP request, please define a `callback` function 3343 to be invoked when receiving the response. 3344 >>> def callback_function(response): 3345 >>> pprint(response) 3346 >>> 3347 >>> thread = api.update_user_with_http_info(account_id, user_id, callback=callback_function) 3348 3349 :param callback function: The callback function 3350 for asynchronous request. (optional) 3351 :param str account_id: The external account number (int) or account ID Guid. (required) 3352 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3353 :param str allow_all_languages: 3354 :param UserInformation user_information: 3355 :return: UserInformation 3356 If the method is called asynchronously, 3357 returns the request thread. 3358 """ 3359 3360 all_params = ['account_id', 'user_id', 'allow_all_languages', 'user_information'] 3361 all_params.append('callback') 3362 all_params.append('_return_http_data_only') 3363 all_params.append('_preload_content') 3364 all_params.append('_request_timeout') 3365 3366 params = locals() 3367 for key, val in iteritems(params['kwargs']): 3368 if key not in all_params: 3369 raise TypeError( 3370 "Got an unexpected keyword argument '%s'" 3371 " to method update_user" % key 3372 ) 3373 params[key] = val 3374 del params['kwargs'] 3375 # verify the required parameter 'account_id' is set 3376 if ('account_id' not in params) or (params['account_id'] is None): 3377 raise ValueError("Missing the required parameter `account_id` when calling `update_user`") 3378 # verify the required parameter 'user_id' is set 3379 if ('user_id' not in params) or (params['user_id'] is None): 3380 raise ValueError("Missing the required parameter `user_id` when calling `update_user`") 3381 3382 3383 collection_formats = {} 3384 3385 resource_path = '/v2.1/accounts/{accountId}/users/{userId}'.replace('{format}', 'json') 3386 path_params = {} 3387 if 'account_id' in params: 3388 path_params['accountId'] = params['account_id'] 3389 if 'user_id' in params: 3390 path_params['userId'] = params['user_id'] 3391 3392 query_params = {} 3393 if 'allow_all_languages' in params: 3394 query_params['allow_all_languages'] = params['allow_all_languages'] 3395 3396 header_params = {} 3397 3398 form_params = [] 3399 local_var_files = {} 3400 3401 body_params = None 3402 if 'user_information' in params: 3403 body_params = params['user_information'] 3404 # HTTP header `Accept` 3405 header_params['Accept'] = self.api_client.\ 3406 select_header_accept(['application/json']) 3407 3408 # Authentication setting 3409 auth_settings = [] 3410 3411 return self.api_client.call_api(resource_path, 'PUT', 3412 path_params, 3413 query_params, 3414 header_params, 3415 body=body_params, 3416 post_params=form_params, 3417 files=local_var_files, 3418 response_type='UserInformation', 3419 auth_settings=auth_settings, 3420 callback=params.get('callback'), 3421 _return_http_data_only=params.get('_return_http_data_only'), 3422 _preload_content=params.get('_preload_content', True), 3423 _request_timeout=params.get('_request_timeout'), 3424 collection_formats=collection_formats) 3425 3426 def update_users(self, account_id, **kwargs): 3427 """ 3428 Change one or more user in the specified account. 3429 This method updates the information about one or more account users. 3430 This method makes a synchronous HTTP request by default. To make an 3431 asynchronous HTTP request, please define a `callback` function 3432 to be invoked when receiving the response. 3433 >>> def callback_function(response): 3434 >>> pprint(response) 3435 >>> 3436 >>> thread = api.update_users(account_id, callback=callback_function) 3437 3438 :param callback function: The callback function 3439 for asynchronous request. (optional) 3440 :param str account_id: The external account number (int) or account ID Guid. (required) 3441 :param str allow_all_languages: 3442 :param UserInformationList user_information_list: 3443 :return: UserInformationList 3444 If the method is called asynchronously, 3445 returns the request thread. 3446 """ 3447 kwargs['_return_http_data_only'] = True 3448 if kwargs.get('callback'): 3449 return self.update_users_with_http_info(account_id, **kwargs) 3450 else: 3451 (data) = self.update_users_with_http_info(account_id, **kwargs) 3452 return data 3453 3454 def update_users_with_http_info(self, account_id, **kwargs): 3455 """ 3456 Change one or more user in the specified account. 3457 This method updates the information about one or more account users. 3458 This method makes a synchronous HTTP request by default. To make an 3459 asynchronous HTTP request, please define a `callback` function 3460 to be invoked when receiving the response. 3461 >>> def callback_function(response): 3462 >>> pprint(response) 3463 >>> 3464 >>> thread = api.update_users_with_http_info(account_id, callback=callback_function) 3465 3466 :param callback function: The callback function 3467 for asynchronous request. (optional) 3468 :param str account_id: The external account number (int) or account ID Guid. (required) 3469 :param str allow_all_languages: 3470 :param UserInformationList user_information_list: 3471 :return: UserInformationList 3472 If the method is called asynchronously, 3473 returns the request thread. 3474 """ 3475 3476 all_params = ['account_id', 'allow_all_languages', 'user_information_list'] 3477 all_params.append('callback') 3478 all_params.append('_return_http_data_only') 3479 all_params.append('_preload_content') 3480 all_params.append('_request_timeout') 3481 3482 params = locals() 3483 for key, val in iteritems(params['kwargs']): 3484 if key not in all_params: 3485 raise TypeError( 3486 "Got an unexpected keyword argument '%s'" 3487 " to method update_users" % key 3488 ) 3489 params[key] = val 3490 del params['kwargs'] 3491 # verify the required parameter 'account_id' is set 3492 if ('account_id' not in params) or (params['account_id'] is None): 3493 raise ValueError("Missing the required parameter `account_id` when calling `update_users`") 3494 3495 3496 collection_formats = {} 3497 3498 resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json') 3499 path_params = {} 3500 if 'account_id' in params: 3501 path_params['accountId'] = params['account_id'] 3502 3503 query_params = {} 3504 if 'allow_all_languages' in params: 3505 query_params['allow_all_languages'] = params['allow_all_languages'] 3506 3507 header_params = {} 3508 3509 form_params = [] 3510 local_var_files = {} 3511 3512 body_params = None 3513 if 'user_information_list' in params: 3514 body_params = params['user_information_list'] 3515 # HTTP header `Accept` 3516 header_params['Accept'] = self.api_client.\ 3517 select_header_accept(['application/json']) 3518 3519 # Authentication setting 3520 auth_settings = [] 3521 3522 return self.api_client.call_api(resource_path, 'PUT', 3523 path_params, 3524 query_params, 3525 header_params, 3526 body=body_params, 3527 post_params=form_params, 3528 files=local_var_files, 3529 response_type='UserInformationList', 3530 auth_settings=auth_settings, 3531 callback=params.get('callback'), 3532 _return_http_data_only=params.get('_return_http_data_only'), 3533 _preload_content=params.get('_preload_content', True), 3534 _request_timeout=params.get('_request_timeout'), 3535 collection_formats=collection_formats)
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen
44 def create(self, account_id, **kwargs): 45 """ 46 Adds news user to the specified account. 47 Adds new users to your account. Set the `userSettings` property in the request to specify the actions the users can perform on the account. 48 This method makes a synchronous HTTP request by default. To make an 49 asynchronous HTTP request, please define a `callback` function 50 to be invoked when receiving the response. 51 >>> def callback_function(response): 52 >>> pprint(response) 53 >>> 54 >>> thread = api.create(account_id, callback=callback_function) 55 56 :param callback function: The callback function 57 for asynchronous request. (optional) 58 :param str account_id: The external account number (int) or account ID Guid. (required) 59 :param NewUsersDefinition new_users_definition: 60 :return: NewUsersSummary 61 If the method is called asynchronously, 62 returns the request thread. 63 """ 64 kwargs['_return_http_data_only'] = True 65 if kwargs.get('callback'): 66 return self.create_with_http_info(account_id, **kwargs) 67 else: 68 (data) = self.create_with_http_info(account_id, **kwargs) 69 return data
Adds news user to the specified account.
Adds new users to your account. Set the userSettings property in the request to specify the actions the users can perform on the account.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- NewUsersDefinition new_users_definition:
Returns
NewUsersSummary If the method is called asynchronously, returns the request thread.
71 def create_with_http_info(self, account_id, **kwargs): 72 """ 73 Adds news user to the specified account. 74 Adds new users to your account. Set the `userSettings` property in the request to specify the actions the users can perform on the account. 75 This method makes a synchronous HTTP request by default. To make an 76 asynchronous HTTP request, please define a `callback` function 77 to be invoked when receiving the response. 78 >>> def callback_function(response): 79 >>> pprint(response) 80 >>> 81 >>> thread = api.create_with_http_info(account_id, callback=callback_function) 82 83 :param callback function: The callback function 84 for asynchronous request. (optional) 85 :param str account_id: The external account number (int) or account ID Guid. (required) 86 :param NewUsersDefinition new_users_definition: 87 :return: NewUsersSummary 88 If the method is called asynchronously, 89 returns the request thread. 90 """ 91 92 all_params = ['account_id', 'new_users_definition'] 93 all_params.append('callback') 94 all_params.append('_return_http_data_only') 95 all_params.append('_preload_content') 96 all_params.append('_request_timeout') 97 98 params = locals() 99 for key, val in iteritems(params['kwargs']): 100 if key not in all_params: 101 raise TypeError( 102 "Got an unexpected keyword argument '%s'" 103 " to method create" % key 104 ) 105 params[key] = val 106 del params['kwargs'] 107 # verify the required parameter 'account_id' is set 108 if ('account_id' not in params) or (params['account_id'] is None): 109 raise ValueError("Missing the required parameter `account_id` when calling `create`") 110 111 112 collection_formats = {} 113 114 resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json') 115 path_params = {} 116 if 'account_id' in params: 117 path_params['accountId'] = params['account_id'] 118 119 query_params = {} 120 121 header_params = {} 122 123 form_params = [] 124 local_var_files = {} 125 126 body_params = None 127 if 'new_users_definition' in params: 128 body_params = params['new_users_definition'] 129 # HTTP header `Accept` 130 header_params['Accept'] = self.api_client.\ 131 select_header_accept(['application/json']) 132 133 # Authentication setting 134 auth_settings = [] 135 136 return self.api_client.call_api(resource_path, 'POST', 137 path_params, 138 query_params, 139 header_params, 140 body=body_params, 141 post_params=form_params, 142 files=local_var_files, 143 response_type='NewUsersSummary', 144 auth_settings=auth_settings, 145 callback=params.get('callback'), 146 _return_http_data_only=params.get('_return_http_data_only'), 147 _preload_content=params.get('_preload_content', True), 148 _request_timeout=params.get('_request_timeout'), 149 collection_formats=collection_formats)
Adds news user to the specified account.
Adds new users to your account. Set the userSettings property in the request to specify the actions the users can perform on the account.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- NewUsersDefinition new_users_definition:
Returns
NewUsersSummary If the method is called asynchronously, returns the request thread.
151 def create_signatures(self, account_id, user_id, **kwargs): 152 """ 153 Adds user Signature and initials images to a Signature. 154 Adds a user signature image and/or user initials image to the specified user. The userId property specified in the endpoint must match the authenticated user's userId and the user must be a member of the account. The rules and processes associated with this are: * If Content-Type is set to application/json, then the default behavior for creating a default signature image, based on the name and a DocuSign font, is used. * If Content-Type is set to multipart/form-data, then the request must contain a first part with the user signature information, followed by parts that contain the images. For each Image part, the Content-Disposition header has a \"filename\" value that is used to map to the `signatureName` and/or `signatureInitials` properties in the JSON to the image. For example: `Content-Disposition: file; filename=\"Ron Test20121127083900\"` If no matching image (by filename value) is found, then the image is not set. One, both, or neither of the signature and initials images can be set with this call. The Content-Transfer-Encoding: base64 header, set in the header for the part containing the image, can be set to indicate that the images are formatted as base64 instead of as binary. If successful, 200-OK is returned, and a JSON structure containing the signature information is provided, note that the signatureId can change with each API POST, PUT, or DELETE since the changes to the signature structure cause the current signature to be closed, and a new signature record to be created. 155 This method makes a synchronous HTTP request by default. To make an 156 asynchronous HTTP request, please define a `callback` function 157 to be invoked when receiving the response. 158 >>> def callback_function(response): 159 >>> pprint(response) 160 >>> 161 >>> thread = api.create_signatures(account_id, user_id, callback=callback_function) 162 163 :param callback function: The callback function 164 for asynchronous request. (optional) 165 :param str account_id: The external account number (int) or account ID Guid. (required) 166 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 167 :param UserSignaturesInformation user_signatures_information: 168 :return: UserSignaturesInformation 169 If the method is called asynchronously, 170 returns the request thread. 171 """ 172 kwargs['_return_http_data_only'] = True 173 if kwargs.get('callback'): 174 return self.create_signatures_with_http_info(account_id, user_id, **kwargs) 175 else: 176 (data) = self.create_signatures_with_http_info(account_id, user_id, **kwargs) 177 return data
Adds user Signature and initials images to a Signature.
Adds a user signature image and/or user initials image to the specified user. The userId property specified in the endpoint must match the authenticated user's userId and the user must be a member of the account. The rules and processes associated with this are: * If Content-Type is set to application/json, then the default behavior for creating a default signature image, based on the name and a DocuSign font, is used. * If Content-Type is set to multipart/form-data, then the request must contain a first part with the user signature information, followed by parts that contain the images. For each Image part, the Content-Disposition header has a "filename" value that is used to map to the signatureName and/or signatureInitials properties in the JSON to the image. For example: Content-Disposition: file; filename="Ron Test20121127083900" If no matching image (by filename value) is found, then the image is not set. One, both, or neither of the signature and initials images can be set with this call. The Content-Transfer-Encoding: base64 header, set in the header for the part containing the image, can be set to indicate that the images are formatted as base64 instead of as binary. If successful, 200-OK is returned, and a JSON structure containing the signature information is provided, note that the signatureId can change with each API POST, PUT, or DELETE since the changes to the signature structure cause the current signature to be closed, and a new signature record to be created.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_signatures(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- UserSignaturesInformation user_signatures_information:
Returns
UserSignaturesInformation If the method is called asynchronously, returns the request thread.
179 def create_signatures_with_http_info(self, account_id, user_id, **kwargs): 180 """ 181 Adds user Signature and initials images to a Signature. 182 Adds a user signature image and/or user initials image to the specified user. The userId property specified in the endpoint must match the authenticated user's userId and the user must be a member of the account. The rules and processes associated with this are: * If Content-Type is set to application/json, then the default behavior for creating a default signature image, based on the name and a DocuSign font, is used. * If Content-Type is set to multipart/form-data, then the request must contain a first part with the user signature information, followed by parts that contain the images. For each Image part, the Content-Disposition header has a \"filename\" value that is used to map to the `signatureName` and/or `signatureInitials` properties in the JSON to the image. For example: `Content-Disposition: file; filename=\"Ron Test20121127083900\"` If no matching image (by filename value) is found, then the image is not set. One, both, or neither of the signature and initials images can be set with this call. The Content-Transfer-Encoding: base64 header, set in the header for the part containing the image, can be set to indicate that the images are formatted as base64 instead of as binary. If successful, 200-OK is returned, and a JSON structure containing the signature information is provided, note that the signatureId can change with each API POST, PUT, or DELETE since the changes to the signature structure cause the current signature to be closed, and a new signature record to be created. 183 This method makes a synchronous HTTP request by default. To make an 184 asynchronous HTTP request, please define a `callback` function 185 to be invoked when receiving the response. 186 >>> def callback_function(response): 187 >>> pprint(response) 188 >>> 189 >>> thread = api.create_signatures_with_http_info(account_id, user_id, callback=callback_function) 190 191 :param callback function: The callback function 192 for asynchronous request. (optional) 193 :param str account_id: The external account number (int) or account ID Guid. (required) 194 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 195 :param UserSignaturesInformation user_signatures_information: 196 :return: UserSignaturesInformation 197 If the method is called asynchronously, 198 returns the request thread. 199 """ 200 201 all_params = ['account_id', 'user_id', 'user_signatures_information'] 202 all_params.append('callback') 203 all_params.append('_return_http_data_only') 204 all_params.append('_preload_content') 205 all_params.append('_request_timeout') 206 207 params = locals() 208 for key, val in iteritems(params['kwargs']): 209 if key not in all_params: 210 raise TypeError( 211 "Got an unexpected keyword argument '%s'" 212 " to method create_signatures" % key 213 ) 214 params[key] = val 215 del params['kwargs'] 216 # verify the required parameter 'account_id' is set 217 if ('account_id' not in params) or (params['account_id'] is None): 218 raise ValueError("Missing the required parameter `account_id` when calling `create_signatures`") 219 # verify the required parameter 'user_id' is set 220 if ('user_id' not in params) or (params['user_id'] is None): 221 raise ValueError("Missing the required parameter `user_id` when calling `create_signatures`") 222 223 224 collection_formats = {} 225 226 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json') 227 path_params = {} 228 if 'account_id' in params: 229 path_params['accountId'] = params['account_id'] 230 if 'user_id' in params: 231 path_params['userId'] = params['user_id'] 232 233 query_params = {} 234 235 header_params = {} 236 237 form_params = [] 238 local_var_files = {} 239 240 body_params = None 241 if 'user_signatures_information' in params: 242 body_params = params['user_signatures_information'] 243 # HTTP header `Accept` 244 header_params['Accept'] = self.api_client.\ 245 select_header_accept(['application/json']) 246 247 # Authentication setting 248 auth_settings = [] 249 250 return self.api_client.call_api(resource_path, 'POST', 251 path_params, 252 query_params, 253 header_params, 254 body=body_params, 255 post_params=form_params, 256 files=local_var_files, 257 response_type='UserSignaturesInformation', 258 auth_settings=auth_settings, 259 callback=params.get('callback'), 260 _return_http_data_only=params.get('_return_http_data_only'), 261 _preload_content=params.get('_preload_content', True), 262 _request_timeout=params.get('_request_timeout'), 263 collection_formats=collection_formats)
Adds user Signature and initials images to a Signature.
Adds a user signature image and/or user initials image to the specified user. The userId property specified in the endpoint must match the authenticated user's userId and the user must be a member of the account. The rules and processes associated with this are: * If Content-Type is set to application/json, then the default behavior for creating a default signature image, based on the name and a DocuSign font, is used. * If Content-Type is set to multipart/form-data, then the request must contain a first part with the user signature information, followed by parts that contain the images. For each Image part, the Content-Disposition header has a "filename" value that is used to map to the signatureName and/or signatureInitials properties in the JSON to the image. For example: Content-Disposition: file; filename="Ron Test20121127083900" If no matching image (by filename value) is found, then the image is not set. One, both, or neither of the signature and initials images can be set with this call. The Content-Transfer-Encoding: base64 header, set in the header for the part containing the image, can be set to indicate that the images are formatted as base64 instead of as binary. If successful, 200-OK is returned, and a JSON structure containing the signature information is provided, note that the signatureId can change with each API POST, PUT, or DELETE since the changes to the signature structure cause the current signature to be closed, and a new signature record to be created.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_signatures_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- UserSignaturesInformation user_signatures_information:
Returns
UserSignaturesInformation If the method is called asynchronously, returns the request thread.
265 def delete(self, account_id, **kwargs): 266 """ 267 Removes users account privileges. 268 This closes one or more user records in the account. Users are never deleted from an account, but closing a user prevents them from using account functions. The response returns whether the API execution was successful (200 - OK) or if it failed. The response contains a user structure similar to the request and includes the user changes. If an error occurred during the DELETE operation for any of the users, the response for that user contains an `errorDetails` node with `errorCode` and `message` properties. 269 This method makes a synchronous HTTP request by default. To make an 270 asynchronous HTTP request, please define a `callback` function 271 to be invoked when receiving the response. 272 >>> def callback_function(response): 273 >>> pprint(response) 274 >>> 275 >>> thread = api.delete(account_id, callback=callback_function) 276 277 :param callback function: The callback function 278 for asynchronous request. (optional) 279 :param str account_id: The external account number (int) or account ID Guid. (required) 280 :param str delete: 281 :param UserInfoList user_info_list: 282 :return: UsersResponse 283 If the method is called asynchronously, 284 returns the request thread. 285 """ 286 kwargs['_return_http_data_only'] = True 287 if kwargs.get('callback'): 288 return self.delete_with_http_info(account_id, **kwargs) 289 else: 290 (data) = self.delete_with_http_info(account_id, **kwargs) 291 return data
Removes users account privileges.
This closes one or more user records in the account. Users are never deleted from an account, but closing a user prevents them from using account functions. The response returns whether the API execution was successful (200 - OK) or if it failed. The response contains a user structure similar to the request and includes the user changes. If an error occurred during the DELETE operation for any of the users, the response for that user contains an errorDetails node with errorCode and message properties.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str delete:
- UserInfoList user_info_list:
Returns
UsersResponse If the method is called asynchronously, returns the request thread.
293 def delete_with_http_info(self, account_id, **kwargs): 294 """ 295 Removes users account privileges. 296 This closes one or more user records in the account. Users are never deleted from an account, but closing a user prevents them from using account functions. The response returns whether the API execution was successful (200 - OK) or if it failed. The response contains a user structure similar to the request and includes the user changes. If an error occurred during the DELETE operation for any of the users, the response for that user contains an `errorDetails` node with `errorCode` and `message` properties. 297 This method makes a synchronous HTTP request by default. To make an 298 asynchronous HTTP request, please define a `callback` function 299 to be invoked when receiving the response. 300 >>> def callback_function(response): 301 >>> pprint(response) 302 >>> 303 >>> thread = api.delete_with_http_info(account_id, callback=callback_function) 304 305 :param callback function: The callback function 306 for asynchronous request. (optional) 307 :param str account_id: The external account number (int) or account ID Guid. (required) 308 :param str delete: 309 :param UserInfoList user_info_list: 310 :return: UsersResponse 311 If the method is called asynchronously, 312 returns the request thread. 313 """ 314 315 all_params = ['account_id', 'delete', 'user_info_list'] 316 all_params.append('callback') 317 all_params.append('_return_http_data_only') 318 all_params.append('_preload_content') 319 all_params.append('_request_timeout') 320 321 params = locals() 322 for key, val in iteritems(params['kwargs']): 323 if key not in all_params: 324 raise TypeError( 325 "Got an unexpected keyword argument '%s'" 326 " to method delete" % key 327 ) 328 params[key] = val 329 del params['kwargs'] 330 # verify the required parameter 'account_id' is set 331 if ('account_id' not in params) or (params['account_id'] is None): 332 raise ValueError("Missing the required parameter `account_id` when calling `delete`") 333 334 335 collection_formats = {} 336 337 resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json') 338 path_params = {} 339 if 'account_id' in params: 340 path_params['accountId'] = params['account_id'] 341 342 query_params = {} 343 if 'delete' in params: 344 query_params['delete'] = params['delete'] 345 346 header_params = {} 347 348 form_params = [] 349 local_var_files = {} 350 351 body_params = None 352 if 'user_info_list' in params: 353 body_params = params['user_info_list'] 354 # HTTP header `Accept` 355 header_params['Accept'] = self.api_client.\ 356 select_header_accept(['application/json']) 357 358 # Authentication setting 359 auth_settings = [] 360 361 return self.api_client.call_api(resource_path, 'DELETE', 362 path_params, 363 query_params, 364 header_params, 365 body=body_params, 366 post_params=form_params, 367 files=local_var_files, 368 response_type='UsersResponse', 369 auth_settings=auth_settings, 370 callback=params.get('callback'), 371 _return_http_data_only=params.get('_return_http_data_only'), 372 _preload_content=params.get('_preload_content', True), 373 _request_timeout=params.get('_request_timeout'), 374 collection_formats=collection_formats)
Removes users account privileges.
This closes one or more user records in the account. Users are never deleted from an account, but closing a user prevents them from using account functions. The response returns whether the API execution was successful (200 - OK) or if it failed. The response contains a user structure similar to the request and includes the user changes. If an error occurred during the DELETE operation for any of the users, the response for that user contains an errorDetails node with errorCode and message properties.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str delete:
- UserInfoList user_info_list:
Returns
UsersResponse If the method is called asynchronously, returns the request thread.
376 def delete_contact_with_id(self, account_id, contact_id, **kwargs): 377 """ 378 Replaces a particular contact associated with an account for the DocuSign service. 379 This method deletes a contact associated with an account. 380 This method makes a synchronous HTTP request by default. To make an 381 asynchronous HTTP request, please define a `callback` function 382 to be invoked when receiving the response. 383 >>> def callback_function(response): 384 >>> pprint(response) 385 >>> 386 >>> thread = api.delete_contact_with_id(account_id, contact_id, callback=callback_function) 387 388 :param callback function: The callback function 389 for asynchronous request. (optional) 390 :param str account_id: The external account number (int) or account ID Guid. (required) 391 :param str contact_id: The unique identifier of a person in the contacts address book. (required) 392 :return: ContactUpdateResponse 393 If the method is called asynchronously, 394 returns the request thread. 395 """ 396 kwargs['_return_http_data_only'] = True 397 if kwargs.get('callback'): 398 return self.delete_contact_with_id_with_http_info(account_id, contact_id, **kwargs) 399 else: 400 (data) = self.delete_contact_with_id_with_http_info(account_id, contact_id, **kwargs) 401 return data
Replaces a particular contact associated with an account for the DocuSign service.
This method deletes a contact associated with an account.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_contact_with_id(account_id, contact_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str contact_id: The unique identifier of a person in the contacts address book. (required)
Returns
ContactUpdateResponse If the method is called asynchronously, returns the request thread.
403 def delete_contact_with_id_with_http_info(self, account_id, contact_id, **kwargs): 404 """ 405 Replaces a particular contact associated with an account for the DocuSign service. 406 This method deletes a contact associated with an account. 407 This method makes a synchronous HTTP request by default. To make an 408 asynchronous HTTP request, please define a `callback` function 409 to be invoked when receiving the response. 410 >>> def callback_function(response): 411 >>> pprint(response) 412 >>> 413 >>> thread = api.delete_contact_with_id_with_http_info(account_id, contact_id, callback=callback_function) 414 415 :param callback function: The callback function 416 for asynchronous request. (optional) 417 :param str account_id: The external account number (int) or account ID Guid. (required) 418 :param str contact_id: The unique identifier of a person in the contacts address book. (required) 419 :return: ContactUpdateResponse 420 If the method is called asynchronously, 421 returns the request thread. 422 """ 423 424 all_params = ['account_id', 'contact_id'] 425 all_params.append('callback') 426 all_params.append('_return_http_data_only') 427 all_params.append('_preload_content') 428 all_params.append('_request_timeout') 429 430 params = locals() 431 for key, val in iteritems(params['kwargs']): 432 if key not in all_params: 433 raise TypeError( 434 "Got an unexpected keyword argument '%s'" 435 " to method delete_contact_with_id" % key 436 ) 437 params[key] = val 438 del params['kwargs'] 439 # verify the required parameter 'account_id' is set 440 if ('account_id' not in params) or (params['account_id'] is None): 441 raise ValueError("Missing the required parameter `account_id` when calling `delete_contact_with_id`") 442 # verify the required parameter 'contact_id' is set 443 if ('contact_id' not in params) or (params['contact_id'] is None): 444 raise ValueError("Missing the required parameter `contact_id` when calling `delete_contact_with_id`") 445 446 447 collection_formats = {} 448 449 resource_path = '/v2.1/accounts/{accountId}/contacts/{contactId}'.replace('{format}', 'json') 450 path_params = {} 451 if 'account_id' in params: 452 path_params['accountId'] = params['account_id'] 453 if 'contact_id' in params: 454 path_params['contactId'] = params['contact_id'] 455 456 query_params = {} 457 458 header_params = {} 459 460 form_params = [] 461 local_var_files = {} 462 463 body_params = None 464 # HTTP header `Accept` 465 header_params['Accept'] = self.api_client.\ 466 select_header_accept(['application/json']) 467 468 # Authentication setting 469 auth_settings = [] 470 471 return self.api_client.call_api(resource_path, 'DELETE', 472 path_params, 473 query_params, 474 header_params, 475 body=body_params, 476 post_params=form_params, 477 files=local_var_files, 478 response_type='ContactUpdateResponse', 479 auth_settings=auth_settings, 480 callback=params.get('callback'), 481 _return_http_data_only=params.get('_return_http_data_only'), 482 _preload_content=params.get('_preload_content', True), 483 _request_timeout=params.get('_request_timeout'), 484 collection_formats=collection_formats)
Replaces a particular contact associated with an account for the DocuSign service.
This method deletes a contact associated with an account.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_contact_with_id_with_http_info(account_id, contact_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str contact_id: The unique identifier of a person in the contacts address book. (required)
Returns
ContactUpdateResponse If the method is called asynchronously, returns the request thread.
486 def delete_contacts(self, account_id, **kwargs): 487 """ 488 Delete contacts associated with an account for the DocuSign service. 489 This method deletes multiple contacts associated with an account. 490 This method makes a synchronous HTTP request by default. To make an 491 asynchronous HTTP request, please define a `callback` function 492 to be invoked when receiving the response. 493 >>> def callback_function(response): 494 >>> pprint(response) 495 >>> 496 >>> thread = api.delete_contacts(account_id, callback=callback_function) 497 498 :param callback function: The callback function 499 for asynchronous request. (optional) 500 :param str account_id: The external account number (int) or account ID Guid. (required) 501 :param ContactModRequest contact_mod_request: 502 :return: ContactUpdateResponse 503 If the method is called asynchronously, 504 returns the request thread. 505 """ 506 kwargs['_return_http_data_only'] = True 507 if kwargs.get('callback'): 508 return self.delete_contacts_with_http_info(account_id, **kwargs) 509 else: 510 (data) = self.delete_contacts_with_http_info(account_id, **kwargs) 511 return data
Delete contacts associated with an account for the DocuSign service.
This method deletes multiple contacts associated with an account.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_contacts(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- ContactModRequest contact_mod_request:
Returns
ContactUpdateResponse If the method is called asynchronously, returns the request thread.
513 def delete_contacts_with_http_info(self, account_id, **kwargs): 514 """ 515 Delete contacts associated with an account for the DocuSign service. 516 This method deletes multiple contacts associated with an account. 517 This method makes a synchronous HTTP request by default. To make an 518 asynchronous HTTP request, please define a `callback` function 519 to be invoked when receiving the response. 520 >>> def callback_function(response): 521 >>> pprint(response) 522 >>> 523 >>> thread = api.delete_contacts_with_http_info(account_id, callback=callback_function) 524 525 :param callback function: The callback function 526 for asynchronous request. (optional) 527 :param str account_id: The external account number (int) or account ID Guid. (required) 528 :param ContactModRequest contact_mod_request: 529 :return: ContactUpdateResponse 530 If the method is called asynchronously, 531 returns the request thread. 532 """ 533 534 all_params = ['account_id', 'contact_mod_request'] 535 all_params.append('callback') 536 all_params.append('_return_http_data_only') 537 all_params.append('_preload_content') 538 all_params.append('_request_timeout') 539 540 params = locals() 541 for key, val in iteritems(params['kwargs']): 542 if key not in all_params: 543 raise TypeError( 544 "Got an unexpected keyword argument '%s'" 545 " to method delete_contacts" % key 546 ) 547 params[key] = val 548 del params['kwargs'] 549 # verify the required parameter 'account_id' is set 550 if ('account_id' not in params) or (params['account_id'] is None): 551 raise ValueError("Missing the required parameter `account_id` when calling `delete_contacts`") 552 553 554 collection_formats = {} 555 556 resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json') 557 path_params = {} 558 if 'account_id' in params: 559 path_params['accountId'] = params['account_id'] 560 561 query_params = {} 562 563 header_params = {} 564 565 form_params = [] 566 local_var_files = {} 567 568 body_params = None 569 if 'contact_mod_request' in params: 570 body_params = params['contact_mod_request'] 571 # HTTP header `Accept` 572 header_params['Accept'] = self.api_client.\ 573 select_header_accept(['application/json']) 574 575 # Authentication setting 576 auth_settings = [] 577 578 return self.api_client.call_api(resource_path, 'DELETE', 579 path_params, 580 query_params, 581 header_params, 582 body=body_params, 583 post_params=form_params, 584 files=local_var_files, 585 response_type='ContactUpdateResponse', 586 auth_settings=auth_settings, 587 callback=params.get('callback'), 588 _return_http_data_only=params.get('_return_http_data_only'), 589 _preload_content=params.get('_preload_content', True), 590 _request_timeout=params.get('_request_timeout'), 591 collection_formats=collection_formats)
Delete contacts associated with an account for the DocuSign service.
This method deletes multiple contacts associated with an account.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_contacts_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- ContactModRequest contact_mod_request:
Returns
ContactUpdateResponse If the method is called asynchronously, returns the request thread.
593 def delete_custom_settings(self, account_id, user_id, **kwargs): 594 """ 595 Deletes custom user settings for a specified user. 596 Deletes the specified custom user settings for a single user. ###Deleting Grouped Custom User Settings### If the custom user settings you want to delete are grouped, you must include the following information in the header, after Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are deleted. 597 This method makes a synchronous HTTP request by default. To make an 598 asynchronous HTTP request, please define a `callback` function 599 to be invoked when receiving the response. 600 >>> def callback_function(response): 601 >>> pprint(response) 602 >>> 603 >>> thread = api.delete_custom_settings(account_id, user_id, callback=callback_function) 604 605 :param callback function: The callback function 606 for asynchronous request. (optional) 607 :param str account_id: The external account number (int) or account ID Guid. (required) 608 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 609 :param CustomSettingsInformation custom_settings_information: 610 :return: CustomSettingsInformation 611 If the method is called asynchronously, 612 returns the request thread. 613 """ 614 kwargs['_return_http_data_only'] = True 615 if kwargs.get('callback'): 616 return self.delete_custom_settings_with_http_info(account_id, user_id, **kwargs) 617 else: 618 (data) = self.delete_custom_settings_with_http_info(account_id, user_id, **kwargs) 619 return data
Deletes custom user settings for a specified user.
Deletes the specified custom user settings for a single user. ###Deleting Grouped Custom User Settings### If the custom user settings you want to delete are grouped, you must include the following information in the header, after Content-Type, in the request: X-DocuSign-User-Settings-Key:group_name Where the group_name is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are deleted.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_custom_settings(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- CustomSettingsInformation custom_settings_information:
Returns
CustomSettingsInformation If the method is called asynchronously, returns the request thread.
621 def delete_custom_settings_with_http_info(self, account_id, user_id, **kwargs): 622 """ 623 Deletes custom user settings for a specified user. 624 Deletes the specified custom user settings for a single user. ###Deleting Grouped Custom User Settings### If the custom user settings you want to delete are grouped, you must include the following information in the header, after Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are deleted. 625 This method makes a synchronous HTTP request by default. To make an 626 asynchronous HTTP request, please define a `callback` function 627 to be invoked when receiving the response. 628 >>> def callback_function(response): 629 >>> pprint(response) 630 >>> 631 >>> thread = api.delete_custom_settings_with_http_info(account_id, user_id, callback=callback_function) 632 633 :param callback function: The callback function 634 for asynchronous request. (optional) 635 :param str account_id: The external account number (int) or account ID Guid. (required) 636 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 637 :param CustomSettingsInformation custom_settings_information: 638 :return: CustomSettingsInformation 639 If the method is called asynchronously, 640 returns the request thread. 641 """ 642 643 all_params = ['account_id', 'user_id', 'custom_settings_information'] 644 all_params.append('callback') 645 all_params.append('_return_http_data_only') 646 all_params.append('_preload_content') 647 all_params.append('_request_timeout') 648 649 params = locals() 650 for key, val in iteritems(params['kwargs']): 651 if key not in all_params: 652 raise TypeError( 653 "Got an unexpected keyword argument '%s'" 654 " to method delete_custom_settings" % key 655 ) 656 params[key] = val 657 del params['kwargs'] 658 # verify the required parameter 'account_id' is set 659 if ('account_id' not in params) or (params['account_id'] is None): 660 raise ValueError("Missing the required parameter `account_id` when calling `delete_custom_settings`") 661 # verify the required parameter 'user_id' is set 662 if ('user_id' not in params) or (params['user_id'] is None): 663 raise ValueError("Missing the required parameter `user_id` when calling `delete_custom_settings`") 664 665 666 collection_formats = {} 667 668 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json') 669 path_params = {} 670 if 'account_id' in params: 671 path_params['accountId'] = params['account_id'] 672 if 'user_id' in params: 673 path_params['userId'] = params['user_id'] 674 675 query_params = {} 676 677 header_params = {} 678 679 form_params = [] 680 local_var_files = {} 681 682 body_params = None 683 if 'custom_settings_information' in params: 684 body_params = params['custom_settings_information'] 685 # HTTP header `Accept` 686 header_params['Accept'] = self.api_client.\ 687 select_header_accept(['application/json']) 688 689 # Authentication setting 690 auth_settings = [] 691 692 return self.api_client.call_api(resource_path, 'DELETE', 693 path_params, 694 query_params, 695 header_params, 696 body=body_params, 697 post_params=form_params, 698 files=local_var_files, 699 response_type='CustomSettingsInformation', 700 auth_settings=auth_settings, 701 callback=params.get('callback'), 702 _return_http_data_only=params.get('_return_http_data_only'), 703 _preload_content=params.get('_preload_content', True), 704 _request_timeout=params.get('_request_timeout'), 705 collection_formats=collection_formats)
Deletes custom user settings for a specified user.
Deletes the specified custom user settings for a single user. ###Deleting Grouped Custom User Settings### If the custom user settings you want to delete are grouped, you must include the following information in the header, after Content-Type, in the request: X-DocuSign-User-Settings-Key:group_name Where the group_name is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are deleted.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_custom_settings_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- CustomSettingsInformation custom_settings_information:
Returns
CustomSettingsInformation If the method is called asynchronously, returns the request thread.
707 def delete_profile_image(self, account_id, user_id, **kwargs): 708 """ 709 Deletes the user profile image for the specified user. 710 Deletes the user profile image from the specified user's profile. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. 711 This method makes a synchronous HTTP request by default. To make an 712 asynchronous HTTP request, please define a `callback` function 713 to be invoked when receiving the response. 714 >>> def callback_function(response): 715 >>> pprint(response) 716 >>> 717 >>> thread = api.delete_profile_image(account_id, user_id, callback=callback_function) 718 719 :param callback function: The callback function 720 for asynchronous request. (optional) 721 :param str account_id: The external account number (int) or account ID Guid. (required) 722 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 723 :return: None 724 If the method is called asynchronously, 725 returns the request thread. 726 """ 727 kwargs['_return_http_data_only'] = True 728 if kwargs.get('callback'): 729 return self.delete_profile_image_with_http_info(account_id, user_id, **kwargs) 730 else: 731 (data) = self.delete_profile_image_with_http_info(account_id, user_id, **kwargs) 732 return data
Deletes the user profile image for the specified user.
Deletes the user profile image from the specified user's profile. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_profile_image(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
None If the method is called asynchronously, returns the request thread.
734 def delete_profile_image_with_http_info(self, account_id, user_id, **kwargs): 735 """ 736 Deletes the user profile image for the specified user. 737 Deletes the user profile image from the specified user's profile. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. 738 This method makes a synchronous HTTP request by default. To make an 739 asynchronous HTTP request, please define a `callback` function 740 to be invoked when receiving the response. 741 >>> def callback_function(response): 742 >>> pprint(response) 743 >>> 744 >>> thread = api.delete_profile_image_with_http_info(account_id, user_id, callback=callback_function) 745 746 :param callback function: The callback function 747 for asynchronous request. (optional) 748 :param str account_id: The external account number (int) or account ID Guid. (required) 749 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 750 :return: None 751 If the method is called asynchronously, 752 returns the request thread. 753 """ 754 755 all_params = ['account_id', 'user_id'] 756 all_params.append('callback') 757 all_params.append('_return_http_data_only') 758 all_params.append('_preload_content') 759 all_params.append('_request_timeout') 760 761 params = locals() 762 for key, val in iteritems(params['kwargs']): 763 if key not in all_params: 764 raise TypeError( 765 "Got an unexpected keyword argument '%s'" 766 " to method delete_profile_image" % key 767 ) 768 params[key] = val 769 del params['kwargs'] 770 # verify the required parameter 'account_id' is set 771 if ('account_id' not in params) or (params['account_id'] is None): 772 raise ValueError("Missing the required parameter `account_id` when calling `delete_profile_image`") 773 # verify the required parameter 'user_id' is set 774 if ('user_id' not in params) or (params['user_id'] is None): 775 raise ValueError("Missing the required parameter `user_id` when calling `delete_profile_image`") 776 777 778 collection_formats = {} 779 780 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json') 781 path_params = {} 782 if 'account_id' in params: 783 path_params['accountId'] = params['account_id'] 784 if 'user_id' in params: 785 path_params['userId'] = params['user_id'] 786 787 query_params = {} 788 789 header_params = {} 790 791 form_params = [] 792 local_var_files = {} 793 794 body_params = None 795 # HTTP header `Accept` 796 header_params['Accept'] = self.api_client.\ 797 select_header_accept(['application/json']) 798 799 # Authentication setting 800 auth_settings = [] 801 802 return self.api_client.call_api(resource_path, 'DELETE', 803 path_params, 804 query_params, 805 header_params, 806 body=body_params, 807 post_params=form_params, 808 files=local_var_files, 809 response_type=None, 810 auth_settings=auth_settings, 811 callback=params.get('callback'), 812 _return_http_data_only=params.get('_return_http_data_only'), 813 _preload_content=params.get('_preload_content', True), 814 _request_timeout=params.get('_request_timeout'), 815 collection_formats=collection_formats)
Deletes the user profile image for the specified user.
Deletes the user profile image from the specified user's profile. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_profile_image_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
None If the method is called asynchronously, returns the request thread.
817 def delete_signature(self, account_id, signature_id, user_id, **kwargs): 818 """ 819 Removes removes signature information for the specified user. 820 Removes the signature information for the user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 821 This method makes a synchronous HTTP request by default. To make an 822 asynchronous HTTP request, please define a `callback` function 823 to be invoked when receiving the response. 824 >>> def callback_function(response): 825 >>> pprint(response) 826 >>> 827 >>> thread = api.delete_signature(account_id, signature_id, user_id, callback=callback_function) 828 829 :param callback function: The callback function 830 for asynchronous request. (optional) 831 :param str account_id: The external account number (int) or account ID Guid. (required) 832 :param str signature_id: The ID of the signature being accessed. (required) 833 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 834 :return: None 835 If the method is called asynchronously, 836 returns the request thread. 837 """ 838 kwargs['_return_http_data_only'] = True 839 if kwargs.get('callback'): 840 return self.delete_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 841 else: 842 (data) = self.delete_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 843 return data
Removes removes signature information for the specified user.
Removes the signature information for the user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith".
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_signature(account_id, signature_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str signature_id: The ID of the signature being accessed. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
None If the method is called asynchronously, returns the request thread.
845 def delete_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs): 846 """ 847 Removes removes signature information for the specified user. 848 Removes the signature information for the user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 849 This method makes a synchronous HTTP request by default. To make an 850 asynchronous HTTP request, please define a `callback` function 851 to be invoked when receiving the response. 852 >>> def callback_function(response): 853 >>> pprint(response) 854 >>> 855 >>> thread = api.delete_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function) 856 857 :param callback function: The callback function 858 for asynchronous request. (optional) 859 :param str account_id: The external account number (int) or account ID Guid. (required) 860 :param str signature_id: The ID of the signature being accessed. (required) 861 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 862 :return: None 863 If the method is called asynchronously, 864 returns the request thread. 865 """ 866 867 all_params = ['account_id', 'signature_id', 'user_id'] 868 all_params.append('callback') 869 all_params.append('_return_http_data_only') 870 all_params.append('_preload_content') 871 all_params.append('_request_timeout') 872 873 params = locals() 874 for key, val in iteritems(params['kwargs']): 875 if key not in all_params: 876 raise TypeError( 877 "Got an unexpected keyword argument '%s'" 878 " to method delete_signature" % key 879 ) 880 params[key] = val 881 del params['kwargs'] 882 # verify the required parameter 'account_id' is set 883 if ('account_id' not in params) or (params['account_id'] is None): 884 raise ValueError("Missing the required parameter `account_id` when calling `delete_signature`") 885 # verify the required parameter 'signature_id' is set 886 if ('signature_id' not in params) or (params['signature_id'] is None): 887 raise ValueError("Missing the required parameter `signature_id` when calling `delete_signature`") 888 # verify the required parameter 'user_id' is set 889 if ('user_id' not in params) or (params['user_id'] is None): 890 raise ValueError("Missing the required parameter `user_id` when calling `delete_signature`") 891 892 893 collection_formats = {} 894 895 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json') 896 path_params = {} 897 if 'account_id' in params: 898 path_params['accountId'] = params['account_id'] 899 if 'signature_id' in params: 900 path_params['signatureId'] = params['signature_id'] 901 if 'user_id' in params: 902 path_params['userId'] = params['user_id'] 903 904 query_params = {} 905 906 header_params = {} 907 908 form_params = [] 909 local_var_files = {} 910 911 body_params = None 912 # HTTP header `Accept` 913 header_params['Accept'] = self.api_client.\ 914 select_header_accept(['application/json']) 915 916 # Authentication setting 917 auth_settings = [] 918 919 return self.api_client.call_api(resource_path, 'DELETE', 920 path_params, 921 query_params, 922 header_params, 923 body=body_params, 924 post_params=form_params, 925 files=local_var_files, 926 response_type=None, 927 auth_settings=auth_settings, 928 callback=params.get('callback'), 929 _return_http_data_only=params.get('_return_http_data_only'), 930 _preload_content=params.get('_preload_content', True), 931 _request_timeout=params.get('_request_timeout'), 932 collection_formats=collection_formats)
Removes removes signature information for the specified user.
Removes the signature information for the user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith".
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str signature_id: The ID of the signature being accessed. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
None If the method is called asynchronously, returns the request thread.
934 def delete_signature_image(self, account_id, image_type, signature_id, user_id, **kwargs): 935 """ 936 Deletes the user initials image or the user signature image for the specified user. 937 Deletes the specified initials image or signature image for the specified user. The function deletes one or the other of the image types, to delete both the initials image and signature image you must call the endpoint twice. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 938 This method makes a synchronous HTTP request by default. To make an 939 asynchronous HTTP request, please define a `callback` function 940 to be invoked when receiving the response. 941 >>> def callback_function(response): 942 >>> pprint(response) 943 >>> 944 >>> thread = api.delete_signature_image(account_id, image_type, signature_id, user_id, callback=callback_function) 945 946 :param callback function: The callback function 947 for asynchronous request. (optional) 948 :param str account_id: The external account number (int) or account ID Guid. (required) 949 :param str image_type: One of **signature_image** or **initials_image**. (required) 950 :param str signature_id: The ID of the signature being accessed. (required) 951 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 952 :return: UserSignature 953 If the method is called asynchronously, 954 returns the request thread. 955 """ 956 kwargs['_return_http_data_only'] = True 957 if kwargs.get('callback'): 958 return self.delete_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs) 959 else: 960 (data) = self.delete_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs) 961 return data
Deletes the user initials image or the user signature image for the specified user.
Deletes the specified initials image or signature image for the specified user. The function deletes one or the other of the image types, to delete both the initials image and signature image you must call the endpoint twice. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith".
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_signature_image(account_id, image_type, signature_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str image_type: One of signature_image or initials_image. (required)
- str signature_id: The ID of the signature being accessed. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
UserSignature If the method is called asynchronously, returns the request thread.
963 def delete_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, **kwargs): 964 """ 965 Deletes the user initials image or the user signature image for the specified user. 966 Deletes the specified initials image or signature image for the specified user. The function deletes one or the other of the image types, to delete both the initials image and signature image you must call the endpoint twice. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 967 This method makes a synchronous HTTP request by default. To make an 968 asynchronous HTTP request, please define a `callback` function 969 to be invoked when receiving the response. 970 >>> def callback_function(response): 971 >>> pprint(response) 972 >>> 973 >>> thread = api.delete_signature_image_with_http_info(account_id, image_type, signature_id, user_id, callback=callback_function) 974 975 :param callback function: The callback function 976 for asynchronous request. (optional) 977 :param str account_id: The external account number (int) or account ID Guid. (required) 978 :param str image_type: One of **signature_image** or **initials_image**. (required) 979 :param str signature_id: The ID of the signature being accessed. (required) 980 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 981 :return: UserSignature 982 If the method is called asynchronously, 983 returns the request thread. 984 """ 985 986 all_params = ['account_id', 'image_type', 'signature_id', 'user_id'] 987 all_params.append('callback') 988 all_params.append('_return_http_data_only') 989 all_params.append('_preload_content') 990 all_params.append('_request_timeout') 991 992 params = locals() 993 for key, val in iteritems(params['kwargs']): 994 if key not in all_params: 995 raise TypeError( 996 "Got an unexpected keyword argument '%s'" 997 " to method delete_signature_image" % key 998 ) 999 params[key] = val 1000 del params['kwargs'] 1001 # verify the required parameter 'account_id' is set 1002 if ('account_id' not in params) or (params['account_id'] is None): 1003 raise ValueError("Missing the required parameter `account_id` when calling `delete_signature_image`") 1004 # verify the required parameter 'image_type' is set 1005 if ('image_type' not in params) or (params['image_type'] is None): 1006 raise ValueError("Missing the required parameter `image_type` when calling `delete_signature_image`") 1007 # verify the required parameter 'signature_id' is set 1008 if ('signature_id' not in params) or (params['signature_id'] is None): 1009 raise ValueError("Missing the required parameter `signature_id` when calling `delete_signature_image`") 1010 # verify the required parameter 'user_id' is set 1011 if ('user_id' not in params) or (params['user_id'] is None): 1012 raise ValueError("Missing the required parameter `user_id` when calling `delete_signature_image`") 1013 1014 1015 collection_formats = {} 1016 1017 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json') 1018 path_params = {} 1019 if 'account_id' in params: 1020 path_params['accountId'] = params['account_id'] 1021 if 'image_type' in params: 1022 path_params['imageType'] = params['image_type'] 1023 if 'signature_id' in params: 1024 path_params['signatureId'] = params['signature_id'] 1025 if 'user_id' in params: 1026 path_params['userId'] = params['user_id'] 1027 1028 query_params = {} 1029 1030 header_params = {} 1031 1032 form_params = [] 1033 local_var_files = {} 1034 1035 body_params = None 1036 # HTTP header `Accept` 1037 header_params['Accept'] = self.api_client.\ 1038 select_header_accept(['application/json']) 1039 1040 # Authentication setting 1041 auth_settings = [] 1042 1043 return self.api_client.call_api(resource_path, 'DELETE', 1044 path_params, 1045 query_params, 1046 header_params, 1047 body=body_params, 1048 post_params=form_params, 1049 files=local_var_files, 1050 response_type='UserSignature', 1051 auth_settings=auth_settings, 1052 callback=params.get('callback'), 1053 _return_http_data_only=params.get('_return_http_data_only'), 1054 _preload_content=params.get('_preload_content', True), 1055 _request_timeout=params.get('_request_timeout'), 1056 collection_formats=collection_formats)
Deletes the user initials image or the user signature image for the specified user.
Deletes the specified initials image or signature image for the specified user. The function deletes one or the other of the image types, to delete both the initials image and signature image you must call the endpoint twice. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith".
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.delete_signature_image_with_http_info(account_id, image_type, signature_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str image_type: One of signature_image or initials_image. (required)
- str signature_id: The ID of the signature being accessed. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
UserSignature If the method is called asynchronously, returns the request thread.
1058 def get_contact_by_id(self, account_id, contact_id, **kwargs): 1059 """ 1060 Gets a particular contact associated with the user's account. 1061 This method returns one or more contacts associated with a DocuSign account. You can also retrieve contacts from connected [cloud storage][CloudStorage] providers by using the `cloud_provider` query parameter. By default, contacts are retrieved from the DocuSign account's default address book. To return a specific contact, use the `contactId` query parameter. To return all contacts associated with an account, omit this parameter. [CloudStorage]: /docs/esign-rest-api/reference/cloudstorage/ 1062 This method makes a synchronous HTTP request by default. To make an 1063 asynchronous HTTP request, please define a `callback` function 1064 to be invoked when receiving the response. 1065 >>> def callback_function(response): 1066 >>> pprint(response) 1067 >>> 1068 >>> thread = api.get_contact_by_id(account_id, contact_id, callback=callback_function) 1069 1070 :param callback function: The callback function 1071 for asynchronous request. (optional) 1072 :param str account_id: The external account number (int) or account ID Guid. (required) 1073 :param str contact_id: The unique identifier of a person in the contacts address book. (required) 1074 :param str cloud_provider: 1075 :return: ContactGetResponse 1076 If the method is called asynchronously, 1077 returns the request thread. 1078 """ 1079 kwargs['_return_http_data_only'] = True 1080 if kwargs.get('callback'): 1081 return self.get_contact_by_id_with_http_info(account_id, contact_id, **kwargs) 1082 else: 1083 (data) = self.get_contact_by_id_with_http_info(account_id, contact_id, **kwargs) 1084 return data
Gets a particular contact associated with the user's account.
This method returns one or more contacts associated with a DocuSign account. You can also retrieve contacts from connected [cloud storage][CloudStorage] providers by using the cloud_provider query parameter. By default, contacts are retrieved from the DocuSign account's default address book. To return a specific contact, use the contactId query parameter. To return all contacts associated with an account, omit this parameter. [CloudStorage]: /docs/esign-rest-api/reference/cloudstorage/
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_contact_by_id(account_id, contact_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str contact_id: The unique identifier of a person in the contacts address book. (required)
- str cloud_provider:
Returns
ContactGetResponse If the method is called asynchronously, returns the request thread.
1086 def get_contact_by_id_with_http_info(self, account_id, contact_id, **kwargs): 1087 """ 1088 Gets a particular contact associated with the user's account. 1089 This method returns one or more contacts associated with a DocuSign account. You can also retrieve contacts from connected [cloud storage][CloudStorage] providers by using the `cloud_provider` query parameter. By default, contacts are retrieved from the DocuSign account's default address book. To return a specific contact, use the `contactId` query parameter. To return all contacts associated with an account, omit this parameter. [CloudStorage]: /docs/esign-rest-api/reference/cloudstorage/ 1090 This method makes a synchronous HTTP request by default. To make an 1091 asynchronous HTTP request, please define a `callback` function 1092 to be invoked when receiving the response. 1093 >>> def callback_function(response): 1094 >>> pprint(response) 1095 >>> 1096 >>> thread = api.get_contact_by_id_with_http_info(account_id, contact_id, callback=callback_function) 1097 1098 :param callback function: The callback function 1099 for asynchronous request. (optional) 1100 :param str account_id: The external account number (int) or account ID Guid. (required) 1101 :param str contact_id: The unique identifier of a person in the contacts address book. (required) 1102 :param str cloud_provider: 1103 :return: ContactGetResponse 1104 If the method is called asynchronously, 1105 returns the request thread. 1106 """ 1107 1108 all_params = ['account_id', 'contact_id', 'cloud_provider'] 1109 all_params.append('callback') 1110 all_params.append('_return_http_data_only') 1111 all_params.append('_preload_content') 1112 all_params.append('_request_timeout') 1113 1114 params = locals() 1115 for key, val in iteritems(params['kwargs']): 1116 if key not in all_params: 1117 raise TypeError( 1118 "Got an unexpected keyword argument '%s'" 1119 " to method get_contact_by_id" % key 1120 ) 1121 params[key] = val 1122 del params['kwargs'] 1123 # verify the required parameter 'account_id' is set 1124 if ('account_id' not in params) or (params['account_id'] is None): 1125 raise ValueError("Missing the required parameter `account_id` when calling `get_contact_by_id`") 1126 # verify the required parameter 'contact_id' is set 1127 if ('contact_id' not in params) or (params['contact_id'] is None): 1128 raise ValueError("Missing the required parameter `contact_id` when calling `get_contact_by_id`") 1129 1130 1131 collection_formats = {} 1132 1133 resource_path = '/v2.1/accounts/{accountId}/contacts/{contactId}'.replace('{format}', 'json') 1134 path_params = {} 1135 if 'account_id' in params: 1136 path_params['accountId'] = params['account_id'] 1137 if 'contact_id' in params: 1138 path_params['contactId'] = params['contact_id'] 1139 1140 query_params = {} 1141 if 'cloud_provider' in params: 1142 query_params['cloud_provider'] = params['cloud_provider'] 1143 1144 header_params = {} 1145 1146 form_params = [] 1147 local_var_files = {} 1148 1149 body_params = None 1150 # HTTP header `Accept` 1151 header_params['Accept'] = self.api_client.\ 1152 select_header_accept(['application/json']) 1153 1154 # Authentication setting 1155 auth_settings = [] 1156 1157 return self.api_client.call_api(resource_path, 'GET', 1158 path_params, 1159 query_params, 1160 header_params, 1161 body=body_params, 1162 post_params=form_params, 1163 files=local_var_files, 1164 response_type='ContactGetResponse', 1165 auth_settings=auth_settings, 1166 callback=params.get('callback'), 1167 _return_http_data_only=params.get('_return_http_data_only'), 1168 _preload_content=params.get('_preload_content', True), 1169 _request_timeout=params.get('_request_timeout'), 1170 collection_formats=collection_formats)
Gets a particular contact associated with the user's account.
This method returns one or more contacts associated with a DocuSign account. You can also retrieve contacts from connected [cloud storage][CloudStorage] providers by using the cloud_provider query parameter. By default, contacts are retrieved from the DocuSign account's default address book. To return a specific contact, use the contactId query parameter. To return all contacts associated with an account, omit this parameter. [CloudStorage]: /docs/esign-rest-api/reference/cloudstorage/
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_contact_by_id_with_http_info(account_id, contact_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str contact_id: The unique identifier of a person in the contacts address book. (required)
- str cloud_provider:
Returns
ContactGetResponse If the method is called asynchronously, returns the request thread.
1172 def get_information(self, account_id, user_id, **kwargs): 1173 """ 1174 Gets the user information for a specified user. 1175 Retrieves the user information for the specified user. To return additional user information that details the last login date, login status, and the user's password expiration date, set the optional `additional_info` query string parameter to **true**. 1176 This method makes a synchronous HTTP request by default. To make an 1177 asynchronous HTTP request, please define a `callback` function 1178 to be invoked when receiving the response. 1179 >>> def callback_function(response): 1180 >>> pprint(response) 1181 >>> 1182 >>> thread = api.get_information(account_id, user_id, callback=callback_function) 1183 1184 :param callback function: The callback function 1185 for asynchronous request. (optional) 1186 :param str account_id: The external account number (int) or account ID Guid. (required) 1187 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1188 :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account. 1189 :param str email: 1190 :param str include_license: 1191 :return: UserInformation 1192 If the method is called asynchronously, 1193 returns the request thread. 1194 """ 1195 kwargs['_return_http_data_only'] = True 1196 if kwargs.get('callback'): 1197 return self.get_information_with_http_info(account_id, user_id, **kwargs) 1198 else: 1199 (data) = self.get_information_with_http_info(account_id, user_id, **kwargs) 1200 return data
Gets the user information for a specified user.
Retrieves the user information for the specified user. To return additional user information that details the last login date, login status, and the user's password expiration date, set the optional additional_info query string parameter to true.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_information(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str additional_info: When set to true, the full list of user information is returned for each user in the account.
- str email:
- str include_license:
Returns
UserInformation If the method is called asynchronously, returns the request thread.
1202 def get_information_with_http_info(self, account_id, user_id, **kwargs): 1203 """ 1204 Gets the user information for a specified user. 1205 Retrieves the user information for the specified user. To return additional user information that details the last login date, login status, and the user's password expiration date, set the optional `additional_info` query string parameter to **true**. 1206 This method makes a synchronous HTTP request by default. To make an 1207 asynchronous HTTP request, please define a `callback` function 1208 to be invoked when receiving the response. 1209 >>> def callback_function(response): 1210 >>> pprint(response) 1211 >>> 1212 >>> thread = api.get_information_with_http_info(account_id, user_id, callback=callback_function) 1213 1214 :param callback function: The callback function 1215 for asynchronous request. (optional) 1216 :param str account_id: The external account number (int) or account ID Guid. (required) 1217 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1218 :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account. 1219 :param str email: 1220 :param str include_license: 1221 :return: UserInformation 1222 If the method is called asynchronously, 1223 returns the request thread. 1224 """ 1225 1226 all_params = ['account_id', 'user_id', 'additional_info', 'email', 'include_license'] 1227 all_params.append('callback') 1228 all_params.append('_return_http_data_only') 1229 all_params.append('_preload_content') 1230 all_params.append('_request_timeout') 1231 1232 params = locals() 1233 for key, val in iteritems(params['kwargs']): 1234 if key not in all_params: 1235 raise TypeError( 1236 "Got an unexpected keyword argument '%s'" 1237 " to method get_information" % key 1238 ) 1239 params[key] = val 1240 del params['kwargs'] 1241 # verify the required parameter 'account_id' is set 1242 if ('account_id' not in params) or (params['account_id'] is None): 1243 raise ValueError("Missing the required parameter `account_id` when calling `get_information`") 1244 # verify the required parameter 'user_id' is set 1245 if ('user_id' not in params) or (params['user_id'] is None): 1246 raise ValueError("Missing the required parameter `user_id` when calling `get_information`") 1247 1248 1249 collection_formats = {} 1250 1251 resource_path = '/v2.1/accounts/{accountId}/users/{userId}'.replace('{format}', 'json') 1252 path_params = {} 1253 if 'account_id' in params: 1254 path_params['accountId'] = params['account_id'] 1255 if 'user_id' in params: 1256 path_params['userId'] = params['user_id'] 1257 1258 query_params = {} 1259 if 'additional_info' in params: 1260 query_params['additional_info'] = params['additional_info'] 1261 if 'email' in params: 1262 query_params['email'] = params['email'] 1263 if 'include_license' in params: 1264 query_params['include_license'] = params['include_license'] 1265 1266 header_params = {} 1267 1268 form_params = [] 1269 local_var_files = {} 1270 1271 body_params = None 1272 # HTTP header `Accept` 1273 header_params['Accept'] = self.api_client.\ 1274 select_header_accept(['application/json']) 1275 1276 # Authentication setting 1277 auth_settings = [] 1278 1279 return self.api_client.call_api(resource_path, 'GET', 1280 path_params, 1281 query_params, 1282 header_params, 1283 body=body_params, 1284 post_params=form_params, 1285 files=local_var_files, 1286 response_type='UserInformation', 1287 auth_settings=auth_settings, 1288 callback=params.get('callback'), 1289 _return_http_data_only=params.get('_return_http_data_only'), 1290 _preload_content=params.get('_preload_content', True), 1291 _request_timeout=params.get('_request_timeout'), 1292 collection_formats=collection_formats)
Gets the user information for a specified user.
Retrieves the user information for the specified user. To return additional user information that details the last login date, login status, and the user's password expiration date, set the optional additional_info query string parameter to true.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_information_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str additional_info: When set to true, the full list of user information is returned for each user in the account.
- str email:
- str include_license:
Returns
UserInformation If the method is called asynchronously, returns the request thread.
1294 def get_profile(self, account_id, user_id, **kwargs): 1295 """ 1296 Retrieves the user profile for a specified user. 1297 Retrieves the user profile information, the privacy settings and personal information (address, phone number, etc.) for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. 1298 This method makes a synchronous HTTP request by default. To make an 1299 asynchronous HTTP request, please define a `callback` function 1300 to be invoked when receiving the response. 1301 >>> def callback_function(response): 1302 >>> pprint(response) 1303 >>> 1304 >>> thread = api.get_profile(account_id, user_id, callback=callback_function) 1305 1306 :param callback function: The callback function 1307 for asynchronous request. (optional) 1308 :param str account_id: The external account number (int) or account ID Guid. (required) 1309 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1310 :return: UserProfile 1311 If the method is called asynchronously, 1312 returns the request thread. 1313 """ 1314 kwargs['_return_http_data_only'] = True 1315 if kwargs.get('callback'): 1316 return self.get_profile_with_http_info(account_id, user_id, **kwargs) 1317 else: 1318 (data) = self.get_profile_with_http_info(account_id, user_id, **kwargs) 1319 return data
Retrieves the user profile for a specified user.
Retrieves the user profile information, the privacy settings and personal information (address, phone number, etc.) for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_profile(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
UserProfile If the method is called asynchronously, returns the request thread.
1321 def get_profile_with_http_info(self, account_id, user_id, **kwargs): 1322 """ 1323 Retrieves the user profile for a specified user. 1324 Retrieves the user profile information, the privacy settings and personal information (address, phone number, etc.) for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. 1325 This method makes a synchronous HTTP request by default. To make an 1326 asynchronous HTTP request, please define a `callback` function 1327 to be invoked when receiving the response. 1328 >>> def callback_function(response): 1329 >>> pprint(response) 1330 >>> 1331 >>> thread = api.get_profile_with_http_info(account_id, user_id, callback=callback_function) 1332 1333 :param callback function: The callback function 1334 for asynchronous request. (optional) 1335 :param str account_id: The external account number (int) or account ID Guid. (required) 1336 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1337 :return: UserProfile 1338 If the method is called asynchronously, 1339 returns the request thread. 1340 """ 1341 1342 all_params = ['account_id', 'user_id'] 1343 all_params.append('callback') 1344 all_params.append('_return_http_data_only') 1345 all_params.append('_preload_content') 1346 all_params.append('_request_timeout') 1347 1348 params = locals() 1349 for key, val in iteritems(params['kwargs']): 1350 if key not in all_params: 1351 raise TypeError( 1352 "Got an unexpected keyword argument '%s'" 1353 " to method get_profile" % key 1354 ) 1355 params[key] = val 1356 del params['kwargs'] 1357 # verify the required parameter 'account_id' is set 1358 if ('account_id' not in params) or (params['account_id'] is None): 1359 raise ValueError("Missing the required parameter `account_id` when calling `get_profile`") 1360 # verify the required parameter 'user_id' is set 1361 if ('user_id' not in params) or (params['user_id'] is None): 1362 raise ValueError("Missing the required parameter `user_id` when calling `get_profile`") 1363 1364 1365 collection_formats = {} 1366 1367 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile'.replace('{format}', 'json') 1368 path_params = {} 1369 if 'account_id' in params: 1370 path_params['accountId'] = params['account_id'] 1371 if 'user_id' in params: 1372 path_params['userId'] = params['user_id'] 1373 1374 query_params = {} 1375 1376 header_params = {} 1377 1378 form_params = [] 1379 local_var_files = {} 1380 1381 body_params = None 1382 # HTTP header `Accept` 1383 header_params['Accept'] = self.api_client.\ 1384 select_header_accept(['application/json']) 1385 1386 # Authentication setting 1387 auth_settings = [] 1388 1389 return self.api_client.call_api(resource_path, 'GET', 1390 path_params, 1391 query_params, 1392 header_params, 1393 body=body_params, 1394 post_params=form_params, 1395 files=local_var_files, 1396 response_type='UserProfile', 1397 auth_settings=auth_settings, 1398 callback=params.get('callback'), 1399 _return_http_data_only=params.get('_return_http_data_only'), 1400 _preload_content=params.get('_preload_content', True), 1401 _request_timeout=params.get('_request_timeout'), 1402 collection_formats=collection_formats)
Retrieves the user profile for a specified user.
Retrieves the user profile information, the privacy settings and personal information (address, phone number, etc.) for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_profile_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
UserProfile If the method is called asynchronously, returns the request thread.
1404 def get_profile_image(self, account_id, user_id, **kwargs): 1405 """ 1406 Retrieves the user profile image for the specified user. 1407 Retrieves the user profile picture for the specified user. The image is returned in the same format as uploaded. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. If successful, the response returns a 200 - OK and the user profile image. 1408 This method makes a synchronous HTTP request by default. To make an 1409 asynchronous HTTP request, please define a `callback` function 1410 to be invoked when receiving the response. 1411 >>> def callback_function(response): 1412 >>> pprint(response) 1413 >>> 1414 >>> thread = api.get_profile_image(account_id, user_id, callback=callback_function) 1415 1416 :param callback function: The callback function 1417 for asynchronous request. (optional) 1418 :param str account_id: The external account number (int) or account ID Guid. (required) 1419 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1420 :param str encoding: 1421 :return: file 1422 If the method is called asynchronously, 1423 returns the request thread. 1424 """ 1425 kwargs['_return_http_data_only'] = True 1426 if kwargs.get('callback'): 1427 return self.get_profile_image_with_http_info(account_id, user_id, **kwargs) 1428 else: 1429 (data) = self.get_profile_image_with_http_info(account_id, user_id, **kwargs) 1430 return data
Retrieves the user profile image for the specified user.
Retrieves the user profile picture for the specified user. The image is returned in the same format as uploaded. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. If successful, the response returns a 200 - OK and the user profile image.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_profile_image(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str encoding:
Returns
file If the method is called asynchronously, returns the request thread.
1432 def get_profile_image_with_http_info(self, account_id, user_id, **kwargs): 1433 """ 1434 Retrieves the user profile image for the specified user. 1435 Retrieves the user profile picture for the specified user. The image is returned in the same format as uploaded. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. If successful, the response returns a 200 - OK and the user profile image. 1436 This method makes a synchronous HTTP request by default. To make an 1437 asynchronous HTTP request, please define a `callback` function 1438 to be invoked when receiving the response. 1439 >>> def callback_function(response): 1440 >>> pprint(response) 1441 >>> 1442 >>> thread = api.get_profile_image_with_http_info(account_id, user_id, callback=callback_function) 1443 1444 :param callback function: The callback function 1445 for asynchronous request. (optional) 1446 :param str account_id: The external account number (int) or account ID Guid. (required) 1447 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1448 :param str encoding: 1449 :return: file 1450 If the method is called asynchronously, 1451 returns the request thread. 1452 """ 1453 1454 all_params = ['account_id', 'user_id', 'encoding'] 1455 all_params.append('callback') 1456 all_params.append('_return_http_data_only') 1457 all_params.append('_preload_content') 1458 all_params.append('_request_timeout') 1459 1460 params = locals() 1461 for key, val in iteritems(params['kwargs']): 1462 if key not in all_params: 1463 raise TypeError( 1464 "Got an unexpected keyword argument '%s'" 1465 " to method get_profile_image" % key 1466 ) 1467 params[key] = val 1468 del params['kwargs'] 1469 # verify the required parameter 'account_id' is set 1470 if ('account_id' not in params) or (params['account_id'] is None): 1471 raise ValueError("Missing the required parameter `account_id` when calling `get_profile_image`") 1472 # verify the required parameter 'user_id' is set 1473 if ('user_id' not in params) or (params['user_id'] is None): 1474 raise ValueError("Missing the required parameter `user_id` when calling `get_profile_image`") 1475 1476 1477 collection_formats = {} 1478 1479 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json') 1480 path_params = {} 1481 if 'account_id' in params: 1482 path_params['accountId'] = params['account_id'] 1483 if 'user_id' in params: 1484 path_params['userId'] = params['user_id'] 1485 1486 query_params = {} 1487 if 'encoding' in params: 1488 query_params['encoding'] = params['encoding'] 1489 1490 header_params = {} 1491 1492 form_params = [] 1493 local_var_files = {} 1494 1495 body_params = None 1496 # HTTP header `Accept` 1497 header_params['Accept'] = self.api_client.\ 1498 select_header_accept(['image/gif']) 1499 1500 # Authentication setting 1501 auth_settings = [] 1502 1503 return self.api_client.call_api(resource_path, 'GET', 1504 path_params, 1505 query_params, 1506 header_params, 1507 body=body_params, 1508 post_params=form_params, 1509 files=local_var_files, 1510 response_type='file', 1511 auth_settings=auth_settings, 1512 callback=params.get('callback'), 1513 _return_http_data_only=params.get('_return_http_data_only'), 1514 _preload_content=params.get('_preload_content', True), 1515 _request_timeout=params.get('_request_timeout'), 1516 collection_formats=collection_formats)
Retrieves the user profile image for the specified user.
Retrieves the user profile picture for the specified user. The image is returned in the same format as uploaded. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the specified account. If successful, the response returns a 200 - OK and the user profile image.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_profile_image_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str encoding:
Returns
file If the method is called asynchronously, returns the request thread.
1518 def get_settings(self, account_id, user_id, **kwargs): 1519 """ 1520 Gets the user account settings for a specified user. 1521 Retrieves a list of the account settings and email notification information for the specified user. The response returns the account setting name/value information and the email notification settings for the specified user. For more information about the different user settings, see the [ML:userSettings list]. 1522 This method makes a synchronous HTTP request by default. To make an 1523 asynchronous HTTP request, please define a `callback` function 1524 to be invoked when receiving the response. 1525 >>> def callback_function(response): 1526 >>> pprint(response) 1527 >>> 1528 >>> thread = api.get_settings(account_id, user_id, callback=callback_function) 1529 1530 :param callback function: The callback function 1531 for asynchronous request. (optional) 1532 :param str account_id: The external account number (int) or account ID Guid. (required) 1533 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1534 :return: UserSettingsInformation 1535 If the method is called asynchronously, 1536 returns the request thread. 1537 """ 1538 kwargs['_return_http_data_only'] = True 1539 if kwargs.get('callback'): 1540 return self.get_settings_with_http_info(account_id, user_id, **kwargs) 1541 else: 1542 (data) = self.get_settings_with_http_info(account_id, user_id, **kwargs) 1543 return data
Gets the user account settings for a specified user.
Retrieves a list of the account settings and email notification information for the specified user. The response returns the account setting name/value information and the email notification settings for the specified user. For more information about the different user settings, see the [ML:userSettings list].
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_settings(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
UserSettingsInformation If the method is called asynchronously, returns the request thread.
1545 def get_settings_with_http_info(self, account_id, user_id, **kwargs): 1546 """ 1547 Gets the user account settings for a specified user. 1548 Retrieves a list of the account settings and email notification information for the specified user. The response returns the account setting name/value information and the email notification settings for the specified user. For more information about the different user settings, see the [ML:userSettings list]. 1549 This method makes a synchronous HTTP request by default. To make an 1550 asynchronous HTTP request, please define a `callback` function 1551 to be invoked when receiving the response. 1552 >>> def callback_function(response): 1553 >>> pprint(response) 1554 >>> 1555 >>> thread = api.get_settings_with_http_info(account_id, user_id, callback=callback_function) 1556 1557 :param callback function: The callback function 1558 for asynchronous request. (optional) 1559 :param str account_id: The external account number (int) or account ID Guid. (required) 1560 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1561 :return: UserSettingsInformation 1562 If the method is called asynchronously, 1563 returns the request thread. 1564 """ 1565 1566 all_params = ['account_id', 'user_id'] 1567 all_params.append('callback') 1568 all_params.append('_return_http_data_only') 1569 all_params.append('_preload_content') 1570 all_params.append('_request_timeout') 1571 1572 params = locals() 1573 for key, val in iteritems(params['kwargs']): 1574 if key not in all_params: 1575 raise TypeError( 1576 "Got an unexpected keyword argument '%s'" 1577 " to method get_settings" % key 1578 ) 1579 params[key] = val 1580 del params['kwargs'] 1581 # verify the required parameter 'account_id' is set 1582 if ('account_id' not in params) or (params['account_id'] is None): 1583 raise ValueError("Missing the required parameter `account_id` when calling `get_settings`") 1584 # verify the required parameter 'user_id' is set 1585 if ('user_id' not in params) or (params['user_id'] is None): 1586 raise ValueError("Missing the required parameter `user_id` when calling `get_settings`") 1587 1588 1589 collection_formats = {} 1590 1591 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/settings'.replace('{format}', 'json') 1592 path_params = {} 1593 if 'account_id' in params: 1594 path_params['accountId'] = params['account_id'] 1595 if 'user_id' in params: 1596 path_params['userId'] = params['user_id'] 1597 1598 query_params = {} 1599 1600 header_params = {} 1601 1602 form_params = [] 1603 local_var_files = {} 1604 1605 body_params = None 1606 # HTTP header `Accept` 1607 header_params['Accept'] = self.api_client.\ 1608 select_header_accept(['application/json']) 1609 1610 # Authentication setting 1611 auth_settings = [] 1612 1613 return self.api_client.call_api(resource_path, 'GET', 1614 path_params, 1615 query_params, 1616 header_params, 1617 body=body_params, 1618 post_params=form_params, 1619 files=local_var_files, 1620 response_type='UserSettingsInformation', 1621 auth_settings=auth_settings, 1622 callback=params.get('callback'), 1623 _return_http_data_only=params.get('_return_http_data_only'), 1624 _preload_content=params.get('_preload_content', True), 1625 _request_timeout=params.get('_request_timeout'), 1626 collection_formats=collection_formats)
Gets the user account settings for a specified user.
Retrieves a list of the account settings and email notification information for the specified user. The response returns the account setting name/value information and the email notification settings for the specified user. For more information about the different user settings, see the [ML:userSettings list].
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_settings_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
UserSettingsInformation If the method is called asynchronously, returns the request thread.
1628 def get_signature(self, account_id, signature_id, user_id, **kwargs): 1629 """ 1630 Gets the user signature information for the specified user. 1631 Retrieves the structure of a single signature with a known signature name. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 1632 This method makes a synchronous HTTP request by default. To make an 1633 asynchronous HTTP request, please define a `callback` function 1634 to be invoked when receiving the response. 1635 >>> def callback_function(response): 1636 >>> pprint(response) 1637 >>> 1638 >>> thread = api.get_signature(account_id, signature_id, user_id, callback=callback_function) 1639 1640 :param callback function: The callback function 1641 for asynchronous request. (optional) 1642 :param str account_id: The external account number (int) or account ID Guid. (required) 1643 :param str signature_id: The ID of the signature being accessed. (required) 1644 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1645 :return: UserSignature 1646 If the method is called asynchronously, 1647 returns the request thread. 1648 """ 1649 kwargs['_return_http_data_only'] = True 1650 if kwargs.get('callback'): 1651 return self.get_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 1652 else: 1653 (data) = self.get_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 1654 return data
Gets the user signature information for the specified user.
Retrieves the structure of a single signature with a known signature name. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith".
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_signature(account_id, signature_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str signature_id: The ID of the signature being accessed. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
UserSignature If the method is called asynchronously, returns the request thread.
1656 def get_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs): 1657 """ 1658 Gets the user signature information for the specified user. 1659 Retrieves the structure of a single signature with a known signature name. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 1660 This method makes a synchronous HTTP request by default. To make an 1661 asynchronous HTTP request, please define a `callback` function 1662 to be invoked when receiving the response. 1663 >>> def callback_function(response): 1664 >>> pprint(response) 1665 >>> 1666 >>> thread = api.get_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function) 1667 1668 :param callback function: The callback function 1669 for asynchronous request. (optional) 1670 :param str account_id: The external account number (int) or account ID Guid. (required) 1671 :param str signature_id: The ID of the signature being accessed. (required) 1672 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1673 :return: UserSignature 1674 If the method is called asynchronously, 1675 returns the request thread. 1676 """ 1677 1678 all_params = ['account_id', 'signature_id', 'user_id'] 1679 all_params.append('callback') 1680 all_params.append('_return_http_data_only') 1681 all_params.append('_preload_content') 1682 all_params.append('_request_timeout') 1683 1684 params = locals() 1685 for key, val in iteritems(params['kwargs']): 1686 if key not in all_params: 1687 raise TypeError( 1688 "Got an unexpected keyword argument '%s'" 1689 " to method get_signature" % key 1690 ) 1691 params[key] = val 1692 del params['kwargs'] 1693 # verify the required parameter 'account_id' is set 1694 if ('account_id' not in params) or (params['account_id'] is None): 1695 raise ValueError("Missing the required parameter `account_id` when calling `get_signature`") 1696 # verify the required parameter 'signature_id' is set 1697 if ('signature_id' not in params) or (params['signature_id'] is None): 1698 raise ValueError("Missing the required parameter `signature_id` when calling `get_signature`") 1699 # verify the required parameter 'user_id' is set 1700 if ('user_id' not in params) or (params['user_id'] is None): 1701 raise ValueError("Missing the required parameter `user_id` when calling `get_signature`") 1702 1703 1704 collection_formats = {} 1705 1706 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json') 1707 path_params = {} 1708 if 'account_id' in params: 1709 path_params['accountId'] = params['account_id'] 1710 if 'signature_id' in params: 1711 path_params['signatureId'] = params['signature_id'] 1712 if 'user_id' in params: 1713 path_params['userId'] = params['user_id'] 1714 1715 query_params = {} 1716 1717 header_params = {} 1718 1719 form_params = [] 1720 local_var_files = {} 1721 1722 body_params = None 1723 # HTTP header `Accept` 1724 header_params['Accept'] = self.api_client.\ 1725 select_header_accept(['application/json']) 1726 1727 # Authentication setting 1728 auth_settings = [] 1729 1730 return self.api_client.call_api(resource_path, 'GET', 1731 path_params, 1732 query_params, 1733 header_params, 1734 body=body_params, 1735 post_params=form_params, 1736 files=local_var_files, 1737 response_type='UserSignature', 1738 auth_settings=auth_settings, 1739 callback=params.get('callback'), 1740 _return_http_data_only=params.get('_return_http_data_only'), 1741 _preload_content=params.get('_preload_content', True), 1742 _request_timeout=params.get('_request_timeout'), 1743 collection_formats=collection_formats)
Gets the user signature information for the specified user.
Retrieves the structure of a single signature with a known signature name. The userId specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith".
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str signature_id: The ID of the signature being accessed. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
UserSignature If the method is called asynchronously, returns the request thread.
1745 def get_signature_image(self, account_id, image_type, signature_id, user_id, **kwargs): 1746 """ 1747 Retrieves the user initials image or the user signature image for the specified user. 1748 Retrieves the specified initials image or signature image for the specified user. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". ###### Note: Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. 1749 This method makes a synchronous HTTP request by default. To make an 1750 asynchronous HTTP request, please define a `callback` function 1751 to be invoked when receiving the response. 1752 >>> def callback_function(response): 1753 >>> pprint(response) 1754 >>> 1755 >>> thread = api.get_signature_image(account_id, image_type, signature_id, user_id, callback=callback_function) 1756 1757 :param callback function: The callback function 1758 for asynchronous request. (optional) 1759 :param str account_id: The external account number (int) or account ID Guid. (required) 1760 :param str image_type: One of **signature_image** or **initials_image**. (required) 1761 :param str signature_id: The ID of the signature being accessed. (required) 1762 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1763 :param str include_chrome: 1764 :return: file 1765 If the method is called asynchronously, 1766 returns the request thread. 1767 """ 1768 kwargs['_return_http_data_only'] = True 1769 if kwargs.get('callback'): 1770 return self.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs) 1771 else: 1772 (data) = self.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs) 1773 return data
Retrieves the user initials image or the user signature image for the specified user.
Retrieves the specified initials image or signature image for the specified user. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith". ###### Note: Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_signature_image(account_id, image_type, signature_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str image_type: One of signature_image or initials_image. (required)
- str signature_id: The ID of the signature being accessed. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str include_chrome:
Returns
file If the method is called asynchronously, returns the request thread.
1775 def get_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, **kwargs): 1776 """ 1777 Retrieves the user initials image or the user signature image for the specified user. 1778 Retrieves the specified initials image or signature image for the specified user. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". ###### Note: Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image. 1779 This method makes a synchronous HTTP request by default. To make an 1780 asynchronous HTTP request, please define a `callback` function 1781 to be invoked when receiving the response. 1782 >>> def callback_function(response): 1783 >>> pprint(response) 1784 >>> 1785 >>> thread = api.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, callback=callback_function) 1786 1787 :param callback function: The callback function 1788 for asynchronous request. (optional) 1789 :param str account_id: The external account number (int) or account ID Guid. (required) 1790 :param str image_type: One of **signature_image** or **initials_image**. (required) 1791 :param str signature_id: The ID of the signature being accessed. (required) 1792 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 1793 :param str include_chrome: 1794 :return: file 1795 If the method is called asynchronously, 1796 returns the request thread. 1797 """ 1798 1799 all_params = ['account_id', 'image_type', 'signature_id', 'user_id', 'include_chrome'] 1800 all_params.append('callback') 1801 all_params.append('_return_http_data_only') 1802 all_params.append('_preload_content') 1803 all_params.append('_request_timeout') 1804 1805 params = locals() 1806 for key, val in iteritems(params['kwargs']): 1807 if key not in all_params: 1808 raise TypeError( 1809 "Got an unexpected keyword argument '%s'" 1810 " to method get_signature_image" % key 1811 ) 1812 params[key] = val 1813 del params['kwargs'] 1814 # verify the required parameter 'account_id' is set 1815 if ('account_id' not in params) or (params['account_id'] is None): 1816 raise ValueError("Missing the required parameter `account_id` when calling `get_signature_image`") 1817 # verify the required parameter 'image_type' is set 1818 if ('image_type' not in params) or (params['image_type'] is None): 1819 raise ValueError("Missing the required parameter `image_type` when calling `get_signature_image`") 1820 # verify the required parameter 'signature_id' is set 1821 if ('signature_id' not in params) or (params['signature_id'] is None): 1822 raise ValueError("Missing the required parameter `signature_id` when calling `get_signature_image`") 1823 # verify the required parameter 'user_id' is set 1824 if ('user_id' not in params) or (params['user_id'] is None): 1825 raise ValueError("Missing the required parameter `user_id` when calling `get_signature_image`") 1826 1827 1828 collection_formats = {} 1829 1830 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json') 1831 path_params = {} 1832 if 'account_id' in params: 1833 path_params['accountId'] = params['account_id'] 1834 if 'image_type' in params: 1835 path_params['imageType'] = params['image_type'] 1836 if 'signature_id' in params: 1837 path_params['signatureId'] = params['signature_id'] 1838 if 'user_id' in params: 1839 path_params['userId'] = params['user_id'] 1840 1841 query_params = {} 1842 if 'include_chrome' in params: 1843 query_params['include_chrome'] = params['include_chrome'] 1844 1845 header_params = {} 1846 1847 form_params = [] 1848 local_var_files = {} 1849 1850 body_params = None 1851 # HTTP header `Accept` 1852 header_params['Accept'] = self.api_client.\ 1853 select_header_accept(['image/gif']) 1854 1855 # Authentication setting 1856 auth_settings = [] 1857 1858 return self.api_client.call_api(resource_path, 'GET', 1859 path_params, 1860 query_params, 1861 header_params, 1862 body=body_params, 1863 post_params=form_params, 1864 files=local_var_files, 1865 response_type='file', 1866 auth_settings=auth_settings, 1867 callback=params.get('callback'), 1868 _return_http_data_only=params.get('_return_http_data_only'), 1869 _preload_content=params.get('_preload_content', True), 1870 _request_timeout=params.get('_request_timeout'), 1871 collection_formats=collection_formats)
Retrieves the user initials image or the user signature image for the specified user.
Retrieves the specified initials image or signature image for the specified user. The image is returned in the same format as uploaded. In the request you can specify if the chrome (the added line and identifier around the initial image) is returned with the image. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith". ###### Note: Older envelopes might only have chromed images. If getting the non-chromed image fails, try getting the chromed image.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str image_type: One of signature_image or initials_image. (required)
- str signature_id: The ID of the signature being accessed. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str include_chrome:
Returns
file If the method is called asynchronously, returns the request thread.
1873 def list(self, account_id, **kwargs): 1874 """ 1875 Retrieves the list of users for the specified account. 1876 Retrieves the list of users for the specified account. The response returns the list of users for the account along with the information about the result set. If the `additional_info` query was added to the endpoint and set to **true**, the full user information is returned for each user 1877 This method makes a synchronous HTTP request by default. To make an 1878 asynchronous HTTP request, please define a `callback` function 1879 to be invoked when receiving the response. 1880 >>> def callback_function(response): 1881 >>> pprint(response) 1882 >>> 1883 >>> thread = api.list(account_id, callback=callback_function) 1884 1885 :param callback function: The callback function 1886 for asynchronous request. (optional) 1887 :param str account_id: The external account number (int) or account ID Guid. (required) 1888 :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account. 1889 :param str alternate_admins_only: 1890 :param str count: Number of records to return. The number must be greater than 0 and less than or equal to 100. 1891 :param str domain_users_only: 1892 :param str email: 1893 :param str email_substring: Filters the returned user records by the email address or a sub-string of email address. 1894 :param str group_id: Filters user records returned by one or more group Id's. 1895 :param str include_license: 1896 :param str include_usersettings_for_csv: 1897 :param str login_status: 1898 :param str not_group_id: 1899 :param str start_position: Starting value for the list. 1900 :param str status: 1901 :param str user_name_substring: Filters the user records returned by the user name or a sub-string of user name. 1902 :return: UserInformationList 1903 If the method is called asynchronously, 1904 returns the request thread. 1905 """ 1906 kwargs['_return_http_data_only'] = True 1907 if kwargs.get('callback'): 1908 return self.list_with_http_info(account_id, **kwargs) 1909 else: 1910 (data) = self.list_with_http_info(account_id, **kwargs) 1911 return data
Retrieves the list of users for the specified account.
Retrieves the list of users for the specified account. The response returns the list of users for the account along with the information about the result set. If the additional_info query was added to the endpoint and set to true, the full user information is returned for each user
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str additional_info: When set to true, the full list of user information is returned for each user in the account.
- str alternate_admins_only:
- str count: Number of records to return. The number must be greater than 0 and less than or equal to 100.
- str domain_users_only:
- str email:
- str email_substring: Filters the returned user records by the email address or a sub-string of email address.
- str group_id: Filters user records returned by one or more group Id's.
- str include_license:
- str include_usersettings_for_csv:
- str login_status:
- str not_group_id:
- str start_position: Starting value for the list.
- str status:
- str user_name_substring: Filters the user records returned by the user name or a sub-string of user name.
Returns
UserInformationList If the method is called asynchronously, returns the request thread.
1913 def list_with_http_info(self, account_id, **kwargs): 1914 """ 1915 Retrieves the list of users for the specified account. 1916 Retrieves the list of users for the specified account. The response returns the list of users for the account along with the information about the result set. If the `additional_info` query was added to the endpoint and set to **true**, the full user information is returned for each user 1917 This method makes a synchronous HTTP request by default. To make an 1918 asynchronous HTTP request, please define a `callback` function 1919 to be invoked when receiving the response. 1920 >>> def callback_function(response): 1921 >>> pprint(response) 1922 >>> 1923 >>> thread = api.list_with_http_info(account_id, callback=callback_function) 1924 1925 :param callback function: The callback function 1926 for asynchronous request. (optional) 1927 :param str account_id: The external account number (int) or account ID Guid. (required) 1928 :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account. 1929 :param str alternate_admins_only: 1930 :param str count: Number of records to return. The number must be greater than 0 and less than or equal to 100. 1931 :param str domain_users_only: 1932 :param str email: 1933 :param str email_substring: Filters the returned user records by the email address or a sub-string of email address. 1934 :param str group_id: Filters user records returned by one or more group Id's. 1935 :param str include_license: 1936 :param str include_usersettings_for_csv: 1937 :param str login_status: 1938 :param str not_group_id: 1939 :param str start_position: Starting value for the list. 1940 :param str status: 1941 :param str user_name_substring: Filters the user records returned by the user name or a sub-string of user name. 1942 :return: UserInformationList 1943 If the method is called asynchronously, 1944 returns the request thread. 1945 """ 1946 1947 all_params = ['account_id', 'additional_info', 'alternate_admins_only', 'count', 'domain_users_only', 'email', 'email_substring', 'group_id', 'include_license', 'include_usersettings_for_csv', 'login_status', 'not_group_id', 'start_position', 'status', 'user_name_substring'] 1948 all_params.append('callback') 1949 all_params.append('_return_http_data_only') 1950 all_params.append('_preload_content') 1951 all_params.append('_request_timeout') 1952 1953 params = locals() 1954 for key, val in iteritems(params['kwargs']): 1955 if key not in all_params: 1956 raise TypeError( 1957 "Got an unexpected keyword argument '%s'" 1958 " to method list" % key 1959 ) 1960 params[key] = val 1961 del params['kwargs'] 1962 # verify the required parameter 'account_id' is set 1963 if ('account_id' not in params) or (params['account_id'] is None): 1964 raise ValueError("Missing the required parameter `account_id` when calling `list`") 1965 1966 1967 collection_formats = {} 1968 1969 resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json') 1970 path_params = {} 1971 if 'account_id' in params: 1972 path_params['accountId'] = params['account_id'] 1973 1974 query_params = {} 1975 if 'additional_info' in params: 1976 query_params['additional_info'] = params['additional_info'] 1977 if 'alternate_admins_only' in params: 1978 query_params['alternate_admins_only'] = params['alternate_admins_only'] 1979 if 'count' in params: 1980 query_params['count'] = params['count'] 1981 if 'domain_users_only' in params: 1982 query_params['domain_users_only'] = params['domain_users_only'] 1983 if 'email' in params: 1984 query_params['email'] = params['email'] 1985 if 'email_substring' in params: 1986 query_params['email_substring'] = params['email_substring'] 1987 if 'group_id' in params: 1988 query_params['group_id'] = params['group_id'] 1989 if 'include_license' in params: 1990 query_params['include_license'] = params['include_license'] 1991 if 'include_usersettings_for_csv' in params: 1992 query_params['include_usersettings_for_csv'] = params['include_usersettings_for_csv'] 1993 if 'login_status' in params: 1994 query_params['login_status'] = params['login_status'] 1995 if 'not_group_id' in params: 1996 query_params['not_group_id'] = params['not_group_id'] 1997 if 'start_position' in params: 1998 query_params['start_position'] = params['start_position'] 1999 if 'status' in params: 2000 query_params['status'] = params['status'] 2001 if 'user_name_substring' in params: 2002 query_params['user_name_substring'] = params['user_name_substring'] 2003 2004 header_params = {} 2005 2006 form_params = [] 2007 local_var_files = {} 2008 2009 body_params = None 2010 # HTTP header `Accept` 2011 header_params['Accept'] = self.api_client.\ 2012 select_header_accept(['application/json']) 2013 2014 # Authentication setting 2015 auth_settings = [] 2016 2017 return self.api_client.call_api(resource_path, 'GET', 2018 path_params, 2019 query_params, 2020 header_params, 2021 body=body_params, 2022 post_params=form_params, 2023 files=local_var_files, 2024 response_type='UserInformationList', 2025 auth_settings=auth_settings, 2026 callback=params.get('callback'), 2027 _return_http_data_only=params.get('_return_http_data_only'), 2028 _preload_content=params.get('_preload_content', True), 2029 _request_timeout=params.get('_request_timeout'), 2030 collection_formats=collection_formats)
Retrieves the list of users for the specified account.
Retrieves the list of users for the specified account. The response returns the list of users for the account along with the information about the result set. If the additional_info query was added to the endpoint and set to true, the full user information is returned for each user
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str additional_info: When set to true, the full list of user information is returned for each user in the account.
- str alternate_admins_only:
- str count: Number of records to return. The number must be greater than 0 and less than or equal to 100.
- str domain_users_only:
- str email:
- str email_substring: Filters the returned user records by the email address or a sub-string of email address.
- str group_id: Filters user records returned by one or more group Id's.
- str include_license:
- str include_usersettings_for_csv:
- str login_status:
- str not_group_id:
- str start_position: Starting value for the list.
- str status:
- str user_name_substring: Filters the user records returned by the user name or a sub-string of user name.
Returns
UserInformationList If the method is called asynchronously, returns the request thread.
2032 def list_custom_settings(self, account_id, user_id, **kwargs): 2033 """ 2034 Retrieves the custom user settings for a specified user. 2035 Retrieves a list of custom user settings for a single user. Custom settings provide a flexible way to store and retrieve custom user information that can be used in your own system. ###### Note: Custom user settings are not the same as user account settings. ###Getting Grouped Custom User Settings### If the custom user settings you want to retrieve are grouped, you must include the following information in the header, after Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are retrieved. 2036 This method makes a synchronous HTTP request by default. To make an 2037 asynchronous HTTP request, please define a `callback` function 2038 to be invoked when receiving the response. 2039 >>> def callback_function(response): 2040 >>> pprint(response) 2041 >>> 2042 >>> thread = api.list_custom_settings(account_id, user_id, callback=callback_function) 2043 2044 :param callback function: The callback function 2045 for asynchronous request. (optional) 2046 :param str account_id: The external account number (int) or account ID Guid. (required) 2047 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2048 :return: CustomSettingsInformation 2049 If the method is called asynchronously, 2050 returns the request thread. 2051 """ 2052 kwargs['_return_http_data_only'] = True 2053 if kwargs.get('callback'): 2054 return self.list_custom_settings_with_http_info(account_id, user_id, **kwargs) 2055 else: 2056 (data) = self.list_custom_settings_with_http_info(account_id, user_id, **kwargs) 2057 return data
Retrieves the custom user settings for a specified user.
Retrieves a list of custom user settings for a single user. Custom settings provide a flexible way to store and retrieve custom user information that can be used in your own system. ###### Note: Custom user settings are not the same as user account settings. ###Getting Grouped Custom User Settings### If the custom user settings you want to retrieve are grouped, you must include the following information in the header, after Content-Type, in the request: X-DocuSign-User-Settings-Key:group_name Where the group_name is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are retrieved.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_custom_settings(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
CustomSettingsInformation If the method is called asynchronously, returns the request thread.
2059 def list_custom_settings_with_http_info(self, account_id, user_id, **kwargs): 2060 """ 2061 Retrieves the custom user settings for a specified user. 2062 Retrieves a list of custom user settings for a single user. Custom settings provide a flexible way to store and retrieve custom user information that can be used in your own system. ###### Note: Custom user settings are not the same as user account settings. ###Getting Grouped Custom User Settings### If the custom user settings you want to retrieve are grouped, you must include the following information in the header, after Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are retrieved. 2063 This method makes a synchronous HTTP request by default. To make an 2064 asynchronous HTTP request, please define a `callback` function 2065 to be invoked when receiving the response. 2066 >>> def callback_function(response): 2067 >>> pprint(response) 2068 >>> 2069 >>> thread = api.list_custom_settings_with_http_info(account_id, user_id, callback=callback_function) 2070 2071 :param callback function: The callback function 2072 for asynchronous request. (optional) 2073 :param str account_id: The external account number (int) or account ID Guid. (required) 2074 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2075 :return: CustomSettingsInformation 2076 If the method is called asynchronously, 2077 returns the request thread. 2078 """ 2079 2080 all_params = ['account_id', 'user_id'] 2081 all_params.append('callback') 2082 all_params.append('_return_http_data_only') 2083 all_params.append('_preload_content') 2084 all_params.append('_request_timeout') 2085 2086 params = locals() 2087 for key, val in iteritems(params['kwargs']): 2088 if key not in all_params: 2089 raise TypeError( 2090 "Got an unexpected keyword argument '%s'" 2091 " to method list_custom_settings" % key 2092 ) 2093 params[key] = val 2094 del params['kwargs'] 2095 # verify the required parameter 'account_id' is set 2096 if ('account_id' not in params) or (params['account_id'] is None): 2097 raise ValueError("Missing the required parameter `account_id` when calling `list_custom_settings`") 2098 # verify the required parameter 'user_id' is set 2099 if ('user_id' not in params) or (params['user_id'] is None): 2100 raise ValueError("Missing the required parameter `user_id` when calling `list_custom_settings`") 2101 2102 2103 collection_formats = {} 2104 2105 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json') 2106 path_params = {} 2107 if 'account_id' in params: 2108 path_params['accountId'] = params['account_id'] 2109 if 'user_id' in params: 2110 path_params['userId'] = params['user_id'] 2111 2112 query_params = {} 2113 2114 header_params = {} 2115 2116 form_params = [] 2117 local_var_files = {} 2118 2119 body_params = None 2120 # HTTP header `Accept` 2121 header_params['Accept'] = self.api_client.\ 2122 select_header_accept(['application/json']) 2123 2124 # Authentication setting 2125 auth_settings = [] 2126 2127 return self.api_client.call_api(resource_path, 'GET', 2128 path_params, 2129 query_params, 2130 header_params, 2131 body=body_params, 2132 post_params=form_params, 2133 files=local_var_files, 2134 response_type='CustomSettingsInformation', 2135 auth_settings=auth_settings, 2136 callback=params.get('callback'), 2137 _return_http_data_only=params.get('_return_http_data_only'), 2138 _preload_content=params.get('_preload_content', True), 2139 _request_timeout=params.get('_request_timeout'), 2140 collection_formats=collection_formats)
Retrieves the custom user settings for a specified user.
Retrieves a list of custom user settings for a single user. Custom settings provide a flexible way to store and retrieve custom user information that can be used in your own system. ###### Note: Custom user settings are not the same as user account settings. ###Getting Grouped Custom User Settings### If the custom user settings you want to retrieve are grouped, you must include the following information in the header, after Content-Type, in the request: X-DocuSign-User-Settings-Key:group_name Where the group_name is your designated name for the group of customer user settings. If the extra header information is not included, only the custom user settings that were added without a group are retrieved.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_custom_settings_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
CustomSettingsInformation If the method is called asynchronously, returns the request thread.
2142 def list_signatures(self, account_id, user_id, **kwargs): 2143 """ 2144 Retrieves a list of user signature definitions for a specified user. 2145 Retrieves the signature definitions for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 2146 This method makes a synchronous HTTP request by default. To make an 2147 asynchronous HTTP request, please define a `callback` function 2148 to be invoked when receiving the response. 2149 >>> def callback_function(response): 2150 >>> pprint(response) 2151 >>> 2152 >>> thread = api.list_signatures(account_id, user_id, callback=callback_function) 2153 2154 :param callback function: The callback function 2155 for asynchronous request. (optional) 2156 :param str account_id: The external account number (int) or account ID Guid. (required) 2157 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2158 :param str stamp_type: 2159 :return: UserSignaturesInformation 2160 If the method is called asynchronously, 2161 returns the request thread. 2162 """ 2163 kwargs['_return_http_data_only'] = True 2164 if kwargs.get('callback'): 2165 return self.list_signatures_with_http_info(account_id, user_id, **kwargs) 2166 else: 2167 (data) = self.list_signatures_with_http_info(account_id, user_id, **kwargs) 2168 return data
Retrieves a list of user signature definitions for a specified user.
Retrieves the signature definitions for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith".
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_signatures(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str stamp_type:
Returns
UserSignaturesInformation If the method is called asynchronously, returns the request thread.
2170 def list_signatures_with_http_info(self, account_id, user_id, **kwargs): 2171 """ 2172 Retrieves a list of user signature definitions for a specified user. 2173 Retrieves the signature definitions for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 2174 This method makes a synchronous HTTP request by default. To make an 2175 asynchronous HTTP request, please define a `callback` function 2176 to be invoked when receiving the response. 2177 >>> def callback_function(response): 2178 >>> pprint(response) 2179 >>> 2180 >>> thread = api.list_signatures_with_http_info(account_id, user_id, callback=callback_function) 2181 2182 :param callback function: The callback function 2183 for asynchronous request. (optional) 2184 :param str account_id: The external account number (int) or account ID Guid. (required) 2185 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2186 :param str stamp_type: 2187 :return: UserSignaturesInformation 2188 If the method is called asynchronously, 2189 returns the request thread. 2190 """ 2191 2192 all_params = ['account_id', 'user_id', 'stamp_type'] 2193 all_params.append('callback') 2194 all_params.append('_return_http_data_only') 2195 all_params.append('_preload_content') 2196 all_params.append('_request_timeout') 2197 2198 params = locals() 2199 for key, val in iteritems(params['kwargs']): 2200 if key not in all_params: 2201 raise TypeError( 2202 "Got an unexpected keyword argument '%s'" 2203 " to method list_signatures" % key 2204 ) 2205 params[key] = val 2206 del params['kwargs'] 2207 # verify the required parameter 'account_id' is set 2208 if ('account_id' not in params) or (params['account_id'] is None): 2209 raise ValueError("Missing the required parameter `account_id` when calling `list_signatures`") 2210 # verify the required parameter 'user_id' is set 2211 if ('user_id' not in params) or (params['user_id'] is None): 2212 raise ValueError("Missing the required parameter `user_id` when calling `list_signatures`") 2213 2214 2215 collection_formats = {} 2216 2217 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json') 2218 path_params = {} 2219 if 'account_id' in params: 2220 path_params['accountId'] = params['account_id'] 2221 if 'user_id' in params: 2222 path_params['userId'] = params['user_id'] 2223 2224 query_params = {} 2225 if 'stamp_type' in params: 2226 query_params['stamp_type'] = params['stamp_type'] 2227 2228 header_params = {} 2229 2230 form_params = [] 2231 local_var_files = {} 2232 2233 body_params = None 2234 # HTTP header `Accept` 2235 header_params['Accept'] = self.api_client.\ 2236 select_header_accept(['application/json']) 2237 2238 # Authentication setting 2239 auth_settings = [] 2240 2241 return self.api_client.call_api(resource_path, 'GET', 2242 path_params, 2243 query_params, 2244 header_params, 2245 body=body_params, 2246 post_params=form_params, 2247 files=local_var_files, 2248 response_type='UserSignaturesInformation', 2249 auth_settings=auth_settings, 2250 callback=params.get('callback'), 2251 _return_http_data_only=params.get('_return_http_data_only'), 2252 _preload_content=params.get('_preload_content', True), 2253 _request_timeout=params.get('_request_timeout'), 2254 collection_formats=collection_formats)
Retrieves a list of user signature definitions for a specified user.
Retrieves the signature definitions for the specified user. The userId parameter specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith".
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_signatures_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str stamp_type:
Returns
UserSignaturesInformation If the method is called asynchronously, returns the request thread.
2256 def post_contacts(self, account_id, **kwargs): 2257 """ 2258 Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type). 2259 This method adds multiple contacts into a contacts list. 2260 This method makes a synchronous HTTP request by default. To make an 2261 asynchronous HTTP request, please define a `callback` function 2262 to be invoked when receiving the response. 2263 >>> def callback_function(response): 2264 >>> pprint(response) 2265 >>> 2266 >>> thread = api.post_contacts(account_id, callback=callback_function) 2267 2268 :param callback function: The callback function 2269 for asynchronous request. (optional) 2270 :param str account_id: The external account number (int) or account ID Guid. (required) 2271 :param ContactModRequest contact_mod_request: 2272 :return: ContactUpdateResponse 2273 If the method is called asynchronously, 2274 returns the request thread. 2275 """ 2276 kwargs['_return_http_data_only'] = True 2277 if kwargs.get('callback'): 2278 return self.post_contacts_with_http_info(account_id, **kwargs) 2279 else: 2280 (data) = self.post_contacts_with_http_info(account_id, **kwargs) 2281 return data
Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type).
This method adds multiple contacts into a contacts list.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.post_contacts(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- ContactModRequest contact_mod_request:
Returns
ContactUpdateResponse If the method is called asynchronously, returns the request thread.
2283 def post_contacts_with_http_info(self, account_id, **kwargs): 2284 """ 2285 Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type). 2286 This method adds multiple contacts into a contacts list. 2287 This method makes a synchronous HTTP request by default. To make an 2288 asynchronous HTTP request, please define a `callback` function 2289 to be invoked when receiving the response. 2290 >>> def callback_function(response): 2291 >>> pprint(response) 2292 >>> 2293 >>> thread = api.post_contacts_with_http_info(account_id, callback=callback_function) 2294 2295 :param callback function: The callback function 2296 for asynchronous request. (optional) 2297 :param str account_id: The external account number (int) or account ID Guid. (required) 2298 :param ContactModRequest contact_mod_request: 2299 :return: ContactUpdateResponse 2300 If the method is called asynchronously, 2301 returns the request thread. 2302 """ 2303 2304 all_params = ['account_id', 'contact_mod_request'] 2305 all_params.append('callback') 2306 all_params.append('_return_http_data_only') 2307 all_params.append('_preload_content') 2308 all_params.append('_request_timeout') 2309 2310 params = locals() 2311 for key, val in iteritems(params['kwargs']): 2312 if key not in all_params: 2313 raise TypeError( 2314 "Got an unexpected keyword argument '%s'" 2315 " to method post_contacts" % key 2316 ) 2317 params[key] = val 2318 del params['kwargs'] 2319 # verify the required parameter 'account_id' is set 2320 if ('account_id' not in params) or (params['account_id'] is None): 2321 raise ValueError("Missing the required parameter `account_id` when calling `post_contacts`") 2322 2323 2324 collection_formats = {} 2325 2326 resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json') 2327 path_params = {} 2328 if 'account_id' in params: 2329 path_params['accountId'] = params['account_id'] 2330 2331 query_params = {} 2332 2333 header_params = {} 2334 2335 form_params = [] 2336 local_var_files = {} 2337 2338 body_params = None 2339 if 'contact_mod_request' in params: 2340 body_params = params['contact_mod_request'] 2341 # HTTP header `Accept` 2342 header_params['Accept'] = self.api_client.\ 2343 select_header_accept(['application/json']) 2344 2345 # Authentication setting 2346 auth_settings = [] 2347 2348 return self.api_client.call_api(resource_path, 'POST', 2349 path_params, 2350 query_params, 2351 header_params, 2352 body=body_params, 2353 post_params=form_params, 2354 files=local_var_files, 2355 response_type='ContactUpdateResponse', 2356 auth_settings=auth_settings, 2357 callback=params.get('callback'), 2358 _return_http_data_only=params.get('_return_http_data_only'), 2359 _preload_content=params.get('_preload_content', True), 2360 _request_timeout=params.get('_request_timeout'), 2361 collection_formats=collection_formats)
Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type).
This method adds multiple contacts into a contacts list.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.post_contacts_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- ContactModRequest contact_mod_request:
Returns
ContactUpdateResponse If the method is called asynchronously, returns the request thread.
2363 def put_contacts(self, account_id, **kwargs): 2364 """ 2365 Replaces contacts associated with an account for the DocuSign service. 2366 This method updates one or more contacts associated with an account. 2367 This method makes a synchronous HTTP request by default. To make an 2368 asynchronous HTTP request, please define a `callback` function 2369 to be invoked when receiving the response. 2370 >>> def callback_function(response): 2371 >>> pprint(response) 2372 >>> 2373 >>> thread = api.put_contacts(account_id, callback=callback_function) 2374 2375 :param callback function: The callback function 2376 for asynchronous request. (optional) 2377 :param str account_id: The external account number (int) or account ID Guid. (required) 2378 :param ContactModRequest contact_mod_request: 2379 :return: ContactUpdateResponse 2380 If the method is called asynchronously, 2381 returns the request thread. 2382 """ 2383 kwargs['_return_http_data_only'] = True 2384 if kwargs.get('callback'): 2385 return self.put_contacts_with_http_info(account_id, **kwargs) 2386 else: 2387 (data) = self.put_contacts_with_http_info(account_id, **kwargs) 2388 return data
Replaces contacts associated with an account for the DocuSign service.
This method updates one or more contacts associated with an account.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.put_contacts(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- ContactModRequest contact_mod_request:
Returns
ContactUpdateResponse If the method is called asynchronously, returns the request thread.
2390 def put_contacts_with_http_info(self, account_id, **kwargs): 2391 """ 2392 Replaces contacts associated with an account for the DocuSign service. 2393 This method updates one or more contacts associated with an account. 2394 This method makes a synchronous HTTP request by default. To make an 2395 asynchronous HTTP request, please define a `callback` function 2396 to be invoked when receiving the response. 2397 >>> def callback_function(response): 2398 >>> pprint(response) 2399 >>> 2400 >>> thread = api.put_contacts_with_http_info(account_id, callback=callback_function) 2401 2402 :param callback function: The callback function 2403 for asynchronous request. (optional) 2404 :param str account_id: The external account number (int) or account ID Guid. (required) 2405 :param ContactModRequest contact_mod_request: 2406 :return: ContactUpdateResponse 2407 If the method is called asynchronously, 2408 returns the request thread. 2409 """ 2410 2411 all_params = ['account_id', 'contact_mod_request'] 2412 all_params.append('callback') 2413 all_params.append('_return_http_data_only') 2414 all_params.append('_preload_content') 2415 all_params.append('_request_timeout') 2416 2417 params = locals() 2418 for key, val in iteritems(params['kwargs']): 2419 if key not in all_params: 2420 raise TypeError( 2421 "Got an unexpected keyword argument '%s'" 2422 " to method put_contacts" % key 2423 ) 2424 params[key] = val 2425 del params['kwargs'] 2426 # verify the required parameter 'account_id' is set 2427 if ('account_id' not in params) or (params['account_id'] is None): 2428 raise ValueError("Missing the required parameter `account_id` when calling `put_contacts`") 2429 2430 2431 collection_formats = {} 2432 2433 resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json') 2434 path_params = {} 2435 if 'account_id' in params: 2436 path_params['accountId'] = params['account_id'] 2437 2438 query_params = {} 2439 2440 header_params = {} 2441 2442 form_params = [] 2443 local_var_files = {} 2444 2445 body_params = None 2446 if 'contact_mod_request' in params: 2447 body_params = params['contact_mod_request'] 2448 # HTTP header `Accept` 2449 header_params['Accept'] = self.api_client.\ 2450 select_header_accept(['application/json']) 2451 2452 # Authentication setting 2453 auth_settings = [] 2454 2455 return self.api_client.call_api(resource_path, 'PUT', 2456 path_params, 2457 query_params, 2458 header_params, 2459 body=body_params, 2460 post_params=form_params, 2461 files=local_var_files, 2462 response_type='ContactUpdateResponse', 2463 auth_settings=auth_settings, 2464 callback=params.get('callback'), 2465 _return_http_data_only=params.get('_return_http_data_only'), 2466 _preload_content=params.get('_preload_content', True), 2467 _request_timeout=params.get('_request_timeout'), 2468 collection_formats=collection_formats)
Replaces contacts associated with an account for the DocuSign service.
This method updates one or more contacts associated with an account.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.put_contacts_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- ContactModRequest contact_mod_request:
Returns
ContactUpdateResponse If the method is called asynchronously, returns the request thread.
2470 def update_custom_settings(self, account_id, user_id, **kwargs): 2471 """ 2472 Adds or updates custom user settings for the specified user. 2473 Adds or updates custom user settings for the specified user. ###### Note: Custom user settings are not the same as user account settings. Custom settings provide a flexible way to store and retrieve custom user information that you can use in your own system. **Important**: There is a limit on the size for all the custom user settings for a single user. The limit is 4,000 characters, which includes the XML and JSON structure for the settings. ### Grouping Custom User Settings ### You can group custom user settings when adding them. Grouping allows you to retrieve settings that are in a specific group, instead of retrieving all the user custom settings. To group custom user settings, add the following information in the header, after Content-Type: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. Grouping is shown in the Example Request Body below. When getting or deleting grouped custom user settings, you must include the extra header information. Grouping custom user settings is not required and if the extra header information is not included, the custom user settings are added normally and can be retrieved or deleted without including the additional header. 2474 This method makes a synchronous HTTP request by default. To make an 2475 asynchronous HTTP request, please define a `callback` function 2476 to be invoked when receiving the response. 2477 >>> def callback_function(response): 2478 >>> pprint(response) 2479 >>> 2480 >>> thread = api.update_custom_settings(account_id, user_id, callback=callback_function) 2481 2482 :param callback function: The callback function 2483 for asynchronous request. (optional) 2484 :param str account_id: The external account number (int) or account ID Guid. (required) 2485 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2486 :param CustomSettingsInformation custom_settings_information: 2487 :return: CustomSettingsInformation 2488 If the method is called asynchronously, 2489 returns the request thread. 2490 """ 2491 kwargs['_return_http_data_only'] = True 2492 if kwargs.get('callback'): 2493 return self.update_custom_settings_with_http_info(account_id, user_id, **kwargs) 2494 else: 2495 (data) = self.update_custom_settings_with_http_info(account_id, user_id, **kwargs) 2496 return data
Adds or updates custom user settings for the specified user.
Adds or updates custom user settings for the specified user. ###### Note: Custom user settings are not the same as user account settings. Custom settings provide a flexible way to store and retrieve custom user information that you can use in your own system. Important: There is a limit on the size for all the custom user settings for a single user. The limit is 4,000 characters, which includes the XML and JSON structure for the settings. ### Grouping Custom User Settings ### You can group custom user settings when adding them. Grouping allows you to retrieve settings that are in a specific group, instead of retrieving all the user custom settings. To group custom user settings, add the following information in the header, after Content-Type: X-DocuSign-User-Settings-Key:group_name Where the group_name is your designated name for the group of customer user settings. Grouping is shown in the Example Request Body below. When getting or deleting grouped custom user settings, you must include the extra header information. Grouping custom user settings is not required and if the extra header information is not included, the custom user settings are added normally and can be retrieved or deleted without including the additional header.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_custom_settings(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- CustomSettingsInformation custom_settings_information:
Returns
CustomSettingsInformation If the method is called asynchronously, returns the request thread.
2498 def update_custom_settings_with_http_info(self, account_id, user_id, **kwargs): 2499 """ 2500 Adds or updates custom user settings for the specified user. 2501 Adds or updates custom user settings for the specified user. ###### Note: Custom user settings are not the same as user account settings. Custom settings provide a flexible way to store and retrieve custom user information that you can use in your own system. **Important**: There is a limit on the size for all the custom user settings for a single user. The limit is 4,000 characters, which includes the XML and JSON structure for the settings. ### Grouping Custom User Settings ### You can group custom user settings when adding them. Grouping allows you to retrieve settings that are in a specific group, instead of retrieving all the user custom settings. To group custom user settings, add the following information in the header, after Content-Type: `X-DocuSign-User-Settings-Key:group_name` Where the `group_name` is your designated name for the group of customer user settings. Grouping is shown in the Example Request Body below. When getting or deleting grouped custom user settings, you must include the extra header information. Grouping custom user settings is not required and if the extra header information is not included, the custom user settings are added normally and can be retrieved or deleted without including the additional header. 2502 This method makes a synchronous HTTP request by default. To make an 2503 asynchronous HTTP request, please define a `callback` function 2504 to be invoked when receiving the response. 2505 >>> def callback_function(response): 2506 >>> pprint(response) 2507 >>> 2508 >>> thread = api.update_custom_settings_with_http_info(account_id, user_id, callback=callback_function) 2509 2510 :param callback function: The callback function 2511 for asynchronous request. (optional) 2512 :param str account_id: The external account number (int) or account ID Guid. (required) 2513 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2514 :param CustomSettingsInformation custom_settings_information: 2515 :return: CustomSettingsInformation 2516 If the method is called asynchronously, 2517 returns the request thread. 2518 """ 2519 2520 all_params = ['account_id', 'user_id', 'custom_settings_information'] 2521 all_params.append('callback') 2522 all_params.append('_return_http_data_only') 2523 all_params.append('_preload_content') 2524 all_params.append('_request_timeout') 2525 2526 params = locals() 2527 for key, val in iteritems(params['kwargs']): 2528 if key not in all_params: 2529 raise TypeError( 2530 "Got an unexpected keyword argument '%s'" 2531 " to method update_custom_settings" % key 2532 ) 2533 params[key] = val 2534 del params['kwargs'] 2535 # verify the required parameter 'account_id' is set 2536 if ('account_id' not in params) or (params['account_id'] is None): 2537 raise ValueError("Missing the required parameter `account_id` when calling `update_custom_settings`") 2538 # verify the required parameter 'user_id' is set 2539 if ('user_id' not in params) or (params['user_id'] is None): 2540 raise ValueError("Missing the required parameter `user_id` when calling `update_custom_settings`") 2541 2542 2543 collection_formats = {} 2544 2545 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json') 2546 path_params = {} 2547 if 'account_id' in params: 2548 path_params['accountId'] = params['account_id'] 2549 if 'user_id' in params: 2550 path_params['userId'] = params['user_id'] 2551 2552 query_params = {} 2553 2554 header_params = {} 2555 2556 form_params = [] 2557 local_var_files = {} 2558 2559 body_params = None 2560 if 'custom_settings_information' in params: 2561 body_params = params['custom_settings_information'] 2562 # HTTP header `Accept` 2563 header_params['Accept'] = self.api_client.\ 2564 select_header_accept(['application/json']) 2565 2566 # Authentication setting 2567 auth_settings = [] 2568 2569 return self.api_client.call_api(resource_path, 'PUT', 2570 path_params, 2571 query_params, 2572 header_params, 2573 body=body_params, 2574 post_params=form_params, 2575 files=local_var_files, 2576 response_type='CustomSettingsInformation', 2577 auth_settings=auth_settings, 2578 callback=params.get('callback'), 2579 _return_http_data_only=params.get('_return_http_data_only'), 2580 _preload_content=params.get('_preload_content', True), 2581 _request_timeout=params.get('_request_timeout'), 2582 collection_formats=collection_formats)
Adds or updates custom user settings for the specified user.
Adds or updates custom user settings for the specified user. ###### Note: Custom user settings are not the same as user account settings. Custom settings provide a flexible way to store and retrieve custom user information that you can use in your own system. Important: There is a limit on the size for all the custom user settings for a single user. The limit is 4,000 characters, which includes the XML and JSON structure for the settings. ### Grouping Custom User Settings ### You can group custom user settings when adding them. Grouping allows you to retrieve settings that are in a specific group, instead of retrieving all the user custom settings. To group custom user settings, add the following information in the header, after Content-Type: X-DocuSign-User-Settings-Key:group_name Where the group_name is your designated name for the group of customer user settings. Grouping is shown in the Example Request Body below. When getting or deleting grouped custom user settings, you must include the extra header information. Grouping custom user settings is not required and if the extra header information is not included, the custom user settings are added normally and can be retrieved or deleted without including the additional header.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_custom_settings_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- CustomSettingsInformation custom_settings_information:
Returns
CustomSettingsInformation If the method is called asynchronously, returns the request thread.
2584 def update_profile(self, account_id, user_id, **kwargs): 2585 """ 2586 Updates the user profile information for the specified user. 2587 Updates the user's detail information, profile information, privacy settings, and personal information in the user ID card. You can also change a user's name by changing the information in the `userDetails` property. When changing a user's name, you can either change the information in the `userName` property OR change the information in `firstName`, `middleName`, `lastName, suffixName`, and `title` properties. Changes to `firstName`, `middleName`, `lastName`, `suffixName`, and `title` properties take precedence over changes to the `userName` property. 2588 This method makes a synchronous HTTP request by default. To make an 2589 asynchronous HTTP request, please define a `callback` function 2590 to be invoked when receiving the response. 2591 >>> def callback_function(response): 2592 >>> pprint(response) 2593 >>> 2594 >>> thread = api.update_profile(account_id, user_id, callback=callback_function) 2595 2596 :param callback function: The callback function 2597 for asynchronous request. (optional) 2598 :param str account_id: The external account number (int) or account ID Guid. (required) 2599 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2600 :param UserProfile user_profile: 2601 :return: None 2602 If the method is called asynchronously, 2603 returns the request thread. 2604 """ 2605 kwargs['_return_http_data_only'] = True 2606 if kwargs.get('callback'): 2607 return self.update_profile_with_http_info(account_id, user_id, **kwargs) 2608 else: 2609 (data) = self.update_profile_with_http_info(account_id, user_id, **kwargs) 2610 return data
Updates the user profile information for the specified user.
Updates the user's detail information, profile information, privacy settings, and personal information in the user ID card. You can also change a user's name by changing the information in the userDetails property. When changing a user's name, you can either change the information in the userName property OR change the information in firstName, middleName, lastName, suffixName, and title properties. Changes to firstName, middleName, lastName, suffixName, and title properties take precedence over changes to the userName property.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_profile(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- UserProfile user_profile:
Returns
None If the method is called asynchronously, returns the request thread.
2612 def update_profile_with_http_info(self, account_id, user_id, **kwargs): 2613 """ 2614 Updates the user profile information for the specified user. 2615 Updates the user's detail information, profile information, privacy settings, and personal information in the user ID card. You can also change a user's name by changing the information in the `userDetails` property. When changing a user's name, you can either change the information in the `userName` property OR change the information in `firstName`, `middleName`, `lastName, suffixName`, and `title` properties. Changes to `firstName`, `middleName`, `lastName`, `suffixName`, and `title` properties take precedence over changes to the `userName` property. 2616 This method makes a synchronous HTTP request by default. To make an 2617 asynchronous HTTP request, please define a `callback` function 2618 to be invoked when receiving the response. 2619 >>> def callback_function(response): 2620 >>> pprint(response) 2621 >>> 2622 >>> thread = api.update_profile_with_http_info(account_id, user_id, callback=callback_function) 2623 2624 :param callback function: The callback function 2625 for asynchronous request. (optional) 2626 :param str account_id: The external account number (int) or account ID Guid. (required) 2627 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2628 :param UserProfile user_profile: 2629 :return: None 2630 If the method is called asynchronously, 2631 returns the request thread. 2632 """ 2633 2634 all_params = ['account_id', 'user_id', 'user_profile'] 2635 all_params.append('callback') 2636 all_params.append('_return_http_data_only') 2637 all_params.append('_preload_content') 2638 all_params.append('_request_timeout') 2639 2640 params = locals() 2641 for key, val in iteritems(params['kwargs']): 2642 if key not in all_params: 2643 raise TypeError( 2644 "Got an unexpected keyword argument '%s'" 2645 " to method update_profile" % key 2646 ) 2647 params[key] = val 2648 del params['kwargs'] 2649 # verify the required parameter 'account_id' is set 2650 if ('account_id' not in params) or (params['account_id'] is None): 2651 raise ValueError("Missing the required parameter `account_id` when calling `update_profile`") 2652 # verify the required parameter 'user_id' is set 2653 if ('user_id' not in params) or (params['user_id'] is None): 2654 raise ValueError("Missing the required parameter `user_id` when calling `update_profile`") 2655 2656 2657 collection_formats = {} 2658 2659 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile'.replace('{format}', 'json') 2660 path_params = {} 2661 if 'account_id' in params: 2662 path_params['accountId'] = params['account_id'] 2663 if 'user_id' in params: 2664 path_params['userId'] = params['user_id'] 2665 2666 query_params = {} 2667 2668 header_params = {} 2669 2670 form_params = [] 2671 local_var_files = {} 2672 2673 body_params = None 2674 if 'user_profile' in params: 2675 body_params = params['user_profile'] 2676 # HTTP header `Accept` 2677 header_params['Accept'] = self.api_client.\ 2678 select_header_accept(['application/json']) 2679 2680 # Authentication setting 2681 auth_settings = [] 2682 2683 return self.api_client.call_api(resource_path, 'PUT', 2684 path_params, 2685 query_params, 2686 header_params, 2687 body=body_params, 2688 post_params=form_params, 2689 files=local_var_files, 2690 response_type=None, 2691 auth_settings=auth_settings, 2692 callback=params.get('callback'), 2693 _return_http_data_only=params.get('_return_http_data_only'), 2694 _preload_content=params.get('_preload_content', True), 2695 _request_timeout=params.get('_request_timeout'), 2696 collection_formats=collection_formats)
Updates the user profile information for the specified user.
Updates the user's detail information, profile information, privacy settings, and personal information in the user ID card. You can also change a user's name by changing the information in the userDetails property. When changing a user's name, you can either change the information in the userName property OR change the information in firstName, middleName, lastName, suffixName, and title properties. Changes to firstName, middleName, lastName, suffixName, and title properties take precedence over changes to the userName property.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_profile_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- UserProfile user_profile:
Returns
None If the method is called asynchronously, returns the request thread.
2698 def update_profile_image(self, account_id, user_id, **kwargs): 2699 """ 2700 Updates the user profile image for a specified user. 2701 Updates the user profile image by uploading an image to the user profile. The supported image formats are: gif, png, jpeg, and bmp. The file must be less than 200K. For best viewing results, DocuSign recommends that the image is no more than 79 pixels wide and high. 2702 This method makes a synchronous HTTP request by default. To make an 2703 asynchronous HTTP request, please define a `callback` function 2704 to be invoked when receiving the response. 2705 >>> def callback_function(response): 2706 >>> pprint(response) 2707 >>> 2708 >>> thread = api.update_profile_image(account_id, user_id, callback=callback_function) 2709 2710 :param callback function: The callback function 2711 for asynchronous request. (optional) 2712 :param str account_id: The external account number (int) or account ID Guid. (required) 2713 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2714 :return: None 2715 If the method is called asynchronously, 2716 returns the request thread. 2717 """ 2718 kwargs['_return_http_data_only'] = True 2719 if kwargs.get('callback'): 2720 return self.update_profile_image_with_http_info(account_id, user_id, **kwargs) 2721 else: 2722 (data) = self.update_profile_image_with_http_info(account_id, user_id, **kwargs) 2723 return data
Updates the user profile image for a specified user.
Updates the user profile image by uploading an image to the user profile. The supported image formats are: gif, png, jpeg, and bmp. The file must be less than 200K. For best viewing results, DocuSign recommends that the image is no more than 79 pixels wide and high.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_profile_image(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
None If the method is called asynchronously, returns the request thread.
2725 def update_profile_image_with_http_info(self, account_id, user_id, **kwargs): 2726 """ 2727 Updates the user profile image for a specified user. 2728 Updates the user profile image by uploading an image to the user profile. The supported image formats are: gif, png, jpeg, and bmp. The file must be less than 200K. For best viewing results, DocuSign recommends that the image is no more than 79 pixels wide and high. 2729 This method makes a synchronous HTTP request by default. To make an 2730 asynchronous HTTP request, please define a `callback` function 2731 to be invoked when receiving the response. 2732 >>> def callback_function(response): 2733 >>> pprint(response) 2734 >>> 2735 >>> thread = api.update_profile_image_with_http_info(account_id, user_id, callback=callback_function) 2736 2737 :param callback function: The callback function 2738 for asynchronous request. (optional) 2739 :param str account_id: The external account number (int) or account ID Guid. (required) 2740 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2741 :return: None 2742 If the method is called asynchronously, 2743 returns the request thread. 2744 """ 2745 2746 all_params = ['account_id', 'user_id'] 2747 all_params.append('callback') 2748 all_params.append('_return_http_data_only') 2749 all_params.append('_preload_content') 2750 all_params.append('_request_timeout') 2751 2752 params = locals() 2753 for key, val in iteritems(params['kwargs']): 2754 if key not in all_params: 2755 raise TypeError( 2756 "Got an unexpected keyword argument '%s'" 2757 " to method update_profile_image" % key 2758 ) 2759 params[key] = val 2760 del params['kwargs'] 2761 # verify the required parameter 'account_id' is set 2762 if ('account_id' not in params) or (params['account_id'] is None): 2763 raise ValueError("Missing the required parameter `account_id` when calling `update_profile_image`") 2764 # verify the required parameter 'user_id' is set 2765 if ('user_id' not in params) or (params['user_id'] is None): 2766 raise ValueError("Missing the required parameter `user_id` when calling `update_profile_image`") 2767 2768 2769 collection_formats = {} 2770 2771 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json') 2772 path_params = {} 2773 if 'account_id' in params: 2774 path_params['accountId'] = params['account_id'] 2775 if 'user_id' in params: 2776 path_params['userId'] = params['user_id'] 2777 2778 query_params = {} 2779 2780 header_params = {} 2781 2782 form_params = [] 2783 local_var_files = {} 2784 2785 body_params = None 2786 # HTTP header `Accept` 2787 header_params['Accept'] = self.api_client.\ 2788 select_header_accept(['application/json']) 2789 2790 # HTTP header `Content-Type` 2791 header_params['Content-Type'] = self.api_client.\ 2792 select_header_content_type(['image/gif']) 2793 2794 # Authentication setting 2795 auth_settings = [] 2796 2797 return self.api_client.call_api(resource_path, 'PUT', 2798 path_params, 2799 query_params, 2800 header_params, 2801 body=body_params, 2802 post_params=form_params, 2803 files=local_var_files, 2804 response_type=None, 2805 auth_settings=auth_settings, 2806 callback=params.get('callback'), 2807 _return_http_data_only=params.get('_return_http_data_only'), 2808 _preload_content=params.get('_preload_content', True), 2809 _request_timeout=params.get('_request_timeout'), 2810 collection_formats=collection_formats)
Updates the user profile image for a specified user.
Updates the user profile image by uploading an image to the user profile. The supported image formats are: gif, png, jpeg, and bmp. The file must be less than 200K. For best viewing results, DocuSign recommends that the image is no more than 79 pixels wide and high.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_profile_image_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
Returns
None If the method is called asynchronously, returns the request thread.
2812 def update_settings(self, account_id, user_id, **kwargs): 2813 """ 2814 Updates the user account settings for a specified user. 2815 Updates the account settings list and email notification types for the specified user. 2816 This method makes a synchronous HTTP request by default. To make an 2817 asynchronous HTTP request, please define a `callback` function 2818 to be invoked when receiving the response. 2819 >>> def callback_function(response): 2820 >>> pprint(response) 2821 >>> 2822 >>> thread = api.update_settings(account_id, user_id, callback=callback_function) 2823 2824 :param callback function: The callback function 2825 for asynchronous request. (optional) 2826 :param str account_id: The external account number (int) or account ID Guid. (required) 2827 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2828 :param str allow_all_languages: 2829 :param UserSettingsInformation user_settings_information: 2830 :return: None 2831 If the method is called asynchronously, 2832 returns the request thread. 2833 """ 2834 kwargs['_return_http_data_only'] = True 2835 if kwargs.get('callback'): 2836 return self.update_settings_with_http_info(account_id, user_id, **kwargs) 2837 else: 2838 (data) = self.update_settings_with_http_info(account_id, user_id, **kwargs) 2839 return data
Updates the user account settings for a specified user.
Updates the account settings list and email notification types for the specified user.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_settings(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str allow_all_languages:
- UserSettingsInformation user_settings_information:
Returns
None If the method is called asynchronously, returns the request thread.
2841 def update_settings_with_http_info(self, account_id, user_id, **kwargs): 2842 """ 2843 Updates the user account settings for a specified user. 2844 Updates the account settings list and email notification types for the specified user. 2845 This method makes a synchronous HTTP request by default. To make an 2846 asynchronous HTTP request, please define a `callback` function 2847 to be invoked when receiving the response. 2848 >>> def callback_function(response): 2849 >>> pprint(response) 2850 >>> 2851 >>> thread = api.update_settings_with_http_info(account_id, user_id, callback=callback_function) 2852 2853 :param callback function: The callback function 2854 for asynchronous request. (optional) 2855 :param str account_id: The external account number (int) or account ID Guid. (required) 2856 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2857 :param str allow_all_languages: 2858 :param UserSettingsInformation user_settings_information: 2859 :return: None 2860 If the method is called asynchronously, 2861 returns the request thread. 2862 """ 2863 2864 all_params = ['account_id', 'user_id', 'allow_all_languages', 'user_settings_information'] 2865 all_params.append('callback') 2866 all_params.append('_return_http_data_only') 2867 all_params.append('_preload_content') 2868 all_params.append('_request_timeout') 2869 2870 params = locals() 2871 for key, val in iteritems(params['kwargs']): 2872 if key not in all_params: 2873 raise TypeError( 2874 "Got an unexpected keyword argument '%s'" 2875 " to method update_settings" % key 2876 ) 2877 params[key] = val 2878 del params['kwargs'] 2879 # verify the required parameter 'account_id' is set 2880 if ('account_id' not in params) or (params['account_id'] is None): 2881 raise ValueError("Missing the required parameter `account_id` when calling `update_settings`") 2882 # verify the required parameter 'user_id' is set 2883 if ('user_id' not in params) or (params['user_id'] is None): 2884 raise ValueError("Missing the required parameter `user_id` when calling `update_settings`") 2885 2886 2887 collection_formats = {} 2888 2889 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/settings'.replace('{format}', 'json') 2890 path_params = {} 2891 if 'account_id' in params: 2892 path_params['accountId'] = params['account_id'] 2893 if 'user_id' in params: 2894 path_params['userId'] = params['user_id'] 2895 2896 query_params = {} 2897 if 'allow_all_languages' in params: 2898 query_params['allow_all_languages'] = params['allow_all_languages'] 2899 2900 header_params = {} 2901 2902 form_params = [] 2903 local_var_files = {} 2904 2905 body_params = None 2906 if 'user_settings_information' in params: 2907 body_params = params['user_settings_information'] 2908 # HTTP header `Accept` 2909 header_params['Accept'] = self.api_client.\ 2910 select_header_accept(['application/json']) 2911 2912 # Authentication setting 2913 auth_settings = [] 2914 2915 return self.api_client.call_api(resource_path, 'PUT', 2916 path_params, 2917 query_params, 2918 header_params, 2919 body=body_params, 2920 post_params=form_params, 2921 files=local_var_files, 2922 response_type=None, 2923 auth_settings=auth_settings, 2924 callback=params.get('callback'), 2925 _return_http_data_only=params.get('_return_http_data_only'), 2926 _preload_content=params.get('_preload_content', True), 2927 _request_timeout=params.get('_request_timeout'), 2928 collection_formats=collection_formats)
Updates the user account settings for a specified user.
Updates the account settings list and email notification types for the specified user.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_settings_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str allow_all_languages:
- UserSettingsInformation user_settings_information:
Returns
None If the method is called asynchronously, returns the request thread.
2930 def update_signature(self, account_id, signature_id, user_id, **kwargs): 2931 """ 2932 Updates the user signature for a specified user. 2933 Creates, or updates, the signature font and initials for the specified user. When creating a signature, you use this resource to create the signature name and then add the signature and initials images into the signature. ###### Note: This will also create a default signature for the user when one does not exist. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 2934 This method makes a synchronous HTTP request by default. To make an 2935 asynchronous HTTP request, please define a `callback` function 2936 to be invoked when receiving the response. 2937 >>> def callback_function(response): 2938 >>> pprint(response) 2939 >>> 2940 >>> thread = api.update_signature(account_id, signature_id, user_id, callback=callback_function) 2941 2942 :param callback function: The callback function 2943 for asynchronous request. (optional) 2944 :param str account_id: The external account number (int) or account ID Guid. (required) 2945 :param str signature_id: The ID of the signature being accessed. (required) 2946 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2947 :param str close_existing_signature: When set to **true**, closes the current signature. 2948 :param UserSignatureDefinition user_signature_definition: 2949 :return: UserSignature 2950 If the method is called asynchronously, 2951 returns the request thread. 2952 """ 2953 kwargs['_return_http_data_only'] = True 2954 if kwargs.get('callback'): 2955 return self.update_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 2956 else: 2957 (data) = self.update_signature_with_http_info(account_id, signature_id, user_id, **kwargs) 2958 return data
Updates the user signature for a specified user.
Creates, or updates, the signature font and initials for the specified user. When creating a signature, you use this resource to create the signature name and then add the signature and initials images into the signature. ###### Note: This will also create a default signature for the user when one does not exist. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith".
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_signature(account_id, signature_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str signature_id: The ID of the signature being accessed. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str close_existing_signature: When set to true, closes the current signature.
- UserSignatureDefinition user_signature_definition:
Returns
UserSignature If the method is called asynchronously, returns the request thread.
2960 def update_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs): 2961 """ 2962 Updates the user signature for a specified user. 2963 Creates, or updates, the signature font and initials for the specified user. When creating a signature, you use this resource to create the signature name and then add the signature and initials images into the signature. ###### Note: This will also create a default signature for the user when one does not exist. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 2964 This method makes a synchronous HTTP request by default. To make an 2965 asynchronous HTTP request, please define a `callback` function 2966 to be invoked when receiving the response. 2967 >>> def callback_function(response): 2968 >>> pprint(response) 2969 >>> 2970 >>> thread = api.update_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function) 2971 2972 :param callback function: The callback function 2973 for asynchronous request. (optional) 2974 :param str account_id: The external account number (int) or account ID Guid. (required) 2975 :param str signature_id: The ID of the signature being accessed. (required) 2976 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 2977 :param str close_existing_signature: When set to **true**, closes the current signature. 2978 :param UserSignatureDefinition user_signature_definition: 2979 :return: UserSignature 2980 If the method is called asynchronously, 2981 returns the request thread. 2982 """ 2983 2984 all_params = ['account_id', 'signature_id', 'user_id', 'close_existing_signature', 'user_signature_definition'] 2985 all_params.append('callback') 2986 all_params.append('_return_http_data_only') 2987 all_params.append('_preload_content') 2988 all_params.append('_request_timeout') 2989 2990 params = locals() 2991 for key, val in iteritems(params['kwargs']): 2992 if key not in all_params: 2993 raise TypeError( 2994 "Got an unexpected keyword argument '%s'" 2995 " to method update_signature" % key 2996 ) 2997 params[key] = val 2998 del params['kwargs'] 2999 # verify the required parameter 'account_id' is set 3000 if ('account_id' not in params) or (params['account_id'] is None): 3001 raise ValueError("Missing the required parameter `account_id` when calling `update_signature`") 3002 # verify the required parameter 'signature_id' is set 3003 if ('signature_id' not in params) or (params['signature_id'] is None): 3004 raise ValueError("Missing the required parameter `signature_id` when calling `update_signature`") 3005 # verify the required parameter 'user_id' is set 3006 if ('user_id' not in params) or (params['user_id'] is None): 3007 raise ValueError("Missing the required parameter `user_id` when calling `update_signature`") 3008 3009 3010 collection_formats = {} 3011 3012 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json') 3013 path_params = {} 3014 if 'account_id' in params: 3015 path_params['accountId'] = params['account_id'] 3016 if 'signature_id' in params: 3017 path_params['signatureId'] = params['signature_id'] 3018 if 'user_id' in params: 3019 path_params['userId'] = params['user_id'] 3020 3021 query_params = {} 3022 if 'close_existing_signature' in params: 3023 query_params['close_existing_signature'] = params['close_existing_signature'] 3024 3025 header_params = {} 3026 3027 form_params = [] 3028 local_var_files = {} 3029 3030 body_params = None 3031 if 'user_signature_definition' in params: 3032 body_params = params['user_signature_definition'] 3033 # HTTP header `Accept` 3034 header_params['Accept'] = self.api_client.\ 3035 select_header_accept(['application/json']) 3036 3037 # Authentication setting 3038 auth_settings = [] 3039 3040 return self.api_client.call_api(resource_path, 'PUT', 3041 path_params, 3042 query_params, 3043 header_params, 3044 body=body_params, 3045 post_params=form_params, 3046 files=local_var_files, 3047 response_type='UserSignature', 3048 auth_settings=auth_settings, 3049 callback=params.get('callback'), 3050 _return_http_data_only=params.get('_return_http_data_only'), 3051 _preload_content=params.get('_preload_content', True), 3052 _request_timeout=params.get('_request_timeout'), 3053 collection_formats=collection_formats)
Updates the user signature for a specified user.
Creates, or updates, the signature font and initials for the specified user. When creating a signature, you use this resource to create the signature name and then add the signature and initials images into the signature. ###### Note: This will also create a default signature for the user when one does not exist. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith".
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str signature_id: The ID of the signature being accessed. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str close_existing_signature: When set to true, closes the current signature.
- UserSignatureDefinition user_signature_definition:
Returns
UserSignature If the method is called asynchronously, returns the request thread.
3055 def update_signature_image(self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs): 3056 """ 3057 Updates the user signature image or user initials image for the specified user. 3058 Updates the user signature image or user initials image for the specified user. The supported image formats for this file are: gif, png, jpeg, and bmp. The file must be less than 200K. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 3059 This method makes a synchronous HTTP request by default. To make an 3060 asynchronous HTTP request, please define a `callback` function 3061 to be invoked when receiving the response. 3062 >>> def callback_function(response): 3063 >>> pprint(response) 3064 >>> 3065 >>> thread = api.update_signature_image(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function) 3066 3067 :param callback function: The callback function 3068 for asynchronous request. (optional) 3069 :param str account_id: The external account number (int) or account ID Guid. (required) 3070 :param str image_type: One of **signature_image** or **initials_image**. (required) 3071 :param str signature_id: The ID of the signature being accessed. (required) 3072 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3073 :param str transparent_png: 3074 :param str image_bytes: Updated image content. (required) 3075 :return: UserSignature 3076 If the method is called asynchronously, 3077 returns the request thread. 3078 """ 3079 kwargs['_return_http_data_only'] = True 3080 if kwargs.get('callback'): 3081 return self.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, **kwargs) 3082 else: 3083 (data) = self.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, **kwargs) 3084 return data
Updates the user signature image or user initials image for the specified user.
Updates the user signature image or user initials image for the specified user. The supported image formats for this file are: gif, png, jpeg, and bmp. The file must be less than 200K. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith".
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_signature_image(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str image_type: One of signature_image or initials_image. (required)
- str signature_id: The ID of the signature being accessed. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str transparent_png:
- str image_bytes: Updated image content. (required)
Returns
UserSignature If the method is called asynchronously, returns the request thread.
3086 def update_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs): 3087 """ 3088 Updates the user signature image or user initials image for the specified user. 3089 Updates the user signature image or user initials image for the specified user. The supported image formats for this file are: gif, png, jpeg, and bmp. The file must be less than 200K. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The `signatureId` parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (`signatureId`), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode \"Bob Smith\" as \"Bob%20Smith\". 3090 This method makes a synchronous HTTP request by default. To make an 3091 asynchronous HTTP request, please define a `callback` function 3092 to be invoked when receiving the response. 3093 >>> def callback_function(response): 3094 >>> pprint(response) 3095 >>> 3096 >>> thread = api.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function) 3097 3098 :param callback function: The callback function 3099 for asynchronous request. (optional) 3100 :param str account_id: The external account number (int) or account ID Guid. (required) 3101 :param str image_type: One of **signature_image** or **initials_image**. (required) 3102 :param str signature_id: The ID of the signature being accessed. (required) 3103 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3104 :param str transparent_png: 3105 :param str image_bytes: Updated image content. (required) 3106 :return: UserSignature 3107 If the method is called asynchronously, 3108 returns the request thread. 3109 """ 3110 3111 all_params = ['account_id', 'image_type', 'signature_id', 'user_id', 'transparent_png', 'image_bytes'] 3112 all_params.append('callback') 3113 all_params.append('_return_http_data_only') 3114 all_params.append('_preload_content') 3115 all_params.append('_request_timeout') 3116 3117 params = locals() 3118 for key, val in iteritems(params['kwargs']): 3119 if key not in all_params: 3120 raise TypeError( 3121 "Got an unexpected keyword argument '%s'" 3122 " to method update_signature_image" % key 3123 ) 3124 params[key] = val 3125 del params['kwargs'] 3126 # verify the required parameter 'account_id' is set 3127 if ('account_id' not in params) or (params['account_id'] is None): 3128 raise ValueError("Missing the required parameter `account_id` when calling `update_signature_image`") 3129 # verify the required parameter 'image_type' is set 3130 if ('image_type' not in params) or (params['image_type'] is None): 3131 raise ValueError("Missing the required parameter `image_type` when calling `update_signature_image`") 3132 # verify the required parameter 'signature_id' is set 3133 if ('signature_id' not in params) or (params['signature_id'] is None): 3134 raise ValueError("Missing the required parameter `signature_id` when calling `update_signature_image`") 3135 # verify the required parameter 'user_id' is set 3136 if ('user_id' not in params) or (params['user_id'] is None): 3137 raise ValueError("Missing the required parameter `user_id` when calling `update_signature_image`") 3138 # verify the required parameter 'image_bytes' is set 3139 if ('image_bytes' not in params) or (params['image_bytes'] is None): 3140 raise ValueError("Missing the required parameter `image_bytes` when calling `update_signature_image`") 3141 3142 3143 collection_formats = {} 3144 3145 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json') 3146 path_params = {} 3147 if 'account_id' in params: 3148 path_params['accountId'] = params['account_id'] 3149 if 'image_type' in params: 3150 path_params['imageType'] = params['image_type'] 3151 if 'signature_id' in params: 3152 path_params['signatureId'] = params['signature_id'] 3153 if 'user_id' in params: 3154 path_params['userId'] = params['user_id'] 3155 3156 query_params = {} 3157 if 'transparent_png' in params: 3158 query_params['transparent_png'] = params['transparent_png'] 3159 3160 header_params = {} 3161 3162 form_params = [] 3163 local_var_files = {} 3164 3165 body_params = None 3166 if 'image_bytes' in params: 3167 body_params = params['image_bytes'] 3168 # HTTP header `Accept` 3169 header_params['Accept'] = self.api_client.\ 3170 select_header_accept(['application/json']) 3171 3172 # HTTP header `Content-Type` 3173 header_params['Content-Type'] = self.api_client.\ 3174 select_header_content_type(['image/gif']) 3175 3176 # Authentication setting 3177 auth_settings = [] 3178 3179 return self.api_client.call_api(resource_path, 'PUT', 3180 path_params, 3181 query_params, 3182 header_params, 3183 body=body_params, 3184 post_params=form_params, 3185 files=local_var_files, 3186 response_type='UserSignature', 3187 auth_settings=auth_settings, 3188 callback=params.get('callback'), 3189 _return_http_data_only=params.get('_return_http_data_only'), 3190 _preload_content=params.get('_preload_content', True), 3191 _request_timeout=params.get('_request_timeout'), 3192 collection_formats=collection_formats)
Updates the user signature image or user initials image for the specified user.
Updates the user signature image or user initials image for the specified user. The supported image formats for this file are: gif, png, jpeg, and bmp. The file must be less than 200K. The userId property specified in the endpoint must match the authenticated user's user ID and the user must be a member of the account. The signatureId parameter accepts a signature ID or a signature name. DocuSign recommends you use signature ID (signatureId), since some names contain characters that do not properly encode into a URL. If you use the user name, it is likely that the name includes spaces. In that case, URL encode the name before using it in the endpoint. For example encode "Bob Smith" as "Bob%20Smith".
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str image_type: One of signature_image or initials_image. (required)
- str signature_id: The ID of the signature being accessed. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str transparent_png:
- str image_bytes: Updated image content. (required)
Returns
UserSignature If the method is called asynchronously, returns the request thread.
3194 def update_signatures(self, account_id, user_id, **kwargs): 3195 """ 3196 Adds/updates a user signature. 3197 3198 This method makes a synchronous HTTP request by default. To make an 3199 asynchronous HTTP request, please define a `callback` function 3200 to be invoked when receiving the response. 3201 >>> def callback_function(response): 3202 >>> pprint(response) 3203 >>> 3204 >>> thread = api.update_signatures(account_id, user_id, callback=callback_function) 3205 3206 :param callback function: The callback function 3207 for asynchronous request. (optional) 3208 :param str account_id: The external account number (int) or account ID Guid. (required) 3209 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3210 :param UserSignaturesInformation user_signatures_information: 3211 :return: UserSignaturesInformation 3212 If the method is called asynchronously, 3213 returns the request thread. 3214 """ 3215 kwargs['_return_http_data_only'] = True 3216 if kwargs.get('callback'): 3217 return self.update_signatures_with_http_info(account_id, user_id, **kwargs) 3218 else: 3219 (data) = self.update_signatures_with_http_info(account_id, user_id, **kwargs) 3220 return data
Adds/updates a user signature.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_signatures(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- UserSignaturesInformation user_signatures_information:
Returns
UserSignaturesInformation If the method is called asynchronously, returns the request thread.
3222 def update_signatures_with_http_info(self, account_id, user_id, **kwargs): 3223 """ 3224 Adds/updates a user signature. 3225 3226 This method makes a synchronous HTTP request by default. To make an 3227 asynchronous HTTP request, please define a `callback` function 3228 to be invoked when receiving the response. 3229 >>> def callback_function(response): 3230 >>> pprint(response) 3231 >>> 3232 >>> thread = api.update_signatures_with_http_info(account_id, user_id, callback=callback_function) 3233 3234 :param callback function: The callback function 3235 for asynchronous request. (optional) 3236 :param str account_id: The external account number (int) or account ID Guid. (required) 3237 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3238 :param UserSignaturesInformation user_signatures_information: 3239 :return: UserSignaturesInformation 3240 If the method is called asynchronously, 3241 returns the request thread. 3242 """ 3243 3244 all_params = ['account_id', 'user_id', 'user_signatures_information'] 3245 all_params.append('callback') 3246 all_params.append('_return_http_data_only') 3247 all_params.append('_preload_content') 3248 all_params.append('_request_timeout') 3249 3250 params = locals() 3251 for key, val in iteritems(params['kwargs']): 3252 if key not in all_params: 3253 raise TypeError( 3254 "Got an unexpected keyword argument '%s'" 3255 " to method update_signatures" % key 3256 ) 3257 params[key] = val 3258 del params['kwargs'] 3259 # verify the required parameter 'account_id' is set 3260 if ('account_id' not in params) or (params['account_id'] is None): 3261 raise ValueError("Missing the required parameter `account_id` when calling `update_signatures`") 3262 # verify the required parameter 'user_id' is set 3263 if ('user_id' not in params) or (params['user_id'] is None): 3264 raise ValueError("Missing the required parameter `user_id` when calling `update_signatures`") 3265 3266 3267 collection_formats = {} 3268 3269 resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json') 3270 path_params = {} 3271 if 'account_id' in params: 3272 path_params['accountId'] = params['account_id'] 3273 if 'user_id' in params: 3274 path_params['userId'] = params['user_id'] 3275 3276 query_params = {} 3277 3278 header_params = {} 3279 3280 form_params = [] 3281 local_var_files = {} 3282 3283 body_params = None 3284 if 'user_signatures_information' in params: 3285 body_params = params['user_signatures_information'] 3286 # HTTP header `Accept` 3287 header_params['Accept'] = self.api_client.\ 3288 select_header_accept(['application/json']) 3289 3290 # Authentication setting 3291 auth_settings = [] 3292 3293 return self.api_client.call_api(resource_path, 'PUT', 3294 path_params, 3295 query_params, 3296 header_params, 3297 body=body_params, 3298 post_params=form_params, 3299 files=local_var_files, 3300 response_type='UserSignaturesInformation', 3301 auth_settings=auth_settings, 3302 callback=params.get('callback'), 3303 _return_http_data_only=params.get('_return_http_data_only'), 3304 _preload_content=params.get('_preload_content', True), 3305 _request_timeout=params.get('_request_timeout'), 3306 collection_formats=collection_formats)
Adds/updates a user signature.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_signatures_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- UserSignaturesInformation user_signatures_information:
Returns
UserSignaturesInformation If the method is called asynchronously, returns the request thread.
3308 def update_user(self, account_id, user_id, **kwargs): 3309 """ 3310 Updates the specified user information. 3311 To update user information for a specific user, submit a [Users](#Users) object with updated field values in the request body of this operation. 3312 This method makes a synchronous HTTP request by default. To make an 3313 asynchronous HTTP request, please define a `callback` function 3314 to be invoked when receiving the response. 3315 >>> def callback_function(response): 3316 >>> pprint(response) 3317 >>> 3318 >>> thread = api.update_user(account_id, user_id, callback=callback_function) 3319 3320 :param callback function: The callback function 3321 for asynchronous request. (optional) 3322 :param str account_id: The external account number (int) or account ID Guid. (required) 3323 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3324 :param str allow_all_languages: 3325 :param UserInformation user_information: 3326 :return: UserInformation 3327 If the method is called asynchronously, 3328 returns the request thread. 3329 """ 3330 kwargs['_return_http_data_only'] = True 3331 if kwargs.get('callback'): 3332 return self.update_user_with_http_info(account_id, user_id, **kwargs) 3333 else: 3334 (data) = self.update_user_with_http_info(account_id, user_id, **kwargs) 3335 return data
Updates the specified user information.
To update user information for a specific user, submit a Users object with updated field values in the request body of this operation.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_user(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str allow_all_languages:
- UserInformation user_information:
Returns
UserInformation If the method is called asynchronously, returns the request thread.
3337 def update_user_with_http_info(self, account_id, user_id, **kwargs): 3338 """ 3339 Updates the specified user information. 3340 To update user information for a specific user, submit a [Users](#Users) object with updated field values in the request body of this operation. 3341 This method makes a synchronous HTTP request by default. To make an 3342 asynchronous HTTP request, please define a `callback` function 3343 to be invoked when receiving the response. 3344 >>> def callback_function(response): 3345 >>> pprint(response) 3346 >>> 3347 >>> thread = api.update_user_with_http_info(account_id, user_id, callback=callback_function) 3348 3349 :param callback function: The callback function 3350 for asynchronous request. (optional) 3351 :param str account_id: The external account number (int) or account ID Guid. (required) 3352 :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) 3353 :param str allow_all_languages: 3354 :param UserInformation user_information: 3355 :return: UserInformation 3356 If the method is called asynchronously, 3357 returns the request thread. 3358 """ 3359 3360 all_params = ['account_id', 'user_id', 'allow_all_languages', 'user_information'] 3361 all_params.append('callback') 3362 all_params.append('_return_http_data_only') 3363 all_params.append('_preload_content') 3364 all_params.append('_request_timeout') 3365 3366 params = locals() 3367 for key, val in iteritems(params['kwargs']): 3368 if key not in all_params: 3369 raise TypeError( 3370 "Got an unexpected keyword argument '%s'" 3371 " to method update_user" % key 3372 ) 3373 params[key] = val 3374 del params['kwargs'] 3375 # verify the required parameter 'account_id' is set 3376 if ('account_id' not in params) or (params['account_id'] is None): 3377 raise ValueError("Missing the required parameter `account_id` when calling `update_user`") 3378 # verify the required parameter 'user_id' is set 3379 if ('user_id' not in params) or (params['user_id'] is None): 3380 raise ValueError("Missing the required parameter `user_id` when calling `update_user`") 3381 3382 3383 collection_formats = {} 3384 3385 resource_path = '/v2.1/accounts/{accountId}/users/{userId}'.replace('{format}', 'json') 3386 path_params = {} 3387 if 'account_id' in params: 3388 path_params['accountId'] = params['account_id'] 3389 if 'user_id' in params: 3390 path_params['userId'] = params['user_id'] 3391 3392 query_params = {} 3393 if 'allow_all_languages' in params: 3394 query_params['allow_all_languages'] = params['allow_all_languages'] 3395 3396 header_params = {} 3397 3398 form_params = [] 3399 local_var_files = {} 3400 3401 body_params = None 3402 if 'user_information' in params: 3403 body_params = params['user_information'] 3404 # HTTP header `Accept` 3405 header_params['Accept'] = self.api_client.\ 3406 select_header_accept(['application/json']) 3407 3408 # Authentication setting 3409 auth_settings = [] 3410 3411 return self.api_client.call_api(resource_path, 'PUT', 3412 path_params, 3413 query_params, 3414 header_params, 3415 body=body_params, 3416 post_params=form_params, 3417 files=local_var_files, 3418 response_type='UserInformation', 3419 auth_settings=auth_settings, 3420 callback=params.get('callback'), 3421 _return_http_data_only=params.get('_return_http_data_only'), 3422 _preload_content=params.get('_preload_content', True), 3423 _request_timeout=params.get('_request_timeout'), 3424 collection_formats=collection_formats)
Updates the specified user information.
To update user information for a specific user, submit a Users object with updated field values in the request body of this operation.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_user_with_http_info(account_id, user_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required)
- str allow_all_languages:
- UserInformation user_information:
Returns
UserInformation If the method is called asynchronously, returns the request thread.
3426 def update_users(self, account_id, **kwargs): 3427 """ 3428 Change one or more user in the specified account. 3429 This method updates the information about one or more account users. 3430 This method makes a synchronous HTTP request by default. To make an 3431 asynchronous HTTP request, please define a `callback` function 3432 to be invoked when receiving the response. 3433 >>> def callback_function(response): 3434 >>> pprint(response) 3435 >>> 3436 >>> thread = api.update_users(account_id, callback=callback_function) 3437 3438 :param callback function: The callback function 3439 for asynchronous request. (optional) 3440 :param str account_id: The external account number (int) or account ID Guid. (required) 3441 :param str allow_all_languages: 3442 :param UserInformationList user_information_list: 3443 :return: UserInformationList 3444 If the method is called asynchronously, 3445 returns the request thread. 3446 """ 3447 kwargs['_return_http_data_only'] = True 3448 if kwargs.get('callback'): 3449 return self.update_users_with_http_info(account_id, **kwargs) 3450 else: 3451 (data) = self.update_users_with_http_info(account_id, **kwargs) 3452 return data
Change one or more user in the specified account.
This method updates the information about one or more account users.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_users(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str allow_all_languages:
- UserInformationList user_information_list:
Returns
UserInformationList If the method is called asynchronously, returns the request thread.
3454 def update_users_with_http_info(self, account_id, **kwargs): 3455 """ 3456 Change one or more user in the specified account. 3457 This method updates the information about one or more account users. 3458 This method makes a synchronous HTTP request by default. To make an 3459 asynchronous HTTP request, please define a `callback` function 3460 to be invoked when receiving the response. 3461 >>> def callback_function(response): 3462 >>> pprint(response) 3463 >>> 3464 >>> thread = api.update_users_with_http_info(account_id, callback=callback_function) 3465 3466 :param callback function: The callback function 3467 for asynchronous request. (optional) 3468 :param str account_id: The external account number (int) or account ID Guid. (required) 3469 :param str allow_all_languages: 3470 :param UserInformationList user_information_list: 3471 :return: UserInformationList 3472 If the method is called asynchronously, 3473 returns the request thread. 3474 """ 3475 3476 all_params = ['account_id', 'allow_all_languages', 'user_information_list'] 3477 all_params.append('callback') 3478 all_params.append('_return_http_data_only') 3479 all_params.append('_preload_content') 3480 all_params.append('_request_timeout') 3481 3482 params = locals() 3483 for key, val in iteritems(params['kwargs']): 3484 if key not in all_params: 3485 raise TypeError( 3486 "Got an unexpected keyword argument '%s'" 3487 " to method update_users" % key 3488 ) 3489 params[key] = val 3490 del params['kwargs'] 3491 # verify the required parameter 'account_id' is set 3492 if ('account_id' not in params) or (params['account_id'] is None): 3493 raise ValueError("Missing the required parameter `account_id` when calling `update_users`") 3494 3495 3496 collection_formats = {} 3497 3498 resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json') 3499 path_params = {} 3500 if 'account_id' in params: 3501 path_params['accountId'] = params['account_id'] 3502 3503 query_params = {} 3504 if 'allow_all_languages' in params: 3505 query_params['allow_all_languages'] = params['allow_all_languages'] 3506 3507 header_params = {} 3508 3509 form_params = [] 3510 local_var_files = {} 3511 3512 body_params = None 3513 if 'user_information_list' in params: 3514 body_params = params['user_information_list'] 3515 # HTTP header `Accept` 3516 header_params['Accept'] = self.api_client.\ 3517 select_header_accept(['application/json']) 3518 3519 # Authentication setting 3520 auth_settings = [] 3521 3522 return self.api_client.call_api(resource_path, 'PUT', 3523 path_params, 3524 query_params, 3525 header_params, 3526 body=body_params, 3527 post_params=form_params, 3528 files=local_var_files, 3529 response_type='UserInformationList', 3530 auth_settings=auth_settings, 3531 callback=params.get('callback'), 3532 _return_http_data_only=params.get('_return_http_data_only'), 3533 _preload_content=params.get('_preload_content', True), 3534 _request_timeout=params.get('_request_timeout'), 3535 collection_formats=collection_formats)
Change one or more user in the specified account.
This method updates the information about one or more account users.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_users_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str allow_all_languages:
- UserInformationList user_information_list:
Returns
UserInformationList If the method is called asynchronously, returns the request thread.