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        :return: UserInformation
1190                 If the method is called asynchronously,
1191                 returns the request thread.
1192        """
1193        kwargs['_return_http_data_only'] = True
1194        if kwargs.get('callback'):
1195            return self.get_information_with_http_info(account_id, user_id, **kwargs)
1196        else:
1197            (data) = self.get_information_with_http_info(account_id, user_id, **kwargs)
1198            return data
1199
1200    def get_information_with_http_info(self, account_id, user_id, **kwargs):
1201        """
1202        Gets the user information for a specified user.
1203        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**.
1204        This method makes a synchronous HTTP request by default. To make an
1205        asynchronous HTTP request, please define a `callback` function
1206        to be invoked when receiving the response.
1207        >>> def callback_function(response):
1208        >>>     pprint(response)
1209        >>>
1210        >>> thread = api.get_information_with_http_info(account_id, user_id, callback=callback_function)
1211
1212        :param callback function: The callback function
1213            for asynchronous request. (optional)
1214        :param str account_id: The external account number (int) or account ID Guid. (required)
1215        :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)
1216        :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account.
1217        :param str email:
1218        :return: UserInformation
1219                 If the method is called asynchronously,
1220                 returns the request thread.
1221        """
1222
1223        all_params = ['account_id', 'user_id', 'additional_info', 'email']
1224        all_params.append('callback')
1225        all_params.append('_return_http_data_only')
1226        all_params.append('_preload_content')
1227        all_params.append('_request_timeout')
1228
1229        params = locals()
1230        for key, val in iteritems(params['kwargs']):
1231            if key not in all_params:
1232                raise TypeError(
1233                    "Got an unexpected keyword argument '%s'"
1234                    " to method get_information" % key
1235                )
1236            params[key] = val
1237        del params['kwargs']
1238        # verify the required parameter 'account_id' is set
1239        if ('account_id' not in params) or (params['account_id'] is None):
1240            raise ValueError("Missing the required parameter `account_id` when calling `get_information`")
1241        # verify the required parameter 'user_id' is set
1242        if ('user_id' not in params) or (params['user_id'] is None):
1243            raise ValueError("Missing the required parameter `user_id` when calling `get_information`")
1244
1245
1246        collection_formats = {}
1247
1248        resource_path = '/v2.1/accounts/{accountId}/users/{userId}'.replace('{format}', 'json')
1249        path_params = {}
1250        if 'account_id' in params:
1251            path_params['accountId'] = params['account_id']
1252        if 'user_id' in params:
1253            path_params['userId'] = params['user_id']
1254
1255        query_params = {}
1256        if 'additional_info' in params:
1257            query_params['additional_info'] = params['additional_info']
1258        if 'email' in params:
1259            query_params['email'] = params['email']
1260
1261        header_params = {}
1262
1263        form_params = []
1264        local_var_files = {}
1265
1266        body_params = None
1267        # HTTP header `Accept`
1268        header_params['Accept'] = self.api_client.\
1269            select_header_accept(['application/json'])
1270
1271        # Authentication setting
1272        auth_settings = []
1273
1274        return self.api_client.call_api(resource_path, 'GET',
1275                                        path_params,
1276                                        query_params,
1277                                        header_params,
1278                                        body=body_params,
1279                                        post_params=form_params,
1280                                        files=local_var_files,
1281                                        response_type='UserInformation',
1282                                        auth_settings=auth_settings,
1283                                        callback=params.get('callback'),
1284                                        _return_http_data_only=params.get('_return_http_data_only'),
1285                                        _preload_content=params.get('_preload_content', True),
1286                                        _request_timeout=params.get('_request_timeout'),
1287                                        collection_formats=collection_formats)
1288
1289    def get_profile(self, account_id, user_id, **kwargs):
1290        """
1291        Retrieves the user profile for a specified user.
1292        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.
1293        This method makes a synchronous HTTP request by default. To make an
1294        asynchronous HTTP request, please define a `callback` function
1295        to be invoked when receiving the response.
1296        >>> def callback_function(response):
1297        >>>     pprint(response)
1298        >>>
1299        >>> thread = api.get_profile(account_id, user_id, callback=callback_function)
1300
1301        :param callback function: The callback function
1302            for asynchronous request. (optional)
1303        :param str account_id: The external account number (int) or account ID Guid. (required)
1304        :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)
1305        :return: UserProfile
1306                 If the method is called asynchronously,
1307                 returns the request thread.
1308        """
1309        kwargs['_return_http_data_only'] = True
1310        if kwargs.get('callback'):
1311            return self.get_profile_with_http_info(account_id, user_id, **kwargs)
1312        else:
1313            (data) = self.get_profile_with_http_info(account_id, user_id, **kwargs)
1314            return data
1315
1316    def get_profile_with_http_info(self, account_id, user_id, **kwargs):
1317        """
1318        Retrieves the user profile for a specified user.
1319        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.
1320        This method makes a synchronous HTTP request by default. To make an
1321        asynchronous HTTP request, please define a `callback` function
1322        to be invoked when receiving the response.
1323        >>> def callback_function(response):
1324        >>>     pprint(response)
1325        >>>
1326        >>> thread = api.get_profile_with_http_info(account_id, user_id, callback=callback_function)
1327
1328        :param callback function: The callback function
1329            for asynchronous request. (optional)
1330        :param str account_id: The external account number (int) or account ID Guid. (required)
1331        :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)
1332        :return: UserProfile
1333                 If the method is called asynchronously,
1334                 returns the request thread.
1335        """
1336
1337        all_params = ['account_id', 'user_id']
1338        all_params.append('callback')
1339        all_params.append('_return_http_data_only')
1340        all_params.append('_preload_content')
1341        all_params.append('_request_timeout')
1342
1343        params = locals()
1344        for key, val in iteritems(params['kwargs']):
1345            if key not in all_params:
1346                raise TypeError(
1347                    "Got an unexpected keyword argument '%s'"
1348                    " to method get_profile" % key
1349                )
1350            params[key] = val
1351        del params['kwargs']
1352        # verify the required parameter 'account_id' is set
1353        if ('account_id' not in params) or (params['account_id'] is None):
1354            raise ValueError("Missing the required parameter `account_id` when calling `get_profile`")
1355        # verify the required parameter 'user_id' is set
1356        if ('user_id' not in params) or (params['user_id'] is None):
1357            raise ValueError("Missing the required parameter `user_id` when calling `get_profile`")
1358
1359
1360        collection_formats = {}
1361
1362        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile'.replace('{format}', 'json')
1363        path_params = {}
1364        if 'account_id' in params:
1365            path_params['accountId'] = params['account_id']
1366        if 'user_id' in params:
1367            path_params['userId'] = params['user_id']
1368
1369        query_params = {}
1370
1371        header_params = {}
1372
1373        form_params = []
1374        local_var_files = {}
1375
1376        body_params = None
1377        # HTTP header `Accept`
1378        header_params['Accept'] = self.api_client.\
1379            select_header_accept(['application/json'])
1380
1381        # Authentication setting
1382        auth_settings = []
1383
1384        return self.api_client.call_api(resource_path, 'GET',
1385                                        path_params,
1386                                        query_params,
1387                                        header_params,
1388                                        body=body_params,
1389                                        post_params=form_params,
1390                                        files=local_var_files,
1391                                        response_type='UserProfile',
1392                                        auth_settings=auth_settings,
1393                                        callback=params.get('callback'),
1394                                        _return_http_data_only=params.get('_return_http_data_only'),
1395                                        _preload_content=params.get('_preload_content', True),
1396                                        _request_timeout=params.get('_request_timeout'),
1397                                        collection_formats=collection_formats)
1398
1399    def get_profile_image(self, account_id, user_id, **kwargs):
1400        """
1401        Retrieves the user profile image for the specified user.
1402        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.
1403        This method makes a synchronous HTTP request by default. To make an
1404        asynchronous HTTP request, please define a `callback` function
1405        to be invoked when receiving the response.
1406        >>> def callback_function(response):
1407        >>>     pprint(response)
1408        >>>
1409        >>> thread = api.get_profile_image(account_id, user_id, callback=callback_function)
1410
1411        :param callback function: The callback function
1412            for asynchronous request. (optional)
1413        :param str account_id: The external account number (int) or account ID Guid. (required)
1414        :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)
1415        :param str encoding:
1416        :return: file
1417                 If the method is called asynchronously,
1418                 returns the request thread.
1419        """
1420        kwargs['_return_http_data_only'] = True
1421        if kwargs.get('callback'):
1422            return self.get_profile_image_with_http_info(account_id, user_id, **kwargs)
1423        else:
1424            (data) = self.get_profile_image_with_http_info(account_id, user_id, **kwargs)
1425            return data
1426
1427    def get_profile_image_with_http_info(self, account_id, user_id, **kwargs):
1428        """
1429        Retrieves the user profile image for the specified user.
1430        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.
1431        This method makes a synchronous HTTP request by default. To make an
1432        asynchronous HTTP request, please define a `callback` function
1433        to be invoked when receiving the response.
1434        >>> def callback_function(response):
1435        >>>     pprint(response)
1436        >>>
1437        >>> thread = api.get_profile_image_with_http_info(account_id, user_id, callback=callback_function)
1438
1439        :param callback function: The callback function
1440            for asynchronous request. (optional)
1441        :param str account_id: The external account number (int) or account ID Guid. (required)
1442        :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)
1443        :param str encoding:
1444        :return: file
1445                 If the method is called asynchronously,
1446                 returns the request thread.
1447        """
1448
1449        all_params = ['account_id', 'user_id', 'encoding']
1450        all_params.append('callback')
1451        all_params.append('_return_http_data_only')
1452        all_params.append('_preload_content')
1453        all_params.append('_request_timeout')
1454
1455        params = locals()
1456        for key, val in iteritems(params['kwargs']):
1457            if key not in all_params:
1458                raise TypeError(
1459                    "Got an unexpected keyword argument '%s'"
1460                    " to method get_profile_image" % key
1461                )
1462            params[key] = val
1463        del params['kwargs']
1464        # verify the required parameter 'account_id' is set
1465        if ('account_id' not in params) or (params['account_id'] is None):
1466            raise ValueError("Missing the required parameter `account_id` when calling `get_profile_image`")
1467        # verify the required parameter 'user_id' is set
1468        if ('user_id' not in params) or (params['user_id'] is None):
1469            raise ValueError("Missing the required parameter `user_id` when calling `get_profile_image`")
1470
1471
1472        collection_formats = {}
1473
1474        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json')
1475        path_params = {}
1476        if 'account_id' in params:
1477            path_params['accountId'] = params['account_id']
1478        if 'user_id' in params:
1479            path_params['userId'] = params['user_id']
1480
1481        query_params = {}
1482        if 'encoding' in params:
1483            query_params['encoding'] = params['encoding']
1484
1485        header_params = {}
1486
1487        form_params = []
1488        local_var_files = {}
1489
1490        body_params = None
1491        # HTTP header `Accept`
1492        header_params['Accept'] = self.api_client.\
1493            select_header_accept(['image/gif'])
1494
1495        # Authentication setting
1496        auth_settings = []
1497
1498        return self.api_client.call_api(resource_path, 'GET',
1499                                        path_params,
1500                                        query_params,
1501                                        header_params,
1502                                        body=body_params,
1503                                        post_params=form_params,
1504                                        files=local_var_files,
1505                                        response_type='file',
1506                                        auth_settings=auth_settings,
1507                                        callback=params.get('callback'),
1508                                        _return_http_data_only=params.get('_return_http_data_only'),
1509                                        _preload_content=params.get('_preload_content', True),
1510                                        _request_timeout=params.get('_request_timeout'),
1511                                        collection_formats=collection_formats)
1512
1513    def get_settings(self, account_id, user_id, **kwargs):
1514        """
1515        Gets the user account settings for a specified user.
1516        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].
1517        This method makes a synchronous HTTP request by default. To make an
1518        asynchronous HTTP request, please define a `callback` function
1519        to be invoked when receiving the response.
1520        >>> def callback_function(response):
1521        >>>     pprint(response)
1522        >>>
1523        >>> thread = api.get_settings(account_id, user_id, callback=callback_function)
1524
1525        :param callback function: The callback function
1526            for asynchronous request. (optional)
1527        :param str account_id: The external account number (int) or account ID Guid. (required)
1528        :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)
1529        :return: UserSettingsInformation
1530                 If the method is called asynchronously,
1531                 returns the request thread.
1532        """
1533        kwargs['_return_http_data_only'] = True
1534        if kwargs.get('callback'):
1535            return self.get_settings_with_http_info(account_id, user_id, **kwargs)
1536        else:
1537            (data) = self.get_settings_with_http_info(account_id, user_id, **kwargs)
1538            return data
1539
1540    def get_settings_with_http_info(self, account_id, user_id, **kwargs):
1541        """
1542        Gets the user account settings for a specified user.
1543        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].
1544        This method makes a synchronous HTTP request by default. To make an
1545        asynchronous HTTP request, please define a `callback` function
1546        to be invoked when receiving the response.
1547        >>> def callback_function(response):
1548        >>>     pprint(response)
1549        >>>
1550        >>> thread = api.get_settings_with_http_info(account_id, user_id, callback=callback_function)
1551
1552        :param callback function: The callback function
1553            for asynchronous request. (optional)
1554        :param str account_id: The external account number (int) or account ID Guid. (required)
1555        :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)
1556        :return: UserSettingsInformation
1557                 If the method is called asynchronously,
1558                 returns the request thread.
1559        """
1560
1561        all_params = ['account_id', 'user_id']
1562        all_params.append('callback')
1563        all_params.append('_return_http_data_only')
1564        all_params.append('_preload_content')
1565        all_params.append('_request_timeout')
1566
1567        params = locals()
1568        for key, val in iteritems(params['kwargs']):
1569            if key not in all_params:
1570                raise TypeError(
1571                    "Got an unexpected keyword argument '%s'"
1572                    " to method get_settings" % key
1573                )
1574            params[key] = val
1575        del params['kwargs']
1576        # verify the required parameter 'account_id' is set
1577        if ('account_id' not in params) or (params['account_id'] is None):
1578            raise ValueError("Missing the required parameter `account_id` when calling `get_settings`")
1579        # verify the required parameter 'user_id' is set
1580        if ('user_id' not in params) or (params['user_id'] is None):
1581            raise ValueError("Missing the required parameter `user_id` when calling `get_settings`")
1582
1583
1584        collection_formats = {}
1585
1586        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/settings'.replace('{format}', 'json')
1587        path_params = {}
1588        if 'account_id' in params:
1589            path_params['accountId'] = params['account_id']
1590        if 'user_id' in params:
1591            path_params['userId'] = params['user_id']
1592
1593        query_params = {}
1594
1595        header_params = {}
1596
1597        form_params = []
1598        local_var_files = {}
1599
1600        body_params = None
1601        # HTTP header `Accept`
1602        header_params['Accept'] = self.api_client.\
1603            select_header_accept(['application/json'])
1604
1605        # Authentication setting
1606        auth_settings = []
1607
1608        return self.api_client.call_api(resource_path, 'GET',
1609                                        path_params,
1610                                        query_params,
1611                                        header_params,
1612                                        body=body_params,
1613                                        post_params=form_params,
1614                                        files=local_var_files,
1615                                        response_type='UserSettingsInformation',
1616                                        auth_settings=auth_settings,
1617                                        callback=params.get('callback'),
1618                                        _return_http_data_only=params.get('_return_http_data_only'),
1619                                        _preload_content=params.get('_preload_content', True),
1620                                        _request_timeout=params.get('_request_timeout'),
1621                                        collection_formats=collection_formats)
1622
1623    def get_signature(self, account_id, signature_id, user_id, **kwargs):
1624        """
1625        Gets the user signature information for the specified user.
1626        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\".
1627        This method makes a synchronous HTTP request by default. To make an
1628        asynchronous HTTP request, please define a `callback` function
1629        to be invoked when receiving the response.
1630        >>> def callback_function(response):
1631        >>>     pprint(response)
1632        >>>
1633        >>> thread = api.get_signature(account_id, signature_id, user_id, callback=callback_function)
1634
1635        :param callback function: The callback function
1636            for asynchronous request. (optional)
1637        :param str account_id: The external account number (int) or account ID Guid. (required)
1638        :param str signature_id: The ID of the signature being accessed. (required)
1639        :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)
1640        :return: UserSignature
1641                 If the method is called asynchronously,
1642                 returns the request thread.
1643        """
1644        kwargs['_return_http_data_only'] = True
1645        if kwargs.get('callback'):
1646            return self.get_signature_with_http_info(account_id, signature_id, user_id, **kwargs)
1647        else:
1648            (data) = self.get_signature_with_http_info(account_id, signature_id, user_id, **kwargs)
1649            return data
1650
1651    def get_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs):
1652        """
1653        Gets the user signature information for the specified user.
1654        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\".
1655        This method makes a synchronous HTTP request by default. To make an
1656        asynchronous HTTP request, please define a `callback` function
1657        to be invoked when receiving the response.
1658        >>> def callback_function(response):
1659        >>>     pprint(response)
1660        >>>
1661        >>> thread = api.get_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function)
1662
1663        :param callback function: The callback function
1664            for asynchronous request. (optional)
1665        :param str account_id: The external account number (int) or account ID Guid. (required)
1666        :param str signature_id: The ID of the signature being accessed. (required)
1667        :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)
1668        :return: UserSignature
1669                 If the method is called asynchronously,
1670                 returns the request thread.
1671        """
1672
1673        all_params = ['account_id', 'signature_id', 'user_id']
1674        all_params.append('callback')
1675        all_params.append('_return_http_data_only')
1676        all_params.append('_preload_content')
1677        all_params.append('_request_timeout')
1678
1679        params = locals()
1680        for key, val in iteritems(params['kwargs']):
1681            if key not in all_params:
1682                raise TypeError(
1683                    "Got an unexpected keyword argument '%s'"
1684                    " to method get_signature" % key
1685                )
1686            params[key] = val
1687        del params['kwargs']
1688        # verify the required parameter 'account_id' is set
1689        if ('account_id' not in params) or (params['account_id'] is None):
1690            raise ValueError("Missing the required parameter `account_id` when calling `get_signature`")
1691        # verify the required parameter 'signature_id' is set
1692        if ('signature_id' not in params) or (params['signature_id'] is None):
1693            raise ValueError("Missing the required parameter `signature_id` when calling `get_signature`")
1694        # verify the required parameter 'user_id' is set
1695        if ('user_id' not in params) or (params['user_id'] is None):
1696            raise ValueError("Missing the required parameter `user_id` when calling `get_signature`")
1697
1698
1699        collection_formats = {}
1700
1701        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json')
1702        path_params = {}
1703        if 'account_id' in params:
1704            path_params['accountId'] = params['account_id']
1705        if 'signature_id' in params:
1706            path_params['signatureId'] = params['signature_id']
1707        if 'user_id' in params:
1708            path_params['userId'] = params['user_id']
1709
1710        query_params = {}
1711
1712        header_params = {}
1713
1714        form_params = []
1715        local_var_files = {}
1716
1717        body_params = None
1718        # HTTP header `Accept`
1719        header_params['Accept'] = self.api_client.\
1720            select_header_accept(['application/json'])
1721
1722        # Authentication setting
1723        auth_settings = []
1724
1725        return self.api_client.call_api(resource_path, 'GET',
1726                                        path_params,
1727                                        query_params,
1728                                        header_params,
1729                                        body=body_params,
1730                                        post_params=form_params,
1731                                        files=local_var_files,
1732                                        response_type='UserSignature',
1733                                        auth_settings=auth_settings,
1734                                        callback=params.get('callback'),
1735                                        _return_http_data_only=params.get('_return_http_data_only'),
1736                                        _preload_content=params.get('_preload_content', True),
1737                                        _request_timeout=params.get('_request_timeout'),
1738                                        collection_formats=collection_formats)
1739
1740    def get_signature_image(self, account_id, image_type, signature_id, user_id, **kwargs):
1741        """
1742        Retrieves the user initials image or the  user signature image for the specified user.
1743        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.
1744        This method makes a synchronous HTTP request by default. To make an
1745        asynchronous HTTP request, please define a `callback` function
1746        to be invoked when receiving the response.
1747        >>> def callback_function(response):
1748        >>>     pprint(response)
1749        >>>
1750        >>> thread = api.get_signature_image(account_id, image_type, signature_id, user_id, callback=callback_function)
1751
1752        :param callback function: The callback function
1753            for asynchronous request. (optional)
1754        :param str account_id: The external account number (int) or account ID Guid. (required)
1755        :param str image_type: One of **signature_image** or **initials_image**. (required)
1756        :param str signature_id: The ID of the signature being accessed. (required)
1757        :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)
1758        :param str include_chrome:
1759        :return: file
1760                 If the method is called asynchronously,
1761                 returns the request thread.
1762        """
1763        kwargs['_return_http_data_only'] = True
1764        if kwargs.get('callback'):
1765            return self.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs)
1766        else:
1767            (data) = self.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs)
1768            return data
1769
1770    def get_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, **kwargs):
1771        """
1772        Retrieves the user initials image or the  user signature image for the specified user.
1773        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.
1774        This method makes a synchronous HTTP request by default. To make an
1775        asynchronous HTTP request, please define a `callback` function
1776        to be invoked when receiving the response.
1777        >>> def callback_function(response):
1778        >>>     pprint(response)
1779        >>>
1780        >>> thread = api.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, callback=callback_function)
1781
1782        :param callback function: The callback function
1783            for asynchronous request. (optional)
1784        :param str account_id: The external account number (int) or account ID Guid. (required)
1785        :param str image_type: One of **signature_image** or **initials_image**. (required)
1786        :param str signature_id: The ID of the signature being accessed. (required)
1787        :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)
1788        :param str include_chrome:
1789        :return: file
1790                 If the method is called asynchronously,
1791                 returns the request thread.
1792        """
1793
1794        all_params = ['account_id', 'image_type', 'signature_id', 'user_id', 'include_chrome']
1795        all_params.append('callback')
1796        all_params.append('_return_http_data_only')
1797        all_params.append('_preload_content')
1798        all_params.append('_request_timeout')
1799
1800        params = locals()
1801        for key, val in iteritems(params['kwargs']):
1802            if key not in all_params:
1803                raise TypeError(
1804                    "Got an unexpected keyword argument '%s'"
1805                    " to method get_signature_image" % key
1806                )
1807            params[key] = val
1808        del params['kwargs']
1809        # verify the required parameter 'account_id' is set
1810        if ('account_id' not in params) or (params['account_id'] is None):
1811            raise ValueError("Missing the required parameter `account_id` when calling `get_signature_image`")
1812        # verify the required parameter 'image_type' is set
1813        if ('image_type' not in params) or (params['image_type'] is None):
1814            raise ValueError("Missing the required parameter `image_type` when calling `get_signature_image`")
1815        # verify the required parameter 'signature_id' is set
1816        if ('signature_id' not in params) or (params['signature_id'] is None):
1817            raise ValueError("Missing the required parameter `signature_id` when calling `get_signature_image`")
1818        # verify the required parameter 'user_id' is set
1819        if ('user_id' not in params) or (params['user_id'] is None):
1820            raise ValueError("Missing the required parameter `user_id` when calling `get_signature_image`")
1821
1822
1823        collection_formats = {}
1824
1825        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json')
1826        path_params = {}
1827        if 'account_id' in params:
1828            path_params['accountId'] = params['account_id']
1829        if 'image_type' in params:
1830            path_params['imageType'] = params['image_type']
1831        if 'signature_id' in params:
1832            path_params['signatureId'] = params['signature_id']
1833        if 'user_id' in params:
1834            path_params['userId'] = params['user_id']
1835
1836        query_params = {}
1837        if 'include_chrome' in params:
1838            query_params['include_chrome'] = params['include_chrome']
1839
1840        header_params = {}
1841
1842        form_params = []
1843        local_var_files = {}
1844
1845        body_params = None
1846        # HTTP header `Accept`
1847        header_params['Accept'] = self.api_client.\
1848            select_header_accept(['image/gif'])
1849
1850        # Authentication setting
1851        auth_settings = []
1852
1853        return self.api_client.call_api(resource_path, 'GET',
1854                                        path_params,
1855                                        query_params,
1856                                        header_params,
1857                                        body=body_params,
1858                                        post_params=form_params,
1859                                        files=local_var_files,
1860                                        response_type='file',
1861                                        auth_settings=auth_settings,
1862                                        callback=params.get('callback'),
1863                                        _return_http_data_only=params.get('_return_http_data_only'),
1864                                        _preload_content=params.get('_preload_content', True),
1865                                        _request_timeout=params.get('_request_timeout'),
1866                                        collection_formats=collection_formats)
1867
1868    def list(self, account_id, **kwargs):
1869        """
1870        Retrieves the list of users for the specified account.
1871        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
1872        This method makes a synchronous HTTP request by default. To make an
1873        asynchronous HTTP request, please define a `callback` function
1874        to be invoked when receiving the response.
1875        >>> def callback_function(response):
1876        >>>     pprint(response)
1877        >>>
1878        >>> thread = api.list(account_id, callback=callback_function)
1879
1880        :param callback function: The callback function
1881            for asynchronous request. (optional)
1882        :param str account_id: The external account number (int) or account ID Guid. (required)
1883        :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account.
1884        :param str alternate_admins_only:
1885        :param str count: Number of records to return. The number must be greater than 0 and less than or equal to 100. 
1886        :param str domain_users_only:
1887        :param str email:
1888        :param str email_substring: Filters the returned user records by the email address or a sub-string of email address.
1889        :param str group_id: Filters user records returned by one or more group Id's.
1890        :param str include_usersettings_for_csv:
1891        :param str login_status:
1892        :param str not_group_id:
1893        :param str start_position: Starting value for the list. 
1894        :param str status:
1895        :param str user_name_substring: Filters the user records returned by the user name or a sub-string of user name.
1896        :return: UserInformationList
1897                 If the method is called asynchronously,
1898                 returns the request thread.
1899        """
1900        kwargs['_return_http_data_only'] = True
1901        if kwargs.get('callback'):
1902            return self.list_with_http_info(account_id, **kwargs)
1903        else:
1904            (data) = self.list_with_http_info(account_id, **kwargs)
1905            return data
1906
1907    def list_with_http_info(self, account_id, **kwargs):
1908        """
1909        Retrieves the list of users for the specified account.
1910        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
1911        This method makes a synchronous HTTP request by default. To make an
1912        asynchronous HTTP request, please define a `callback` function
1913        to be invoked when receiving the response.
1914        >>> def callback_function(response):
1915        >>>     pprint(response)
1916        >>>
1917        >>> thread = api.list_with_http_info(account_id, callback=callback_function)
1918
1919        :param callback function: The callback function
1920            for asynchronous request. (optional)
1921        :param str account_id: The external account number (int) or account ID Guid. (required)
1922        :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account.
1923        :param str alternate_admins_only:
1924        :param str count: Number of records to return. The number must be greater than 0 and less than or equal to 100. 
1925        :param str domain_users_only:
1926        :param str email:
1927        :param str email_substring: Filters the returned user records by the email address or a sub-string of email address.
1928        :param str group_id: Filters user records returned by one or more group Id's.
1929        :param str include_usersettings_for_csv:
1930        :param str login_status:
1931        :param str not_group_id:
1932        :param str start_position: Starting value for the list. 
1933        :param str status:
1934        :param str user_name_substring: Filters the user records returned by the user name or a sub-string of user name.
1935        :return: UserInformationList
1936                 If the method is called asynchronously,
1937                 returns the request thread.
1938        """
1939
1940        all_params = ['account_id', 'additional_info', 'alternate_admins_only', 'count', 'domain_users_only', 'email', 'email_substring', 'group_id', 'include_usersettings_for_csv', 'login_status', 'not_group_id', 'start_position', 'status', 'user_name_substring']
1941        all_params.append('callback')
1942        all_params.append('_return_http_data_only')
1943        all_params.append('_preload_content')
1944        all_params.append('_request_timeout')
1945
1946        params = locals()
1947        for key, val in iteritems(params['kwargs']):
1948            if key not in all_params:
1949                raise TypeError(
1950                    "Got an unexpected keyword argument '%s'"
1951                    " to method list" % key
1952                )
1953            params[key] = val
1954        del params['kwargs']
1955        # verify the required parameter 'account_id' is set
1956        if ('account_id' not in params) or (params['account_id'] is None):
1957            raise ValueError("Missing the required parameter `account_id` when calling `list`")
1958
1959
1960        collection_formats = {}
1961
1962        resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json')
1963        path_params = {}
1964        if 'account_id' in params:
1965            path_params['accountId'] = params['account_id']
1966
1967        query_params = {}
1968        if 'additional_info' in params:
1969            query_params['additional_info'] = params['additional_info']
1970        if 'alternate_admins_only' in params:
1971            query_params['alternate_admins_only'] = params['alternate_admins_only']
1972        if 'count' in params:
1973            query_params['count'] = params['count']
1974        if 'domain_users_only' in params:
1975            query_params['domain_users_only'] = params['domain_users_only']
1976        if 'email' in params:
1977            query_params['email'] = params['email']
1978        if 'email_substring' in params:
1979            query_params['email_substring'] = params['email_substring']
1980        if 'group_id' in params:
1981            query_params['group_id'] = params['group_id']
1982        if 'include_usersettings_for_csv' in params:
1983            query_params['include_usersettings_for_csv'] = params['include_usersettings_for_csv']
1984        if 'login_status' in params:
1985            query_params['login_status'] = params['login_status']
1986        if 'not_group_id' in params:
1987            query_params['not_group_id'] = params['not_group_id']
1988        if 'start_position' in params:
1989            query_params['start_position'] = params['start_position']
1990        if 'status' in params:
1991            query_params['status'] = params['status']
1992        if 'user_name_substring' in params:
1993            query_params['user_name_substring'] = params['user_name_substring']
1994
1995        header_params = {}
1996
1997        form_params = []
1998        local_var_files = {}
1999
2000        body_params = None
2001        # HTTP header `Accept`
2002        header_params['Accept'] = self.api_client.\
2003            select_header_accept(['application/json'])
2004
2005        # Authentication setting
2006        auth_settings = []
2007
2008        return self.api_client.call_api(resource_path, 'GET',
2009                                        path_params,
2010                                        query_params,
2011                                        header_params,
2012                                        body=body_params,
2013                                        post_params=form_params,
2014                                        files=local_var_files,
2015                                        response_type='UserInformationList',
2016                                        auth_settings=auth_settings,
2017                                        callback=params.get('callback'),
2018                                        _return_http_data_only=params.get('_return_http_data_only'),
2019                                        _preload_content=params.get('_preload_content', True),
2020                                        _request_timeout=params.get('_request_timeout'),
2021                                        collection_formats=collection_formats)
2022
2023    def list_custom_settings(self, account_id, user_id, **kwargs):
2024        """
2025        Retrieves the custom user settings for a specified user.
2026        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.
2027        This method makes a synchronous HTTP request by default. To make an
2028        asynchronous HTTP request, please define a `callback` function
2029        to be invoked when receiving the response.
2030        >>> def callback_function(response):
2031        >>>     pprint(response)
2032        >>>
2033        >>> thread = api.list_custom_settings(account_id, user_id, callback=callback_function)
2034
2035        :param callback function: The callback function
2036            for asynchronous request. (optional)
2037        :param str account_id: The external account number (int) or account ID Guid. (required)
2038        :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)
2039        :return: CustomSettingsInformation
2040                 If the method is called asynchronously,
2041                 returns the request thread.
2042        """
2043        kwargs['_return_http_data_only'] = True
2044        if kwargs.get('callback'):
2045            return self.list_custom_settings_with_http_info(account_id, user_id, **kwargs)
2046        else:
2047            (data) = self.list_custom_settings_with_http_info(account_id, user_id, **kwargs)
2048            return data
2049
2050    def list_custom_settings_with_http_info(self, account_id, user_id, **kwargs):
2051        """
2052        Retrieves the custom user settings for a specified user.
2053        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.
2054        This method makes a synchronous HTTP request by default. To make an
2055        asynchronous HTTP request, please define a `callback` function
2056        to be invoked when receiving the response.
2057        >>> def callback_function(response):
2058        >>>     pprint(response)
2059        >>>
2060        >>> thread = api.list_custom_settings_with_http_info(account_id, user_id, callback=callback_function)
2061
2062        :param callback function: The callback function
2063            for asynchronous request. (optional)
2064        :param str account_id: The external account number (int) or account ID Guid. (required)
2065        :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)
2066        :return: CustomSettingsInformation
2067                 If the method is called asynchronously,
2068                 returns the request thread.
2069        """
2070
2071        all_params = ['account_id', 'user_id']
2072        all_params.append('callback')
2073        all_params.append('_return_http_data_only')
2074        all_params.append('_preload_content')
2075        all_params.append('_request_timeout')
2076
2077        params = locals()
2078        for key, val in iteritems(params['kwargs']):
2079            if key not in all_params:
2080                raise TypeError(
2081                    "Got an unexpected keyword argument '%s'"
2082                    " to method list_custom_settings" % key
2083                )
2084            params[key] = val
2085        del params['kwargs']
2086        # verify the required parameter 'account_id' is set
2087        if ('account_id' not in params) or (params['account_id'] is None):
2088            raise ValueError("Missing the required parameter `account_id` when calling `list_custom_settings`")
2089        # verify the required parameter 'user_id' is set
2090        if ('user_id' not in params) or (params['user_id'] is None):
2091            raise ValueError("Missing the required parameter `user_id` when calling `list_custom_settings`")
2092
2093
2094        collection_formats = {}
2095
2096        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json')
2097        path_params = {}
2098        if 'account_id' in params:
2099            path_params['accountId'] = params['account_id']
2100        if 'user_id' in params:
2101            path_params['userId'] = params['user_id']
2102
2103        query_params = {}
2104
2105        header_params = {}
2106
2107        form_params = []
2108        local_var_files = {}
2109
2110        body_params = None
2111        # HTTP header `Accept`
2112        header_params['Accept'] = self.api_client.\
2113            select_header_accept(['application/json'])
2114
2115        # Authentication setting
2116        auth_settings = []
2117
2118        return self.api_client.call_api(resource_path, 'GET',
2119                                        path_params,
2120                                        query_params,
2121                                        header_params,
2122                                        body=body_params,
2123                                        post_params=form_params,
2124                                        files=local_var_files,
2125                                        response_type='CustomSettingsInformation',
2126                                        auth_settings=auth_settings,
2127                                        callback=params.get('callback'),
2128                                        _return_http_data_only=params.get('_return_http_data_only'),
2129                                        _preload_content=params.get('_preload_content', True),
2130                                        _request_timeout=params.get('_request_timeout'),
2131                                        collection_formats=collection_formats)
2132
2133    def list_signatures(self, account_id, user_id, **kwargs):
2134        """
2135        Retrieves a list of user signature definitions for a specified user.
2136        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\".
2137        This method makes a synchronous HTTP request by default. To make an
2138        asynchronous HTTP request, please define a `callback` function
2139        to be invoked when receiving the response.
2140        >>> def callback_function(response):
2141        >>>     pprint(response)
2142        >>>
2143        >>> thread = api.list_signatures(account_id, user_id, callback=callback_function)
2144
2145        :param callback function: The callback function
2146            for asynchronous request. (optional)
2147        :param str account_id: The external account number (int) or account ID Guid. (required)
2148        :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)
2149        :param str stamp_type:
2150        :return: UserSignaturesInformation
2151                 If the method is called asynchronously,
2152                 returns the request thread.
2153        """
2154        kwargs['_return_http_data_only'] = True
2155        if kwargs.get('callback'):
2156            return self.list_signatures_with_http_info(account_id, user_id, **kwargs)
2157        else:
2158            (data) = self.list_signatures_with_http_info(account_id, user_id, **kwargs)
2159            return data
2160
2161    def list_signatures_with_http_info(self, account_id, user_id, **kwargs):
2162        """
2163        Retrieves a list of user signature definitions for a specified user.
2164        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\".
2165        This method makes a synchronous HTTP request by default. To make an
2166        asynchronous HTTP request, please define a `callback` function
2167        to be invoked when receiving the response.
2168        >>> def callback_function(response):
2169        >>>     pprint(response)
2170        >>>
2171        >>> thread = api.list_signatures_with_http_info(account_id, user_id, callback=callback_function)
2172
2173        :param callback function: The callback function
2174            for asynchronous request. (optional)
2175        :param str account_id: The external account number (int) or account ID Guid. (required)
2176        :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)
2177        :param str stamp_type:
2178        :return: UserSignaturesInformation
2179                 If the method is called asynchronously,
2180                 returns the request thread.
2181        """
2182
2183        all_params = ['account_id', 'user_id', 'stamp_type']
2184        all_params.append('callback')
2185        all_params.append('_return_http_data_only')
2186        all_params.append('_preload_content')
2187        all_params.append('_request_timeout')
2188
2189        params = locals()
2190        for key, val in iteritems(params['kwargs']):
2191            if key not in all_params:
2192                raise TypeError(
2193                    "Got an unexpected keyword argument '%s'"
2194                    " to method list_signatures" % key
2195                )
2196            params[key] = val
2197        del params['kwargs']
2198        # verify the required parameter 'account_id' is set
2199        if ('account_id' not in params) or (params['account_id'] is None):
2200            raise ValueError("Missing the required parameter `account_id` when calling `list_signatures`")
2201        # verify the required parameter 'user_id' is set
2202        if ('user_id' not in params) or (params['user_id'] is None):
2203            raise ValueError("Missing the required parameter `user_id` when calling `list_signatures`")
2204
2205
2206        collection_formats = {}
2207
2208        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json')
2209        path_params = {}
2210        if 'account_id' in params:
2211            path_params['accountId'] = params['account_id']
2212        if 'user_id' in params:
2213            path_params['userId'] = params['user_id']
2214
2215        query_params = {}
2216        if 'stamp_type' in params:
2217            query_params['stamp_type'] = params['stamp_type']
2218
2219        header_params = {}
2220
2221        form_params = []
2222        local_var_files = {}
2223
2224        body_params = None
2225        # HTTP header `Accept`
2226        header_params['Accept'] = self.api_client.\
2227            select_header_accept(['application/json'])
2228
2229        # Authentication setting
2230        auth_settings = []
2231
2232        return self.api_client.call_api(resource_path, 'GET',
2233                                        path_params,
2234                                        query_params,
2235                                        header_params,
2236                                        body=body_params,
2237                                        post_params=form_params,
2238                                        files=local_var_files,
2239                                        response_type='UserSignaturesInformation',
2240                                        auth_settings=auth_settings,
2241                                        callback=params.get('callback'),
2242                                        _return_http_data_only=params.get('_return_http_data_only'),
2243                                        _preload_content=params.get('_preload_content', True),
2244                                        _request_timeout=params.get('_request_timeout'),
2245                                        collection_formats=collection_formats)
2246
2247    def post_contacts(self, account_id, **kwargs):
2248        """
2249        Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type).
2250        This method adds multiple contacts into a contacts list.
2251        This method makes a synchronous HTTP request by default. To make an
2252        asynchronous HTTP request, please define a `callback` function
2253        to be invoked when receiving the response.
2254        >>> def callback_function(response):
2255        >>>     pprint(response)
2256        >>>
2257        >>> thread = api.post_contacts(account_id, callback=callback_function)
2258
2259        :param callback function: The callback function
2260            for asynchronous request. (optional)
2261        :param str account_id: The external account number (int) or account ID Guid. (required)
2262        :param ContactModRequest contact_mod_request:
2263        :return: ContactUpdateResponse
2264                 If the method is called asynchronously,
2265                 returns the request thread.
2266        """
2267        kwargs['_return_http_data_only'] = True
2268        if kwargs.get('callback'):
2269            return self.post_contacts_with_http_info(account_id, **kwargs)
2270        else:
2271            (data) = self.post_contacts_with_http_info(account_id, **kwargs)
2272            return data
2273
2274    def post_contacts_with_http_info(self, account_id, **kwargs):
2275        """
2276        Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type).
2277        This method adds multiple contacts into a contacts list.
2278        This method makes a synchronous HTTP request by default. To make an
2279        asynchronous HTTP request, please define a `callback` function
2280        to be invoked when receiving the response.
2281        >>> def callback_function(response):
2282        >>>     pprint(response)
2283        >>>
2284        >>> thread = api.post_contacts_with_http_info(account_id, callback=callback_function)
2285
2286        :param callback function: The callback function
2287            for asynchronous request. (optional)
2288        :param str account_id: The external account number (int) or account ID Guid. (required)
2289        :param ContactModRequest contact_mod_request:
2290        :return: ContactUpdateResponse
2291                 If the method is called asynchronously,
2292                 returns the request thread.
2293        """
2294
2295        all_params = ['account_id', 'contact_mod_request']
2296        all_params.append('callback')
2297        all_params.append('_return_http_data_only')
2298        all_params.append('_preload_content')
2299        all_params.append('_request_timeout')
2300
2301        params = locals()
2302        for key, val in iteritems(params['kwargs']):
2303            if key not in all_params:
2304                raise TypeError(
2305                    "Got an unexpected keyword argument '%s'"
2306                    " to method post_contacts" % key
2307                )
2308            params[key] = val
2309        del params['kwargs']
2310        # verify the required parameter 'account_id' is set
2311        if ('account_id' not in params) or (params['account_id'] is None):
2312            raise ValueError("Missing the required parameter `account_id` when calling `post_contacts`")
2313
2314
2315        collection_formats = {}
2316
2317        resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json')
2318        path_params = {}
2319        if 'account_id' in params:
2320            path_params['accountId'] = params['account_id']
2321
2322        query_params = {}
2323
2324        header_params = {}
2325
2326        form_params = []
2327        local_var_files = {}
2328
2329        body_params = None
2330        if 'contact_mod_request' in params:
2331            body_params = params['contact_mod_request']
2332        # HTTP header `Accept`
2333        header_params['Accept'] = self.api_client.\
2334            select_header_accept(['application/json'])
2335
2336        # Authentication setting
2337        auth_settings = []
2338
2339        return self.api_client.call_api(resource_path, 'POST',
2340                                        path_params,
2341                                        query_params,
2342                                        header_params,
2343                                        body=body_params,
2344                                        post_params=form_params,
2345                                        files=local_var_files,
2346                                        response_type='ContactUpdateResponse',
2347                                        auth_settings=auth_settings,
2348                                        callback=params.get('callback'),
2349                                        _return_http_data_only=params.get('_return_http_data_only'),
2350                                        _preload_content=params.get('_preload_content', True),
2351                                        _request_timeout=params.get('_request_timeout'),
2352                                        collection_formats=collection_formats)
2353
2354    def put_contacts(self, account_id, **kwargs):
2355        """
2356        Replaces contacts associated with an account for the DocuSign service.
2357        This method updates one or more contacts associated with an account.
2358        This method makes a synchronous HTTP request by default. To make an
2359        asynchronous HTTP request, please define a `callback` function
2360        to be invoked when receiving the response.
2361        >>> def callback_function(response):
2362        >>>     pprint(response)
2363        >>>
2364        >>> thread = api.put_contacts(account_id, callback=callback_function)
2365
2366        :param callback function: The callback function
2367            for asynchronous request. (optional)
2368        :param str account_id: The external account number (int) or account ID Guid. (required)
2369        :param ContactModRequest contact_mod_request:
2370        :return: ContactUpdateResponse
2371                 If the method is called asynchronously,
2372                 returns the request thread.
2373        """
2374        kwargs['_return_http_data_only'] = True
2375        if kwargs.get('callback'):
2376            return self.put_contacts_with_http_info(account_id, **kwargs)
2377        else:
2378            (data) = self.put_contacts_with_http_info(account_id, **kwargs)
2379            return data
2380
2381    def put_contacts_with_http_info(self, account_id, **kwargs):
2382        """
2383        Replaces contacts associated with an account for the DocuSign service.
2384        This method updates one or more contacts associated with an account.
2385        This method makes a synchronous HTTP request by default. To make an
2386        asynchronous HTTP request, please define a `callback` function
2387        to be invoked when receiving the response.
2388        >>> def callback_function(response):
2389        >>>     pprint(response)
2390        >>>
2391        >>> thread = api.put_contacts_with_http_info(account_id, callback=callback_function)
2392
2393        :param callback function: The callback function
2394            for asynchronous request. (optional)
2395        :param str account_id: The external account number (int) or account ID Guid. (required)
2396        :param ContactModRequest contact_mod_request:
2397        :return: ContactUpdateResponse
2398                 If the method is called asynchronously,
2399                 returns the request thread.
2400        """
2401
2402        all_params = ['account_id', 'contact_mod_request']
2403        all_params.append('callback')
2404        all_params.append('_return_http_data_only')
2405        all_params.append('_preload_content')
2406        all_params.append('_request_timeout')
2407
2408        params = locals()
2409        for key, val in iteritems(params['kwargs']):
2410            if key not in all_params:
2411                raise TypeError(
2412                    "Got an unexpected keyword argument '%s'"
2413                    " to method put_contacts" % key
2414                )
2415            params[key] = val
2416        del params['kwargs']
2417        # verify the required parameter 'account_id' is set
2418        if ('account_id' not in params) or (params['account_id'] is None):
2419            raise ValueError("Missing the required parameter `account_id` when calling `put_contacts`")
2420
2421
2422        collection_formats = {}
2423
2424        resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json')
2425        path_params = {}
2426        if 'account_id' in params:
2427            path_params['accountId'] = params['account_id']
2428
2429        query_params = {}
2430
2431        header_params = {}
2432
2433        form_params = []
2434        local_var_files = {}
2435
2436        body_params = None
2437        if 'contact_mod_request' in params:
2438            body_params = params['contact_mod_request']
2439        # HTTP header `Accept`
2440        header_params['Accept'] = self.api_client.\
2441            select_header_accept(['application/json'])
2442
2443        # Authentication setting
2444        auth_settings = []
2445
2446        return self.api_client.call_api(resource_path, 'PUT',
2447                                        path_params,
2448                                        query_params,
2449                                        header_params,
2450                                        body=body_params,
2451                                        post_params=form_params,
2452                                        files=local_var_files,
2453                                        response_type='ContactUpdateResponse',
2454                                        auth_settings=auth_settings,
2455                                        callback=params.get('callback'),
2456                                        _return_http_data_only=params.get('_return_http_data_only'),
2457                                        _preload_content=params.get('_preload_content', True),
2458                                        _request_timeout=params.get('_request_timeout'),
2459                                        collection_formats=collection_formats)
2460
2461    def update_custom_settings(self, account_id, user_id, **kwargs):
2462        """
2463        Adds or updates custom user settings for the specified user.
2464        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.
2465        This method makes a synchronous HTTP request by default. To make an
2466        asynchronous HTTP request, please define a `callback` function
2467        to be invoked when receiving the response.
2468        >>> def callback_function(response):
2469        >>>     pprint(response)
2470        >>>
2471        >>> thread = api.update_custom_settings(account_id, user_id, callback=callback_function)
2472
2473        :param callback function: The callback function
2474            for asynchronous request. (optional)
2475        :param str account_id: The external account number (int) or account ID Guid. (required)
2476        :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)
2477        :param CustomSettingsInformation custom_settings_information:
2478        :return: CustomSettingsInformation
2479                 If the method is called asynchronously,
2480                 returns the request thread.
2481        """
2482        kwargs['_return_http_data_only'] = True
2483        if kwargs.get('callback'):
2484            return self.update_custom_settings_with_http_info(account_id, user_id, **kwargs)
2485        else:
2486            (data) = self.update_custom_settings_with_http_info(account_id, user_id, **kwargs)
2487            return data
2488
2489    def update_custom_settings_with_http_info(self, account_id, user_id, **kwargs):
2490        """
2491        Adds or updates custom user settings for the specified user.
2492        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.
2493        This method makes a synchronous HTTP request by default. To make an
2494        asynchronous HTTP request, please define a `callback` function
2495        to be invoked when receiving the response.
2496        >>> def callback_function(response):
2497        >>>     pprint(response)
2498        >>>
2499        >>> thread = api.update_custom_settings_with_http_info(account_id, user_id, callback=callback_function)
2500
2501        :param callback function: The callback function
2502            for asynchronous request. (optional)
2503        :param str account_id: The external account number (int) or account ID Guid. (required)
2504        :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)
2505        :param CustomSettingsInformation custom_settings_information:
2506        :return: CustomSettingsInformation
2507                 If the method is called asynchronously,
2508                 returns the request thread.
2509        """
2510
2511        all_params = ['account_id', 'user_id', 'custom_settings_information']
2512        all_params.append('callback')
2513        all_params.append('_return_http_data_only')
2514        all_params.append('_preload_content')
2515        all_params.append('_request_timeout')
2516
2517        params = locals()
2518        for key, val in iteritems(params['kwargs']):
2519            if key not in all_params:
2520                raise TypeError(
2521                    "Got an unexpected keyword argument '%s'"
2522                    " to method update_custom_settings" % key
2523                )
2524            params[key] = val
2525        del params['kwargs']
2526        # verify the required parameter 'account_id' is set
2527        if ('account_id' not in params) or (params['account_id'] is None):
2528            raise ValueError("Missing the required parameter `account_id` when calling `update_custom_settings`")
2529        # verify the required parameter 'user_id' is set
2530        if ('user_id' not in params) or (params['user_id'] is None):
2531            raise ValueError("Missing the required parameter `user_id` when calling `update_custom_settings`")
2532
2533
2534        collection_formats = {}
2535
2536        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json')
2537        path_params = {}
2538        if 'account_id' in params:
2539            path_params['accountId'] = params['account_id']
2540        if 'user_id' in params:
2541            path_params['userId'] = params['user_id']
2542
2543        query_params = {}
2544
2545        header_params = {}
2546
2547        form_params = []
2548        local_var_files = {}
2549
2550        body_params = None
2551        if 'custom_settings_information' in params:
2552            body_params = params['custom_settings_information']
2553        # HTTP header `Accept`
2554        header_params['Accept'] = self.api_client.\
2555            select_header_accept(['application/json'])
2556
2557        # Authentication setting
2558        auth_settings = []
2559
2560        return self.api_client.call_api(resource_path, 'PUT',
2561                                        path_params,
2562                                        query_params,
2563                                        header_params,
2564                                        body=body_params,
2565                                        post_params=form_params,
2566                                        files=local_var_files,
2567                                        response_type='CustomSettingsInformation',
2568                                        auth_settings=auth_settings,
2569                                        callback=params.get('callback'),
2570                                        _return_http_data_only=params.get('_return_http_data_only'),
2571                                        _preload_content=params.get('_preload_content', True),
2572                                        _request_timeout=params.get('_request_timeout'),
2573                                        collection_formats=collection_formats)
2574
2575    def update_profile(self, account_id, user_id, **kwargs):
2576        """
2577        Updates the user profile information for the specified user.
2578        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.
2579        This method makes a synchronous HTTP request by default. To make an
2580        asynchronous HTTP request, please define a `callback` function
2581        to be invoked when receiving the response.
2582        >>> def callback_function(response):
2583        >>>     pprint(response)
2584        >>>
2585        >>> thread = api.update_profile(account_id, user_id, callback=callback_function)
2586
2587        :param callback function: The callback function
2588            for asynchronous request. (optional)
2589        :param str account_id: The external account number (int) or account ID Guid. (required)
2590        :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)
2591        :param UserProfile user_profile:
2592        :return: None
2593                 If the method is called asynchronously,
2594                 returns the request thread.
2595        """
2596        kwargs['_return_http_data_only'] = True
2597        if kwargs.get('callback'):
2598            return self.update_profile_with_http_info(account_id, user_id, **kwargs)
2599        else:
2600            (data) = self.update_profile_with_http_info(account_id, user_id, **kwargs)
2601            return data
2602
2603    def update_profile_with_http_info(self, account_id, user_id, **kwargs):
2604        """
2605        Updates the user profile information for the specified user.
2606        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.
2607        This method makes a synchronous HTTP request by default. To make an
2608        asynchronous HTTP request, please define a `callback` function
2609        to be invoked when receiving the response.
2610        >>> def callback_function(response):
2611        >>>     pprint(response)
2612        >>>
2613        >>> thread = api.update_profile_with_http_info(account_id, user_id, callback=callback_function)
2614
2615        :param callback function: The callback function
2616            for asynchronous request. (optional)
2617        :param str account_id: The external account number (int) or account ID Guid. (required)
2618        :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)
2619        :param UserProfile user_profile:
2620        :return: None
2621                 If the method is called asynchronously,
2622                 returns the request thread.
2623        """
2624
2625        all_params = ['account_id', 'user_id', 'user_profile']
2626        all_params.append('callback')
2627        all_params.append('_return_http_data_only')
2628        all_params.append('_preload_content')
2629        all_params.append('_request_timeout')
2630
2631        params = locals()
2632        for key, val in iteritems(params['kwargs']):
2633            if key not in all_params:
2634                raise TypeError(
2635                    "Got an unexpected keyword argument '%s'"
2636                    " to method update_profile" % key
2637                )
2638            params[key] = val
2639        del params['kwargs']
2640        # verify the required parameter 'account_id' is set
2641        if ('account_id' not in params) or (params['account_id'] is None):
2642            raise ValueError("Missing the required parameter `account_id` when calling `update_profile`")
2643        # verify the required parameter 'user_id' is set
2644        if ('user_id' not in params) or (params['user_id'] is None):
2645            raise ValueError("Missing the required parameter `user_id` when calling `update_profile`")
2646
2647
2648        collection_formats = {}
2649
2650        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile'.replace('{format}', 'json')
2651        path_params = {}
2652        if 'account_id' in params:
2653            path_params['accountId'] = params['account_id']
2654        if 'user_id' in params:
2655            path_params['userId'] = params['user_id']
2656
2657        query_params = {}
2658
2659        header_params = {}
2660
2661        form_params = []
2662        local_var_files = {}
2663
2664        body_params = None
2665        if 'user_profile' in params:
2666            body_params = params['user_profile']
2667        # HTTP header `Accept`
2668        header_params['Accept'] = self.api_client.\
2669            select_header_accept(['application/json'])
2670
2671        # Authentication setting
2672        auth_settings = []
2673
2674        return self.api_client.call_api(resource_path, 'PUT',
2675                                        path_params,
2676                                        query_params,
2677                                        header_params,
2678                                        body=body_params,
2679                                        post_params=form_params,
2680                                        files=local_var_files,
2681                                        response_type=None,
2682                                        auth_settings=auth_settings,
2683                                        callback=params.get('callback'),
2684                                        _return_http_data_only=params.get('_return_http_data_only'),
2685                                        _preload_content=params.get('_preload_content', True),
2686                                        _request_timeout=params.get('_request_timeout'),
2687                                        collection_formats=collection_formats)
2688
2689    def update_profile_image(self, account_id, user_id, **kwargs):
2690        """
2691        Updates the user profile image for a specified user.
2692        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.
2693        This method makes a synchronous HTTP request by default. To make an
2694        asynchronous HTTP request, please define a `callback` function
2695        to be invoked when receiving the response.
2696        >>> def callback_function(response):
2697        >>>     pprint(response)
2698        >>>
2699        >>> thread = api.update_profile_image(account_id, user_id, callback=callback_function)
2700
2701        :param callback function: The callback function
2702            for asynchronous request. (optional)
2703        :param str account_id: The external account number (int) or account ID Guid. (required)
2704        :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)
2705        :return: None
2706                 If the method is called asynchronously,
2707                 returns the request thread.
2708        """
2709        kwargs['_return_http_data_only'] = True
2710        if kwargs.get('callback'):
2711            return self.update_profile_image_with_http_info(account_id, user_id, **kwargs)
2712        else:
2713            (data) = self.update_profile_image_with_http_info(account_id, user_id, **kwargs)
2714            return data
2715
2716    def update_profile_image_with_http_info(self, account_id, user_id, **kwargs):
2717        """
2718        Updates the user profile image for a specified user.
2719        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.
2720        This method makes a synchronous HTTP request by default. To make an
2721        asynchronous HTTP request, please define a `callback` function
2722        to be invoked when receiving the response.
2723        >>> def callback_function(response):
2724        >>>     pprint(response)
2725        >>>
2726        >>> thread = api.update_profile_image_with_http_info(account_id, user_id, callback=callback_function)
2727
2728        :param callback function: The callback function
2729            for asynchronous request. (optional)
2730        :param str account_id: The external account number (int) or account ID Guid. (required)
2731        :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)
2732        :return: None
2733                 If the method is called asynchronously,
2734                 returns the request thread.
2735        """
2736
2737        all_params = ['account_id', 'user_id']
2738        all_params.append('callback')
2739        all_params.append('_return_http_data_only')
2740        all_params.append('_preload_content')
2741        all_params.append('_request_timeout')
2742
2743        params = locals()
2744        for key, val in iteritems(params['kwargs']):
2745            if key not in all_params:
2746                raise TypeError(
2747                    "Got an unexpected keyword argument '%s'"
2748                    " to method update_profile_image" % key
2749                )
2750            params[key] = val
2751        del params['kwargs']
2752        # verify the required parameter 'account_id' is set
2753        if ('account_id' not in params) or (params['account_id'] is None):
2754            raise ValueError("Missing the required parameter `account_id` when calling `update_profile_image`")
2755        # verify the required parameter 'user_id' is set
2756        if ('user_id' not in params) or (params['user_id'] is None):
2757            raise ValueError("Missing the required parameter `user_id` when calling `update_profile_image`")
2758
2759
2760        collection_formats = {}
2761
2762        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json')
2763        path_params = {}
2764        if 'account_id' in params:
2765            path_params['accountId'] = params['account_id']
2766        if 'user_id' in params:
2767            path_params['userId'] = params['user_id']
2768
2769        query_params = {}
2770
2771        header_params = {}
2772
2773        form_params = []
2774        local_var_files = {}
2775
2776        body_params = None
2777        # HTTP header `Accept`
2778        header_params['Accept'] = self.api_client.\
2779            select_header_accept(['application/json'])
2780
2781        # HTTP header `Content-Type`
2782        header_params['Content-Type'] = self.api_client.\
2783            select_header_content_type(['image/gif'])
2784
2785        # Authentication setting
2786        auth_settings = []
2787
2788        return self.api_client.call_api(resource_path, 'PUT',
2789                                        path_params,
2790                                        query_params,
2791                                        header_params,
2792                                        body=body_params,
2793                                        post_params=form_params,
2794                                        files=local_var_files,
2795                                        response_type=None,
2796                                        auth_settings=auth_settings,
2797                                        callback=params.get('callback'),
2798                                        _return_http_data_only=params.get('_return_http_data_only'),
2799                                        _preload_content=params.get('_preload_content', True),
2800                                        _request_timeout=params.get('_request_timeout'),
2801                                        collection_formats=collection_formats)
2802
2803    def update_settings(self, account_id, user_id, **kwargs):
2804        """
2805        Updates the user account settings for a specified user.
2806        Updates the account settings list and email notification types for the specified user.
2807        This method makes a synchronous HTTP request by default. To make an
2808        asynchronous HTTP request, please define a `callback` function
2809        to be invoked when receiving the response.
2810        >>> def callback_function(response):
2811        >>>     pprint(response)
2812        >>>
2813        >>> thread = api.update_settings(account_id, user_id, callback=callback_function)
2814
2815        :param callback function: The callback function
2816            for asynchronous request. (optional)
2817        :param str account_id: The external account number (int) or account ID Guid. (required)
2818        :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)
2819        :param str allow_all_languages:
2820        :param UserSettingsInformation user_settings_information:
2821        :return: None
2822                 If the method is called asynchronously,
2823                 returns the request thread.
2824        """
2825        kwargs['_return_http_data_only'] = True
2826        if kwargs.get('callback'):
2827            return self.update_settings_with_http_info(account_id, user_id, **kwargs)
2828        else:
2829            (data) = self.update_settings_with_http_info(account_id, user_id, **kwargs)
2830            return data
2831
2832    def update_settings_with_http_info(self, account_id, user_id, **kwargs):
2833        """
2834        Updates the user account settings for a specified user.
2835        Updates the account settings list and email notification types for the specified user.
2836        This method makes a synchronous HTTP request by default. To make an
2837        asynchronous HTTP request, please define a `callback` function
2838        to be invoked when receiving the response.
2839        >>> def callback_function(response):
2840        >>>     pprint(response)
2841        >>>
2842        >>> thread = api.update_settings_with_http_info(account_id, user_id, callback=callback_function)
2843
2844        :param callback function: The callback function
2845            for asynchronous request. (optional)
2846        :param str account_id: The external account number (int) or account ID Guid. (required)
2847        :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)
2848        :param str allow_all_languages:
2849        :param UserSettingsInformation user_settings_information:
2850        :return: None
2851                 If the method is called asynchronously,
2852                 returns the request thread.
2853        """
2854
2855        all_params = ['account_id', 'user_id', 'allow_all_languages', 'user_settings_information']
2856        all_params.append('callback')
2857        all_params.append('_return_http_data_only')
2858        all_params.append('_preload_content')
2859        all_params.append('_request_timeout')
2860
2861        params = locals()
2862        for key, val in iteritems(params['kwargs']):
2863            if key not in all_params:
2864                raise TypeError(
2865                    "Got an unexpected keyword argument '%s'"
2866                    " to method update_settings" % key
2867                )
2868            params[key] = val
2869        del params['kwargs']
2870        # verify the required parameter 'account_id' is set
2871        if ('account_id' not in params) or (params['account_id'] is None):
2872            raise ValueError("Missing the required parameter `account_id` when calling `update_settings`")
2873        # verify the required parameter 'user_id' is set
2874        if ('user_id' not in params) or (params['user_id'] is None):
2875            raise ValueError("Missing the required parameter `user_id` when calling `update_settings`")
2876
2877
2878        collection_formats = {}
2879
2880        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/settings'.replace('{format}', 'json')
2881        path_params = {}
2882        if 'account_id' in params:
2883            path_params['accountId'] = params['account_id']
2884        if 'user_id' in params:
2885            path_params['userId'] = params['user_id']
2886
2887        query_params = {}
2888        if 'allow_all_languages' in params:
2889            query_params['allow_all_languages'] = params['allow_all_languages']
2890
2891        header_params = {}
2892
2893        form_params = []
2894        local_var_files = {}
2895
2896        body_params = None
2897        if 'user_settings_information' in params:
2898            body_params = params['user_settings_information']
2899        # HTTP header `Accept`
2900        header_params['Accept'] = self.api_client.\
2901            select_header_accept(['application/json'])
2902
2903        # Authentication setting
2904        auth_settings = []
2905
2906        return self.api_client.call_api(resource_path, 'PUT',
2907                                        path_params,
2908                                        query_params,
2909                                        header_params,
2910                                        body=body_params,
2911                                        post_params=form_params,
2912                                        files=local_var_files,
2913                                        response_type=None,
2914                                        auth_settings=auth_settings,
2915                                        callback=params.get('callback'),
2916                                        _return_http_data_only=params.get('_return_http_data_only'),
2917                                        _preload_content=params.get('_preload_content', True),
2918                                        _request_timeout=params.get('_request_timeout'),
2919                                        collection_formats=collection_formats)
2920
2921    def update_signature(self, account_id, signature_id, user_id, **kwargs):
2922        """
2923        Updates the user signature for a specified user.
2924        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\".
2925        This method makes a synchronous HTTP request by default. To make an
2926        asynchronous HTTP request, please define a `callback` function
2927        to be invoked when receiving the response.
2928        >>> def callback_function(response):
2929        >>>     pprint(response)
2930        >>>
2931        >>> thread = api.update_signature(account_id, signature_id, user_id, callback=callback_function)
2932
2933        :param callback function: The callback function
2934            for asynchronous request. (optional)
2935        :param str account_id: The external account number (int) or account ID Guid. (required)
2936        :param str signature_id: The ID of the signature being accessed. (required)
2937        :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)
2938        :param str close_existing_signature: When set to **true**, closes the current signature.
2939        :param UserSignatureDefinition user_signature_definition:
2940        :return: UserSignature
2941                 If the method is called asynchronously,
2942                 returns the request thread.
2943        """
2944        kwargs['_return_http_data_only'] = True
2945        if kwargs.get('callback'):
2946            return self.update_signature_with_http_info(account_id, signature_id, user_id, **kwargs)
2947        else:
2948            (data) = self.update_signature_with_http_info(account_id, signature_id, user_id, **kwargs)
2949            return data
2950
2951    def update_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs):
2952        """
2953        Updates the user signature for a specified user.
2954        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\".
2955        This method makes a synchronous HTTP request by default. To make an
2956        asynchronous HTTP request, please define a `callback` function
2957        to be invoked when receiving the response.
2958        >>> def callback_function(response):
2959        >>>     pprint(response)
2960        >>>
2961        >>> thread = api.update_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function)
2962
2963        :param callback function: The callback function
2964            for asynchronous request. (optional)
2965        :param str account_id: The external account number (int) or account ID Guid. (required)
2966        :param str signature_id: The ID of the signature being accessed. (required)
2967        :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)
2968        :param str close_existing_signature: When set to **true**, closes the current signature.
2969        :param UserSignatureDefinition user_signature_definition:
2970        :return: UserSignature
2971                 If the method is called asynchronously,
2972                 returns the request thread.
2973        """
2974
2975        all_params = ['account_id', 'signature_id', 'user_id', 'close_existing_signature', 'user_signature_definition']
2976        all_params.append('callback')
2977        all_params.append('_return_http_data_only')
2978        all_params.append('_preload_content')
2979        all_params.append('_request_timeout')
2980
2981        params = locals()
2982        for key, val in iteritems(params['kwargs']):
2983            if key not in all_params:
2984                raise TypeError(
2985                    "Got an unexpected keyword argument '%s'"
2986                    " to method update_signature" % key
2987                )
2988            params[key] = val
2989        del params['kwargs']
2990        # verify the required parameter 'account_id' is set
2991        if ('account_id' not in params) or (params['account_id'] is None):
2992            raise ValueError("Missing the required parameter `account_id` when calling `update_signature`")
2993        # verify the required parameter 'signature_id' is set
2994        if ('signature_id' not in params) or (params['signature_id'] is None):
2995            raise ValueError("Missing the required parameter `signature_id` when calling `update_signature`")
2996        # verify the required parameter 'user_id' is set
2997        if ('user_id' not in params) or (params['user_id'] is None):
2998            raise ValueError("Missing the required parameter `user_id` when calling `update_signature`")
2999
3000
3001        collection_formats = {}
3002
3003        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json')
3004        path_params = {}
3005        if 'account_id' in params:
3006            path_params['accountId'] = params['account_id']
3007        if 'signature_id' in params:
3008            path_params['signatureId'] = params['signature_id']
3009        if 'user_id' in params:
3010            path_params['userId'] = params['user_id']
3011
3012        query_params = {}
3013        if 'close_existing_signature' in params:
3014            query_params['close_existing_signature'] = params['close_existing_signature']
3015
3016        header_params = {}
3017
3018        form_params = []
3019        local_var_files = {}
3020
3021        body_params = None
3022        if 'user_signature_definition' in params:
3023            body_params = params['user_signature_definition']
3024        # HTTP header `Accept`
3025        header_params['Accept'] = self.api_client.\
3026            select_header_accept(['application/json'])
3027
3028        # Authentication setting
3029        auth_settings = []
3030
3031        return self.api_client.call_api(resource_path, 'PUT',
3032                                        path_params,
3033                                        query_params,
3034                                        header_params,
3035                                        body=body_params,
3036                                        post_params=form_params,
3037                                        files=local_var_files,
3038                                        response_type='UserSignature',
3039                                        auth_settings=auth_settings,
3040                                        callback=params.get('callback'),
3041                                        _return_http_data_only=params.get('_return_http_data_only'),
3042                                        _preload_content=params.get('_preload_content', True),
3043                                        _request_timeout=params.get('_request_timeout'),
3044                                        collection_formats=collection_formats)
3045
3046    def update_signature_image(self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs):
3047        """
3048        Updates the user signature image or user initials image for the specified user.
3049        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\". 
3050        This method makes a synchronous HTTP request by default. To make an
3051        asynchronous HTTP request, please define a `callback` function
3052        to be invoked when receiving the response.
3053        >>> def callback_function(response):
3054        >>>     pprint(response)
3055        >>>
3056        >>> thread = api.update_signature_image(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function)
3057
3058        :param callback function: The callback function
3059            for asynchronous request. (optional)
3060        :param str account_id: The external account number (int) or account ID Guid. (required)
3061        :param str image_type: One of **signature_image** or **initials_image**. (required)
3062        :param str signature_id: The ID of the signature being accessed. (required)
3063        :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)
3064        :param str transparent_png:
3065        :param str image_bytes: Updated image content. (required)
3066        :return: UserSignature
3067                 If the method is called asynchronously,
3068                 returns the request thread.
3069        """
3070        kwargs['_return_http_data_only'] = True
3071        if kwargs.get('callback'):
3072            return self.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, **kwargs)
3073        else:
3074            (data) = self.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, **kwargs)
3075            return data
3076
3077    def update_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs):
3078        """
3079        Updates the user signature image or user initials image for the specified user.
3080        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\". 
3081        This method makes a synchronous HTTP request by default. To make an
3082        asynchronous HTTP request, please define a `callback` function
3083        to be invoked when receiving the response.
3084        >>> def callback_function(response):
3085        >>>     pprint(response)
3086        >>>
3087        >>> thread = api.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function)
3088
3089        :param callback function: The callback function
3090            for asynchronous request. (optional)
3091        :param str account_id: The external account number (int) or account ID Guid. (required)
3092        :param str image_type: One of **signature_image** or **initials_image**. (required)
3093        :param str signature_id: The ID of the signature being accessed. (required)
3094        :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)
3095        :param str transparent_png:
3096        :param str image_bytes: Updated image content. (required)
3097        :return: UserSignature
3098                 If the method is called asynchronously,
3099                 returns the request thread.
3100        """
3101
3102        all_params = ['account_id', 'image_type', 'signature_id', 'user_id', 'transparent_png', 'image_bytes']
3103        all_params.append('callback')
3104        all_params.append('_return_http_data_only')
3105        all_params.append('_preload_content')
3106        all_params.append('_request_timeout')
3107
3108        params = locals()
3109        for key, val in iteritems(params['kwargs']):
3110            if key not in all_params:
3111                raise TypeError(
3112                    "Got an unexpected keyword argument '%s'"
3113                    " to method update_signature_image" % key
3114                )
3115            params[key] = val
3116        del params['kwargs']
3117        # verify the required parameter 'account_id' is set
3118        if ('account_id' not in params) or (params['account_id'] is None):
3119            raise ValueError("Missing the required parameter `account_id` when calling `update_signature_image`")
3120        # verify the required parameter 'image_type' is set
3121        if ('image_type' not in params) or (params['image_type'] is None):
3122            raise ValueError("Missing the required parameter `image_type` when calling `update_signature_image`")
3123        # verify the required parameter 'signature_id' is set
3124        if ('signature_id' not in params) or (params['signature_id'] is None):
3125            raise ValueError("Missing the required parameter `signature_id` when calling `update_signature_image`")
3126        # verify the required parameter 'user_id' is set
3127        if ('user_id' not in params) or (params['user_id'] is None):
3128            raise ValueError("Missing the required parameter `user_id` when calling `update_signature_image`")
3129        # verify the required parameter 'image_bytes' is set
3130        if ('image_bytes' not in params) or (params['image_bytes'] is None):
3131            raise ValueError("Missing the required parameter `image_bytes` when calling `update_signature_image`")
3132
3133
3134        collection_formats = {}
3135
3136        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json')
3137        path_params = {}
3138        if 'account_id' in params:
3139            path_params['accountId'] = params['account_id']
3140        if 'image_type' in params:
3141            path_params['imageType'] = params['image_type']
3142        if 'signature_id' in params:
3143            path_params['signatureId'] = params['signature_id']
3144        if 'user_id' in params:
3145            path_params['userId'] = params['user_id']
3146
3147        query_params = {}
3148        if 'transparent_png' in params:
3149            query_params['transparent_png'] = params['transparent_png']
3150
3151        header_params = {}
3152
3153        form_params = []
3154        local_var_files = {}
3155
3156        body_params = None
3157        if 'image_bytes' in params:
3158            body_params = params['image_bytes']
3159        # HTTP header `Accept`
3160        header_params['Accept'] = self.api_client.\
3161            select_header_accept(['application/json'])
3162
3163        # HTTP header `Content-Type`
3164        header_params['Content-Type'] = self.api_client.\
3165            select_header_content_type(['image/gif'])
3166
3167        # Authentication setting
3168        auth_settings = []
3169
3170        return self.api_client.call_api(resource_path, 'PUT',
3171                                        path_params,
3172                                        query_params,
3173                                        header_params,
3174                                        body=body_params,
3175                                        post_params=form_params,
3176                                        files=local_var_files,
3177                                        response_type='UserSignature',
3178                                        auth_settings=auth_settings,
3179                                        callback=params.get('callback'),
3180                                        _return_http_data_only=params.get('_return_http_data_only'),
3181                                        _preload_content=params.get('_preload_content', True),
3182                                        _request_timeout=params.get('_request_timeout'),
3183                                        collection_formats=collection_formats)
3184
3185    def update_signatures(self, account_id, user_id, **kwargs):
3186        """
3187        Adds/updates a user signature.
3188        
3189        This method makes a synchronous HTTP request by default. To make an
3190        asynchronous HTTP request, please define a `callback` function
3191        to be invoked when receiving the response.
3192        >>> def callback_function(response):
3193        >>>     pprint(response)
3194        >>>
3195        >>> thread = api.update_signatures(account_id, user_id, callback=callback_function)
3196
3197        :param callback function: The callback function
3198            for asynchronous request. (optional)
3199        :param str account_id: The external account number (int) or account ID Guid. (required)
3200        :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)
3201        :param UserSignaturesInformation user_signatures_information:
3202        :return: UserSignaturesInformation
3203                 If the method is called asynchronously,
3204                 returns the request thread.
3205        """
3206        kwargs['_return_http_data_only'] = True
3207        if kwargs.get('callback'):
3208            return self.update_signatures_with_http_info(account_id, user_id, **kwargs)
3209        else:
3210            (data) = self.update_signatures_with_http_info(account_id, user_id, **kwargs)
3211            return data
3212
3213    def update_signatures_with_http_info(self, account_id, user_id, **kwargs):
3214        """
3215        Adds/updates a user signature.
3216        
3217        This method makes a synchronous HTTP request by default. To make an
3218        asynchronous HTTP request, please define a `callback` function
3219        to be invoked when receiving the response.
3220        >>> def callback_function(response):
3221        >>>     pprint(response)
3222        >>>
3223        >>> thread = api.update_signatures_with_http_info(account_id, user_id, callback=callback_function)
3224
3225        :param callback function: The callback function
3226            for asynchronous request. (optional)
3227        :param str account_id: The external account number (int) or account ID Guid. (required)
3228        :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)
3229        :param UserSignaturesInformation user_signatures_information:
3230        :return: UserSignaturesInformation
3231                 If the method is called asynchronously,
3232                 returns the request thread.
3233        """
3234
3235        all_params = ['account_id', 'user_id', 'user_signatures_information']
3236        all_params.append('callback')
3237        all_params.append('_return_http_data_only')
3238        all_params.append('_preload_content')
3239        all_params.append('_request_timeout')
3240
3241        params = locals()
3242        for key, val in iteritems(params['kwargs']):
3243            if key not in all_params:
3244                raise TypeError(
3245                    "Got an unexpected keyword argument '%s'"
3246                    " to method update_signatures" % key
3247                )
3248            params[key] = val
3249        del params['kwargs']
3250        # verify the required parameter 'account_id' is set
3251        if ('account_id' not in params) or (params['account_id'] is None):
3252            raise ValueError("Missing the required parameter `account_id` when calling `update_signatures`")
3253        # verify the required parameter 'user_id' is set
3254        if ('user_id' not in params) or (params['user_id'] is None):
3255            raise ValueError("Missing the required parameter `user_id` when calling `update_signatures`")
3256
3257
3258        collection_formats = {}
3259
3260        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json')
3261        path_params = {}
3262        if 'account_id' in params:
3263            path_params['accountId'] = params['account_id']
3264        if 'user_id' in params:
3265            path_params['userId'] = params['user_id']
3266
3267        query_params = {}
3268
3269        header_params = {}
3270
3271        form_params = []
3272        local_var_files = {}
3273
3274        body_params = None
3275        if 'user_signatures_information' in params:
3276            body_params = params['user_signatures_information']
3277        # HTTP header `Accept`
3278        header_params['Accept'] = self.api_client.\
3279            select_header_accept(['application/json'])
3280
3281        # Authentication setting
3282        auth_settings = []
3283
3284        return self.api_client.call_api(resource_path, 'PUT',
3285                                        path_params,
3286                                        query_params,
3287                                        header_params,
3288                                        body=body_params,
3289                                        post_params=form_params,
3290                                        files=local_var_files,
3291                                        response_type='UserSignaturesInformation',
3292                                        auth_settings=auth_settings,
3293                                        callback=params.get('callback'),
3294                                        _return_http_data_only=params.get('_return_http_data_only'),
3295                                        _preload_content=params.get('_preload_content', True),
3296                                        _request_timeout=params.get('_request_timeout'),
3297                                        collection_formats=collection_formats)
3298
3299    def update_user(self, account_id, user_id, **kwargs):
3300        """
3301        Updates the specified user information.
3302        To update user information for a specific user, submit a [Users](#Users) object with updated field values in the request body of this operation.
3303        This method makes a synchronous HTTP request by default. To make an
3304        asynchronous HTTP request, please define a `callback` function
3305        to be invoked when receiving the response.
3306        >>> def callback_function(response):
3307        >>>     pprint(response)
3308        >>>
3309        >>> thread = api.update_user(account_id, user_id, callback=callback_function)
3310
3311        :param callback function: The callback function
3312            for asynchronous request. (optional)
3313        :param str account_id: The external account number (int) or account ID Guid. (required)
3314        :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)
3315        :param str allow_all_languages:
3316        :param UserInformation user_information:
3317        :return: UserInformation
3318                 If the method is called asynchronously,
3319                 returns the request thread.
3320        """
3321        kwargs['_return_http_data_only'] = True
3322        if kwargs.get('callback'):
3323            return self.update_user_with_http_info(account_id, user_id, **kwargs)
3324        else:
3325            (data) = self.update_user_with_http_info(account_id, user_id, **kwargs)
3326            return data
3327
3328    def update_user_with_http_info(self, account_id, user_id, **kwargs):
3329        """
3330        Updates the specified user information.
3331        To update user information for a specific user, submit a [Users](#Users) object with updated field values in the request body of this operation.
3332        This method makes a synchronous HTTP request by default. To make an
3333        asynchronous HTTP request, please define a `callback` function
3334        to be invoked when receiving the response.
3335        >>> def callback_function(response):
3336        >>>     pprint(response)
3337        >>>
3338        >>> thread = api.update_user_with_http_info(account_id, user_id, callback=callback_function)
3339
3340        :param callback function: The callback function
3341            for asynchronous request. (optional)
3342        :param str account_id: The external account number (int) or account ID Guid. (required)
3343        :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)
3344        :param str allow_all_languages:
3345        :param UserInformation user_information:
3346        :return: UserInformation
3347                 If the method is called asynchronously,
3348                 returns the request thread.
3349        """
3350
3351        all_params = ['account_id', 'user_id', 'allow_all_languages', 'user_information']
3352        all_params.append('callback')
3353        all_params.append('_return_http_data_only')
3354        all_params.append('_preload_content')
3355        all_params.append('_request_timeout')
3356
3357        params = locals()
3358        for key, val in iteritems(params['kwargs']):
3359            if key not in all_params:
3360                raise TypeError(
3361                    "Got an unexpected keyword argument '%s'"
3362                    " to method update_user" % key
3363                )
3364            params[key] = val
3365        del params['kwargs']
3366        # verify the required parameter 'account_id' is set
3367        if ('account_id' not in params) or (params['account_id'] is None):
3368            raise ValueError("Missing the required parameter `account_id` when calling `update_user`")
3369        # verify the required parameter 'user_id' is set
3370        if ('user_id' not in params) or (params['user_id'] is None):
3371            raise ValueError("Missing the required parameter `user_id` when calling `update_user`")
3372
3373
3374        collection_formats = {}
3375
3376        resource_path = '/v2.1/accounts/{accountId}/users/{userId}'.replace('{format}', 'json')
3377        path_params = {}
3378        if 'account_id' in params:
3379            path_params['accountId'] = params['account_id']
3380        if 'user_id' in params:
3381            path_params['userId'] = params['user_id']
3382
3383        query_params = {}
3384        if 'allow_all_languages' in params:
3385            query_params['allow_all_languages'] = params['allow_all_languages']
3386
3387        header_params = {}
3388
3389        form_params = []
3390        local_var_files = {}
3391
3392        body_params = None
3393        if 'user_information' in params:
3394            body_params = params['user_information']
3395        # HTTP header `Accept`
3396        header_params['Accept'] = self.api_client.\
3397            select_header_accept(['application/json'])
3398
3399        # Authentication setting
3400        auth_settings = []
3401
3402        return self.api_client.call_api(resource_path, 'PUT',
3403                                        path_params,
3404                                        query_params,
3405                                        header_params,
3406                                        body=body_params,
3407                                        post_params=form_params,
3408                                        files=local_var_files,
3409                                        response_type='UserInformation',
3410                                        auth_settings=auth_settings,
3411                                        callback=params.get('callback'),
3412                                        _return_http_data_only=params.get('_return_http_data_only'),
3413                                        _preload_content=params.get('_preload_content', True),
3414                                        _request_timeout=params.get('_request_timeout'),
3415                                        collection_formats=collection_formats)
3416
3417    def update_users(self, account_id, **kwargs):
3418        """
3419        Change one or more user in the specified account.
3420        This method updates the information about one or more account users.
3421        This method makes a synchronous HTTP request by default. To make an
3422        asynchronous HTTP request, please define a `callback` function
3423        to be invoked when receiving the response.
3424        >>> def callback_function(response):
3425        >>>     pprint(response)
3426        >>>
3427        >>> thread = api.update_users(account_id, callback=callback_function)
3428
3429        :param callback function: The callback function
3430            for asynchronous request. (optional)
3431        :param str account_id: The external account number (int) or account ID Guid. (required)
3432        :param str allow_all_languages:
3433        :param UserInformationList user_information_list:
3434        :return: UserInformationList
3435                 If the method is called asynchronously,
3436                 returns the request thread.
3437        """
3438        kwargs['_return_http_data_only'] = True
3439        if kwargs.get('callback'):
3440            return self.update_users_with_http_info(account_id, **kwargs)
3441        else:
3442            (data) = self.update_users_with_http_info(account_id, **kwargs)
3443            return data
3444
3445    def update_users_with_http_info(self, account_id, **kwargs):
3446        """
3447        Change one or more user in the specified account.
3448        This method updates the information about one or more account users.
3449        This method makes a synchronous HTTP request by default. To make an
3450        asynchronous HTTP request, please define a `callback` function
3451        to be invoked when receiving the response.
3452        >>> def callback_function(response):
3453        >>>     pprint(response)
3454        >>>
3455        >>> thread = api.update_users_with_http_info(account_id, callback=callback_function)
3456
3457        :param callback function: The callback function
3458            for asynchronous request. (optional)
3459        :param str account_id: The external account number (int) or account ID Guid. (required)
3460        :param str allow_all_languages:
3461        :param UserInformationList user_information_list:
3462        :return: UserInformationList
3463                 If the method is called asynchronously,
3464                 returns the request thread.
3465        """
3466
3467        all_params = ['account_id', 'allow_all_languages', 'user_information_list']
3468        all_params.append('callback')
3469        all_params.append('_return_http_data_only')
3470        all_params.append('_preload_content')
3471        all_params.append('_request_timeout')
3472
3473        params = locals()
3474        for key, val in iteritems(params['kwargs']):
3475            if key not in all_params:
3476                raise TypeError(
3477                    "Got an unexpected keyword argument '%s'"
3478                    " to method update_users" % key
3479                )
3480            params[key] = val
3481        del params['kwargs']
3482        # verify the required parameter 'account_id' is set
3483        if ('account_id' not in params) or (params['account_id'] is None):
3484            raise ValueError("Missing the required parameter `account_id` when calling `update_users`")
3485
3486
3487        collection_formats = {}
3488
3489        resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json')
3490        path_params = {}
3491        if 'account_id' in params:
3492            path_params['accountId'] = params['account_id']
3493
3494        query_params = {}
3495        if 'allow_all_languages' in params:
3496            query_params['allow_all_languages'] = params['allow_all_languages']
3497
3498        header_params = {}
3499
3500        form_params = []
3501        local_var_files = {}
3502
3503        body_params = None
3504        if 'user_information_list' in params:
3505            body_params = params['user_information_list']
3506        # HTTP header `Accept`
3507        header_params['Accept'] = self.api_client.\
3508            select_header_accept(['application/json'])
3509
3510        # Authentication setting
3511        auth_settings = []
3512
3513        return self.api_client.call_api(resource_path, 'PUT',
3514                                        path_params,
3515                                        query_params,
3516                                        header_params,
3517                                        body=body_params,
3518                                        post_params=form_params,
3519                                        files=local_var_files,
3520                                        response_type='UserInformationList',
3521                                        auth_settings=auth_settings,
3522                                        callback=params.get('callback'),
3523                                        _return_http_data_only=params.get('_return_http_data_only'),
3524                                        _preload_content=params.get('_preload_content', True),
3525                                        _request_timeout=params.get('_request_timeout'),
3526                                        collection_formats=collection_formats)
class UsersApi:
  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        :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        :return: UserInformation
1220                 If the method is called asynchronously,
1221                 returns the request thread.
1222        """
1223
1224        all_params = ['account_id', 'user_id', 'additional_info', 'email']
1225        all_params.append('callback')
1226        all_params.append('_return_http_data_only')
1227        all_params.append('_preload_content')
1228        all_params.append('_request_timeout')
1229
1230        params = locals()
1231        for key, val in iteritems(params['kwargs']):
1232            if key not in all_params:
1233                raise TypeError(
1234                    "Got an unexpected keyword argument '%s'"
1235                    " to method get_information" % key
1236                )
1237            params[key] = val
1238        del params['kwargs']
1239        # verify the required parameter 'account_id' is set
1240        if ('account_id' not in params) or (params['account_id'] is None):
1241            raise ValueError("Missing the required parameter `account_id` when calling `get_information`")
1242        # verify the required parameter 'user_id' is set
1243        if ('user_id' not in params) or (params['user_id'] is None):
1244            raise ValueError("Missing the required parameter `user_id` when calling `get_information`")
1245
1246
1247        collection_formats = {}
1248
1249        resource_path = '/v2.1/accounts/{accountId}/users/{userId}'.replace('{format}', 'json')
1250        path_params = {}
1251        if 'account_id' in params:
1252            path_params['accountId'] = params['account_id']
1253        if 'user_id' in params:
1254            path_params['userId'] = params['user_id']
1255
1256        query_params = {}
1257        if 'additional_info' in params:
1258            query_params['additional_info'] = params['additional_info']
1259        if 'email' in params:
1260            query_params['email'] = params['email']
1261
1262        header_params = {}
1263
1264        form_params = []
1265        local_var_files = {}
1266
1267        body_params = None
1268        # HTTP header `Accept`
1269        header_params['Accept'] = self.api_client.\
1270            select_header_accept(['application/json'])
1271
1272        # Authentication setting
1273        auth_settings = []
1274
1275        return self.api_client.call_api(resource_path, 'GET',
1276                                        path_params,
1277                                        query_params,
1278                                        header_params,
1279                                        body=body_params,
1280                                        post_params=form_params,
1281                                        files=local_var_files,
1282                                        response_type='UserInformation',
1283                                        auth_settings=auth_settings,
1284                                        callback=params.get('callback'),
1285                                        _return_http_data_only=params.get('_return_http_data_only'),
1286                                        _preload_content=params.get('_preload_content', True),
1287                                        _request_timeout=params.get('_request_timeout'),
1288                                        collection_formats=collection_formats)
1289
1290    def get_profile(self, account_id, user_id, **kwargs):
1291        """
1292        Retrieves the user profile for a specified user.
1293        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.
1294        This method makes a synchronous HTTP request by default. To make an
1295        asynchronous HTTP request, please define a `callback` function
1296        to be invoked when receiving the response.
1297        >>> def callback_function(response):
1298        >>>     pprint(response)
1299        >>>
1300        >>> thread = api.get_profile(account_id, user_id, callback=callback_function)
1301
1302        :param callback function: The callback function
1303            for asynchronous request. (optional)
1304        :param str account_id: The external account number (int) or account ID Guid. (required)
1305        :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)
1306        :return: UserProfile
1307                 If the method is called asynchronously,
1308                 returns the request thread.
1309        """
1310        kwargs['_return_http_data_only'] = True
1311        if kwargs.get('callback'):
1312            return self.get_profile_with_http_info(account_id, user_id, **kwargs)
1313        else:
1314            (data) = self.get_profile_with_http_info(account_id, user_id, **kwargs)
1315            return data
1316
1317    def get_profile_with_http_info(self, account_id, user_id, **kwargs):
1318        """
1319        Retrieves the user profile for a specified user.
1320        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.
1321        This method makes a synchronous HTTP request by default. To make an
1322        asynchronous HTTP request, please define a `callback` function
1323        to be invoked when receiving the response.
1324        >>> def callback_function(response):
1325        >>>     pprint(response)
1326        >>>
1327        >>> thread = api.get_profile_with_http_info(account_id, user_id, callback=callback_function)
1328
1329        :param callback function: The callback function
1330            for asynchronous request. (optional)
1331        :param str account_id: The external account number (int) or account ID Guid. (required)
1332        :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)
1333        :return: UserProfile
1334                 If the method is called asynchronously,
1335                 returns the request thread.
1336        """
1337
1338        all_params = ['account_id', 'user_id']
1339        all_params.append('callback')
1340        all_params.append('_return_http_data_only')
1341        all_params.append('_preload_content')
1342        all_params.append('_request_timeout')
1343
1344        params = locals()
1345        for key, val in iteritems(params['kwargs']):
1346            if key not in all_params:
1347                raise TypeError(
1348                    "Got an unexpected keyword argument '%s'"
1349                    " to method get_profile" % key
1350                )
1351            params[key] = val
1352        del params['kwargs']
1353        # verify the required parameter 'account_id' is set
1354        if ('account_id' not in params) or (params['account_id'] is None):
1355            raise ValueError("Missing the required parameter `account_id` when calling `get_profile`")
1356        # verify the required parameter 'user_id' is set
1357        if ('user_id' not in params) or (params['user_id'] is None):
1358            raise ValueError("Missing the required parameter `user_id` when calling `get_profile`")
1359
1360
1361        collection_formats = {}
1362
1363        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile'.replace('{format}', 'json')
1364        path_params = {}
1365        if 'account_id' in params:
1366            path_params['accountId'] = params['account_id']
1367        if 'user_id' in params:
1368            path_params['userId'] = params['user_id']
1369
1370        query_params = {}
1371
1372        header_params = {}
1373
1374        form_params = []
1375        local_var_files = {}
1376
1377        body_params = None
1378        # HTTP header `Accept`
1379        header_params['Accept'] = self.api_client.\
1380            select_header_accept(['application/json'])
1381
1382        # Authentication setting
1383        auth_settings = []
1384
1385        return self.api_client.call_api(resource_path, 'GET',
1386                                        path_params,
1387                                        query_params,
1388                                        header_params,
1389                                        body=body_params,
1390                                        post_params=form_params,
1391                                        files=local_var_files,
1392                                        response_type='UserProfile',
1393                                        auth_settings=auth_settings,
1394                                        callback=params.get('callback'),
1395                                        _return_http_data_only=params.get('_return_http_data_only'),
1396                                        _preload_content=params.get('_preload_content', True),
1397                                        _request_timeout=params.get('_request_timeout'),
1398                                        collection_formats=collection_formats)
1399
1400    def get_profile_image(self, account_id, user_id, **kwargs):
1401        """
1402        Retrieves the user profile image for the specified user.
1403        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.
1404        This method makes a synchronous HTTP request by default. To make an
1405        asynchronous HTTP request, please define a `callback` function
1406        to be invoked when receiving the response.
1407        >>> def callback_function(response):
1408        >>>     pprint(response)
1409        >>>
1410        >>> thread = api.get_profile_image(account_id, user_id, callback=callback_function)
1411
1412        :param callback function: The callback function
1413            for asynchronous request. (optional)
1414        :param str account_id: The external account number (int) or account ID Guid. (required)
1415        :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)
1416        :param str encoding:
1417        :return: file
1418                 If the method is called asynchronously,
1419                 returns the request thread.
1420        """
1421        kwargs['_return_http_data_only'] = True
1422        if kwargs.get('callback'):
1423            return self.get_profile_image_with_http_info(account_id, user_id, **kwargs)
1424        else:
1425            (data) = self.get_profile_image_with_http_info(account_id, user_id, **kwargs)
1426            return data
1427
1428    def get_profile_image_with_http_info(self, account_id, user_id, **kwargs):
1429        """
1430        Retrieves the user profile image for the specified user.
1431        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.
1432        This method makes a synchronous HTTP request by default. To make an
1433        asynchronous HTTP request, please define a `callback` function
1434        to be invoked when receiving the response.
1435        >>> def callback_function(response):
1436        >>>     pprint(response)
1437        >>>
1438        >>> thread = api.get_profile_image_with_http_info(account_id, user_id, callback=callback_function)
1439
1440        :param callback function: The callback function
1441            for asynchronous request. (optional)
1442        :param str account_id: The external account number (int) or account ID Guid. (required)
1443        :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)
1444        :param str encoding:
1445        :return: file
1446                 If the method is called asynchronously,
1447                 returns the request thread.
1448        """
1449
1450        all_params = ['account_id', 'user_id', 'encoding']
1451        all_params.append('callback')
1452        all_params.append('_return_http_data_only')
1453        all_params.append('_preload_content')
1454        all_params.append('_request_timeout')
1455
1456        params = locals()
1457        for key, val in iteritems(params['kwargs']):
1458            if key not in all_params:
1459                raise TypeError(
1460                    "Got an unexpected keyword argument '%s'"
1461                    " to method get_profile_image" % key
1462                )
1463            params[key] = val
1464        del params['kwargs']
1465        # verify the required parameter 'account_id' is set
1466        if ('account_id' not in params) or (params['account_id'] is None):
1467            raise ValueError("Missing the required parameter `account_id` when calling `get_profile_image`")
1468        # verify the required parameter 'user_id' is set
1469        if ('user_id' not in params) or (params['user_id'] is None):
1470            raise ValueError("Missing the required parameter `user_id` when calling `get_profile_image`")
1471
1472
1473        collection_formats = {}
1474
1475        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json')
1476        path_params = {}
1477        if 'account_id' in params:
1478            path_params['accountId'] = params['account_id']
1479        if 'user_id' in params:
1480            path_params['userId'] = params['user_id']
1481
1482        query_params = {}
1483        if 'encoding' in params:
1484            query_params['encoding'] = params['encoding']
1485
1486        header_params = {}
1487
1488        form_params = []
1489        local_var_files = {}
1490
1491        body_params = None
1492        # HTTP header `Accept`
1493        header_params['Accept'] = self.api_client.\
1494            select_header_accept(['image/gif'])
1495
1496        # Authentication setting
1497        auth_settings = []
1498
1499        return self.api_client.call_api(resource_path, 'GET',
1500                                        path_params,
1501                                        query_params,
1502                                        header_params,
1503                                        body=body_params,
1504                                        post_params=form_params,
1505                                        files=local_var_files,
1506                                        response_type='file',
1507                                        auth_settings=auth_settings,
1508                                        callback=params.get('callback'),
1509                                        _return_http_data_only=params.get('_return_http_data_only'),
1510                                        _preload_content=params.get('_preload_content', True),
1511                                        _request_timeout=params.get('_request_timeout'),
1512                                        collection_formats=collection_formats)
1513
1514    def get_settings(self, account_id, user_id, **kwargs):
1515        """
1516        Gets the user account settings for a specified user.
1517        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].
1518        This method makes a synchronous HTTP request by default. To make an
1519        asynchronous HTTP request, please define a `callback` function
1520        to be invoked when receiving the response.
1521        >>> def callback_function(response):
1522        >>>     pprint(response)
1523        >>>
1524        >>> thread = api.get_settings(account_id, user_id, callback=callback_function)
1525
1526        :param callback function: The callback function
1527            for asynchronous request. (optional)
1528        :param str account_id: The external account number (int) or account ID Guid. (required)
1529        :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)
1530        :return: UserSettingsInformation
1531                 If the method is called asynchronously,
1532                 returns the request thread.
1533        """
1534        kwargs['_return_http_data_only'] = True
1535        if kwargs.get('callback'):
1536            return self.get_settings_with_http_info(account_id, user_id, **kwargs)
1537        else:
1538            (data) = self.get_settings_with_http_info(account_id, user_id, **kwargs)
1539            return data
1540
1541    def get_settings_with_http_info(self, account_id, user_id, **kwargs):
1542        """
1543        Gets the user account settings for a specified user.
1544        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].
1545        This method makes a synchronous HTTP request by default. To make an
1546        asynchronous HTTP request, please define a `callback` function
1547        to be invoked when receiving the response.
1548        >>> def callback_function(response):
1549        >>>     pprint(response)
1550        >>>
1551        >>> thread = api.get_settings_with_http_info(account_id, user_id, callback=callback_function)
1552
1553        :param callback function: The callback function
1554            for asynchronous request. (optional)
1555        :param str account_id: The external account number (int) or account ID Guid. (required)
1556        :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)
1557        :return: UserSettingsInformation
1558                 If the method is called asynchronously,
1559                 returns the request thread.
1560        """
1561
1562        all_params = ['account_id', 'user_id']
1563        all_params.append('callback')
1564        all_params.append('_return_http_data_only')
1565        all_params.append('_preload_content')
1566        all_params.append('_request_timeout')
1567
1568        params = locals()
1569        for key, val in iteritems(params['kwargs']):
1570            if key not in all_params:
1571                raise TypeError(
1572                    "Got an unexpected keyword argument '%s'"
1573                    " to method get_settings" % key
1574                )
1575            params[key] = val
1576        del params['kwargs']
1577        # verify the required parameter 'account_id' is set
1578        if ('account_id' not in params) or (params['account_id'] is None):
1579            raise ValueError("Missing the required parameter `account_id` when calling `get_settings`")
1580        # verify the required parameter 'user_id' is set
1581        if ('user_id' not in params) or (params['user_id'] is None):
1582            raise ValueError("Missing the required parameter `user_id` when calling `get_settings`")
1583
1584
1585        collection_formats = {}
1586
1587        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/settings'.replace('{format}', 'json')
1588        path_params = {}
1589        if 'account_id' in params:
1590            path_params['accountId'] = params['account_id']
1591        if 'user_id' in params:
1592            path_params['userId'] = params['user_id']
1593
1594        query_params = {}
1595
1596        header_params = {}
1597
1598        form_params = []
1599        local_var_files = {}
1600
1601        body_params = None
1602        # HTTP header `Accept`
1603        header_params['Accept'] = self.api_client.\
1604            select_header_accept(['application/json'])
1605
1606        # Authentication setting
1607        auth_settings = []
1608
1609        return self.api_client.call_api(resource_path, 'GET',
1610                                        path_params,
1611                                        query_params,
1612                                        header_params,
1613                                        body=body_params,
1614                                        post_params=form_params,
1615                                        files=local_var_files,
1616                                        response_type='UserSettingsInformation',
1617                                        auth_settings=auth_settings,
1618                                        callback=params.get('callback'),
1619                                        _return_http_data_only=params.get('_return_http_data_only'),
1620                                        _preload_content=params.get('_preload_content', True),
1621                                        _request_timeout=params.get('_request_timeout'),
1622                                        collection_formats=collection_formats)
1623
1624    def get_signature(self, account_id, signature_id, user_id, **kwargs):
1625        """
1626        Gets the user signature information for the specified user.
1627        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\".
1628        This method makes a synchronous HTTP request by default. To make an
1629        asynchronous HTTP request, please define a `callback` function
1630        to be invoked when receiving the response.
1631        >>> def callback_function(response):
1632        >>>     pprint(response)
1633        >>>
1634        >>> thread = api.get_signature(account_id, signature_id, user_id, callback=callback_function)
1635
1636        :param callback function: The callback function
1637            for asynchronous request. (optional)
1638        :param str account_id: The external account number (int) or account ID Guid. (required)
1639        :param str signature_id: The ID of the signature being accessed. (required)
1640        :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)
1641        :return: UserSignature
1642                 If the method is called asynchronously,
1643                 returns the request thread.
1644        """
1645        kwargs['_return_http_data_only'] = True
1646        if kwargs.get('callback'):
1647            return self.get_signature_with_http_info(account_id, signature_id, user_id, **kwargs)
1648        else:
1649            (data) = self.get_signature_with_http_info(account_id, signature_id, user_id, **kwargs)
1650            return data
1651
1652    def get_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs):
1653        """
1654        Gets the user signature information for the specified user.
1655        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\".
1656        This method makes a synchronous HTTP request by default. To make an
1657        asynchronous HTTP request, please define a `callback` function
1658        to be invoked when receiving the response.
1659        >>> def callback_function(response):
1660        >>>     pprint(response)
1661        >>>
1662        >>> thread = api.get_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function)
1663
1664        :param callback function: The callback function
1665            for asynchronous request. (optional)
1666        :param str account_id: The external account number (int) or account ID Guid. (required)
1667        :param str signature_id: The ID of the signature being accessed. (required)
1668        :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)
1669        :return: UserSignature
1670                 If the method is called asynchronously,
1671                 returns the request thread.
1672        """
1673
1674        all_params = ['account_id', 'signature_id', 'user_id']
1675        all_params.append('callback')
1676        all_params.append('_return_http_data_only')
1677        all_params.append('_preload_content')
1678        all_params.append('_request_timeout')
1679
1680        params = locals()
1681        for key, val in iteritems(params['kwargs']):
1682            if key not in all_params:
1683                raise TypeError(
1684                    "Got an unexpected keyword argument '%s'"
1685                    " to method get_signature" % key
1686                )
1687            params[key] = val
1688        del params['kwargs']
1689        # verify the required parameter 'account_id' is set
1690        if ('account_id' not in params) or (params['account_id'] is None):
1691            raise ValueError("Missing the required parameter `account_id` when calling `get_signature`")
1692        # verify the required parameter 'signature_id' is set
1693        if ('signature_id' not in params) or (params['signature_id'] is None):
1694            raise ValueError("Missing the required parameter `signature_id` when calling `get_signature`")
1695        # verify the required parameter 'user_id' is set
1696        if ('user_id' not in params) or (params['user_id'] is None):
1697            raise ValueError("Missing the required parameter `user_id` when calling `get_signature`")
1698
1699
1700        collection_formats = {}
1701
1702        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json')
1703        path_params = {}
1704        if 'account_id' in params:
1705            path_params['accountId'] = params['account_id']
1706        if 'signature_id' in params:
1707            path_params['signatureId'] = params['signature_id']
1708        if 'user_id' in params:
1709            path_params['userId'] = params['user_id']
1710
1711        query_params = {}
1712
1713        header_params = {}
1714
1715        form_params = []
1716        local_var_files = {}
1717
1718        body_params = None
1719        # HTTP header `Accept`
1720        header_params['Accept'] = self.api_client.\
1721            select_header_accept(['application/json'])
1722
1723        # Authentication setting
1724        auth_settings = []
1725
1726        return self.api_client.call_api(resource_path, 'GET',
1727                                        path_params,
1728                                        query_params,
1729                                        header_params,
1730                                        body=body_params,
1731                                        post_params=form_params,
1732                                        files=local_var_files,
1733                                        response_type='UserSignature',
1734                                        auth_settings=auth_settings,
1735                                        callback=params.get('callback'),
1736                                        _return_http_data_only=params.get('_return_http_data_only'),
1737                                        _preload_content=params.get('_preload_content', True),
1738                                        _request_timeout=params.get('_request_timeout'),
1739                                        collection_formats=collection_formats)
1740
1741    def get_signature_image(self, account_id, image_type, signature_id, user_id, **kwargs):
1742        """
1743        Retrieves the user initials image or the  user signature image for the specified user.
1744        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.
1745        This method makes a synchronous HTTP request by default. To make an
1746        asynchronous HTTP request, please define a `callback` function
1747        to be invoked when receiving the response.
1748        >>> def callback_function(response):
1749        >>>     pprint(response)
1750        >>>
1751        >>> thread = api.get_signature_image(account_id, image_type, signature_id, user_id, callback=callback_function)
1752
1753        :param callback function: The callback function
1754            for asynchronous request. (optional)
1755        :param str account_id: The external account number (int) or account ID Guid. (required)
1756        :param str image_type: One of **signature_image** or **initials_image**. (required)
1757        :param str signature_id: The ID of the signature being accessed. (required)
1758        :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)
1759        :param str include_chrome:
1760        :return: file
1761                 If the method is called asynchronously,
1762                 returns the request thread.
1763        """
1764        kwargs['_return_http_data_only'] = True
1765        if kwargs.get('callback'):
1766            return self.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs)
1767        else:
1768            (data) = self.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs)
1769            return data
1770
1771    def get_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, **kwargs):
1772        """
1773        Retrieves the user initials image or the  user signature image for the specified user.
1774        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.
1775        This method makes a synchronous HTTP request by default. To make an
1776        asynchronous HTTP request, please define a `callback` function
1777        to be invoked when receiving the response.
1778        >>> def callback_function(response):
1779        >>>     pprint(response)
1780        >>>
1781        >>> thread = api.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, callback=callback_function)
1782
1783        :param callback function: The callback function
1784            for asynchronous request. (optional)
1785        :param str account_id: The external account number (int) or account ID Guid. (required)
1786        :param str image_type: One of **signature_image** or **initials_image**. (required)
1787        :param str signature_id: The ID of the signature being accessed. (required)
1788        :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)
1789        :param str include_chrome:
1790        :return: file
1791                 If the method is called asynchronously,
1792                 returns the request thread.
1793        """
1794
1795        all_params = ['account_id', 'image_type', 'signature_id', 'user_id', 'include_chrome']
1796        all_params.append('callback')
1797        all_params.append('_return_http_data_only')
1798        all_params.append('_preload_content')
1799        all_params.append('_request_timeout')
1800
1801        params = locals()
1802        for key, val in iteritems(params['kwargs']):
1803            if key not in all_params:
1804                raise TypeError(
1805                    "Got an unexpected keyword argument '%s'"
1806                    " to method get_signature_image" % key
1807                )
1808            params[key] = val
1809        del params['kwargs']
1810        # verify the required parameter 'account_id' is set
1811        if ('account_id' not in params) or (params['account_id'] is None):
1812            raise ValueError("Missing the required parameter `account_id` when calling `get_signature_image`")
1813        # verify the required parameter 'image_type' is set
1814        if ('image_type' not in params) or (params['image_type'] is None):
1815            raise ValueError("Missing the required parameter `image_type` when calling `get_signature_image`")
1816        # verify the required parameter 'signature_id' is set
1817        if ('signature_id' not in params) or (params['signature_id'] is None):
1818            raise ValueError("Missing the required parameter `signature_id` when calling `get_signature_image`")
1819        # verify the required parameter 'user_id' is set
1820        if ('user_id' not in params) or (params['user_id'] is None):
1821            raise ValueError("Missing the required parameter `user_id` when calling `get_signature_image`")
1822
1823
1824        collection_formats = {}
1825
1826        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json')
1827        path_params = {}
1828        if 'account_id' in params:
1829            path_params['accountId'] = params['account_id']
1830        if 'image_type' in params:
1831            path_params['imageType'] = params['image_type']
1832        if 'signature_id' in params:
1833            path_params['signatureId'] = params['signature_id']
1834        if 'user_id' in params:
1835            path_params['userId'] = params['user_id']
1836
1837        query_params = {}
1838        if 'include_chrome' in params:
1839            query_params['include_chrome'] = params['include_chrome']
1840
1841        header_params = {}
1842
1843        form_params = []
1844        local_var_files = {}
1845
1846        body_params = None
1847        # HTTP header `Accept`
1848        header_params['Accept'] = self.api_client.\
1849            select_header_accept(['image/gif'])
1850
1851        # Authentication setting
1852        auth_settings = []
1853
1854        return self.api_client.call_api(resource_path, 'GET',
1855                                        path_params,
1856                                        query_params,
1857                                        header_params,
1858                                        body=body_params,
1859                                        post_params=form_params,
1860                                        files=local_var_files,
1861                                        response_type='file',
1862                                        auth_settings=auth_settings,
1863                                        callback=params.get('callback'),
1864                                        _return_http_data_only=params.get('_return_http_data_only'),
1865                                        _preload_content=params.get('_preload_content', True),
1866                                        _request_timeout=params.get('_request_timeout'),
1867                                        collection_formats=collection_formats)
1868
1869    def list(self, account_id, **kwargs):
1870        """
1871        Retrieves the list of users for the specified account.
1872        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
1873        This method makes a synchronous HTTP request by default. To make an
1874        asynchronous HTTP request, please define a `callback` function
1875        to be invoked when receiving the response.
1876        >>> def callback_function(response):
1877        >>>     pprint(response)
1878        >>>
1879        >>> thread = api.list(account_id, callback=callback_function)
1880
1881        :param callback function: The callback function
1882            for asynchronous request. (optional)
1883        :param str account_id: The external account number (int) or account ID Guid. (required)
1884        :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account.
1885        :param str alternate_admins_only:
1886        :param str count: Number of records to return. The number must be greater than 0 and less than or equal to 100. 
1887        :param str domain_users_only:
1888        :param str email:
1889        :param str email_substring: Filters the returned user records by the email address or a sub-string of email address.
1890        :param str group_id: Filters user records returned by one or more group Id's.
1891        :param str include_usersettings_for_csv:
1892        :param str login_status:
1893        :param str not_group_id:
1894        :param str start_position: Starting value for the list. 
1895        :param str status:
1896        :param str user_name_substring: Filters the user records returned by the user name or a sub-string of user name.
1897        :return: UserInformationList
1898                 If the method is called asynchronously,
1899                 returns the request thread.
1900        """
1901        kwargs['_return_http_data_only'] = True
1902        if kwargs.get('callback'):
1903            return self.list_with_http_info(account_id, **kwargs)
1904        else:
1905            (data) = self.list_with_http_info(account_id, **kwargs)
1906            return data
1907
1908    def list_with_http_info(self, account_id, **kwargs):
1909        """
1910        Retrieves the list of users for the specified account.
1911        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
1912        This method makes a synchronous HTTP request by default. To make an
1913        asynchronous HTTP request, please define a `callback` function
1914        to be invoked when receiving the response.
1915        >>> def callback_function(response):
1916        >>>     pprint(response)
1917        >>>
1918        >>> thread = api.list_with_http_info(account_id, callback=callback_function)
1919
1920        :param callback function: The callback function
1921            for asynchronous request. (optional)
1922        :param str account_id: The external account number (int) or account ID Guid. (required)
1923        :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account.
1924        :param str alternate_admins_only:
1925        :param str count: Number of records to return. The number must be greater than 0 and less than or equal to 100. 
1926        :param str domain_users_only:
1927        :param str email:
1928        :param str email_substring: Filters the returned user records by the email address or a sub-string of email address.
1929        :param str group_id: Filters user records returned by one or more group Id's.
1930        :param str include_usersettings_for_csv:
1931        :param str login_status:
1932        :param str not_group_id:
1933        :param str start_position: Starting value for the list. 
1934        :param str status:
1935        :param str user_name_substring: Filters the user records returned by the user name or a sub-string of user name.
1936        :return: UserInformationList
1937                 If the method is called asynchronously,
1938                 returns the request thread.
1939        """
1940
1941        all_params = ['account_id', 'additional_info', 'alternate_admins_only', 'count', 'domain_users_only', 'email', 'email_substring', 'group_id', 'include_usersettings_for_csv', 'login_status', 'not_group_id', 'start_position', 'status', 'user_name_substring']
1942        all_params.append('callback')
1943        all_params.append('_return_http_data_only')
1944        all_params.append('_preload_content')
1945        all_params.append('_request_timeout')
1946
1947        params = locals()
1948        for key, val in iteritems(params['kwargs']):
1949            if key not in all_params:
1950                raise TypeError(
1951                    "Got an unexpected keyword argument '%s'"
1952                    " to method list" % key
1953                )
1954            params[key] = val
1955        del params['kwargs']
1956        # verify the required parameter 'account_id' is set
1957        if ('account_id' not in params) or (params['account_id'] is None):
1958            raise ValueError("Missing the required parameter `account_id` when calling `list`")
1959
1960
1961        collection_formats = {}
1962
1963        resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json')
1964        path_params = {}
1965        if 'account_id' in params:
1966            path_params['accountId'] = params['account_id']
1967
1968        query_params = {}
1969        if 'additional_info' in params:
1970            query_params['additional_info'] = params['additional_info']
1971        if 'alternate_admins_only' in params:
1972            query_params['alternate_admins_only'] = params['alternate_admins_only']
1973        if 'count' in params:
1974            query_params['count'] = params['count']
1975        if 'domain_users_only' in params:
1976            query_params['domain_users_only'] = params['domain_users_only']
1977        if 'email' in params:
1978            query_params['email'] = params['email']
1979        if 'email_substring' in params:
1980            query_params['email_substring'] = params['email_substring']
1981        if 'group_id' in params:
1982            query_params['group_id'] = params['group_id']
1983        if 'include_usersettings_for_csv' in params:
1984            query_params['include_usersettings_for_csv'] = params['include_usersettings_for_csv']
1985        if 'login_status' in params:
1986            query_params['login_status'] = params['login_status']
1987        if 'not_group_id' in params:
1988            query_params['not_group_id'] = params['not_group_id']
1989        if 'start_position' in params:
1990            query_params['start_position'] = params['start_position']
1991        if 'status' in params:
1992            query_params['status'] = params['status']
1993        if 'user_name_substring' in params:
1994            query_params['user_name_substring'] = params['user_name_substring']
1995
1996        header_params = {}
1997
1998        form_params = []
1999        local_var_files = {}
2000
2001        body_params = None
2002        # HTTP header `Accept`
2003        header_params['Accept'] = self.api_client.\
2004            select_header_accept(['application/json'])
2005
2006        # Authentication setting
2007        auth_settings = []
2008
2009        return self.api_client.call_api(resource_path, 'GET',
2010                                        path_params,
2011                                        query_params,
2012                                        header_params,
2013                                        body=body_params,
2014                                        post_params=form_params,
2015                                        files=local_var_files,
2016                                        response_type='UserInformationList',
2017                                        auth_settings=auth_settings,
2018                                        callback=params.get('callback'),
2019                                        _return_http_data_only=params.get('_return_http_data_only'),
2020                                        _preload_content=params.get('_preload_content', True),
2021                                        _request_timeout=params.get('_request_timeout'),
2022                                        collection_formats=collection_formats)
2023
2024    def list_custom_settings(self, account_id, user_id, **kwargs):
2025        """
2026        Retrieves the custom user settings for a specified user.
2027        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.
2028        This method makes a synchronous HTTP request by default. To make an
2029        asynchronous HTTP request, please define a `callback` function
2030        to be invoked when receiving the response.
2031        >>> def callback_function(response):
2032        >>>     pprint(response)
2033        >>>
2034        >>> thread = api.list_custom_settings(account_id, user_id, callback=callback_function)
2035
2036        :param callback function: The callback function
2037            for asynchronous request. (optional)
2038        :param str account_id: The external account number (int) or account ID Guid. (required)
2039        :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)
2040        :return: CustomSettingsInformation
2041                 If the method is called asynchronously,
2042                 returns the request thread.
2043        """
2044        kwargs['_return_http_data_only'] = True
2045        if kwargs.get('callback'):
2046            return self.list_custom_settings_with_http_info(account_id, user_id, **kwargs)
2047        else:
2048            (data) = self.list_custom_settings_with_http_info(account_id, user_id, **kwargs)
2049            return data
2050
2051    def list_custom_settings_with_http_info(self, account_id, user_id, **kwargs):
2052        """
2053        Retrieves the custom user settings for a specified user.
2054        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.
2055        This method makes a synchronous HTTP request by default. To make an
2056        asynchronous HTTP request, please define a `callback` function
2057        to be invoked when receiving the response.
2058        >>> def callback_function(response):
2059        >>>     pprint(response)
2060        >>>
2061        >>> thread = api.list_custom_settings_with_http_info(account_id, user_id, callback=callback_function)
2062
2063        :param callback function: The callback function
2064            for asynchronous request. (optional)
2065        :param str account_id: The external account number (int) or account ID Guid. (required)
2066        :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)
2067        :return: CustomSettingsInformation
2068                 If the method is called asynchronously,
2069                 returns the request thread.
2070        """
2071
2072        all_params = ['account_id', 'user_id']
2073        all_params.append('callback')
2074        all_params.append('_return_http_data_only')
2075        all_params.append('_preload_content')
2076        all_params.append('_request_timeout')
2077
2078        params = locals()
2079        for key, val in iteritems(params['kwargs']):
2080            if key not in all_params:
2081                raise TypeError(
2082                    "Got an unexpected keyword argument '%s'"
2083                    " to method list_custom_settings" % key
2084                )
2085            params[key] = val
2086        del params['kwargs']
2087        # verify the required parameter 'account_id' is set
2088        if ('account_id' not in params) or (params['account_id'] is None):
2089            raise ValueError("Missing the required parameter `account_id` when calling `list_custom_settings`")
2090        # verify the required parameter 'user_id' is set
2091        if ('user_id' not in params) or (params['user_id'] is None):
2092            raise ValueError("Missing the required parameter `user_id` when calling `list_custom_settings`")
2093
2094
2095        collection_formats = {}
2096
2097        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json')
2098        path_params = {}
2099        if 'account_id' in params:
2100            path_params['accountId'] = params['account_id']
2101        if 'user_id' in params:
2102            path_params['userId'] = params['user_id']
2103
2104        query_params = {}
2105
2106        header_params = {}
2107
2108        form_params = []
2109        local_var_files = {}
2110
2111        body_params = None
2112        # HTTP header `Accept`
2113        header_params['Accept'] = self.api_client.\
2114            select_header_accept(['application/json'])
2115
2116        # Authentication setting
2117        auth_settings = []
2118
2119        return self.api_client.call_api(resource_path, 'GET',
2120                                        path_params,
2121                                        query_params,
2122                                        header_params,
2123                                        body=body_params,
2124                                        post_params=form_params,
2125                                        files=local_var_files,
2126                                        response_type='CustomSettingsInformation',
2127                                        auth_settings=auth_settings,
2128                                        callback=params.get('callback'),
2129                                        _return_http_data_only=params.get('_return_http_data_only'),
2130                                        _preload_content=params.get('_preload_content', True),
2131                                        _request_timeout=params.get('_request_timeout'),
2132                                        collection_formats=collection_formats)
2133
2134    def list_signatures(self, account_id, user_id, **kwargs):
2135        """
2136        Retrieves a list of user signature definitions for a specified user.
2137        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\".
2138        This method makes a synchronous HTTP request by default. To make an
2139        asynchronous HTTP request, please define a `callback` function
2140        to be invoked when receiving the response.
2141        >>> def callback_function(response):
2142        >>>     pprint(response)
2143        >>>
2144        >>> thread = api.list_signatures(account_id, user_id, callback=callback_function)
2145
2146        :param callback function: The callback function
2147            for asynchronous request. (optional)
2148        :param str account_id: The external account number (int) or account ID Guid. (required)
2149        :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)
2150        :param str stamp_type:
2151        :return: UserSignaturesInformation
2152                 If the method is called asynchronously,
2153                 returns the request thread.
2154        """
2155        kwargs['_return_http_data_only'] = True
2156        if kwargs.get('callback'):
2157            return self.list_signatures_with_http_info(account_id, user_id, **kwargs)
2158        else:
2159            (data) = self.list_signatures_with_http_info(account_id, user_id, **kwargs)
2160            return data
2161
2162    def list_signatures_with_http_info(self, account_id, user_id, **kwargs):
2163        """
2164        Retrieves a list of user signature definitions for a specified user.
2165        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\".
2166        This method makes a synchronous HTTP request by default. To make an
2167        asynchronous HTTP request, please define a `callback` function
2168        to be invoked when receiving the response.
2169        >>> def callback_function(response):
2170        >>>     pprint(response)
2171        >>>
2172        >>> thread = api.list_signatures_with_http_info(account_id, user_id, callback=callback_function)
2173
2174        :param callback function: The callback function
2175            for asynchronous request. (optional)
2176        :param str account_id: The external account number (int) or account ID Guid. (required)
2177        :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)
2178        :param str stamp_type:
2179        :return: UserSignaturesInformation
2180                 If the method is called asynchronously,
2181                 returns the request thread.
2182        """
2183
2184        all_params = ['account_id', 'user_id', 'stamp_type']
2185        all_params.append('callback')
2186        all_params.append('_return_http_data_only')
2187        all_params.append('_preload_content')
2188        all_params.append('_request_timeout')
2189
2190        params = locals()
2191        for key, val in iteritems(params['kwargs']):
2192            if key not in all_params:
2193                raise TypeError(
2194                    "Got an unexpected keyword argument '%s'"
2195                    " to method list_signatures" % key
2196                )
2197            params[key] = val
2198        del params['kwargs']
2199        # verify the required parameter 'account_id' is set
2200        if ('account_id' not in params) or (params['account_id'] is None):
2201            raise ValueError("Missing the required parameter `account_id` when calling `list_signatures`")
2202        # verify the required parameter 'user_id' is set
2203        if ('user_id' not in params) or (params['user_id'] is None):
2204            raise ValueError("Missing the required parameter `user_id` when calling `list_signatures`")
2205
2206
2207        collection_formats = {}
2208
2209        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json')
2210        path_params = {}
2211        if 'account_id' in params:
2212            path_params['accountId'] = params['account_id']
2213        if 'user_id' in params:
2214            path_params['userId'] = params['user_id']
2215
2216        query_params = {}
2217        if 'stamp_type' in params:
2218            query_params['stamp_type'] = params['stamp_type']
2219
2220        header_params = {}
2221
2222        form_params = []
2223        local_var_files = {}
2224
2225        body_params = None
2226        # HTTP header `Accept`
2227        header_params['Accept'] = self.api_client.\
2228            select_header_accept(['application/json'])
2229
2230        # Authentication setting
2231        auth_settings = []
2232
2233        return self.api_client.call_api(resource_path, 'GET',
2234                                        path_params,
2235                                        query_params,
2236                                        header_params,
2237                                        body=body_params,
2238                                        post_params=form_params,
2239                                        files=local_var_files,
2240                                        response_type='UserSignaturesInformation',
2241                                        auth_settings=auth_settings,
2242                                        callback=params.get('callback'),
2243                                        _return_http_data_only=params.get('_return_http_data_only'),
2244                                        _preload_content=params.get('_preload_content', True),
2245                                        _request_timeout=params.get('_request_timeout'),
2246                                        collection_formats=collection_formats)
2247
2248    def post_contacts(self, account_id, **kwargs):
2249        """
2250        Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type).
2251        This method adds multiple contacts into a contacts list.
2252        This method makes a synchronous HTTP request by default. To make an
2253        asynchronous HTTP request, please define a `callback` function
2254        to be invoked when receiving the response.
2255        >>> def callback_function(response):
2256        >>>     pprint(response)
2257        >>>
2258        >>> thread = api.post_contacts(account_id, callback=callback_function)
2259
2260        :param callback function: The callback function
2261            for asynchronous request. (optional)
2262        :param str account_id: The external account number (int) or account ID Guid. (required)
2263        :param ContactModRequest contact_mod_request:
2264        :return: ContactUpdateResponse
2265                 If the method is called asynchronously,
2266                 returns the request thread.
2267        """
2268        kwargs['_return_http_data_only'] = True
2269        if kwargs.get('callback'):
2270            return self.post_contacts_with_http_info(account_id, **kwargs)
2271        else:
2272            (data) = self.post_contacts_with_http_info(account_id, **kwargs)
2273            return data
2274
2275    def post_contacts_with_http_info(self, account_id, **kwargs):
2276        """
2277        Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type).
2278        This method adds multiple contacts into a contacts list.
2279        This method makes a synchronous HTTP request by default. To make an
2280        asynchronous HTTP request, please define a `callback` function
2281        to be invoked when receiving the response.
2282        >>> def callback_function(response):
2283        >>>     pprint(response)
2284        >>>
2285        >>> thread = api.post_contacts_with_http_info(account_id, callback=callback_function)
2286
2287        :param callback function: The callback function
2288            for asynchronous request. (optional)
2289        :param str account_id: The external account number (int) or account ID Guid. (required)
2290        :param ContactModRequest contact_mod_request:
2291        :return: ContactUpdateResponse
2292                 If the method is called asynchronously,
2293                 returns the request thread.
2294        """
2295
2296        all_params = ['account_id', 'contact_mod_request']
2297        all_params.append('callback')
2298        all_params.append('_return_http_data_only')
2299        all_params.append('_preload_content')
2300        all_params.append('_request_timeout')
2301
2302        params = locals()
2303        for key, val in iteritems(params['kwargs']):
2304            if key not in all_params:
2305                raise TypeError(
2306                    "Got an unexpected keyword argument '%s'"
2307                    " to method post_contacts" % key
2308                )
2309            params[key] = val
2310        del params['kwargs']
2311        # verify the required parameter 'account_id' is set
2312        if ('account_id' not in params) or (params['account_id'] is None):
2313            raise ValueError("Missing the required parameter `account_id` when calling `post_contacts`")
2314
2315
2316        collection_formats = {}
2317
2318        resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json')
2319        path_params = {}
2320        if 'account_id' in params:
2321            path_params['accountId'] = params['account_id']
2322
2323        query_params = {}
2324
2325        header_params = {}
2326
2327        form_params = []
2328        local_var_files = {}
2329
2330        body_params = None
2331        if 'contact_mod_request' in params:
2332            body_params = params['contact_mod_request']
2333        # HTTP header `Accept`
2334        header_params['Accept'] = self.api_client.\
2335            select_header_accept(['application/json'])
2336
2337        # Authentication setting
2338        auth_settings = []
2339
2340        return self.api_client.call_api(resource_path, 'POST',
2341                                        path_params,
2342                                        query_params,
2343                                        header_params,
2344                                        body=body_params,
2345                                        post_params=form_params,
2346                                        files=local_var_files,
2347                                        response_type='ContactUpdateResponse',
2348                                        auth_settings=auth_settings,
2349                                        callback=params.get('callback'),
2350                                        _return_http_data_only=params.get('_return_http_data_only'),
2351                                        _preload_content=params.get('_preload_content', True),
2352                                        _request_timeout=params.get('_request_timeout'),
2353                                        collection_formats=collection_formats)
2354
2355    def put_contacts(self, account_id, **kwargs):
2356        """
2357        Replaces contacts associated with an account for the DocuSign service.
2358        This method updates one or more contacts associated with an account.
2359        This method makes a synchronous HTTP request by default. To make an
2360        asynchronous HTTP request, please define a `callback` function
2361        to be invoked when receiving the response.
2362        >>> def callback_function(response):
2363        >>>     pprint(response)
2364        >>>
2365        >>> thread = api.put_contacts(account_id, callback=callback_function)
2366
2367        :param callback function: The callback function
2368            for asynchronous request. (optional)
2369        :param str account_id: The external account number (int) or account ID Guid. (required)
2370        :param ContactModRequest contact_mod_request:
2371        :return: ContactUpdateResponse
2372                 If the method is called asynchronously,
2373                 returns the request thread.
2374        """
2375        kwargs['_return_http_data_only'] = True
2376        if kwargs.get('callback'):
2377            return self.put_contacts_with_http_info(account_id, **kwargs)
2378        else:
2379            (data) = self.put_contacts_with_http_info(account_id, **kwargs)
2380            return data
2381
2382    def put_contacts_with_http_info(self, account_id, **kwargs):
2383        """
2384        Replaces contacts associated with an account for the DocuSign service.
2385        This method updates one or more contacts associated with an account.
2386        This method makes a synchronous HTTP request by default. To make an
2387        asynchronous HTTP request, please define a `callback` function
2388        to be invoked when receiving the response.
2389        >>> def callback_function(response):
2390        >>>     pprint(response)
2391        >>>
2392        >>> thread = api.put_contacts_with_http_info(account_id, callback=callback_function)
2393
2394        :param callback function: The callback function
2395            for asynchronous request. (optional)
2396        :param str account_id: The external account number (int) or account ID Guid. (required)
2397        :param ContactModRequest contact_mod_request:
2398        :return: ContactUpdateResponse
2399                 If the method is called asynchronously,
2400                 returns the request thread.
2401        """
2402
2403        all_params = ['account_id', 'contact_mod_request']
2404        all_params.append('callback')
2405        all_params.append('_return_http_data_only')
2406        all_params.append('_preload_content')
2407        all_params.append('_request_timeout')
2408
2409        params = locals()
2410        for key, val in iteritems(params['kwargs']):
2411            if key not in all_params:
2412                raise TypeError(
2413                    "Got an unexpected keyword argument '%s'"
2414                    " to method put_contacts" % key
2415                )
2416            params[key] = val
2417        del params['kwargs']
2418        # verify the required parameter 'account_id' is set
2419        if ('account_id' not in params) or (params['account_id'] is None):
2420            raise ValueError("Missing the required parameter `account_id` when calling `put_contacts`")
2421
2422
2423        collection_formats = {}
2424
2425        resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json')
2426        path_params = {}
2427        if 'account_id' in params:
2428            path_params['accountId'] = params['account_id']
2429
2430        query_params = {}
2431
2432        header_params = {}
2433
2434        form_params = []
2435        local_var_files = {}
2436
2437        body_params = None
2438        if 'contact_mod_request' in params:
2439            body_params = params['contact_mod_request']
2440        # HTTP header `Accept`
2441        header_params['Accept'] = self.api_client.\
2442            select_header_accept(['application/json'])
2443
2444        # Authentication setting
2445        auth_settings = []
2446
2447        return self.api_client.call_api(resource_path, 'PUT',
2448                                        path_params,
2449                                        query_params,
2450                                        header_params,
2451                                        body=body_params,
2452                                        post_params=form_params,
2453                                        files=local_var_files,
2454                                        response_type='ContactUpdateResponse',
2455                                        auth_settings=auth_settings,
2456                                        callback=params.get('callback'),
2457                                        _return_http_data_only=params.get('_return_http_data_only'),
2458                                        _preload_content=params.get('_preload_content', True),
2459                                        _request_timeout=params.get('_request_timeout'),
2460                                        collection_formats=collection_formats)
2461
2462    def update_custom_settings(self, account_id, user_id, **kwargs):
2463        """
2464        Adds or updates custom user settings for the specified user.
2465        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.
2466        This method makes a synchronous HTTP request by default. To make an
2467        asynchronous HTTP request, please define a `callback` function
2468        to be invoked when receiving the response.
2469        >>> def callback_function(response):
2470        >>>     pprint(response)
2471        >>>
2472        >>> thread = api.update_custom_settings(account_id, user_id, callback=callback_function)
2473
2474        :param callback function: The callback function
2475            for asynchronous request. (optional)
2476        :param str account_id: The external account number (int) or account ID Guid. (required)
2477        :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)
2478        :param CustomSettingsInformation custom_settings_information:
2479        :return: CustomSettingsInformation
2480                 If the method is called asynchronously,
2481                 returns the request thread.
2482        """
2483        kwargs['_return_http_data_only'] = True
2484        if kwargs.get('callback'):
2485            return self.update_custom_settings_with_http_info(account_id, user_id, **kwargs)
2486        else:
2487            (data) = self.update_custom_settings_with_http_info(account_id, user_id, **kwargs)
2488            return data
2489
2490    def update_custom_settings_with_http_info(self, account_id, user_id, **kwargs):
2491        """
2492        Adds or updates custom user settings for the specified user.
2493        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.
2494        This method makes a synchronous HTTP request by default. To make an
2495        asynchronous HTTP request, please define a `callback` function
2496        to be invoked when receiving the response.
2497        >>> def callback_function(response):
2498        >>>     pprint(response)
2499        >>>
2500        >>> thread = api.update_custom_settings_with_http_info(account_id, user_id, callback=callback_function)
2501
2502        :param callback function: The callback function
2503            for asynchronous request. (optional)
2504        :param str account_id: The external account number (int) or account ID Guid. (required)
2505        :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)
2506        :param CustomSettingsInformation custom_settings_information:
2507        :return: CustomSettingsInformation
2508                 If the method is called asynchronously,
2509                 returns the request thread.
2510        """
2511
2512        all_params = ['account_id', 'user_id', 'custom_settings_information']
2513        all_params.append('callback')
2514        all_params.append('_return_http_data_only')
2515        all_params.append('_preload_content')
2516        all_params.append('_request_timeout')
2517
2518        params = locals()
2519        for key, val in iteritems(params['kwargs']):
2520            if key not in all_params:
2521                raise TypeError(
2522                    "Got an unexpected keyword argument '%s'"
2523                    " to method update_custom_settings" % key
2524                )
2525            params[key] = val
2526        del params['kwargs']
2527        # verify the required parameter 'account_id' is set
2528        if ('account_id' not in params) or (params['account_id'] is None):
2529            raise ValueError("Missing the required parameter `account_id` when calling `update_custom_settings`")
2530        # verify the required parameter 'user_id' is set
2531        if ('user_id' not in params) or (params['user_id'] is None):
2532            raise ValueError("Missing the required parameter `user_id` when calling `update_custom_settings`")
2533
2534
2535        collection_formats = {}
2536
2537        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json')
2538        path_params = {}
2539        if 'account_id' in params:
2540            path_params['accountId'] = params['account_id']
2541        if 'user_id' in params:
2542            path_params['userId'] = params['user_id']
2543
2544        query_params = {}
2545
2546        header_params = {}
2547
2548        form_params = []
2549        local_var_files = {}
2550
2551        body_params = None
2552        if 'custom_settings_information' in params:
2553            body_params = params['custom_settings_information']
2554        # HTTP header `Accept`
2555        header_params['Accept'] = self.api_client.\
2556            select_header_accept(['application/json'])
2557
2558        # Authentication setting
2559        auth_settings = []
2560
2561        return self.api_client.call_api(resource_path, 'PUT',
2562                                        path_params,
2563                                        query_params,
2564                                        header_params,
2565                                        body=body_params,
2566                                        post_params=form_params,
2567                                        files=local_var_files,
2568                                        response_type='CustomSettingsInformation',
2569                                        auth_settings=auth_settings,
2570                                        callback=params.get('callback'),
2571                                        _return_http_data_only=params.get('_return_http_data_only'),
2572                                        _preload_content=params.get('_preload_content', True),
2573                                        _request_timeout=params.get('_request_timeout'),
2574                                        collection_formats=collection_formats)
2575
2576    def update_profile(self, account_id, user_id, **kwargs):
2577        """
2578        Updates the user profile information for the specified user.
2579        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.
2580        This method makes a synchronous HTTP request by default. To make an
2581        asynchronous HTTP request, please define a `callback` function
2582        to be invoked when receiving the response.
2583        >>> def callback_function(response):
2584        >>>     pprint(response)
2585        >>>
2586        >>> thread = api.update_profile(account_id, user_id, callback=callback_function)
2587
2588        :param callback function: The callback function
2589            for asynchronous request. (optional)
2590        :param str account_id: The external account number (int) or account ID Guid. (required)
2591        :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)
2592        :param UserProfile user_profile:
2593        :return: None
2594                 If the method is called asynchronously,
2595                 returns the request thread.
2596        """
2597        kwargs['_return_http_data_only'] = True
2598        if kwargs.get('callback'):
2599            return self.update_profile_with_http_info(account_id, user_id, **kwargs)
2600        else:
2601            (data) = self.update_profile_with_http_info(account_id, user_id, **kwargs)
2602            return data
2603
2604    def update_profile_with_http_info(self, account_id, user_id, **kwargs):
2605        """
2606        Updates the user profile information for the specified user.
2607        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.
2608        This method makes a synchronous HTTP request by default. To make an
2609        asynchronous HTTP request, please define a `callback` function
2610        to be invoked when receiving the response.
2611        >>> def callback_function(response):
2612        >>>     pprint(response)
2613        >>>
2614        >>> thread = api.update_profile_with_http_info(account_id, user_id, callback=callback_function)
2615
2616        :param callback function: The callback function
2617            for asynchronous request. (optional)
2618        :param str account_id: The external account number (int) or account ID Guid. (required)
2619        :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)
2620        :param UserProfile user_profile:
2621        :return: None
2622                 If the method is called asynchronously,
2623                 returns the request thread.
2624        """
2625
2626        all_params = ['account_id', 'user_id', 'user_profile']
2627        all_params.append('callback')
2628        all_params.append('_return_http_data_only')
2629        all_params.append('_preload_content')
2630        all_params.append('_request_timeout')
2631
2632        params = locals()
2633        for key, val in iteritems(params['kwargs']):
2634            if key not in all_params:
2635                raise TypeError(
2636                    "Got an unexpected keyword argument '%s'"
2637                    " to method update_profile" % key
2638                )
2639            params[key] = val
2640        del params['kwargs']
2641        # verify the required parameter 'account_id' is set
2642        if ('account_id' not in params) or (params['account_id'] is None):
2643            raise ValueError("Missing the required parameter `account_id` when calling `update_profile`")
2644        # verify the required parameter 'user_id' is set
2645        if ('user_id' not in params) or (params['user_id'] is None):
2646            raise ValueError("Missing the required parameter `user_id` when calling `update_profile`")
2647
2648
2649        collection_formats = {}
2650
2651        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile'.replace('{format}', 'json')
2652        path_params = {}
2653        if 'account_id' in params:
2654            path_params['accountId'] = params['account_id']
2655        if 'user_id' in params:
2656            path_params['userId'] = params['user_id']
2657
2658        query_params = {}
2659
2660        header_params = {}
2661
2662        form_params = []
2663        local_var_files = {}
2664
2665        body_params = None
2666        if 'user_profile' in params:
2667            body_params = params['user_profile']
2668        # HTTP header `Accept`
2669        header_params['Accept'] = self.api_client.\
2670            select_header_accept(['application/json'])
2671
2672        # Authentication setting
2673        auth_settings = []
2674
2675        return self.api_client.call_api(resource_path, 'PUT',
2676                                        path_params,
2677                                        query_params,
2678                                        header_params,
2679                                        body=body_params,
2680                                        post_params=form_params,
2681                                        files=local_var_files,
2682                                        response_type=None,
2683                                        auth_settings=auth_settings,
2684                                        callback=params.get('callback'),
2685                                        _return_http_data_only=params.get('_return_http_data_only'),
2686                                        _preload_content=params.get('_preload_content', True),
2687                                        _request_timeout=params.get('_request_timeout'),
2688                                        collection_formats=collection_formats)
2689
2690    def update_profile_image(self, account_id, user_id, **kwargs):
2691        """
2692        Updates the user profile image for a specified user.
2693        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.
2694        This method makes a synchronous HTTP request by default. To make an
2695        asynchronous HTTP request, please define a `callback` function
2696        to be invoked when receiving the response.
2697        >>> def callback_function(response):
2698        >>>     pprint(response)
2699        >>>
2700        >>> thread = api.update_profile_image(account_id, user_id, callback=callback_function)
2701
2702        :param callback function: The callback function
2703            for asynchronous request. (optional)
2704        :param str account_id: The external account number (int) or account ID Guid. (required)
2705        :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)
2706        :return: None
2707                 If the method is called asynchronously,
2708                 returns the request thread.
2709        """
2710        kwargs['_return_http_data_only'] = True
2711        if kwargs.get('callback'):
2712            return self.update_profile_image_with_http_info(account_id, user_id, **kwargs)
2713        else:
2714            (data) = self.update_profile_image_with_http_info(account_id, user_id, **kwargs)
2715            return data
2716
2717    def update_profile_image_with_http_info(self, account_id, user_id, **kwargs):
2718        """
2719        Updates the user profile image for a specified user.
2720        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.
2721        This method makes a synchronous HTTP request by default. To make an
2722        asynchronous HTTP request, please define a `callback` function
2723        to be invoked when receiving the response.
2724        >>> def callback_function(response):
2725        >>>     pprint(response)
2726        >>>
2727        >>> thread = api.update_profile_image_with_http_info(account_id, user_id, callback=callback_function)
2728
2729        :param callback function: The callback function
2730            for asynchronous request. (optional)
2731        :param str account_id: The external account number (int) or account ID Guid. (required)
2732        :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)
2733        :return: None
2734                 If the method is called asynchronously,
2735                 returns the request thread.
2736        """
2737
2738        all_params = ['account_id', 'user_id']
2739        all_params.append('callback')
2740        all_params.append('_return_http_data_only')
2741        all_params.append('_preload_content')
2742        all_params.append('_request_timeout')
2743
2744        params = locals()
2745        for key, val in iteritems(params['kwargs']):
2746            if key not in all_params:
2747                raise TypeError(
2748                    "Got an unexpected keyword argument '%s'"
2749                    " to method update_profile_image" % key
2750                )
2751            params[key] = val
2752        del params['kwargs']
2753        # verify the required parameter 'account_id' is set
2754        if ('account_id' not in params) or (params['account_id'] is None):
2755            raise ValueError("Missing the required parameter `account_id` when calling `update_profile_image`")
2756        # verify the required parameter 'user_id' is set
2757        if ('user_id' not in params) or (params['user_id'] is None):
2758            raise ValueError("Missing the required parameter `user_id` when calling `update_profile_image`")
2759
2760
2761        collection_formats = {}
2762
2763        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json')
2764        path_params = {}
2765        if 'account_id' in params:
2766            path_params['accountId'] = params['account_id']
2767        if 'user_id' in params:
2768            path_params['userId'] = params['user_id']
2769
2770        query_params = {}
2771
2772        header_params = {}
2773
2774        form_params = []
2775        local_var_files = {}
2776
2777        body_params = None
2778        # HTTP header `Accept`
2779        header_params['Accept'] = self.api_client.\
2780            select_header_accept(['application/json'])
2781
2782        # HTTP header `Content-Type`
2783        header_params['Content-Type'] = self.api_client.\
2784            select_header_content_type(['image/gif'])
2785
2786        # Authentication setting
2787        auth_settings = []
2788
2789        return self.api_client.call_api(resource_path, 'PUT',
2790                                        path_params,
2791                                        query_params,
2792                                        header_params,
2793                                        body=body_params,
2794                                        post_params=form_params,
2795                                        files=local_var_files,
2796                                        response_type=None,
2797                                        auth_settings=auth_settings,
2798                                        callback=params.get('callback'),
2799                                        _return_http_data_only=params.get('_return_http_data_only'),
2800                                        _preload_content=params.get('_preload_content', True),
2801                                        _request_timeout=params.get('_request_timeout'),
2802                                        collection_formats=collection_formats)
2803
2804    def update_settings(self, account_id, user_id, **kwargs):
2805        """
2806        Updates the user account settings for a specified user.
2807        Updates the account settings list and email notification types for the specified user.
2808        This method makes a synchronous HTTP request by default. To make an
2809        asynchronous HTTP request, please define a `callback` function
2810        to be invoked when receiving the response.
2811        >>> def callback_function(response):
2812        >>>     pprint(response)
2813        >>>
2814        >>> thread = api.update_settings(account_id, user_id, callback=callback_function)
2815
2816        :param callback function: The callback function
2817            for asynchronous request. (optional)
2818        :param str account_id: The external account number (int) or account ID Guid. (required)
2819        :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)
2820        :param str allow_all_languages:
2821        :param UserSettingsInformation user_settings_information:
2822        :return: None
2823                 If the method is called asynchronously,
2824                 returns the request thread.
2825        """
2826        kwargs['_return_http_data_only'] = True
2827        if kwargs.get('callback'):
2828            return self.update_settings_with_http_info(account_id, user_id, **kwargs)
2829        else:
2830            (data) = self.update_settings_with_http_info(account_id, user_id, **kwargs)
2831            return data
2832
2833    def update_settings_with_http_info(self, account_id, user_id, **kwargs):
2834        """
2835        Updates the user account settings for a specified user.
2836        Updates the account settings list and email notification types for the specified user.
2837        This method makes a synchronous HTTP request by default. To make an
2838        asynchronous HTTP request, please define a `callback` function
2839        to be invoked when receiving the response.
2840        >>> def callback_function(response):
2841        >>>     pprint(response)
2842        >>>
2843        >>> thread = api.update_settings_with_http_info(account_id, user_id, callback=callback_function)
2844
2845        :param callback function: The callback function
2846            for asynchronous request. (optional)
2847        :param str account_id: The external account number (int) or account ID Guid. (required)
2848        :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)
2849        :param str allow_all_languages:
2850        :param UserSettingsInformation user_settings_information:
2851        :return: None
2852                 If the method is called asynchronously,
2853                 returns the request thread.
2854        """
2855
2856        all_params = ['account_id', 'user_id', 'allow_all_languages', 'user_settings_information']
2857        all_params.append('callback')
2858        all_params.append('_return_http_data_only')
2859        all_params.append('_preload_content')
2860        all_params.append('_request_timeout')
2861
2862        params = locals()
2863        for key, val in iteritems(params['kwargs']):
2864            if key not in all_params:
2865                raise TypeError(
2866                    "Got an unexpected keyword argument '%s'"
2867                    " to method update_settings" % key
2868                )
2869            params[key] = val
2870        del params['kwargs']
2871        # verify the required parameter 'account_id' is set
2872        if ('account_id' not in params) or (params['account_id'] is None):
2873            raise ValueError("Missing the required parameter `account_id` when calling `update_settings`")
2874        # verify the required parameter 'user_id' is set
2875        if ('user_id' not in params) or (params['user_id'] is None):
2876            raise ValueError("Missing the required parameter `user_id` when calling `update_settings`")
2877
2878
2879        collection_formats = {}
2880
2881        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/settings'.replace('{format}', 'json')
2882        path_params = {}
2883        if 'account_id' in params:
2884            path_params['accountId'] = params['account_id']
2885        if 'user_id' in params:
2886            path_params['userId'] = params['user_id']
2887
2888        query_params = {}
2889        if 'allow_all_languages' in params:
2890            query_params['allow_all_languages'] = params['allow_all_languages']
2891
2892        header_params = {}
2893
2894        form_params = []
2895        local_var_files = {}
2896
2897        body_params = None
2898        if 'user_settings_information' in params:
2899            body_params = params['user_settings_information']
2900        # HTTP header `Accept`
2901        header_params['Accept'] = self.api_client.\
2902            select_header_accept(['application/json'])
2903
2904        # Authentication setting
2905        auth_settings = []
2906
2907        return self.api_client.call_api(resource_path, 'PUT',
2908                                        path_params,
2909                                        query_params,
2910                                        header_params,
2911                                        body=body_params,
2912                                        post_params=form_params,
2913                                        files=local_var_files,
2914                                        response_type=None,
2915                                        auth_settings=auth_settings,
2916                                        callback=params.get('callback'),
2917                                        _return_http_data_only=params.get('_return_http_data_only'),
2918                                        _preload_content=params.get('_preload_content', True),
2919                                        _request_timeout=params.get('_request_timeout'),
2920                                        collection_formats=collection_formats)
2921
2922    def update_signature(self, account_id, signature_id, user_id, **kwargs):
2923        """
2924        Updates the user signature for a specified user.
2925        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\".
2926        This method makes a synchronous HTTP request by default. To make an
2927        asynchronous HTTP request, please define a `callback` function
2928        to be invoked when receiving the response.
2929        >>> def callback_function(response):
2930        >>>     pprint(response)
2931        >>>
2932        >>> thread = api.update_signature(account_id, signature_id, user_id, callback=callback_function)
2933
2934        :param callback function: The callback function
2935            for asynchronous request. (optional)
2936        :param str account_id: The external account number (int) or account ID Guid. (required)
2937        :param str signature_id: The ID of the signature being accessed. (required)
2938        :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)
2939        :param str close_existing_signature: When set to **true**, closes the current signature.
2940        :param UserSignatureDefinition user_signature_definition:
2941        :return: UserSignature
2942                 If the method is called asynchronously,
2943                 returns the request thread.
2944        """
2945        kwargs['_return_http_data_only'] = True
2946        if kwargs.get('callback'):
2947            return self.update_signature_with_http_info(account_id, signature_id, user_id, **kwargs)
2948        else:
2949            (data) = self.update_signature_with_http_info(account_id, signature_id, user_id, **kwargs)
2950            return data
2951
2952    def update_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs):
2953        """
2954        Updates the user signature for a specified user.
2955        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\".
2956        This method makes a synchronous HTTP request by default. To make an
2957        asynchronous HTTP request, please define a `callback` function
2958        to be invoked when receiving the response.
2959        >>> def callback_function(response):
2960        >>>     pprint(response)
2961        >>>
2962        >>> thread = api.update_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function)
2963
2964        :param callback function: The callback function
2965            for asynchronous request. (optional)
2966        :param str account_id: The external account number (int) or account ID Guid. (required)
2967        :param str signature_id: The ID of the signature being accessed. (required)
2968        :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)
2969        :param str close_existing_signature: When set to **true**, closes the current signature.
2970        :param UserSignatureDefinition user_signature_definition:
2971        :return: UserSignature
2972                 If the method is called asynchronously,
2973                 returns the request thread.
2974        """
2975
2976        all_params = ['account_id', 'signature_id', 'user_id', 'close_existing_signature', 'user_signature_definition']
2977        all_params.append('callback')
2978        all_params.append('_return_http_data_only')
2979        all_params.append('_preload_content')
2980        all_params.append('_request_timeout')
2981
2982        params = locals()
2983        for key, val in iteritems(params['kwargs']):
2984            if key not in all_params:
2985                raise TypeError(
2986                    "Got an unexpected keyword argument '%s'"
2987                    " to method update_signature" % key
2988                )
2989            params[key] = val
2990        del params['kwargs']
2991        # verify the required parameter 'account_id' is set
2992        if ('account_id' not in params) or (params['account_id'] is None):
2993            raise ValueError("Missing the required parameter `account_id` when calling `update_signature`")
2994        # verify the required parameter 'signature_id' is set
2995        if ('signature_id' not in params) or (params['signature_id'] is None):
2996            raise ValueError("Missing the required parameter `signature_id` when calling `update_signature`")
2997        # verify the required parameter 'user_id' is set
2998        if ('user_id' not in params) or (params['user_id'] is None):
2999            raise ValueError("Missing the required parameter `user_id` when calling `update_signature`")
3000
3001
3002        collection_formats = {}
3003
3004        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json')
3005        path_params = {}
3006        if 'account_id' in params:
3007            path_params['accountId'] = params['account_id']
3008        if 'signature_id' in params:
3009            path_params['signatureId'] = params['signature_id']
3010        if 'user_id' in params:
3011            path_params['userId'] = params['user_id']
3012
3013        query_params = {}
3014        if 'close_existing_signature' in params:
3015            query_params['close_existing_signature'] = params['close_existing_signature']
3016
3017        header_params = {}
3018
3019        form_params = []
3020        local_var_files = {}
3021
3022        body_params = None
3023        if 'user_signature_definition' in params:
3024            body_params = params['user_signature_definition']
3025        # HTTP header `Accept`
3026        header_params['Accept'] = self.api_client.\
3027            select_header_accept(['application/json'])
3028
3029        # Authentication setting
3030        auth_settings = []
3031
3032        return self.api_client.call_api(resource_path, 'PUT',
3033                                        path_params,
3034                                        query_params,
3035                                        header_params,
3036                                        body=body_params,
3037                                        post_params=form_params,
3038                                        files=local_var_files,
3039                                        response_type='UserSignature',
3040                                        auth_settings=auth_settings,
3041                                        callback=params.get('callback'),
3042                                        _return_http_data_only=params.get('_return_http_data_only'),
3043                                        _preload_content=params.get('_preload_content', True),
3044                                        _request_timeout=params.get('_request_timeout'),
3045                                        collection_formats=collection_formats)
3046
3047    def update_signature_image(self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs):
3048        """
3049        Updates the user signature image or user initials image for the specified user.
3050        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\". 
3051        This method makes a synchronous HTTP request by default. To make an
3052        asynchronous HTTP request, please define a `callback` function
3053        to be invoked when receiving the response.
3054        >>> def callback_function(response):
3055        >>>     pprint(response)
3056        >>>
3057        >>> thread = api.update_signature_image(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function)
3058
3059        :param callback function: The callback function
3060            for asynchronous request. (optional)
3061        :param str account_id: The external account number (int) or account ID Guid. (required)
3062        :param str image_type: One of **signature_image** or **initials_image**. (required)
3063        :param str signature_id: The ID of the signature being accessed. (required)
3064        :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)
3065        :param str transparent_png:
3066        :param str image_bytes: Updated image content. (required)
3067        :return: UserSignature
3068                 If the method is called asynchronously,
3069                 returns the request thread.
3070        """
3071        kwargs['_return_http_data_only'] = True
3072        if kwargs.get('callback'):
3073            return self.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, **kwargs)
3074        else:
3075            (data) = self.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, **kwargs)
3076            return data
3077
3078    def update_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs):
3079        """
3080        Updates the user signature image or user initials image for the specified user.
3081        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\". 
3082        This method makes a synchronous HTTP request by default. To make an
3083        asynchronous HTTP request, please define a `callback` function
3084        to be invoked when receiving the response.
3085        >>> def callback_function(response):
3086        >>>     pprint(response)
3087        >>>
3088        >>> thread = api.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function)
3089
3090        :param callback function: The callback function
3091            for asynchronous request. (optional)
3092        :param str account_id: The external account number (int) or account ID Guid. (required)
3093        :param str image_type: One of **signature_image** or **initials_image**. (required)
3094        :param str signature_id: The ID of the signature being accessed. (required)
3095        :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)
3096        :param str transparent_png:
3097        :param str image_bytes: Updated image content. (required)
3098        :return: UserSignature
3099                 If the method is called asynchronously,
3100                 returns the request thread.
3101        """
3102
3103        all_params = ['account_id', 'image_type', 'signature_id', 'user_id', 'transparent_png', 'image_bytes']
3104        all_params.append('callback')
3105        all_params.append('_return_http_data_only')
3106        all_params.append('_preload_content')
3107        all_params.append('_request_timeout')
3108
3109        params = locals()
3110        for key, val in iteritems(params['kwargs']):
3111            if key not in all_params:
3112                raise TypeError(
3113                    "Got an unexpected keyword argument '%s'"
3114                    " to method update_signature_image" % key
3115                )
3116            params[key] = val
3117        del params['kwargs']
3118        # verify the required parameter 'account_id' is set
3119        if ('account_id' not in params) or (params['account_id'] is None):
3120            raise ValueError("Missing the required parameter `account_id` when calling `update_signature_image`")
3121        # verify the required parameter 'image_type' is set
3122        if ('image_type' not in params) or (params['image_type'] is None):
3123            raise ValueError("Missing the required parameter `image_type` when calling `update_signature_image`")
3124        # verify the required parameter 'signature_id' is set
3125        if ('signature_id' not in params) or (params['signature_id'] is None):
3126            raise ValueError("Missing the required parameter `signature_id` when calling `update_signature_image`")
3127        # verify the required parameter 'user_id' is set
3128        if ('user_id' not in params) or (params['user_id'] is None):
3129            raise ValueError("Missing the required parameter `user_id` when calling `update_signature_image`")
3130        # verify the required parameter 'image_bytes' is set
3131        if ('image_bytes' not in params) or (params['image_bytes'] is None):
3132            raise ValueError("Missing the required parameter `image_bytes` when calling `update_signature_image`")
3133
3134
3135        collection_formats = {}
3136
3137        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json')
3138        path_params = {}
3139        if 'account_id' in params:
3140            path_params['accountId'] = params['account_id']
3141        if 'image_type' in params:
3142            path_params['imageType'] = params['image_type']
3143        if 'signature_id' in params:
3144            path_params['signatureId'] = params['signature_id']
3145        if 'user_id' in params:
3146            path_params['userId'] = params['user_id']
3147
3148        query_params = {}
3149        if 'transparent_png' in params:
3150            query_params['transparent_png'] = params['transparent_png']
3151
3152        header_params = {}
3153
3154        form_params = []
3155        local_var_files = {}
3156
3157        body_params = None
3158        if 'image_bytes' in params:
3159            body_params = params['image_bytes']
3160        # HTTP header `Accept`
3161        header_params['Accept'] = self.api_client.\
3162            select_header_accept(['application/json'])
3163
3164        # HTTP header `Content-Type`
3165        header_params['Content-Type'] = self.api_client.\
3166            select_header_content_type(['image/gif'])
3167
3168        # Authentication setting
3169        auth_settings = []
3170
3171        return self.api_client.call_api(resource_path, 'PUT',
3172                                        path_params,
3173                                        query_params,
3174                                        header_params,
3175                                        body=body_params,
3176                                        post_params=form_params,
3177                                        files=local_var_files,
3178                                        response_type='UserSignature',
3179                                        auth_settings=auth_settings,
3180                                        callback=params.get('callback'),
3181                                        _return_http_data_only=params.get('_return_http_data_only'),
3182                                        _preload_content=params.get('_preload_content', True),
3183                                        _request_timeout=params.get('_request_timeout'),
3184                                        collection_formats=collection_formats)
3185
3186    def update_signatures(self, account_id, user_id, **kwargs):
3187        """
3188        Adds/updates a user signature.
3189        
3190        This method makes a synchronous HTTP request by default. To make an
3191        asynchronous HTTP request, please define a `callback` function
3192        to be invoked when receiving the response.
3193        >>> def callback_function(response):
3194        >>>     pprint(response)
3195        >>>
3196        >>> thread = api.update_signatures(account_id, user_id, callback=callback_function)
3197
3198        :param callback function: The callback function
3199            for asynchronous request. (optional)
3200        :param str account_id: The external account number (int) or account ID Guid. (required)
3201        :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)
3202        :param UserSignaturesInformation user_signatures_information:
3203        :return: UserSignaturesInformation
3204                 If the method is called asynchronously,
3205                 returns the request thread.
3206        """
3207        kwargs['_return_http_data_only'] = True
3208        if kwargs.get('callback'):
3209            return self.update_signatures_with_http_info(account_id, user_id, **kwargs)
3210        else:
3211            (data) = self.update_signatures_with_http_info(account_id, user_id, **kwargs)
3212            return data
3213
3214    def update_signatures_with_http_info(self, account_id, user_id, **kwargs):
3215        """
3216        Adds/updates a user signature.
3217        
3218        This method makes a synchronous HTTP request by default. To make an
3219        asynchronous HTTP request, please define a `callback` function
3220        to be invoked when receiving the response.
3221        >>> def callback_function(response):
3222        >>>     pprint(response)
3223        >>>
3224        >>> thread = api.update_signatures_with_http_info(account_id, user_id, callback=callback_function)
3225
3226        :param callback function: The callback function
3227            for asynchronous request. (optional)
3228        :param str account_id: The external account number (int) or account ID Guid. (required)
3229        :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)
3230        :param UserSignaturesInformation user_signatures_information:
3231        :return: UserSignaturesInformation
3232                 If the method is called asynchronously,
3233                 returns the request thread.
3234        """
3235
3236        all_params = ['account_id', 'user_id', 'user_signatures_information']
3237        all_params.append('callback')
3238        all_params.append('_return_http_data_only')
3239        all_params.append('_preload_content')
3240        all_params.append('_request_timeout')
3241
3242        params = locals()
3243        for key, val in iteritems(params['kwargs']):
3244            if key not in all_params:
3245                raise TypeError(
3246                    "Got an unexpected keyword argument '%s'"
3247                    " to method update_signatures" % key
3248                )
3249            params[key] = val
3250        del params['kwargs']
3251        # verify the required parameter 'account_id' is set
3252        if ('account_id' not in params) or (params['account_id'] is None):
3253            raise ValueError("Missing the required parameter `account_id` when calling `update_signatures`")
3254        # verify the required parameter 'user_id' is set
3255        if ('user_id' not in params) or (params['user_id'] is None):
3256            raise ValueError("Missing the required parameter `user_id` when calling `update_signatures`")
3257
3258
3259        collection_formats = {}
3260
3261        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json')
3262        path_params = {}
3263        if 'account_id' in params:
3264            path_params['accountId'] = params['account_id']
3265        if 'user_id' in params:
3266            path_params['userId'] = params['user_id']
3267
3268        query_params = {}
3269
3270        header_params = {}
3271
3272        form_params = []
3273        local_var_files = {}
3274
3275        body_params = None
3276        if 'user_signatures_information' in params:
3277            body_params = params['user_signatures_information']
3278        # HTTP header `Accept`
3279        header_params['Accept'] = self.api_client.\
3280            select_header_accept(['application/json'])
3281
3282        # Authentication setting
3283        auth_settings = []
3284
3285        return self.api_client.call_api(resource_path, 'PUT',
3286                                        path_params,
3287                                        query_params,
3288                                        header_params,
3289                                        body=body_params,
3290                                        post_params=form_params,
3291                                        files=local_var_files,
3292                                        response_type='UserSignaturesInformation',
3293                                        auth_settings=auth_settings,
3294                                        callback=params.get('callback'),
3295                                        _return_http_data_only=params.get('_return_http_data_only'),
3296                                        _preload_content=params.get('_preload_content', True),
3297                                        _request_timeout=params.get('_request_timeout'),
3298                                        collection_formats=collection_formats)
3299
3300    def update_user(self, account_id, user_id, **kwargs):
3301        """
3302        Updates the specified user information.
3303        To update user information for a specific user, submit a [Users](#Users) object with updated field values in the request body of this operation.
3304        This method makes a synchronous HTTP request by default. To make an
3305        asynchronous HTTP request, please define a `callback` function
3306        to be invoked when receiving the response.
3307        >>> def callback_function(response):
3308        >>>     pprint(response)
3309        >>>
3310        >>> thread = api.update_user(account_id, user_id, callback=callback_function)
3311
3312        :param callback function: The callback function
3313            for asynchronous request. (optional)
3314        :param str account_id: The external account number (int) or account ID Guid. (required)
3315        :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)
3316        :param str allow_all_languages:
3317        :param UserInformation user_information:
3318        :return: UserInformation
3319                 If the method is called asynchronously,
3320                 returns the request thread.
3321        """
3322        kwargs['_return_http_data_only'] = True
3323        if kwargs.get('callback'):
3324            return self.update_user_with_http_info(account_id, user_id, **kwargs)
3325        else:
3326            (data) = self.update_user_with_http_info(account_id, user_id, **kwargs)
3327            return data
3328
3329    def update_user_with_http_info(self, account_id, user_id, **kwargs):
3330        """
3331        Updates the specified user information.
3332        To update user information for a specific user, submit a [Users](#Users) object with updated field values in the request body of this operation.
3333        This method makes a synchronous HTTP request by default. To make an
3334        asynchronous HTTP request, please define a `callback` function
3335        to be invoked when receiving the response.
3336        >>> def callback_function(response):
3337        >>>     pprint(response)
3338        >>>
3339        >>> thread = api.update_user_with_http_info(account_id, user_id, callback=callback_function)
3340
3341        :param callback function: The callback function
3342            for asynchronous request. (optional)
3343        :param str account_id: The external account number (int) or account ID Guid. (required)
3344        :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)
3345        :param str allow_all_languages:
3346        :param UserInformation user_information:
3347        :return: UserInformation
3348                 If the method is called asynchronously,
3349                 returns the request thread.
3350        """
3351
3352        all_params = ['account_id', 'user_id', 'allow_all_languages', 'user_information']
3353        all_params.append('callback')
3354        all_params.append('_return_http_data_only')
3355        all_params.append('_preload_content')
3356        all_params.append('_request_timeout')
3357
3358        params = locals()
3359        for key, val in iteritems(params['kwargs']):
3360            if key not in all_params:
3361                raise TypeError(
3362                    "Got an unexpected keyword argument '%s'"
3363                    " to method update_user" % key
3364                )
3365            params[key] = val
3366        del params['kwargs']
3367        # verify the required parameter 'account_id' is set
3368        if ('account_id' not in params) or (params['account_id'] is None):
3369            raise ValueError("Missing the required parameter `account_id` when calling `update_user`")
3370        # verify the required parameter 'user_id' is set
3371        if ('user_id' not in params) or (params['user_id'] is None):
3372            raise ValueError("Missing the required parameter `user_id` when calling `update_user`")
3373
3374
3375        collection_formats = {}
3376
3377        resource_path = '/v2.1/accounts/{accountId}/users/{userId}'.replace('{format}', 'json')
3378        path_params = {}
3379        if 'account_id' in params:
3380            path_params['accountId'] = params['account_id']
3381        if 'user_id' in params:
3382            path_params['userId'] = params['user_id']
3383
3384        query_params = {}
3385        if 'allow_all_languages' in params:
3386            query_params['allow_all_languages'] = params['allow_all_languages']
3387
3388        header_params = {}
3389
3390        form_params = []
3391        local_var_files = {}
3392
3393        body_params = None
3394        if 'user_information' in params:
3395            body_params = params['user_information']
3396        # HTTP header `Accept`
3397        header_params['Accept'] = self.api_client.\
3398            select_header_accept(['application/json'])
3399
3400        # Authentication setting
3401        auth_settings = []
3402
3403        return self.api_client.call_api(resource_path, 'PUT',
3404                                        path_params,
3405                                        query_params,
3406                                        header_params,
3407                                        body=body_params,
3408                                        post_params=form_params,
3409                                        files=local_var_files,
3410                                        response_type='UserInformation',
3411                                        auth_settings=auth_settings,
3412                                        callback=params.get('callback'),
3413                                        _return_http_data_only=params.get('_return_http_data_only'),
3414                                        _preload_content=params.get('_preload_content', True),
3415                                        _request_timeout=params.get('_request_timeout'),
3416                                        collection_formats=collection_formats)
3417
3418    def update_users(self, account_id, **kwargs):
3419        """
3420        Change one or more user in the specified account.
3421        This method updates the information about one or more account users.
3422        This method makes a synchronous HTTP request by default. To make an
3423        asynchronous HTTP request, please define a `callback` function
3424        to be invoked when receiving the response.
3425        >>> def callback_function(response):
3426        >>>     pprint(response)
3427        >>>
3428        >>> thread = api.update_users(account_id, callback=callback_function)
3429
3430        :param callback function: The callback function
3431            for asynchronous request. (optional)
3432        :param str account_id: The external account number (int) or account ID Guid. (required)
3433        :param str allow_all_languages:
3434        :param UserInformationList user_information_list:
3435        :return: UserInformationList
3436                 If the method is called asynchronously,
3437                 returns the request thread.
3438        """
3439        kwargs['_return_http_data_only'] = True
3440        if kwargs.get('callback'):
3441            return self.update_users_with_http_info(account_id, **kwargs)
3442        else:
3443            (data) = self.update_users_with_http_info(account_id, **kwargs)
3444            return data
3445
3446    def update_users_with_http_info(self, account_id, **kwargs):
3447        """
3448        Change one or more user in the specified account.
3449        This method updates the information about one or more account users.
3450        This method makes a synchronous HTTP request by default. To make an
3451        asynchronous HTTP request, please define a `callback` function
3452        to be invoked when receiving the response.
3453        >>> def callback_function(response):
3454        >>>     pprint(response)
3455        >>>
3456        >>> thread = api.update_users_with_http_info(account_id, callback=callback_function)
3457
3458        :param callback function: The callback function
3459            for asynchronous request. (optional)
3460        :param str account_id: The external account number (int) or account ID Guid. (required)
3461        :param str allow_all_languages:
3462        :param UserInformationList user_information_list:
3463        :return: UserInformationList
3464                 If the method is called asynchronously,
3465                 returns the request thread.
3466        """
3467
3468        all_params = ['account_id', 'allow_all_languages', 'user_information_list']
3469        all_params.append('callback')
3470        all_params.append('_return_http_data_only')
3471        all_params.append('_preload_content')
3472        all_params.append('_request_timeout')
3473
3474        params = locals()
3475        for key, val in iteritems(params['kwargs']):
3476            if key not in all_params:
3477                raise TypeError(
3478                    "Got an unexpected keyword argument '%s'"
3479                    " to method update_users" % key
3480                )
3481            params[key] = val
3482        del params['kwargs']
3483        # verify the required parameter 'account_id' is set
3484        if ('account_id' not in params) or (params['account_id'] is None):
3485            raise ValueError("Missing the required parameter `account_id` when calling `update_users`")
3486
3487
3488        collection_formats = {}
3489
3490        resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json')
3491        path_params = {}
3492        if 'account_id' in params:
3493            path_params['accountId'] = params['account_id']
3494
3495        query_params = {}
3496        if 'allow_all_languages' in params:
3497            query_params['allow_all_languages'] = params['allow_all_languages']
3498
3499        header_params = {}
3500
3501        form_params = []
3502        local_var_files = {}
3503
3504        body_params = None
3505        if 'user_information_list' in params:
3506            body_params = params['user_information_list']
3507        # HTTP header `Accept`
3508        header_params['Accept'] = self.api_client.\
3509            select_header_accept(['application/json'])
3510
3511        # Authentication setting
3512        auth_settings = []
3513
3514        return self.api_client.call_api(resource_path, 'PUT',
3515                                        path_params,
3516                                        query_params,
3517                                        header_params,
3518                                        body=body_params,
3519                                        post_params=form_params,
3520                                        files=local_var_files,
3521                                        response_type='UserInformationList',
3522                                        auth_settings=auth_settings,
3523                                        callback=params.get('callback'),
3524                                        _return_http_data_only=params.get('_return_http_data_only'),
3525                                        _preload_content=params.get('_preload_content', True),
3526                                        _request_timeout=params.get('_request_timeout'),
3527                                        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

UsersApi(api_client=None)
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
def create(self, account_id, **kwargs)
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.

def create_with_http_info(self, account_id, **kwargs)
 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.

def create_signatures(self, account_id, user_id, **kwargs)
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.

def create_signatures_with_http_info(self, account_id, user_id, **kwargs)
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.

def delete(self, account_id, **kwargs)
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.

def delete_with_http_info(self, account_id, **kwargs)
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.

def delete_contact_with_id(self, account_id, contact_id, **kwargs)
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.

def delete_contact_with_id_with_http_info(self, account_id, contact_id, **kwargs)
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.

def delete_contacts(self, account_id, **kwargs)
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.

def delete_contacts_with_http_info(self, account_id, **kwargs)
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.

def delete_custom_settings(self, account_id, user_id, **kwargs)
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.

def delete_custom_settings_with_http_info(self, account_id, user_id, **kwargs)
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.

def delete_profile_image(self, account_id, user_id, **kwargs)
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.

def delete_profile_image_with_http_info(self, account_id, user_id, **kwargs)
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.

def delete_signature(self, account_id, signature_id, user_id, **kwargs)
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.

def delete_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs)
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.

def delete_signature_image(self, account_id, image_type, signature_id, user_id, **kwargs)
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.

def delete_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, **kwargs)
 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.

def get_contact_by_id(self, account_id, contact_id, **kwargs)
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.

def get_contact_by_id_with_http_info(self, account_id, contact_id, **kwargs)
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.

def get_information(self, account_id, user_id, **kwargs)
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        :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

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:
Returns

UserInformation If the method is called asynchronously, returns the request thread.

def get_information_with_http_info(self, account_id, user_id, **kwargs)
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        :return: UserInformation
1220                 If the method is called asynchronously,
1221                 returns the request thread.
1222        """
1223
1224        all_params = ['account_id', 'user_id', 'additional_info', 'email']
1225        all_params.append('callback')
1226        all_params.append('_return_http_data_only')
1227        all_params.append('_preload_content')
1228        all_params.append('_request_timeout')
1229
1230        params = locals()
1231        for key, val in iteritems(params['kwargs']):
1232            if key not in all_params:
1233                raise TypeError(
1234                    "Got an unexpected keyword argument '%s'"
1235                    " to method get_information" % key
1236                )
1237            params[key] = val
1238        del params['kwargs']
1239        # verify the required parameter 'account_id' is set
1240        if ('account_id' not in params) or (params['account_id'] is None):
1241            raise ValueError("Missing the required parameter `account_id` when calling `get_information`")
1242        # verify the required parameter 'user_id' is set
1243        if ('user_id' not in params) or (params['user_id'] is None):
1244            raise ValueError("Missing the required parameter `user_id` when calling `get_information`")
1245
1246
1247        collection_formats = {}
1248
1249        resource_path = '/v2.1/accounts/{accountId}/users/{userId}'.replace('{format}', 'json')
1250        path_params = {}
1251        if 'account_id' in params:
1252            path_params['accountId'] = params['account_id']
1253        if 'user_id' in params:
1254            path_params['userId'] = params['user_id']
1255
1256        query_params = {}
1257        if 'additional_info' in params:
1258            query_params['additional_info'] = params['additional_info']
1259        if 'email' in params:
1260            query_params['email'] = params['email']
1261
1262        header_params = {}
1263
1264        form_params = []
1265        local_var_files = {}
1266
1267        body_params = None
1268        # HTTP header `Accept`
1269        header_params['Accept'] = self.api_client.\
1270            select_header_accept(['application/json'])
1271
1272        # Authentication setting
1273        auth_settings = []
1274
1275        return self.api_client.call_api(resource_path, 'GET',
1276                                        path_params,
1277                                        query_params,
1278                                        header_params,
1279                                        body=body_params,
1280                                        post_params=form_params,
1281                                        files=local_var_files,
1282                                        response_type='UserInformation',
1283                                        auth_settings=auth_settings,
1284                                        callback=params.get('callback'),
1285                                        _return_http_data_only=params.get('_return_http_data_only'),
1286                                        _preload_content=params.get('_preload_content', True),
1287                                        _request_timeout=params.get('_request_timeout'),
1288                                        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:
Returns

UserInformation If the method is called asynchronously, returns the request thread.

def get_profile(self, account_id, user_id, **kwargs)
1290    def get_profile(self, account_id, user_id, **kwargs):
1291        """
1292        Retrieves the user profile for a specified user.
1293        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.
1294        This method makes a synchronous HTTP request by default. To make an
1295        asynchronous HTTP request, please define a `callback` function
1296        to be invoked when receiving the response.
1297        >>> def callback_function(response):
1298        >>>     pprint(response)
1299        >>>
1300        >>> thread = api.get_profile(account_id, user_id, callback=callback_function)
1301
1302        :param callback function: The callback function
1303            for asynchronous request. (optional)
1304        :param str account_id: The external account number (int) or account ID Guid. (required)
1305        :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)
1306        :return: UserProfile
1307                 If the method is called asynchronously,
1308                 returns the request thread.
1309        """
1310        kwargs['_return_http_data_only'] = True
1311        if kwargs.get('callback'):
1312            return self.get_profile_with_http_info(account_id, user_id, **kwargs)
1313        else:
1314            (data) = self.get_profile_with_http_info(account_id, user_id, **kwargs)
1315            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.

def get_profile_with_http_info(self, account_id, user_id, **kwargs)
1317    def get_profile_with_http_info(self, account_id, user_id, **kwargs):
1318        """
1319        Retrieves the user profile for a specified user.
1320        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.
1321        This method makes a synchronous HTTP request by default. To make an
1322        asynchronous HTTP request, please define a `callback` function
1323        to be invoked when receiving the response.
1324        >>> def callback_function(response):
1325        >>>     pprint(response)
1326        >>>
1327        >>> thread = api.get_profile_with_http_info(account_id, user_id, callback=callback_function)
1328
1329        :param callback function: The callback function
1330            for asynchronous request. (optional)
1331        :param str account_id: The external account number (int) or account ID Guid. (required)
1332        :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)
1333        :return: UserProfile
1334                 If the method is called asynchronously,
1335                 returns the request thread.
1336        """
1337
1338        all_params = ['account_id', 'user_id']
1339        all_params.append('callback')
1340        all_params.append('_return_http_data_only')
1341        all_params.append('_preload_content')
1342        all_params.append('_request_timeout')
1343
1344        params = locals()
1345        for key, val in iteritems(params['kwargs']):
1346            if key not in all_params:
1347                raise TypeError(
1348                    "Got an unexpected keyword argument '%s'"
1349                    " to method get_profile" % key
1350                )
1351            params[key] = val
1352        del params['kwargs']
1353        # verify the required parameter 'account_id' is set
1354        if ('account_id' not in params) or (params['account_id'] is None):
1355            raise ValueError("Missing the required parameter `account_id` when calling `get_profile`")
1356        # verify the required parameter 'user_id' is set
1357        if ('user_id' not in params) or (params['user_id'] is None):
1358            raise ValueError("Missing the required parameter `user_id` when calling `get_profile`")
1359
1360
1361        collection_formats = {}
1362
1363        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile'.replace('{format}', 'json')
1364        path_params = {}
1365        if 'account_id' in params:
1366            path_params['accountId'] = params['account_id']
1367        if 'user_id' in params:
1368            path_params['userId'] = params['user_id']
1369
1370        query_params = {}
1371
1372        header_params = {}
1373
1374        form_params = []
1375        local_var_files = {}
1376
1377        body_params = None
1378        # HTTP header `Accept`
1379        header_params['Accept'] = self.api_client.\
1380            select_header_accept(['application/json'])
1381
1382        # Authentication setting
1383        auth_settings = []
1384
1385        return self.api_client.call_api(resource_path, 'GET',
1386                                        path_params,
1387                                        query_params,
1388                                        header_params,
1389                                        body=body_params,
1390                                        post_params=form_params,
1391                                        files=local_var_files,
1392                                        response_type='UserProfile',
1393                                        auth_settings=auth_settings,
1394                                        callback=params.get('callback'),
1395                                        _return_http_data_only=params.get('_return_http_data_only'),
1396                                        _preload_content=params.get('_preload_content', True),
1397                                        _request_timeout=params.get('_request_timeout'),
1398                                        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.

def get_profile_image(self, account_id, user_id, **kwargs)
1400    def get_profile_image(self, account_id, user_id, **kwargs):
1401        """
1402        Retrieves the user profile image for the specified user.
1403        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.
1404        This method makes a synchronous HTTP request by default. To make an
1405        asynchronous HTTP request, please define a `callback` function
1406        to be invoked when receiving the response.
1407        >>> def callback_function(response):
1408        >>>     pprint(response)
1409        >>>
1410        >>> thread = api.get_profile_image(account_id, user_id, callback=callback_function)
1411
1412        :param callback function: The callback function
1413            for asynchronous request. (optional)
1414        :param str account_id: The external account number (int) or account ID Guid. (required)
1415        :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)
1416        :param str encoding:
1417        :return: file
1418                 If the method is called asynchronously,
1419                 returns the request thread.
1420        """
1421        kwargs['_return_http_data_only'] = True
1422        if kwargs.get('callback'):
1423            return self.get_profile_image_with_http_info(account_id, user_id, **kwargs)
1424        else:
1425            (data) = self.get_profile_image_with_http_info(account_id, user_id, **kwargs)
1426            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.

def get_profile_image_with_http_info(self, account_id, user_id, **kwargs)
1428    def get_profile_image_with_http_info(self, account_id, user_id, **kwargs):
1429        """
1430        Retrieves the user profile image for the specified user.
1431        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.
1432        This method makes a synchronous HTTP request by default. To make an
1433        asynchronous HTTP request, please define a `callback` function
1434        to be invoked when receiving the response.
1435        >>> def callback_function(response):
1436        >>>     pprint(response)
1437        >>>
1438        >>> thread = api.get_profile_image_with_http_info(account_id, user_id, callback=callback_function)
1439
1440        :param callback function: The callback function
1441            for asynchronous request. (optional)
1442        :param str account_id: The external account number (int) or account ID Guid. (required)
1443        :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)
1444        :param str encoding:
1445        :return: file
1446                 If the method is called asynchronously,
1447                 returns the request thread.
1448        """
1449
1450        all_params = ['account_id', 'user_id', 'encoding']
1451        all_params.append('callback')
1452        all_params.append('_return_http_data_only')
1453        all_params.append('_preload_content')
1454        all_params.append('_request_timeout')
1455
1456        params = locals()
1457        for key, val in iteritems(params['kwargs']):
1458            if key not in all_params:
1459                raise TypeError(
1460                    "Got an unexpected keyword argument '%s'"
1461                    " to method get_profile_image" % key
1462                )
1463            params[key] = val
1464        del params['kwargs']
1465        # verify the required parameter 'account_id' is set
1466        if ('account_id' not in params) or (params['account_id'] is None):
1467            raise ValueError("Missing the required parameter `account_id` when calling `get_profile_image`")
1468        # verify the required parameter 'user_id' is set
1469        if ('user_id' not in params) or (params['user_id'] is None):
1470            raise ValueError("Missing the required parameter `user_id` when calling `get_profile_image`")
1471
1472
1473        collection_formats = {}
1474
1475        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json')
1476        path_params = {}
1477        if 'account_id' in params:
1478            path_params['accountId'] = params['account_id']
1479        if 'user_id' in params:
1480            path_params['userId'] = params['user_id']
1481
1482        query_params = {}
1483        if 'encoding' in params:
1484            query_params['encoding'] = params['encoding']
1485
1486        header_params = {}
1487
1488        form_params = []
1489        local_var_files = {}
1490
1491        body_params = None
1492        # HTTP header `Accept`
1493        header_params['Accept'] = self.api_client.\
1494            select_header_accept(['image/gif'])
1495
1496        # Authentication setting
1497        auth_settings = []
1498
1499        return self.api_client.call_api(resource_path, 'GET',
1500                                        path_params,
1501                                        query_params,
1502                                        header_params,
1503                                        body=body_params,
1504                                        post_params=form_params,
1505                                        files=local_var_files,
1506                                        response_type='file',
1507                                        auth_settings=auth_settings,
1508                                        callback=params.get('callback'),
1509                                        _return_http_data_only=params.get('_return_http_data_only'),
1510                                        _preload_content=params.get('_preload_content', True),
1511                                        _request_timeout=params.get('_request_timeout'),
1512                                        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.

def get_settings(self, account_id, user_id, **kwargs)
1514    def get_settings(self, account_id, user_id, **kwargs):
1515        """
1516        Gets the user account settings for a specified user.
1517        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].
1518        This method makes a synchronous HTTP request by default. To make an
1519        asynchronous HTTP request, please define a `callback` function
1520        to be invoked when receiving the response.
1521        >>> def callback_function(response):
1522        >>>     pprint(response)
1523        >>>
1524        >>> thread = api.get_settings(account_id, user_id, callback=callback_function)
1525
1526        :param callback function: The callback function
1527            for asynchronous request. (optional)
1528        :param str account_id: The external account number (int) or account ID Guid. (required)
1529        :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)
1530        :return: UserSettingsInformation
1531                 If the method is called asynchronously,
1532                 returns the request thread.
1533        """
1534        kwargs['_return_http_data_only'] = True
1535        if kwargs.get('callback'):
1536            return self.get_settings_with_http_info(account_id, user_id, **kwargs)
1537        else:
1538            (data) = self.get_settings_with_http_info(account_id, user_id, **kwargs)
1539            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.

def get_settings_with_http_info(self, account_id, user_id, **kwargs)
1541    def get_settings_with_http_info(self, account_id, user_id, **kwargs):
1542        """
1543        Gets the user account settings for a specified user.
1544        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].
1545        This method makes a synchronous HTTP request by default. To make an
1546        asynchronous HTTP request, please define a `callback` function
1547        to be invoked when receiving the response.
1548        >>> def callback_function(response):
1549        >>>     pprint(response)
1550        >>>
1551        >>> thread = api.get_settings_with_http_info(account_id, user_id, callback=callback_function)
1552
1553        :param callback function: The callback function
1554            for asynchronous request. (optional)
1555        :param str account_id: The external account number (int) or account ID Guid. (required)
1556        :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)
1557        :return: UserSettingsInformation
1558                 If the method is called asynchronously,
1559                 returns the request thread.
1560        """
1561
1562        all_params = ['account_id', 'user_id']
1563        all_params.append('callback')
1564        all_params.append('_return_http_data_only')
1565        all_params.append('_preload_content')
1566        all_params.append('_request_timeout')
1567
1568        params = locals()
1569        for key, val in iteritems(params['kwargs']):
1570            if key not in all_params:
1571                raise TypeError(
1572                    "Got an unexpected keyword argument '%s'"
1573                    " to method get_settings" % key
1574                )
1575            params[key] = val
1576        del params['kwargs']
1577        # verify the required parameter 'account_id' is set
1578        if ('account_id' not in params) or (params['account_id'] is None):
1579            raise ValueError("Missing the required parameter `account_id` when calling `get_settings`")
1580        # verify the required parameter 'user_id' is set
1581        if ('user_id' not in params) or (params['user_id'] is None):
1582            raise ValueError("Missing the required parameter `user_id` when calling `get_settings`")
1583
1584
1585        collection_formats = {}
1586
1587        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/settings'.replace('{format}', 'json')
1588        path_params = {}
1589        if 'account_id' in params:
1590            path_params['accountId'] = params['account_id']
1591        if 'user_id' in params:
1592            path_params['userId'] = params['user_id']
1593
1594        query_params = {}
1595
1596        header_params = {}
1597
1598        form_params = []
1599        local_var_files = {}
1600
1601        body_params = None
1602        # HTTP header `Accept`
1603        header_params['Accept'] = self.api_client.\
1604            select_header_accept(['application/json'])
1605
1606        # Authentication setting
1607        auth_settings = []
1608
1609        return self.api_client.call_api(resource_path, 'GET',
1610                                        path_params,
1611                                        query_params,
1612                                        header_params,
1613                                        body=body_params,
1614                                        post_params=form_params,
1615                                        files=local_var_files,
1616                                        response_type='UserSettingsInformation',
1617                                        auth_settings=auth_settings,
1618                                        callback=params.get('callback'),
1619                                        _return_http_data_only=params.get('_return_http_data_only'),
1620                                        _preload_content=params.get('_preload_content', True),
1621                                        _request_timeout=params.get('_request_timeout'),
1622                                        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.

def get_signature(self, account_id, signature_id, user_id, **kwargs)
1624    def get_signature(self, account_id, signature_id, user_id, **kwargs):
1625        """
1626        Gets the user signature information for the specified user.
1627        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\".
1628        This method makes a synchronous HTTP request by default. To make an
1629        asynchronous HTTP request, please define a `callback` function
1630        to be invoked when receiving the response.
1631        >>> def callback_function(response):
1632        >>>     pprint(response)
1633        >>>
1634        >>> thread = api.get_signature(account_id, signature_id, user_id, callback=callback_function)
1635
1636        :param callback function: The callback function
1637            for asynchronous request. (optional)
1638        :param str account_id: The external account number (int) or account ID Guid. (required)
1639        :param str signature_id: The ID of the signature being accessed. (required)
1640        :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)
1641        :return: UserSignature
1642                 If the method is called asynchronously,
1643                 returns the request thread.
1644        """
1645        kwargs['_return_http_data_only'] = True
1646        if kwargs.get('callback'):
1647            return self.get_signature_with_http_info(account_id, signature_id, user_id, **kwargs)
1648        else:
1649            (data) = self.get_signature_with_http_info(account_id, signature_id, user_id, **kwargs)
1650            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.

def get_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs)
1652    def get_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs):
1653        """
1654        Gets the user signature information for the specified user.
1655        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\".
1656        This method makes a synchronous HTTP request by default. To make an
1657        asynchronous HTTP request, please define a `callback` function
1658        to be invoked when receiving the response.
1659        >>> def callback_function(response):
1660        >>>     pprint(response)
1661        >>>
1662        >>> thread = api.get_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function)
1663
1664        :param callback function: The callback function
1665            for asynchronous request. (optional)
1666        :param str account_id: The external account number (int) or account ID Guid. (required)
1667        :param str signature_id: The ID of the signature being accessed. (required)
1668        :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)
1669        :return: UserSignature
1670                 If the method is called asynchronously,
1671                 returns the request thread.
1672        """
1673
1674        all_params = ['account_id', 'signature_id', 'user_id']
1675        all_params.append('callback')
1676        all_params.append('_return_http_data_only')
1677        all_params.append('_preload_content')
1678        all_params.append('_request_timeout')
1679
1680        params = locals()
1681        for key, val in iteritems(params['kwargs']):
1682            if key not in all_params:
1683                raise TypeError(
1684                    "Got an unexpected keyword argument '%s'"
1685                    " to method get_signature" % key
1686                )
1687            params[key] = val
1688        del params['kwargs']
1689        # verify the required parameter 'account_id' is set
1690        if ('account_id' not in params) or (params['account_id'] is None):
1691            raise ValueError("Missing the required parameter `account_id` when calling `get_signature`")
1692        # verify the required parameter 'signature_id' is set
1693        if ('signature_id' not in params) or (params['signature_id'] is None):
1694            raise ValueError("Missing the required parameter `signature_id` when calling `get_signature`")
1695        # verify the required parameter 'user_id' is set
1696        if ('user_id' not in params) or (params['user_id'] is None):
1697            raise ValueError("Missing the required parameter `user_id` when calling `get_signature`")
1698
1699
1700        collection_formats = {}
1701
1702        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json')
1703        path_params = {}
1704        if 'account_id' in params:
1705            path_params['accountId'] = params['account_id']
1706        if 'signature_id' in params:
1707            path_params['signatureId'] = params['signature_id']
1708        if 'user_id' in params:
1709            path_params['userId'] = params['user_id']
1710
1711        query_params = {}
1712
1713        header_params = {}
1714
1715        form_params = []
1716        local_var_files = {}
1717
1718        body_params = None
1719        # HTTP header `Accept`
1720        header_params['Accept'] = self.api_client.\
1721            select_header_accept(['application/json'])
1722
1723        # Authentication setting
1724        auth_settings = []
1725
1726        return self.api_client.call_api(resource_path, 'GET',
1727                                        path_params,
1728                                        query_params,
1729                                        header_params,
1730                                        body=body_params,
1731                                        post_params=form_params,
1732                                        files=local_var_files,
1733                                        response_type='UserSignature',
1734                                        auth_settings=auth_settings,
1735                                        callback=params.get('callback'),
1736                                        _return_http_data_only=params.get('_return_http_data_only'),
1737                                        _preload_content=params.get('_preload_content', True),
1738                                        _request_timeout=params.get('_request_timeout'),
1739                                        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.

def get_signature_image(self, account_id, image_type, signature_id, user_id, **kwargs)
1741    def get_signature_image(self, account_id, image_type, signature_id, user_id, **kwargs):
1742        """
1743        Retrieves the user initials image or the  user signature image for the specified user.
1744        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.
1745        This method makes a synchronous HTTP request by default. To make an
1746        asynchronous HTTP request, please define a `callback` function
1747        to be invoked when receiving the response.
1748        >>> def callback_function(response):
1749        >>>     pprint(response)
1750        >>>
1751        >>> thread = api.get_signature_image(account_id, image_type, signature_id, user_id, callback=callback_function)
1752
1753        :param callback function: The callback function
1754            for asynchronous request. (optional)
1755        :param str account_id: The external account number (int) or account ID Guid. (required)
1756        :param str image_type: One of **signature_image** or **initials_image**. (required)
1757        :param str signature_id: The ID of the signature being accessed. (required)
1758        :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)
1759        :param str include_chrome:
1760        :return: file
1761                 If the method is called asynchronously,
1762                 returns the request thread.
1763        """
1764        kwargs['_return_http_data_only'] = True
1765        if kwargs.get('callback'):
1766            return self.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs)
1767        else:
1768            (data) = self.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, **kwargs)
1769            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.

def get_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, **kwargs)
1771    def get_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, **kwargs):
1772        """
1773        Retrieves the user initials image or the  user signature image for the specified user.
1774        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.
1775        This method makes a synchronous HTTP request by default. To make an
1776        asynchronous HTTP request, please define a `callback` function
1777        to be invoked when receiving the response.
1778        >>> def callback_function(response):
1779        >>>     pprint(response)
1780        >>>
1781        >>> thread = api.get_signature_image_with_http_info(account_id, image_type, signature_id, user_id, callback=callback_function)
1782
1783        :param callback function: The callback function
1784            for asynchronous request. (optional)
1785        :param str account_id: The external account number (int) or account ID Guid. (required)
1786        :param str image_type: One of **signature_image** or **initials_image**. (required)
1787        :param str signature_id: The ID of the signature being accessed. (required)
1788        :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)
1789        :param str include_chrome:
1790        :return: file
1791                 If the method is called asynchronously,
1792                 returns the request thread.
1793        """
1794
1795        all_params = ['account_id', 'image_type', 'signature_id', 'user_id', 'include_chrome']
1796        all_params.append('callback')
1797        all_params.append('_return_http_data_only')
1798        all_params.append('_preload_content')
1799        all_params.append('_request_timeout')
1800
1801        params = locals()
1802        for key, val in iteritems(params['kwargs']):
1803            if key not in all_params:
1804                raise TypeError(
1805                    "Got an unexpected keyword argument '%s'"
1806                    " to method get_signature_image" % key
1807                )
1808            params[key] = val
1809        del params['kwargs']
1810        # verify the required parameter 'account_id' is set
1811        if ('account_id' not in params) or (params['account_id'] is None):
1812            raise ValueError("Missing the required parameter `account_id` when calling `get_signature_image`")
1813        # verify the required parameter 'image_type' is set
1814        if ('image_type' not in params) or (params['image_type'] is None):
1815            raise ValueError("Missing the required parameter `image_type` when calling `get_signature_image`")
1816        # verify the required parameter 'signature_id' is set
1817        if ('signature_id' not in params) or (params['signature_id'] is None):
1818            raise ValueError("Missing the required parameter `signature_id` when calling `get_signature_image`")
1819        # verify the required parameter 'user_id' is set
1820        if ('user_id' not in params) or (params['user_id'] is None):
1821            raise ValueError("Missing the required parameter `user_id` when calling `get_signature_image`")
1822
1823
1824        collection_formats = {}
1825
1826        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json')
1827        path_params = {}
1828        if 'account_id' in params:
1829            path_params['accountId'] = params['account_id']
1830        if 'image_type' in params:
1831            path_params['imageType'] = params['image_type']
1832        if 'signature_id' in params:
1833            path_params['signatureId'] = params['signature_id']
1834        if 'user_id' in params:
1835            path_params['userId'] = params['user_id']
1836
1837        query_params = {}
1838        if 'include_chrome' in params:
1839            query_params['include_chrome'] = params['include_chrome']
1840
1841        header_params = {}
1842
1843        form_params = []
1844        local_var_files = {}
1845
1846        body_params = None
1847        # HTTP header `Accept`
1848        header_params['Accept'] = self.api_client.\
1849            select_header_accept(['image/gif'])
1850
1851        # Authentication setting
1852        auth_settings = []
1853
1854        return self.api_client.call_api(resource_path, 'GET',
1855                                        path_params,
1856                                        query_params,
1857                                        header_params,
1858                                        body=body_params,
1859                                        post_params=form_params,
1860                                        files=local_var_files,
1861                                        response_type='file',
1862                                        auth_settings=auth_settings,
1863                                        callback=params.get('callback'),
1864                                        _return_http_data_only=params.get('_return_http_data_only'),
1865                                        _preload_content=params.get('_preload_content', True),
1866                                        _request_timeout=params.get('_request_timeout'),
1867                                        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.

def list(self, account_id, **kwargs)
1869    def list(self, account_id, **kwargs):
1870        """
1871        Retrieves the list of users for the specified account.
1872        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
1873        This method makes a synchronous HTTP request by default. To make an
1874        asynchronous HTTP request, please define a `callback` function
1875        to be invoked when receiving the response.
1876        >>> def callback_function(response):
1877        >>>     pprint(response)
1878        >>>
1879        >>> thread = api.list(account_id, callback=callback_function)
1880
1881        :param callback function: The callback function
1882            for asynchronous request. (optional)
1883        :param str account_id: The external account number (int) or account ID Guid. (required)
1884        :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account.
1885        :param str alternate_admins_only:
1886        :param str count: Number of records to return. The number must be greater than 0 and less than or equal to 100. 
1887        :param str domain_users_only:
1888        :param str email:
1889        :param str email_substring: Filters the returned user records by the email address or a sub-string of email address.
1890        :param str group_id: Filters user records returned by one or more group Id's.
1891        :param str include_usersettings_for_csv:
1892        :param str login_status:
1893        :param str not_group_id:
1894        :param str start_position: Starting value for the list. 
1895        :param str status:
1896        :param str user_name_substring: Filters the user records returned by the user name or a sub-string of user name.
1897        :return: UserInformationList
1898                 If the method is called asynchronously,
1899                 returns the request thread.
1900        """
1901        kwargs['_return_http_data_only'] = True
1902        if kwargs.get('callback'):
1903            return self.list_with_http_info(account_id, **kwargs)
1904        else:
1905            (data) = self.list_with_http_info(account_id, **kwargs)
1906            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_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.

def list_with_http_info(self, account_id, **kwargs)
1908    def list_with_http_info(self, account_id, **kwargs):
1909        """
1910        Retrieves the list of users for the specified account.
1911        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
1912        This method makes a synchronous HTTP request by default. To make an
1913        asynchronous HTTP request, please define a `callback` function
1914        to be invoked when receiving the response.
1915        >>> def callback_function(response):
1916        >>>     pprint(response)
1917        >>>
1918        >>> thread = api.list_with_http_info(account_id, callback=callback_function)
1919
1920        :param callback function: The callback function
1921            for asynchronous request. (optional)
1922        :param str account_id: The external account number (int) or account ID Guid. (required)
1923        :param str additional_info: When set to **true**, the full list of user information is returned for each user in the account.
1924        :param str alternate_admins_only:
1925        :param str count: Number of records to return. The number must be greater than 0 and less than or equal to 100. 
1926        :param str domain_users_only:
1927        :param str email:
1928        :param str email_substring: Filters the returned user records by the email address or a sub-string of email address.
1929        :param str group_id: Filters user records returned by one or more group Id's.
1930        :param str include_usersettings_for_csv:
1931        :param str login_status:
1932        :param str not_group_id:
1933        :param str start_position: Starting value for the list. 
1934        :param str status:
1935        :param str user_name_substring: Filters the user records returned by the user name or a sub-string of user name.
1936        :return: UserInformationList
1937                 If the method is called asynchronously,
1938                 returns the request thread.
1939        """
1940
1941        all_params = ['account_id', 'additional_info', 'alternate_admins_only', 'count', 'domain_users_only', 'email', 'email_substring', 'group_id', 'include_usersettings_for_csv', 'login_status', 'not_group_id', 'start_position', 'status', 'user_name_substring']
1942        all_params.append('callback')
1943        all_params.append('_return_http_data_only')
1944        all_params.append('_preload_content')
1945        all_params.append('_request_timeout')
1946
1947        params = locals()
1948        for key, val in iteritems(params['kwargs']):
1949            if key not in all_params:
1950                raise TypeError(
1951                    "Got an unexpected keyword argument '%s'"
1952                    " to method list" % key
1953                )
1954            params[key] = val
1955        del params['kwargs']
1956        # verify the required parameter 'account_id' is set
1957        if ('account_id' not in params) or (params['account_id'] is None):
1958            raise ValueError("Missing the required parameter `account_id` when calling `list`")
1959
1960
1961        collection_formats = {}
1962
1963        resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json')
1964        path_params = {}
1965        if 'account_id' in params:
1966            path_params['accountId'] = params['account_id']
1967
1968        query_params = {}
1969        if 'additional_info' in params:
1970            query_params['additional_info'] = params['additional_info']
1971        if 'alternate_admins_only' in params:
1972            query_params['alternate_admins_only'] = params['alternate_admins_only']
1973        if 'count' in params:
1974            query_params['count'] = params['count']
1975        if 'domain_users_only' in params:
1976            query_params['domain_users_only'] = params['domain_users_only']
1977        if 'email' in params:
1978            query_params['email'] = params['email']
1979        if 'email_substring' in params:
1980            query_params['email_substring'] = params['email_substring']
1981        if 'group_id' in params:
1982            query_params['group_id'] = params['group_id']
1983        if 'include_usersettings_for_csv' in params:
1984            query_params['include_usersettings_for_csv'] = params['include_usersettings_for_csv']
1985        if 'login_status' in params:
1986            query_params['login_status'] = params['login_status']
1987        if 'not_group_id' in params:
1988            query_params['not_group_id'] = params['not_group_id']
1989        if 'start_position' in params:
1990            query_params['start_position'] = params['start_position']
1991        if 'status' in params:
1992            query_params['status'] = params['status']
1993        if 'user_name_substring' in params:
1994            query_params['user_name_substring'] = params['user_name_substring']
1995
1996        header_params = {}
1997
1998        form_params = []
1999        local_var_files = {}
2000
2001        body_params = None
2002        # HTTP header `Accept`
2003        header_params['Accept'] = self.api_client.\
2004            select_header_accept(['application/json'])
2005
2006        # Authentication setting
2007        auth_settings = []
2008
2009        return self.api_client.call_api(resource_path, 'GET',
2010                                        path_params,
2011                                        query_params,
2012                                        header_params,
2013                                        body=body_params,
2014                                        post_params=form_params,
2015                                        files=local_var_files,
2016                                        response_type='UserInformationList',
2017                                        auth_settings=auth_settings,
2018                                        callback=params.get('callback'),
2019                                        _return_http_data_only=params.get('_return_http_data_only'),
2020                                        _preload_content=params.get('_preload_content', True),
2021                                        _request_timeout=params.get('_request_timeout'),
2022                                        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_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.

def list_custom_settings(self, account_id, user_id, **kwargs)
2024    def list_custom_settings(self, account_id, user_id, **kwargs):
2025        """
2026        Retrieves the custom user settings for a specified user.
2027        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.
2028        This method makes a synchronous HTTP request by default. To make an
2029        asynchronous HTTP request, please define a `callback` function
2030        to be invoked when receiving the response.
2031        >>> def callback_function(response):
2032        >>>     pprint(response)
2033        >>>
2034        >>> thread = api.list_custom_settings(account_id, user_id, callback=callback_function)
2035
2036        :param callback function: The callback function
2037            for asynchronous request. (optional)
2038        :param str account_id: The external account number (int) or account ID Guid. (required)
2039        :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)
2040        :return: CustomSettingsInformation
2041                 If the method is called asynchronously,
2042                 returns the request thread.
2043        """
2044        kwargs['_return_http_data_only'] = True
2045        if kwargs.get('callback'):
2046            return self.list_custom_settings_with_http_info(account_id, user_id, **kwargs)
2047        else:
2048            (data) = self.list_custom_settings_with_http_info(account_id, user_id, **kwargs)
2049            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.

def list_custom_settings_with_http_info(self, account_id, user_id, **kwargs)
2051    def list_custom_settings_with_http_info(self, account_id, user_id, **kwargs):
2052        """
2053        Retrieves the custom user settings for a specified user.
2054        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.
2055        This method makes a synchronous HTTP request by default. To make an
2056        asynchronous HTTP request, please define a `callback` function
2057        to be invoked when receiving the response.
2058        >>> def callback_function(response):
2059        >>>     pprint(response)
2060        >>>
2061        >>> thread = api.list_custom_settings_with_http_info(account_id, user_id, callback=callback_function)
2062
2063        :param callback function: The callback function
2064            for asynchronous request. (optional)
2065        :param str account_id: The external account number (int) or account ID Guid. (required)
2066        :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)
2067        :return: CustomSettingsInformation
2068                 If the method is called asynchronously,
2069                 returns the request thread.
2070        """
2071
2072        all_params = ['account_id', 'user_id']
2073        all_params.append('callback')
2074        all_params.append('_return_http_data_only')
2075        all_params.append('_preload_content')
2076        all_params.append('_request_timeout')
2077
2078        params = locals()
2079        for key, val in iteritems(params['kwargs']):
2080            if key not in all_params:
2081                raise TypeError(
2082                    "Got an unexpected keyword argument '%s'"
2083                    " to method list_custom_settings" % key
2084                )
2085            params[key] = val
2086        del params['kwargs']
2087        # verify the required parameter 'account_id' is set
2088        if ('account_id' not in params) or (params['account_id'] is None):
2089            raise ValueError("Missing the required parameter `account_id` when calling `list_custom_settings`")
2090        # verify the required parameter 'user_id' is set
2091        if ('user_id' not in params) or (params['user_id'] is None):
2092            raise ValueError("Missing the required parameter `user_id` when calling `list_custom_settings`")
2093
2094
2095        collection_formats = {}
2096
2097        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json')
2098        path_params = {}
2099        if 'account_id' in params:
2100            path_params['accountId'] = params['account_id']
2101        if 'user_id' in params:
2102            path_params['userId'] = params['user_id']
2103
2104        query_params = {}
2105
2106        header_params = {}
2107
2108        form_params = []
2109        local_var_files = {}
2110
2111        body_params = None
2112        # HTTP header `Accept`
2113        header_params['Accept'] = self.api_client.\
2114            select_header_accept(['application/json'])
2115
2116        # Authentication setting
2117        auth_settings = []
2118
2119        return self.api_client.call_api(resource_path, 'GET',
2120                                        path_params,
2121                                        query_params,
2122                                        header_params,
2123                                        body=body_params,
2124                                        post_params=form_params,
2125                                        files=local_var_files,
2126                                        response_type='CustomSettingsInformation',
2127                                        auth_settings=auth_settings,
2128                                        callback=params.get('callback'),
2129                                        _return_http_data_only=params.get('_return_http_data_only'),
2130                                        _preload_content=params.get('_preload_content', True),
2131                                        _request_timeout=params.get('_request_timeout'),
2132                                        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.

def list_signatures(self, account_id, user_id, **kwargs)
2134    def list_signatures(self, account_id, user_id, **kwargs):
2135        """
2136        Retrieves a list of user signature definitions for a specified user.
2137        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\".
2138        This method makes a synchronous HTTP request by default. To make an
2139        asynchronous HTTP request, please define a `callback` function
2140        to be invoked when receiving the response.
2141        >>> def callback_function(response):
2142        >>>     pprint(response)
2143        >>>
2144        >>> thread = api.list_signatures(account_id, user_id, callback=callback_function)
2145
2146        :param callback function: The callback function
2147            for asynchronous request. (optional)
2148        :param str account_id: The external account number (int) or account ID Guid. (required)
2149        :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)
2150        :param str stamp_type:
2151        :return: UserSignaturesInformation
2152                 If the method is called asynchronously,
2153                 returns the request thread.
2154        """
2155        kwargs['_return_http_data_only'] = True
2156        if kwargs.get('callback'):
2157            return self.list_signatures_with_http_info(account_id, user_id, **kwargs)
2158        else:
2159            (data) = self.list_signatures_with_http_info(account_id, user_id, **kwargs)
2160            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.

def list_signatures_with_http_info(self, account_id, user_id, **kwargs)
2162    def list_signatures_with_http_info(self, account_id, user_id, **kwargs):
2163        """
2164        Retrieves a list of user signature definitions for a specified user.
2165        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\".
2166        This method makes a synchronous HTTP request by default. To make an
2167        asynchronous HTTP request, please define a `callback` function
2168        to be invoked when receiving the response.
2169        >>> def callback_function(response):
2170        >>>     pprint(response)
2171        >>>
2172        >>> thread = api.list_signatures_with_http_info(account_id, user_id, callback=callback_function)
2173
2174        :param callback function: The callback function
2175            for asynchronous request. (optional)
2176        :param str account_id: The external account number (int) or account ID Guid. (required)
2177        :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)
2178        :param str stamp_type:
2179        :return: UserSignaturesInformation
2180                 If the method is called asynchronously,
2181                 returns the request thread.
2182        """
2183
2184        all_params = ['account_id', 'user_id', 'stamp_type']
2185        all_params.append('callback')
2186        all_params.append('_return_http_data_only')
2187        all_params.append('_preload_content')
2188        all_params.append('_request_timeout')
2189
2190        params = locals()
2191        for key, val in iteritems(params['kwargs']):
2192            if key not in all_params:
2193                raise TypeError(
2194                    "Got an unexpected keyword argument '%s'"
2195                    " to method list_signatures" % key
2196                )
2197            params[key] = val
2198        del params['kwargs']
2199        # verify the required parameter 'account_id' is set
2200        if ('account_id' not in params) or (params['account_id'] is None):
2201            raise ValueError("Missing the required parameter `account_id` when calling `list_signatures`")
2202        # verify the required parameter 'user_id' is set
2203        if ('user_id' not in params) or (params['user_id'] is None):
2204            raise ValueError("Missing the required parameter `user_id` when calling `list_signatures`")
2205
2206
2207        collection_formats = {}
2208
2209        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json')
2210        path_params = {}
2211        if 'account_id' in params:
2212            path_params['accountId'] = params['account_id']
2213        if 'user_id' in params:
2214            path_params['userId'] = params['user_id']
2215
2216        query_params = {}
2217        if 'stamp_type' in params:
2218            query_params['stamp_type'] = params['stamp_type']
2219
2220        header_params = {}
2221
2222        form_params = []
2223        local_var_files = {}
2224
2225        body_params = None
2226        # HTTP header `Accept`
2227        header_params['Accept'] = self.api_client.\
2228            select_header_accept(['application/json'])
2229
2230        # Authentication setting
2231        auth_settings = []
2232
2233        return self.api_client.call_api(resource_path, 'GET',
2234                                        path_params,
2235                                        query_params,
2236                                        header_params,
2237                                        body=body_params,
2238                                        post_params=form_params,
2239                                        files=local_var_files,
2240                                        response_type='UserSignaturesInformation',
2241                                        auth_settings=auth_settings,
2242                                        callback=params.get('callback'),
2243                                        _return_http_data_only=params.get('_return_http_data_only'),
2244                                        _preload_content=params.get('_preload_content', True),
2245                                        _request_timeout=params.get('_request_timeout'),
2246                                        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.

def post_contacts(self, account_id, **kwargs)
2248    def post_contacts(self, account_id, **kwargs):
2249        """
2250        Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type).
2251        This method adds multiple contacts into a contacts list.
2252        This method makes a synchronous HTTP request by default. To make an
2253        asynchronous HTTP request, please define a `callback` function
2254        to be invoked when receiving the response.
2255        >>> def callback_function(response):
2256        >>>     pprint(response)
2257        >>>
2258        >>> thread = api.post_contacts(account_id, callback=callback_function)
2259
2260        :param callback function: The callback function
2261            for asynchronous request. (optional)
2262        :param str account_id: The external account number (int) or account ID Guid. (required)
2263        :param ContactModRequest contact_mod_request:
2264        :return: ContactUpdateResponse
2265                 If the method is called asynchronously,
2266                 returns the request thread.
2267        """
2268        kwargs['_return_http_data_only'] = True
2269        if kwargs.get('callback'):
2270            return self.post_contacts_with_http_info(account_id, **kwargs)
2271        else:
2272            (data) = self.post_contacts_with_http_info(account_id, **kwargs)
2273            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.

def post_contacts_with_http_info(self, account_id, **kwargs)
2275    def post_contacts_with_http_info(self, account_id, **kwargs):
2276        """
2277        Imports multiple new contacts into the contacts collection from CSV, JSON, or XML (based on content type).
2278        This method adds multiple contacts into a contacts list.
2279        This method makes a synchronous HTTP request by default. To make an
2280        asynchronous HTTP request, please define a `callback` function
2281        to be invoked when receiving the response.
2282        >>> def callback_function(response):
2283        >>>     pprint(response)
2284        >>>
2285        >>> thread = api.post_contacts_with_http_info(account_id, callback=callback_function)
2286
2287        :param callback function: The callback function
2288            for asynchronous request. (optional)
2289        :param str account_id: The external account number (int) or account ID Guid. (required)
2290        :param ContactModRequest contact_mod_request:
2291        :return: ContactUpdateResponse
2292                 If the method is called asynchronously,
2293                 returns the request thread.
2294        """
2295
2296        all_params = ['account_id', 'contact_mod_request']
2297        all_params.append('callback')
2298        all_params.append('_return_http_data_only')
2299        all_params.append('_preload_content')
2300        all_params.append('_request_timeout')
2301
2302        params = locals()
2303        for key, val in iteritems(params['kwargs']):
2304            if key not in all_params:
2305                raise TypeError(
2306                    "Got an unexpected keyword argument '%s'"
2307                    " to method post_contacts" % key
2308                )
2309            params[key] = val
2310        del params['kwargs']
2311        # verify the required parameter 'account_id' is set
2312        if ('account_id' not in params) or (params['account_id'] is None):
2313            raise ValueError("Missing the required parameter `account_id` when calling `post_contacts`")
2314
2315
2316        collection_formats = {}
2317
2318        resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json')
2319        path_params = {}
2320        if 'account_id' in params:
2321            path_params['accountId'] = params['account_id']
2322
2323        query_params = {}
2324
2325        header_params = {}
2326
2327        form_params = []
2328        local_var_files = {}
2329
2330        body_params = None
2331        if 'contact_mod_request' in params:
2332            body_params = params['contact_mod_request']
2333        # HTTP header `Accept`
2334        header_params['Accept'] = self.api_client.\
2335            select_header_accept(['application/json'])
2336
2337        # Authentication setting
2338        auth_settings = []
2339
2340        return self.api_client.call_api(resource_path, 'POST',
2341                                        path_params,
2342                                        query_params,
2343                                        header_params,
2344                                        body=body_params,
2345                                        post_params=form_params,
2346                                        files=local_var_files,
2347                                        response_type='ContactUpdateResponse',
2348                                        auth_settings=auth_settings,
2349                                        callback=params.get('callback'),
2350                                        _return_http_data_only=params.get('_return_http_data_only'),
2351                                        _preload_content=params.get('_preload_content', True),
2352                                        _request_timeout=params.get('_request_timeout'),
2353                                        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.

def put_contacts(self, account_id, **kwargs)
2355    def put_contacts(self, account_id, **kwargs):
2356        """
2357        Replaces contacts associated with an account for the DocuSign service.
2358        This method updates one or more contacts associated with an account.
2359        This method makes a synchronous HTTP request by default. To make an
2360        asynchronous HTTP request, please define a `callback` function
2361        to be invoked when receiving the response.
2362        >>> def callback_function(response):
2363        >>>     pprint(response)
2364        >>>
2365        >>> thread = api.put_contacts(account_id, callback=callback_function)
2366
2367        :param callback function: The callback function
2368            for asynchronous request. (optional)
2369        :param str account_id: The external account number (int) or account ID Guid. (required)
2370        :param ContactModRequest contact_mod_request:
2371        :return: ContactUpdateResponse
2372                 If the method is called asynchronously,
2373                 returns the request thread.
2374        """
2375        kwargs['_return_http_data_only'] = True
2376        if kwargs.get('callback'):
2377            return self.put_contacts_with_http_info(account_id, **kwargs)
2378        else:
2379            (data) = self.put_contacts_with_http_info(account_id, **kwargs)
2380            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.

def put_contacts_with_http_info(self, account_id, **kwargs)
2382    def put_contacts_with_http_info(self, account_id, **kwargs):
2383        """
2384        Replaces contacts associated with an account for the DocuSign service.
2385        This method updates one or more contacts associated with an account.
2386        This method makes a synchronous HTTP request by default. To make an
2387        asynchronous HTTP request, please define a `callback` function
2388        to be invoked when receiving the response.
2389        >>> def callback_function(response):
2390        >>>     pprint(response)
2391        >>>
2392        >>> thread = api.put_contacts_with_http_info(account_id, callback=callback_function)
2393
2394        :param callback function: The callback function
2395            for asynchronous request. (optional)
2396        :param str account_id: The external account number (int) or account ID Guid. (required)
2397        :param ContactModRequest contact_mod_request:
2398        :return: ContactUpdateResponse
2399                 If the method is called asynchronously,
2400                 returns the request thread.
2401        """
2402
2403        all_params = ['account_id', 'contact_mod_request']
2404        all_params.append('callback')
2405        all_params.append('_return_http_data_only')
2406        all_params.append('_preload_content')
2407        all_params.append('_request_timeout')
2408
2409        params = locals()
2410        for key, val in iteritems(params['kwargs']):
2411            if key not in all_params:
2412                raise TypeError(
2413                    "Got an unexpected keyword argument '%s'"
2414                    " to method put_contacts" % key
2415                )
2416            params[key] = val
2417        del params['kwargs']
2418        # verify the required parameter 'account_id' is set
2419        if ('account_id' not in params) or (params['account_id'] is None):
2420            raise ValueError("Missing the required parameter `account_id` when calling `put_contacts`")
2421
2422
2423        collection_formats = {}
2424
2425        resource_path = '/v2.1/accounts/{accountId}/contacts'.replace('{format}', 'json')
2426        path_params = {}
2427        if 'account_id' in params:
2428            path_params['accountId'] = params['account_id']
2429
2430        query_params = {}
2431
2432        header_params = {}
2433
2434        form_params = []
2435        local_var_files = {}
2436
2437        body_params = None
2438        if 'contact_mod_request' in params:
2439            body_params = params['contact_mod_request']
2440        # HTTP header `Accept`
2441        header_params['Accept'] = self.api_client.\
2442            select_header_accept(['application/json'])
2443
2444        # Authentication setting
2445        auth_settings = []
2446
2447        return self.api_client.call_api(resource_path, 'PUT',
2448                                        path_params,
2449                                        query_params,
2450                                        header_params,
2451                                        body=body_params,
2452                                        post_params=form_params,
2453                                        files=local_var_files,
2454                                        response_type='ContactUpdateResponse',
2455                                        auth_settings=auth_settings,
2456                                        callback=params.get('callback'),
2457                                        _return_http_data_only=params.get('_return_http_data_only'),
2458                                        _preload_content=params.get('_preload_content', True),
2459                                        _request_timeout=params.get('_request_timeout'),
2460                                        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.

def update_custom_settings(self, account_id, user_id, **kwargs)
2462    def update_custom_settings(self, account_id, user_id, **kwargs):
2463        """
2464        Adds or updates custom user settings for the specified user.
2465        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.
2466        This method makes a synchronous HTTP request by default. To make an
2467        asynchronous HTTP request, please define a `callback` function
2468        to be invoked when receiving the response.
2469        >>> def callback_function(response):
2470        >>>     pprint(response)
2471        >>>
2472        >>> thread = api.update_custom_settings(account_id, user_id, callback=callback_function)
2473
2474        :param callback function: The callback function
2475            for asynchronous request. (optional)
2476        :param str account_id: The external account number (int) or account ID Guid. (required)
2477        :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)
2478        :param CustomSettingsInformation custom_settings_information:
2479        :return: CustomSettingsInformation
2480                 If the method is called asynchronously,
2481                 returns the request thread.
2482        """
2483        kwargs['_return_http_data_only'] = True
2484        if kwargs.get('callback'):
2485            return self.update_custom_settings_with_http_info(account_id, user_id, **kwargs)
2486        else:
2487            (data) = self.update_custom_settings_with_http_info(account_id, user_id, **kwargs)
2488            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.

def update_custom_settings_with_http_info(self, account_id, user_id, **kwargs)
2490    def update_custom_settings_with_http_info(self, account_id, user_id, **kwargs):
2491        """
2492        Adds or updates custom user settings for the specified user.
2493        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.
2494        This method makes a synchronous HTTP request by default. To make an
2495        asynchronous HTTP request, please define a `callback` function
2496        to be invoked when receiving the response.
2497        >>> def callback_function(response):
2498        >>>     pprint(response)
2499        >>>
2500        >>> thread = api.update_custom_settings_with_http_info(account_id, user_id, callback=callback_function)
2501
2502        :param callback function: The callback function
2503            for asynchronous request. (optional)
2504        :param str account_id: The external account number (int) or account ID Guid. (required)
2505        :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)
2506        :param CustomSettingsInformation custom_settings_information:
2507        :return: CustomSettingsInformation
2508                 If the method is called asynchronously,
2509                 returns the request thread.
2510        """
2511
2512        all_params = ['account_id', 'user_id', 'custom_settings_information']
2513        all_params.append('callback')
2514        all_params.append('_return_http_data_only')
2515        all_params.append('_preload_content')
2516        all_params.append('_request_timeout')
2517
2518        params = locals()
2519        for key, val in iteritems(params['kwargs']):
2520            if key not in all_params:
2521                raise TypeError(
2522                    "Got an unexpected keyword argument '%s'"
2523                    " to method update_custom_settings" % key
2524                )
2525            params[key] = val
2526        del params['kwargs']
2527        # verify the required parameter 'account_id' is set
2528        if ('account_id' not in params) or (params['account_id'] is None):
2529            raise ValueError("Missing the required parameter `account_id` when calling `update_custom_settings`")
2530        # verify the required parameter 'user_id' is set
2531        if ('user_id' not in params) or (params['user_id'] is None):
2532            raise ValueError("Missing the required parameter `user_id` when calling `update_custom_settings`")
2533
2534
2535        collection_formats = {}
2536
2537        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/custom_settings'.replace('{format}', 'json')
2538        path_params = {}
2539        if 'account_id' in params:
2540            path_params['accountId'] = params['account_id']
2541        if 'user_id' in params:
2542            path_params['userId'] = params['user_id']
2543
2544        query_params = {}
2545
2546        header_params = {}
2547
2548        form_params = []
2549        local_var_files = {}
2550
2551        body_params = None
2552        if 'custom_settings_information' in params:
2553            body_params = params['custom_settings_information']
2554        # HTTP header `Accept`
2555        header_params['Accept'] = self.api_client.\
2556            select_header_accept(['application/json'])
2557
2558        # Authentication setting
2559        auth_settings = []
2560
2561        return self.api_client.call_api(resource_path, 'PUT',
2562                                        path_params,
2563                                        query_params,
2564                                        header_params,
2565                                        body=body_params,
2566                                        post_params=form_params,
2567                                        files=local_var_files,
2568                                        response_type='CustomSettingsInformation',
2569                                        auth_settings=auth_settings,
2570                                        callback=params.get('callback'),
2571                                        _return_http_data_only=params.get('_return_http_data_only'),
2572                                        _preload_content=params.get('_preload_content', True),
2573                                        _request_timeout=params.get('_request_timeout'),
2574                                        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.

def update_profile(self, account_id, user_id, **kwargs)
2576    def update_profile(self, account_id, user_id, **kwargs):
2577        """
2578        Updates the user profile information for the specified user.
2579        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.
2580        This method makes a synchronous HTTP request by default. To make an
2581        asynchronous HTTP request, please define a `callback` function
2582        to be invoked when receiving the response.
2583        >>> def callback_function(response):
2584        >>>     pprint(response)
2585        >>>
2586        >>> thread = api.update_profile(account_id, user_id, callback=callback_function)
2587
2588        :param callback function: The callback function
2589            for asynchronous request. (optional)
2590        :param str account_id: The external account number (int) or account ID Guid. (required)
2591        :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)
2592        :param UserProfile user_profile:
2593        :return: None
2594                 If the method is called asynchronously,
2595                 returns the request thread.
2596        """
2597        kwargs['_return_http_data_only'] = True
2598        if kwargs.get('callback'):
2599            return self.update_profile_with_http_info(account_id, user_id, **kwargs)
2600        else:
2601            (data) = self.update_profile_with_http_info(account_id, user_id, **kwargs)
2602            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.

def update_profile_with_http_info(self, account_id, user_id, **kwargs)
2604    def update_profile_with_http_info(self, account_id, user_id, **kwargs):
2605        """
2606        Updates the user profile information for the specified user.
2607        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.
2608        This method makes a synchronous HTTP request by default. To make an
2609        asynchronous HTTP request, please define a `callback` function
2610        to be invoked when receiving the response.
2611        >>> def callback_function(response):
2612        >>>     pprint(response)
2613        >>>
2614        >>> thread = api.update_profile_with_http_info(account_id, user_id, callback=callback_function)
2615
2616        :param callback function: The callback function
2617            for asynchronous request. (optional)
2618        :param str account_id: The external account number (int) or account ID Guid. (required)
2619        :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)
2620        :param UserProfile user_profile:
2621        :return: None
2622                 If the method is called asynchronously,
2623                 returns the request thread.
2624        """
2625
2626        all_params = ['account_id', 'user_id', 'user_profile']
2627        all_params.append('callback')
2628        all_params.append('_return_http_data_only')
2629        all_params.append('_preload_content')
2630        all_params.append('_request_timeout')
2631
2632        params = locals()
2633        for key, val in iteritems(params['kwargs']):
2634            if key not in all_params:
2635                raise TypeError(
2636                    "Got an unexpected keyword argument '%s'"
2637                    " to method update_profile" % key
2638                )
2639            params[key] = val
2640        del params['kwargs']
2641        # verify the required parameter 'account_id' is set
2642        if ('account_id' not in params) or (params['account_id'] is None):
2643            raise ValueError("Missing the required parameter `account_id` when calling `update_profile`")
2644        # verify the required parameter 'user_id' is set
2645        if ('user_id' not in params) or (params['user_id'] is None):
2646            raise ValueError("Missing the required parameter `user_id` when calling `update_profile`")
2647
2648
2649        collection_formats = {}
2650
2651        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile'.replace('{format}', 'json')
2652        path_params = {}
2653        if 'account_id' in params:
2654            path_params['accountId'] = params['account_id']
2655        if 'user_id' in params:
2656            path_params['userId'] = params['user_id']
2657
2658        query_params = {}
2659
2660        header_params = {}
2661
2662        form_params = []
2663        local_var_files = {}
2664
2665        body_params = None
2666        if 'user_profile' in params:
2667            body_params = params['user_profile']
2668        # HTTP header `Accept`
2669        header_params['Accept'] = self.api_client.\
2670            select_header_accept(['application/json'])
2671
2672        # Authentication setting
2673        auth_settings = []
2674
2675        return self.api_client.call_api(resource_path, 'PUT',
2676                                        path_params,
2677                                        query_params,
2678                                        header_params,
2679                                        body=body_params,
2680                                        post_params=form_params,
2681                                        files=local_var_files,
2682                                        response_type=None,
2683                                        auth_settings=auth_settings,
2684                                        callback=params.get('callback'),
2685                                        _return_http_data_only=params.get('_return_http_data_only'),
2686                                        _preload_content=params.get('_preload_content', True),
2687                                        _request_timeout=params.get('_request_timeout'),
2688                                        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.

def update_profile_image(self, account_id, user_id, **kwargs)
2690    def update_profile_image(self, account_id, user_id, **kwargs):
2691        """
2692        Updates the user profile image for a specified user.
2693        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.
2694        This method makes a synchronous HTTP request by default. To make an
2695        asynchronous HTTP request, please define a `callback` function
2696        to be invoked when receiving the response.
2697        >>> def callback_function(response):
2698        >>>     pprint(response)
2699        >>>
2700        >>> thread = api.update_profile_image(account_id, user_id, callback=callback_function)
2701
2702        :param callback function: The callback function
2703            for asynchronous request. (optional)
2704        :param str account_id: The external account number (int) or account ID Guid. (required)
2705        :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)
2706        :return: None
2707                 If the method is called asynchronously,
2708                 returns the request thread.
2709        """
2710        kwargs['_return_http_data_only'] = True
2711        if kwargs.get('callback'):
2712            return self.update_profile_image_with_http_info(account_id, user_id, **kwargs)
2713        else:
2714            (data) = self.update_profile_image_with_http_info(account_id, user_id, **kwargs)
2715            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.

def update_profile_image_with_http_info(self, account_id, user_id, **kwargs)
2717    def update_profile_image_with_http_info(self, account_id, user_id, **kwargs):
2718        """
2719        Updates the user profile image for a specified user.
2720        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.
2721        This method makes a synchronous HTTP request by default. To make an
2722        asynchronous HTTP request, please define a `callback` function
2723        to be invoked when receiving the response.
2724        >>> def callback_function(response):
2725        >>>     pprint(response)
2726        >>>
2727        >>> thread = api.update_profile_image_with_http_info(account_id, user_id, callback=callback_function)
2728
2729        :param callback function: The callback function
2730            for asynchronous request. (optional)
2731        :param str account_id: The external account number (int) or account ID Guid. (required)
2732        :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)
2733        :return: None
2734                 If the method is called asynchronously,
2735                 returns the request thread.
2736        """
2737
2738        all_params = ['account_id', 'user_id']
2739        all_params.append('callback')
2740        all_params.append('_return_http_data_only')
2741        all_params.append('_preload_content')
2742        all_params.append('_request_timeout')
2743
2744        params = locals()
2745        for key, val in iteritems(params['kwargs']):
2746            if key not in all_params:
2747                raise TypeError(
2748                    "Got an unexpected keyword argument '%s'"
2749                    " to method update_profile_image" % key
2750                )
2751            params[key] = val
2752        del params['kwargs']
2753        # verify the required parameter 'account_id' is set
2754        if ('account_id' not in params) or (params['account_id'] is None):
2755            raise ValueError("Missing the required parameter `account_id` when calling `update_profile_image`")
2756        # verify the required parameter 'user_id' is set
2757        if ('user_id' not in params) or (params['user_id'] is None):
2758            raise ValueError("Missing the required parameter `user_id` when calling `update_profile_image`")
2759
2760
2761        collection_formats = {}
2762
2763        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/profile/image'.replace('{format}', 'json')
2764        path_params = {}
2765        if 'account_id' in params:
2766            path_params['accountId'] = params['account_id']
2767        if 'user_id' in params:
2768            path_params['userId'] = params['user_id']
2769
2770        query_params = {}
2771
2772        header_params = {}
2773
2774        form_params = []
2775        local_var_files = {}
2776
2777        body_params = None
2778        # HTTP header `Accept`
2779        header_params['Accept'] = self.api_client.\
2780            select_header_accept(['application/json'])
2781
2782        # HTTP header `Content-Type`
2783        header_params['Content-Type'] = self.api_client.\
2784            select_header_content_type(['image/gif'])
2785
2786        # Authentication setting
2787        auth_settings = []
2788
2789        return self.api_client.call_api(resource_path, 'PUT',
2790                                        path_params,
2791                                        query_params,
2792                                        header_params,
2793                                        body=body_params,
2794                                        post_params=form_params,
2795                                        files=local_var_files,
2796                                        response_type=None,
2797                                        auth_settings=auth_settings,
2798                                        callback=params.get('callback'),
2799                                        _return_http_data_only=params.get('_return_http_data_only'),
2800                                        _preload_content=params.get('_preload_content', True),
2801                                        _request_timeout=params.get('_request_timeout'),
2802                                        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.

def update_settings(self, account_id, user_id, **kwargs)
2804    def update_settings(self, account_id, user_id, **kwargs):
2805        """
2806        Updates the user account settings for a specified user.
2807        Updates the account settings list and email notification types for the specified user.
2808        This method makes a synchronous HTTP request by default. To make an
2809        asynchronous HTTP request, please define a `callback` function
2810        to be invoked when receiving the response.
2811        >>> def callback_function(response):
2812        >>>     pprint(response)
2813        >>>
2814        >>> thread = api.update_settings(account_id, user_id, callback=callback_function)
2815
2816        :param callback function: The callback function
2817            for asynchronous request. (optional)
2818        :param str account_id: The external account number (int) or account ID Guid. (required)
2819        :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)
2820        :param str allow_all_languages:
2821        :param UserSettingsInformation user_settings_information:
2822        :return: None
2823                 If the method is called asynchronously,
2824                 returns the request thread.
2825        """
2826        kwargs['_return_http_data_only'] = True
2827        if kwargs.get('callback'):
2828            return self.update_settings_with_http_info(account_id, user_id, **kwargs)
2829        else:
2830            (data) = self.update_settings_with_http_info(account_id, user_id, **kwargs)
2831            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.

def update_settings_with_http_info(self, account_id, user_id, **kwargs)
2833    def update_settings_with_http_info(self, account_id, user_id, **kwargs):
2834        """
2835        Updates the user account settings for a specified user.
2836        Updates the account settings list and email notification types for the specified user.
2837        This method makes a synchronous HTTP request by default. To make an
2838        asynchronous HTTP request, please define a `callback` function
2839        to be invoked when receiving the response.
2840        >>> def callback_function(response):
2841        >>>     pprint(response)
2842        >>>
2843        >>> thread = api.update_settings_with_http_info(account_id, user_id, callback=callback_function)
2844
2845        :param callback function: The callback function
2846            for asynchronous request. (optional)
2847        :param str account_id: The external account number (int) or account ID Guid. (required)
2848        :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)
2849        :param str allow_all_languages:
2850        :param UserSettingsInformation user_settings_information:
2851        :return: None
2852                 If the method is called asynchronously,
2853                 returns the request thread.
2854        """
2855
2856        all_params = ['account_id', 'user_id', 'allow_all_languages', 'user_settings_information']
2857        all_params.append('callback')
2858        all_params.append('_return_http_data_only')
2859        all_params.append('_preload_content')
2860        all_params.append('_request_timeout')
2861
2862        params = locals()
2863        for key, val in iteritems(params['kwargs']):
2864            if key not in all_params:
2865                raise TypeError(
2866                    "Got an unexpected keyword argument '%s'"
2867                    " to method update_settings" % key
2868                )
2869            params[key] = val
2870        del params['kwargs']
2871        # verify the required parameter 'account_id' is set
2872        if ('account_id' not in params) or (params['account_id'] is None):
2873            raise ValueError("Missing the required parameter `account_id` when calling `update_settings`")
2874        # verify the required parameter 'user_id' is set
2875        if ('user_id' not in params) or (params['user_id'] is None):
2876            raise ValueError("Missing the required parameter `user_id` when calling `update_settings`")
2877
2878
2879        collection_formats = {}
2880
2881        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/settings'.replace('{format}', 'json')
2882        path_params = {}
2883        if 'account_id' in params:
2884            path_params['accountId'] = params['account_id']
2885        if 'user_id' in params:
2886            path_params['userId'] = params['user_id']
2887
2888        query_params = {}
2889        if 'allow_all_languages' in params:
2890            query_params['allow_all_languages'] = params['allow_all_languages']
2891
2892        header_params = {}
2893
2894        form_params = []
2895        local_var_files = {}
2896
2897        body_params = None
2898        if 'user_settings_information' in params:
2899            body_params = params['user_settings_information']
2900        # HTTP header `Accept`
2901        header_params['Accept'] = self.api_client.\
2902            select_header_accept(['application/json'])
2903
2904        # Authentication setting
2905        auth_settings = []
2906
2907        return self.api_client.call_api(resource_path, 'PUT',
2908                                        path_params,
2909                                        query_params,
2910                                        header_params,
2911                                        body=body_params,
2912                                        post_params=form_params,
2913                                        files=local_var_files,
2914                                        response_type=None,
2915                                        auth_settings=auth_settings,
2916                                        callback=params.get('callback'),
2917                                        _return_http_data_only=params.get('_return_http_data_only'),
2918                                        _preload_content=params.get('_preload_content', True),
2919                                        _request_timeout=params.get('_request_timeout'),
2920                                        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.

def update_signature(self, account_id, signature_id, user_id, **kwargs)
2922    def update_signature(self, account_id, signature_id, user_id, **kwargs):
2923        """
2924        Updates the user signature for a specified user.
2925        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\".
2926        This method makes a synchronous HTTP request by default. To make an
2927        asynchronous HTTP request, please define a `callback` function
2928        to be invoked when receiving the response.
2929        >>> def callback_function(response):
2930        >>>     pprint(response)
2931        >>>
2932        >>> thread = api.update_signature(account_id, signature_id, user_id, callback=callback_function)
2933
2934        :param callback function: The callback function
2935            for asynchronous request. (optional)
2936        :param str account_id: The external account number (int) or account ID Guid. (required)
2937        :param str signature_id: The ID of the signature being accessed. (required)
2938        :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)
2939        :param str close_existing_signature: When set to **true**, closes the current signature.
2940        :param UserSignatureDefinition user_signature_definition:
2941        :return: UserSignature
2942                 If the method is called asynchronously,
2943                 returns the request thread.
2944        """
2945        kwargs['_return_http_data_only'] = True
2946        if kwargs.get('callback'):
2947            return self.update_signature_with_http_info(account_id, signature_id, user_id, **kwargs)
2948        else:
2949            (data) = self.update_signature_with_http_info(account_id, signature_id, user_id, **kwargs)
2950            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.

def update_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs)
2952    def update_signature_with_http_info(self, account_id, signature_id, user_id, **kwargs):
2953        """
2954        Updates the user signature for a specified user.
2955        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\".
2956        This method makes a synchronous HTTP request by default. To make an
2957        asynchronous HTTP request, please define a `callback` function
2958        to be invoked when receiving the response.
2959        >>> def callback_function(response):
2960        >>>     pprint(response)
2961        >>>
2962        >>> thread = api.update_signature_with_http_info(account_id, signature_id, user_id, callback=callback_function)
2963
2964        :param callback function: The callback function
2965            for asynchronous request. (optional)
2966        :param str account_id: The external account number (int) or account ID Guid. (required)
2967        :param str signature_id: The ID of the signature being accessed. (required)
2968        :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)
2969        :param str close_existing_signature: When set to **true**, closes the current signature.
2970        :param UserSignatureDefinition user_signature_definition:
2971        :return: UserSignature
2972                 If the method is called asynchronously,
2973                 returns the request thread.
2974        """
2975
2976        all_params = ['account_id', 'signature_id', 'user_id', 'close_existing_signature', 'user_signature_definition']
2977        all_params.append('callback')
2978        all_params.append('_return_http_data_only')
2979        all_params.append('_preload_content')
2980        all_params.append('_request_timeout')
2981
2982        params = locals()
2983        for key, val in iteritems(params['kwargs']):
2984            if key not in all_params:
2985                raise TypeError(
2986                    "Got an unexpected keyword argument '%s'"
2987                    " to method update_signature" % key
2988                )
2989            params[key] = val
2990        del params['kwargs']
2991        # verify the required parameter 'account_id' is set
2992        if ('account_id' not in params) or (params['account_id'] is None):
2993            raise ValueError("Missing the required parameter `account_id` when calling `update_signature`")
2994        # verify the required parameter 'signature_id' is set
2995        if ('signature_id' not in params) or (params['signature_id'] is None):
2996            raise ValueError("Missing the required parameter `signature_id` when calling `update_signature`")
2997        # verify the required parameter 'user_id' is set
2998        if ('user_id' not in params) or (params['user_id'] is None):
2999            raise ValueError("Missing the required parameter `user_id` when calling `update_signature`")
3000
3001
3002        collection_formats = {}
3003
3004        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}'.replace('{format}', 'json')
3005        path_params = {}
3006        if 'account_id' in params:
3007            path_params['accountId'] = params['account_id']
3008        if 'signature_id' in params:
3009            path_params['signatureId'] = params['signature_id']
3010        if 'user_id' in params:
3011            path_params['userId'] = params['user_id']
3012
3013        query_params = {}
3014        if 'close_existing_signature' in params:
3015            query_params['close_existing_signature'] = params['close_existing_signature']
3016
3017        header_params = {}
3018
3019        form_params = []
3020        local_var_files = {}
3021
3022        body_params = None
3023        if 'user_signature_definition' in params:
3024            body_params = params['user_signature_definition']
3025        # HTTP header `Accept`
3026        header_params['Accept'] = self.api_client.\
3027            select_header_accept(['application/json'])
3028
3029        # Authentication setting
3030        auth_settings = []
3031
3032        return self.api_client.call_api(resource_path, 'PUT',
3033                                        path_params,
3034                                        query_params,
3035                                        header_params,
3036                                        body=body_params,
3037                                        post_params=form_params,
3038                                        files=local_var_files,
3039                                        response_type='UserSignature',
3040                                        auth_settings=auth_settings,
3041                                        callback=params.get('callback'),
3042                                        _return_http_data_only=params.get('_return_http_data_only'),
3043                                        _preload_content=params.get('_preload_content', True),
3044                                        _request_timeout=params.get('_request_timeout'),
3045                                        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.

def update_signature_image( self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs)
3047    def update_signature_image(self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs):
3048        """
3049        Updates the user signature image or user initials image for the specified user.
3050        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\". 
3051        This method makes a synchronous HTTP request by default. To make an
3052        asynchronous HTTP request, please define a `callback` function
3053        to be invoked when receiving the response.
3054        >>> def callback_function(response):
3055        >>>     pprint(response)
3056        >>>
3057        >>> thread = api.update_signature_image(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function)
3058
3059        :param callback function: The callback function
3060            for asynchronous request. (optional)
3061        :param str account_id: The external account number (int) or account ID Guid. (required)
3062        :param str image_type: One of **signature_image** or **initials_image**. (required)
3063        :param str signature_id: The ID of the signature being accessed. (required)
3064        :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)
3065        :param str transparent_png:
3066        :param str image_bytes: Updated image content. (required)
3067        :return: UserSignature
3068                 If the method is called asynchronously,
3069                 returns the request thread.
3070        """
3071        kwargs['_return_http_data_only'] = True
3072        if kwargs.get('callback'):
3073            return self.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, **kwargs)
3074        else:
3075            (data) = self.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, **kwargs)
3076            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.

def update_signature_image_with_http_info( self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs)
3078    def update_signature_image_with_http_info(self, account_id, image_type, signature_id, user_id, image_bytes, **kwargs):
3079        """
3080        Updates the user signature image or user initials image for the specified user.
3081        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\". 
3082        This method makes a synchronous HTTP request by default. To make an
3083        asynchronous HTTP request, please define a `callback` function
3084        to be invoked when receiving the response.
3085        >>> def callback_function(response):
3086        >>>     pprint(response)
3087        >>>
3088        >>> thread = api.update_signature_image_with_http_info(account_id, image_type, signature_id, user_id, image_bytes, callback=callback_function)
3089
3090        :param callback function: The callback function
3091            for asynchronous request. (optional)
3092        :param str account_id: The external account number (int) or account ID Guid. (required)
3093        :param str image_type: One of **signature_image** or **initials_image**. (required)
3094        :param str signature_id: The ID of the signature being accessed. (required)
3095        :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)
3096        :param str transparent_png:
3097        :param str image_bytes: Updated image content. (required)
3098        :return: UserSignature
3099                 If the method is called asynchronously,
3100                 returns the request thread.
3101        """
3102
3103        all_params = ['account_id', 'image_type', 'signature_id', 'user_id', 'transparent_png', 'image_bytes']
3104        all_params.append('callback')
3105        all_params.append('_return_http_data_only')
3106        all_params.append('_preload_content')
3107        all_params.append('_request_timeout')
3108
3109        params = locals()
3110        for key, val in iteritems(params['kwargs']):
3111            if key not in all_params:
3112                raise TypeError(
3113                    "Got an unexpected keyword argument '%s'"
3114                    " to method update_signature_image" % key
3115                )
3116            params[key] = val
3117        del params['kwargs']
3118        # verify the required parameter 'account_id' is set
3119        if ('account_id' not in params) or (params['account_id'] is None):
3120            raise ValueError("Missing the required parameter `account_id` when calling `update_signature_image`")
3121        # verify the required parameter 'image_type' is set
3122        if ('image_type' not in params) or (params['image_type'] is None):
3123            raise ValueError("Missing the required parameter `image_type` when calling `update_signature_image`")
3124        # verify the required parameter 'signature_id' is set
3125        if ('signature_id' not in params) or (params['signature_id'] is None):
3126            raise ValueError("Missing the required parameter `signature_id` when calling `update_signature_image`")
3127        # verify the required parameter 'user_id' is set
3128        if ('user_id' not in params) or (params['user_id'] is None):
3129            raise ValueError("Missing the required parameter `user_id` when calling `update_signature_image`")
3130        # verify the required parameter 'image_bytes' is set
3131        if ('image_bytes' not in params) or (params['image_bytes'] is None):
3132            raise ValueError("Missing the required parameter `image_bytes` when calling `update_signature_image`")
3133
3134
3135        collection_formats = {}
3136
3137        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures/{signatureId}/{imageType}'.replace('{format}', 'json')
3138        path_params = {}
3139        if 'account_id' in params:
3140            path_params['accountId'] = params['account_id']
3141        if 'image_type' in params:
3142            path_params['imageType'] = params['image_type']
3143        if 'signature_id' in params:
3144            path_params['signatureId'] = params['signature_id']
3145        if 'user_id' in params:
3146            path_params['userId'] = params['user_id']
3147
3148        query_params = {}
3149        if 'transparent_png' in params:
3150            query_params['transparent_png'] = params['transparent_png']
3151
3152        header_params = {}
3153
3154        form_params = []
3155        local_var_files = {}
3156
3157        body_params = None
3158        if 'image_bytes' in params:
3159            body_params = params['image_bytes']
3160        # HTTP header `Accept`
3161        header_params['Accept'] = self.api_client.\
3162            select_header_accept(['application/json'])
3163
3164        # HTTP header `Content-Type`
3165        header_params['Content-Type'] = self.api_client.\
3166            select_header_content_type(['image/gif'])
3167
3168        # Authentication setting
3169        auth_settings = []
3170
3171        return self.api_client.call_api(resource_path, 'PUT',
3172                                        path_params,
3173                                        query_params,
3174                                        header_params,
3175                                        body=body_params,
3176                                        post_params=form_params,
3177                                        files=local_var_files,
3178                                        response_type='UserSignature',
3179                                        auth_settings=auth_settings,
3180                                        callback=params.get('callback'),
3181                                        _return_http_data_only=params.get('_return_http_data_only'),
3182                                        _preload_content=params.get('_preload_content', True),
3183                                        _request_timeout=params.get('_request_timeout'),
3184                                        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.

def update_signatures(self, account_id, user_id, **kwargs)
3186    def update_signatures(self, account_id, user_id, **kwargs):
3187        """
3188        Adds/updates a user signature.
3189        
3190        This method makes a synchronous HTTP request by default. To make an
3191        asynchronous HTTP request, please define a `callback` function
3192        to be invoked when receiving the response.
3193        >>> def callback_function(response):
3194        >>>     pprint(response)
3195        >>>
3196        >>> thread = api.update_signatures(account_id, user_id, callback=callback_function)
3197
3198        :param callback function: The callback function
3199            for asynchronous request. (optional)
3200        :param str account_id: The external account number (int) or account ID Guid. (required)
3201        :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)
3202        :param UserSignaturesInformation user_signatures_information:
3203        :return: UserSignaturesInformation
3204                 If the method is called asynchronously,
3205                 returns the request thread.
3206        """
3207        kwargs['_return_http_data_only'] = True
3208        if kwargs.get('callback'):
3209            return self.update_signatures_with_http_info(account_id, user_id, **kwargs)
3210        else:
3211            (data) = self.update_signatures_with_http_info(account_id, user_id, **kwargs)
3212            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.

def update_signatures_with_http_info(self, account_id, user_id, **kwargs)
3214    def update_signatures_with_http_info(self, account_id, user_id, **kwargs):
3215        """
3216        Adds/updates a user signature.
3217        
3218        This method makes a synchronous HTTP request by default. To make an
3219        asynchronous HTTP request, please define a `callback` function
3220        to be invoked when receiving the response.
3221        >>> def callback_function(response):
3222        >>>     pprint(response)
3223        >>>
3224        >>> thread = api.update_signatures_with_http_info(account_id, user_id, callback=callback_function)
3225
3226        :param callback function: The callback function
3227            for asynchronous request. (optional)
3228        :param str account_id: The external account number (int) or account ID Guid. (required)
3229        :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)
3230        :param UserSignaturesInformation user_signatures_information:
3231        :return: UserSignaturesInformation
3232                 If the method is called asynchronously,
3233                 returns the request thread.
3234        """
3235
3236        all_params = ['account_id', 'user_id', 'user_signatures_information']
3237        all_params.append('callback')
3238        all_params.append('_return_http_data_only')
3239        all_params.append('_preload_content')
3240        all_params.append('_request_timeout')
3241
3242        params = locals()
3243        for key, val in iteritems(params['kwargs']):
3244            if key not in all_params:
3245                raise TypeError(
3246                    "Got an unexpected keyword argument '%s'"
3247                    " to method update_signatures" % key
3248                )
3249            params[key] = val
3250        del params['kwargs']
3251        # verify the required parameter 'account_id' is set
3252        if ('account_id' not in params) or (params['account_id'] is None):
3253            raise ValueError("Missing the required parameter `account_id` when calling `update_signatures`")
3254        # verify the required parameter 'user_id' is set
3255        if ('user_id' not in params) or (params['user_id'] is None):
3256            raise ValueError("Missing the required parameter `user_id` when calling `update_signatures`")
3257
3258
3259        collection_formats = {}
3260
3261        resource_path = '/v2.1/accounts/{accountId}/users/{userId}/signatures'.replace('{format}', 'json')
3262        path_params = {}
3263        if 'account_id' in params:
3264            path_params['accountId'] = params['account_id']
3265        if 'user_id' in params:
3266            path_params['userId'] = params['user_id']
3267
3268        query_params = {}
3269
3270        header_params = {}
3271
3272        form_params = []
3273        local_var_files = {}
3274
3275        body_params = None
3276        if 'user_signatures_information' in params:
3277            body_params = params['user_signatures_information']
3278        # HTTP header `Accept`
3279        header_params['Accept'] = self.api_client.\
3280            select_header_accept(['application/json'])
3281
3282        # Authentication setting
3283        auth_settings = []
3284
3285        return self.api_client.call_api(resource_path, 'PUT',
3286                                        path_params,
3287                                        query_params,
3288                                        header_params,
3289                                        body=body_params,
3290                                        post_params=form_params,
3291                                        files=local_var_files,
3292                                        response_type='UserSignaturesInformation',
3293                                        auth_settings=auth_settings,
3294                                        callback=params.get('callback'),
3295                                        _return_http_data_only=params.get('_return_http_data_only'),
3296                                        _preload_content=params.get('_preload_content', True),
3297                                        _request_timeout=params.get('_request_timeout'),
3298                                        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.

def update_user(self, account_id, user_id, **kwargs)
3300    def update_user(self, account_id, user_id, **kwargs):
3301        """
3302        Updates the specified user information.
3303        To update user information for a specific user, submit a [Users](#Users) object with updated field values in the request body of this operation.
3304        This method makes a synchronous HTTP request by default. To make an
3305        asynchronous HTTP request, please define a `callback` function
3306        to be invoked when receiving the response.
3307        >>> def callback_function(response):
3308        >>>     pprint(response)
3309        >>>
3310        >>> thread = api.update_user(account_id, user_id, callback=callback_function)
3311
3312        :param callback function: The callback function
3313            for asynchronous request. (optional)
3314        :param str account_id: The external account number (int) or account ID Guid. (required)
3315        :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)
3316        :param str allow_all_languages:
3317        :param UserInformation user_information:
3318        :return: UserInformation
3319                 If the method is called asynchronously,
3320                 returns the request thread.
3321        """
3322        kwargs['_return_http_data_only'] = True
3323        if kwargs.get('callback'):
3324            return self.update_user_with_http_info(account_id, user_id, **kwargs)
3325        else:
3326            (data) = self.update_user_with_http_info(account_id, user_id, **kwargs)
3327            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.

def update_user_with_http_info(self, account_id, user_id, **kwargs)
3329    def update_user_with_http_info(self, account_id, user_id, **kwargs):
3330        """
3331        Updates the specified user information.
3332        To update user information for a specific user, submit a [Users](#Users) object with updated field values in the request body of this operation.
3333        This method makes a synchronous HTTP request by default. To make an
3334        asynchronous HTTP request, please define a `callback` function
3335        to be invoked when receiving the response.
3336        >>> def callback_function(response):
3337        >>>     pprint(response)
3338        >>>
3339        >>> thread = api.update_user_with_http_info(account_id, user_id, callback=callback_function)
3340
3341        :param callback function: The callback function
3342            for asynchronous request. (optional)
3343        :param str account_id: The external account number (int) or account ID Guid. (required)
3344        :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)
3345        :param str allow_all_languages:
3346        :param UserInformation user_information:
3347        :return: UserInformation
3348                 If the method is called asynchronously,
3349                 returns the request thread.
3350        """
3351
3352        all_params = ['account_id', 'user_id', 'allow_all_languages', 'user_information']
3353        all_params.append('callback')
3354        all_params.append('_return_http_data_only')
3355        all_params.append('_preload_content')
3356        all_params.append('_request_timeout')
3357
3358        params = locals()
3359        for key, val in iteritems(params['kwargs']):
3360            if key not in all_params:
3361                raise TypeError(
3362                    "Got an unexpected keyword argument '%s'"
3363                    " to method update_user" % key
3364                )
3365            params[key] = val
3366        del params['kwargs']
3367        # verify the required parameter 'account_id' is set
3368        if ('account_id' not in params) or (params['account_id'] is None):
3369            raise ValueError("Missing the required parameter `account_id` when calling `update_user`")
3370        # verify the required parameter 'user_id' is set
3371        if ('user_id' not in params) or (params['user_id'] is None):
3372            raise ValueError("Missing the required parameter `user_id` when calling `update_user`")
3373
3374
3375        collection_formats = {}
3376
3377        resource_path = '/v2.1/accounts/{accountId}/users/{userId}'.replace('{format}', 'json')
3378        path_params = {}
3379        if 'account_id' in params:
3380            path_params['accountId'] = params['account_id']
3381        if 'user_id' in params:
3382            path_params['userId'] = params['user_id']
3383
3384        query_params = {}
3385        if 'allow_all_languages' in params:
3386            query_params['allow_all_languages'] = params['allow_all_languages']
3387
3388        header_params = {}
3389
3390        form_params = []
3391        local_var_files = {}
3392
3393        body_params = None
3394        if 'user_information' in params:
3395            body_params = params['user_information']
3396        # HTTP header `Accept`
3397        header_params['Accept'] = self.api_client.\
3398            select_header_accept(['application/json'])
3399
3400        # Authentication setting
3401        auth_settings = []
3402
3403        return self.api_client.call_api(resource_path, 'PUT',
3404                                        path_params,
3405                                        query_params,
3406                                        header_params,
3407                                        body=body_params,
3408                                        post_params=form_params,
3409                                        files=local_var_files,
3410                                        response_type='UserInformation',
3411                                        auth_settings=auth_settings,
3412                                        callback=params.get('callback'),
3413                                        _return_http_data_only=params.get('_return_http_data_only'),
3414                                        _preload_content=params.get('_preload_content', True),
3415                                        _request_timeout=params.get('_request_timeout'),
3416                                        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.

def update_users(self, account_id, **kwargs)
3418    def update_users(self, account_id, **kwargs):
3419        """
3420        Change one or more user in the specified account.
3421        This method updates the information about one or more account users.
3422        This method makes a synchronous HTTP request by default. To make an
3423        asynchronous HTTP request, please define a `callback` function
3424        to be invoked when receiving the response.
3425        >>> def callback_function(response):
3426        >>>     pprint(response)
3427        >>>
3428        >>> thread = api.update_users(account_id, callback=callback_function)
3429
3430        :param callback function: The callback function
3431            for asynchronous request. (optional)
3432        :param str account_id: The external account number (int) or account ID Guid. (required)
3433        :param str allow_all_languages:
3434        :param UserInformationList user_information_list:
3435        :return: UserInformationList
3436                 If the method is called asynchronously,
3437                 returns the request thread.
3438        """
3439        kwargs['_return_http_data_only'] = True
3440        if kwargs.get('callback'):
3441            return self.update_users_with_http_info(account_id, **kwargs)
3442        else:
3443            (data) = self.update_users_with_http_info(account_id, **kwargs)
3444            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.

def update_users_with_http_info(self, account_id, **kwargs)
3446    def update_users_with_http_info(self, account_id, **kwargs):
3447        """
3448        Change one or more user in the specified account.
3449        This method updates the information about one or more account users.
3450        This method makes a synchronous HTTP request by default. To make an
3451        asynchronous HTTP request, please define a `callback` function
3452        to be invoked when receiving the response.
3453        >>> def callback_function(response):
3454        >>>     pprint(response)
3455        >>>
3456        >>> thread = api.update_users_with_http_info(account_id, callback=callback_function)
3457
3458        :param callback function: The callback function
3459            for asynchronous request. (optional)
3460        :param str account_id: The external account number (int) or account ID Guid. (required)
3461        :param str allow_all_languages:
3462        :param UserInformationList user_information_list:
3463        :return: UserInformationList
3464                 If the method is called asynchronously,
3465                 returns the request thread.
3466        """
3467
3468        all_params = ['account_id', 'allow_all_languages', 'user_information_list']
3469        all_params.append('callback')
3470        all_params.append('_return_http_data_only')
3471        all_params.append('_preload_content')
3472        all_params.append('_request_timeout')
3473
3474        params = locals()
3475        for key, val in iteritems(params['kwargs']):
3476            if key not in all_params:
3477                raise TypeError(
3478                    "Got an unexpected keyword argument '%s'"
3479                    " to method update_users" % key
3480                )
3481            params[key] = val
3482        del params['kwargs']
3483        # verify the required parameter 'account_id' is set
3484        if ('account_id' not in params) or (params['account_id'] is None):
3485            raise ValueError("Missing the required parameter `account_id` when calling `update_users`")
3486
3487
3488        collection_formats = {}
3489
3490        resource_path = '/v2.1/accounts/{accountId}/users'.replace('{format}', 'json')
3491        path_params = {}
3492        if 'account_id' in params:
3493            path_params['accountId'] = params['account_id']
3494
3495        query_params = {}
3496        if 'allow_all_languages' in params:
3497            query_params['allow_all_languages'] = params['allow_all_languages']
3498
3499        header_params = {}
3500
3501        form_params = []
3502        local_var_files = {}
3503
3504        body_params = None
3505        if 'user_information_list' in params:
3506            body_params = params['user_information_list']
3507        # HTTP header `Accept`
3508        header_params['Accept'] = self.api_client.\
3509            select_header_accept(['application/json'])
3510
3511        # Authentication setting
3512        auth_settings = []
3513
3514        return self.api_client.call_api(resource_path, 'PUT',
3515                                        path_params,
3516                                        query_params,
3517                                        header_params,
3518                                        body=body_params,
3519                                        post_params=form_params,
3520                                        files=local_var_files,
3521                                        response_type='UserInformationList',
3522                                        auth_settings=auth_settings,
3523                                        callback=params.get('callback'),
3524                                        _return_http_data_only=params.get('_return_http_data_only'),
3525                                        _preload_content=params.get('_preload_content', True),
3526                                        _request_timeout=params.get('_request_timeout'),
3527                                        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.