docusign_esign.apis.templates_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 TemplatesApi(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_custom_fields(self, account_id, template_id, **kwargs):
  44        """
  45        Creates custom document fields in an existing template document.
  46        Creates custom document fields in an existing template document.
  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_custom_fields(account_id, template_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 str template_id: The ID of the template being accessed. (required)
  59        :param TemplateCustomFields template_custom_fields:
  60        :return: CustomFields
  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_custom_fields_with_http_info(account_id, template_id, **kwargs)
  67        else:
  68            (data) = self.create_custom_fields_with_http_info(account_id, template_id, **kwargs)
  69            return data
  70
  71    def create_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
  72        """
  73        Creates custom document fields in an existing template document.
  74        Creates custom document fields in an existing template document.
  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_custom_fields_with_http_info(account_id, template_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 str template_id: The ID of the template being accessed. (required)
  87        :param TemplateCustomFields template_custom_fields:
  88        :return: CustomFields
  89                 If the method is called asynchronously,
  90                 returns the request thread.
  91        """
  92
  93        all_params = ['account_id', 'template_id', 'template_custom_fields']
  94        all_params.append('callback')
  95        all_params.append('_return_http_data_only')
  96        all_params.append('_preload_content')
  97        all_params.append('_request_timeout')
  98
  99        params = locals()
 100        for key, val in iteritems(params['kwargs']):
 101            if key not in all_params:
 102                raise TypeError(
 103                    "Got an unexpected keyword argument '%s'"
 104                    " to method create_custom_fields" % key
 105                )
 106            params[key] = val
 107        del params['kwargs']
 108        # verify the required parameter 'account_id' is set
 109        if ('account_id' not in params) or (params['account_id'] is None):
 110            raise ValueError("Missing the required parameter `account_id` when calling `create_custom_fields`")
 111        # verify the required parameter 'template_id' is set
 112        if ('template_id' not in params) or (params['template_id'] is None):
 113            raise ValueError("Missing the required parameter `template_id` when calling `create_custom_fields`")
 114
 115
 116        collection_formats = {}
 117
 118        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
 119        path_params = {}
 120        if 'account_id' in params:
 121            path_params['accountId'] = params['account_id']
 122        if 'template_id' in params:
 123            path_params['templateId'] = params['template_id']
 124
 125        query_params = {}
 126
 127        header_params = {}
 128
 129        form_params = []
 130        local_var_files = {}
 131
 132        body_params = None
 133        if 'template_custom_fields' in params:
 134            body_params = params['template_custom_fields']
 135        # HTTP header `Accept`
 136        header_params['Accept'] = self.api_client.\
 137            select_header_accept(['application/json'])
 138
 139        # Authentication setting
 140        auth_settings = []
 141
 142        return self.api_client.call_api(resource_path, 'POST',
 143                                        path_params,
 144                                        query_params,
 145                                        header_params,
 146                                        body=body_params,
 147                                        post_params=form_params,
 148                                        files=local_var_files,
 149                                        response_type='CustomFields',
 150                                        auth_settings=auth_settings,
 151                                        callback=params.get('callback'),
 152                                        _return_http_data_only=params.get('_return_http_data_only'),
 153                                        _preload_content=params.get('_preload_content', True),
 154                                        _request_timeout=params.get('_request_timeout'),
 155                                        collection_formats=collection_formats)
 156
 157    def create_document_fields(self, account_id, document_id, template_id, **kwargs):
 158        """
 159        Creates custom document fields in an existing template document.
 160        Creates custom document fields in an existing template document.
 161        This method makes a synchronous HTTP request by default. To make an
 162        asynchronous HTTP request, please define a `callback` function
 163        to be invoked when receiving the response.
 164        >>> def callback_function(response):
 165        >>>     pprint(response)
 166        >>>
 167        >>> thread = api.create_document_fields(account_id, document_id, template_id, callback=callback_function)
 168
 169        :param callback function: The callback function
 170            for asynchronous request. (optional)
 171        :param str account_id: The external account number (int) or account ID Guid. (required)
 172        :param str document_id: The ID of the document being accessed. (required)
 173        :param str template_id: The ID of the template being accessed. (required)
 174        :param DocumentFieldsInformation document_fields_information:
 175        :return: DocumentFieldsInformation
 176                 If the method is called asynchronously,
 177                 returns the request thread.
 178        """
 179        kwargs['_return_http_data_only'] = True
 180        if kwargs.get('callback'):
 181            return self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
 182        else:
 183            (data) = self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
 184            return data
 185
 186    def create_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
 187        """
 188        Creates custom document fields in an existing template document.
 189        Creates custom document fields in an existing template document.
 190        This method makes a synchronous HTTP request by default. To make an
 191        asynchronous HTTP request, please define a `callback` function
 192        to be invoked when receiving the response.
 193        >>> def callback_function(response):
 194        >>>     pprint(response)
 195        >>>
 196        >>> thread = api.create_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
 197
 198        :param callback function: The callback function
 199            for asynchronous request. (optional)
 200        :param str account_id: The external account number (int) or account ID Guid. (required)
 201        :param str document_id: The ID of the document being accessed. (required)
 202        :param str template_id: The ID of the template being accessed. (required)
 203        :param DocumentFieldsInformation document_fields_information:
 204        :return: DocumentFieldsInformation
 205                 If the method is called asynchronously,
 206                 returns the request thread.
 207        """
 208
 209        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
 210        all_params.append('callback')
 211        all_params.append('_return_http_data_only')
 212        all_params.append('_preload_content')
 213        all_params.append('_request_timeout')
 214
 215        params = locals()
 216        for key, val in iteritems(params['kwargs']):
 217            if key not in all_params:
 218                raise TypeError(
 219                    "Got an unexpected keyword argument '%s'"
 220                    " to method create_document_fields" % key
 221                )
 222            params[key] = val
 223        del params['kwargs']
 224        # verify the required parameter 'account_id' is set
 225        if ('account_id' not in params) or (params['account_id'] is None):
 226            raise ValueError("Missing the required parameter `account_id` when calling `create_document_fields`")
 227        # verify the required parameter 'document_id' is set
 228        if ('document_id' not in params) or (params['document_id'] is None):
 229            raise ValueError("Missing the required parameter `document_id` when calling `create_document_fields`")
 230        # verify the required parameter 'template_id' is set
 231        if ('template_id' not in params) or (params['template_id'] is None):
 232            raise ValueError("Missing the required parameter `template_id` when calling `create_document_fields`")
 233
 234
 235        collection_formats = {}
 236
 237        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
 238        path_params = {}
 239        if 'account_id' in params:
 240            path_params['accountId'] = params['account_id']
 241        if 'document_id' in params:
 242            path_params['documentId'] = params['document_id']
 243        if 'template_id' in params:
 244            path_params['templateId'] = params['template_id']
 245
 246        query_params = {}
 247
 248        header_params = {}
 249
 250        form_params = []
 251        local_var_files = {}
 252
 253        body_params = None
 254        if 'document_fields_information' in params:
 255            body_params = params['document_fields_information']
 256        # HTTP header `Accept`
 257        header_params['Accept'] = self.api_client.\
 258            select_header_accept(['application/json'])
 259
 260        # Authentication setting
 261        auth_settings = []
 262
 263        return self.api_client.call_api(resource_path, 'POST',
 264                                        path_params,
 265                                        query_params,
 266                                        header_params,
 267                                        body=body_params,
 268                                        post_params=form_params,
 269                                        files=local_var_files,
 270                                        response_type='DocumentFieldsInformation',
 271                                        auth_settings=auth_settings,
 272                                        callback=params.get('callback'),
 273                                        _return_http_data_only=params.get('_return_http_data_only'),
 274                                        _preload_content=params.get('_preload_content', True),
 275                                        _request_timeout=params.get('_request_timeout'),
 276                                        collection_formats=collection_formats)
 277
 278    def create_edit_view(self, account_id, template_id, **kwargs):
 279        """
 280        Provides a URL to start an edit view of the Template UI
 281        This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
 282        This method makes a synchronous HTTP request by default. To make an
 283        asynchronous HTTP request, please define a `callback` function
 284        to be invoked when receiving the response.
 285        >>> def callback_function(response):
 286        >>>     pprint(response)
 287        >>>
 288        >>> thread = api.create_edit_view(account_id, template_id, callback=callback_function)
 289
 290        :param callback function: The callback function
 291            for asynchronous request. (optional)
 292        :param str account_id: The external account number (int) or account ID Guid. (required)
 293        :param str template_id: The ID of the template being accessed. (required)
 294        :param TemplateViewRequest template_view_request:
 295        :return: ViewUrl
 296                 If the method is called asynchronously,
 297                 returns the request thread.
 298        """
 299        kwargs['_return_http_data_only'] = True
 300        if kwargs.get('callback'):
 301            return self.create_edit_view_with_http_info(account_id, template_id, **kwargs)
 302        else:
 303            (data) = self.create_edit_view_with_http_info(account_id, template_id, **kwargs)
 304            return data
 305
 306    def create_edit_view_with_http_info(self, account_id, template_id, **kwargs):
 307        """
 308        Provides a URL to start an edit view of the Template UI
 309        This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
 310        This method makes a synchronous HTTP request by default. To make an
 311        asynchronous HTTP request, please define a `callback` function
 312        to be invoked when receiving the response.
 313        >>> def callback_function(response):
 314        >>>     pprint(response)
 315        >>>
 316        >>> thread = api.create_edit_view_with_http_info(account_id, template_id, callback=callback_function)
 317
 318        :param callback function: The callback function
 319            for asynchronous request. (optional)
 320        :param str account_id: The external account number (int) or account ID Guid. (required)
 321        :param str template_id: The ID of the template being accessed. (required)
 322        :param TemplateViewRequest template_view_request:
 323        :return: ViewUrl
 324                 If the method is called asynchronously,
 325                 returns the request thread.
 326        """
 327
 328        all_params = ['account_id', 'template_id', 'template_view_request']
 329        all_params.append('callback')
 330        all_params.append('_return_http_data_only')
 331        all_params.append('_preload_content')
 332        all_params.append('_request_timeout')
 333
 334        params = locals()
 335        for key, val in iteritems(params['kwargs']):
 336            if key not in all_params:
 337                raise TypeError(
 338                    "Got an unexpected keyword argument '%s'"
 339                    " to method create_edit_view" % key
 340                )
 341            params[key] = val
 342        del params['kwargs']
 343        # verify the required parameter 'account_id' is set
 344        if ('account_id' not in params) or (params['account_id'] is None):
 345            raise ValueError("Missing the required parameter `account_id` when calling `create_edit_view`")
 346        # verify the required parameter 'template_id' is set
 347        if ('template_id' not in params) or (params['template_id'] is None):
 348            raise ValueError("Missing the required parameter `template_id` when calling `create_edit_view`")
 349
 350
 351        collection_formats = {}
 352
 353        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/edit'.replace('{format}', 'json')
 354        path_params = {}
 355        if 'account_id' in params:
 356            path_params['accountId'] = params['account_id']
 357        if 'template_id' in params:
 358            path_params['templateId'] = params['template_id']
 359
 360        query_params = {}
 361
 362        header_params = {}
 363
 364        form_params = []
 365        local_var_files = {}
 366
 367        body_params = None
 368        if 'template_view_request' in params:
 369            body_params = params['template_view_request']
 370        # HTTP header `Accept`
 371        header_params['Accept'] = self.api_client.\
 372            select_header_accept(['application/json'])
 373
 374        # Authentication setting
 375        auth_settings = []
 376
 377        return self.api_client.call_api(resource_path, 'POST',
 378                                        path_params,
 379                                        query_params,
 380                                        header_params,
 381                                        body=body_params,
 382                                        post_params=form_params,
 383                                        files=local_var_files,
 384                                        response_type='ViewUrl',
 385                                        auth_settings=auth_settings,
 386                                        callback=params.get('callback'),
 387                                        _return_http_data_only=params.get('_return_http_data_only'),
 388                                        _preload_content=params.get('_preload_content', True),
 389                                        _request_timeout=params.get('_request_timeout'),
 390                                        collection_formats=collection_formats)
 391
 392    def create_lock(self, account_id, template_id, **kwargs):
 393        """
 394        Lock a template.
 395        Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.  ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
 396        This method makes a synchronous HTTP request by default. To make an
 397        asynchronous HTTP request, please define a `callback` function
 398        to be invoked when receiving the response.
 399        >>> def callback_function(response):
 400        >>>     pprint(response)
 401        >>>
 402        >>> thread = api.create_lock(account_id, template_id, callback=callback_function)
 403
 404        :param callback function: The callback function
 405            for asynchronous request. (optional)
 406        :param str account_id: The external account number (int) or account ID Guid. (required)
 407        :param str template_id: The ID of the template being accessed. (required)
 408        :param LockRequest lock_request:
 409        :return: LockInformation
 410                 If the method is called asynchronously,
 411                 returns the request thread.
 412        """
 413        kwargs['_return_http_data_only'] = True
 414        if kwargs.get('callback'):
 415            return self.create_lock_with_http_info(account_id, template_id, **kwargs)
 416        else:
 417            (data) = self.create_lock_with_http_info(account_id, template_id, **kwargs)
 418            return data
 419
 420    def create_lock_with_http_info(self, account_id, template_id, **kwargs):
 421        """
 422        Lock a template.
 423        Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.  ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
 424        This method makes a synchronous HTTP request by default. To make an
 425        asynchronous HTTP request, please define a `callback` function
 426        to be invoked when receiving the response.
 427        >>> def callback_function(response):
 428        >>>     pprint(response)
 429        >>>
 430        >>> thread = api.create_lock_with_http_info(account_id, template_id, callback=callback_function)
 431
 432        :param callback function: The callback function
 433            for asynchronous request. (optional)
 434        :param str account_id: The external account number (int) or account ID Guid. (required)
 435        :param str template_id: The ID of the template being accessed. (required)
 436        :param LockRequest lock_request:
 437        :return: LockInformation
 438                 If the method is called asynchronously,
 439                 returns the request thread.
 440        """
 441
 442        all_params = ['account_id', 'template_id', 'lock_request']
 443        all_params.append('callback')
 444        all_params.append('_return_http_data_only')
 445        all_params.append('_preload_content')
 446        all_params.append('_request_timeout')
 447
 448        params = locals()
 449        for key, val in iteritems(params['kwargs']):
 450            if key not in all_params:
 451                raise TypeError(
 452                    "Got an unexpected keyword argument '%s'"
 453                    " to method create_lock" % key
 454                )
 455            params[key] = val
 456        del params['kwargs']
 457        # verify the required parameter 'account_id' is set
 458        if ('account_id' not in params) or (params['account_id'] is None):
 459            raise ValueError("Missing the required parameter `account_id` when calling `create_lock`")
 460        # verify the required parameter 'template_id' is set
 461        if ('template_id' not in params) or (params['template_id'] is None):
 462            raise ValueError("Missing the required parameter `template_id` when calling `create_lock`")
 463
 464
 465        collection_formats = {}
 466
 467        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
 468        path_params = {}
 469        if 'account_id' in params:
 470            path_params['accountId'] = params['account_id']
 471        if 'template_id' in params:
 472            path_params['templateId'] = params['template_id']
 473
 474        query_params = {}
 475
 476        header_params = {}
 477
 478        form_params = []
 479        local_var_files = {}
 480
 481        body_params = None
 482        if 'lock_request' in params:
 483            body_params = params['lock_request']
 484        # HTTP header `Accept`
 485        header_params['Accept'] = self.api_client.\
 486            select_header_accept(['application/json'])
 487
 488        # Authentication setting
 489        auth_settings = []
 490
 491        return self.api_client.call_api(resource_path, 'POST',
 492                                        path_params,
 493                                        query_params,
 494                                        header_params,
 495                                        body=body_params,
 496                                        post_params=form_params,
 497                                        files=local_var_files,
 498                                        response_type='LockInformation',
 499                                        auth_settings=auth_settings,
 500                                        callback=params.get('callback'),
 501                                        _return_http_data_only=params.get('_return_http_data_only'),
 502                                        _preload_content=params.get('_preload_content', True),
 503                                        _request_timeout=params.get('_request_timeout'),
 504                                        collection_formats=collection_formats)
 505
 506    def create_recipients(self, account_id, template_id, **kwargs):
 507        """
 508        Adds tabs for a recipient.
 509        Adds one or more recipients to a template.
 510        This method makes a synchronous HTTP request by default. To make an
 511        asynchronous HTTP request, please define a `callback` function
 512        to be invoked when receiving the response.
 513        >>> def callback_function(response):
 514        >>>     pprint(response)
 515        >>>
 516        >>> thread = api.create_recipients(account_id, template_id, callback=callback_function)
 517
 518        :param callback function: The callback function
 519            for asynchronous request. (optional)
 520        :param str account_id: The external account number (int) or account ID Guid. (required)
 521        :param str template_id: The ID of the template being accessed. (required)
 522        :param str resend_envelope:
 523        :param TemplateRecipients template_recipients:
 524        :return: Recipients
 525                 If the method is called asynchronously,
 526                 returns the request thread.
 527        """
 528        kwargs['_return_http_data_only'] = True
 529        if kwargs.get('callback'):
 530            return self.create_recipients_with_http_info(account_id, template_id, **kwargs)
 531        else:
 532            (data) = self.create_recipients_with_http_info(account_id, template_id, **kwargs)
 533            return data
 534
 535    def create_recipients_with_http_info(self, account_id, template_id, **kwargs):
 536        """
 537        Adds tabs for a recipient.
 538        Adds one or more recipients to a template.
 539        This method makes a synchronous HTTP request by default. To make an
 540        asynchronous HTTP request, please define a `callback` function
 541        to be invoked when receiving the response.
 542        >>> def callback_function(response):
 543        >>>     pprint(response)
 544        >>>
 545        >>> thread = api.create_recipients_with_http_info(account_id, template_id, callback=callback_function)
 546
 547        :param callback function: The callback function
 548            for asynchronous request. (optional)
 549        :param str account_id: The external account number (int) or account ID Guid. (required)
 550        :param str template_id: The ID of the template being accessed. (required)
 551        :param str resend_envelope:
 552        :param TemplateRecipients template_recipients:
 553        :return: Recipients
 554                 If the method is called asynchronously,
 555                 returns the request thread.
 556        """
 557
 558        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
 559        all_params.append('callback')
 560        all_params.append('_return_http_data_only')
 561        all_params.append('_preload_content')
 562        all_params.append('_request_timeout')
 563
 564        params = locals()
 565        for key, val in iteritems(params['kwargs']):
 566            if key not in all_params:
 567                raise TypeError(
 568                    "Got an unexpected keyword argument '%s'"
 569                    " to method create_recipients" % key
 570                )
 571            params[key] = val
 572        del params['kwargs']
 573        # verify the required parameter 'account_id' is set
 574        if ('account_id' not in params) or (params['account_id'] is None):
 575            raise ValueError("Missing the required parameter `account_id` when calling `create_recipients`")
 576        # verify the required parameter 'template_id' is set
 577        if ('template_id' not in params) or (params['template_id'] is None):
 578            raise ValueError("Missing the required parameter `template_id` when calling `create_recipients`")
 579
 580
 581        collection_formats = {}
 582
 583        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
 584        path_params = {}
 585        if 'account_id' in params:
 586            path_params['accountId'] = params['account_id']
 587        if 'template_id' in params:
 588            path_params['templateId'] = params['template_id']
 589
 590        query_params = {}
 591        if 'resend_envelope' in params:
 592            query_params['resend_envelope'] = params['resend_envelope']
 593
 594        header_params = {}
 595
 596        form_params = []
 597        local_var_files = {}
 598
 599        body_params = None
 600        if 'template_recipients' in params:
 601            body_params = params['template_recipients']
 602        # HTTP header `Accept`
 603        header_params['Accept'] = self.api_client.\
 604            select_header_accept(['application/json'])
 605
 606        # Authentication setting
 607        auth_settings = []
 608
 609        return self.api_client.call_api(resource_path, 'POST',
 610                                        path_params,
 611                                        query_params,
 612                                        header_params,
 613                                        body=body_params,
 614                                        post_params=form_params,
 615                                        files=local_var_files,
 616                                        response_type='Recipients',
 617                                        auth_settings=auth_settings,
 618                                        callback=params.get('callback'),
 619                                        _return_http_data_only=params.get('_return_http_data_only'),
 620                                        _preload_content=params.get('_preload_content', True),
 621                                        _request_timeout=params.get('_request_timeout'),
 622                                        collection_formats=collection_formats)
 623
 624    def create_tabs(self, account_id, recipient_id, template_id, **kwargs):
 625        """
 626        Adds tabs for a recipient.
 627        Adds one or more tabs for a recipient.
 628        This method makes a synchronous HTTP request by default. To make an
 629        asynchronous HTTP request, please define a `callback` function
 630        to be invoked when receiving the response.
 631        >>> def callback_function(response):
 632        >>>     pprint(response)
 633        >>>
 634        >>> thread = api.create_tabs(account_id, recipient_id, template_id, callback=callback_function)
 635
 636        :param callback function: The callback function
 637            for asynchronous request. (optional)
 638        :param str account_id: The external account number (int) or account ID Guid. (required)
 639        :param str recipient_id: The ID of the recipient being accessed. (required)
 640        :param str template_id: The ID of the template being accessed. (required)
 641        :param TemplateTabs template_tabs:
 642        :return: Tabs
 643                 If the method is called asynchronously,
 644                 returns the request thread.
 645        """
 646        kwargs['_return_http_data_only'] = True
 647        if kwargs.get('callback'):
 648            return self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
 649        else:
 650            (data) = self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
 651            return data
 652
 653    def create_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
 654        """
 655        Adds tabs for a recipient.
 656        Adds one or more tabs for a recipient.
 657        This method makes a synchronous HTTP request by default. To make an
 658        asynchronous HTTP request, please define a `callback` function
 659        to be invoked when receiving the response.
 660        >>> def callback_function(response):
 661        >>>     pprint(response)
 662        >>>
 663        >>> thread = api.create_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
 664
 665        :param callback function: The callback function
 666            for asynchronous request. (optional)
 667        :param str account_id: The external account number (int) or account ID Guid. (required)
 668        :param str recipient_id: The ID of the recipient being accessed. (required)
 669        :param str template_id: The ID of the template being accessed. (required)
 670        :param TemplateTabs template_tabs:
 671        :return: Tabs
 672                 If the method is called asynchronously,
 673                 returns the request thread.
 674        """
 675
 676        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
 677        all_params.append('callback')
 678        all_params.append('_return_http_data_only')
 679        all_params.append('_preload_content')
 680        all_params.append('_request_timeout')
 681
 682        params = locals()
 683        for key, val in iteritems(params['kwargs']):
 684            if key not in all_params:
 685                raise TypeError(
 686                    "Got an unexpected keyword argument '%s'"
 687                    " to method create_tabs" % key
 688                )
 689            params[key] = val
 690        del params['kwargs']
 691        # verify the required parameter 'account_id' is set
 692        if ('account_id' not in params) or (params['account_id'] is None):
 693            raise ValueError("Missing the required parameter `account_id` when calling `create_tabs`")
 694        # verify the required parameter 'recipient_id' is set
 695        if ('recipient_id' not in params) or (params['recipient_id'] is None):
 696            raise ValueError("Missing the required parameter `recipient_id` when calling `create_tabs`")
 697        # verify the required parameter 'template_id' is set
 698        if ('template_id' not in params) or (params['template_id'] is None):
 699            raise ValueError("Missing the required parameter `template_id` when calling `create_tabs`")
 700
 701
 702        collection_formats = {}
 703
 704        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
 705        path_params = {}
 706        if 'account_id' in params:
 707            path_params['accountId'] = params['account_id']
 708        if 'recipient_id' in params:
 709            path_params['recipientId'] = params['recipient_id']
 710        if 'template_id' in params:
 711            path_params['templateId'] = params['template_id']
 712
 713        query_params = {}
 714
 715        header_params = {}
 716
 717        form_params = []
 718        local_var_files = {}
 719
 720        body_params = None
 721        if 'template_tabs' in params:
 722            body_params = params['template_tabs']
 723        # HTTP header `Accept`
 724        header_params['Accept'] = self.api_client.\
 725            select_header_accept(['application/json'])
 726
 727        # Authentication setting
 728        auth_settings = []
 729
 730        return self.api_client.call_api(resource_path, 'POST',
 731                                        path_params,
 732                                        query_params,
 733                                        header_params,
 734                                        body=body_params,
 735                                        post_params=form_params,
 736                                        files=local_var_files,
 737                                        response_type='Tabs',
 738                                        auth_settings=auth_settings,
 739                                        callback=params.get('callback'),
 740                                        _return_http_data_only=params.get('_return_http_data_only'),
 741                                        _preload_content=params.get('_preload_content', True),
 742                                        _request_timeout=params.get('_request_timeout'),
 743                                        collection_formats=collection_formats)
 744
 745    def create_template(self, account_id, **kwargs):
 746        """
 747        Creates an envelope from a template.
 748        Creates a template definition using a multipart request.  ###Template Email Subject Merge Fields  Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.  The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.  Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.  To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_UserName]]  Example:  `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",`  To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_Email]]  Example:  `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`   In both cases the <roleName> is the recipient's contents of the `roleName` property in the template.  For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
 749        This method makes a synchronous HTTP request by default. To make an
 750        asynchronous HTTP request, please define a `callback` function
 751        to be invoked when receiving the response.
 752        >>> def callback_function(response):
 753        >>>     pprint(response)
 754        >>>
 755        >>> thread = api.create_template(account_id, callback=callback_function)
 756
 757        :param callback function: The callback function
 758            for asynchronous request. (optional)
 759        :param str account_id: The external account number (int) or account ID Guid. (required)
 760        :param EnvelopeTemplate envelope_template:
 761        :return: TemplateSummary
 762                 If the method is called asynchronously,
 763                 returns the request thread.
 764        """
 765        kwargs['_return_http_data_only'] = True
 766        if kwargs.get('callback'):
 767            return self.create_template_with_http_info(account_id, **kwargs)
 768        else:
 769            (data) = self.create_template_with_http_info(account_id, **kwargs)
 770            return data
 771
 772    def create_template_with_http_info(self, account_id, **kwargs):
 773        """
 774        Creates an envelope from a template.
 775        Creates a template definition using a multipart request.  ###Template Email Subject Merge Fields  Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.  The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.  Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.  To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_UserName]]  Example:  `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",`  To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_Email]]  Example:  `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`   In both cases the <roleName> is the recipient's contents of the `roleName` property in the template.  For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
 776        This method makes a synchronous HTTP request by default. To make an
 777        asynchronous HTTP request, please define a `callback` function
 778        to be invoked when receiving the response.
 779        >>> def callback_function(response):
 780        >>>     pprint(response)
 781        >>>
 782        >>> thread = api.create_template_with_http_info(account_id, callback=callback_function)
 783
 784        :param callback function: The callback function
 785            for asynchronous request. (optional)
 786        :param str account_id: The external account number (int) or account ID Guid. (required)
 787        :param EnvelopeTemplate envelope_template:
 788        :return: TemplateSummary
 789                 If the method is called asynchronously,
 790                 returns the request thread.
 791        """
 792
 793        all_params = ['account_id', 'envelope_template']
 794        all_params.append('callback')
 795        all_params.append('_return_http_data_only')
 796        all_params.append('_preload_content')
 797        all_params.append('_request_timeout')
 798
 799        params = locals()
 800        for key, val in iteritems(params['kwargs']):
 801            if key not in all_params:
 802                raise TypeError(
 803                    "Got an unexpected keyword argument '%s'"
 804                    " to method create_template" % key
 805                )
 806            params[key] = val
 807        del params['kwargs']
 808        # verify the required parameter 'account_id' is set
 809        if ('account_id' not in params) or (params['account_id'] is None):
 810            raise ValueError("Missing the required parameter `account_id` when calling `create_template`")
 811
 812
 813        collection_formats = {}
 814
 815        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
 816        path_params = {}
 817        if 'account_id' in params:
 818            path_params['accountId'] = params['account_id']
 819
 820        query_params = {}
 821
 822        header_params = {}
 823
 824        form_params = []
 825        local_var_files = {}
 826
 827        body_params = None
 828        if 'envelope_template' in params:
 829            body_params = params['envelope_template']
 830        # HTTP header `Accept`
 831        header_params['Accept'] = self.api_client.\
 832            select_header_accept(['application/json'])
 833
 834        # Authentication setting
 835        auth_settings = []
 836
 837        return self.api_client.call_api(resource_path, 'POST',
 838                                        path_params,
 839                                        query_params,
 840                                        header_params,
 841                                        body=body_params,
 842                                        post_params=form_params,
 843                                        files=local_var_files,
 844                                        response_type='TemplateSummary',
 845                                        auth_settings=auth_settings,
 846                                        callback=params.get('callback'),
 847                                        _return_http_data_only=params.get('_return_http_data_only'),
 848                                        _preload_content=params.get('_preload_content', True),
 849                                        _request_timeout=params.get('_request_timeout'),
 850                                        collection_formats=collection_formats)
 851
 852    def create_template_document_responsive_html_preview(self, account_id, document_id, template_id, **kwargs):
 853        """
 854        Post Responsive HTML Preview for a document in a template.
 855        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
 856        This method makes a synchronous HTTP request by default. To make an
 857        asynchronous HTTP request, please define a `callback` function
 858        to be invoked when receiving the response.
 859        >>> def callback_function(response):
 860        >>>     pprint(response)
 861        >>>
 862        >>> thread = api.create_template_document_responsive_html_preview(account_id, document_id, template_id, callback=callback_function)
 863
 864        :param callback function: The callback function
 865            for asynchronous request. (optional)
 866        :param str account_id: The external account number (int) or account ID Guid. (required)
 867        :param str document_id: The ID of the document being accessed. (required)
 868        :param str template_id: The ID of the template being accessed. (required)
 869        :param DocumentHtmlDefinition document_html_definition:
 870        :return: DocumentHtmlDefinitions
 871                 If the method is called asynchronously,
 872                 returns the request thread.
 873        """
 874        kwargs['_return_http_data_only'] = True
 875        if kwargs.get('callback'):
 876            return self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs)
 877        else:
 878            (data) = self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs)
 879            return data
 880
 881    def create_template_document_responsive_html_preview_with_http_info(self, account_id, document_id, template_id, **kwargs):
 882        """
 883        Post Responsive HTML Preview for a document in a template.
 884        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
 885        This method makes a synchronous HTTP request by default. To make an
 886        asynchronous HTTP request, please define a `callback` function
 887        to be invoked when receiving the response.
 888        >>> def callback_function(response):
 889        >>>     pprint(response)
 890        >>>
 891        >>> thread = api.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, callback=callback_function)
 892
 893        :param callback function: The callback function
 894            for asynchronous request. (optional)
 895        :param str account_id: The external account number (int) or account ID Guid. (required)
 896        :param str document_id: The ID of the document being accessed. (required)
 897        :param str template_id: The ID of the template being accessed. (required)
 898        :param DocumentHtmlDefinition document_html_definition:
 899        :return: DocumentHtmlDefinitions
 900                 If the method is called asynchronously,
 901                 returns the request thread.
 902        """
 903
 904        all_params = ['account_id', 'document_id', 'template_id', 'document_html_definition']
 905        all_params.append('callback')
 906        all_params.append('_return_http_data_only')
 907        all_params.append('_preload_content')
 908        all_params.append('_request_timeout')
 909
 910        params = locals()
 911        for key, val in iteritems(params['kwargs']):
 912            if key not in all_params:
 913                raise TypeError(
 914                    "Got an unexpected keyword argument '%s'"
 915                    " to method create_template_document_responsive_html_preview" % key
 916                )
 917            params[key] = val
 918        del params['kwargs']
 919        # verify the required parameter 'account_id' is set
 920        if ('account_id' not in params) or (params['account_id'] is None):
 921            raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_responsive_html_preview`")
 922        # verify the required parameter 'document_id' is set
 923        if ('document_id' not in params) or (params['document_id'] is None):
 924            raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_responsive_html_preview`")
 925        # verify the required parameter 'template_id' is set
 926        if ('template_id' not in params) or (params['template_id'] is None):
 927            raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_responsive_html_preview`")
 928
 929
 930        collection_formats = {}
 931
 932        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/responsive_html_preview'.replace('{format}', 'json')
 933        path_params = {}
 934        if 'account_id' in params:
 935            path_params['accountId'] = params['account_id']
 936        if 'document_id' in params:
 937            path_params['documentId'] = params['document_id']
 938        if 'template_id' in params:
 939            path_params['templateId'] = params['template_id']
 940
 941        query_params = {}
 942
 943        header_params = {}
 944
 945        form_params = []
 946        local_var_files = {}
 947
 948        body_params = None
 949        if 'document_html_definition' in params:
 950            body_params = params['document_html_definition']
 951        # HTTP header `Accept`
 952        header_params['Accept'] = self.api_client.\
 953            select_header_accept(['application/json'])
 954
 955        # Authentication setting
 956        auth_settings = []
 957
 958        return self.api_client.call_api(resource_path, 'POST',
 959                                        path_params,
 960                                        query_params,
 961                                        header_params,
 962                                        body=body_params,
 963                                        post_params=form_params,
 964                                        files=local_var_files,
 965                                        response_type='DocumentHtmlDefinitions',
 966                                        auth_settings=auth_settings,
 967                                        callback=params.get('callback'),
 968                                        _return_http_data_only=params.get('_return_http_data_only'),
 969                                        _preload_content=params.get('_preload_content', True),
 970                                        _request_timeout=params.get('_request_timeout'),
 971                                        collection_formats=collection_formats)
 972
 973    def create_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
 974        """
 975        Adds the tabs to a tempate
 976        Adds tabs to the document specified by `documentId` in the template specified by `templateId`.  In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this:  ``` {   \"prefillTabs\": {     \"textTabs\": [       {         \"value\": \"a prefill text tab\",         \"pageNumber\": \"1\",         \"documentId\": \"1\",         \"xPosition\": 316,         \"yPosition\": 97       }     ]   } } ``` 
 977        This method makes a synchronous HTTP request by default. To make an
 978        asynchronous HTTP request, please define a `callback` function
 979        to be invoked when receiving the response.
 980        >>> def callback_function(response):
 981        >>>     pprint(response)
 982        >>>
 983        >>> thread = api.create_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
 984
 985        :param callback function: The callback function
 986            for asynchronous request. (optional)
 987        :param str account_id: The external account number (int) or account ID Guid. (required)
 988        :param str document_id: The ID of the document being accessed. (required)
 989        :param str template_id: The ID of the template being accessed. (required)
 990        :param TemplateTabs template_tabs:
 991        :return: Tabs
 992                 If the method is called asynchronously,
 993                 returns the request thread.
 994        """
 995        kwargs['_return_http_data_only'] = True
 996        if kwargs.get('callback'):
 997            return self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
 998        else:
 999            (data) = self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
1000            return data
1001
1002    def create_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
1003        """
1004        Adds the tabs to a tempate
1005        Adds tabs to the document specified by `documentId` in the template specified by `templateId`.  In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this:  ``` {   \"prefillTabs\": {     \"textTabs\": [       {         \"value\": \"a prefill text tab\",         \"pageNumber\": \"1\",         \"documentId\": \"1\",         \"xPosition\": 316,         \"yPosition\": 97       }     ]   } } ``` 
1006        This method makes a synchronous HTTP request by default. To make an
1007        asynchronous HTTP request, please define a `callback` function
1008        to be invoked when receiving the response.
1009        >>> def callback_function(response):
1010        >>>     pprint(response)
1011        >>>
1012        >>> thread = api.create_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
1013
1014        :param callback function: The callback function
1015            for asynchronous request. (optional)
1016        :param str account_id: The external account number (int) or account ID Guid. (required)
1017        :param str document_id: The ID of the document being accessed. (required)
1018        :param str template_id: The ID of the template being accessed. (required)
1019        :param TemplateTabs template_tabs:
1020        :return: Tabs
1021                 If the method is called asynchronously,
1022                 returns the request thread.
1023        """
1024
1025        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
1026        all_params.append('callback')
1027        all_params.append('_return_http_data_only')
1028        all_params.append('_preload_content')
1029        all_params.append('_request_timeout')
1030
1031        params = locals()
1032        for key, val in iteritems(params['kwargs']):
1033            if key not in all_params:
1034                raise TypeError(
1035                    "Got an unexpected keyword argument '%s'"
1036                    " to method create_template_document_tabs" % key
1037                )
1038            params[key] = val
1039        del params['kwargs']
1040        # verify the required parameter 'account_id' is set
1041        if ('account_id' not in params) or (params['account_id'] is None):
1042            raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_tabs`")
1043        # verify the required parameter 'document_id' is set
1044        if ('document_id' not in params) or (params['document_id'] is None):
1045            raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_tabs`")
1046        # verify the required parameter 'template_id' is set
1047        if ('template_id' not in params) or (params['template_id'] is None):
1048            raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_tabs`")
1049
1050
1051        collection_formats = {}
1052
1053        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
1054        path_params = {}
1055        if 'account_id' in params:
1056            path_params['accountId'] = params['account_id']
1057        if 'document_id' in params:
1058            path_params['documentId'] = params['document_id']
1059        if 'template_id' in params:
1060            path_params['templateId'] = params['template_id']
1061
1062        query_params = {}
1063
1064        header_params = {}
1065
1066        form_params = []
1067        local_var_files = {}
1068
1069        body_params = None
1070        if 'template_tabs' in params:
1071            body_params = params['template_tabs']
1072        # HTTP header `Accept`
1073        header_params['Accept'] = self.api_client.\
1074            select_header_accept(['application/json'])
1075
1076        # Authentication setting
1077        auth_settings = []
1078
1079        return self.api_client.call_api(resource_path, 'POST',
1080                                        path_params,
1081                                        query_params,
1082                                        header_params,
1083                                        body=body_params,
1084                                        post_params=form_params,
1085                                        files=local_var_files,
1086                                        response_type='Tabs',
1087                                        auth_settings=auth_settings,
1088                                        callback=params.get('callback'),
1089                                        _return_http_data_only=params.get('_return_http_data_only'),
1090                                        _preload_content=params.get('_preload_content', True),
1091                                        _request_timeout=params.get('_request_timeout'),
1092                                        collection_formats=collection_formats)
1093
1094    def create_template_recipient_preview(self, account_id, template_id, **kwargs):
1095        """
1096        Provides a URL to start a recipient view of the Envelope UI
1097        This method returns a URL for a template recipient preview  in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
1098        This method makes a synchronous HTTP request by default. To make an
1099        asynchronous HTTP request, please define a `callback` function
1100        to be invoked when receiving the response.
1101        >>> def callback_function(response):
1102        >>>     pprint(response)
1103        >>>
1104        >>> thread = api.create_template_recipient_preview(account_id, template_id, callback=callback_function)
1105
1106        :param callback function: The callback function
1107            for asynchronous request. (optional)
1108        :param str account_id: The external account number (int) or account ID Guid. (required)
1109        :param str template_id: The ID of the template being accessed. (required)
1110        :param RecipientPreviewRequest recipient_preview_request:
1111        :return: ViewUrl
1112                 If the method is called asynchronously,
1113                 returns the request thread.
1114        """
1115        kwargs['_return_http_data_only'] = True
1116        if kwargs.get('callback'):
1117            return self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs)
1118        else:
1119            (data) = self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs)
1120            return data
1121
1122    def create_template_recipient_preview_with_http_info(self, account_id, template_id, **kwargs):
1123        """
1124        Provides a URL to start a recipient view of the Envelope UI
1125        This method returns a URL for a template recipient preview  in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
1126        This method makes a synchronous HTTP request by default. To make an
1127        asynchronous HTTP request, please define a `callback` function
1128        to be invoked when receiving the response.
1129        >>> def callback_function(response):
1130        >>>     pprint(response)
1131        >>>
1132        >>> thread = api.create_template_recipient_preview_with_http_info(account_id, template_id, callback=callback_function)
1133
1134        :param callback function: The callback function
1135            for asynchronous request. (optional)
1136        :param str account_id: The external account number (int) or account ID Guid. (required)
1137        :param str template_id: The ID of the template being accessed. (required)
1138        :param RecipientPreviewRequest recipient_preview_request:
1139        :return: ViewUrl
1140                 If the method is called asynchronously,
1141                 returns the request thread.
1142        """
1143
1144        all_params = ['account_id', 'template_id', 'recipient_preview_request']
1145        all_params.append('callback')
1146        all_params.append('_return_http_data_only')
1147        all_params.append('_preload_content')
1148        all_params.append('_request_timeout')
1149
1150        params = locals()
1151        for key, val in iteritems(params['kwargs']):
1152            if key not in all_params:
1153                raise TypeError(
1154                    "Got an unexpected keyword argument '%s'"
1155                    " to method create_template_recipient_preview" % key
1156                )
1157            params[key] = val
1158        del params['kwargs']
1159        # verify the required parameter 'account_id' is set
1160        if ('account_id' not in params) or (params['account_id'] is None):
1161            raise ValueError("Missing the required parameter `account_id` when calling `create_template_recipient_preview`")
1162        # verify the required parameter 'template_id' is set
1163        if ('template_id' not in params) or (params['template_id'] is None):
1164            raise ValueError("Missing the required parameter `template_id` when calling `create_template_recipient_preview`")
1165
1166
1167        collection_formats = {}
1168
1169        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/recipient_preview'.replace('{format}', 'json')
1170        path_params = {}
1171        if 'account_id' in params:
1172            path_params['accountId'] = params['account_id']
1173        if 'template_id' in params:
1174            path_params['templateId'] = params['template_id']
1175
1176        query_params = {}
1177
1178        header_params = {}
1179
1180        form_params = []
1181        local_var_files = {}
1182
1183        body_params = None
1184        if 'recipient_preview_request' in params:
1185            body_params = params['recipient_preview_request']
1186        # HTTP header `Accept`
1187        header_params['Accept'] = self.api_client.\
1188            select_header_accept(['application/json'])
1189
1190        # Authentication setting
1191        auth_settings = []
1192
1193        return self.api_client.call_api(resource_path, 'POST',
1194                                        path_params,
1195                                        query_params,
1196                                        header_params,
1197                                        body=body_params,
1198                                        post_params=form_params,
1199                                        files=local_var_files,
1200                                        response_type='ViewUrl',
1201                                        auth_settings=auth_settings,
1202                                        callback=params.get('callback'),
1203                                        _return_http_data_only=params.get('_return_http_data_only'),
1204                                        _preload_content=params.get('_preload_content', True),
1205                                        _request_timeout=params.get('_request_timeout'),
1206                                        collection_formats=collection_formats)
1207
1208    def create_template_responsive_html_preview(self, account_id, template_id, **kwargs):
1209        """
1210        Get Responsive HTML Preview for all documents in a template.
1211        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
1212        This method makes a synchronous HTTP request by default. To make an
1213        asynchronous HTTP request, please define a `callback` function
1214        to be invoked when receiving the response.
1215        >>> def callback_function(response):
1216        >>>     pprint(response)
1217        >>>
1218        >>> thread = api.create_template_responsive_html_preview(account_id, template_id, callback=callback_function)
1219
1220        :param callback function: The callback function
1221            for asynchronous request. (optional)
1222        :param str account_id: The external account number (int) or account ID Guid. (required)
1223        :param str template_id: The ID of the template being accessed. (required)
1224        :param DocumentHtmlDefinition document_html_definition:
1225        :return: DocumentHtmlDefinitions
1226                 If the method is called asynchronously,
1227                 returns the request thread.
1228        """
1229        kwargs['_return_http_data_only'] = True
1230        if kwargs.get('callback'):
1231            return self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs)
1232        else:
1233            (data) = self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs)
1234            return data
1235
1236    def create_template_responsive_html_preview_with_http_info(self, account_id, template_id, **kwargs):
1237        """
1238        Get Responsive HTML Preview for all documents in a template.
1239        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
1240        This method makes a synchronous HTTP request by default. To make an
1241        asynchronous HTTP request, please define a `callback` function
1242        to be invoked when receiving the response.
1243        >>> def callback_function(response):
1244        >>>     pprint(response)
1245        >>>
1246        >>> thread = api.create_template_responsive_html_preview_with_http_info(account_id, template_id, callback=callback_function)
1247
1248        :param callback function: The callback function
1249            for asynchronous request. (optional)
1250        :param str account_id: The external account number (int) or account ID Guid. (required)
1251        :param str template_id: The ID of the template being accessed. (required)
1252        :param DocumentHtmlDefinition document_html_definition:
1253        :return: DocumentHtmlDefinitions
1254                 If the method is called asynchronously,
1255                 returns the request thread.
1256        """
1257
1258        all_params = ['account_id', 'template_id', 'document_html_definition']
1259        all_params.append('callback')
1260        all_params.append('_return_http_data_only')
1261        all_params.append('_preload_content')
1262        all_params.append('_request_timeout')
1263
1264        params = locals()
1265        for key, val in iteritems(params['kwargs']):
1266            if key not in all_params:
1267                raise TypeError(
1268                    "Got an unexpected keyword argument '%s'"
1269                    " to method create_template_responsive_html_preview" % key
1270                )
1271            params[key] = val
1272        del params['kwargs']
1273        # verify the required parameter 'account_id' is set
1274        if ('account_id' not in params) or (params['account_id'] is None):
1275            raise ValueError("Missing the required parameter `account_id` when calling `create_template_responsive_html_preview`")
1276        # verify the required parameter 'template_id' is set
1277        if ('template_id' not in params) or (params['template_id'] is None):
1278            raise ValueError("Missing the required parameter `template_id` when calling `create_template_responsive_html_preview`")
1279
1280
1281        collection_formats = {}
1282
1283        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/responsive_html_preview'.replace('{format}', 'json')
1284        path_params = {}
1285        if 'account_id' in params:
1286            path_params['accountId'] = params['account_id']
1287        if 'template_id' in params:
1288            path_params['templateId'] = params['template_id']
1289
1290        query_params = {}
1291
1292        header_params = {}
1293
1294        form_params = []
1295        local_var_files = {}
1296
1297        body_params = None
1298        if 'document_html_definition' in params:
1299            body_params = params['document_html_definition']
1300        # HTTP header `Accept`
1301        header_params['Accept'] = self.api_client.\
1302            select_header_accept(['application/json'])
1303
1304        # Authentication setting
1305        auth_settings = []
1306
1307        return self.api_client.call_api(resource_path, 'POST',
1308                                        path_params,
1309                                        query_params,
1310                                        header_params,
1311                                        body=body_params,
1312                                        post_params=form_params,
1313                                        files=local_var_files,
1314                                        response_type='DocumentHtmlDefinitions',
1315                                        auth_settings=auth_settings,
1316                                        callback=params.get('callback'),
1317                                        _return_http_data_only=params.get('_return_http_data_only'),
1318                                        _preload_content=params.get('_preload_content', True),
1319                                        _request_timeout=params.get('_request_timeout'),
1320                                        collection_formats=collection_formats)
1321
1322    def delete_custom_fields(self, account_id, template_id, **kwargs):
1323        """
1324        Deletes envelope custom fields in a template.
1325        Deletes envelope custom fields in a template.
1326        This method makes a synchronous HTTP request by default. To make an
1327        asynchronous HTTP request, please define a `callback` function
1328        to be invoked when receiving the response.
1329        >>> def callback_function(response):
1330        >>>     pprint(response)
1331        >>>
1332        >>> thread = api.delete_custom_fields(account_id, template_id, callback=callback_function)
1333
1334        :param callback function: The callback function
1335            for asynchronous request. (optional)
1336        :param str account_id: The external account number (int) or account ID Guid. (required)
1337        :param str template_id: The ID of the template being accessed. (required)
1338        :param TemplateCustomFields template_custom_fields:
1339        :return: CustomFields
1340                 If the method is called asynchronously,
1341                 returns the request thread.
1342        """
1343        kwargs['_return_http_data_only'] = True
1344        if kwargs.get('callback'):
1345            return self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs)
1346        else:
1347            (data) = self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs)
1348            return data
1349
1350    def delete_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
1351        """
1352        Deletes envelope custom fields in a template.
1353        Deletes envelope custom fields in a template.
1354        This method makes a synchronous HTTP request by default. To make an
1355        asynchronous HTTP request, please define a `callback` function
1356        to be invoked when receiving the response.
1357        >>> def callback_function(response):
1358        >>>     pprint(response)
1359        >>>
1360        >>> thread = api.delete_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
1361
1362        :param callback function: The callback function
1363            for asynchronous request. (optional)
1364        :param str account_id: The external account number (int) or account ID Guid. (required)
1365        :param str template_id: The ID of the template being accessed. (required)
1366        :param TemplateCustomFields template_custom_fields:
1367        :return: CustomFields
1368                 If the method is called asynchronously,
1369                 returns the request thread.
1370        """
1371
1372        all_params = ['account_id', 'template_id', 'template_custom_fields']
1373        all_params.append('callback')
1374        all_params.append('_return_http_data_only')
1375        all_params.append('_preload_content')
1376        all_params.append('_request_timeout')
1377
1378        params = locals()
1379        for key, val in iteritems(params['kwargs']):
1380            if key not in all_params:
1381                raise TypeError(
1382                    "Got an unexpected keyword argument '%s'"
1383                    " to method delete_custom_fields" % key
1384                )
1385            params[key] = val
1386        del params['kwargs']
1387        # verify the required parameter 'account_id' is set
1388        if ('account_id' not in params) or (params['account_id'] is None):
1389            raise ValueError("Missing the required parameter `account_id` when calling `delete_custom_fields`")
1390        # verify the required parameter 'template_id' is set
1391        if ('template_id' not in params) or (params['template_id'] is None):
1392            raise ValueError("Missing the required parameter `template_id` when calling `delete_custom_fields`")
1393
1394
1395        collection_formats = {}
1396
1397        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
1398        path_params = {}
1399        if 'account_id' in params:
1400            path_params['accountId'] = params['account_id']
1401        if 'template_id' in params:
1402            path_params['templateId'] = params['template_id']
1403
1404        query_params = {}
1405
1406        header_params = {}
1407
1408        form_params = []
1409        local_var_files = {}
1410
1411        body_params = None
1412        if 'template_custom_fields' in params:
1413            body_params = params['template_custom_fields']
1414        # HTTP header `Accept`
1415        header_params['Accept'] = self.api_client.\
1416            select_header_accept(['application/json'])
1417
1418        # Authentication setting
1419        auth_settings = []
1420
1421        return self.api_client.call_api(resource_path, 'DELETE',
1422                                        path_params,
1423                                        query_params,
1424                                        header_params,
1425                                        body=body_params,
1426                                        post_params=form_params,
1427                                        files=local_var_files,
1428                                        response_type='CustomFields',
1429                                        auth_settings=auth_settings,
1430                                        callback=params.get('callback'),
1431                                        _return_http_data_only=params.get('_return_http_data_only'),
1432                                        _preload_content=params.get('_preload_content', True),
1433                                        _request_timeout=params.get('_request_timeout'),
1434                                        collection_formats=collection_formats)
1435
1436    def delete_document_fields(self, account_id, document_id, template_id, **kwargs):
1437        """
1438        Deletes custom document fields from an existing template document.
1439        Deletes custom document fields from an existing template document.
1440        This method makes a synchronous HTTP request by default. To make an
1441        asynchronous HTTP request, please define a `callback` function
1442        to be invoked when receiving the response.
1443        >>> def callback_function(response):
1444        >>>     pprint(response)
1445        >>>
1446        >>> thread = api.delete_document_fields(account_id, document_id, template_id, callback=callback_function)
1447
1448        :param callback function: The callback function
1449            for asynchronous request. (optional)
1450        :param str account_id: The external account number (int) or account ID Guid. (required)
1451        :param str document_id: The ID of the document being accessed. (required)
1452        :param str template_id: The ID of the template being accessed. (required)
1453        :param DocumentFieldsInformation document_fields_information:
1454        :return: DocumentFieldsInformation
1455                 If the method is called asynchronously,
1456                 returns the request thread.
1457        """
1458        kwargs['_return_http_data_only'] = True
1459        if kwargs.get('callback'):
1460            return self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
1461        else:
1462            (data) = self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
1463            return data
1464
1465    def delete_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
1466        """
1467        Deletes custom document fields from an existing template document.
1468        Deletes custom document fields from an existing template document.
1469        This method makes a synchronous HTTP request by default. To make an
1470        asynchronous HTTP request, please define a `callback` function
1471        to be invoked when receiving the response.
1472        >>> def callback_function(response):
1473        >>>     pprint(response)
1474        >>>
1475        >>> thread = api.delete_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
1476
1477        :param callback function: The callback function
1478            for asynchronous request. (optional)
1479        :param str account_id: The external account number (int) or account ID Guid. (required)
1480        :param str document_id: The ID of the document being accessed. (required)
1481        :param str template_id: The ID of the template being accessed. (required)
1482        :param DocumentFieldsInformation document_fields_information:
1483        :return: DocumentFieldsInformation
1484                 If the method is called asynchronously,
1485                 returns the request thread.
1486        """
1487
1488        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
1489        all_params.append('callback')
1490        all_params.append('_return_http_data_only')
1491        all_params.append('_preload_content')
1492        all_params.append('_request_timeout')
1493
1494        params = locals()
1495        for key, val in iteritems(params['kwargs']):
1496            if key not in all_params:
1497                raise TypeError(
1498                    "Got an unexpected keyword argument '%s'"
1499                    " to method delete_document_fields" % key
1500                )
1501            params[key] = val
1502        del params['kwargs']
1503        # verify the required parameter 'account_id' is set
1504        if ('account_id' not in params) or (params['account_id'] is None):
1505            raise ValueError("Missing the required parameter `account_id` when calling `delete_document_fields`")
1506        # verify the required parameter 'document_id' is set
1507        if ('document_id' not in params) or (params['document_id'] is None):
1508            raise ValueError("Missing the required parameter `document_id` when calling `delete_document_fields`")
1509        # verify the required parameter 'template_id' is set
1510        if ('template_id' not in params) or (params['template_id'] is None):
1511            raise ValueError("Missing the required parameter `template_id` when calling `delete_document_fields`")
1512
1513
1514        collection_formats = {}
1515
1516        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
1517        path_params = {}
1518        if 'account_id' in params:
1519            path_params['accountId'] = params['account_id']
1520        if 'document_id' in params:
1521            path_params['documentId'] = params['document_id']
1522        if 'template_id' in params:
1523            path_params['templateId'] = params['template_id']
1524
1525        query_params = {}
1526
1527        header_params = {}
1528
1529        form_params = []
1530        local_var_files = {}
1531
1532        body_params = None
1533        if 'document_fields_information' in params:
1534            body_params = params['document_fields_information']
1535        # HTTP header `Accept`
1536        header_params['Accept'] = self.api_client.\
1537            select_header_accept(['application/json'])
1538
1539        # Authentication setting
1540        auth_settings = []
1541
1542        return self.api_client.call_api(resource_path, 'DELETE',
1543                                        path_params,
1544                                        query_params,
1545                                        header_params,
1546                                        body=body_params,
1547                                        post_params=form_params,
1548                                        files=local_var_files,
1549                                        response_type='DocumentFieldsInformation',
1550                                        auth_settings=auth_settings,
1551                                        callback=params.get('callback'),
1552                                        _return_http_data_only=params.get('_return_http_data_only'),
1553                                        _preload_content=params.get('_preload_content', True),
1554                                        _request_timeout=params.get('_request_timeout'),
1555                                        collection_formats=collection_formats)
1556
1557    def delete_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
1558        """
1559        Deletes a page from a document in an template.
1560        Deletes a page from a document in a template based on the page number.
1561        This method makes a synchronous HTTP request by default. To make an
1562        asynchronous HTTP request, please define a `callback` function
1563        to be invoked when receiving the response.
1564        >>> def callback_function(response):
1565        >>>     pprint(response)
1566        >>>
1567        >>> thread = api.delete_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
1568
1569        :param callback function: The callback function
1570            for asynchronous request. (optional)
1571        :param str account_id: The external account number (int) or account ID Guid. (required)
1572        :param str document_id: The ID of the document being accessed. (required)
1573        :param str page_number: The page number being accessed. (required)
1574        :param str template_id: The ID of the template being accessed. (required)
1575        :param PageRequest page_request:
1576        :return: None
1577                 If the method is called asynchronously,
1578                 returns the request thread.
1579        """
1580        kwargs['_return_http_data_only'] = True
1581        if kwargs.get('callback'):
1582            return self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
1583        else:
1584            (data) = self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
1585            return data
1586
1587    def delete_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
1588        """
1589        Deletes a page from a document in an template.
1590        Deletes a page from a document in a template based on the page number.
1591        This method makes a synchronous HTTP request by default. To make an
1592        asynchronous HTTP request, please define a `callback` function
1593        to be invoked when receiving the response.
1594        >>> def callback_function(response):
1595        >>>     pprint(response)
1596        >>>
1597        >>> thread = api.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
1598
1599        :param callback function: The callback function
1600            for asynchronous request. (optional)
1601        :param str account_id: The external account number (int) or account ID Guid. (required)
1602        :param str document_id: The ID of the document being accessed. (required)
1603        :param str page_number: The page number being accessed. (required)
1604        :param str template_id: The ID of the template being accessed. (required)
1605        :param PageRequest page_request:
1606        :return: None
1607                 If the method is called asynchronously,
1608                 returns the request thread.
1609        """
1610
1611        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
1612        all_params.append('callback')
1613        all_params.append('_return_http_data_only')
1614        all_params.append('_preload_content')
1615        all_params.append('_request_timeout')
1616
1617        params = locals()
1618        for key, val in iteritems(params['kwargs']):
1619            if key not in all_params:
1620                raise TypeError(
1621                    "Got an unexpected keyword argument '%s'"
1622                    " to method delete_document_page" % key
1623                )
1624            params[key] = val
1625        del params['kwargs']
1626        # verify the required parameter 'account_id' is set
1627        if ('account_id' not in params) or (params['account_id'] is None):
1628            raise ValueError("Missing the required parameter `account_id` when calling `delete_document_page`")
1629        # verify the required parameter 'document_id' is set
1630        if ('document_id' not in params) or (params['document_id'] is None):
1631            raise ValueError("Missing the required parameter `document_id` when calling `delete_document_page`")
1632        # verify the required parameter 'page_number' is set
1633        if ('page_number' not in params) or (params['page_number'] is None):
1634            raise ValueError("Missing the required parameter `page_number` when calling `delete_document_page`")
1635        # verify the required parameter 'template_id' is set
1636        if ('template_id' not in params) or (params['template_id'] is None):
1637            raise ValueError("Missing the required parameter `template_id` when calling `delete_document_page`")
1638
1639
1640        collection_formats = {}
1641
1642        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}'.replace('{format}', 'json')
1643        path_params = {}
1644        if 'account_id' in params:
1645            path_params['accountId'] = params['account_id']
1646        if 'document_id' in params:
1647            path_params['documentId'] = params['document_id']
1648        if 'page_number' in params:
1649            path_params['pageNumber'] = params['page_number']
1650        if 'template_id' in params:
1651            path_params['templateId'] = params['template_id']
1652
1653        query_params = {}
1654
1655        header_params = {}
1656
1657        form_params = []
1658        local_var_files = {}
1659
1660        body_params = None
1661        if 'page_request' in params:
1662            body_params = params['page_request']
1663        # HTTP header `Accept`
1664        header_params['Accept'] = self.api_client.\
1665            select_header_accept(['application/json'])
1666
1667        # Authentication setting
1668        auth_settings = []
1669
1670        return self.api_client.call_api(resource_path, 'DELETE',
1671                                        path_params,
1672                                        query_params,
1673                                        header_params,
1674                                        body=body_params,
1675                                        post_params=form_params,
1676                                        files=local_var_files,
1677                                        response_type=None,
1678                                        auth_settings=auth_settings,
1679                                        callback=params.get('callback'),
1680                                        _return_http_data_only=params.get('_return_http_data_only'),
1681                                        _preload_content=params.get('_preload_content', True),
1682                                        _request_timeout=params.get('_request_timeout'),
1683                                        collection_formats=collection_formats)
1684
1685    def delete_documents(self, account_id, template_id, **kwargs):
1686        """
1687        Deletes documents from a template.
1688        Deletes one or more documents from an existing template.
1689        This method makes a synchronous HTTP request by default. To make an
1690        asynchronous HTTP request, please define a `callback` function
1691        to be invoked when receiving the response.
1692        >>> def callback_function(response):
1693        >>>     pprint(response)
1694        >>>
1695        >>> thread = api.delete_documents(account_id, template_id, callback=callback_function)
1696
1697        :param callback function: The callback function
1698            for asynchronous request. (optional)
1699        :param str account_id: The external account number (int) or account ID Guid. (required)
1700        :param str template_id: The ID of the template being accessed. (required)
1701        :param EnvelopeDefinition envelope_definition:
1702        :return: TemplateDocumentsResult
1703                 If the method is called asynchronously,
1704                 returns the request thread.
1705        """
1706        kwargs['_return_http_data_only'] = True
1707        if kwargs.get('callback'):
1708            return self.delete_documents_with_http_info(account_id, template_id, **kwargs)
1709        else:
1710            (data) = self.delete_documents_with_http_info(account_id, template_id, **kwargs)
1711            return data
1712
1713    def delete_documents_with_http_info(self, account_id, template_id, **kwargs):
1714        """
1715        Deletes documents from a template.
1716        Deletes one or more documents from an existing template.
1717        This method makes a synchronous HTTP request by default. To make an
1718        asynchronous HTTP request, please define a `callback` function
1719        to be invoked when receiving the response.
1720        >>> def callback_function(response):
1721        >>>     pprint(response)
1722        >>>
1723        >>> thread = api.delete_documents_with_http_info(account_id, template_id, callback=callback_function)
1724
1725        :param callback function: The callback function
1726            for asynchronous request. (optional)
1727        :param str account_id: The external account number (int) or account ID Guid. (required)
1728        :param str template_id: The ID of the template being accessed. (required)
1729        :param EnvelopeDefinition envelope_definition:
1730        :return: TemplateDocumentsResult
1731                 If the method is called asynchronously,
1732                 returns the request thread.
1733        """
1734
1735        all_params = ['account_id', 'template_id', 'envelope_definition']
1736        all_params.append('callback')
1737        all_params.append('_return_http_data_only')
1738        all_params.append('_preload_content')
1739        all_params.append('_request_timeout')
1740
1741        params = locals()
1742        for key, val in iteritems(params['kwargs']):
1743            if key not in all_params:
1744                raise TypeError(
1745                    "Got an unexpected keyword argument '%s'"
1746                    " to method delete_documents" % key
1747                )
1748            params[key] = val
1749        del params['kwargs']
1750        # verify the required parameter 'account_id' is set
1751        if ('account_id' not in params) or (params['account_id'] is None):
1752            raise ValueError("Missing the required parameter `account_id` when calling `delete_documents`")
1753        # verify the required parameter 'template_id' is set
1754        if ('template_id' not in params) or (params['template_id'] is None):
1755            raise ValueError("Missing the required parameter `template_id` when calling `delete_documents`")
1756
1757
1758        collection_formats = {}
1759
1760        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
1761        path_params = {}
1762        if 'account_id' in params:
1763            path_params['accountId'] = params['account_id']
1764        if 'template_id' in params:
1765            path_params['templateId'] = params['template_id']
1766
1767        query_params = {}
1768
1769        header_params = {}
1770
1771        form_params = []
1772        local_var_files = {}
1773
1774        body_params = None
1775        if 'envelope_definition' in params:
1776            body_params = params['envelope_definition']
1777        # HTTP header `Accept`
1778        header_params['Accept'] = self.api_client.\
1779            select_header_accept(['application/json'])
1780
1781        # Authentication setting
1782        auth_settings = []
1783
1784        return self.api_client.call_api(resource_path, 'DELETE',
1785                                        path_params,
1786                                        query_params,
1787                                        header_params,
1788                                        body=body_params,
1789                                        post_params=form_params,
1790                                        files=local_var_files,
1791                                        response_type='TemplateDocumentsResult',
1792                                        auth_settings=auth_settings,
1793                                        callback=params.get('callback'),
1794                                        _return_http_data_only=params.get('_return_http_data_only'),
1795                                        _preload_content=params.get('_preload_content', True),
1796                                        _request_timeout=params.get('_request_timeout'),
1797                                        collection_formats=collection_formats)
1798
1799    def delete_group_share(self, account_id, template_id, template_part, **kwargs):
1800        """
1801        Removes a member group's sharing permissions for a template.
1802        Removes a member group's sharing permissions for a specified template.
1803        This method makes a synchronous HTTP request by default. To make an
1804        asynchronous HTTP request, please define a `callback` function
1805        to be invoked when receiving the response.
1806        >>> def callback_function(response):
1807        >>>     pprint(response)
1808        >>>
1809        >>> thread = api.delete_group_share(account_id, template_id, template_part, callback=callback_function)
1810
1811        :param callback function: The callback function
1812            for asynchronous request. (optional)
1813        :param str account_id: The external account number (int) or account ID Guid. (required)
1814        :param str template_id: The ID of the template being accessed. (required)
1815        :param str template_part: Currently, the only defined part is **groups**. (required)
1816        :param GroupInformation group_information:
1817        :return: GroupInformation
1818                 If the method is called asynchronously,
1819                 returns the request thread.
1820        """
1821        kwargs['_return_http_data_only'] = True
1822        if kwargs.get('callback'):
1823            return self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
1824        else:
1825            (data) = self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
1826            return data
1827
1828    def delete_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
1829        """
1830        Removes a member group's sharing permissions for a template.
1831        Removes a member group's sharing permissions for a specified template.
1832        This method makes a synchronous HTTP request by default. To make an
1833        asynchronous HTTP request, please define a `callback` function
1834        to be invoked when receiving the response.
1835        >>> def callback_function(response):
1836        >>>     pprint(response)
1837        >>>
1838        >>> thread = api.delete_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
1839
1840        :param callback function: The callback function
1841            for asynchronous request. (optional)
1842        :param str account_id: The external account number (int) or account ID Guid. (required)
1843        :param str template_id: The ID of the template being accessed. (required)
1844        :param str template_part: Currently, the only defined part is **groups**. (required)
1845        :param GroupInformation group_information:
1846        :return: GroupInformation
1847                 If the method is called asynchronously,
1848                 returns the request thread.
1849        """
1850
1851        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
1852        all_params.append('callback')
1853        all_params.append('_return_http_data_only')
1854        all_params.append('_preload_content')
1855        all_params.append('_request_timeout')
1856
1857        params = locals()
1858        for key, val in iteritems(params['kwargs']):
1859            if key not in all_params:
1860                raise TypeError(
1861                    "Got an unexpected keyword argument '%s'"
1862                    " to method delete_group_share" % key
1863                )
1864            params[key] = val
1865        del params['kwargs']
1866        # verify the required parameter 'account_id' is set
1867        if ('account_id' not in params) or (params['account_id'] is None):
1868            raise ValueError("Missing the required parameter `account_id` when calling `delete_group_share`")
1869        # verify the required parameter 'template_id' is set
1870        if ('template_id' not in params) or (params['template_id'] is None):
1871            raise ValueError("Missing the required parameter `template_id` when calling `delete_group_share`")
1872        # verify the required parameter 'template_part' is set
1873        if ('template_part' not in params) or (params['template_part'] is None):
1874            raise ValueError("Missing the required parameter `template_part` when calling `delete_group_share`")
1875
1876
1877        collection_formats = {}
1878
1879        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
1880        path_params = {}
1881        if 'account_id' in params:
1882            path_params['accountId'] = params['account_id']
1883        if 'template_id' in params:
1884            path_params['templateId'] = params['template_id']
1885        if 'template_part' in params:
1886            path_params['templatePart'] = params['template_part']
1887
1888        query_params = {}
1889
1890        header_params = {}
1891
1892        form_params = []
1893        local_var_files = {}
1894
1895        body_params = None
1896        if 'group_information' in params:
1897            body_params = params['group_information']
1898        # HTTP header `Accept`
1899        header_params['Accept'] = self.api_client.\
1900            select_header_accept(['application/json'])
1901
1902        # Authentication setting
1903        auth_settings = []
1904
1905        return self.api_client.call_api(resource_path, 'DELETE',
1906                                        path_params,
1907                                        query_params,
1908                                        header_params,
1909                                        body=body_params,
1910                                        post_params=form_params,
1911                                        files=local_var_files,
1912                                        response_type='GroupInformation',
1913                                        auth_settings=auth_settings,
1914                                        callback=params.get('callback'),
1915                                        _return_http_data_only=params.get('_return_http_data_only'),
1916                                        _preload_content=params.get('_preload_content', True),
1917                                        _request_timeout=params.get('_request_timeout'),
1918                                        collection_formats=collection_formats)
1919
1920    def delete_lock(self, account_id, template_id, **kwargs):
1921        """
1922        Deletes a template lock.
1923        Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
1924        This method makes a synchronous HTTP request by default. To make an
1925        asynchronous HTTP request, please define a `callback` function
1926        to be invoked when receiving the response.
1927        >>> def callback_function(response):
1928        >>>     pprint(response)
1929        >>>
1930        >>> thread = api.delete_lock(account_id, template_id, callback=callback_function)
1931
1932        :param callback function: The callback function
1933            for asynchronous request. (optional)
1934        :param str account_id: The external account number (int) or account ID Guid. (required)
1935        :param str template_id: The ID of the template being accessed. (required)
1936        :param LockRequest lock_request:
1937        :return: LockInformation
1938                 If the method is called asynchronously,
1939                 returns the request thread.
1940        """
1941        kwargs['_return_http_data_only'] = True
1942        if kwargs.get('callback'):
1943            return self.delete_lock_with_http_info(account_id, template_id, **kwargs)
1944        else:
1945            (data) = self.delete_lock_with_http_info(account_id, template_id, **kwargs)
1946            return data
1947
1948    def delete_lock_with_http_info(self, account_id, template_id, **kwargs):
1949        """
1950        Deletes a template lock.
1951        Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
1952        This method makes a synchronous HTTP request by default. To make an
1953        asynchronous HTTP request, please define a `callback` function
1954        to be invoked when receiving the response.
1955        >>> def callback_function(response):
1956        >>>     pprint(response)
1957        >>>
1958        >>> thread = api.delete_lock_with_http_info(account_id, template_id, callback=callback_function)
1959
1960        :param callback function: The callback function
1961            for asynchronous request. (optional)
1962        :param str account_id: The external account number (int) or account ID Guid. (required)
1963        :param str template_id: The ID of the template being accessed. (required)
1964        :param LockRequest lock_request:
1965        :return: LockInformation
1966                 If the method is called asynchronously,
1967                 returns the request thread.
1968        """
1969
1970        all_params = ['account_id', 'template_id', 'lock_request']
1971        all_params.append('callback')
1972        all_params.append('_return_http_data_only')
1973        all_params.append('_preload_content')
1974        all_params.append('_request_timeout')
1975
1976        params = locals()
1977        for key, val in iteritems(params['kwargs']):
1978            if key not in all_params:
1979                raise TypeError(
1980                    "Got an unexpected keyword argument '%s'"
1981                    " to method delete_lock" % key
1982                )
1983            params[key] = val
1984        del params['kwargs']
1985        # verify the required parameter 'account_id' is set
1986        if ('account_id' not in params) or (params['account_id'] is None):
1987            raise ValueError("Missing the required parameter `account_id` when calling `delete_lock`")
1988        # verify the required parameter 'template_id' is set
1989        if ('template_id' not in params) or (params['template_id'] is None):
1990            raise ValueError("Missing the required parameter `template_id` when calling `delete_lock`")
1991
1992
1993        collection_formats = {}
1994
1995        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
1996        path_params = {}
1997        if 'account_id' in params:
1998            path_params['accountId'] = params['account_id']
1999        if 'template_id' in params:
2000            path_params['templateId'] = params['template_id']
2001
2002        query_params = {}
2003
2004        header_params = {}
2005
2006        form_params = []
2007        local_var_files = {}
2008
2009        body_params = None
2010        if 'lock_request' in params:
2011            body_params = params['lock_request']
2012        # HTTP header `Accept`
2013        header_params['Accept'] = self.api_client.\
2014            select_header_accept(['application/json'])
2015
2016        # Authentication setting
2017        auth_settings = []
2018
2019        return self.api_client.call_api(resource_path, 'DELETE',
2020                                        path_params,
2021                                        query_params,
2022                                        header_params,
2023                                        body=body_params,
2024                                        post_params=form_params,
2025                                        files=local_var_files,
2026                                        response_type='LockInformation',
2027                                        auth_settings=auth_settings,
2028                                        callback=params.get('callback'),
2029                                        _return_http_data_only=params.get('_return_http_data_only'),
2030                                        _preload_content=params.get('_preload_content', True),
2031                                        _request_timeout=params.get('_request_timeout'),
2032                                        collection_formats=collection_formats)
2033
2034    def delete_recipient(self, account_id, recipient_id, template_id, **kwargs):
2035        """
2036        Deletes the specified recipient file from a template.
2037        Deletes the specified recipient file from the specified template.
2038        This method makes a synchronous HTTP request by default. To make an
2039        asynchronous HTTP request, please define a `callback` function
2040        to be invoked when receiving the response.
2041        >>> def callback_function(response):
2042        >>>     pprint(response)
2043        >>>
2044        >>> thread = api.delete_recipient(account_id, recipient_id, template_id, callback=callback_function)
2045
2046        :param callback function: The callback function
2047            for asynchronous request. (optional)
2048        :param str account_id: The external account number (int) or account ID Guid. (required)
2049        :param str recipient_id: The ID of the recipient being accessed. (required)
2050        :param str template_id: The ID of the template being accessed. (required)
2051        :param TemplateRecipients template_recipients:
2052        :return: Recipients
2053                 If the method is called asynchronously,
2054                 returns the request thread.
2055        """
2056        kwargs['_return_http_data_only'] = True
2057        if kwargs.get('callback'):
2058            return self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs)
2059        else:
2060            (data) = self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs)
2061            return data
2062
2063    def delete_recipient_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
2064        """
2065        Deletes the specified recipient file from a template.
2066        Deletes the specified recipient file from the specified template.
2067        This method makes a synchronous HTTP request by default. To make an
2068        asynchronous HTTP request, please define a `callback` function
2069        to be invoked when receiving the response.
2070        >>> def callback_function(response):
2071        >>>     pprint(response)
2072        >>>
2073        >>> thread = api.delete_recipient_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
2074
2075        :param callback function: The callback function
2076            for asynchronous request. (optional)
2077        :param str account_id: The external account number (int) or account ID Guid. (required)
2078        :param str recipient_id: The ID of the recipient being accessed. (required)
2079        :param str template_id: The ID of the template being accessed. (required)
2080        :param TemplateRecipients template_recipients:
2081        :return: Recipients
2082                 If the method is called asynchronously,
2083                 returns the request thread.
2084        """
2085
2086        all_params = ['account_id', 'recipient_id', 'template_id', 'template_recipients']
2087        all_params.append('callback')
2088        all_params.append('_return_http_data_only')
2089        all_params.append('_preload_content')
2090        all_params.append('_request_timeout')
2091
2092        params = locals()
2093        for key, val in iteritems(params['kwargs']):
2094            if key not in all_params:
2095                raise TypeError(
2096                    "Got an unexpected keyword argument '%s'"
2097                    " to method delete_recipient" % key
2098                )
2099            params[key] = val
2100        del params['kwargs']
2101        # verify the required parameter 'account_id' is set
2102        if ('account_id' not in params) or (params['account_id'] is None):
2103            raise ValueError("Missing the required parameter `account_id` when calling `delete_recipient`")
2104        # verify the required parameter 'recipient_id' is set
2105        if ('recipient_id' not in params) or (params['recipient_id'] is None):
2106            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_recipient`")
2107        # verify the required parameter 'template_id' is set
2108        if ('template_id' not in params) or (params['template_id'] is None):
2109            raise ValueError("Missing the required parameter `template_id` when calling `delete_recipient`")
2110
2111
2112        collection_formats = {}
2113
2114        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}'.replace('{format}', 'json')
2115        path_params = {}
2116        if 'account_id' in params:
2117            path_params['accountId'] = params['account_id']
2118        if 'recipient_id' in params:
2119            path_params['recipientId'] = params['recipient_id']
2120        if 'template_id' in params:
2121            path_params['templateId'] = params['template_id']
2122
2123        query_params = {}
2124
2125        header_params = {}
2126
2127        form_params = []
2128        local_var_files = {}
2129
2130        body_params = None
2131        if 'template_recipients' in params:
2132            body_params = params['template_recipients']
2133        # HTTP header `Accept`
2134        header_params['Accept'] = self.api_client.\
2135            select_header_accept(['application/json'])
2136
2137        # Authentication setting
2138        auth_settings = []
2139
2140        return self.api_client.call_api(resource_path, 'DELETE',
2141                                        path_params,
2142                                        query_params,
2143                                        header_params,
2144                                        body=body_params,
2145                                        post_params=form_params,
2146                                        files=local_var_files,
2147                                        response_type='Recipients',
2148                                        auth_settings=auth_settings,
2149                                        callback=params.get('callback'),
2150                                        _return_http_data_only=params.get('_return_http_data_only'),
2151                                        _preload_content=params.get('_preload_content', True),
2152                                        _request_timeout=params.get('_request_timeout'),
2153                                        collection_formats=collection_formats)
2154
2155    def delete_recipients(self, account_id, template_id, **kwargs):
2156        """
2157        Deletes recipients from a template.
2158        Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
2159        This method makes a synchronous HTTP request by default. To make an
2160        asynchronous HTTP request, please define a `callback` function
2161        to be invoked when receiving the response.
2162        >>> def callback_function(response):
2163        >>>     pprint(response)
2164        >>>
2165        >>> thread = api.delete_recipients(account_id, template_id, callback=callback_function)
2166
2167        :param callback function: The callback function
2168            for asynchronous request. (optional)
2169        :param str account_id: The external account number (int) or account ID Guid. (required)
2170        :param str template_id: The ID of the template being accessed. (required)
2171        :param TemplateRecipients template_recipients:
2172        :return: Recipients
2173                 If the method is called asynchronously,
2174                 returns the request thread.
2175        """
2176        kwargs['_return_http_data_only'] = True
2177        if kwargs.get('callback'):
2178            return self.delete_recipients_with_http_info(account_id, template_id, **kwargs)
2179        else:
2180            (data) = self.delete_recipients_with_http_info(account_id, template_id, **kwargs)
2181            return data
2182
2183    def delete_recipients_with_http_info(self, account_id, template_id, **kwargs):
2184        """
2185        Deletes recipients from a template.
2186        Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
2187        This method makes a synchronous HTTP request by default. To make an
2188        asynchronous HTTP request, please define a `callback` function
2189        to be invoked when receiving the response.
2190        >>> def callback_function(response):
2191        >>>     pprint(response)
2192        >>>
2193        >>> thread = api.delete_recipients_with_http_info(account_id, template_id, callback=callback_function)
2194
2195        :param callback function: The callback function
2196            for asynchronous request. (optional)
2197        :param str account_id: The external account number (int) or account ID Guid. (required)
2198        :param str template_id: The ID of the template being accessed. (required)
2199        :param TemplateRecipients template_recipients:
2200        :return: Recipients
2201                 If the method is called asynchronously,
2202                 returns the request thread.
2203        """
2204
2205        all_params = ['account_id', 'template_id', 'template_recipients']
2206        all_params.append('callback')
2207        all_params.append('_return_http_data_only')
2208        all_params.append('_preload_content')
2209        all_params.append('_request_timeout')
2210
2211        params = locals()
2212        for key, val in iteritems(params['kwargs']):
2213            if key not in all_params:
2214                raise TypeError(
2215                    "Got an unexpected keyword argument '%s'"
2216                    " to method delete_recipients" % key
2217                )
2218            params[key] = val
2219        del params['kwargs']
2220        # verify the required parameter 'account_id' is set
2221        if ('account_id' not in params) or (params['account_id'] is None):
2222            raise ValueError("Missing the required parameter `account_id` when calling `delete_recipients`")
2223        # verify the required parameter 'template_id' is set
2224        if ('template_id' not in params) or (params['template_id'] is None):
2225            raise ValueError("Missing the required parameter `template_id` when calling `delete_recipients`")
2226
2227
2228        collection_formats = {}
2229
2230        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
2231        path_params = {}
2232        if 'account_id' in params:
2233            path_params['accountId'] = params['account_id']
2234        if 'template_id' in params:
2235            path_params['templateId'] = params['template_id']
2236
2237        query_params = {}
2238
2239        header_params = {}
2240
2241        form_params = []
2242        local_var_files = {}
2243
2244        body_params = None
2245        if 'template_recipients' in params:
2246            body_params = params['template_recipients']
2247        # HTTP header `Accept`
2248        header_params['Accept'] = self.api_client.\
2249            select_header_accept(['application/json'])
2250
2251        # Authentication setting
2252        auth_settings = []
2253
2254        return self.api_client.call_api(resource_path, 'DELETE',
2255                                        path_params,
2256                                        query_params,
2257                                        header_params,
2258                                        body=body_params,
2259                                        post_params=form_params,
2260                                        files=local_var_files,
2261                                        response_type='Recipients',
2262                                        auth_settings=auth_settings,
2263                                        callback=params.get('callback'),
2264                                        _return_http_data_only=params.get('_return_http_data_only'),
2265                                        _preload_content=params.get('_preload_content', True),
2266                                        _request_timeout=params.get('_request_timeout'),
2267                                        collection_formats=collection_formats)
2268
2269    def delete_tabs(self, account_id, recipient_id, template_id, **kwargs):
2270        """
2271        Deletes the tabs associated with a recipient in a template.
2272        Deletes one or more tabs associated with a recipient in a template.
2273        This method makes a synchronous HTTP request by default. To make an
2274        asynchronous HTTP request, please define a `callback` function
2275        to be invoked when receiving the response.
2276        >>> def callback_function(response):
2277        >>>     pprint(response)
2278        >>>
2279        >>> thread = api.delete_tabs(account_id, recipient_id, template_id, callback=callback_function)
2280
2281        :param callback function: The callback function
2282            for asynchronous request. (optional)
2283        :param str account_id: The external account number (int) or account ID Guid. (required)
2284        :param str recipient_id: The ID of the recipient being accessed. (required)
2285        :param str template_id: The ID of the template being accessed. (required)
2286        :param TemplateTabs template_tabs:
2287        :return: Tabs
2288                 If the method is called asynchronously,
2289                 returns the request thread.
2290        """
2291        kwargs['_return_http_data_only'] = True
2292        if kwargs.get('callback'):
2293            return self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
2294        else:
2295            (data) = self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
2296            return data
2297
2298    def delete_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
2299        """
2300        Deletes the tabs associated with a recipient in a template.
2301        Deletes one or more tabs associated with a recipient in a template.
2302        This method makes a synchronous HTTP request by default. To make an
2303        asynchronous HTTP request, please define a `callback` function
2304        to be invoked when receiving the response.
2305        >>> def callback_function(response):
2306        >>>     pprint(response)
2307        >>>
2308        >>> thread = api.delete_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
2309
2310        :param callback function: The callback function
2311            for asynchronous request. (optional)
2312        :param str account_id: The external account number (int) or account ID Guid. (required)
2313        :param str recipient_id: The ID of the recipient being accessed. (required)
2314        :param str template_id: The ID of the template being accessed. (required)
2315        :param TemplateTabs template_tabs:
2316        :return: Tabs
2317                 If the method is called asynchronously,
2318                 returns the request thread.
2319        """
2320
2321        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
2322        all_params.append('callback')
2323        all_params.append('_return_http_data_only')
2324        all_params.append('_preload_content')
2325        all_params.append('_request_timeout')
2326
2327        params = locals()
2328        for key, val in iteritems(params['kwargs']):
2329            if key not in all_params:
2330                raise TypeError(
2331                    "Got an unexpected keyword argument '%s'"
2332                    " to method delete_tabs" % key
2333                )
2334            params[key] = val
2335        del params['kwargs']
2336        # verify the required parameter 'account_id' is set
2337        if ('account_id' not in params) or (params['account_id'] is None):
2338            raise ValueError("Missing the required parameter `account_id` when calling `delete_tabs`")
2339        # verify the required parameter 'recipient_id' is set
2340        if ('recipient_id' not in params) or (params['recipient_id'] is None):
2341            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_tabs`")
2342        # verify the required parameter 'template_id' is set
2343        if ('template_id' not in params) or (params['template_id'] is None):
2344            raise ValueError("Missing the required parameter `template_id` when calling `delete_tabs`")
2345
2346
2347        collection_formats = {}
2348
2349        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
2350        path_params = {}
2351        if 'account_id' in params:
2352            path_params['accountId'] = params['account_id']
2353        if 'recipient_id' in params:
2354            path_params['recipientId'] = params['recipient_id']
2355        if 'template_id' in params:
2356            path_params['templateId'] = params['template_id']
2357
2358        query_params = {}
2359
2360        header_params = {}
2361
2362        form_params = []
2363        local_var_files = {}
2364
2365        body_params = None
2366        if 'template_tabs' in params:
2367            body_params = params['template_tabs']
2368        # HTTP header `Accept`
2369        header_params['Accept'] = self.api_client.\
2370            select_header_accept(['application/json'])
2371
2372        # Authentication setting
2373        auth_settings = []
2374
2375        return self.api_client.call_api(resource_path, 'DELETE',
2376                                        path_params,
2377                                        query_params,
2378                                        header_params,
2379                                        body=body_params,
2380                                        post_params=form_params,
2381                                        files=local_var_files,
2382                                        response_type='Tabs',
2383                                        auth_settings=auth_settings,
2384                                        callback=params.get('callback'),
2385                                        _return_http_data_only=params.get('_return_http_data_only'),
2386                                        _preload_content=params.get('_preload_content', True),
2387                                        _request_timeout=params.get('_request_timeout'),
2388                                        collection_formats=collection_formats)
2389
2390    def delete_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
2391        """
2392        Deletes tabs from an envelope document
2393        Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 
2394        This method makes a synchronous HTTP request by default. To make an
2395        asynchronous HTTP request, please define a `callback` function
2396        to be invoked when receiving the response.
2397        >>> def callback_function(response):
2398        >>>     pprint(response)
2399        >>>
2400        >>> thread = api.delete_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
2401
2402        :param callback function: The callback function
2403            for asynchronous request. (optional)
2404        :param str account_id: The external account number (int) or account ID Guid. (required)
2405        :param str document_id: The ID of the document being accessed. (required)
2406        :param str template_id: The ID of the template being accessed. (required)
2407        :param TemplateTabs template_tabs:
2408        :return: Tabs
2409                 If the method is called asynchronously,
2410                 returns the request thread.
2411        """
2412        kwargs['_return_http_data_only'] = True
2413        if kwargs.get('callback'):
2414            return self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2415        else:
2416            (data) = self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2417            return data
2418
2419    def delete_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
2420        """
2421        Deletes tabs from an envelope document
2422        Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 
2423        This method makes a synchronous HTTP request by default. To make an
2424        asynchronous HTTP request, please define a `callback` function
2425        to be invoked when receiving the response.
2426        >>> def callback_function(response):
2427        >>>     pprint(response)
2428        >>>
2429        >>> thread = api.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
2430
2431        :param callback function: The callback function
2432            for asynchronous request. (optional)
2433        :param str account_id: The external account number (int) or account ID Guid. (required)
2434        :param str document_id: The ID of the document being accessed. (required)
2435        :param str template_id: The ID of the template being accessed. (required)
2436        :param TemplateTabs template_tabs:
2437        :return: Tabs
2438                 If the method is called asynchronously,
2439                 returns the request thread.
2440        """
2441
2442        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
2443        all_params.append('callback')
2444        all_params.append('_return_http_data_only')
2445        all_params.append('_preload_content')
2446        all_params.append('_request_timeout')
2447
2448        params = locals()
2449        for key, val in iteritems(params['kwargs']):
2450            if key not in all_params:
2451                raise TypeError(
2452                    "Got an unexpected keyword argument '%s'"
2453                    " to method delete_template_document_tabs" % key
2454                )
2455            params[key] = val
2456        del params['kwargs']
2457        # verify the required parameter 'account_id' is set
2458        if ('account_id' not in params) or (params['account_id'] is None):
2459            raise ValueError("Missing the required parameter `account_id` when calling `delete_template_document_tabs`")
2460        # verify the required parameter 'document_id' is set
2461        if ('document_id' not in params) or (params['document_id'] is None):
2462            raise ValueError("Missing the required parameter `document_id` when calling `delete_template_document_tabs`")
2463        # verify the required parameter 'template_id' is set
2464        if ('template_id' not in params) or (params['template_id'] is None):
2465            raise ValueError("Missing the required parameter `template_id` when calling `delete_template_document_tabs`")
2466
2467
2468        collection_formats = {}
2469
2470        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
2471        path_params = {}
2472        if 'account_id' in params:
2473            path_params['accountId'] = params['account_id']
2474        if 'document_id' in params:
2475            path_params['documentId'] = params['document_id']
2476        if 'template_id' in params:
2477            path_params['templateId'] = params['template_id']
2478
2479        query_params = {}
2480
2481        header_params = {}
2482
2483        form_params = []
2484        local_var_files = {}
2485
2486        body_params = None
2487        if 'template_tabs' in params:
2488            body_params = params['template_tabs']
2489        # HTTP header `Accept`
2490        header_params['Accept'] = self.api_client.\
2491            select_header_accept(['application/json'])
2492
2493        # Authentication setting
2494        auth_settings = []
2495
2496        return self.api_client.call_api(resource_path, 'DELETE',
2497                                        path_params,
2498                                        query_params,
2499                                        header_params,
2500                                        body=body_params,
2501                                        post_params=form_params,
2502                                        files=local_var_files,
2503                                        response_type='Tabs',
2504                                        auth_settings=auth_settings,
2505                                        callback=params.get('callback'),
2506                                        _return_http_data_only=params.get('_return_http_data_only'),
2507                                        _preload_content=params.get('_preload_content', True),
2508                                        _request_timeout=params.get('_request_timeout'),
2509                                        collection_formats=collection_formats)
2510
2511    def get(self, account_id, template_id, **kwargs):
2512        """
2513        Gets a list of templates for a specified account.
2514        Retrieves the definition of the specified template.
2515        This method makes a synchronous HTTP request by default. To make an
2516        asynchronous HTTP request, please define a `callback` function
2517        to be invoked when receiving the response.
2518        >>> def callback_function(response):
2519        >>>     pprint(response)
2520        >>>
2521        >>> thread = api.get(account_id, template_id, callback=callback_function)
2522
2523        :param callback function: The callback function
2524            for asynchronous request. (optional)
2525        :param str account_id: The external account number (int) or account ID Guid. (required)
2526        :param str template_id: The ID of the template being accessed. (required)
2527        :param str include:
2528        :return: EnvelopeTemplate
2529                 If the method is called asynchronously,
2530                 returns the request thread.
2531        """
2532        kwargs['_return_http_data_only'] = True
2533        if kwargs.get('callback'):
2534            return self.get_with_http_info(account_id, template_id, **kwargs)
2535        else:
2536            (data) = self.get_with_http_info(account_id, template_id, **kwargs)
2537            return data
2538
2539    def get_with_http_info(self, account_id, template_id, **kwargs):
2540        """
2541        Gets a list of templates for a specified account.
2542        Retrieves the definition of the specified template.
2543        This method makes a synchronous HTTP request by default. To make an
2544        asynchronous HTTP request, please define a `callback` function
2545        to be invoked when receiving the response.
2546        >>> def callback_function(response):
2547        >>>     pprint(response)
2548        >>>
2549        >>> thread = api.get_with_http_info(account_id, template_id, callback=callback_function)
2550
2551        :param callback function: The callback function
2552            for asynchronous request. (optional)
2553        :param str account_id: The external account number (int) or account ID Guid. (required)
2554        :param str template_id: The ID of the template being accessed. (required)
2555        :param str include:
2556        :return: EnvelopeTemplate
2557                 If the method is called asynchronously,
2558                 returns the request thread.
2559        """
2560
2561        all_params = ['account_id', 'template_id', 'include']
2562        all_params.append('callback')
2563        all_params.append('_return_http_data_only')
2564        all_params.append('_preload_content')
2565        all_params.append('_request_timeout')
2566
2567        params = locals()
2568        for key, val in iteritems(params['kwargs']):
2569            if key not in all_params:
2570                raise TypeError(
2571                    "Got an unexpected keyword argument '%s'"
2572                    " to method get" % key
2573                )
2574            params[key] = val
2575        del params['kwargs']
2576        # verify the required parameter 'account_id' is set
2577        if ('account_id' not in params) or (params['account_id'] is None):
2578            raise ValueError("Missing the required parameter `account_id` when calling `get`")
2579        # verify the required parameter 'template_id' is set
2580        if ('template_id' not in params) or (params['template_id'] is None):
2581            raise ValueError("Missing the required parameter `template_id` when calling `get`")
2582
2583
2584        collection_formats = {}
2585
2586        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
2587        path_params = {}
2588        if 'account_id' in params:
2589            path_params['accountId'] = params['account_id']
2590        if 'template_id' in params:
2591            path_params['templateId'] = params['template_id']
2592
2593        query_params = {}
2594        if 'include' in params:
2595            query_params['include'] = params['include']
2596
2597        header_params = {}
2598
2599        form_params = []
2600        local_var_files = {}
2601
2602        body_params = None
2603        # HTTP header `Accept`
2604        header_params['Accept'] = self.api_client.\
2605            select_header_accept(['application/json'])
2606
2607        # Authentication setting
2608        auth_settings = []
2609
2610        return self.api_client.call_api(resource_path, 'GET',
2611                                        path_params,
2612                                        query_params,
2613                                        header_params,
2614                                        body=body_params,
2615                                        post_params=form_params,
2616                                        files=local_var_files,
2617                                        response_type='EnvelopeTemplate',
2618                                        auth_settings=auth_settings,
2619                                        callback=params.get('callback'),
2620                                        _return_http_data_only=params.get('_return_http_data_only'),
2621                                        _preload_content=params.get('_preload_content', True),
2622                                        _request_timeout=params.get('_request_timeout'),
2623                                        collection_formats=collection_formats)
2624
2625    def get_document(self, account_id, document_id, template_id, **kwargs):
2626        """
2627        Gets PDF documents from a template.
2628        Retrieves one or more PDF documents from the specified template.  You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
2629        This method makes a synchronous HTTP request by default. To make an
2630        asynchronous HTTP request, please define a `callback` function
2631        to be invoked when receiving the response.
2632        >>> def callback_function(response):
2633        >>>     pprint(response)
2634        >>>
2635        >>> thread = api.get_document(account_id, document_id, template_id, callback=callback_function)
2636
2637        :param callback function: The callback function
2638            for asynchronous request. (optional)
2639        :param str account_id: The external account number (int) or account ID Guid. (required)
2640        :param str document_id: The ID of the document being accessed. (required)
2641        :param str template_id: The ID of the template being accessed. (required)
2642        :param str encrypt:
2643        :param str file_type:
2644        :param str show_changes:
2645        :return: file
2646                 If the method is called asynchronously,
2647                 returns the request thread.
2648        """
2649        kwargs['_return_http_data_only'] = True
2650        if kwargs.get('callback'):
2651            return self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2652        else:
2653            (data) = self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2654            return data
2655
2656    def get_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
2657        """
2658        Gets PDF documents from a template.
2659        Retrieves one or more PDF documents from the specified template.  You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
2660        This method makes a synchronous HTTP request by default. To make an
2661        asynchronous HTTP request, please define a `callback` function
2662        to be invoked when receiving the response.
2663        >>> def callback_function(response):
2664        >>>     pprint(response)
2665        >>>
2666        >>> thread = api.get_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
2667
2668        :param callback function: The callback function
2669            for asynchronous request. (optional)
2670        :param str account_id: The external account number (int) or account ID Guid. (required)
2671        :param str document_id: The ID of the document being accessed. (required)
2672        :param str template_id: The ID of the template being accessed. (required)
2673        :param str encrypt:
2674        :param str file_type:
2675        :param str show_changes:
2676        :return: file
2677                 If the method is called asynchronously,
2678                 returns the request thread.
2679        """
2680
2681        all_params = ['account_id', 'document_id', 'template_id', 'encrypt', 'file_type', 'show_changes']
2682        all_params.append('callback')
2683        all_params.append('_return_http_data_only')
2684        all_params.append('_preload_content')
2685        all_params.append('_request_timeout')
2686
2687        params = locals()
2688        for key, val in iteritems(params['kwargs']):
2689            if key not in all_params:
2690                raise TypeError(
2691                    "Got an unexpected keyword argument '%s'"
2692                    " to method get_document" % key
2693                )
2694            params[key] = val
2695        del params['kwargs']
2696        # verify the required parameter 'account_id' is set
2697        if ('account_id' not in params) or (params['account_id'] is None):
2698            raise ValueError("Missing the required parameter `account_id` when calling `get_document`")
2699        # verify the required parameter 'document_id' is set
2700        if ('document_id' not in params) or (params['document_id'] is None):
2701            raise ValueError("Missing the required parameter `document_id` when calling `get_document`")
2702        # verify the required parameter 'template_id' is set
2703        if ('template_id' not in params) or (params['template_id'] is None):
2704            raise ValueError("Missing the required parameter `template_id` when calling `get_document`")
2705
2706
2707        collection_formats = {}
2708
2709        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
2710        path_params = {}
2711        if 'account_id' in params:
2712            path_params['accountId'] = params['account_id']
2713        if 'document_id' in params:
2714            path_params['documentId'] = params['document_id']
2715        if 'template_id' in params:
2716            path_params['templateId'] = params['template_id']
2717
2718        query_params = {}
2719        if 'encrypt' in params:
2720            query_params['encrypt'] = params['encrypt']
2721        if 'file_type' in params:
2722            query_params['file_type'] = params['file_type']
2723        if 'show_changes' in params:
2724            query_params['show_changes'] = params['show_changes']
2725
2726        header_params = {}
2727
2728        form_params = []
2729        local_var_files = {}
2730
2731        body_params = None
2732        # HTTP header `Accept`
2733        header_params['Accept'] = self.api_client.\
2734            select_header_accept(['application/pdf'])
2735
2736        # Authentication setting
2737        auth_settings = []
2738
2739        return self.api_client.call_api(resource_path, 'GET',
2740                                        path_params,
2741                                        query_params,
2742                                        header_params,
2743                                        body=body_params,
2744                                        post_params=form_params,
2745                                        files=local_var_files,
2746                                        response_type='file',
2747                                        auth_settings=auth_settings,
2748                                        callback=params.get('callback'),
2749                                        _return_http_data_only=params.get('_return_http_data_only'),
2750                                        _preload_content=params.get('_preload_content', True),
2751                                        _request_timeout=params.get('_request_timeout'),
2752                                        collection_formats=collection_formats)
2753
2754    def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs):
2755        """
2756        Gets a page image from a template for display.
2757        Retrieves a page image for display from the specified template.
2758        This method makes a synchronous HTTP request by default. To make an
2759        asynchronous HTTP request, please define a `callback` function
2760        to be invoked when receiving the response.
2761        >>> def callback_function(response):
2762        >>>     pprint(response)
2763        >>>
2764        >>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function)
2765
2766        :param callback function: The callback function
2767            for asynchronous request. (optional)
2768        :param str account_id: The external account number (int) or account ID Guid. (required)
2769        :param str document_id: The ID of the document being accessed. (required)
2770        :param str page_number: The page number being accessed. (required)
2771        :param str template_id: The ID of the template being accessed. (required)
2772        :param str dpi:
2773        :param str max_height:
2774        :param str max_width:
2775        :param str show_changes:
2776        :return: file
2777                 If the method is called asynchronously,
2778                 returns the request thread.
2779        """
2780        kwargs['_return_http_data_only'] = True
2781        if kwargs.get('callback'):
2782            return self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2783        else:
2784            (data) = self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2785            return data
2786
2787    def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
2788        """
2789        Gets a page image from a template for display.
2790        Retrieves a page image for display from the specified template.
2791        This method makes a synchronous HTTP request by default. To make an
2792        asynchronous HTTP request, please define a `callback` function
2793        to be invoked when receiving the response.
2794        >>> def callback_function(response):
2795        >>>     pprint(response)
2796        >>>
2797        >>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
2798
2799        :param callback function: The callback function
2800            for asynchronous request. (optional)
2801        :param str account_id: The external account number (int) or account ID Guid. (required)
2802        :param str document_id: The ID of the document being accessed. (required)
2803        :param str page_number: The page number being accessed. (required)
2804        :param str template_id: The ID of the template being accessed. (required)
2805        :param str dpi:
2806        :param str max_height:
2807        :param str max_width:
2808        :param str show_changes:
2809        :return: file
2810                 If the method is called asynchronously,
2811                 returns the request thread.
2812        """
2813
2814        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'dpi', 'max_height', 'max_width', 'show_changes']
2815        all_params.append('callback')
2816        all_params.append('_return_http_data_only')
2817        all_params.append('_preload_content')
2818        all_params.append('_request_timeout')
2819
2820        params = locals()
2821        for key, val in iteritems(params['kwargs']):
2822            if key not in all_params:
2823                raise TypeError(
2824                    "Got an unexpected keyword argument '%s'"
2825                    " to method get_document_page_image" % key
2826                )
2827            params[key] = val
2828        del params['kwargs']
2829        # verify the required parameter 'account_id' is set
2830        if ('account_id' not in params) or (params['account_id'] is None):
2831            raise ValueError("Missing the required parameter `account_id` when calling `get_document_page_image`")
2832        # verify the required parameter 'document_id' is set
2833        if ('document_id' not in params) or (params['document_id'] is None):
2834            raise ValueError("Missing the required parameter `document_id` when calling `get_document_page_image`")
2835        # verify the required parameter 'page_number' is set
2836        if ('page_number' not in params) or (params['page_number'] is None):
2837            raise ValueError("Missing the required parameter `page_number` when calling `get_document_page_image`")
2838        # verify the required parameter 'template_id' is set
2839        if ('template_id' not in params) or (params['template_id'] is None):
2840            raise ValueError("Missing the required parameter `template_id` when calling `get_document_page_image`")
2841
2842
2843        collection_formats = {}
2844
2845        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
2846        path_params = {}
2847        if 'account_id' in params:
2848            path_params['accountId'] = params['account_id']
2849        if 'document_id' in params:
2850            path_params['documentId'] = params['document_id']
2851        if 'page_number' in params:
2852            path_params['pageNumber'] = params['page_number']
2853        if 'template_id' in params:
2854            path_params['templateId'] = params['template_id']
2855
2856        query_params = {}
2857        if 'dpi' in params:
2858            query_params['dpi'] = params['dpi']
2859        if 'max_height' in params:
2860            query_params['max_height'] = params['max_height']
2861        if 'max_width' in params:
2862            query_params['max_width'] = params['max_width']
2863        if 'show_changes' in params:
2864            query_params['show_changes'] = params['show_changes']
2865
2866        header_params = {}
2867
2868        form_params = []
2869        local_var_files = {}
2870
2871        body_params = None
2872        # HTTP header `Accept`
2873        header_params['Accept'] = self.api_client.\
2874            select_header_accept(['image/png'])
2875
2876        # Authentication setting
2877        auth_settings = []
2878
2879        return self.api_client.call_api(resource_path, 'GET',
2880                                        path_params,
2881                                        query_params,
2882                                        header_params,
2883                                        body=body_params,
2884                                        post_params=form_params,
2885                                        files=local_var_files,
2886                                        response_type='file',
2887                                        auth_settings=auth_settings,
2888                                        callback=params.get('callback'),
2889                                        _return_http_data_only=params.get('_return_http_data_only'),
2890                                        _preload_content=params.get('_preload_content', True),
2891                                        _request_timeout=params.get('_request_timeout'),
2892                                        collection_formats=collection_formats)
2893
2894    def get_document_tabs(self, account_id, document_id, template_id, **kwargs):
2895        """
2896        Returns tabs on the document.
2897        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
2898        This method makes a synchronous HTTP request by default. To make an
2899        asynchronous HTTP request, please define a `callback` function
2900        to be invoked when receiving the response.
2901        >>> def callback_function(response):
2902        >>>     pprint(response)
2903        >>>
2904        >>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function)
2905
2906        :param callback function: The callback function
2907            for asynchronous request. (optional)
2908        :param str account_id: The external account number (int) or account ID Guid. (required)
2909        :param str document_id: The ID of the document being accessed. (required)
2910        :param str template_id: The ID of the template being accessed. (required)
2911        :param str page_numbers:
2912        :return: Tabs
2913                 If the method is called asynchronously,
2914                 returns the request thread.
2915        """
2916        kwargs['_return_http_data_only'] = True
2917        if kwargs.get('callback'):
2918            return self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2919        else:
2920            (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2921            return data
2922
2923    def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
2924        """
2925        Returns tabs on the document.
2926        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
2927        This method makes a synchronous HTTP request by default. To make an
2928        asynchronous HTTP request, please define a `callback` function
2929        to be invoked when receiving the response.
2930        >>> def callback_function(response):
2931        >>>     pprint(response)
2932        >>>
2933        >>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
2934
2935        :param callback function: The callback function
2936            for asynchronous request. (optional)
2937        :param str account_id: The external account number (int) or account ID Guid. (required)
2938        :param str document_id: The ID of the document being accessed. (required)
2939        :param str template_id: The ID of the template being accessed. (required)
2940        :param str page_numbers:
2941        :return: Tabs
2942                 If the method is called asynchronously,
2943                 returns the request thread.
2944        """
2945
2946        all_params = ['account_id', 'document_id', 'template_id', 'page_numbers']
2947        all_params.append('callback')
2948        all_params.append('_return_http_data_only')
2949        all_params.append('_preload_content')
2950        all_params.append('_request_timeout')
2951
2952        params = locals()
2953        for key, val in iteritems(params['kwargs']):
2954            if key not in all_params:
2955                raise TypeError(
2956                    "Got an unexpected keyword argument '%s'"
2957                    " to method get_document_tabs" % key
2958                )
2959            params[key] = val
2960        del params['kwargs']
2961        # verify the required parameter 'account_id' is set
2962        if ('account_id' not in params) or (params['account_id'] is None):
2963            raise ValueError("Missing the required parameter `account_id` when calling `get_document_tabs`")
2964        # verify the required parameter 'document_id' is set
2965        if ('document_id' not in params) or (params['document_id'] is None):
2966            raise ValueError("Missing the required parameter `document_id` when calling `get_document_tabs`")
2967        # verify the required parameter 'template_id' is set
2968        if ('template_id' not in params) or (params['template_id'] is None):
2969            raise ValueError("Missing the required parameter `template_id` when calling `get_document_tabs`")
2970
2971
2972        collection_formats = {}
2973
2974        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
2975        path_params = {}
2976        if 'account_id' in params:
2977            path_params['accountId'] = params['account_id']
2978        if 'document_id' in params:
2979            path_params['documentId'] = params['document_id']
2980        if 'template_id' in params:
2981            path_params['templateId'] = params['template_id']
2982
2983        query_params = {}
2984        if 'page_numbers' in params:
2985            query_params['page_numbers'] = params['page_numbers']
2986
2987        header_params = {}
2988
2989        form_params = []
2990        local_var_files = {}
2991
2992        body_params = None
2993        # HTTP header `Accept`
2994        header_params['Accept'] = self.api_client.\
2995            select_header_accept(['application/json'])
2996
2997        # Authentication setting
2998        auth_settings = []
2999
3000        return self.api_client.call_api(resource_path, 'GET',
3001                                        path_params,
3002                                        query_params,
3003                                        header_params,
3004                                        body=body_params,
3005                                        post_params=form_params,
3006                                        files=local_var_files,
3007                                        response_type='Tabs',
3008                                        auth_settings=auth_settings,
3009                                        callback=params.get('callback'),
3010                                        _return_http_data_only=params.get('_return_http_data_only'),
3011                                        _preload_content=params.get('_preload_content', True),
3012                                        _request_timeout=params.get('_request_timeout'),
3013                                        collection_formats=collection_formats)
3014
3015    def get_lock(self, account_id, template_id, **kwargs):
3016        """
3017        Gets template lock information.
3018        Retrieves general information about the template lock.  If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header  field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header.
3019        This method makes a synchronous HTTP request by default. To make an
3020        asynchronous HTTP request, please define a `callback` function
3021        to be invoked when receiving the response.
3022        >>> def callback_function(response):
3023        >>>     pprint(response)
3024        >>>
3025        >>> thread = api.get_lock(account_id, template_id, callback=callback_function)
3026
3027        :param callback function: The callback function
3028            for asynchronous request. (optional)
3029        :param str account_id: The external account number (int) or account ID Guid. (required)
3030        :param str template_id: The ID of the template being accessed. (required)
3031        :return: LockInformation
3032                 If the method is called asynchronously,
3033                 returns the request thread.
3034        """
3035        kwargs['_return_http_data_only'] = True
3036        if kwargs.get('callback'):
3037            return self.get_lock_with_http_info(account_id, template_id, **kwargs)
3038        else:
3039            (data) = self.get_lock_with_http_info(account_id, template_id, **kwargs)
3040            return data
3041
3042    def get_lock_with_http_info(self, account_id, template_id, **kwargs):
3043        """
3044        Gets template lock information.
3045        Retrieves general information about the template lock.  If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header  field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header.
3046        This method makes a synchronous HTTP request by default. To make an
3047        asynchronous HTTP request, please define a `callback` function
3048        to be invoked when receiving the response.
3049        >>> def callback_function(response):
3050        >>>     pprint(response)
3051        >>>
3052        >>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function)
3053
3054        :param callback function: The callback function
3055            for asynchronous request. (optional)
3056        :param str account_id: The external account number (int) or account ID Guid. (required)
3057        :param str template_id: The ID of the template being accessed. (required)
3058        :return: LockInformation
3059                 If the method is called asynchronously,
3060                 returns the request thread.
3061        """
3062
3063        all_params = ['account_id', 'template_id']
3064        all_params.append('callback')
3065        all_params.append('_return_http_data_only')
3066        all_params.append('_preload_content')
3067        all_params.append('_request_timeout')
3068
3069        params = locals()
3070        for key, val in iteritems(params['kwargs']):
3071            if key not in all_params:
3072                raise TypeError(
3073                    "Got an unexpected keyword argument '%s'"
3074                    " to method get_lock" % key
3075                )
3076            params[key] = val
3077        del params['kwargs']
3078        # verify the required parameter 'account_id' is set
3079        if ('account_id' not in params) or (params['account_id'] is None):
3080            raise ValueError("Missing the required parameter `account_id` when calling `get_lock`")
3081        # verify the required parameter 'template_id' is set
3082        if ('template_id' not in params) or (params['template_id'] is None):
3083            raise ValueError("Missing the required parameter `template_id` when calling `get_lock`")
3084
3085
3086        collection_formats = {}
3087
3088        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
3089        path_params = {}
3090        if 'account_id' in params:
3091            path_params['accountId'] = params['account_id']
3092        if 'template_id' in params:
3093            path_params['templateId'] = params['template_id']
3094
3095        query_params = {}
3096
3097        header_params = {}
3098
3099        form_params = []
3100        local_var_files = {}
3101
3102        body_params = None
3103        # HTTP header `Accept`
3104        header_params['Accept'] = self.api_client.\
3105            select_header_accept(['application/json'])
3106
3107        # Authentication setting
3108        auth_settings = []
3109
3110        return self.api_client.call_api(resource_path, 'GET',
3111                                        path_params,
3112                                        query_params,
3113                                        header_params,
3114                                        body=body_params,
3115                                        post_params=form_params,
3116                                        files=local_var_files,
3117                                        response_type='LockInformation',
3118                                        auth_settings=auth_settings,
3119                                        callback=params.get('callback'),
3120                                        _return_http_data_only=params.get('_return_http_data_only'),
3121                                        _preload_content=params.get('_preload_content', True),
3122                                        _request_timeout=params.get('_request_timeout'),
3123                                        collection_formats=collection_formats)
3124
3125    def get_notification_settings(self, account_id, template_id, **kwargs):
3126        """
3127        Gets template notification information.
3128        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3129        This method makes a synchronous HTTP request by default. To make an
3130        asynchronous HTTP request, please define a `callback` function
3131        to be invoked when receiving the response.
3132        >>> def callback_function(response):
3133        >>>     pprint(response)
3134        >>>
3135        >>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function)
3136
3137        :param callback function: The callback function
3138            for asynchronous request. (optional)
3139        :param str account_id: The external account number (int) or account ID Guid. (required)
3140        :param str template_id: The ID of the template being accessed. (required)
3141        :return: Notification
3142                 If the method is called asynchronously,
3143                 returns the request thread.
3144        """
3145        kwargs['_return_http_data_only'] = True
3146        if kwargs.get('callback'):
3147            return self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3148        else:
3149            (data) = self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3150            return data
3151
3152    def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
3153        """
3154        Gets template notification information.
3155        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3156        This method makes a synchronous HTTP request by default. To make an
3157        asynchronous HTTP request, please define a `callback` function
3158        to be invoked when receiving the response.
3159        >>> def callback_function(response):
3160        >>>     pprint(response)
3161        >>>
3162        >>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
3163
3164        :param callback function: The callback function
3165            for asynchronous request. (optional)
3166        :param str account_id: The external account number (int) or account ID Guid. (required)
3167        :param str template_id: The ID of the template being accessed. (required)
3168        :return: Notification
3169                 If the method is called asynchronously,
3170                 returns the request thread.
3171        """
3172
3173        all_params = ['account_id', 'template_id']
3174        all_params.append('callback')
3175        all_params.append('_return_http_data_only')
3176        all_params.append('_preload_content')
3177        all_params.append('_request_timeout')
3178
3179        params = locals()
3180        for key, val in iteritems(params['kwargs']):
3181            if key not in all_params:
3182                raise TypeError(
3183                    "Got an unexpected keyword argument '%s'"
3184                    " to method get_notification_settings" % key
3185                )
3186            params[key] = val
3187        del params['kwargs']
3188        # verify the required parameter 'account_id' is set
3189        if ('account_id' not in params) or (params['account_id'] is None):
3190            raise ValueError("Missing the required parameter `account_id` when calling `get_notification_settings`")
3191        # verify the required parameter 'template_id' is set
3192        if ('template_id' not in params) or (params['template_id'] is None):
3193            raise ValueError("Missing the required parameter `template_id` when calling `get_notification_settings`")
3194
3195
3196        collection_formats = {}
3197
3198        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
3199        path_params = {}
3200        if 'account_id' in params:
3201            path_params['accountId'] = params['account_id']
3202        if 'template_id' in params:
3203            path_params['templateId'] = params['template_id']
3204
3205        query_params = {}
3206
3207        header_params = {}
3208
3209        form_params = []
3210        local_var_files = {}
3211
3212        body_params = None
3213        # HTTP header `Accept`
3214        header_params['Accept'] = self.api_client.\
3215            select_header_accept(['application/json'])
3216
3217        # Authentication setting
3218        auth_settings = []
3219
3220        return self.api_client.call_api(resource_path, 'GET',
3221                                        path_params,
3222                                        query_params,
3223                                        header_params,
3224                                        body=body_params,
3225                                        post_params=form_params,
3226                                        files=local_var_files,
3227                                        response_type='Notification',
3228                                        auth_settings=auth_settings,
3229                                        callback=params.get('callback'),
3230                                        _return_http_data_only=params.get('_return_http_data_only'),
3231                                        _preload_content=params.get('_preload_content', True),
3232                                        _request_timeout=params.get('_request_timeout'),
3233                                        collection_formats=collection_formats)
3234
3235    def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs):
3236        """
3237        Returns tabs on the specified page.
3238        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3239        This method makes a synchronous HTTP request by default. To make an
3240        asynchronous HTTP request, please define a `callback` function
3241        to be invoked when receiving the response.
3242        >>> def callback_function(response):
3243        >>>     pprint(response)
3244        >>>
3245        >>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function)
3246
3247        :param callback function: The callback function
3248            for asynchronous request. (optional)
3249        :param str account_id: The external account number (int) or account ID Guid. (required)
3250        :param str document_id: The ID of the document being accessed. (required)
3251        :param str page_number: The page number being accessed. (required)
3252        :param str template_id: The ID of the template being accessed. (required)
3253        :return: Tabs
3254                 If the method is called asynchronously,
3255                 returns the request thread.
3256        """
3257        kwargs['_return_http_data_only'] = True
3258        if kwargs.get('callback'):
3259            return self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3260        else:
3261            (data) = self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3262            return data
3263
3264    def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
3265        """
3266        Returns tabs on the specified page.
3267        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3268        This method makes a synchronous HTTP request by default. To make an
3269        asynchronous HTTP request, please define a `callback` function
3270        to be invoked when receiving the response.
3271        >>> def callback_function(response):
3272        >>>     pprint(response)
3273        >>>
3274        >>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
3275
3276        :param callback function: The callback function
3277            for asynchronous request. (optional)
3278        :param str account_id: The external account number (int) or account ID Guid. (required)
3279        :param str document_id: The ID of the document being accessed. (required)
3280        :param str page_number: The page number being accessed. (required)
3281        :param str template_id: The ID of the template being accessed. (required)
3282        :return: Tabs
3283                 If the method is called asynchronously,
3284                 returns the request thread.
3285        """
3286
3287        all_params = ['account_id', 'document_id', 'page_number', 'template_id']
3288        all_params.append('callback')
3289        all_params.append('_return_http_data_only')
3290        all_params.append('_preload_content')
3291        all_params.append('_request_timeout')
3292
3293        params = locals()
3294        for key, val in iteritems(params['kwargs']):
3295            if key not in all_params:
3296                raise TypeError(
3297                    "Got an unexpected keyword argument '%s'"
3298                    " to method get_page_tabs" % key
3299                )
3300            params[key] = val
3301        del params['kwargs']
3302        # verify the required parameter 'account_id' is set
3303        if ('account_id' not in params) or (params['account_id'] is None):
3304            raise ValueError("Missing the required parameter `account_id` when calling `get_page_tabs`")
3305        # verify the required parameter 'document_id' is set
3306        if ('document_id' not in params) or (params['document_id'] is None):
3307            raise ValueError("Missing the required parameter `document_id` when calling `get_page_tabs`")
3308        # verify the required parameter 'page_number' is set
3309        if ('page_number' not in params) or (params['page_number'] is None):
3310            raise ValueError("Missing the required parameter `page_number` when calling `get_page_tabs`")
3311        # verify the required parameter 'template_id' is set
3312        if ('template_id' not in params) or (params['template_id'] is None):
3313            raise ValueError("Missing the required parameter `template_id` when calling `get_page_tabs`")
3314
3315
3316        collection_formats = {}
3317
3318        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs'.replace('{format}', 'json')
3319        path_params = {}
3320        if 'account_id' in params:
3321            path_params['accountId'] = params['account_id']
3322        if 'document_id' in params:
3323            path_params['documentId'] = params['document_id']
3324        if 'page_number' in params:
3325            path_params['pageNumber'] = params['page_number']
3326        if 'template_id' in params:
3327            path_params['templateId'] = params['template_id']
3328
3329        query_params = {}
3330
3331        header_params = {}
3332
3333        form_params = []
3334        local_var_files = {}
3335
3336        body_params = None
3337        # HTTP header `Accept`
3338        header_params['Accept'] = self.api_client.\
3339            select_header_accept(['application/json'])
3340
3341        # Authentication setting
3342        auth_settings = []
3343
3344        return self.api_client.call_api(resource_path, 'GET',
3345                                        path_params,
3346                                        query_params,
3347                                        header_params,
3348                                        body=body_params,
3349                                        post_params=form_params,
3350                                        files=local_var_files,
3351                                        response_type='Tabs',
3352                                        auth_settings=auth_settings,
3353                                        callback=params.get('callback'),
3354                                        _return_http_data_only=params.get('_return_http_data_only'),
3355                                        _preload_content=params.get('_preload_content', True),
3356                                        _request_timeout=params.get('_request_timeout'),
3357                                        collection_formats=collection_formats)
3358
3359    def get_pages(self, account_id, document_id, template_id, **kwargs):
3360        """
3361        Returns document page image(s) based on input.
3362        Returns images of the pages in a template document for display based on the parameters that you specify.
3363        This method makes a synchronous HTTP request by default. To make an
3364        asynchronous HTTP request, please define a `callback` function
3365        to be invoked when receiving the response.
3366        >>> def callback_function(response):
3367        >>>     pprint(response)
3368        >>>
3369        >>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function)
3370
3371        :param callback function: The callback function
3372            for asynchronous request. (optional)
3373        :param str account_id: The external account number (int) or account ID Guid. (required)
3374        :param str document_id: The ID of the document being accessed. (required)
3375        :param str template_id: The ID of the template being accessed. (required)
3376        :param str count:
3377        :param str dpi:
3378        :param str max_height:
3379        :param str max_width:
3380        :param str nocache:
3381        :param str show_changes:
3382        :param str start_position:
3383        :return: PageImages
3384                 If the method is called asynchronously,
3385                 returns the request thread.
3386        """
3387        kwargs['_return_http_data_only'] = True
3388        if kwargs.get('callback'):
3389            return self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3390        else:
3391            (data) = self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3392            return data
3393
3394    def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs):
3395        """
3396        Returns document page image(s) based on input.
3397        Returns images of the pages in a template document for display based on the parameters that you specify.
3398        This method makes a synchronous HTTP request by default. To make an
3399        asynchronous HTTP request, please define a `callback` function
3400        to be invoked when receiving the response.
3401        >>> def callback_function(response):
3402        >>>     pprint(response)
3403        >>>
3404        >>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function)
3405
3406        :param callback function: The callback function
3407            for asynchronous request. (optional)
3408        :param str account_id: The external account number (int) or account ID Guid. (required)
3409        :param str document_id: The ID of the document being accessed. (required)
3410        :param str template_id: The ID of the template being accessed. (required)
3411        :param str count:
3412        :param str dpi:
3413        :param str max_height:
3414        :param str max_width:
3415        :param str nocache:
3416        :param str show_changes:
3417        :param str start_position:
3418        :return: PageImages
3419                 If the method is called asynchronously,
3420                 returns the request thread.
3421        """
3422
3423        all_params = ['account_id', 'document_id', 'template_id', 'count', 'dpi', 'max_height', 'max_width', 'nocache', 'show_changes', 'start_position']
3424        all_params.append('callback')
3425        all_params.append('_return_http_data_only')
3426        all_params.append('_preload_content')
3427        all_params.append('_request_timeout')
3428
3429        params = locals()
3430        for key, val in iteritems(params['kwargs']):
3431            if key not in all_params:
3432                raise TypeError(
3433                    "Got an unexpected keyword argument '%s'"
3434                    " to method get_pages" % key
3435                )
3436            params[key] = val
3437        del params['kwargs']
3438        # verify the required parameter 'account_id' is set
3439        if ('account_id' not in params) or (params['account_id'] is None):
3440            raise ValueError("Missing the required parameter `account_id` when calling `get_pages`")
3441        # verify the required parameter 'document_id' is set
3442        if ('document_id' not in params) or (params['document_id'] is None):
3443            raise ValueError("Missing the required parameter `document_id` when calling `get_pages`")
3444        # verify the required parameter 'template_id' is set
3445        if ('template_id' not in params) or (params['template_id'] is None):
3446            raise ValueError("Missing the required parameter `template_id` when calling `get_pages`")
3447
3448
3449        collection_formats = {}
3450
3451        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages'.replace('{format}', 'json')
3452        path_params = {}
3453        if 'account_id' in params:
3454            path_params['accountId'] = params['account_id']
3455        if 'document_id' in params:
3456            path_params['documentId'] = params['document_id']
3457        if 'template_id' in params:
3458            path_params['templateId'] = params['template_id']
3459
3460        query_params = {}
3461        if 'count' in params:
3462            query_params['count'] = params['count']
3463        if 'dpi' in params:
3464            query_params['dpi'] = params['dpi']
3465        if 'max_height' in params:
3466            query_params['max_height'] = params['max_height']
3467        if 'max_width' in params:
3468            query_params['max_width'] = params['max_width']
3469        if 'nocache' in params:
3470            query_params['nocache'] = params['nocache']
3471        if 'show_changes' in params:
3472            query_params['show_changes'] = params['show_changes']
3473        if 'start_position' in params:
3474            query_params['start_position'] = params['start_position']
3475
3476        header_params = {}
3477
3478        form_params = []
3479        local_var_files = {}
3480
3481        body_params = None
3482        # HTTP header `Accept`
3483        header_params['Accept'] = self.api_client.\
3484            select_header_accept(['application/json'])
3485
3486        # Authentication setting
3487        auth_settings = []
3488
3489        return self.api_client.call_api(resource_path, 'GET',
3490                                        path_params,
3491                                        query_params,
3492                                        header_params,
3493                                        body=body_params,
3494                                        post_params=form_params,
3495                                        files=local_var_files,
3496                                        response_type='PageImages',
3497                                        auth_settings=auth_settings,
3498                                        callback=params.get('callback'),
3499                                        _return_http_data_only=params.get('_return_http_data_only'),
3500                                        _preload_content=params.get('_preload_content', True),
3501                                        _request_timeout=params.get('_request_timeout'),
3502                                        collection_formats=collection_formats)
3503
3504    def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs):
3505        """
3506        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3507        
3508        This method makes a synchronous HTTP request by default. To make an
3509        asynchronous HTTP request, please define a `callback` function
3510        to be invoked when receiving the response.
3511        >>> def callback_function(response):
3512        >>>     pprint(response)
3513        >>>
3514        >>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function)
3515
3516        :param callback function: The callback function
3517            for asynchronous request. (optional)
3518        :param str account_id: The external account number (int) or account ID Guid. (required)
3519        :param str document_id: The ID of the document being accessed. (required)
3520        :param str template_id: The ID of the template being accessed. (required)
3521        :return: DocumentHtmlDefinitionOriginals
3522                 If the method is called asynchronously,
3523                 returns the request thread.
3524        """
3525        kwargs['_return_http_data_only'] = True
3526        if kwargs.get('callback'):
3527            return self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3528        else:
3529            (data) = self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3530            return data
3531
3532    def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs):
3533        """
3534        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3535        
3536        This method makes a synchronous HTTP request by default. To make an
3537        asynchronous HTTP request, please define a `callback` function
3538        to be invoked when receiving the response.
3539        >>> def callback_function(response):
3540        >>>     pprint(response)
3541        >>>
3542        >>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function)
3543
3544        :param callback function: The callback function
3545            for asynchronous request. (optional)
3546        :param str account_id: The external account number (int) or account ID Guid. (required)
3547        :param str document_id: The ID of the document being accessed. (required)
3548        :param str template_id: The ID of the template being accessed. (required)
3549        :return: DocumentHtmlDefinitionOriginals
3550                 If the method is called asynchronously,
3551                 returns the request thread.
3552        """
3553
3554        all_params = ['account_id', 'document_id', 'template_id']
3555        all_params.append('callback')
3556        all_params.append('_return_http_data_only')
3557        all_params.append('_preload_content')
3558        all_params.append('_request_timeout')
3559
3560        params = locals()
3561        for key, val in iteritems(params['kwargs']):
3562            if key not in all_params:
3563                raise TypeError(
3564                    "Got an unexpected keyword argument '%s'"
3565                    " to method get_template_document_html_definitions" % key
3566                )
3567            params[key] = val
3568        del params['kwargs']
3569        # verify the required parameter 'account_id' is set
3570        if ('account_id' not in params) or (params['account_id'] is None):
3571            raise ValueError("Missing the required parameter `account_id` when calling `get_template_document_html_definitions`")
3572        # verify the required parameter 'document_id' is set
3573        if ('document_id' not in params) or (params['document_id'] is None):
3574            raise ValueError("Missing the required parameter `document_id` when calling `get_template_document_html_definitions`")
3575        # verify the required parameter 'template_id' is set
3576        if ('template_id' not in params) or (params['template_id'] is None):
3577            raise ValueError("Missing the required parameter `template_id` when calling `get_template_document_html_definitions`")
3578
3579
3580        collection_formats = {}
3581
3582        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions'.replace('{format}', 'json')
3583        path_params = {}
3584        if 'account_id' in params:
3585            path_params['accountId'] = params['account_id']
3586        if 'document_id' in params:
3587            path_params['documentId'] = params['document_id']
3588        if 'template_id' in params:
3589            path_params['templateId'] = params['template_id']
3590
3591        query_params = {}
3592
3593        header_params = {}
3594
3595        form_params = []
3596        local_var_files = {}
3597
3598        body_params = None
3599        # HTTP header `Accept`
3600        header_params['Accept'] = self.api_client.\
3601            select_header_accept(['application/json'])
3602
3603        # Authentication setting
3604        auth_settings = []
3605
3606        return self.api_client.call_api(resource_path, 'GET',
3607                                        path_params,
3608                                        query_params,
3609                                        header_params,
3610                                        body=body_params,
3611                                        post_params=form_params,
3612                                        files=local_var_files,
3613                                        response_type='DocumentHtmlDefinitionOriginals',
3614                                        auth_settings=auth_settings,
3615                                        callback=params.get('callback'),
3616                                        _return_http_data_only=params.get('_return_http_data_only'),
3617                                        _preload_content=params.get('_preload_content', True),
3618                                        _request_timeout=params.get('_request_timeout'),
3619                                        collection_formats=collection_formats)
3620
3621    def get_template_html_definitions(self, account_id, template_id, **kwargs):
3622        """
3623        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3624        
3625        This method makes a synchronous HTTP request by default. To make an
3626        asynchronous HTTP request, please define a `callback` function
3627        to be invoked when receiving the response.
3628        >>> def callback_function(response):
3629        >>>     pprint(response)
3630        >>>
3631        >>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function)
3632
3633        :param callback function: The callback function
3634            for asynchronous request. (optional)
3635        :param str account_id: The external account number (int) or account ID Guid. (required)
3636        :param str template_id: The ID of the template being accessed. (required)
3637        :return: DocumentHtmlDefinitionOriginals
3638                 If the method is called asynchronously,
3639                 returns the request thread.
3640        """
3641        kwargs['_return_http_data_only'] = True
3642        if kwargs.get('callback'):
3643            return self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3644        else:
3645            (data) = self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3646            return data
3647
3648    def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs):
3649        """
3650        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3651        
3652        This method makes a synchronous HTTP request by default. To make an
3653        asynchronous HTTP request, please define a `callback` function
3654        to be invoked when receiving the response.
3655        >>> def callback_function(response):
3656        >>>     pprint(response)
3657        >>>
3658        >>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function)
3659
3660        :param callback function: The callback function
3661            for asynchronous request. (optional)
3662        :param str account_id: The external account number (int) or account ID Guid. (required)
3663        :param str template_id: The ID of the template being accessed. (required)
3664        :return: DocumentHtmlDefinitionOriginals
3665                 If the method is called asynchronously,
3666                 returns the request thread.
3667        """
3668
3669        all_params = ['account_id', 'template_id']
3670        all_params.append('callback')
3671        all_params.append('_return_http_data_only')
3672        all_params.append('_preload_content')
3673        all_params.append('_request_timeout')
3674
3675        params = locals()
3676        for key, val in iteritems(params['kwargs']):
3677            if key not in all_params:
3678                raise TypeError(
3679                    "Got an unexpected keyword argument '%s'"
3680                    " to method get_template_html_definitions" % key
3681                )
3682            params[key] = val
3683        del params['kwargs']
3684        # verify the required parameter 'account_id' is set
3685        if ('account_id' not in params) or (params['account_id'] is None):
3686            raise ValueError("Missing the required parameter `account_id` when calling `get_template_html_definitions`")
3687        # verify the required parameter 'template_id' is set
3688        if ('template_id' not in params) or (params['template_id'] is None):
3689            raise ValueError("Missing the required parameter `template_id` when calling `get_template_html_definitions`")
3690
3691
3692        collection_formats = {}
3693
3694        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions'.replace('{format}', 'json')
3695        path_params = {}
3696        if 'account_id' in params:
3697            path_params['accountId'] = params['account_id']
3698        if 'template_id' in params:
3699            path_params['templateId'] = params['template_id']
3700
3701        query_params = {}
3702
3703        header_params = {}
3704
3705        form_params = []
3706        local_var_files = {}
3707
3708        body_params = None
3709        # HTTP header `Accept`
3710        header_params['Accept'] = self.api_client.\
3711            select_header_accept(['application/json'])
3712
3713        # Authentication setting
3714        auth_settings = []
3715
3716        return self.api_client.call_api(resource_path, 'GET',
3717                                        path_params,
3718                                        query_params,
3719                                        header_params,
3720                                        body=body_params,
3721                                        post_params=form_params,
3722                                        files=local_var_files,
3723                                        response_type='DocumentHtmlDefinitionOriginals',
3724                                        auth_settings=auth_settings,
3725                                        callback=params.get('callback'),
3726                                        _return_http_data_only=params.get('_return_http_data_only'),
3727                                        _preload_content=params.get('_preload_content', True),
3728                                        _request_timeout=params.get('_request_timeout'),
3729                                        collection_formats=collection_formats)
3730
3731    def list_custom_fields(self, account_id, template_id, **kwargs):
3732        """
3733        Gets the custom document fields from a template.
3734        Retrieves the custom document field information from an existing template.
3735        This method makes a synchronous HTTP request by default. To make an
3736        asynchronous HTTP request, please define a `callback` function
3737        to be invoked when receiving the response.
3738        >>> def callback_function(response):
3739        >>>     pprint(response)
3740        >>>
3741        >>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function)
3742
3743        :param callback function: The callback function
3744            for asynchronous request. (optional)
3745        :param str account_id: The external account number (int) or account ID Guid. (required)
3746        :param str template_id: The ID of the template being accessed. (required)
3747        :return: CustomFields
3748                 If the method is called asynchronously,
3749                 returns the request thread.
3750        """
3751        kwargs['_return_http_data_only'] = True
3752        if kwargs.get('callback'):
3753            return self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3754        else:
3755            (data) = self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3756            return data
3757
3758    def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
3759        """
3760        Gets the custom document fields from a template.
3761        Retrieves the custom document field information from an existing template.
3762        This method makes a synchronous HTTP request by default. To make an
3763        asynchronous HTTP request, please define a `callback` function
3764        to be invoked when receiving the response.
3765        >>> def callback_function(response):
3766        >>>     pprint(response)
3767        >>>
3768        >>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
3769
3770        :param callback function: The callback function
3771            for asynchronous request. (optional)
3772        :param str account_id: The external account number (int) or account ID Guid. (required)
3773        :param str template_id: The ID of the template being accessed. (required)
3774        :return: CustomFields
3775                 If the method is called asynchronously,
3776                 returns the request thread.
3777        """
3778
3779        all_params = ['account_id', 'template_id']
3780        all_params.append('callback')
3781        all_params.append('_return_http_data_only')
3782        all_params.append('_preload_content')
3783        all_params.append('_request_timeout')
3784
3785        params = locals()
3786        for key, val in iteritems(params['kwargs']):
3787            if key not in all_params:
3788                raise TypeError(
3789                    "Got an unexpected keyword argument '%s'"
3790                    " to method list_custom_fields" % key
3791                )
3792            params[key] = val
3793        del params['kwargs']
3794        # verify the required parameter 'account_id' is set
3795        if ('account_id' not in params) or (params['account_id'] is None):
3796            raise ValueError("Missing the required parameter `account_id` when calling `list_custom_fields`")
3797        # verify the required parameter 'template_id' is set
3798        if ('template_id' not in params) or (params['template_id'] is None):
3799            raise ValueError("Missing the required parameter `template_id` when calling `list_custom_fields`")
3800
3801
3802        collection_formats = {}
3803
3804        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
3805        path_params = {}
3806        if 'account_id' in params:
3807            path_params['accountId'] = params['account_id']
3808        if 'template_id' in params:
3809            path_params['templateId'] = params['template_id']
3810
3811        query_params = {}
3812
3813        header_params = {}
3814
3815        form_params = []
3816        local_var_files = {}
3817
3818        body_params = None
3819        # HTTP header `Accept`
3820        header_params['Accept'] = self.api_client.\
3821            select_header_accept(['application/json'])
3822
3823        # Authentication setting
3824        auth_settings = []
3825
3826        return self.api_client.call_api(resource_path, 'GET',
3827                                        path_params,
3828                                        query_params,
3829                                        header_params,
3830                                        body=body_params,
3831                                        post_params=form_params,
3832                                        files=local_var_files,
3833                                        response_type='CustomFields',
3834                                        auth_settings=auth_settings,
3835                                        callback=params.get('callback'),
3836                                        _return_http_data_only=params.get('_return_http_data_only'),
3837                                        _preload_content=params.get('_preload_content', True),
3838                                        _request_timeout=params.get('_request_timeout'),
3839                                        collection_formats=collection_formats)
3840
3841    def list_document_fields(self, account_id, document_id, template_id, **kwargs):
3842        """
3843        Gets the custom document fields for a an existing template document.
3844        Retrieves the custom document fields for an existing template document.
3845        This method makes a synchronous HTTP request by default. To make an
3846        asynchronous HTTP request, please define a `callback` function
3847        to be invoked when receiving the response.
3848        >>> def callback_function(response):
3849        >>>     pprint(response)
3850        >>>
3851        >>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function)
3852
3853        :param callback function: The callback function
3854            for asynchronous request. (optional)
3855        :param str account_id: The external account number (int) or account ID Guid. (required)
3856        :param str document_id: The ID of the document being accessed. (required)
3857        :param str template_id: The ID of the template being accessed. (required)
3858        :return: DocumentFieldsInformation
3859                 If the method is called asynchronously,
3860                 returns the request thread.
3861        """
3862        kwargs['_return_http_data_only'] = True
3863        if kwargs.get('callback'):
3864            return self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
3865        else:
3866            (data) = self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
3867            return data
3868
3869    def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
3870        """
3871        Gets the custom document fields for a an existing template document.
3872        Retrieves the custom document fields for an existing template document.
3873        This method makes a synchronous HTTP request by default. To make an
3874        asynchronous HTTP request, please define a `callback` function
3875        to be invoked when receiving the response.
3876        >>> def callback_function(response):
3877        >>>     pprint(response)
3878        >>>
3879        >>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
3880
3881        :param callback function: The callback function
3882            for asynchronous request. (optional)
3883        :param str account_id: The external account number (int) or account ID Guid. (required)
3884        :param str document_id: The ID of the document being accessed. (required)
3885        :param str template_id: The ID of the template being accessed. (required)
3886        :return: DocumentFieldsInformation
3887                 If the method is called asynchronously,
3888                 returns the request thread.
3889        """
3890
3891        all_params = ['account_id', 'document_id', 'template_id']
3892        all_params.append('callback')
3893        all_params.append('_return_http_data_only')
3894        all_params.append('_preload_content')
3895        all_params.append('_request_timeout')
3896
3897        params = locals()
3898        for key, val in iteritems(params['kwargs']):
3899            if key not in all_params:
3900                raise TypeError(
3901                    "Got an unexpected keyword argument '%s'"
3902                    " to method list_document_fields" % key
3903                )
3904            params[key] = val
3905        del params['kwargs']
3906        # verify the required parameter 'account_id' is set
3907        if ('account_id' not in params) or (params['account_id'] is None):
3908            raise ValueError("Missing the required parameter `account_id` when calling `list_document_fields`")
3909        # verify the required parameter 'document_id' is set
3910        if ('document_id' not in params) or (params['document_id'] is None):
3911            raise ValueError("Missing the required parameter `document_id` when calling `list_document_fields`")
3912        # verify the required parameter 'template_id' is set
3913        if ('template_id' not in params) or (params['template_id'] is None):
3914            raise ValueError("Missing the required parameter `template_id` when calling `list_document_fields`")
3915
3916
3917        collection_formats = {}
3918
3919        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
3920        path_params = {}
3921        if 'account_id' in params:
3922            path_params['accountId'] = params['account_id']
3923        if 'document_id' in params:
3924            path_params['documentId'] = params['document_id']
3925        if 'template_id' in params:
3926            path_params['templateId'] = params['template_id']
3927
3928        query_params = {}
3929
3930        header_params = {}
3931
3932        form_params = []
3933        local_var_files = {}
3934
3935        body_params = None
3936        # HTTP header `Accept`
3937        header_params['Accept'] = self.api_client.\
3938            select_header_accept(['application/json'])
3939
3940        # Authentication setting
3941        auth_settings = []
3942
3943        return self.api_client.call_api(resource_path, 'GET',
3944                                        path_params,
3945                                        query_params,
3946                                        header_params,
3947                                        body=body_params,
3948                                        post_params=form_params,
3949                                        files=local_var_files,
3950                                        response_type='DocumentFieldsInformation',
3951                                        auth_settings=auth_settings,
3952                                        callback=params.get('callback'),
3953                                        _return_http_data_only=params.get('_return_http_data_only'),
3954                                        _preload_content=params.get('_preload_content', True),
3955                                        _request_timeout=params.get('_request_timeout'),
3956                                        collection_formats=collection_formats)
3957
3958    def list_documents(self, account_id, template_id, **kwargs):
3959        """
3960        Gets a list of documents associated with a template.
3961        Retrieves a list of documents associated with the specified template.
3962        This method makes a synchronous HTTP request by default. To make an
3963        asynchronous HTTP request, please define a `callback` function
3964        to be invoked when receiving the response.
3965        >>> def callback_function(response):
3966        >>>     pprint(response)
3967        >>>
3968        >>> thread = api.list_documents(account_id, template_id, callback=callback_function)
3969
3970        :param callback function: The callback function
3971            for asynchronous request. (optional)
3972        :param str account_id: The external account number (int) or account ID Guid. (required)
3973        :param str template_id: The ID of the template being accessed. (required)
3974        :param str include_agreement_type:
3975        :param str include_is_edited:
3976        :param str include_tabs:
3977        :return: TemplateDocumentsResult
3978                 If the method is called asynchronously,
3979                 returns the request thread.
3980        """
3981        kwargs['_return_http_data_only'] = True
3982        if kwargs.get('callback'):
3983            return self.list_documents_with_http_info(account_id, template_id, **kwargs)
3984        else:
3985            (data) = self.list_documents_with_http_info(account_id, template_id, **kwargs)
3986            return data
3987
3988    def list_documents_with_http_info(self, account_id, template_id, **kwargs):
3989        """
3990        Gets a list of documents associated with a template.
3991        Retrieves a list of documents associated with the specified template.
3992        This method makes a synchronous HTTP request by default. To make an
3993        asynchronous HTTP request, please define a `callback` function
3994        to be invoked when receiving the response.
3995        >>> def callback_function(response):
3996        >>>     pprint(response)
3997        >>>
3998        >>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function)
3999
4000        :param callback function: The callback function
4001            for asynchronous request. (optional)
4002        :param str account_id: The external account number (int) or account ID Guid. (required)
4003        :param str template_id: The ID of the template being accessed. (required)
4004        :param str include_agreement_type:
4005        :param str include_is_edited:
4006        :param str include_tabs:
4007        :return: TemplateDocumentsResult
4008                 If the method is called asynchronously,
4009                 returns the request thread.
4010        """
4011
4012        all_params = ['account_id', 'template_id', 'include_agreement_type', 'include_is_edited', 'include_tabs']
4013        all_params.append('callback')
4014        all_params.append('_return_http_data_only')
4015        all_params.append('_preload_content')
4016        all_params.append('_request_timeout')
4017
4018        params = locals()
4019        for key, val in iteritems(params['kwargs']):
4020            if key not in all_params:
4021                raise TypeError(
4022                    "Got an unexpected keyword argument '%s'"
4023                    " to method list_documents" % key
4024                )
4025            params[key] = val
4026        del params['kwargs']
4027        # verify the required parameter 'account_id' is set
4028        if ('account_id' not in params) or (params['account_id'] is None):
4029            raise ValueError("Missing the required parameter `account_id` when calling `list_documents`")
4030        # verify the required parameter 'template_id' is set
4031        if ('template_id' not in params) or (params['template_id'] is None):
4032            raise ValueError("Missing the required parameter `template_id` when calling `list_documents`")
4033
4034
4035        collection_formats = {}
4036
4037        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
4038        path_params = {}
4039        if 'account_id' in params:
4040            path_params['accountId'] = params['account_id']
4041        if 'template_id' in params:
4042            path_params['templateId'] = params['template_id']
4043
4044        query_params = {}
4045        if 'include_agreement_type' in params:
4046            query_params['include_agreement_type'] = params['include_agreement_type']
4047        if 'include_is_edited' in params:
4048            query_params['include_is_edited'] = params['include_is_edited']
4049        if 'include_tabs' in params:
4050            query_params['include_tabs'] = params['include_tabs']
4051
4052        header_params = {}
4053
4054        form_params = []
4055        local_var_files = {}
4056
4057        body_params = None
4058        # HTTP header `Accept`
4059        header_params['Accept'] = self.api_client.\
4060            select_header_accept(['application/json'])
4061
4062        # Authentication setting
4063        auth_settings = []
4064
4065        return self.api_client.call_api(resource_path, 'GET',
4066                                        path_params,
4067                                        query_params,
4068                                        header_params,
4069                                        body=body_params,
4070                                        post_params=form_params,
4071                                        files=local_var_files,
4072                                        response_type='TemplateDocumentsResult',
4073                                        auth_settings=auth_settings,
4074                                        callback=params.get('callback'),
4075                                        _return_http_data_only=params.get('_return_http_data_only'),
4076                                        _preload_content=params.get('_preload_content', True),
4077                                        _request_timeout=params.get('_request_timeout'),
4078                                        collection_formats=collection_formats)
4079
4080    def list_recipients(self, account_id, template_id, **kwargs):
4081        """
4082        Gets recipient information from a template.
4083        Retrieves the information for all recipients in the specified template.
4084        This method makes a synchronous HTTP request by default. To make an
4085        asynchronous HTTP request, please define a `callback` function
4086        to be invoked when receiving the response.
4087        >>> def callback_function(response):
4088        >>>     pprint(response)
4089        >>>
4090        >>> thread = api.list_recipients(account_id, template_id, callback=callback_function)
4091
4092        :param callback function: The callback function
4093            for asynchronous request. (optional)
4094        :param str account_id: The external account number (int) or account ID Guid. (required)
4095        :param str template_id: The ID of the template being accessed. (required)
4096        :param str include_anchor_tab_locations:  When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. 
4097        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4098        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4099        :return: Recipients
4100                 If the method is called asynchronously,
4101                 returns the request thread.
4102        """
4103        kwargs['_return_http_data_only'] = True
4104        if kwargs.get('callback'):
4105            return self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4106        else:
4107            (data) = self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4108            return data
4109
4110    def list_recipients_with_http_info(self, account_id, template_id, **kwargs):
4111        """
4112        Gets recipient information from a template.
4113        Retrieves the information for all recipients in the specified template.
4114        This method makes a synchronous HTTP request by default. To make an
4115        asynchronous HTTP request, please define a `callback` function
4116        to be invoked when receiving the response.
4117        >>> def callback_function(response):
4118        >>>     pprint(response)
4119        >>>
4120        >>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function)
4121
4122        :param callback function: The callback function
4123            for asynchronous request. (optional)
4124        :param str account_id: The external account number (int) or account ID Guid. (required)
4125        :param str template_id: The ID of the template being accessed. (required)
4126        :param str include_anchor_tab_locations:  When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. 
4127        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4128        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4129        :return: Recipients
4130                 If the method is called asynchronously,
4131                 returns the request thread.
4132        """
4133
4134        all_params = ['account_id', 'template_id', 'include_anchor_tab_locations', 'include_extended', 'include_tabs']
4135        all_params.append('callback')
4136        all_params.append('_return_http_data_only')
4137        all_params.append('_preload_content')
4138        all_params.append('_request_timeout')
4139
4140        params = locals()
4141        for key, val in iteritems(params['kwargs']):
4142            if key not in all_params:
4143                raise TypeError(
4144                    "Got an unexpected keyword argument '%s'"
4145                    " to method list_recipients" % key
4146                )
4147            params[key] = val
4148        del params['kwargs']
4149        # verify the required parameter 'account_id' is set
4150        if ('account_id' not in params) or (params['account_id'] is None):
4151            raise ValueError("Missing the required parameter `account_id` when calling `list_recipients`")
4152        # verify the required parameter 'template_id' is set
4153        if ('template_id' not in params) or (params['template_id'] is None):
4154            raise ValueError("Missing the required parameter `template_id` when calling `list_recipients`")
4155
4156
4157        collection_formats = {}
4158
4159        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
4160        path_params = {}
4161        if 'account_id' in params:
4162            path_params['accountId'] = params['account_id']
4163        if 'template_id' in params:
4164            path_params['templateId'] = params['template_id']
4165
4166        query_params = {}
4167        if 'include_anchor_tab_locations' in params:
4168            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4169        if 'include_extended' in params:
4170            query_params['include_extended'] = params['include_extended']
4171        if 'include_tabs' in params:
4172            query_params['include_tabs'] = params['include_tabs']
4173
4174        header_params = {}
4175
4176        form_params = []
4177        local_var_files = {}
4178
4179        body_params = None
4180        # HTTP header `Accept`
4181        header_params['Accept'] = self.api_client.\
4182            select_header_accept(['application/json'])
4183
4184        # Authentication setting
4185        auth_settings = []
4186
4187        return self.api_client.call_api(resource_path, 'GET',
4188                                        path_params,
4189                                        query_params,
4190                                        header_params,
4191                                        body=body_params,
4192                                        post_params=form_params,
4193                                        files=local_var_files,
4194                                        response_type='Recipients',
4195                                        auth_settings=auth_settings,
4196                                        callback=params.get('callback'),
4197                                        _return_http_data_only=params.get('_return_http_data_only'),
4198                                        _preload_content=params.get('_preload_content', True),
4199                                        _request_timeout=params.get('_request_timeout'),
4200                                        collection_formats=collection_formats)
4201
4202    def list_tabs(self, account_id, recipient_id, template_id, **kwargs):
4203        """
4204        Gets the tabs information for a signer or sign-in-person recipient in a template.
4205        Gets the tabs information for a signer or sign-in-person recipient in a template.
4206        This method makes a synchronous HTTP request by default. To make an
4207        asynchronous HTTP request, please define a `callback` function
4208        to be invoked when receiving the response.
4209        >>> def callback_function(response):
4210        >>>     pprint(response)
4211        >>>
4212        >>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function)
4213
4214        :param callback function: The callback function
4215            for asynchronous request. (optional)
4216        :param str account_id: The external account number (int) or account ID Guid. (required)
4217        :param str recipient_id: The ID of the recipient being accessed. (required)
4218        :param str template_id: The ID of the template being accessed. (required)
4219        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4220        :param str include_metadata:
4221        :return: Tabs
4222                 If the method is called asynchronously,
4223                 returns the request thread.
4224        """
4225        kwargs['_return_http_data_only'] = True
4226        if kwargs.get('callback'):
4227            return self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4228        else:
4229            (data) = self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4230            return data
4231
4232    def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
4233        """
4234        Gets the tabs information for a signer or sign-in-person recipient in a template.
4235        Gets the tabs information for a signer or sign-in-person recipient in a template.
4236        This method makes a synchronous HTTP request by default. To make an
4237        asynchronous HTTP request, please define a `callback` function
4238        to be invoked when receiving the response.
4239        >>> def callback_function(response):
4240        >>>     pprint(response)
4241        >>>
4242        >>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
4243
4244        :param callback function: The callback function
4245            for asynchronous request. (optional)
4246        :param str account_id: The external account number (int) or account ID Guid. (required)
4247        :param str recipient_id: The ID of the recipient being accessed. (required)
4248        :param str template_id: The ID of the template being accessed. (required)
4249        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4250        :param str include_metadata:
4251        :return: Tabs
4252                 If the method is called asynchronously,
4253                 returns the request thread.
4254        """
4255
4256        all_params = ['account_id', 'recipient_id', 'template_id', 'include_anchor_tab_locations', 'include_metadata']
4257        all_params.append('callback')
4258        all_params.append('_return_http_data_only')
4259        all_params.append('_preload_content')
4260        all_params.append('_request_timeout')
4261
4262        params = locals()
4263        for key, val in iteritems(params['kwargs']):
4264            if key not in all_params:
4265                raise TypeError(
4266                    "Got an unexpected keyword argument '%s'"
4267                    " to method list_tabs" % key
4268                )
4269            params[key] = val
4270        del params['kwargs']
4271        # verify the required parameter 'account_id' is set
4272        if ('account_id' not in params) or (params['account_id'] is None):
4273            raise ValueError("Missing the required parameter `account_id` when calling `list_tabs`")
4274        # verify the required parameter 'recipient_id' is set
4275        if ('recipient_id' not in params) or (params['recipient_id'] is None):
4276            raise ValueError("Missing the required parameter `recipient_id` when calling `list_tabs`")
4277        # verify the required parameter 'template_id' is set
4278        if ('template_id' not in params) or (params['template_id'] is None):
4279            raise ValueError("Missing the required parameter `template_id` when calling `list_tabs`")
4280
4281
4282        collection_formats = {}
4283
4284        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
4285        path_params = {}
4286        if 'account_id' in params:
4287            path_params['accountId'] = params['account_id']
4288        if 'recipient_id' in params:
4289            path_params['recipientId'] = params['recipient_id']
4290        if 'template_id' in params:
4291            path_params['templateId'] = params['template_id']
4292
4293        query_params = {}
4294        if 'include_anchor_tab_locations' in params:
4295            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4296        if 'include_metadata' in params:
4297            query_params['include_metadata'] = params['include_metadata']
4298
4299        header_params = {}
4300
4301        form_params = []
4302        local_var_files = {}
4303
4304        body_params = None
4305        # HTTP header `Accept`
4306        header_params['Accept'] = self.api_client.\
4307            select_header_accept(['application/json'])
4308
4309        # Authentication setting
4310        auth_settings = []
4311
4312        return self.api_client.call_api(resource_path, 'GET',
4313                                        path_params,
4314                                        query_params,
4315                                        header_params,
4316                                        body=body_params,
4317                                        post_params=form_params,
4318                                        files=local_var_files,
4319                                        response_type='Tabs',
4320                                        auth_settings=auth_settings,
4321                                        callback=params.get('callback'),
4322                                        _return_http_data_only=params.get('_return_http_data_only'),
4323                                        _preload_content=params.get('_preload_content', True),
4324                                        _request_timeout=params.get('_request_timeout'),
4325                                        collection_formats=collection_formats)
4326
4327    def list_templates(self, account_id, **kwargs):
4328        """
4329        Gets the definition of a template.
4330        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4331        This method makes a synchronous HTTP request by default. To make an
4332        asynchronous HTTP request, please define a `callback` function
4333        to be invoked when receiving the response.
4334        >>> def callback_function(response):
4335        >>>     pprint(response)
4336        >>>
4337        >>> thread = api.list_templates(account_id, callback=callback_function)
4338
4339        :param callback function: The callback function
4340            for asynchronous request. (optional)
4341        :param str account_id: The external account number (int) or account ID Guid. (required)
4342        :param str count: Number of records to return in the cache.
4343        :param str created_from_date:
4344        :param str created_to_date:
4345        :param str folder_ids: A comma separated list of folder ID GUIDs.
4346        :param str folder_types:
4347        :param str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
4348        :param str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
4349        :param str is_deleted_template_only:
4350        :param str is_download:
4351        :param str link_configuration_id:
4352        :param str modified_from_date:
4353        :param str modified_to_date:
4354        :param str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z)  -desc = descending sort order (z to a)
4355        :param str order_by: Sets the file attribute used to sort the list. Valid values are:  -name: template name  -modified: date/time template was last modified.  -used: date/time the template was last used.
4356        :param str search_fields:
4357        :param str search_text: The search text used to search the names of templates.
4358        :param str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
4359        :param str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
4360        :param str template_ids:
4361        :param str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
4362        :param str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
4363        :param str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
4364        :param str user_filter: Sets if the templates shown in the response Valid values are:  -owned_by_me: only shows templates the user owns.  -shared_with_me: only shows templates that are shared with the user.  -all: shows all templates owned or shared with the user.
4365        :param str user_id:
4366        :return: EnvelopeTemplateResults
4367                 If the method is called asynchronously,
4368                 returns the request thread.
4369        """
4370        kwargs['_return_http_data_only'] = True
4371        if kwargs.get('callback'):
4372            return self.list_templates_with_http_info(account_id, **kwargs)
4373        else:
4374            (data) = self.list_templates_with_http_info(account_id, **kwargs)
4375            return data
4376
4377    def list_templates_with_http_info(self, account_id, **kwargs):
4378        """
4379        Gets the definition of a template.
4380        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4381        This method makes a synchronous HTTP request by default. To make an
4382        asynchronous HTTP request, please define a `callback` function
4383        to be invoked when receiving the response.
4384        >>> def callback_function(response):
4385        >>>     pprint(response)
4386        >>>
4387        >>> thread = api.list_templates_with_http_info(account_id, callback=callback_function)
4388
4389        :param callback function: The callback function
4390            for asynchronous request. (optional)
4391        :param str account_id: The external account number (int) or account ID Guid. (required)
4392        :param str count: Number of records to return in the cache.
4393        :param str created_from_date:
4394        :param str created_to_date:
4395        :param str folder_ids: A comma separated list of folder ID GUIDs.
4396        :param str folder_types:
4397        :param str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
4398        :param str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
4399        :param str is_deleted_template_only:
4400        :param str is_download:
4401        :param str link_configuration_id:
4402        :param str modified_from_date:
4403        :param str modified_to_date:
4404        :param str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z)  -desc = descending sort order (z to a)
4405        :param str order_by: Sets the file attribute used to sort the list. Valid values are:  -name: template name  -modified: date/time template was last modified.  -used: date/time the template was last used.
4406        :param str search_fields:
4407        :param str search_text: The search text used to search the names of templates.
4408        :param str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
4409        :param str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
4410        :param str template_ids:
4411        :param str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
4412        :param str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
4413        :param str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
4414        :param str user_filter: Sets if the templates shown in the response Valid values are:  -owned_by_me: only shows templates the user owns.  -shared_with_me: only shows templates that are shared with the user.  -all: shows all templates owned or shared with the user.
4415        :param str user_id:
4416        :return: EnvelopeTemplateResults
4417                 If the method is called asynchronously,
4418                 returns the request thread.
4419        """
4420
4421        all_params = ['account_id', 'count', 'created_from_date', 'created_to_date', 'folder_ids', 'folder_types', 'from_date', 'include', 'is_deleted_template_only', 'is_download', 'link_configuration_id', 'modified_from_date', 'modified_to_date', 'order', 'order_by', 'search_fields', 'search_text', 'shared_by_me', 'start_position', 'template_ids', 'to_date', 'used_from_date', 'used_to_date', 'user_filter', 'user_id']
4422        all_params.append('callback')
4423        all_params.append('_return_http_data_only')
4424        all_params.append('_preload_content')
4425        all_params.append('_request_timeout')
4426
4427        params = locals()
4428        for key, val in iteritems(params['kwargs']):
4429            if key not in all_params:
4430                raise TypeError(
4431                    "Got an unexpected keyword argument '%s'"
4432                    " to method list_templates" % key
4433                )
4434            params[key] = val
4435        del params['kwargs']
4436        # verify the required parameter 'account_id' is set
4437        if ('account_id' not in params) or (params['account_id'] is None):
4438            raise ValueError("Missing the required parameter `account_id` when calling `list_templates`")
4439
4440
4441        collection_formats = {}
4442
4443        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
4444        path_params = {}
4445        if 'account_id' in params:
4446            path_params['accountId'] = params['account_id']
4447
4448        query_params = {}
4449        if 'count' in params:
4450            query_params['count'] = params['count']
4451        if 'created_from_date' in params:
4452            query_params['created_from_date'] = params['created_from_date']
4453        if 'created_to_date' in params:
4454            query_params['created_to_date'] = params['created_to_date']
4455        if 'folder_ids' in params:
4456            query_params['folder_ids'] = params['folder_ids']
4457        if 'folder_types' in params:
4458            query_params['folder_types'] = params['folder_types']
4459        if 'from_date' in params:
4460            query_params['from_date'] = params['from_date']
4461        if 'include' in params:
4462            query_params['include'] = params['include']
4463        if 'is_deleted_template_only' in params:
4464            query_params['is_deleted_template_only'] = params['is_deleted_template_only']
4465        if 'is_download' in params:
4466            query_params['is_download'] = params['is_download']
4467        if 'link_configuration_id' in params:
4468            query_params['link_configuration_id'] = params['link_configuration_id']
4469        if 'modified_from_date' in params:
4470            query_params['modified_from_date'] = params['modified_from_date']
4471        if 'modified_to_date' in params:
4472            query_params['modified_to_date'] = params['modified_to_date']
4473        if 'order' in params:
4474            query_params['order'] = params['order']
4475        if 'order_by' in params:
4476            query_params['order_by'] = params['order_by']
4477        if 'search_fields' in params:
4478            query_params['search_fields'] = params['search_fields']
4479        if 'search_text' in params:
4480            query_params['search_text'] = params['search_text']
4481        if 'shared_by_me' in params:
4482            query_params['shared_by_me'] = params['shared_by_me']
4483        if 'start_position' in params:
4484            query_params['start_position'] = params['start_position']
4485        if 'template_ids' in params:
4486            query_params['template_ids'] = params['template_ids']
4487        if 'to_date' in params:
4488            query_params['to_date'] = params['to_date']
4489        if 'used_from_date' in params:
4490            query_params['used_from_date'] = params['used_from_date']
4491        if 'used_to_date' in params:
4492            query_params['used_to_date'] = params['used_to_date']
4493        if 'user_filter' in params:
4494            query_params['user_filter'] = params['user_filter']
4495        if 'user_id' in params:
4496            query_params['user_id'] = params['user_id']
4497
4498        header_params = {}
4499
4500        form_params = []
4501        local_var_files = {}
4502
4503        body_params = None
4504        # HTTP header `Accept`
4505        header_params['Accept'] = self.api_client.\
4506            select_header_accept(['application/json'])
4507
4508        # Authentication setting
4509        auth_settings = []
4510
4511        return self.api_client.call_api(resource_path, 'GET',
4512                                        path_params,
4513                                        query_params,
4514                                        header_params,
4515                                        body=body_params,
4516                                        post_params=form_params,
4517                                        files=local_var_files,
4518                                        response_type='EnvelopeTemplateResults',
4519                                        auth_settings=auth_settings,
4520                                        callback=params.get('callback'),
4521                                        _return_http_data_only=params.get('_return_http_data_only'),
4522                                        _preload_content=params.get('_preload_content', True),
4523                                        _request_timeout=params.get('_request_timeout'),
4524                                        collection_formats=collection_formats)
4525
4526    def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
4527        """
4528        Rotates page image from a template for display.
4529        Rotates page image from a template for display. The page image can be rotated to the left or right.
4530        This method makes a synchronous HTTP request by default. To make an
4531        asynchronous HTTP request, please define a `callback` function
4532        to be invoked when receiving the response.
4533        >>> def callback_function(response):
4534        >>>     pprint(response)
4535        >>>
4536        >>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
4537
4538        :param callback function: The callback function
4539            for asynchronous request. (optional)
4540        :param str account_id: The external account number (int) or account ID Guid. (required)
4541        :param str document_id: The ID of the document being accessed. (required)
4542        :param str page_number: The page number being accessed. (required)
4543        :param str template_id: The ID of the template being accessed. (required)
4544        :param PageRequest page_request:
4545        :return: None
4546                 If the method is called asynchronously,
4547                 returns the request thread.
4548        """
4549        kwargs['_return_http_data_only'] = True
4550        if kwargs.get('callback'):
4551            return self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4552        else:
4553            (data) = self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4554            return data
4555
4556    def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
4557        """
4558        Rotates page image from a template for display.
4559        Rotates page image from a template for display. The page image can be rotated to the left or right.
4560        This method makes a synchronous HTTP request by default. To make an
4561        asynchronous HTTP request, please define a `callback` function
4562        to be invoked when receiving the response.
4563        >>> def callback_function(response):
4564        >>>     pprint(response)
4565        >>>
4566        >>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
4567
4568        :param callback function: The callback function
4569            for asynchronous request. (optional)
4570        :param str account_id: The external account number (int) or account ID Guid. (required)
4571        :param str document_id: The ID of the document being accessed. (required)
4572        :param str page_number: The page number being accessed. (required)
4573        :param str template_id: The ID of the template being accessed. (required)
4574        :param PageRequest page_request:
4575        :return: None
4576                 If the method is called asynchronously,
4577                 returns the request thread.
4578        """
4579
4580        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
4581        all_params.append('callback')
4582        all_params.append('_return_http_data_only')
4583        all_params.append('_preload_content')
4584        all_params.append('_request_timeout')
4585
4586        params = locals()
4587        for key, val in iteritems(params['kwargs']):
4588            if key not in all_params:
4589                raise TypeError(
4590                    "Got an unexpected keyword argument '%s'"
4591                    " to method rotate_document_page" % key
4592                )
4593            params[key] = val
4594        del params['kwargs']
4595        # verify the required parameter 'account_id' is set
4596        if ('account_id' not in params) or (params['account_id'] is None):
4597            raise ValueError("Missing the required parameter `account_id` when calling `rotate_document_page`")
4598        # verify the required parameter 'document_id' is set
4599        if ('document_id' not in params) or (params['document_id'] is None):
4600            raise ValueError("Missing the required parameter `document_id` when calling `rotate_document_page`")
4601        # verify the required parameter 'page_number' is set
4602        if ('page_number' not in params) or (params['page_number'] is None):
4603            raise ValueError("Missing the required parameter `page_number` when calling `rotate_document_page`")
4604        # verify the required parameter 'template_id' is set
4605        if ('template_id' not in params) or (params['template_id'] is None):
4606            raise ValueError("Missing the required parameter `template_id` when calling `rotate_document_page`")
4607
4608
4609        collection_formats = {}
4610
4611        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
4612        path_params = {}
4613        if 'account_id' in params:
4614            path_params['accountId'] = params['account_id']
4615        if 'document_id' in params:
4616            path_params['documentId'] = params['document_id']
4617        if 'page_number' in params:
4618            path_params['pageNumber'] = params['page_number']
4619        if 'template_id' in params:
4620            path_params['templateId'] = params['template_id']
4621
4622        query_params = {}
4623
4624        header_params = {}
4625
4626        form_params = []
4627        local_var_files = {}
4628
4629        body_params = None
4630        if 'page_request' in params:
4631            body_params = params['page_request']
4632        # HTTP header `Accept`
4633        header_params['Accept'] = self.api_client.\
4634            select_header_accept(['application/json'])
4635
4636        # Authentication setting
4637        auth_settings = []
4638
4639        return self.api_client.call_api(resource_path, 'PUT',
4640                                        path_params,
4641                                        query_params,
4642                                        header_params,
4643                                        body=body_params,
4644                                        post_params=form_params,
4645                                        files=local_var_files,
4646                                        response_type=None,
4647                                        auth_settings=auth_settings,
4648                                        callback=params.get('callback'),
4649                                        _return_http_data_only=params.get('_return_http_data_only'),
4650                                        _preload_content=params.get('_preload_content', True),
4651                                        _request_timeout=params.get('_request_timeout'),
4652                                        collection_formats=collection_formats)
4653
4654    def update(self, account_id, template_id, **kwargs):
4655        """
4656        Updates an existing template.
4657        Updates an existing template.
4658        This method makes a synchronous HTTP request by default. To make an
4659        asynchronous HTTP request, please define a `callback` function
4660        to be invoked when receiving the response.
4661        >>> def callback_function(response):
4662        >>>     pprint(response)
4663        >>>
4664        >>> thread = api.update(account_id, template_id, callback=callback_function)
4665
4666        :param callback function: The callback function
4667            for asynchronous request. (optional)
4668        :param str account_id: The external account number (int) or account ID Guid. (required)
4669        :param str template_id: The ID of the template being accessed. (required)
4670        :param EnvelopeTemplate envelope_template:
4671        :return: TemplateUpdateSummary
4672                 If the method is called asynchronously,
4673                 returns the request thread.
4674        """
4675        kwargs['_return_http_data_only'] = True
4676        if kwargs.get('callback'):
4677            return self.update_with_http_info(account_id, template_id, **kwargs)
4678        else:
4679            (data) = self.update_with_http_info(account_id, template_id, **kwargs)
4680            return data
4681
4682    def update_with_http_info(self, account_id, template_id, **kwargs):
4683        """
4684        Updates an existing template.
4685        Updates an existing template.
4686        This method makes a synchronous HTTP request by default. To make an
4687        asynchronous HTTP request, please define a `callback` function
4688        to be invoked when receiving the response.
4689        >>> def callback_function(response):
4690        >>>     pprint(response)
4691        >>>
4692        >>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function)
4693
4694        :param callback function: The callback function
4695            for asynchronous request. (optional)
4696        :param str account_id: The external account number (int) or account ID Guid. (required)
4697        :param str template_id: The ID of the template being accessed. (required)
4698        :param EnvelopeTemplate envelope_template:
4699        :return: TemplateUpdateSummary
4700                 If the method is called asynchronously,
4701                 returns the request thread.
4702        """
4703
4704        all_params = ['account_id', 'template_id', 'envelope_template']
4705        all_params.append('callback')
4706        all_params.append('_return_http_data_only')
4707        all_params.append('_preload_content')
4708        all_params.append('_request_timeout')
4709
4710        params = locals()
4711        for key, val in iteritems(params['kwargs']):
4712            if key not in all_params:
4713                raise TypeError(
4714                    "Got an unexpected keyword argument '%s'"
4715                    " to method update" % key
4716                )
4717            params[key] = val
4718        del params['kwargs']
4719        # verify the required parameter 'account_id' is set
4720        if ('account_id' not in params) or (params['account_id'] is None):
4721            raise ValueError("Missing the required parameter `account_id` when calling `update`")
4722        # verify the required parameter 'template_id' is set
4723        if ('template_id' not in params) or (params['template_id'] is None):
4724            raise ValueError("Missing the required parameter `template_id` when calling `update`")
4725
4726
4727        collection_formats = {}
4728
4729        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
4730        path_params = {}
4731        if 'account_id' in params:
4732            path_params['accountId'] = params['account_id']
4733        if 'template_id' in params:
4734            path_params['templateId'] = params['template_id']
4735
4736        query_params = {}
4737
4738        header_params = {}
4739
4740        form_params = []
4741        local_var_files = {}
4742
4743        body_params = None
4744        if 'envelope_template' in params:
4745            body_params = params['envelope_template']
4746        # HTTP header `Accept`
4747        header_params['Accept'] = self.api_client.\
4748            select_header_accept(['application/json'])
4749
4750        # Authentication setting
4751        auth_settings = []
4752
4753        return self.api_client.call_api(resource_path, 'PUT',
4754                                        path_params,
4755                                        query_params,
4756                                        header_params,
4757                                        body=body_params,
4758                                        post_params=form_params,
4759                                        files=local_var_files,
4760                                        response_type='TemplateUpdateSummary',
4761                                        auth_settings=auth_settings,
4762                                        callback=params.get('callback'),
4763                                        _return_http_data_only=params.get('_return_http_data_only'),
4764                                        _preload_content=params.get('_preload_content', True),
4765                                        _request_timeout=params.get('_request_timeout'),
4766                                        collection_formats=collection_formats)
4767
4768    def update_custom_fields(self, account_id, template_id, **kwargs):
4769        """
4770        Updates envelope custom fields in a template.
4771        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4772        This method makes a synchronous HTTP request by default. To make an
4773        asynchronous HTTP request, please define a `callback` function
4774        to be invoked when receiving the response.
4775        >>> def callback_function(response):
4776        >>>     pprint(response)
4777        >>>
4778        >>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function)
4779
4780        :param callback function: The callback function
4781            for asynchronous request. (optional)
4782        :param str account_id: The external account number (int) or account ID Guid. (required)
4783        :param str template_id: The ID of the template being accessed. (required)
4784        :param TemplateCustomFields template_custom_fields:
4785        :return: CustomFields
4786                 If the method is called asynchronously,
4787                 returns the request thread.
4788        """
4789        kwargs['_return_http_data_only'] = True
4790        if kwargs.get('callback'):
4791            return self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
4792        else:
4793            (data) = self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
4794            return data
4795
4796    def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
4797        """
4798        Updates envelope custom fields in a template.
4799        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4800        This method makes a synchronous HTTP request by default. To make an
4801        asynchronous HTTP request, please define a `callback` function
4802        to be invoked when receiving the response.
4803        >>> def callback_function(response):
4804        >>>     pprint(response)
4805        >>>
4806        >>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
4807
4808        :param callback function: The callback function
4809            for asynchronous request. (optional)
4810        :param str account_id: The external account number (int) or account ID Guid. (required)
4811        :param str template_id: The ID of the template being accessed. (required)
4812        :param TemplateCustomFields template_custom_fields:
4813        :return: CustomFields
4814                 If the method is called asynchronously,
4815                 returns the request thread.
4816        """
4817
4818        all_params = ['account_id', 'template_id', 'template_custom_fields']
4819        all_params.append('callback')
4820        all_params.append('_return_http_data_only')
4821        all_params.append('_preload_content')
4822        all_params.append('_request_timeout')
4823
4824        params = locals()
4825        for key, val in iteritems(params['kwargs']):
4826            if key not in all_params:
4827                raise TypeError(
4828                    "Got an unexpected keyword argument '%s'"
4829                    " to method update_custom_fields" % key
4830                )
4831            params[key] = val
4832        del params['kwargs']
4833        # verify the required parameter 'account_id' is set
4834        if ('account_id' not in params) or (params['account_id'] is None):
4835            raise ValueError("Missing the required parameter `account_id` when calling `update_custom_fields`")
4836        # verify the required parameter 'template_id' is set
4837        if ('template_id' not in params) or (params['template_id'] is None):
4838            raise ValueError("Missing the required parameter `template_id` when calling `update_custom_fields`")
4839
4840
4841        collection_formats = {}
4842
4843        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
4844        path_params = {}
4845        if 'account_id' in params:
4846            path_params['accountId'] = params['account_id']
4847        if 'template_id' in params:
4848            path_params['templateId'] = params['template_id']
4849
4850        query_params = {}
4851
4852        header_params = {}
4853
4854        form_params = []
4855        local_var_files = {}
4856
4857        body_params = None
4858        if 'template_custom_fields' in params:
4859            body_params = params['template_custom_fields']
4860        # HTTP header `Accept`
4861        header_params['Accept'] = self.api_client.\
4862            select_header_accept(['application/json'])
4863
4864        # Authentication setting
4865        auth_settings = []
4866
4867        return self.api_client.call_api(resource_path, 'PUT',
4868                                        path_params,
4869                                        query_params,
4870                                        header_params,
4871                                        body=body_params,
4872                                        post_params=form_params,
4873                                        files=local_var_files,
4874                                        response_type='CustomFields',
4875                                        auth_settings=auth_settings,
4876                                        callback=params.get('callback'),
4877                                        _return_http_data_only=params.get('_return_http_data_only'),
4878                                        _preload_content=params.get('_preload_content', True),
4879                                        _request_timeout=params.get('_request_timeout'),
4880                                        collection_formats=collection_formats)
4881
4882    def update_document(self, account_id, document_id, template_id, **kwargs):
4883        """
4884        Adds a document to a template document.
4885        Adds the specified document to an existing template document.
4886        This method makes a synchronous HTTP request by default. To make an
4887        asynchronous HTTP request, please define a `callback` function
4888        to be invoked when receiving the response.
4889        >>> def callback_function(response):
4890        >>>     pprint(response)
4891        >>>
4892        >>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function)
4893
4894        :param callback function: The callback function
4895            for asynchronous request. (optional)
4896        :param str account_id: The external account number (int) or account ID Guid. (required)
4897        :param str document_id: The ID of the document being accessed. (required)
4898        :param str template_id: The ID of the template being accessed. (required)
4899        :param str is_envelope_definition:
4900        :param EnvelopeDefinition envelope_definition:
4901        :return: EnvelopeDocument
4902                 If the method is called asynchronously,
4903                 returns the request thread.
4904        """
4905        kwargs['_return_http_data_only'] = True
4906        if kwargs.get('callback'):
4907            return self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
4908        else:
4909            (data) = self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
4910            return data
4911
4912    def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
4913        """
4914        Adds a document to a template document.
4915        Adds the specified document to an existing template document.
4916        This method makes a synchronous HTTP request by default. To make an
4917        asynchronous HTTP request, please define a `callback` function
4918        to be invoked when receiving the response.
4919        >>> def callback_function(response):
4920        >>>     pprint(response)
4921        >>>
4922        >>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
4923
4924        :param callback function: The callback function
4925            for asynchronous request. (optional)
4926        :param str account_id: The external account number (int) or account ID Guid. (required)
4927        :param str document_id: The ID of the document being accessed. (required)
4928        :param str template_id: The ID of the template being accessed. (required)
4929        :param str is_envelope_definition:
4930        :param EnvelopeDefinition envelope_definition:
4931        :return: EnvelopeDocument
4932                 If the method is called asynchronously,
4933                 returns the request thread.
4934        """
4935
4936        all_params = ['account_id', 'document_id', 'template_id', 'is_envelope_definition', 'envelope_definition']
4937        all_params.append('callback')
4938        all_params.append('_return_http_data_only')
4939        all_params.append('_preload_content')
4940        all_params.append('_request_timeout')
4941
4942        params = locals()
4943        for key, val in iteritems(params['kwargs']):
4944            if key not in all_params:
4945                raise TypeError(
4946                    "Got an unexpected keyword argument '%s'"
4947                    " to method update_document" % key
4948                )
4949            params[key] = val
4950        del params['kwargs']
4951        # verify the required parameter 'account_id' is set
4952        if ('account_id' not in params) or (params['account_id'] is None):
4953            raise ValueError("Missing the required parameter `account_id` when calling `update_document`")
4954        # verify the required parameter 'document_id' is set
4955        if ('document_id' not in params) or (params['document_id'] is None):
4956            raise ValueError("Missing the required parameter `document_id` when calling `update_document`")
4957        # verify the required parameter 'template_id' is set
4958        if ('template_id' not in params) or (params['template_id'] is None):
4959            raise ValueError("Missing the required parameter `template_id` when calling `update_document`")
4960
4961
4962        collection_formats = {}
4963
4964        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
4965        path_params = {}
4966        if 'account_id' in params:
4967            path_params['accountId'] = params['account_id']
4968        if 'document_id' in params:
4969            path_params['documentId'] = params['document_id']
4970        if 'template_id' in params:
4971            path_params['templateId'] = params['template_id']
4972
4973        query_params = {}
4974        if 'is_envelope_definition' in params:
4975            query_params['is_envelope_definition'] = params['is_envelope_definition']
4976
4977        header_params = {}
4978
4979        form_params = []
4980        local_var_files = {}
4981
4982        body_params = None
4983        if 'envelope_definition' in params:
4984            body_params = params['envelope_definition']
4985        # HTTP header `Accept`
4986        header_params['Accept'] = self.api_client.\
4987            select_header_accept(['application/json'])
4988
4989        # Authentication setting
4990        auth_settings = []
4991
4992        return self.api_client.call_api(resource_path, 'PUT',
4993                                        path_params,
4994                                        query_params,
4995                                        header_params,
4996                                        body=body_params,
4997                                        post_params=form_params,
4998                                        files=local_var_files,
4999                                        response_type='EnvelopeDocument',
5000                                        auth_settings=auth_settings,
5001                                        callback=params.get('callback'),
5002                                        _return_http_data_only=params.get('_return_http_data_only'),
5003                                        _preload_content=params.get('_preload_content', True),
5004                                        _request_timeout=params.get('_request_timeout'),
5005                                        collection_formats=collection_formats)
5006
5007    def update_document_fields(self, account_id, document_id, template_id, **kwargs):
5008        """
5009        Updates existing custom document fields in an existing template document.
5010        Updates existing custom document fields in an existing template document.
5011        This method makes a synchronous HTTP request by default. To make an
5012        asynchronous HTTP request, please define a `callback` function
5013        to be invoked when receiving the response.
5014        >>> def callback_function(response):
5015        >>>     pprint(response)
5016        >>>
5017        >>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function)
5018
5019        :param callback function: The callback function
5020            for asynchronous request. (optional)
5021        :param str account_id: The external account number (int) or account ID Guid. (required)
5022        :param str document_id: The ID of the document being accessed. (required)
5023        :param str template_id: The ID of the template being accessed. (required)
5024        :param DocumentFieldsInformation document_fields_information:
5025        :return: DocumentFieldsInformation
5026                 If the method is called asynchronously,
5027                 returns the request thread.
5028        """
5029        kwargs['_return_http_data_only'] = True
5030        if kwargs.get('callback'):
5031            return self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5032        else:
5033            (data) = self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5034            return data
5035
5036    def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
5037        """
5038        Updates existing custom document fields in an existing template document.
5039        Updates existing custom document fields in an existing template document.
5040        This method makes a synchronous HTTP request by default. To make an
5041        asynchronous HTTP request, please define a `callback` function
5042        to be invoked when receiving the response.
5043        >>> def callback_function(response):
5044        >>>     pprint(response)
5045        >>>
5046        >>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
5047
5048        :param callback function: The callback function
5049            for asynchronous request. (optional)
5050        :param str account_id: The external account number (int) or account ID Guid. (required)
5051        :param str document_id: The ID of the document being accessed. (required)
5052        :param str template_id: The ID of the template being accessed. (required)
5053        :param DocumentFieldsInformation document_fields_information:
5054        :return: DocumentFieldsInformation
5055                 If the method is called asynchronously,
5056                 returns the request thread.
5057        """
5058
5059        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
5060        all_params.append('callback')
5061        all_params.append('_return_http_data_only')
5062        all_params.append('_preload_content')
5063        all_params.append('_request_timeout')
5064
5065        params = locals()
5066        for key, val in iteritems(params['kwargs']):
5067            if key not in all_params:
5068                raise TypeError(
5069                    "Got an unexpected keyword argument '%s'"
5070                    " to method update_document_fields" % key
5071                )
5072            params[key] = val
5073        del params['kwargs']
5074        # verify the required parameter 'account_id' is set
5075        if ('account_id' not in params) or (params['account_id'] is None):
5076            raise ValueError("Missing the required parameter `account_id` when calling `update_document_fields`")
5077        # verify the required parameter 'document_id' is set
5078        if ('document_id' not in params) or (params['document_id'] is None):
5079            raise ValueError("Missing the required parameter `document_id` when calling `update_document_fields`")
5080        # verify the required parameter 'template_id' is set
5081        if ('template_id' not in params) or (params['template_id'] is None):
5082            raise ValueError("Missing the required parameter `template_id` when calling `update_document_fields`")
5083
5084
5085        collection_formats = {}
5086
5087        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
5088        path_params = {}
5089        if 'account_id' in params:
5090            path_params['accountId'] = params['account_id']
5091        if 'document_id' in params:
5092            path_params['documentId'] = params['document_id']
5093        if 'template_id' in params:
5094            path_params['templateId'] = params['template_id']
5095
5096        query_params = {}
5097
5098        header_params = {}
5099
5100        form_params = []
5101        local_var_files = {}
5102
5103        body_params = None
5104        if 'document_fields_information' in params:
5105            body_params = params['document_fields_information']
5106        # HTTP header `Accept`
5107        header_params['Accept'] = self.api_client.\
5108            select_header_accept(['application/json'])
5109
5110        # Authentication setting
5111        auth_settings = []
5112
5113        return self.api_client.call_api(resource_path, 'PUT',
5114                                        path_params,
5115                                        query_params,
5116                                        header_params,
5117                                        body=body_params,
5118                                        post_params=form_params,
5119                                        files=local_var_files,
5120                                        response_type='DocumentFieldsInformation',
5121                                        auth_settings=auth_settings,
5122                                        callback=params.get('callback'),
5123                                        _return_http_data_only=params.get('_return_http_data_only'),
5124                                        _preload_content=params.get('_preload_content', True),
5125                                        _request_timeout=params.get('_request_timeout'),
5126                                        collection_formats=collection_formats)
5127
5128    def update_documents(self, account_id, template_id, **kwargs):
5129        """
5130        Adds documents to a template document.
5131        Adds one or more documents to an existing template document.
5132        This method makes a synchronous HTTP request by default. To make an
5133        asynchronous HTTP request, please define a `callback` function
5134        to be invoked when receiving the response.
5135        >>> def callback_function(response):
5136        >>>     pprint(response)
5137        >>>
5138        >>> thread = api.update_documents(account_id, template_id, callback=callback_function)
5139
5140        :param callback function: The callback function
5141            for asynchronous request. (optional)
5142        :param str account_id: The external account number (int) or account ID Guid. (required)
5143        :param str template_id: The ID of the template being accessed. (required)
5144        :param EnvelopeDefinition envelope_definition:
5145        :return: TemplateDocumentsResult
5146                 If the method is called asynchronously,
5147                 returns the request thread.
5148        """
5149        kwargs['_return_http_data_only'] = True
5150        if kwargs.get('callback'):
5151            return self.update_documents_with_http_info(account_id, template_id, **kwargs)
5152        else:
5153            (data) = self.update_documents_with_http_info(account_id, template_id, **kwargs)
5154            return data
5155
5156    def update_documents_with_http_info(self, account_id, template_id, **kwargs):
5157        """
5158        Adds documents to a template document.
5159        Adds one or more documents to an existing template document.
5160        This method makes a synchronous HTTP request by default. To make an
5161        asynchronous HTTP request, please define a `callback` function
5162        to be invoked when receiving the response.
5163        >>> def callback_function(response):
5164        >>>     pprint(response)
5165        >>>
5166        >>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function)
5167
5168        :param callback function: The callback function
5169            for asynchronous request. (optional)
5170        :param str account_id: The external account number (int) or account ID Guid. (required)
5171        :param str template_id: The ID of the template being accessed. (required)
5172        :param EnvelopeDefinition envelope_definition:
5173        :return: TemplateDocumentsResult
5174                 If the method is called asynchronously,
5175                 returns the request thread.
5176        """
5177
5178        all_params = ['account_id', 'template_id', 'envelope_definition']
5179        all_params.append('callback')
5180        all_params.append('_return_http_data_only')
5181        all_params.append('_preload_content')
5182        all_params.append('_request_timeout')
5183
5184        params = locals()
5185        for key, val in iteritems(params['kwargs']):
5186            if key not in all_params:
5187                raise TypeError(
5188                    "Got an unexpected keyword argument '%s'"
5189                    " to method update_documents" % key
5190                )
5191            params[key] = val
5192        del params['kwargs']
5193        # verify the required parameter 'account_id' is set
5194        if ('account_id' not in params) or (params['account_id'] is None):
5195            raise ValueError("Missing the required parameter `account_id` when calling `update_documents`")
5196        # verify the required parameter 'template_id' is set
5197        if ('template_id' not in params) or (params['template_id'] is None):
5198            raise ValueError("Missing the required parameter `template_id` when calling `update_documents`")
5199
5200
5201        collection_formats = {}
5202
5203        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
5204        path_params = {}
5205        if 'account_id' in params:
5206            path_params['accountId'] = params['account_id']
5207        if 'template_id' in params:
5208            path_params['templateId'] = params['template_id']
5209
5210        query_params = {}
5211
5212        header_params = {}
5213
5214        form_params = []
5215        local_var_files = {}
5216
5217        body_params = None
5218        if 'envelope_definition' in params:
5219            body_params = params['envelope_definition']
5220        # HTTP header `Accept`
5221        header_params['Accept'] = self.api_client.\
5222            select_header_accept(['application/json'])
5223
5224        # Authentication setting
5225        auth_settings = []
5226
5227        return self.api_client.call_api(resource_path, 'PUT',
5228                                        path_params,
5229                                        query_params,
5230                                        header_params,
5231                                        body=body_params,
5232                                        post_params=form_params,
5233                                        files=local_var_files,
5234                                        response_type='TemplateDocumentsResult',
5235                                        auth_settings=auth_settings,
5236                                        callback=params.get('callback'),
5237                                        _return_http_data_only=params.get('_return_http_data_only'),
5238                                        _preload_content=params.get('_preload_content', True),
5239                                        _request_timeout=params.get('_request_timeout'),
5240                                        collection_formats=collection_formats)
5241
5242    def update_group_share(self, account_id, template_id, template_part, **kwargs):
5243        """
5244        Shares a template with a group
5245        Shares a template with the specified members group.
5246        This method makes a synchronous HTTP request by default. To make an
5247        asynchronous HTTP request, please define a `callback` function
5248        to be invoked when receiving the response.
5249        >>> def callback_function(response):
5250        >>>     pprint(response)
5251        >>>
5252        >>> thread = api.update_group_share(account_id, template_id, template_part, callback=callback_function)
5253
5254        :param callback function: The callback function
5255            for asynchronous request. (optional)
5256        :param str account_id: The external account number (int) or account ID Guid. (required)
5257        :param str template_id: The ID of the template being accessed. (required)
5258        :param str template_part: Currently, the only defined part is **groups**. (required)
5259        :param GroupInformation group_information:
5260        :return: GroupInformation
5261                 If the method is called asynchronously,
5262                 returns the request thread.
5263        """
5264        kwargs['_return_http_data_only'] = True
5265        if kwargs.get('callback'):
5266            return self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5267        else:
5268            (data) = self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5269            return data
5270
5271    def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
5272        """
5273        Shares a template with a group
5274        Shares a template with the specified members group.
5275        This method makes a synchronous HTTP request by default. To make an
5276        asynchronous HTTP request, please define a `callback` function
5277        to be invoked when receiving the response.
5278        >>> def callback_function(response):
5279        >>>     pprint(response)
5280        >>>
5281        >>> thread = api.update_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
5282
5283        :param callback function: The callback function
5284            for asynchronous request. (optional)
5285        :param str account_id: The external account number (int) or account ID Guid. (required)
5286        :param str template_id: The ID of the template being accessed. (required)
5287        :param str template_part: Currently, the only defined part is **groups**. (required)
5288        :param GroupInformation group_information:
5289        :return: GroupInformation
5290                 If the method is called asynchronously,
5291                 returns the request thread.
5292        """
5293
5294        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
5295        all_params.append('callback')
5296        all_params.append('_return_http_data_only')
5297        all_params.append('_preload_content')
5298        all_params.append('_request_timeout')
5299
5300        params = locals()
5301        for key, val in iteritems(params['kwargs']):
5302            if key not in all_params:
5303                raise TypeError(
5304                    "Got an unexpected keyword argument '%s'"
5305                    " to method update_group_share" % key
5306                )
5307            params[key] = val
5308        del params['kwargs']
5309        # verify the required parameter 'account_id' is set
5310        if ('account_id' not in params) or (params['account_id'] is None):
5311            raise ValueError("Missing the required parameter `account_id` when calling `update_group_share`")
5312        # verify the required parameter 'template_id' is set
5313        if ('template_id' not in params) or (params['template_id'] is None):
5314            raise ValueError("Missing the required parameter `template_id` when calling `update_group_share`")
5315        # verify the required parameter 'template_part' is set
5316        if ('template_part' not in params) or (params['template_part'] is None):
5317            raise ValueError("Missing the required parameter `template_part` when calling `update_group_share`")
5318
5319
5320        collection_formats = {}
5321
5322        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
5323        path_params = {}
5324        if 'account_id' in params:
5325            path_params['accountId'] = params['account_id']
5326        if 'template_id' in params:
5327            path_params['templateId'] = params['template_id']
5328        if 'template_part' in params:
5329            path_params['templatePart'] = params['template_part']
5330
5331        query_params = {}
5332
5333        header_params = {}
5334
5335        form_params = []
5336        local_var_files = {}
5337
5338        body_params = None
5339        if 'group_information' in params:
5340            body_params = params['group_information']
5341        # HTTP header `Accept`
5342        header_params['Accept'] = self.api_client.\
5343            select_header_accept(['application/json'])
5344
5345        # Authentication setting
5346        auth_settings = []
5347
5348        return self.api_client.call_api(resource_path, 'PUT',
5349                                        path_params,
5350                                        query_params,
5351                                        header_params,
5352                                        body=body_params,
5353                                        post_params=form_params,
5354                                        files=local_var_files,
5355                                        response_type='GroupInformation',
5356                                        auth_settings=auth_settings,
5357                                        callback=params.get('callback'),
5358                                        _return_http_data_only=params.get('_return_http_data_only'),
5359                                        _preload_content=params.get('_preload_content', True),
5360                                        _request_timeout=params.get('_request_timeout'),
5361                                        collection_formats=collection_formats)
5362
5363    def update_lock(self, account_id, template_id, **kwargs):
5364        """
5365        Updates a template lock.
5366        Updates the lock duration time or update the `lockedByApp` property information for the specified template. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated.
5367        This method makes a synchronous HTTP request by default. To make an
5368        asynchronous HTTP request, please define a `callback` function
5369        to be invoked when receiving the response.
5370        >>> def callback_function(response):
5371        >>>     pprint(response)
5372        >>>
5373        >>> thread = api.update_lock(account_id, template_id, callback=callback_function)
5374
5375        :param callback function: The callback function
5376            for asynchronous request. (optional)
5377        :param str account_id: The external account number (int) or account ID Guid. (required)
5378        :param str template_id: The ID of the template being accessed. (required)
5379        :param LockRequest lock_request:
5380        :return: LockInformation
5381                 If the method is called asynchronously,
5382                 returns the request thread.
5383        """
5384        kwargs['_return_http_data_only'] = True
5385        if kwargs.get('callback'):
5386            return self.update_lock_with_http_info(account_id, template_id, **kwargs)
5387        else:
5388            (data) = self.update_lock_with_http_info(account_id, template_id, **kwargs)
5389            return data
5390
5391    def update_lock_with_http_info(self, account_id, template_id, **kwargs):
5392        """
5393        Updates a template lock.
5394        Updates the lock duration time or update the `lockedByApp` property information for the specified template. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated.
5395        This method makes a synchronous HTTP request by default. To make an
5396        asynchronous HTTP request, please define a `callback` function
5397        to be invoked when receiving the response.
5398        >>> def callback_function(response):
5399        >>>     pprint(response)
5400        >>>
5401        >>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function)
5402
5403        :param callback function: The callback function
5404            for asynchronous request. (optional)
5405        :param str account_id: The external account number (int) or account ID Guid. (required)
5406        :param str template_id: The ID of the template being accessed. (required)
5407        :param LockRequest lock_request:
5408        :return: LockInformation
5409                 If the method is called asynchronously,
5410                 returns the request thread.
5411        """
5412
5413        all_params = ['account_id', 'template_id', 'lock_request']
5414        all_params.append('callback')
5415        all_params.append('_return_http_data_only')
5416        all_params.append('_preload_content')
5417        all_params.append('_request_timeout')
5418
5419        params = locals()
5420        for key, val in iteritems(params['kwargs']):
5421            if key not in all_params:
5422                raise TypeError(
5423                    "Got an unexpected keyword argument '%s'"
5424                    " to method update_lock" % key
5425                )
5426            params[key] = val
5427        del params['kwargs']
5428        # verify the required parameter 'account_id' is set
5429        if ('account_id' not in params) or (params['account_id'] is None):
5430            raise ValueError("Missing the required parameter `account_id` when calling `update_lock`")
5431        # verify the required parameter 'template_id' is set
5432        if ('template_id' not in params) or (params['template_id'] is None):
5433            raise ValueError("Missing the required parameter `template_id` when calling `update_lock`")
5434
5435
5436        collection_formats = {}
5437
5438        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
5439        path_params = {}
5440        if 'account_id' in params:
5441            path_params['accountId'] = params['account_id']
5442        if 'template_id' in params:
5443            path_params['templateId'] = params['template_id']
5444
5445        query_params = {}
5446
5447        header_params = {}
5448
5449        form_params = []
5450        local_var_files = {}
5451
5452        body_params = None
5453        if 'lock_request' in params:
5454            body_params = params['lock_request']
5455        # HTTP header `Accept`
5456        header_params['Accept'] = self.api_client.\
5457            select_header_accept(['application/json'])
5458
5459        # Authentication setting
5460        auth_settings = []
5461
5462        return self.api_client.call_api(resource_path, 'PUT',
5463                                        path_params,
5464                                        query_params,
5465                                        header_params,
5466                                        body=body_params,
5467                                        post_params=form_params,
5468                                        files=local_var_files,
5469                                        response_type='LockInformation',
5470                                        auth_settings=auth_settings,
5471                                        callback=params.get('callback'),
5472                                        _return_http_data_only=params.get('_return_http_data_only'),
5473                                        _preload_content=params.get('_preload_content', True),
5474                                        _request_timeout=params.get('_request_timeout'),
5475                                        collection_formats=collection_formats)
5476
5477    def update_notification_settings(self, account_id, template_id, **kwargs):
5478        """
5479        Updates the notification  structure for an existing template.
5480        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5481        This method makes a synchronous HTTP request by default. To make an
5482        asynchronous HTTP request, please define a `callback` function
5483        to be invoked when receiving the response.
5484        >>> def callback_function(response):
5485        >>>     pprint(response)
5486        >>>
5487        >>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function)
5488
5489        :param callback function: The callback function
5490            for asynchronous request. (optional)
5491        :param str account_id: The external account number (int) or account ID Guid. (required)
5492        :param str template_id: The ID of the template being accessed. (required)
5493        :param TemplateNotificationRequest template_notification_request:
5494        :return: Notification
5495                 If the method is called asynchronously,
5496                 returns the request thread.
5497        """
5498        kwargs['_return_http_data_only'] = True
5499        if kwargs.get('callback'):
5500            return self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5501        else:
5502            (data) = self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5503            return data
5504
5505    def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
5506        """
5507        Updates the notification  structure for an existing template.
5508        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5509        This method makes a synchronous HTTP request by default. To make an
5510        asynchronous HTTP request, please define a `callback` function
5511        to be invoked when receiving the response.
5512        >>> def callback_function(response):
5513        >>>     pprint(response)
5514        >>>
5515        >>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
5516
5517        :param callback function: The callback function
5518            for asynchronous request. (optional)
5519        :param str account_id: The external account number (int) or account ID Guid. (required)
5520        :param str template_id: The ID of the template being accessed. (required)
5521        :param TemplateNotificationRequest template_notification_request:
5522        :return: Notification
5523                 If the method is called asynchronously,
5524                 returns the request thread.
5525        """
5526
5527        all_params = ['account_id', 'template_id', 'template_notification_request']
5528        all_params.append('callback')
5529        all_params.append('_return_http_data_only')
5530        all_params.append('_preload_content')
5531        all_params.append('_request_timeout')
5532
5533        params = locals()
5534        for key, val in iteritems(params['kwargs']):
5535            if key not in all_params:
5536                raise TypeError(
5537                    "Got an unexpected keyword argument '%s'"
5538                    " to method update_notification_settings" % key
5539                )
5540            params[key] = val
5541        del params['kwargs']
5542        # verify the required parameter 'account_id' is set
5543        if ('account_id' not in params) or (params['account_id'] is None):
5544            raise ValueError("Missing the required parameter `account_id` when calling `update_notification_settings`")
5545        # verify the required parameter 'template_id' is set
5546        if ('template_id' not in params) or (params['template_id'] is None):
5547            raise ValueError("Missing the required parameter `template_id` when calling `update_notification_settings`")
5548
5549
5550        collection_formats = {}
5551
5552        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
5553        path_params = {}
5554        if 'account_id' in params:
5555            path_params['accountId'] = params['account_id']
5556        if 'template_id' in params:
5557            path_params['templateId'] = params['template_id']
5558
5559        query_params = {}
5560
5561        header_params = {}
5562
5563        form_params = []
5564        local_var_files = {}
5565
5566        body_params = None
5567        if 'template_notification_request' in params:
5568            body_params = params['template_notification_request']
5569        # HTTP header `Accept`
5570        header_params['Accept'] = self.api_client.\
5571            select_header_accept(['application/json'])
5572
5573        # Authentication setting
5574        auth_settings = []
5575
5576        return self.api_client.call_api(resource_path, 'PUT',
5577                                        path_params,
5578                                        query_params,
5579                                        header_params,
5580                                        body=body_params,
5581                                        post_params=form_params,
5582                                        files=local_var_files,
5583                                        response_type='Notification',
5584                                        auth_settings=auth_settings,
5585                                        callback=params.get('callback'),
5586                                        _return_http_data_only=params.get('_return_http_data_only'),
5587                                        _preload_content=params.get('_preload_content', True),
5588                                        _request_timeout=params.get('_request_timeout'),
5589                                        collection_formats=collection_formats)
5590
5591    def update_recipients(self, account_id, template_id, **kwargs):
5592        """
5593        Updates recipients in a template.
5594        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5595        This method makes a synchronous HTTP request by default. To make an
5596        asynchronous HTTP request, please define a `callback` function
5597        to be invoked when receiving the response.
5598        >>> def callback_function(response):
5599        >>>     pprint(response)
5600        >>>
5601        >>> thread = api.update_recipients(account_id, template_id, callback=callback_function)
5602
5603        :param callback function: The callback function
5604            for asynchronous request. (optional)
5605        :param str account_id: The external account number (int) or account ID Guid. (required)
5606        :param str template_id: The ID of the template being accessed. (required)
5607        :param str resend_envelope:
5608        :param TemplateRecipients template_recipients:
5609        :return: RecipientsUpdateSummary
5610                 If the method is called asynchronously,
5611                 returns the request thread.
5612        """
5613        kwargs['_return_http_data_only'] = True
5614        if kwargs.get('callback'):
5615            return self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5616        else:
5617            (data) = self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5618            return data
5619
5620    def update_recipients_with_http_info(self, account_id, template_id, **kwargs):
5621        """
5622        Updates recipients in a template.
5623        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5624        This method makes a synchronous HTTP request by default. To make an
5625        asynchronous HTTP request, please define a `callback` function
5626        to be invoked when receiving the response.
5627        >>> def callback_function(response):
5628        >>>     pprint(response)
5629        >>>
5630        >>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function)
5631
5632        :param callback function: The callback function
5633            for asynchronous request. (optional)
5634        :param str account_id: The external account number (int) or account ID Guid. (required)
5635        :param str template_id: The ID of the template being accessed. (required)
5636        :param str resend_envelope:
5637        :param TemplateRecipients template_recipients:
5638        :return: RecipientsUpdateSummary
5639                 If the method is called asynchronously,
5640                 returns the request thread.
5641        """
5642
5643        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
5644        all_params.append('callback')
5645        all_params.append('_return_http_data_only')
5646        all_params.append('_preload_content')
5647        all_params.append('_request_timeout')
5648
5649        params = locals()
5650        for key, val in iteritems(params['kwargs']):
5651            if key not in all_params:
5652                raise TypeError(
5653                    "Got an unexpected keyword argument '%s'"
5654                    " to method update_recipients" % key
5655                )
5656            params[key] = val
5657        del params['kwargs']
5658        # verify the required parameter 'account_id' is set
5659        if ('account_id' not in params) or (params['account_id'] is None):
5660            raise ValueError("Missing the required parameter `account_id` when calling `update_recipients`")
5661        # verify the required parameter 'template_id' is set
5662        if ('template_id' not in params) or (params['template_id'] is None):
5663            raise ValueError("Missing the required parameter `template_id` when calling `update_recipients`")
5664
5665
5666        collection_formats = {}
5667
5668        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
5669        path_params = {}
5670        if 'account_id' in params:
5671            path_params['accountId'] = params['account_id']
5672        if 'template_id' in params:
5673            path_params['templateId'] = params['template_id']
5674
5675        query_params = {}
5676        if 'resend_envelope' in params:
5677            query_params['resend_envelope'] = params['resend_envelope']
5678
5679        header_params = {}
5680
5681        form_params = []
5682        local_var_files = {}
5683
5684        body_params = None
5685        if 'template_recipients' in params:
5686            body_params = params['template_recipients']
5687        # HTTP header `Accept`
5688        header_params['Accept'] = self.api_client.\
5689            select_header_accept(['application/json'])
5690
5691        # Authentication setting
5692        auth_settings = []
5693
5694        return self.api_client.call_api(resource_path, 'PUT',
5695                                        path_params,
5696                                        query_params,
5697                                        header_params,
5698                                        body=body_params,
5699                                        post_params=form_params,
5700                                        files=local_var_files,
5701                                        response_type='RecipientsUpdateSummary',
5702                                        auth_settings=auth_settings,
5703                                        callback=params.get('callback'),
5704                                        _return_http_data_only=params.get('_return_http_data_only'),
5705                                        _preload_content=params.get('_preload_content', True),
5706                                        _request_timeout=params.get('_request_timeout'),
5707                                        collection_formats=collection_formats)
5708
5709    def update_tabs(self, account_id, recipient_id, template_id, **kwargs):
5710        """
5711        Updates the tabs for a recipient.
5712        Updates one or more tabs for a recipient in a template.
5713        This method makes a synchronous HTTP request by default. To make an
5714        asynchronous HTTP request, please define a `callback` function
5715        to be invoked when receiving the response.
5716        >>> def callback_function(response):
5717        >>>     pprint(response)
5718        >>>
5719        >>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function)
5720
5721        :param callback function: The callback function
5722            for asynchronous request. (optional)
5723        :param str account_id: The external account number (int) or account ID Guid. (required)
5724        :param str recipient_id: The ID of the recipient being accessed. (required)
5725        :param str template_id: The ID of the template being accessed. (required)
5726        :param TemplateTabs template_tabs:
5727        :return: Tabs
5728                 If the method is called asynchronously,
5729                 returns the request thread.
5730        """
5731        kwargs['_return_http_data_only'] = True
5732        if kwargs.get('callback'):
5733            return self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5734        else:
5735            (data) = self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5736            return data
5737
5738    def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
5739        """
5740        Updates the tabs for a recipient.
5741        Updates one or more tabs for a recipient in a template.
5742        This method makes a synchronous HTTP request by default. To make an
5743        asynchronous HTTP request, please define a `callback` function
5744        to be invoked when receiving the response.
5745        >>> def callback_function(response):
5746        >>>     pprint(response)
5747        >>>
5748        >>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
5749
5750        :param callback function: The callback function
5751            for asynchronous request. (optional)
5752        :param str account_id: The external account number (int) or account ID Guid. (required)
5753        :param str recipient_id: The ID of the recipient being accessed. (required)
5754        :param str template_id: The ID of the template being accessed. (required)
5755        :param TemplateTabs template_tabs:
5756        :return: Tabs
5757                 If the method is called asynchronously,
5758                 returns the request thread.
5759        """
5760
5761        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
5762        all_params.append('callback')
5763        all_params.append('_return_http_data_only')
5764        all_params.append('_preload_content')
5765        all_params.append('_request_timeout')
5766
5767        params = locals()
5768        for key, val in iteritems(params['kwargs']):
5769            if key not in all_params:
5770                raise TypeError(
5771                    "Got an unexpected keyword argument '%s'"
5772                    " to method update_tabs" % key
5773                )
5774            params[key] = val
5775        del params['kwargs']
5776        # verify the required parameter 'account_id' is set
5777        if ('account_id' not in params) or (params['account_id'] is None):
5778            raise ValueError("Missing the required parameter `account_id` when calling `update_tabs`")
5779        # verify the required parameter 'recipient_id' is set
5780        if ('recipient_id' not in params) or (params['recipient_id'] is None):
5781            raise ValueError("Missing the required parameter `recipient_id` when calling `update_tabs`")
5782        # verify the required parameter 'template_id' is set
5783        if ('template_id' not in params) or (params['template_id'] is None):
5784            raise ValueError("Missing the required parameter `template_id` when calling `update_tabs`")
5785
5786
5787        collection_formats = {}
5788
5789        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
5790        path_params = {}
5791        if 'account_id' in params:
5792            path_params['accountId'] = params['account_id']
5793        if 'recipient_id' in params:
5794            path_params['recipientId'] = params['recipient_id']
5795        if 'template_id' in params:
5796            path_params['templateId'] = params['template_id']
5797
5798        query_params = {}
5799
5800        header_params = {}
5801
5802        form_params = []
5803        local_var_files = {}
5804
5805        body_params = None
5806        if 'template_tabs' in params:
5807            body_params = params['template_tabs']
5808        # HTTP header `Accept`
5809        header_params['Accept'] = self.api_client.\
5810            select_header_accept(['application/json'])
5811
5812        # Authentication setting
5813        auth_settings = []
5814
5815        return self.api_client.call_api(resource_path, 'PUT',
5816                                        path_params,
5817                                        query_params,
5818                                        header_params,
5819                                        body=body_params,
5820                                        post_params=form_params,
5821                                        files=local_var_files,
5822                                        response_type='Tabs',
5823                                        auth_settings=auth_settings,
5824                                        callback=params.get('callback'),
5825                                        _return_http_data_only=params.get('_return_http_data_only'),
5826                                        _preload_content=params.get('_preload_content', True),
5827                                        _request_timeout=params.get('_request_timeout'),
5828                                        collection_formats=collection_formats)
5829
5830    def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
5831        """
5832        Updates the tabs for a template
5833        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
5834        This method makes a synchronous HTTP request by default. To make an
5835        asynchronous HTTP request, please define a `callback` function
5836        to be invoked when receiving the response.
5837        >>> def callback_function(response):
5838        >>>     pprint(response)
5839        >>>
5840        >>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
5841
5842        :param callback function: The callback function
5843            for asynchronous request. (optional)
5844        :param str account_id: The external account number (int) or account ID Guid. (required)
5845        :param str document_id: The ID of the document being accessed. (required)
5846        :param str template_id: The ID of the template being accessed. (required)
5847        :param TemplateTabs template_tabs:
5848        :return: Tabs
5849                 If the method is called asynchronously,
5850                 returns the request thread.
5851        """
5852        kwargs['_return_http_data_only'] = True
5853        if kwargs.get('callback'):
5854            return self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
5855        else:
5856            (data) = self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
5857            return data
5858
5859    def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
5860        """
5861        Updates the tabs for a template
5862        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
5863        This method makes a synchronous HTTP request by default. To make an
5864        asynchronous HTTP request, please define a `callback` function
5865        to be invoked when receiving the response.
5866        >>> def callback_function(response):
5867        >>>     pprint(response)
5868        >>>
5869        >>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
5870
5871        :param callback function: The callback function
5872            for asynchronous request. (optional)
5873        :param str account_id: The external account number (int) or account ID Guid. (required)
5874        :param str document_id: The ID of the document being accessed. (required)
5875        :param str template_id: The ID of the template being accessed. (required)
5876        :param TemplateTabs template_tabs:
5877        :return: Tabs
5878                 If the method is called asynchronously,
5879                 returns the request thread.
5880        """
5881
5882        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
5883        all_params.append('callback')
5884        all_params.append('_return_http_data_only')
5885        all_params.append('_preload_content')
5886        all_params.append('_request_timeout')
5887
5888        params = locals()
5889        for key, val in iteritems(params['kwargs']):
5890            if key not in all_params:
5891                raise TypeError(
5892                    "Got an unexpected keyword argument '%s'"
5893                    " to method update_template_document_tabs" % key
5894                )
5895            params[key] = val
5896        del params['kwargs']
5897        # verify the required parameter 'account_id' is set
5898        if ('account_id' not in params) or (params['account_id'] is None):
5899            raise ValueError("Missing the required parameter `account_id` when calling `update_template_document_tabs`")
5900        # verify the required parameter 'document_id' is set
5901        if ('document_id' not in params) or (params['document_id'] is None):
5902            raise ValueError("Missing the required parameter `document_id` when calling `update_template_document_tabs`")
5903        # verify the required parameter 'template_id' is set
5904        if ('template_id' not in params) or (params['template_id'] is None):
5905            raise ValueError("Missing the required parameter `template_id` when calling `update_template_document_tabs`")
5906
5907
5908        collection_formats = {}
5909
5910        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
5911        path_params = {}
5912        if 'account_id' in params:
5913            path_params['accountId'] = params['account_id']
5914        if 'document_id' in params:
5915            path_params['documentId'] = params['document_id']
5916        if 'template_id' in params:
5917            path_params['templateId'] = params['template_id']
5918
5919        query_params = {}
5920
5921        header_params = {}
5922
5923        form_params = []
5924        local_var_files = {}
5925
5926        body_params = None
5927        if 'template_tabs' in params:
5928            body_params = params['template_tabs']
5929        # HTTP header `Accept`
5930        header_params['Accept'] = self.api_client.\
5931            select_header_accept(['application/json'])
5932
5933        # Authentication setting
5934        auth_settings = []
5935
5936        return self.api_client.call_api(resource_path, 'PUT',
5937                                        path_params,
5938                                        query_params,
5939                                        header_params,
5940                                        body=body_params,
5941                                        post_params=form_params,
5942                                        files=local_var_files,
5943                                        response_type='Tabs',
5944                                        auth_settings=auth_settings,
5945                                        callback=params.get('callback'),
5946                                        _return_http_data_only=params.get('_return_http_data_only'),
5947                                        _preload_content=params.get('_preload_content', True),
5948                                        _request_timeout=params.get('_request_timeout'),
5949                                        collection_formats=collection_formats)
5950
5951    def update_templates(self, account_id, **kwargs):
5952        """
5953        Update template autoMatch setting.
5954        This method makes a synchronous HTTP request by default. To make an
5955        asynchronous HTTP request, please define a `callback` function
5956        to be invoked when receiving the response.
5957        >>> def callback_function(response):
5958        >>>     pprint(response)
5959        >>>
5960        >>> thread = api.update_templates(account_id, callback=callback_function)
5961
5962        :param callback function: The callback function
5963            for asynchronous request. (optional)
5964        :param str account_id: The external account number (int) or account ID Guid. (required)
5965        :param TemplateAutoMatchList template_auto_match_list:
5966        :return: TemplateAutoMatchList
5967                 If the method is called asynchronously,
5968                 returns the request thread.
5969        """
5970        kwargs['_return_http_data_only'] = True
5971        if kwargs.get('callback'):
5972            return self.update_templates_with_http_info(account_id, **kwargs)
5973        else:
5974            (data) = self.update_templates_with_http_info(account_id, **kwargs)
5975            return data
5976
5977    def update_templates_with_http_info(self, account_id, **kwargs):
5978        """
5979        Update template autoMatch setting.
5980        This method makes a synchronous HTTP request by default. To make an
5981        asynchronous HTTP request, please define a `callback` function
5982        to be invoked when receiving the response.
5983        >>> def callback_function(response):
5984        >>>     pprint(response)
5985        >>>
5986        >>> thread = api.update_templates_with_http_info(account_id, callback=callback_function)
5987
5988        :param callback function: The callback function
5989            for asynchronous request. (optional)
5990        :param str account_id: The external account number (int) or account ID Guid. (required)
5991        :param TemplateAutoMatchList template_auto_match_list:
5992        :return: TemplateAutoMatchList
5993                 If the method is called asynchronously,
5994                 returns the request thread.
5995        """
5996
5997        all_params = ['account_id', 'template_auto_match_list']
5998        all_params.append('callback')
5999        all_params.append('_return_http_data_only')
6000        all_params.append('_preload_content')
6001        all_params.append('_request_timeout')
6002
6003        params = locals()
6004        for key, val in iteritems(params['kwargs']):
6005            if key not in all_params:
6006                raise TypeError(
6007                    "Got an unexpected keyword argument '%s'"
6008                    " to method update_templates" % key
6009                )
6010            params[key] = val
6011        del params['kwargs']
6012        # verify the required parameter 'account_id' is set
6013        if ('account_id' not in params) or (params['account_id'] is None):
6014            raise ValueError("Missing the required parameter `account_id` when calling `update_templates`")
6015
6016
6017        collection_formats = {}
6018
6019        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
6020        path_params = {}
6021        if 'account_id' in params:
6022            path_params['accountId'] = params['account_id']
6023
6024        query_params = {}
6025
6026        header_params = {}
6027
6028        form_params = []
6029        local_var_files = {}
6030
6031        body_params = None
6032        if 'template_auto_match_list' in params:
6033            body_params = params['template_auto_match_list']
6034        # HTTP header `Accept`
6035        header_params['Accept'] = self.api_client.\
6036            select_header_accept(['application/json'])
6037
6038        # Authentication setting
6039        auth_settings = []
6040
6041        return self.api_client.call_api(resource_path, 'PUT',
6042                                        path_params,
6043                                        query_params,
6044                                        header_params,
6045                                        body=body_params,
6046                                        post_params=form_params,
6047                                        files=local_var_files,
6048                                        response_type='TemplateAutoMatchList',
6049                                        auth_settings=auth_settings,
6050                                        callback=params.get('callback'),
6051                                        _return_http_data_only=params.get('_return_http_data_only'),
6052                                        _preload_content=params.get('_preload_content', True),
6053                                        _request_timeout=params.get('_request_timeout'),
6054                                        collection_formats=collection_formats)
6055
6056    def update_templates_auto_match(self, account_id, **kwargs):
6057        """
6058        Update template autoMatch setting.
6059        This method makes a synchronous HTTP request by default. To make an
6060        asynchronous HTTP request, please define a `callback` function
6061        to be invoked when receiving the response.
6062        >>> def callback_function(response):
6063        >>>     pprint(response)
6064        >>>
6065        >>> thread = api.update_templates_auto_match(account_id, callback=callback_function)
6066
6067        :param callback function: The callback function
6068            for asynchronous request. (optional)
6069        :param str account_id: The external account number (int) or account ID Guid. (required)
6070        :param TemplateAutoMatchList template_auto_match_list:
6071        :return: TemplateAutoMatchList
6072                 If the method is called asynchronously,
6073                 returns the request thread.
6074        """
6075        kwargs['_return_http_data_only'] = True
6076        if kwargs.get('callback'):
6077            return self.update_templates_auto_match_with_http_info(account_id, **kwargs)
6078        else:
6079            (data) = self.update_templates_auto_match_with_http_info(account_id, **kwargs)
6080            return data
6081
6082    def update_templates_auto_match_with_http_info(self, account_id, **kwargs):
6083        """
6084        Update template autoMatch setting.
6085        This method makes a synchronous HTTP request by default. To make an
6086        asynchronous HTTP request, please define a `callback` function
6087        to be invoked when receiving the response.
6088        >>> def callback_function(response):
6089        >>>     pprint(response)
6090        >>>
6091        >>> thread = api.update_templates_auto_match_with_http_info(account_id, callback=callback_function)
6092
6093        :param callback function: The callback function
6094            for asynchronous request. (optional)
6095        :param str account_id: The external account number (int) or account ID Guid. (required)
6096        :param TemplateAutoMatchList template_auto_match_list:
6097        :return: TemplateAutoMatchList
6098                 If the method is called asynchronously,
6099                 returns the request thread.
6100        """
6101
6102        all_params = ['account_id', 'template_auto_match_list']
6103        all_params.append('callback')
6104        all_params.append('_return_http_data_only')
6105        all_params.append('_preload_content')
6106        all_params.append('_request_timeout')
6107
6108        params = locals()
6109        for key, val in iteritems(params['kwargs']):
6110            if key not in all_params:
6111                raise TypeError(
6112                    "Got an unexpected keyword argument '%s'"
6113                    " to method update_templates_auto_match" % key
6114                )
6115            params[key] = val
6116        del params['kwargs']
6117        # verify the required parameter 'account_id' is set
6118        if ('account_id' not in params) or (params['account_id'] is None):
6119            raise ValueError("Missing the required parameter `account_id` when calling `update_templates_auto_match`")
6120
6121
6122        collection_formats = {}
6123
6124        resource_path = '/v2.1/accounts/{accountId}/templates/auto_match'.replace('{format}', 'json')
6125        path_params = {}
6126        if 'account_id' in params:
6127            path_params['accountId'] = params['account_id']
6128
6129        query_params = {}
6130
6131        header_params = {}
6132
6133        form_params = []
6134        local_var_files = {}
6135
6136        body_params = None
6137        if 'template_auto_match_list' in params:
6138            body_params = params['template_auto_match_list']
6139        # HTTP header `Accept`
6140        header_params['Accept'] = self.api_client.\
6141            select_header_accept(['application/json'])
6142
6143        # Authentication setting
6144        auth_settings = []
6145
6146        return self.api_client.call_api(resource_path, 'PUT',
6147                                        path_params,
6148                                        query_params,
6149                                        header_params,
6150                                        body=body_params,
6151                                        post_params=form_params,
6152                                        files=local_var_files,
6153                                        response_type='TemplateAutoMatchList',
6154                                        auth_settings=auth_settings,
6155                                        callback=params.get('callback'),
6156                                        _return_http_data_only=params.get('_return_http_data_only'),
6157                                        _preload_content=params.get('_preload_content', True),
6158                                        _request_timeout=params.get('_request_timeout'),
6159                                        collection_formats=collection_formats)
class TemplatesApi:
  28class TemplatesApi(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_custom_fields(self, account_id, template_id, **kwargs):
  45        """
  46        Creates custom document fields in an existing template document.
  47        Creates custom document fields in an existing template document.
  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_custom_fields(account_id, template_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 str template_id: The ID of the template being accessed. (required)
  60        :param TemplateCustomFields template_custom_fields:
  61        :return: CustomFields
  62                 If the method is called asynchronously,
  63                 returns the request thread.
  64        """
  65        kwargs['_return_http_data_only'] = True
  66        if kwargs.get('callback'):
  67            return self.create_custom_fields_with_http_info(account_id, template_id, **kwargs)
  68        else:
  69            (data) = self.create_custom_fields_with_http_info(account_id, template_id, **kwargs)
  70            return data
  71
  72    def create_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
  73        """
  74        Creates custom document fields in an existing template document.
  75        Creates custom document fields in an existing template document.
  76        This method makes a synchronous HTTP request by default. To make an
  77        asynchronous HTTP request, please define a `callback` function
  78        to be invoked when receiving the response.
  79        >>> def callback_function(response):
  80        >>>     pprint(response)
  81        >>>
  82        >>> thread = api.create_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
  83
  84        :param callback function: The callback function
  85            for asynchronous request. (optional)
  86        :param str account_id: The external account number (int) or account ID Guid. (required)
  87        :param str template_id: The ID of the template being accessed. (required)
  88        :param TemplateCustomFields template_custom_fields:
  89        :return: CustomFields
  90                 If the method is called asynchronously,
  91                 returns the request thread.
  92        """
  93
  94        all_params = ['account_id', 'template_id', 'template_custom_fields']
  95        all_params.append('callback')
  96        all_params.append('_return_http_data_only')
  97        all_params.append('_preload_content')
  98        all_params.append('_request_timeout')
  99
 100        params = locals()
 101        for key, val in iteritems(params['kwargs']):
 102            if key not in all_params:
 103                raise TypeError(
 104                    "Got an unexpected keyword argument '%s'"
 105                    " to method create_custom_fields" % key
 106                )
 107            params[key] = val
 108        del params['kwargs']
 109        # verify the required parameter 'account_id' is set
 110        if ('account_id' not in params) or (params['account_id'] is None):
 111            raise ValueError("Missing the required parameter `account_id` when calling `create_custom_fields`")
 112        # verify the required parameter 'template_id' is set
 113        if ('template_id' not in params) or (params['template_id'] is None):
 114            raise ValueError("Missing the required parameter `template_id` when calling `create_custom_fields`")
 115
 116
 117        collection_formats = {}
 118
 119        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
 120        path_params = {}
 121        if 'account_id' in params:
 122            path_params['accountId'] = params['account_id']
 123        if 'template_id' in params:
 124            path_params['templateId'] = params['template_id']
 125
 126        query_params = {}
 127
 128        header_params = {}
 129
 130        form_params = []
 131        local_var_files = {}
 132
 133        body_params = None
 134        if 'template_custom_fields' in params:
 135            body_params = params['template_custom_fields']
 136        # HTTP header `Accept`
 137        header_params['Accept'] = self.api_client.\
 138            select_header_accept(['application/json'])
 139
 140        # Authentication setting
 141        auth_settings = []
 142
 143        return self.api_client.call_api(resource_path, 'POST',
 144                                        path_params,
 145                                        query_params,
 146                                        header_params,
 147                                        body=body_params,
 148                                        post_params=form_params,
 149                                        files=local_var_files,
 150                                        response_type='CustomFields',
 151                                        auth_settings=auth_settings,
 152                                        callback=params.get('callback'),
 153                                        _return_http_data_only=params.get('_return_http_data_only'),
 154                                        _preload_content=params.get('_preload_content', True),
 155                                        _request_timeout=params.get('_request_timeout'),
 156                                        collection_formats=collection_formats)
 157
 158    def create_document_fields(self, account_id, document_id, template_id, **kwargs):
 159        """
 160        Creates custom document fields in an existing template document.
 161        Creates custom document fields in an existing template document.
 162        This method makes a synchronous HTTP request by default. To make an
 163        asynchronous HTTP request, please define a `callback` function
 164        to be invoked when receiving the response.
 165        >>> def callback_function(response):
 166        >>>     pprint(response)
 167        >>>
 168        >>> thread = api.create_document_fields(account_id, document_id, template_id, callback=callback_function)
 169
 170        :param callback function: The callback function
 171            for asynchronous request. (optional)
 172        :param str account_id: The external account number (int) or account ID Guid. (required)
 173        :param str document_id: The ID of the document being accessed. (required)
 174        :param str template_id: The ID of the template being accessed. (required)
 175        :param DocumentFieldsInformation document_fields_information:
 176        :return: DocumentFieldsInformation
 177                 If the method is called asynchronously,
 178                 returns the request thread.
 179        """
 180        kwargs['_return_http_data_only'] = True
 181        if kwargs.get('callback'):
 182            return self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
 183        else:
 184            (data) = self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
 185            return data
 186
 187    def create_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
 188        """
 189        Creates custom document fields in an existing template document.
 190        Creates custom document fields in an existing template document.
 191        This method makes a synchronous HTTP request by default. To make an
 192        asynchronous HTTP request, please define a `callback` function
 193        to be invoked when receiving the response.
 194        >>> def callback_function(response):
 195        >>>     pprint(response)
 196        >>>
 197        >>> thread = api.create_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
 198
 199        :param callback function: The callback function
 200            for asynchronous request. (optional)
 201        :param str account_id: The external account number (int) or account ID Guid. (required)
 202        :param str document_id: The ID of the document being accessed. (required)
 203        :param str template_id: The ID of the template being accessed. (required)
 204        :param DocumentFieldsInformation document_fields_information:
 205        :return: DocumentFieldsInformation
 206                 If the method is called asynchronously,
 207                 returns the request thread.
 208        """
 209
 210        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
 211        all_params.append('callback')
 212        all_params.append('_return_http_data_only')
 213        all_params.append('_preload_content')
 214        all_params.append('_request_timeout')
 215
 216        params = locals()
 217        for key, val in iteritems(params['kwargs']):
 218            if key not in all_params:
 219                raise TypeError(
 220                    "Got an unexpected keyword argument '%s'"
 221                    " to method create_document_fields" % key
 222                )
 223            params[key] = val
 224        del params['kwargs']
 225        # verify the required parameter 'account_id' is set
 226        if ('account_id' not in params) or (params['account_id'] is None):
 227            raise ValueError("Missing the required parameter `account_id` when calling `create_document_fields`")
 228        # verify the required parameter 'document_id' is set
 229        if ('document_id' not in params) or (params['document_id'] is None):
 230            raise ValueError("Missing the required parameter `document_id` when calling `create_document_fields`")
 231        # verify the required parameter 'template_id' is set
 232        if ('template_id' not in params) or (params['template_id'] is None):
 233            raise ValueError("Missing the required parameter `template_id` when calling `create_document_fields`")
 234
 235
 236        collection_formats = {}
 237
 238        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
 239        path_params = {}
 240        if 'account_id' in params:
 241            path_params['accountId'] = params['account_id']
 242        if 'document_id' in params:
 243            path_params['documentId'] = params['document_id']
 244        if 'template_id' in params:
 245            path_params['templateId'] = params['template_id']
 246
 247        query_params = {}
 248
 249        header_params = {}
 250
 251        form_params = []
 252        local_var_files = {}
 253
 254        body_params = None
 255        if 'document_fields_information' in params:
 256            body_params = params['document_fields_information']
 257        # HTTP header `Accept`
 258        header_params['Accept'] = self.api_client.\
 259            select_header_accept(['application/json'])
 260
 261        # Authentication setting
 262        auth_settings = []
 263
 264        return self.api_client.call_api(resource_path, 'POST',
 265                                        path_params,
 266                                        query_params,
 267                                        header_params,
 268                                        body=body_params,
 269                                        post_params=form_params,
 270                                        files=local_var_files,
 271                                        response_type='DocumentFieldsInformation',
 272                                        auth_settings=auth_settings,
 273                                        callback=params.get('callback'),
 274                                        _return_http_data_only=params.get('_return_http_data_only'),
 275                                        _preload_content=params.get('_preload_content', True),
 276                                        _request_timeout=params.get('_request_timeout'),
 277                                        collection_formats=collection_formats)
 278
 279    def create_edit_view(self, account_id, template_id, **kwargs):
 280        """
 281        Provides a URL to start an edit view of the Template UI
 282        This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
 283        This method makes a synchronous HTTP request by default. To make an
 284        asynchronous HTTP request, please define a `callback` function
 285        to be invoked when receiving the response.
 286        >>> def callback_function(response):
 287        >>>     pprint(response)
 288        >>>
 289        >>> thread = api.create_edit_view(account_id, template_id, callback=callback_function)
 290
 291        :param callback function: The callback function
 292            for asynchronous request. (optional)
 293        :param str account_id: The external account number (int) or account ID Guid. (required)
 294        :param str template_id: The ID of the template being accessed. (required)
 295        :param TemplateViewRequest template_view_request:
 296        :return: ViewUrl
 297                 If the method is called asynchronously,
 298                 returns the request thread.
 299        """
 300        kwargs['_return_http_data_only'] = True
 301        if kwargs.get('callback'):
 302            return self.create_edit_view_with_http_info(account_id, template_id, **kwargs)
 303        else:
 304            (data) = self.create_edit_view_with_http_info(account_id, template_id, **kwargs)
 305            return data
 306
 307    def create_edit_view_with_http_info(self, account_id, template_id, **kwargs):
 308        """
 309        Provides a URL to start an edit view of the Template UI
 310        This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
 311        This method makes a synchronous HTTP request by default. To make an
 312        asynchronous HTTP request, please define a `callback` function
 313        to be invoked when receiving the response.
 314        >>> def callback_function(response):
 315        >>>     pprint(response)
 316        >>>
 317        >>> thread = api.create_edit_view_with_http_info(account_id, template_id, callback=callback_function)
 318
 319        :param callback function: The callback function
 320            for asynchronous request. (optional)
 321        :param str account_id: The external account number (int) or account ID Guid. (required)
 322        :param str template_id: The ID of the template being accessed. (required)
 323        :param TemplateViewRequest template_view_request:
 324        :return: ViewUrl
 325                 If the method is called asynchronously,
 326                 returns the request thread.
 327        """
 328
 329        all_params = ['account_id', 'template_id', 'template_view_request']
 330        all_params.append('callback')
 331        all_params.append('_return_http_data_only')
 332        all_params.append('_preload_content')
 333        all_params.append('_request_timeout')
 334
 335        params = locals()
 336        for key, val in iteritems(params['kwargs']):
 337            if key not in all_params:
 338                raise TypeError(
 339                    "Got an unexpected keyword argument '%s'"
 340                    " to method create_edit_view" % key
 341                )
 342            params[key] = val
 343        del params['kwargs']
 344        # verify the required parameter 'account_id' is set
 345        if ('account_id' not in params) or (params['account_id'] is None):
 346            raise ValueError("Missing the required parameter `account_id` when calling `create_edit_view`")
 347        # verify the required parameter 'template_id' is set
 348        if ('template_id' not in params) or (params['template_id'] is None):
 349            raise ValueError("Missing the required parameter `template_id` when calling `create_edit_view`")
 350
 351
 352        collection_formats = {}
 353
 354        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/edit'.replace('{format}', 'json')
 355        path_params = {}
 356        if 'account_id' in params:
 357            path_params['accountId'] = params['account_id']
 358        if 'template_id' in params:
 359            path_params['templateId'] = params['template_id']
 360
 361        query_params = {}
 362
 363        header_params = {}
 364
 365        form_params = []
 366        local_var_files = {}
 367
 368        body_params = None
 369        if 'template_view_request' in params:
 370            body_params = params['template_view_request']
 371        # HTTP header `Accept`
 372        header_params['Accept'] = self.api_client.\
 373            select_header_accept(['application/json'])
 374
 375        # Authentication setting
 376        auth_settings = []
 377
 378        return self.api_client.call_api(resource_path, 'POST',
 379                                        path_params,
 380                                        query_params,
 381                                        header_params,
 382                                        body=body_params,
 383                                        post_params=form_params,
 384                                        files=local_var_files,
 385                                        response_type='ViewUrl',
 386                                        auth_settings=auth_settings,
 387                                        callback=params.get('callback'),
 388                                        _return_http_data_only=params.get('_return_http_data_only'),
 389                                        _preload_content=params.get('_preload_content', True),
 390                                        _request_timeout=params.get('_request_timeout'),
 391                                        collection_formats=collection_formats)
 392
 393    def create_lock(self, account_id, template_id, **kwargs):
 394        """
 395        Lock a template.
 396        Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.  ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
 397        This method makes a synchronous HTTP request by default. To make an
 398        asynchronous HTTP request, please define a `callback` function
 399        to be invoked when receiving the response.
 400        >>> def callback_function(response):
 401        >>>     pprint(response)
 402        >>>
 403        >>> thread = api.create_lock(account_id, template_id, callback=callback_function)
 404
 405        :param callback function: The callback function
 406            for asynchronous request. (optional)
 407        :param str account_id: The external account number (int) or account ID Guid. (required)
 408        :param str template_id: The ID of the template being accessed. (required)
 409        :param LockRequest lock_request:
 410        :return: LockInformation
 411                 If the method is called asynchronously,
 412                 returns the request thread.
 413        """
 414        kwargs['_return_http_data_only'] = True
 415        if kwargs.get('callback'):
 416            return self.create_lock_with_http_info(account_id, template_id, **kwargs)
 417        else:
 418            (data) = self.create_lock_with_http_info(account_id, template_id, **kwargs)
 419            return data
 420
 421    def create_lock_with_http_info(self, account_id, template_id, **kwargs):
 422        """
 423        Lock a template.
 424        Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.  ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
 425        This method makes a synchronous HTTP request by default. To make an
 426        asynchronous HTTP request, please define a `callback` function
 427        to be invoked when receiving the response.
 428        >>> def callback_function(response):
 429        >>>     pprint(response)
 430        >>>
 431        >>> thread = api.create_lock_with_http_info(account_id, template_id, callback=callback_function)
 432
 433        :param callback function: The callback function
 434            for asynchronous request. (optional)
 435        :param str account_id: The external account number (int) or account ID Guid. (required)
 436        :param str template_id: The ID of the template being accessed. (required)
 437        :param LockRequest lock_request:
 438        :return: LockInformation
 439                 If the method is called asynchronously,
 440                 returns the request thread.
 441        """
 442
 443        all_params = ['account_id', 'template_id', 'lock_request']
 444        all_params.append('callback')
 445        all_params.append('_return_http_data_only')
 446        all_params.append('_preload_content')
 447        all_params.append('_request_timeout')
 448
 449        params = locals()
 450        for key, val in iteritems(params['kwargs']):
 451            if key not in all_params:
 452                raise TypeError(
 453                    "Got an unexpected keyword argument '%s'"
 454                    " to method create_lock" % key
 455                )
 456            params[key] = val
 457        del params['kwargs']
 458        # verify the required parameter 'account_id' is set
 459        if ('account_id' not in params) or (params['account_id'] is None):
 460            raise ValueError("Missing the required parameter `account_id` when calling `create_lock`")
 461        # verify the required parameter 'template_id' is set
 462        if ('template_id' not in params) or (params['template_id'] is None):
 463            raise ValueError("Missing the required parameter `template_id` when calling `create_lock`")
 464
 465
 466        collection_formats = {}
 467
 468        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
 469        path_params = {}
 470        if 'account_id' in params:
 471            path_params['accountId'] = params['account_id']
 472        if 'template_id' in params:
 473            path_params['templateId'] = params['template_id']
 474
 475        query_params = {}
 476
 477        header_params = {}
 478
 479        form_params = []
 480        local_var_files = {}
 481
 482        body_params = None
 483        if 'lock_request' in params:
 484            body_params = params['lock_request']
 485        # HTTP header `Accept`
 486        header_params['Accept'] = self.api_client.\
 487            select_header_accept(['application/json'])
 488
 489        # Authentication setting
 490        auth_settings = []
 491
 492        return self.api_client.call_api(resource_path, 'POST',
 493                                        path_params,
 494                                        query_params,
 495                                        header_params,
 496                                        body=body_params,
 497                                        post_params=form_params,
 498                                        files=local_var_files,
 499                                        response_type='LockInformation',
 500                                        auth_settings=auth_settings,
 501                                        callback=params.get('callback'),
 502                                        _return_http_data_only=params.get('_return_http_data_only'),
 503                                        _preload_content=params.get('_preload_content', True),
 504                                        _request_timeout=params.get('_request_timeout'),
 505                                        collection_formats=collection_formats)
 506
 507    def create_recipients(self, account_id, template_id, **kwargs):
 508        """
 509        Adds tabs for a recipient.
 510        Adds one or more recipients to a template.
 511        This method makes a synchronous HTTP request by default. To make an
 512        asynchronous HTTP request, please define a `callback` function
 513        to be invoked when receiving the response.
 514        >>> def callback_function(response):
 515        >>>     pprint(response)
 516        >>>
 517        >>> thread = api.create_recipients(account_id, template_id, callback=callback_function)
 518
 519        :param callback function: The callback function
 520            for asynchronous request. (optional)
 521        :param str account_id: The external account number (int) or account ID Guid. (required)
 522        :param str template_id: The ID of the template being accessed. (required)
 523        :param str resend_envelope:
 524        :param TemplateRecipients template_recipients:
 525        :return: Recipients
 526                 If the method is called asynchronously,
 527                 returns the request thread.
 528        """
 529        kwargs['_return_http_data_only'] = True
 530        if kwargs.get('callback'):
 531            return self.create_recipients_with_http_info(account_id, template_id, **kwargs)
 532        else:
 533            (data) = self.create_recipients_with_http_info(account_id, template_id, **kwargs)
 534            return data
 535
 536    def create_recipients_with_http_info(self, account_id, template_id, **kwargs):
 537        """
 538        Adds tabs for a recipient.
 539        Adds one or more recipients to a template.
 540        This method makes a synchronous HTTP request by default. To make an
 541        asynchronous HTTP request, please define a `callback` function
 542        to be invoked when receiving the response.
 543        >>> def callback_function(response):
 544        >>>     pprint(response)
 545        >>>
 546        >>> thread = api.create_recipients_with_http_info(account_id, template_id, callback=callback_function)
 547
 548        :param callback function: The callback function
 549            for asynchronous request. (optional)
 550        :param str account_id: The external account number (int) or account ID Guid. (required)
 551        :param str template_id: The ID of the template being accessed. (required)
 552        :param str resend_envelope:
 553        :param TemplateRecipients template_recipients:
 554        :return: Recipients
 555                 If the method is called asynchronously,
 556                 returns the request thread.
 557        """
 558
 559        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
 560        all_params.append('callback')
 561        all_params.append('_return_http_data_only')
 562        all_params.append('_preload_content')
 563        all_params.append('_request_timeout')
 564
 565        params = locals()
 566        for key, val in iteritems(params['kwargs']):
 567            if key not in all_params:
 568                raise TypeError(
 569                    "Got an unexpected keyword argument '%s'"
 570                    " to method create_recipients" % key
 571                )
 572            params[key] = val
 573        del params['kwargs']
 574        # verify the required parameter 'account_id' is set
 575        if ('account_id' not in params) or (params['account_id'] is None):
 576            raise ValueError("Missing the required parameter `account_id` when calling `create_recipients`")
 577        # verify the required parameter 'template_id' is set
 578        if ('template_id' not in params) or (params['template_id'] is None):
 579            raise ValueError("Missing the required parameter `template_id` when calling `create_recipients`")
 580
 581
 582        collection_formats = {}
 583
 584        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
 585        path_params = {}
 586        if 'account_id' in params:
 587            path_params['accountId'] = params['account_id']
 588        if 'template_id' in params:
 589            path_params['templateId'] = params['template_id']
 590
 591        query_params = {}
 592        if 'resend_envelope' in params:
 593            query_params['resend_envelope'] = params['resend_envelope']
 594
 595        header_params = {}
 596
 597        form_params = []
 598        local_var_files = {}
 599
 600        body_params = None
 601        if 'template_recipients' in params:
 602            body_params = params['template_recipients']
 603        # HTTP header `Accept`
 604        header_params['Accept'] = self.api_client.\
 605            select_header_accept(['application/json'])
 606
 607        # Authentication setting
 608        auth_settings = []
 609
 610        return self.api_client.call_api(resource_path, 'POST',
 611                                        path_params,
 612                                        query_params,
 613                                        header_params,
 614                                        body=body_params,
 615                                        post_params=form_params,
 616                                        files=local_var_files,
 617                                        response_type='Recipients',
 618                                        auth_settings=auth_settings,
 619                                        callback=params.get('callback'),
 620                                        _return_http_data_only=params.get('_return_http_data_only'),
 621                                        _preload_content=params.get('_preload_content', True),
 622                                        _request_timeout=params.get('_request_timeout'),
 623                                        collection_formats=collection_formats)
 624
 625    def create_tabs(self, account_id, recipient_id, template_id, **kwargs):
 626        """
 627        Adds tabs for a recipient.
 628        Adds one or more tabs for a recipient.
 629        This method makes a synchronous HTTP request by default. To make an
 630        asynchronous HTTP request, please define a `callback` function
 631        to be invoked when receiving the response.
 632        >>> def callback_function(response):
 633        >>>     pprint(response)
 634        >>>
 635        >>> thread = api.create_tabs(account_id, recipient_id, template_id, callback=callback_function)
 636
 637        :param callback function: The callback function
 638            for asynchronous request. (optional)
 639        :param str account_id: The external account number (int) or account ID Guid. (required)
 640        :param str recipient_id: The ID of the recipient being accessed. (required)
 641        :param str template_id: The ID of the template being accessed. (required)
 642        :param TemplateTabs template_tabs:
 643        :return: Tabs
 644                 If the method is called asynchronously,
 645                 returns the request thread.
 646        """
 647        kwargs['_return_http_data_only'] = True
 648        if kwargs.get('callback'):
 649            return self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
 650        else:
 651            (data) = self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
 652            return data
 653
 654    def create_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
 655        """
 656        Adds tabs for a recipient.
 657        Adds one or more tabs for a recipient.
 658        This method makes a synchronous HTTP request by default. To make an
 659        asynchronous HTTP request, please define a `callback` function
 660        to be invoked when receiving the response.
 661        >>> def callback_function(response):
 662        >>>     pprint(response)
 663        >>>
 664        >>> thread = api.create_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
 665
 666        :param callback function: The callback function
 667            for asynchronous request. (optional)
 668        :param str account_id: The external account number (int) or account ID Guid. (required)
 669        :param str recipient_id: The ID of the recipient being accessed. (required)
 670        :param str template_id: The ID of the template being accessed. (required)
 671        :param TemplateTabs template_tabs:
 672        :return: Tabs
 673                 If the method is called asynchronously,
 674                 returns the request thread.
 675        """
 676
 677        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
 678        all_params.append('callback')
 679        all_params.append('_return_http_data_only')
 680        all_params.append('_preload_content')
 681        all_params.append('_request_timeout')
 682
 683        params = locals()
 684        for key, val in iteritems(params['kwargs']):
 685            if key not in all_params:
 686                raise TypeError(
 687                    "Got an unexpected keyword argument '%s'"
 688                    " to method create_tabs" % key
 689                )
 690            params[key] = val
 691        del params['kwargs']
 692        # verify the required parameter 'account_id' is set
 693        if ('account_id' not in params) or (params['account_id'] is None):
 694            raise ValueError("Missing the required parameter `account_id` when calling `create_tabs`")
 695        # verify the required parameter 'recipient_id' is set
 696        if ('recipient_id' not in params) or (params['recipient_id'] is None):
 697            raise ValueError("Missing the required parameter `recipient_id` when calling `create_tabs`")
 698        # verify the required parameter 'template_id' is set
 699        if ('template_id' not in params) or (params['template_id'] is None):
 700            raise ValueError("Missing the required parameter `template_id` when calling `create_tabs`")
 701
 702
 703        collection_formats = {}
 704
 705        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
 706        path_params = {}
 707        if 'account_id' in params:
 708            path_params['accountId'] = params['account_id']
 709        if 'recipient_id' in params:
 710            path_params['recipientId'] = params['recipient_id']
 711        if 'template_id' in params:
 712            path_params['templateId'] = params['template_id']
 713
 714        query_params = {}
 715
 716        header_params = {}
 717
 718        form_params = []
 719        local_var_files = {}
 720
 721        body_params = None
 722        if 'template_tabs' in params:
 723            body_params = params['template_tabs']
 724        # HTTP header `Accept`
 725        header_params['Accept'] = self.api_client.\
 726            select_header_accept(['application/json'])
 727
 728        # Authentication setting
 729        auth_settings = []
 730
 731        return self.api_client.call_api(resource_path, 'POST',
 732                                        path_params,
 733                                        query_params,
 734                                        header_params,
 735                                        body=body_params,
 736                                        post_params=form_params,
 737                                        files=local_var_files,
 738                                        response_type='Tabs',
 739                                        auth_settings=auth_settings,
 740                                        callback=params.get('callback'),
 741                                        _return_http_data_only=params.get('_return_http_data_only'),
 742                                        _preload_content=params.get('_preload_content', True),
 743                                        _request_timeout=params.get('_request_timeout'),
 744                                        collection_formats=collection_formats)
 745
 746    def create_template(self, account_id, **kwargs):
 747        """
 748        Creates an envelope from a template.
 749        Creates a template definition using a multipart request.  ###Template Email Subject Merge Fields  Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.  The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.  Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.  To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_UserName]]  Example:  `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",`  To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_Email]]  Example:  `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`   In both cases the <roleName> is the recipient's contents of the `roleName` property in the template.  For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
 750        This method makes a synchronous HTTP request by default. To make an
 751        asynchronous HTTP request, please define a `callback` function
 752        to be invoked when receiving the response.
 753        >>> def callback_function(response):
 754        >>>     pprint(response)
 755        >>>
 756        >>> thread = api.create_template(account_id, callback=callback_function)
 757
 758        :param callback function: The callback function
 759            for asynchronous request. (optional)
 760        :param str account_id: The external account number (int) or account ID Guid. (required)
 761        :param EnvelopeTemplate envelope_template:
 762        :return: TemplateSummary
 763                 If the method is called asynchronously,
 764                 returns the request thread.
 765        """
 766        kwargs['_return_http_data_only'] = True
 767        if kwargs.get('callback'):
 768            return self.create_template_with_http_info(account_id, **kwargs)
 769        else:
 770            (data) = self.create_template_with_http_info(account_id, **kwargs)
 771            return data
 772
 773    def create_template_with_http_info(self, account_id, **kwargs):
 774        """
 775        Creates an envelope from a template.
 776        Creates a template definition using a multipart request.  ###Template Email Subject Merge Fields  Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.  The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.  Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.  To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_UserName]]  Example:  `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",`  To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_Email]]  Example:  `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`   In both cases the <roleName> is the recipient's contents of the `roleName` property in the template.  For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
 777        This method makes a synchronous HTTP request by default. To make an
 778        asynchronous HTTP request, please define a `callback` function
 779        to be invoked when receiving the response.
 780        >>> def callback_function(response):
 781        >>>     pprint(response)
 782        >>>
 783        >>> thread = api.create_template_with_http_info(account_id, callback=callback_function)
 784
 785        :param callback function: The callback function
 786            for asynchronous request. (optional)
 787        :param str account_id: The external account number (int) or account ID Guid. (required)
 788        :param EnvelopeTemplate envelope_template:
 789        :return: TemplateSummary
 790                 If the method is called asynchronously,
 791                 returns the request thread.
 792        """
 793
 794        all_params = ['account_id', 'envelope_template']
 795        all_params.append('callback')
 796        all_params.append('_return_http_data_only')
 797        all_params.append('_preload_content')
 798        all_params.append('_request_timeout')
 799
 800        params = locals()
 801        for key, val in iteritems(params['kwargs']):
 802            if key not in all_params:
 803                raise TypeError(
 804                    "Got an unexpected keyword argument '%s'"
 805                    " to method create_template" % key
 806                )
 807            params[key] = val
 808        del params['kwargs']
 809        # verify the required parameter 'account_id' is set
 810        if ('account_id' not in params) or (params['account_id'] is None):
 811            raise ValueError("Missing the required parameter `account_id` when calling `create_template`")
 812
 813
 814        collection_formats = {}
 815
 816        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
 817        path_params = {}
 818        if 'account_id' in params:
 819            path_params['accountId'] = params['account_id']
 820
 821        query_params = {}
 822
 823        header_params = {}
 824
 825        form_params = []
 826        local_var_files = {}
 827
 828        body_params = None
 829        if 'envelope_template' in params:
 830            body_params = params['envelope_template']
 831        # HTTP header `Accept`
 832        header_params['Accept'] = self.api_client.\
 833            select_header_accept(['application/json'])
 834
 835        # Authentication setting
 836        auth_settings = []
 837
 838        return self.api_client.call_api(resource_path, 'POST',
 839                                        path_params,
 840                                        query_params,
 841                                        header_params,
 842                                        body=body_params,
 843                                        post_params=form_params,
 844                                        files=local_var_files,
 845                                        response_type='TemplateSummary',
 846                                        auth_settings=auth_settings,
 847                                        callback=params.get('callback'),
 848                                        _return_http_data_only=params.get('_return_http_data_only'),
 849                                        _preload_content=params.get('_preload_content', True),
 850                                        _request_timeout=params.get('_request_timeout'),
 851                                        collection_formats=collection_formats)
 852
 853    def create_template_document_responsive_html_preview(self, account_id, document_id, template_id, **kwargs):
 854        """
 855        Post Responsive HTML Preview for a document in a template.
 856        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
 857        This method makes a synchronous HTTP request by default. To make an
 858        asynchronous HTTP request, please define a `callback` function
 859        to be invoked when receiving the response.
 860        >>> def callback_function(response):
 861        >>>     pprint(response)
 862        >>>
 863        >>> thread = api.create_template_document_responsive_html_preview(account_id, document_id, template_id, callback=callback_function)
 864
 865        :param callback function: The callback function
 866            for asynchronous request. (optional)
 867        :param str account_id: The external account number (int) or account ID Guid. (required)
 868        :param str document_id: The ID of the document being accessed. (required)
 869        :param str template_id: The ID of the template being accessed. (required)
 870        :param DocumentHtmlDefinition document_html_definition:
 871        :return: DocumentHtmlDefinitions
 872                 If the method is called asynchronously,
 873                 returns the request thread.
 874        """
 875        kwargs['_return_http_data_only'] = True
 876        if kwargs.get('callback'):
 877            return self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs)
 878        else:
 879            (data) = self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs)
 880            return data
 881
 882    def create_template_document_responsive_html_preview_with_http_info(self, account_id, document_id, template_id, **kwargs):
 883        """
 884        Post Responsive HTML Preview for a document in a template.
 885        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
 886        This method makes a synchronous HTTP request by default. To make an
 887        asynchronous HTTP request, please define a `callback` function
 888        to be invoked when receiving the response.
 889        >>> def callback_function(response):
 890        >>>     pprint(response)
 891        >>>
 892        >>> thread = api.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, callback=callback_function)
 893
 894        :param callback function: The callback function
 895            for asynchronous request. (optional)
 896        :param str account_id: The external account number (int) or account ID Guid. (required)
 897        :param str document_id: The ID of the document being accessed. (required)
 898        :param str template_id: The ID of the template being accessed. (required)
 899        :param DocumentHtmlDefinition document_html_definition:
 900        :return: DocumentHtmlDefinitions
 901                 If the method is called asynchronously,
 902                 returns the request thread.
 903        """
 904
 905        all_params = ['account_id', 'document_id', 'template_id', 'document_html_definition']
 906        all_params.append('callback')
 907        all_params.append('_return_http_data_only')
 908        all_params.append('_preload_content')
 909        all_params.append('_request_timeout')
 910
 911        params = locals()
 912        for key, val in iteritems(params['kwargs']):
 913            if key not in all_params:
 914                raise TypeError(
 915                    "Got an unexpected keyword argument '%s'"
 916                    " to method create_template_document_responsive_html_preview" % key
 917                )
 918            params[key] = val
 919        del params['kwargs']
 920        # verify the required parameter 'account_id' is set
 921        if ('account_id' not in params) or (params['account_id'] is None):
 922            raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_responsive_html_preview`")
 923        # verify the required parameter 'document_id' is set
 924        if ('document_id' not in params) or (params['document_id'] is None):
 925            raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_responsive_html_preview`")
 926        # verify the required parameter 'template_id' is set
 927        if ('template_id' not in params) or (params['template_id'] is None):
 928            raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_responsive_html_preview`")
 929
 930
 931        collection_formats = {}
 932
 933        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/responsive_html_preview'.replace('{format}', 'json')
 934        path_params = {}
 935        if 'account_id' in params:
 936            path_params['accountId'] = params['account_id']
 937        if 'document_id' in params:
 938            path_params['documentId'] = params['document_id']
 939        if 'template_id' in params:
 940            path_params['templateId'] = params['template_id']
 941
 942        query_params = {}
 943
 944        header_params = {}
 945
 946        form_params = []
 947        local_var_files = {}
 948
 949        body_params = None
 950        if 'document_html_definition' in params:
 951            body_params = params['document_html_definition']
 952        # HTTP header `Accept`
 953        header_params['Accept'] = self.api_client.\
 954            select_header_accept(['application/json'])
 955
 956        # Authentication setting
 957        auth_settings = []
 958
 959        return self.api_client.call_api(resource_path, 'POST',
 960                                        path_params,
 961                                        query_params,
 962                                        header_params,
 963                                        body=body_params,
 964                                        post_params=form_params,
 965                                        files=local_var_files,
 966                                        response_type='DocumentHtmlDefinitions',
 967                                        auth_settings=auth_settings,
 968                                        callback=params.get('callback'),
 969                                        _return_http_data_only=params.get('_return_http_data_only'),
 970                                        _preload_content=params.get('_preload_content', True),
 971                                        _request_timeout=params.get('_request_timeout'),
 972                                        collection_formats=collection_formats)
 973
 974    def create_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
 975        """
 976        Adds the tabs to a tempate
 977        Adds tabs to the document specified by `documentId` in the template specified by `templateId`.  In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this:  ``` {   \"prefillTabs\": {     \"textTabs\": [       {         \"value\": \"a prefill text tab\",         \"pageNumber\": \"1\",         \"documentId\": \"1\",         \"xPosition\": 316,         \"yPosition\": 97       }     ]   } } ``` 
 978        This method makes a synchronous HTTP request by default. To make an
 979        asynchronous HTTP request, please define a `callback` function
 980        to be invoked when receiving the response.
 981        >>> def callback_function(response):
 982        >>>     pprint(response)
 983        >>>
 984        >>> thread = api.create_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
 985
 986        :param callback function: The callback function
 987            for asynchronous request. (optional)
 988        :param str account_id: The external account number (int) or account ID Guid. (required)
 989        :param str document_id: The ID of the document being accessed. (required)
 990        :param str template_id: The ID of the template being accessed. (required)
 991        :param TemplateTabs template_tabs:
 992        :return: Tabs
 993                 If the method is called asynchronously,
 994                 returns the request thread.
 995        """
 996        kwargs['_return_http_data_only'] = True
 997        if kwargs.get('callback'):
 998            return self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
 999        else:
1000            (data) = self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
1001            return data
1002
1003    def create_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
1004        """
1005        Adds the tabs to a tempate
1006        Adds tabs to the document specified by `documentId` in the template specified by `templateId`.  In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this:  ``` {   \"prefillTabs\": {     \"textTabs\": [       {         \"value\": \"a prefill text tab\",         \"pageNumber\": \"1\",         \"documentId\": \"1\",         \"xPosition\": 316,         \"yPosition\": 97       }     ]   } } ``` 
1007        This method makes a synchronous HTTP request by default. To make an
1008        asynchronous HTTP request, please define a `callback` function
1009        to be invoked when receiving the response.
1010        >>> def callback_function(response):
1011        >>>     pprint(response)
1012        >>>
1013        >>> thread = api.create_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
1014
1015        :param callback function: The callback function
1016            for asynchronous request. (optional)
1017        :param str account_id: The external account number (int) or account ID Guid. (required)
1018        :param str document_id: The ID of the document being accessed. (required)
1019        :param str template_id: The ID of the template being accessed. (required)
1020        :param TemplateTabs template_tabs:
1021        :return: Tabs
1022                 If the method is called asynchronously,
1023                 returns the request thread.
1024        """
1025
1026        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
1027        all_params.append('callback')
1028        all_params.append('_return_http_data_only')
1029        all_params.append('_preload_content')
1030        all_params.append('_request_timeout')
1031
1032        params = locals()
1033        for key, val in iteritems(params['kwargs']):
1034            if key not in all_params:
1035                raise TypeError(
1036                    "Got an unexpected keyword argument '%s'"
1037                    " to method create_template_document_tabs" % key
1038                )
1039            params[key] = val
1040        del params['kwargs']
1041        # verify the required parameter 'account_id' is set
1042        if ('account_id' not in params) or (params['account_id'] is None):
1043            raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_tabs`")
1044        # verify the required parameter 'document_id' is set
1045        if ('document_id' not in params) or (params['document_id'] is None):
1046            raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_tabs`")
1047        # verify the required parameter 'template_id' is set
1048        if ('template_id' not in params) or (params['template_id'] is None):
1049            raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_tabs`")
1050
1051
1052        collection_formats = {}
1053
1054        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
1055        path_params = {}
1056        if 'account_id' in params:
1057            path_params['accountId'] = params['account_id']
1058        if 'document_id' in params:
1059            path_params['documentId'] = params['document_id']
1060        if 'template_id' in params:
1061            path_params['templateId'] = params['template_id']
1062
1063        query_params = {}
1064
1065        header_params = {}
1066
1067        form_params = []
1068        local_var_files = {}
1069
1070        body_params = None
1071        if 'template_tabs' in params:
1072            body_params = params['template_tabs']
1073        # HTTP header `Accept`
1074        header_params['Accept'] = self.api_client.\
1075            select_header_accept(['application/json'])
1076
1077        # Authentication setting
1078        auth_settings = []
1079
1080        return self.api_client.call_api(resource_path, 'POST',
1081                                        path_params,
1082                                        query_params,
1083                                        header_params,
1084                                        body=body_params,
1085                                        post_params=form_params,
1086                                        files=local_var_files,
1087                                        response_type='Tabs',
1088                                        auth_settings=auth_settings,
1089                                        callback=params.get('callback'),
1090                                        _return_http_data_only=params.get('_return_http_data_only'),
1091                                        _preload_content=params.get('_preload_content', True),
1092                                        _request_timeout=params.get('_request_timeout'),
1093                                        collection_formats=collection_formats)
1094
1095    def create_template_recipient_preview(self, account_id, template_id, **kwargs):
1096        """
1097        Provides a URL to start a recipient view of the Envelope UI
1098        This method returns a URL for a template recipient preview  in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
1099        This method makes a synchronous HTTP request by default. To make an
1100        asynchronous HTTP request, please define a `callback` function
1101        to be invoked when receiving the response.
1102        >>> def callback_function(response):
1103        >>>     pprint(response)
1104        >>>
1105        >>> thread = api.create_template_recipient_preview(account_id, template_id, callback=callback_function)
1106
1107        :param callback function: The callback function
1108            for asynchronous request. (optional)
1109        :param str account_id: The external account number (int) or account ID Guid. (required)
1110        :param str template_id: The ID of the template being accessed. (required)
1111        :param RecipientPreviewRequest recipient_preview_request:
1112        :return: ViewUrl
1113                 If the method is called asynchronously,
1114                 returns the request thread.
1115        """
1116        kwargs['_return_http_data_only'] = True
1117        if kwargs.get('callback'):
1118            return self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs)
1119        else:
1120            (data) = self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs)
1121            return data
1122
1123    def create_template_recipient_preview_with_http_info(self, account_id, template_id, **kwargs):
1124        """
1125        Provides a URL to start a recipient view of the Envelope UI
1126        This method returns a URL for a template recipient preview  in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
1127        This method makes a synchronous HTTP request by default. To make an
1128        asynchronous HTTP request, please define a `callback` function
1129        to be invoked when receiving the response.
1130        >>> def callback_function(response):
1131        >>>     pprint(response)
1132        >>>
1133        >>> thread = api.create_template_recipient_preview_with_http_info(account_id, template_id, callback=callback_function)
1134
1135        :param callback function: The callback function
1136            for asynchronous request. (optional)
1137        :param str account_id: The external account number (int) or account ID Guid. (required)
1138        :param str template_id: The ID of the template being accessed. (required)
1139        :param RecipientPreviewRequest recipient_preview_request:
1140        :return: ViewUrl
1141                 If the method is called asynchronously,
1142                 returns the request thread.
1143        """
1144
1145        all_params = ['account_id', 'template_id', 'recipient_preview_request']
1146        all_params.append('callback')
1147        all_params.append('_return_http_data_only')
1148        all_params.append('_preload_content')
1149        all_params.append('_request_timeout')
1150
1151        params = locals()
1152        for key, val in iteritems(params['kwargs']):
1153            if key not in all_params:
1154                raise TypeError(
1155                    "Got an unexpected keyword argument '%s'"
1156                    " to method create_template_recipient_preview" % key
1157                )
1158            params[key] = val
1159        del params['kwargs']
1160        # verify the required parameter 'account_id' is set
1161        if ('account_id' not in params) or (params['account_id'] is None):
1162            raise ValueError("Missing the required parameter `account_id` when calling `create_template_recipient_preview`")
1163        # verify the required parameter 'template_id' is set
1164        if ('template_id' not in params) or (params['template_id'] is None):
1165            raise ValueError("Missing the required parameter `template_id` when calling `create_template_recipient_preview`")
1166
1167
1168        collection_formats = {}
1169
1170        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/recipient_preview'.replace('{format}', 'json')
1171        path_params = {}
1172        if 'account_id' in params:
1173            path_params['accountId'] = params['account_id']
1174        if 'template_id' in params:
1175            path_params['templateId'] = params['template_id']
1176
1177        query_params = {}
1178
1179        header_params = {}
1180
1181        form_params = []
1182        local_var_files = {}
1183
1184        body_params = None
1185        if 'recipient_preview_request' in params:
1186            body_params = params['recipient_preview_request']
1187        # HTTP header `Accept`
1188        header_params['Accept'] = self.api_client.\
1189            select_header_accept(['application/json'])
1190
1191        # Authentication setting
1192        auth_settings = []
1193
1194        return self.api_client.call_api(resource_path, 'POST',
1195                                        path_params,
1196                                        query_params,
1197                                        header_params,
1198                                        body=body_params,
1199                                        post_params=form_params,
1200                                        files=local_var_files,
1201                                        response_type='ViewUrl',
1202                                        auth_settings=auth_settings,
1203                                        callback=params.get('callback'),
1204                                        _return_http_data_only=params.get('_return_http_data_only'),
1205                                        _preload_content=params.get('_preload_content', True),
1206                                        _request_timeout=params.get('_request_timeout'),
1207                                        collection_formats=collection_formats)
1208
1209    def create_template_responsive_html_preview(self, account_id, template_id, **kwargs):
1210        """
1211        Get Responsive HTML Preview for all documents in a template.
1212        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
1213        This method makes a synchronous HTTP request by default. To make an
1214        asynchronous HTTP request, please define a `callback` function
1215        to be invoked when receiving the response.
1216        >>> def callback_function(response):
1217        >>>     pprint(response)
1218        >>>
1219        >>> thread = api.create_template_responsive_html_preview(account_id, template_id, callback=callback_function)
1220
1221        :param callback function: The callback function
1222            for asynchronous request. (optional)
1223        :param str account_id: The external account number (int) or account ID Guid. (required)
1224        :param str template_id: The ID of the template being accessed. (required)
1225        :param DocumentHtmlDefinition document_html_definition:
1226        :return: DocumentHtmlDefinitions
1227                 If the method is called asynchronously,
1228                 returns the request thread.
1229        """
1230        kwargs['_return_http_data_only'] = True
1231        if kwargs.get('callback'):
1232            return self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs)
1233        else:
1234            (data) = self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs)
1235            return data
1236
1237    def create_template_responsive_html_preview_with_http_info(self, account_id, template_id, **kwargs):
1238        """
1239        Get Responsive HTML Preview for all documents in a template.
1240        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
1241        This method makes a synchronous HTTP request by default. To make an
1242        asynchronous HTTP request, please define a `callback` function
1243        to be invoked when receiving the response.
1244        >>> def callback_function(response):
1245        >>>     pprint(response)
1246        >>>
1247        >>> thread = api.create_template_responsive_html_preview_with_http_info(account_id, template_id, callback=callback_function)
1248
1249        :param callback function: The callback function
1250            for asynchronous request. (optional)
1251        :param str account_id: The external account number (int) or account ID Guid. (required)
1252        :param str template_id: The ID of the template being accessed. (required)
1253        :param DocumentHtmlDefinition document_html_definition:
1254        :return: DocumentHtmlDefinitions
1255                 If the method is called asynchronously,
1256                 returns the request thread.
1257        """
1258
1259        all_params = ['account_id', 'template_id', 'document_html_definition']
1260        all_params.append('callback')
1261        all_params.append('_return_http_data_only')
1262        all_params.append('_preload_content')
1263        all_params.append('_request_timeout')
1264
1265        params = locals()
1266        for key, val in iteritems(params['kwargs']):
1267            if key not in all_params:
1268                raise TypeError(
1269                    "Got an unexpected keyword argument '%s'"
1270                    " to method create_template_responsive_html_preview" % key
1271                )
1272            params[key] = val
1273        del params['kwargs']
1274        # verify the required parameter 'account_id' is set
1275        if ('account_id' not in params) or (params['account_id'] is None):
1276            raise ValueError("Missing the required parameter `account_id` when calling `create_template_responsive_html_preview`")
1277        # verify the required parameter 'template_id' is set
1278        if ('template_id' not in params) or (params['template_id'] is None):
1279            raise ValueError("Missing the required parameter `template_id` when calling `create_template_responsive_html_preview`")
1280
1281
1282        collection_formats = {}
1283
1284        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/responsive_html_preview'.replace('{format}', 'json')
1285        path_params = {}
1286        if 'account_id' in params:
1287            path_params['accountId'] = params['account_id']
1288        if 'template_id' in params:
1289            path_params['templateId'] = params['template_id']
1290
1291        query_params = {}
1292
1293        header_params = {}
1294
1295        form_params = []
1296        local_var_files = {}
1297
1298        body_params = None
1299        if 'document_html_definition' in params:
1300            body_params = params['document_html_definition']
1301        # HTTP header `Accept`
1302        header_params['Accept'] = self.api_client.\
1303            select_header_accept(['application/json'])
1304
1305        # Authentication setting
1306        auth_settings = []
1307
1308        return self.api_client.call_api(resource_path, 'POST',
1309                                        path_params,
1310                                        query_params,
1311                                        header_params,
1312                                        body=body_params,
1313                                        post_params=form_params,
1314                                        files=local_var_files,
1315                                        response_type='DocumentHtmlDefinitions',
1316                                        auth_settings=auth_settings,
1317                                        callback=params.get('callback'),
1318                                        _return_http_data_only=params.get('_return_http_data_only'),
1319                                        _preload_content=params.get('_preload_content', True),
1320                                        _request_timeout=params.get('_request_timeout'),
1321                                        collection_formats=collection_formats)
1322
1323    def delete_custom_fields(self, account_id, template_id, **kwargs):
1324        """
1325        Deletes envelope custom fields in a template.
1326        Deletes envelope custom fields in a template.
1327        This method makes a synchronous HTTP request by default. To make an
1328        asynchronous HTTP request, please define a `callback` function
1329        to be invoked when receiving the response.
1330        >>> def callback_function(response):
1331        >>>     pprint(response)
1332        >>>
1333        >>> thread = api.delete_custom_fields(account_id, template_id, callback=callback_function)
1334
1335        :param callback function: The callback function
1336            for asynchronous request. (optional)
1337        :param str account_id: The external account number (int) or account ID Guid. (required)
1338        :param str template_id: The ID of the template being accessed. (required)
1339        :param TemplateCustomFields template_custom_fields:
1340        :return: CustomFields
1341                 If the method is called asynchronously,
1342                 returns the request thread.
1343        """
1344        kwargs['_return_http_data_only'] = True
1345        if kwargs.get('callback'):
1346            return self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs)
1347        else:
1348            (data) = self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs)
1349            return data
1350
1351    def delete_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
1352        """
1353        Deletes envelope custom fields in a template.
1354        Deletes envelope custom fields in a template.
1355        This method makes a synchronous HTTP request by default. To make an
1356        asynchronous HTTP request, please define a `callback` function
1357        to be invoked when receiving the response.
1358        >>> def callback_function(response):
1359        >>>     pprint(response)
1360        >>>
1361        >>> thread = api.delete_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
1362
1363        :param callback function: The callback function
1364            for asynchronous request. (optional)
1365        :param str account_id: The external account number (int) or account ID Guid. (required)
1366        :param str template_id: The ID of the template being accessed. (required)
1367        :param TemplateCustomFields template_custom_fields:
1368        :return: CustomFields
1369                 If the method is called asynchronously,
1370                 returns the request thread.
1371        """
1372
1373        all_params = ['account_id', 'template_id', 'template_custom_fields']
1374        all_params.append('callback')
1375        all_params.append('_return_http_data_only')
1376        all_params.append('_preload_content')
1377        all_params.append('_request_timeout')
1378
1379        params = locals()
1380        for key, val in iteritems(params['kwargs']):
1381            if key not in all_params:
1382                raise TypeError(
1383                    "Got an unexpected keyword argument '%s'"
1384                    " to method delete_custom_fields" % key
1385                )
1386            params[key] = val
1387        del params['kwargs']
1388        # verify the required parameter 'account_id' is set
1389        if ('account_id' not in params) or (params['account_id'] is None):
1390            raise ValueError("Missing the required parameter `account_id` when calling `delete_custom_fields`")
1391        # verify the required parameter 'template_id' is set
1392        if ('template_id' not in params) or (params['template_id'] is None):
1393            raise ValueError("Missing the required parameter `template_id` when calling `delete_custom_fields`")
1394
1395
1396        collection_formats = {}
1397
1398        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
1399        path_params = {}
1400        if 'account_id' in params:
1401            path_params['accountId'] = params['account_id']
1402        if 'template_id' in params:
1403            path_params['templateId'] = params['template_id']
1404
1405        query_params = {}
1406
1407        header_params = {}
1408
1409        form_params = []
1410        local_var_files = {}
1411
1412        body_params = None
1413        if 'template_custom_fields' in params:
1414            body_params = params['template_custom_fields']
1415        # HTTP header `Accept`
1416        header_params['Accept'] = self.api_client.\
1417            select_header_accept(['application/json'])
1418
1419        # Authentication setting
1420        auth_settings = []
1421
1422        return self.api_client.call_api(resource_path, 'DELETE',
1423                                        path_params,
1424                                        query_params,
1425                                        header_params,
1426                                        body=body_params,
1427                                        post_params=form_params,
1428                                        files=local_var_files,
1429                                        response_type='CustomFields',
1430                                        auth_settings=auth_settings,
1431                                        callback=params.get('callback'),
1432                                        _return_http_data_only=params.get('_return_http_data_only'),
1433                                        _preload_content=params.get('_preload_content', True),
1434                                        _request_timeout=params.get('_request_timeout'),
1435                                        collection_formats=collection_formats)
1436
1437    def delete_document_fields(self, account_id, document_id, template_id, **kwargs):
1438        """
1439        Deletes custom document fields from an existing template document.
1440        Deletes custom document fields from an existing template document.
1441        This method makes a synchronous HTTP request by default. To make an
1442        asynchronous HTTP request, please define a `callback` function
1443        to be invoked when receiving the response.
1444        >>> def callback_function(response):
1445        >>>     pprint(response)
1446        >>>
1447        >>> thread = api.delete_document_fields(account_id, document_id, template_id, callback=callback_function)
1448
1449        :param callback function: The callback function
1450            for asynchronous request. (optional)
1451        :param str account_id: The external account number (int) or account ID Guid. (required)
1452        :param str document_id: The ID of the document being accessed. (required)
1453        :param str template_id: The ID of the template being accessed. (required)
1454        :param DocumentFieldsInformation document_fields_information:
1455        :return: DocumentFieldsInformation
1456                 If the method is called asynchronously,
1457                 returns the request thread.
1458        """
1459        kwargs['_return_http_data_only'] = True
1460        if kwargs.get('callback'):
1461            return self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
1462        else:
1463            (data) = self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
1464            return data
1465
1466    def delete_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
1467        """
1468        Deletes custom document fields from an existing template document.
1469        Deletes custom document fields from an existing template document.
1470        This method makes a synchronous HTTP request by default. To make an
1471        asynchronous HTTP request, please define a `callback` function
1472        to be invoked when receiving the response.
1473        >>> def callback_function(response):
1474        >>>     pprint(response)
1475        >>>
1476        >>> thread = api.delete_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
1477
1478        :param callback function: The callback function
1479            for asynchronous request. (optional)
1480        :param str account_id: The external account number (int) or account ID Guid. (required)
1481        :param str document_id: The ID of the document being accessed. (required)
1482        :param str template_id: The ID of the template being accessed. (required)
1483        :param DocumentFieldsInformation document_fields_information:
1484        :return: DocumentFieldsInformation
1485                 If the method is called asynchronously,
1486                 returns the request thread.
1487        """
1488
1489        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
1490        all_params.append('callback')
1491        all_params.append('_return_http_data_only')
1492        all_params.append('_preload_content')
1493        all_params.append('_request_timeout')
1494
1495        params = locals()
1496        for key, val in iteritems(params['kwargs']):
1497            if key not in all_params:
1498                raise TypeError(
1499                    "Got an unexpected keyword argument '%s'"
1500                    " to method delete_document_fields" % key
1501                )
1502            params[key] = val
1503        del params['kwargs']
1504        # verify the required parameter 'account_id' is set
1505        if ('account_id' not in params) or (params['account_id'] is None):
1506            raise ValueError("Missing the required parameter `account_id` when calling `delete_document_fields`")
1507        # verify the required parameter 'document_id' is set
1508        if ('document_id' not in params) or (params['document_id'] is None):
1509            raise ValueError("Missing the required parameter `document_id` when calling `delete_document_fields`")
1510        # verify the required parameter 'template_id' is set
1511        if ('template_id' not in params) or (params['template_id'] is None):
1512            raise ValueError("Missing the required parameter `template_id` when calling `delete_document_fields`")
1513
1514
1515        collection_formats = {}
1516
1517        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
1518        path_params = {}
1519        if 'account_id' in params:
1520            path_params['accountId'] = params['account_id']
1521        if 'document_id' in params:
1522            path_params['documentId'] = params['document_id']
1523        if 'template_id' in params:
1524            path_params['templateId'] = params['template_id']
1525
1526        query_params = {}
1527
1528        header_params = {}
1529
1530        form_params = []
1531        local_var_files = {}
1532
1533        body_params = None
1534        if 'document_fields_information' in params:
1535            body_params = params['document_fields_information']
1536        # HTTP header `Accept`
1537        header_params['Accept'] = self.api_client.\
1538            select_header_accept(['application/json'])
1539
1540        # Authentication setting
1541        auth_settings = []
1542
1543        return self.api_client.call_api(resource_path, 'DELETE',
1544                                        path_params,
1545                                        query_params,
1546                                        header_params,
1547                                        body=body_params,
1548                                        post_params=form_params,
1549                                        files=local_var_files,
1550                                        response_type='DocumentFieldsInformation',
1551                                        auth_settings=auth_settings,
1552                                        callback=params.get('callback'),
1553                                        _return_http_data_only=params.get('_return_http_data_only'),
1554                                        _preload_content=params.get('_preload_content', True),
1555                                        _request_timeout=params.get('_request_timeout'),
1556                                        collection_formats=collection_formats)
1557
1558    def delete_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
1559        """
1560        Deletes a page from a document in an template.
1561        Deletes a page from a document in a template based on the page number.
1562        This method makes a synchronous HTTP request by default. To make an
1563        asynchronous HTTP request, please define a `callback` function
1564        to be invoked when receiving the response.
1565        >>> def callback_function(response):
1566        >>>     pprint(response)
1567        >>>
1568        >>> thread = api.delete_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
1569
1570        :param callback function: The callback function
1571            for asynchronous request. (optional)
1572        :param str account_id: The external account number (int) or account ID Guid. (required)
1573        :param str document_id: The ID of the document being accessed. (required)
1574        :param str page_number: The page number being accessed. (required)
1575        :param str template_id: The ID of the template being accessed. (required)
1576        :param PageRequest page_request:
1577        :return: None
1578                 If the method is called asynchronously,
1579                 returns the request thread.
1580        """
1581        kwargs['_return_http_data_only'] = True
1582        if kwargs.get('callback'):
1583            return self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
1584        else:
1585            (data) = self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
1586            return data
1587
1588    def delete_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
1589        """
1590        Deletes a page from a document in an template.
1591        Deletes a page from a document in a template based on the page number.
1592        This method makes a synchronous HTTP request by default. To make an
1593        asynchronous HTTP request, please define a `callback` function
1594        to be invoked when receiving the response.
1595        >>> def callback_function(response):
1596        >>>     pprint(response)
1597        >>>
1598        >>> thread = api.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
1599
1600        :param callback function: The callback function
1601            for asynchronous request. (optional)
1602        :param str account_id: The external account number (int) or account ID Guid. (required)
1603        :param str document_id: The ID of the document being accessed. (required)
1604        :param str page_number: The page number being accessed. (required)
1605        :param str template_id: The ID of the template being accessed. (required)
1606        :param PageRequest page_request:
1607        :return: None
1608                 If the method is called asynchronously,
1609                 returns the request thread.
1610        """
1611
1612        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
1613        all_params.append('callback')
1614        all_params.append('_return_http_data_only')
1615        all_params.append('_preload_content')
1616        all_params.append('_request_timeout')
1617
1618        params = locals()
1619        for key, val in iteritems(params['kwargs']):
1620            if key not in all_params:
1621                raise TypeError(
1622                    "Got an unexpected keyword argument '%s'"
1623                    " to method delete_document_page" % key
1624                )
1625            params[key] = val
1626        del params['kwargs']
1627        # verify the required parameter 'account_id' is set
1628        if ('account_id' not in params) or (params['account_id'] is None):
1629            raise ValueError("Missing the required parameter `account_id` when calling `delete_document_page`")
1630        # verify the required parameter 'document_id' is set
1631        if ('document_id' not in params) or (params['document_id'] is None):
1632            raise ValueError("Missing the required parameter `document_id` when calling `delete_document_page`")
1633        # verify the required parameter 'page_number' is set
1634        if ('page_number' not in params) or (params['page_number'] is None):
1635            raise ValueError("Missing the required parameter `page_number` when calling `delete_document_page`")
1636        # verify the required parameter 'template_id' is set
1637        if ('template_id' not in params) or (params['template_id'] is None):
1638            raise ValueError("Missing the required parameter `template_id` when calling `delete_document_page`")
1639
1640
1641        collection_formats = {}
1642
1643        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}'.replace('{format}', 'json')
1644        path_params = {}
1645        if 'account_id' in params:
1646            path_params['accountId'] = params['account_id']
1647        if 'document_id' in params:
1648            path_params['documentId'] = params['document_id']
1649        if 'page_number' in params:
1650            path_params['pageNumber'] = params['page_number']
1651        if 'template_id' in params:
1652            path_params['templateId'] = params['template_id']
1653
1654        query_params = {}
1655
1656        header_params = {}
1657
1658        form_params = []
1659        local_var_files = {}
1660
1661        body_params = None
1662        if 'page_request' in params:
1663            body_params = params['page_request']
1664        # HTTP header `Accept`
1665        header_params['Accept'] = self.api_client.\
1666            select_header_accept(['application/json'])
1667
1668        # Authentication setting
1669        auth_settings = []
1670
1671        return self.api_client.call_api(resource_path, 'DELETE',
1672                                        path_params,
1673                                        query_params,
1674                                        header_params,
1675                                        body=body_params,
1676                                        post_params=form_params,
1677                                        files=local_var_files,
1678                                        response_type=None,
1679                                        auth_settings=auth_settings,
1680                                        callback=params.get('callback'),
1681                                        _return_http_data_only=params.get('_return_http_data_only'),
1682                                        _preload_content=params.get('_preload_content', True),
1683                                        _request_timeout=params.get('_request_timeout'),
1684                                        collection_formats=collection_formats)
1685
1686    def delete_documents(self, account_id, template_id, **kwargs):
1687        """
1688        Deletes documents from a template.
1689        Deletes one or more documents from an existing template.
1690        This method makes a synchronous HTTP request by default. To make an
1691        asynchronous HTTP request, please define a `callback` function
1692        to be invoked when receiving the response.
1693        >>> def callback_function(response):
1694        >>>     pprint(response)
1695        >>>
1696        >>> thread = api.delete_documents(account_id, template_id, callback=callback_function)
1697
1698        :param callback function: The callback function
1699            for asynchronous request. (optional)
1700        :param str account_id: The external account number (int) or account ID Guid. (required)
1701        :param str template_id: The ID of the template being accessed. (required)
1702        :param EnvelopeDefinition envelope_definition:
1703        :return: TemplateDocumentsResult
1704                 If the method is called asynchronously,
1705                 returns the request thread.
1706        """
1707        kwargs['_return_http_data_only'] = True
1708        if kwargs.get('callback'):
1709            return self.delete_documents_with_http_info(account_id, template_id, **kwargs)
1710        else:
1711            (data) = self.delete_documents_with_http_info(account_id, template_id, **kwargs)
1712            return data
1713
1714    def delete_documents_with_http_info(self, account_id, template_id, **kwargs):
1715        """
1716        Deletes documents from a template.
1717        Deletes one or more documents from an existing template.
1718        This method makes a synchronous HTTP request by default. To make an
1719        asynchronous HTTP request, please define a `callback` function
1720        to be invoked when receiving the response.
1721        >>> def callback_function(response):
1722        >>>     pprint(response)
1723        >>>
1724        >>> thread = api.delete_documents_with_http_info(account_id, template_id, callback=callback_function)
1725
1726        :param callback function: The callback function
1727            for asynchronous request. (optional)
1728        :param str account_id: The external account number (int) or account ID Guid. (required)
1729        :param str template_id: The ID of the template being accessed. (required)
1730        :param EnvelopeDefinition envelope_definition:
1731        :return: TemplateDocumentsResult
1732                 If the method is called asynchronously,
1733                 returns the request thread.
1734        """
1735
1736        all_params = ['account_id', 'template_id', 'envelope_definition']
1737        all_params.append('callback')
1738        all_params.append('_return_http_data_only')
1739        all_params.append('_preload_content')
1740        all_params.append('_request_timeout')
1741
1742        params = locals()
1743        for key, val in iteritems(params['kwargs']):
1744            if key not in all_params:
1745                raise TypeError(
1746                    "Got an unexpected keyword argument '%s'"
1747                    " to method delete_documents" % key
1748                )
1749            params[key] = val
1750        del params['kwargs']
1751        # verify the required parameter 'account_id' is set
1752        if ('account_id' not in params) or (params['account_id'] is None):
1753            raise ValueError("Missing the required parameter `account_id` when calling `delete_documents`")
1754        # verify the required parameter 'template_id' is set
1755        if ('template_id' not in params) or (params['template_id'] is None):
1756            raise ValueError("Missing the required parameter `template_id` when calling `delete_documents`")
1757
1758
1759        collection_formats = {}
1760
1761        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
1762        path_params = {}
1763        if 'account_id' in params:
1764            path_params['accountId'] = params['account_id']
1765        if 'template_id' in params:
1766            path_params['templateId'] = params['template_id']
1767
1768        query_params = {}
1769
1770        header_params = {}
1771
1772        form_params = []
1773        local_var_files = {}
1774
1775        body_params = None
1776        if 'envelope_definition' in params:
1777            body_params = params['envelope_definition']
1778        # HTTP header `Accept`
1779        header_params['Accept'] = self.api_client.\
1780            select_header_accept(['application/json'])
1781
1782        # Authentication setting
1783        auth_settings = []
1784
1785        return self.api_client.call_api(resource_path, 'DELETE',
1786                                        path_params,
1787                                        query_params,
1788                                        header_params,
1789                                        body=body_params,
1790                                        post_params=form_params,
1791                                        files=local_var_files,
1792                                        response_type='TemplateDocumentsResult',
1793                                        auth_settings=auth_settings,
1794                                        callback=params.get('callback'),
1795                                        _return_http_data_only=params.get('_return_http_data_only'),
1796                                        _preload_content=params.get('_preload_content', True),
1797                                        _request_timeout=params.get('_request_timeout'),
1798                                        collection_formats=collection_formats)
1799
1800    def delete_group_share(self, account_id, template_id, template_part, **kwargs):
1801        """
1802        Removes a member group's sharing permissions for a template.
1803        Removes a member group's sharing permissions for a specified template.
1804        This method makes a synchronous HTTP request by default. To make an
1805        asynchronous HTTP request, please define a `callback` function
1806        to be invoked when receiving the response.
1807        >>> def callback_function(response):
1808        >>>     pprint(response)
1809        >>>
1810        >>> thread = api.delete_group_share(account_id, template_id, template_part, callback=callback_function)
1811
1812        :param callback function: The callback function
1813            for asynchronous request. (optional)
1814        :param str account_id: The external account number (int) or account ID Guid. (required)
1815        :param str template_id: The ID of the template being accessed. (required)
1816        :param str template_part: Currently, the only defined part is **groups**. (required)
1817        :param GroupInformation group_information:
1818        :return: GroupInformation
1819                 If the method is called asynchronously,
1820                 returns the request thread.
1821        """
1822        kwargs['_return_http_data_only'] = True
1823        if kwargs.get('callback'):
1824            return self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
1825        else:
1826            (data) = self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
1827            return data
1828
1829    def delete_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
1830        """
1831        Removes a member group's sharing permissions for a template.
1832        Removes a member group's sharing permissions for a specified template.
1833        This method makes a synchronous HTTP request by default. To make an
1834        asynchronous HTTP request, please define a `callback` function
1835        to be invoked when receiving the response.
1836        >>> def callback_function(response):
1837        >>>     pprint(response)
1838        >>>
1839        >>> thread = api.delete_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
1840
1841        :param callback function: The callback function
1842            for asynchronous request. (optional)
1843        :param str account_id: The external account number (int) or account ID Guid. (required)
1844        :param str template_id: The ID of the template being accessed. (required)
1845        :param str template_part: Currently, the only defined part is **groups**. (required)
1846        :param GroupInformation group_information:
1847        :return: GroupInformation
1848                 If the method is called asynchronously,
1849                 returns the request thread.
1850        """
1851
1852        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
1853        all_params.append('callback')
1854        all_params.append('_return_http_data_only')
1855        all_params.append('_preload_content')
1856        all_params.append('_request_timeout')
1857
1858        params = locals()
1859        for key, val in iteritems(params['kwargs']):
1860            if key not in all_params:
1861                raise TypeError(
1862                    "Got an unexpected keyword argument '%s'"
1863                    " to method delete_group_share" % key
1864                )
1865            params[key] = val
1866        del params['kwargs']
1867        # verify the required parameter 'account_id' is set
1868        if ('account_id' not in params) or (params['account_id'] is None):
1869            raise ValueError("Missing the required parameter `account_id` when calling `delete_group_share`")
1870        # verify the required parameter 'template_id' is set
1871        if ('template_id' not in params) or (params['template_id'] is None):
1872            raise ValueError("Missing the required parameter `template_id` when calling `delete_group_share`")
1873        # verify the required parameter 'template_part' is set
1874        if ('template_part' not in params) or (params['template_part'] is None):
1875            raise ValueError("Missing the required parameter `template_part` when calling `delete_group_share`")
1876
1877
1878        collection_formats = {}
1879
1880        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
1881        path_params = {}
1882        if 'account_id' in params:
1883            path_params['accountId'] = params['account_id']
1884        if 'template_id' in params:
1885            path_params['templateId'] = params['template_id']
1886        if 'template_part' in params:
1887            path_params['templatePart'] = params['template_part']
1888
1889        query_params = {}
1890
1891        header_params = {}
1892
1893        form_params = []
1894        local_var_files = {}
1895
1896        body_params = None
1897        if 'group_information' in params:
1898            body_params = params['group_information']
1899        # HTTP header `Accept`
1900        header_params['Accept'] = self.api_client.\
1901            select_header_accept(['application/json'])
1902
1903        # Authentication setting
1904        auth_settings = []
1905
1906        return self.api_client.call_api(resource_path, 'DELETE',
1907                                        path_params,
1908                                        query_params,
1909                                        header_params,
1910                                        body=body_params,
1911                                        post_params=form_params,
1912                                        files=local_var_files,
1913                                        response_type='GroupInformation',
1914                                        auth_settings=auth_settings,
1915                                        callback=params.get('callback'),
1916                                        _return_http_data_only=params.get('_return_http_data_only'),
1917                                        _preload_content=params.get('_preload_content', True),
1918                                        _request_timeout=params.get('_request_timeout'),
1919                                        collection_formats=collection_formats)
1920
1921    def delete_lock(self, account_id, template_id, **kwargs):
1922        """
1923        Deletes a template lock.
1924        Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
1925        This method makes a synchronous HTTP request by default. To make an
1926        asynchronous HTTP request, please define a `callback` function
1927        to be invoked when receiving the response.
1928        >>> def callback_function(response):
1929        >>>     pprint(response)
1930        >>>
1931        >>> thread = api.delete_lock(account_id, template_id, callback=callback_function)
1932
1933        :param callback function: The callback function
1934            for asynchronous request. (optional)
1935        :param str account_id: The external account number (int) or account ID Guid. (required)
1936        :param str template_id: The ID of the template being accessed. (required)
1937        :param LockRequest lock_request:
1938        :return: LockInformation
1939                 If the method is called asynchronously,
1940                 returns the request thread.
1941        """
1942        kwargs['_return_http_data_only'] = True
1943        if kwargs.get('callback'):
1944            return self.delete_lock_with_http_info(account_id, template_id, **kwargs)
1945        else:
1946            (data) = self.delete_lock_with_http_info(account_id, template_id, **kwargs)
1947            return data
1948
1949    def delete_lock_with_http_info(self, account_id, template_id, **kwargs):
1950        """
1951        Deletes a template lock.
1952        Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
1953        This method makes a synchronous HTTP request by default. To make an
1954        asynchronous HTTP request, please define a `callback` function
1955        to be invoked when receiving the response.
1956        >>> def callback_function(response):
1957        >>>     pprint(response)
1958        >>>
1959        >>> thread = api.delete_lock_with_http_info(account_id, template_id, callback=callback_function)
1960
1961        :param callback function: The callback function
1962            for asynchronous request. (optional)
1963        :param str account_id: The external account number (int) or account ID Guid. (required)
1964        :param str template_id: The ID of the template being accessed. (required)
1965        :param LockRequest lock_request:
1966        :return: LockInformation
1967                 If the method is called asynchronously,
1968                 returns the request thread.
1969        """
1970
1971        all_params = ['account_id', 'template_id', 'lock_request']
1972        all_params.append('callback')
1973        all_params.append('_return_http_data_only')
1974        all_params.append('_preload_content')
1975        all_params.append('_request_timeout')
1976
1977        params = locals()
1978        for key, val in iteritems(params['kwargs']):
1979            if key not in all_params:
1980                raise TypeError(
1981                    "Got an unexpected keyword argument '%s'"
1982                    " to method delete_lock" % key
1983                )
1984            params[key] = val
1985        del params['kwargs']
1986        # verify the required parameter 'account_id' is set
1987        if ('account_id' not in params) or (params['account_id'] is None):
1988            raise ValueError("Missing the required parameter `account_id` when calling `delete_lock`")
1989        # verify the required parameter 'template_id' is set
1990        if ('template_id' not in params) or (params['template_id'] is None):
1991            raise ValueError("Missing the required parameter `template_id` when calling `delete_lock`")
1992
1993
1994        collection_formats = {}
1995
1996        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
1997        path_params = {}
1998        if 'account_id' in params:
1999            path_params['accountId'] = params['account_id']
2000        if 'template_id' in params:
2001            path_params['templateId'] = params['template_id']
2002
2003        query_params = {}
2004
2005        header_params = {}
2006
2007        form_params = []
2008        local_var_files = {}
2009
2010        body_params = None
2011        if 'lock_request' in params:
2012            body_params = params['lock_request']
2013        # HTTP header `Accept`
2014        header_params['Accept'] = self.api_client.\
2015            select_header_accept(['application/json'])
2016
2017        # Authentication setting
2018        auth_settings = []
2019
2020        return self.api_client.call_api(resource_path, 'DELETE',
2021                                        path_params,
2022                                        query_params,
2023                                        header_params,
2024                                        body=body_params,
2025                                        post_params=form_params,
2026                                        files=local_var_files,
2027                                        response_type='LockInformation',
2028                                        auth_settings=auth_settings,
2029                                        callback=params.get('callback'),
2030                                        _return_http_data_only=params.get('_return_http_data_only'),
2031                                        _preload_content=params.get('_preload_content', True),
2032                                        _request_timeout=params.get('_request_timeout'),
2033                                        collection_formats=collection_formats)
2034
2035    def delete_recipient(self, account_id, recipient_id, template_id, **kwargs):
2036        """
2037        Deletes the specified recipient file from a template.
2038        Deletes the specified recipient file from the specified template.
2039        This method makes a synchronous HTTP request by default. To make an
2040        asynchronous HTTP request, please define a `callback` function
2041        to be invoked when receiving the response.
2042        >>> def callback_function(response):
2043        >>>     pprint(response)
2044        >>>
2045        >>> thread = api.delete_recipient(account_id, recipient_id, template_id, callback=callback_function)
2046
2047        :param callback function: The callback function
2048            for asynchronous request. (optional)
2049        :param str account_id: The external account number (int) or account ID Guid. (required)
2050        :param str recipient_id: The ID of the recipient being accessed. (required)
2051        :param str template_id: The ID of the template being accessed. (required)
2052        :param TemplateRecipients template_recipients:
2053        :return: Recipients
2054                 If the method is called asynchronously,
2055                 returns the request thread.
2056        """
2057        kwargs['_return_http_data_only'] = True
2058        if kwargs.get('callback'):
2059            return self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs)
2060        else:
2061            (data) = self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs)
2062            return data
2063
2064    def delete_recipient_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
2065        """
2066        Deletes the specified recipient file from a template.
2067        Deletes the specified recipient file from the specified template.
2068        This method makes a synchronous HTTP request by default. To make an
2069        asynchronous HTTP request, please define a `callback` function
2070        to be invoked when receiving the response.
2071        >>> def callback_function(response):
2072        >>>     pprint(response)
2073        >>>
2074        >>> thread = api.delete_recipient_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
2075
2076        :param callback function: The callback function
2077            for asynchronous request. (optional)
2078        :param str account_id: The external account number (int) or account ID Guid. (required)
2079        :param str recipient_id: The ID of the recipient being accessed. (required)
2080        :param str template_id: The ID of the template being accessed. (required)
2081        :param TemplateRecipients template_recipients:
2082        :return: Recipients
2083                 If the method is called asynchronously,
2084                 returns the request thread.
2085        """
2086
2087        all_params = ['account_id', 'recipient_id', 'template_id', 'template_recipients']
2088        all_params.append('callback')
2089        all_params.append('_return_http_data_only')
2090        all_params.append('_preload_content')
2091        all_params.append('_request_timeout')
2092
2093        params = locals()
2094        for key, val in iteritems(params['kwargs']):
2095            if key not in all_params:
2096                raise TypeError(
2097                    "Got an unexpected keyword argument '%s'"
2098                    " to method delete_recipient" % key
2099                )
2100            params[key] = val
2101        del params['kwargs']
2102        # verify the required parameter 'account_id' is set
2103        if ('account_id' not in params) or (params['account_id'] is None):
2104            raise ValueError("Missing the required parameter `account_id` when calling `delete_recipient`")
2105        # verify the required parameter 'recipient_id' is set
2106        if ('recipient_id' not in params) or (params['recipient_id'] is None):
2107            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_recipient`")
2108        # verify the required parameter 'template_id' is set
2109        if ('template_id' not in params) or (params['template_id'] is None):
2110            raise ValueError("Missing the required parameter `template_id` when calling `delete_recipient`")
2111
2112
2113        collection_formats = {}
2114
2115        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}'.replace('{format}', 'json')
2116        path_params = {}
2117        if 'account_id' in params:
2118            path_params['accountId'] = params['account_id']
2119        if 'recipient_id' in params:
2120            path_params['recipientId'] = params['recipient_id']
2121        if 'template_id' in params:
2122            path_params['templateId'] = params['template_id']
2123
2124        query_params = {}
2125
2126        header_params = {}
2127
2128        form_params = []
2129        local_var_files = {}
2130
2131        body_params = None
2132        if 'template_recipients' in params:
2133            body_params = params['template_recipients']
2134        # HTTP header `Accept`
2135        header_params['Accept'] = self.api_client.\
2136            select_header_accept(['application/json'])
2137
2138        # Authentication setting
2139        auth_settings = []
2140
2141        return self.api_client.call_api(resource_path, 'DELETE',
2142                                        path_params,
2143                                        query_params,
2144                                        header_params,
2145                                        body=body_params,
2146                                        post_params=form_params,
2147                                        files=local_var_files,
2148                                        response_type='Recipients',
2149                                        auth_settings=auth_settings,
2150                                        callback=params.get('callback'),
2151                                        _return_http_data_only=params.get('_return_http_data_only'),
2152                                        _preload_content=params.get('_preload_content', True),
2153                                        _request_timeout=params.get('_request_timeout'),
2154                                        collection_formats=collection_formats)
2155
2156    def delete_recipients(self, account_id, template_id, **kwargs):
2157        """
2158        Deletes recipients from a template.
2159        Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
2160        This method makes a synchronous HTTP request by default. To make an
2161        asynchronous HTTP request, please define a `callback` function
2162        to be invoked when receiving the response.
2163        >>> def callback_function(response):
2164        >>>     pprint(response)
2165        >>>
2166        >>> thread = api.delete_recipients(account_id, template_id, callback=callback_function)
2167
2168        :param callback function: The callback function
2169            for asynchronous request. (optional)
2170        :param str account_id: The external account number (int) or account ID Guid. (required)
2171        :param str template_id: The ID of the template being accessed. (required)
2172        :param TemplateRecipients template_recipients:
2173        :return: Recipients
2174                 If the method is called asynchronously,
2175                 returns the request thread.
2176        """
2177        kwargs['_return_http_data_only'] = True
2178        if kwargs.get('callback'):
2179            return self.delete_recipients_with_http_info(account_id, template_id, **kwargs)
2180        else:
2181            (data) = self.delete_recipients_with_http_info(account_id, template_id, **kwargs)
2182            return data
2183
2184    def delete_recipients_with_http_info(self, account_id, template_id, **kwargs):
2185        """
2186        Deletes recipients from a template.
2187        Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
2188        This method makes a synchronous HTTP request by default. To make an
2189        asynchronous HTTP request, please define a `callback` function
2190        to be invoked when receiving the response.
2191        >>> def callback_function(response):
2192        >>>     pprint(response)
2193        >>>
2194        >>> thread = api.delete_recipients_with_http_info(account_id, template_id, callback=callback_function)
2195
2196        :param callback function: The callback function
2197            for asynchronous request. (optional)
2198        :param str account_id: The external account number (int) or account ID Guid. (required)
2199        :param str template_id: The ID of the template being accessed. (required)
2200        :param TemplateRecipients template_recipients:
2201        :return: Recipients
2202                 If the method is called asynchronously,
2203                 returns the request thread.
2204        """
2205
2206        all_params = ['account_id', 'template_id', 'template_recipients']
2207        all_params.append('callback')
2208        all_params.append('_return_http_data_only')
2209        all_params.append('_preload_content')
2210        all_params.append('_request_timeout')
2211
2212        params = locals()
2213        for key, val in iteritems(params['kwargs']):
2214            if key not in all_params:
2215                raise TypeError(
2216                    "Got an unexpected keyword argument '%s'"
2217                    " to method delete_recipients" % key
2218                )
2219            params[key] = val
2220        del params['kwargs']
2221        # verify the required parameter 'account_id' is set
2222        if ('account_id' not in params) or (params['account_id'] is None):
2223            raise ValueError("Missing the required parameter `account_id` when calling `delete_recipients`")
2224        # verify the required parameter 'template_id' is set
2225        if ('template_id' not in params) or (params['template_id'] is None):
2226            raise ValueError("Missing the required parameter `template_id` when calling `delete_recipients`")
2227
2228
2229        collection_formats = {}
2230
2231        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
2232        path_params = {}
2233        if 'account_id' in params:
2234            path_params['accountId'] = params['account_id']
2235        if 'template_id' in params:
2236            path_params['templateId'] = params['template_id']
2237
2238        query_params = {}
2239
2240        header_params = {}
2241
2242        form_params = []
2243        local_var_files = {}
2244
2245        body_params = None
2246        if 'template_recipients' in params:
2247            body_params = params['template_recipients']
2248        # HTTP header `Accept`
2249        header_params['Accept'] = self.api_client.\
2250            select_header_accept(['application/json'])
2251
2252        # Authentication setting
2253        auth_settings = []
2254
2255        return self.api_client.call_api(resource_path, 'DELETE',
2256                                        path_params,
2257                                        query_params,
2258                                        header_params,
2259                                        body=body_params,
2260                                        post_params=form_params,
2261                                        files=local_var_files,
2262                                        response_type='Recipients',
2263                                        auth_settings=auth_settings,
2264                                        callback=params.get('callback'),
2265                                        _return_http_data_only=params.get('_return_http_data_only'),
2266                                        _preload_content=params.get('_preload_content', True),
2267                                        _request_timeout=params.get('_request_timeout'),
2268                                        collection_formats=collection_formats)
2269
2270    def delete_tabs(self, account_id, recipient_id, template_id, **kwargs):
2271        """
2272        Deletes the tabs associated with a recipient in a template.
2273        Deletes one or more tabs associated with a recipient in a template.
2274        This method makes a synchronous HTTP request by default. To make an
2275        asynchronous HTTP request, please define a `callback` function
2276        to be invoked when receiving the response.
2277        >>> def callback_function(response):
2278        >>>     pprint(response)
2279        >>>
2280        >>> thread = api.delete_tabs(account_id, recipient_id, template_id, callback=callback_function)
2281
2282        :param callback function: The callback function
2283            for asynchronous request. (optional)
2284        :param str account_id: The external account number (int) or account ID Guid. (required)
2285        :param str recipient_id: The ID of the recipient being accessed. (required)
2286        :param str template_id: The ID of the template being accessed. (required)
2287        :param TemplateTabs template_tabs:
2288        :return: Tabs
2289                 If the method is called asynchronously,
2290                 returns the request thread.
2291        """
2292        kwargs['_return_http_data_only'] = True
2293        if kwargs.get('callback'):
2294            return self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
2295        else:
2296            (data) = self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
2297            return data
2298
2299    def delete_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
2300        """
2301        Deletes the tabs associated with a recipient in a template.
2302        Deletes one or more tabs associated with a recipient in a template.
2303        This method makes a synchronous HTTP request by default. To make an
2304        asynchronous HTTP request, please define a `callback` function
2305        to be invoked when receiving the response.
2306        >>> def callback_function(response):
2307        >>>     pprint(response)
2308        >>>
2309        >>> thread = api.delete_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
2310
2311        :param callback function: The callback function
2312            for asynchronous request. (optional)
2313        :param str account_id: The external account number (int) or account ID Guid. (required)
2314        :param str recipient_id: The ID of the recipient being accessed. (required)
2315        :param str template_id: The ID of the template being accessed. (required)
2316        :param TemplateTabs template_tabs:
2317        :return: Tabs
2318                 If the method is called asynchronously,
2319                 returns the request thread.
2320        """
2321
2322        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
2323        all_params.append('callback')
2324        all_params.append('_return_http_data_only')
2325        all_params.append('_preload_content')
2326        all_params.append('_request_timeout')
2327
2328        params = locals()
2329        for key, val in iteritems(params['kwargs']):
2330            if key not in all_params:
2331                raise TypeError(
2332                    "Got an unexpected keyword argument '%s'"
2333                    " to method delete_tabs" % key
2334                )
2335            params[key] = val
2336        del params['kwargs']
2337        # verify the required parameter 'account_id' is set
2338        if ('account_id' not in params) or (params['account_id'] is None):
2339            raise ValueError("Missing the required parameter `account_id` when calling `delete_tabs`")
2340        # verify the required parameter 'recipient_id' is set
2341        if ('recipient_id' not in params) or (params['recipient_id'] is None):
2342            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_tabs`")
2343        # verify the required parameter 'template_id' is set
2344        if ('template_id' not in params) or (params['template_id'] is None):
2345            raise ValueError("Missing the required parameter `template_id` when calling `delete_tabs`")
2346
2347
2348        collection_formats = {}
2349
2350        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
2351        path_params = {}
2352        if 'account_id' in params:
2353            path_params['accountId'] = params['account_id']
2354        if 'recipient_id' in params:
2355            path_params['recipientId'] = params['recipient_id']
2356        if 'template_id' in params:
2357            path_params['templateId'] = params['template_id']
2358
2359        query_params = {}
2360
2361        header_params = {}
2362
2363        form_params = []
2364        local_var_files = {}
2365
2366        body_params = None
2367        if 'template_tabs' in params:
2368            body_params = params['template_tabs']
2369        # HTTP header `Accept`
2370        header_params['Accept'] = self.api_client.\
2371            select_header_accept(['application/json'])
2372
2373        # Authentication setting
2374        auth_settings = []
2375
2376        return self.api_client.call_api(resource_path, 'DELETE',
2377                                        path_params,
2378                                        query_params,
2379                                        header_params,
2380                                        body=body_params,
2381                                        post_params=form_params,
2382                                        files=local_var_files,
2383                                        response_type='Tabs',
2384                                        auth_settings=auth_settings,
2385                                        callback=params.get('callback'),
2386                                        _return_http_data_only=params.get('_return_http_data_only'),
2387                                        _preload_content=params.get('_preload_content', True),
2388                                        _request_timeout=params.get('_request_timeout'),
2389                                        collection_formats=collection_formats)
2390
2391    def delete_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
2392        """
2393        Deletes tabs from an envelope document
2394        Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 
2395        This method makes a synchronous HTTP request by default. To make an
2396        asynchronous HTTP request, please define a `callback` function
2397        to be invoked when receiving the response.
2398        >>> def callback_function(response):
2399        >>>     pprint(response)
2400        >>>
2401        >>> thread = api.delete_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
2402
2403        :param callback function: The callback function
2404            for asynchronous request. (optional)
2405        :param str account_id: The external account number (int) or account ID Guid. (required)
2406        :param str document_id: The ID of the document being accessed. (required)
2407        :param str template_id: The ID of the template being accessed. (required)
2408        :param TemplateTabs template_tabs:
2409        :return: Tabs
2410                 If the method is called asynchronously,
2411                 returns the request thread.
2412        """
2413        kwargs['_return_http_data_only'] = True
2414        if kwargs.get('callback'):
2415            return self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2416        else:
2417            (data) = self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2418            return data
2419
2420    def delete_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
2421        """
2422        Deletes tabs from an envelope document
2423        Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 
2424        This method makes a synchronous HTTP request by default. To make an
2425        asynchronous HTTP request, please define a `callback` function
2426        to be invoked when receiving the response.
2427        >>> def callback_function(response):
2428        >>>     pprint(response)
2429        >>>
2430        >>> thread = api.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
2431
2432        :param callback function: The callback function
2433            for asynchronous request. (optional)
2434        :param str account_id: The external account number (int) or account ID Guid. (required)
2435        :param str document_id: The ID of the document being accessed. (required)
2436        :param str template_id: The ID of the template being accessed. (required)
2437        :param TemplateTabs template_tabs:
2438        :return: Tabs
2439                 If the method is called asynchronously,
2440                 returns the request thread.
2441        """
2442
2443        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
2444        all_params.append('callback')
2445        all_params.append('_return_http_data_only')
2446        all_params.append('_preload_content')
2447        all_params.append('_request_timeout')
2448
2449        params = locals()
2450        for key, val in iteritems(params['kwargs']):
2451            if key not in all_params:
2452                raise TypeError(
2453                    "Got an unexpected keyword argument '%s'"
2454                    " to method delete_template_document_tabs" % key
2455                )
2456            params[key] = val
2457        del params['kwargs']
2458        # verify the required parameter 'account_id' is set
2459        if ('account_id' not in params) or (params['account_id'] is None):
2460            raise ValueError("Missing the required parameter `account_id` when calling `delete_template_document_tabs`")
2461        # verify the required parameter 'document_id' is set
2462        if ('document_id' not in params) or (params['document_id'] is None):
2463            raise ValueError("Missing the required parameter `document_id` when calling `delete_template_document_tabs`")
2464        # verify the required parameter 'template_id' is set
2465        if ('template_id' not in params) or (params['template_id'] is None):
2466            raise ValueError("Missing the required parameter `template_id` when calling `delete_template_document_tabs`")
2467
2468
2469        collection_formats = {}
2470
2471        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
2472        path_params = {}
2473        if 'account_id' in params:
2474            path_params['accountId'] = params['account_id']
2475        if 'document_id' in params:
2476            path_params['documentId'] = params['document_id']
2477        if 'template_id' in params:
2478            path_params['templateId'] = params['template_id']
2479
2480        query_params = {}
2481
2482        header_params = {}
2483
2484        form_params = []
2485        local_var_files = {}
2486
2487        body_params = None
2488        if 'template_tabs' in params:
2489            body_params = params['template_tabs']
2490        # HTTP header `Accept`
2491        header_params['Accept'] = self.api_client.\
2492            select_header_accept(['application/json'])
2493
2494        # Authentication setting
2495        auth_settings = []
2496
2497        return self.api_client.call_api(resource_path, 'DELETE',
2498                                        path_params,
2499                                        query_params,
2500                                        header_params,
2501                                        body=body_params,
2502                                        post_params=form_params,
2503                                        files=local_var_files,
2504                                        response_type='Tabs',
2505                                        auth_settings=auth_settings,
2506                                        callback=params.get('callback'),
2507                                        _return_http_data_only=params.get('_return_http_data_only'),
2508                                        _preload_content=params.get('_preload_content', True),
2509                                        _request_timeout=params.get('_request_timeout'),
2510                                        collection_formats=collection_formats)
2511
2512    def get(self, account_id, template_id, **kwargs):
2513        """
2514        Gets a list of templates for a specified account.
2515        Retrieves the definition of the specified template.
2516        This method makes a synchronous HTTP request by default. To make an
2517        asynchronous HTTP request, please define a `callback` function
2518        to be invoked when receiving the response.
2519        >>> def callback_function(response):
2520        >>>     pprint(response)
2521        >>>
2522        >>> thread = api.get(account_id, template_id, callback=callback_function)
2523
2524        :param callback function: The callback function
2525            for asynchronous request. (optional)
2526        :param str account_id: The external account number (int) or account ID Guid. (required)
2527        :param str template_id: The ID of the template being accessed. (required)
2528        :param str include:
2529        :return: EnvelopeTemplate
2530                 If the method is called asynchronously,
2531                 returns the request thread.
2532        """
2533        kwargs['_return_http_data_only'] = True
2534        if kwargs.get('callback'):
2535            return self.get_with_http_info(account_id, template_id, **kwargs)
2536        else:
2537            (data) = self.get_with_http_info(account_id, template_id, **kwargs)
2538            return data
2539
2540    def get_with_http_info(self, account_id, template_id, **kwargs):
2541        """
2542        Gets a list of templates for a specified account.
2543        Retrieves the definition of the specified template.
2544        This method makes a synchronous HTTP request by default. To make an
2545        asynchronous HTTP request, please define a `callback` function
2546        to be invoked when receiving the response.
2547        >>> def callback_function(response):
2548        >>>     pprint(response)
2549        >>>
2550        >>> thread = api.get_with_http_info(account_id, template_id, callback=callback_function)
2551
2552        :param callback function: The callback function
2553            for asynchronous request. (optional)
2554        :param str account_id: The external account number (int) or account ID Guid. (required)
2555        :param str template_id: The ID of the template being accessed. (required)
2556        :param str include:
2557        :return: EnvelopeTemplate
2558                 If the method is called asynchronously,
2559                 returns the request thread.
2560        """
2561
2562        all_params = ['account_id', 'template_id', 'include']
2563        all_params.append('callback')
2564        all_params.append('_return_http_data_only')
2565        all_params.append('_preload_content')
2566        all_params.append('_request_timeout')
2567
2568        params = locals()
2569        for key, val in iteritems(params['kwargs']):
2570            if key not in all_params:
2571                raise TypeError(
2572                    "Got an unexpected keyword argument '%s'"
2573                    " to method get" % key
2574                )
2575            params[key] = val
2576        del params['kwargs']
2577        # verify the required parameter 'account_id' is set
2578        if ('account_id' not in params) or (params['account_id'] is None):
2579            raise ValueError("Missing the required parameter `account_id` when calling `get`")
2580        # verify the required parameter 'template_id' is set
2581        if ('template_id' not in params) or (params['template_id'] is None):
2582            raise ValueError("Missing the required parameter `template_id` when calling `get`")
2583
2584
2585        collection_formats = {}
2586
2587        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
2588        path_params = {}
2589        if 'account_id' in params:
2590            path_params['accountId'] = params['account_id']
2591        if 'template_id' in params:
2592            path_params['templateId'] = params['template_id']
2593
2594        query_params = {}
2595        if 'include' in params:
2596            query_params['include'] = params['include']
2597
2598        header_params = {}
2599
2600        form_params = []
2601        local_var_files = {}
2602
2603        body_params = None
2604        # HTTP header `Accept`
2605        header_params['Accept'] = self.api_client.\
2606            select_header_accept(['application/json'])
2607
2608        # Authentication setting
2609        auth_settings = []
2610
2611        return self.api_client.call_api(resource_path, 'GET',
2612                                        path_params,
2613                                        query_params,
2614                                        header_params,
2615                                        body=body_params,
2616                                        post_params=form_params,
2617                                        files=local_var_files,
2618                                        response_type='EnvelopeTemplate',
2619                                        auth_settings=auth_settings,
2620                                        callback=params.get('callback'),
2621                                        _return_http_data_only=params.get('_return_http_data_only'),
2622                                        _preload_content=params.get('_preload_content', True),
2623                                        _request_timeout=params.get('_request_timeout'),
2624                                        collection_formats=collection_formats)
2625
2626    def get_document(self, account_id, document_id, template_id, **kwargs):
2627        """
2628        Gets PDF documents from a template.
2629        Retrieves one or more PDF documents from the specified template.  You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
2630        This method makes a synchronous HTTP request by default. To make an
2631        asynchronous HTTP request, please define a `callback` function
2632        to be invoked when receiving the response.
2633        >>> def callback_function(response):
2634        >>>     pprint(response)
2635        >>>
2636        >>> thread = api.get_document(account_id, document_id, template_id, callback=callback_function)
2637
2638        :param callback function: The callback function
2639            for asynchronous request. (optional)
2640        :param str account_id: The external account number (int) or account ID Guid. (required)
2641        :param str document_id: The ID of the document being accessed. (required)
2642        :param str template_id: The ID of the template being accessed. (required)
2643        :param str encrypt:
2644        :param str file_type:
2645        :param str show_changes:
2646        :return: file
2647                 If the method is called asynchronously,
2648                 returns the request thread.
2649        """
2650        kwargs['_return_http_data_only'] = True
2651        if kwargs.get('callback'):
2652            return self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2653        else:
2654            (data) = self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2655            return data
2656
2657    def get_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
2658        """
2659        Gets PDF documents from a template.
2660        Retrieves one or more PDF documents from the specified template.  You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
2661        This method makes a synchronous HTTP request by default. To make an
2662        asynchronous HTTP request, please define a `callback` function
2663        to be invoked when receiving the response.
2664        >>> def callback_function(response):
2665        >>>     pprint(response)
2666        >>>
2667        >>> thread = api.get_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
2668
2669        :param callback function: The callback function
2670            for asynchronous request. (optional)
2671        :param str account_id: The external account number (int) or account ID Guid. (required)
2672        :param str document_id: The ID of the document being accessed. (required)
2673        :param str template_id: The ID of the template being accessed. (required)
2674        :param str encrypt:
2675        :param str file_type:
2676        :param str show_changes:
2677        :return: file
2678                 If the method is called asynchronously,
2679                 returns the request thread.
2680        """
2681
2682        all_params = ['account_id', 'document_id', 'template_id', 'encrypt', 'file_type', 'show_changes']
2683        all_params.append('callback')
2684        all_params.append('_return_http_data_only')
2685        all_params.append('_preload_content')
2686        all_params.append('_request_timeout')
2687
2688        params = locals()
2689        for key, val in iteritems(params['kwargs']):
2690            if key not in all_params:
2691                raise TypeError(
2692                    "Got an unexpected keyword argument '%s'"
2693                    " to method get_document" % key
2694                )
2695            params[key] = val
2696        del params['kwargs']
2697        # verify the required parameter 'account_id' is set
2698        if ('account_id' not in params) or (params['account_id'] is None):
2699            raise ValueError("Missing the required parameter `account_id` when calling `get_document`")
2700        # verify the required parameter 'document_id' is set
2701        if ('document_id' not in params) or (params['document_id'] is None):
2702            raise ValueError("Missing the required parameter `document_id` when calling `get_document`")
2703        # verify the required parameter 'template_id' is set
2704        if ('template_id' not in params) or (params['template_id'] is None):
2705            raise ValueError("Missing the required parameter `template_id` when calling `get_document`")
2706
2707
2708        collection_formats = {}
2709
2710        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
2711        path_params = {}
2712        if 'account_id' in params:
2713            path_params['accountId'] = params['account_id']
2714        if 'document_id' in params:
2715            path_params['documentId'] = params['document_id']
2716        if 'template_id' in params:
2717            path_params['templateId'] = params['template_id']
2718
2719        query_params = {}
2720        if 'encrypt' in params:
2721            query_params['encrypt'] = params['encrypt']
2722        if 'file_type' in params:
2723            query_params['file_type'] = params['file_type']
2724        if 'show_changes' in params:
2725            query_params['show_changes'] = params['show_changes']
2726
2727        header_params = {}
2728
2729        form_params = []
2730        local_var_files = {}
2731
2732        body_params = None
2733        # HTTP header `Accept`
2734        header_params['Accept'] = self.api_client.\
2735            select_header_accept(['application/pdf'])
2736
2737        # Authentication setting
2738        auth_settings = []
2739
2740        return self.api_client.call_api(resource_path, 'GET',
2741                                        path_params,
2742                                        query_params,
2743                                        header_params,
2744                                        body=body_params,
2745                                        post_params=form_params,
2746                                        files=local_var_files,
2747                                        response_type='file',
2748                                        auth_settings=auth_settings,
2749                                        callback=params.get('callback'),
2750                                        _return_http_data_only=params.get('_return_http_data_only'),
2751                                        _preload_content=params.get('_preload_content', True),
2752                                        _request_timeout=params.get('_request_timeout'),
2753                                        collection_formats=collection_formats)
2754
2755    def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs):
2756        """
2757        Gets a page image from a template for display.
2758        Retrieves a page image for display from the specified template.
2759        This method makes a synchronous HTTP request by default. To make an
2760        asynchronous HTTP request, please define a `callback` function
2761        to be invoked when receiving the response.
2762        >>> def callback_function(response):
2763        >>>     pprint(response)
2764        >>>
2765        >>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function)
2766
2767        :param callback function: The callback function
2768            for asynchronous request. (optional)
2769        :param str account_id: The external account number (int) or account ID Guid. (required)
2770        :param str document_id: The ID of the document being accessed. (required)
2771        :param str page_number: The page number being accessed. (required)
2772        :param str template_id: The ID of the template being accessed. (required)
2773        :param str dpi:
2774        :param str max_height:
2775        :param str max_width:
2776        :param str show_changes:
2777        :return: file
2778                 If the method is called asynchronously,
2779                 returns the request thread.
2780        """
2781        kwargs['_return_http_data_only'] = True
2782        if kwargs.get('callback'):
2783            return self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2784        else:
2785            (data) = self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2786            return data
2787
2788    def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
2789        """
2790        Gets a page image from a template for display.
2791        Retrieves a page image for display from the specified template.
2792        This method makes a synchronous HTTP request by default. To make an
2793        asynchronous HTTP request, please define a `callback` function
2794        to be invoked when receiving the response.
2795        >>> def callback_function(response):
2796        >>>     pprint(response)
2797        >>>
2798        >>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
2799
2800        :param callback function: The callback function
2801            for asynchronous request. (optional)
2802        :param str account_id: The external account number (int) or account ID Guid. (required)
2803        :param str document_id: The ID of the document being accessed. (required)
2804        :param str page_number: The page number being accessed. (required)
2805        :param str template_id: The ID of the template being accessed. (required)
2806        :param str dpi:
2807        :param str max_height:
2808        :param str max_width:
2809        :param str show_changes:
2810        :return: file
2811                 If the method is called asynchronously,
2812                 returns the request thread.
2813        """
2814
2815        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'dpi', 'max_height', 'max_width', 'show_changes']
2816        all_params.append('callback')
2817        all_params.append('_return_http_data_only')
2818        all_params.append('_preload_content')
2819        all_params.append('_request_timeout')
2820
2821        params = locals()
2822        for key, val in iteritems(params['kwargs']):
2823            if key not in all_params:
2824                raise TypeError(
2825                    "Got an unexpected keyword argument '%s'"
2826                    " to method get_document_page_image" % key
2827                )
2828            params[key] = val
2829        del params['kwargs']
2830        # verify the required parameter 'account_id' is set
2831        if ('account_id' not in params) or (params['account_id'] is None):
2832            raise ValueError("Missing the required parameter `account_id` when calling `get_document_page_image`")
2833        # verify the required parameter 'document_id' is set
2834        if ('document_id' not in params) or (params['document_id'] is None):
2835            raise ValueError("Missing the required parameter `document_id` when calling `get_document_page_image`")
2836        # verify the required parameter 'page_number' is set
2837        if ('page_number' not in params) or (params['page_number'] is None):
2838            raise ValueError("Missing the required parameter `page_number` when calling `get_document_page_image`")
2839        # verify the required parameter 'template_id' is set
2840        if ('template_id' not in params) or (params['template_id'] is None):
2841            raise ValueError("Missing the required parameter `template_id` when calling `get_document_page_image`")
2842
2843
2844        collection_formats = {}
2845
2846        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
2847        path_params = {}
2848        if 'account_id' in params:
2849            path_params['accountId'] = params['account_id']
2850        if 'document_id' in params:
2851            path_params['documentId'] = params['document_id']
2852        if 'page_number' in params:
2853            path_params['pageNumber'] = params['page_number']
2854        if 'template_id' in params:
2855            path_params['templateId'] = params['template_id']
2856
2857        query_params = {}
2858        if 'dpi' in params:
2859            query_params['dpi'] = params['dpi']
2860        if 'max_height' in params:
2861            query_params['max_height'] = params['max_height']
2862        if 'max_width' in params:
2863            query_params['max_width'] = params['max_width']
2864        if 'show_changes' in params:
2865            query_params['show_changes'] = params['show_changes']
2866
2867        header_params = {}
2868
2869        form_params = []
2870        local_var_files = {}
2871
2872        body_params = None
2873        # HTTP header `Accept`
2874        header_params['Accept'] = self.api_client.\
2875            select_header_accept(['image/png'])
2876
2877        # Authentication setting
2878        auth_settings = []
2879
2880        return self.api_client.call_api(resource_path, 'GET',
2881                                        path_params,
2882                                        query_params,
2883                                        header_params,
2884                                        body=body_params,
2885                                        post_params=form_params,
2886                                        files=local_var_files,
2887                                        response_type='file',
2888                                        auth_settings=auth_settings,
2889                                        callback=params.get('callback'),
2890                                        _return_http_data_only=params.get('_return_http_data_only'),
2891                                        _preload_content=params.get('_preload_content', True),
2892                                        _request_timeout=params.get('_request_timeout'),
2893                                        collection_formats=collection_formats)
2894
2895    def get_document_tabs(self, account_id, document_id, template_id, **kwargs):
2896        """
2897        Returns tabs on the document.
2898        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
2899        This method makes a synchronous HTTP request by default. To make an
2900        asynchronous HTTP request, please define a `callback` function
2901        to be invoked when receiving the response.
2902        >>> def callback_function(response):
2903        >>>     pprint(response)
2904        >>>
2905        >>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function)
2906
2907        :param callback function: The callback function
2908            for asynchronous request. (optional)
2909        :param str account_id: The external account number (int) or account ID Guid. (required)
2910        :param str document_id: The ID of the document being accessed. (required)
2911        :param str template_id: The ID of the template being accessed. (required)
2912        :param str page_numbers:
2913        :return: Tabs
2914                 If the method is called asynchronously,
2915                 returns the request thread.
2916        """
2917        kwargs['_return_http_data_only'] = True
2918        if kwargs.get('callback'):
2919            return self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2920        else:
2921            (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2922            return data
2923
2924    def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
2925        """
2926        Returns tabs on the document.
2927        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
2928        This method makes a synchronous HTTP request by default. To make an
2929        asynchronous HTTP request, please define a `callback` function
2930        to be invoked when receiving the response.
2931        >>> def callback_function(response):
2932        >>>     pprint(response)
2933        >>>
2934        >>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
2935
2936        :param callback function: The callback function
2937            for asynchronous request. (optional)
2938        :param str account_id: The external account number (int) or account ID Guid. (required)
2939        :param str document_id: The ID of the document being accessed. (required)
2940        :param str template_id: The ID of the template being accessed. (required)
2941        :param str page_numbers:
2942        :return: Tabs
2943                 If the method is called asynchronously,
2944                 returns the request thread.
2945        """
2946
2947        all_params = ['account_id', 'document_id', 'template_id', 'page_numbers']
2948        all_params.append('callback')
2949        all_params.append('_return_http_data_only')
2950        all_params.append('_preload_content')
2951        all_params.append('_request_timeout')
2952
2953        params = locals()
2954        for key, val in iteritems(params['kwargs']):
2955            if key not in all_params:
2956                raise TypeError(
2957                    "Got an unexpected keyword argument '%s'"
2958                    " to method get_document_tabs" % key
2959                )
2960            params[key] = val
2961        del params['kwargs']
2962        # verify the required parameter 'account_id' is set
2963        if ('account_id' not in params) or (params['account_id'] is None):
2964            raise ValueError("Missing the required parameter `account_id` when calling `get_document_tabs`")
2965        # verify the required parameter 'document_id' is set
2966        if ('document_id' not in params) or (params['document_id'] is None):
2967            raise ValueError("Missing the required parameter `document_id` when calling `get_document_tabs`")
2968        # verify the required parameter 'template_id' is set
2969        if ('template_id' not in params) or (params['template_id'] is None):
2970            raise ValueError("Missing the required parameter `template_id` when calling `get_document_tabs`")
2971
2972
2973        collection_formats = {}
2974
2975        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
2976        path_params = {}
2977        if 'account_id' in params:
2978            path_params['accountId'] = params['account_id']
2979        if 'document_id' in params:
2980            path_params['documentId'] = params['document_id']
2981        if 'template_id' in params:
2982            path_params['templateId'] = params['template_id']
2983
2984        query_params = {}
2985        if 'page_numbers' in params:
2986            query_params['page_numbers'] = params['page_numbers']
2987
2988        header_params = {}
2989
2990        form_params = []
2991        local_var_files = {}
2992
2993        body_params = None
2994        # HTTP header `Accept`
2995        header_params['Accept'] = self.api_client.\
2996            select_header_accept(['application/json'])
2997
2998        # Authentication setting
2999        auth_settings = []
3000
3001        return self.api_client.call_api(resource_path, 'GET',
3002                                        path_params,
3003                                        query_params,
3004                                        header_params,
3005                                        body=body_params,
3006                                        post_params=form_params,
3007                                        files=local_var_files,
3008                                        response_type='Tabs',
3009                                        auth_settings=auth_settings,
3010                                        callback=params.get('callback'),
3011                                        _return_http_data_only=params.get('_return_http_data_only'),
3012                                        _preload_content=params.get('_preload_content', True),
3013                                        _request_timeout=params.get('_request_timeout'),
3014                                        collection_formats=collection_formats)
3015
3016    def get_lock(self, account_id, template_id, **kwargs):
3017        """
3018        Gets template lock information.
3019        Retrieves general information about the template lock.  If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header  field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header.
3020        This method makes a synchronous HTTP request by default. To make an
3021        asynchronous HTTP request, please define a `callback` function
3022        to be invoked when receiving the response.
3023        >>> def callback_function(response):
3024        >>>     pprint(response)
3025        >>>
3026        >>> thread = api.get_lock(account_id, template_id, callback=callback_function)
3027
3028        :param callback function: The callback function
3029            for asynchronous request. (optional)
3030        :param str account_id: The external account number (int) or account ID Guid. (required)
3031        :param str template_id: The ID of the template being accessed. (required)
3032        :return: LockInformation
3033                 If the method is called asynchronously,
3034                 returns the request thread.
3035        """
3036        kwargs['_return_http_data_only'] = True
3037        if kwargs.get('callback'):
3038            return self.get_lock_with_http_info(account_id, template_id, **kwargs)
3039        else:
3040            (data) = self.get_lock_with_http_info(account_id, template_id, **kwargs)
3041            return data
3042
3043    def get_lock_with_http_info(self, account_id, template_id, **kwargs):
3044        """
3045        Gets template lock information.
3046        Retrieves general information about the template lock.  If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header  field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header.
3047        This method makes a synchronous HTTP request by default. To make an
3048        asynchronous HTTP request, please define a `callback` function
3049        to be invoked when receiving the response.
3050        >>> def callback_function(response):
3051        >>>     pprint(response)
3052        >>>
3053        >>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function)
3054
3055        :param callback function: The callback function
3056            for asynchronous request. (optional)
3057        :param str account_id: The external account number (int) or account ID Guid. (required)
3058        :param str template_id: The ID of the template being accessed. (required)
3059        :return: LockInformation
3060                 If the method is called asynchronously,
3061                 returns the request thread.
3062        """
3063
3064        all_params = ['account_id', 'template_id']
3065        all_params.append('callback')
3066        all_params.append('_return_http_data_only')
3067        all_params.append('_preload_content')
3068        all_params.append('_request_timeout')
3069
3070        params = locals()
3071        for key, val in iteritems(params['kwargs']):
3072            if key not in all_params:
3073                raise TypeError(
3074                    "Got an unexpected keyword argument '%s'"
3075                    " to method get_lock" % key
3076                )
3077            params[key] = val
3078        del params['kwargs']
3079        # verify the required parameter 'account_id' is set
3080        if ('account_id' not in params) or (params['account_id'] is None):
3081            raise ValueError("Missing the required parameter `account_id` when calling `get_lock`")
3082        # verify the required parameter 'template_id' is set
3083        if ('template_id' not in params) or (params['template_id'] is None):
3084            raise ValueError("Missing the required parameter `template_id` when calling `get_lock`")
3085
3086
3087        collection_formats = {}
3088
3089        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
3090        path_params = {}
3091        if 'account_id' in params:
3092            path_params['accountId'] = params['account_id']
3093        if 'template_id' in params:
3094            path_params['templateId'] = params['template_id']
3095
3096        query_params = {}
3097
3098        header_params = {}
3099
3100        form_params = []
3101        local_var_files = {}
3102
3103        body_params = None
3104        # HTTP header `Accept`
3105        header_params['Accept'] = self.api_client.\
3106            select_header_accept(['application/json'])
3107
3108        # Authentication setting
3109        auth_settings = []
3110
3111        return self.api_client.call_api(resource_path, 'GET',
3112                                        path_params,
3113                                        query_params,
3114                                        header_params,
3115                                        body=body_params,
3116                                        post_params=form_params,
3117                                        files=local_var_files,
3118                                        response_type='LockInformation',
3119                                        auth_settings=auth_settings,
3120                                        callback=params.get('callback'),
3121                                        _return_http_data_only=params.get('_return_http_data_only'),
3122                                        _preload_content=params.get('_preload_content', True),
3123                                        _request_timeout=params.get('_request_timeout'),
3124                                        collection_formats=collection_formats)
3125
3126    def get_notification_settings(self, account_id, template_id, **kwargs):
3127        """
3128        Gets template notification information.
3129        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3130        This method makes a synchronous HTTP request by default. To make an
3131        asynchronous HTTP request, please define a `callback` function
3132        to be invoked when receiving the response.
3133        >>> def callback_function(response):
3134        >>>     pprint(response)
3135        >>>
3136        >>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function)
3137
3138        :param callback function: The callback function
3139            for asynchronous request. (optional)
3140        :param str account_id: The external account number (int) or account ID Guid. (required)
3141        :param str template_id: The ID of the template being accessed. (required)
3142        :return: Notification
3143                 If the method is called asynchronously,
3144                 returns the request thread.
3145        """
3146        kwargs['_return_http_data_only'] = True
3147        if kwargs.get('callback'):
3148            return self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3149        else:
3150            (data) = self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3151            return data
3152
3153    def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
3154        """
3155        Gets template notification information.
3156        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3157        This method makes a synchronous HTTP request by default. To make an
3158        asynchronous HTTP request, please define a `callback` function
3159        to be invoked when receiving the response.
3160        >>> def callback_function(response):
3161        >>>     pprint(response)
3162        >>>
3163        >>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
3164
3165        :param callback function: The callback function
3166            for asynchronous request. (optional)
3167        :param str account_id: The external account number (int) or account ID Guid. (required)
3168        :param str template_id: The ID of the template being accessed. (required)
3169        :return: Notification
3170                 If the method is called asynchronously,
3171                 returns the request thread.
3172        """
3173
3174        all_params = ['account_id', 'template_id']
3175        all_params.append('callback')
3176        all_params.append('_return_http_data_only')
3177        all_params.append('_preload_content')
3178        all_params.append('_request_timeout')
3179
3180        params = locals()
3181        for key, val in iteritems(params['kwargs']):
3182            if key not in all_params:
3183                raise TypeError(
3184                    "Got an unexpected keyword argument '%s'"
3185                    " to method get_notification_settings" % key
3186                )
3187            params[key] = val
3188        del params['kwargs']
3189        # verify the required parameter 'account_id' is set
3190        if ('account_id' not in params) or (params['account_id'] is None):
3191            raise ValueError("Missing the required parameter `account_id` when calling `get_notification_settings`")
3192        # verify the required parameter 'template_id' is set
3193        if ('template_id' not in params) or (params['template_id'] is None):
3194            raise ValueError("Missing the required parameter `template_id` when calling `get_notification_settings`")
3195
3196
3197        collection_formats = {}
3198
3199        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
3200        path_params = {}
3201        if 'account_id' in params:
3202            path_params['accountId'] = params['account_id']
3203        if 'template_id' in params:
3204            path_params['templateId'] = params['template_id']
3205
3206        query_params = {}
3207
3208        header_params = {}
3209
3210        form_params = []
3211        local_var_files = {}
3212
3213        body_params = None
3214        # HTTP header `Accept`
3215        header_params['Accept'] = self.api_client.\
3216            select_header_accept(['application/json'])
3217
3218        # Authentication setting
3219        auth_settings = []
3220
3221        return self.api_client.call_api(resource_path, 'GET',
3222                                        path_params,
3223                                        query_params,
3224                                        header_params,
3225                                        body=body_params,
3226                                        post_params=form_params,
3227                                        files=local_var_files,
3228                                        response_type='Notification',
3229                                        auth_settings=auth_settings,
3230                                        callback=params.get('callback'),
3231                                        _return_http_data_only=params.get('_return_http_data_only'),
3232                                        _preload_content=params.get('_preload_content', True),
3233                                        _request_timeout=params.get('_request_timeout'),
3234                                        collection_formats=collection_formats)
3235
3236    def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs):
3237        """
3238        Returns tabs on the specified page.
3239        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3240        This method makes a synchronous HTTP request by default. To make an
3241        asynchronous HTTP request, please define a `callback` function
3242        to be invoked when receiving the response.
3243        >>> def callback_function(response):
3244        >>>     pprint(response)
3245        >>>
3246        >>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function)
3247
3248        :param callback function: The callback function
3249            for asynchronous request. (optional)
3250        :param str account_id: The external account number (int) or account ID Guid. (required)
3251        :param str document_id: The ID of the document being accessed. (required)
3252        :param str page_number: The page number being accessed. (required)
3253        :param str template_id: The ID of the template being accessed. (required)
3254        :return: Tabs
3255                 If the method is called asynchronously,
3256                 returns the request thread.
3257        """
3258        kwargs['_return_http_data_only'] = True
3259        if kwargs.get('callback'):
3260            return self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3261        else:
3262            (data) = self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3263            return data
3264
3265    def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
3266        """
3267        Returns tabs on the specified page.
3268        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3269        This method makes a synchronous HTTP request by default. To make an
3270        asynchronous HTTP request, please define a `callback` function
3271        to be invoked when receiving the response.
3272        >>> def callback_function(response):
3273        >>>     pprint(response)
3274        >>>
3275        >>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
3276
3277        :param callback function: The callback function
3278            for asynchronous request. (optional)
3279        :param str account_id: The external account number (int) or account ID Guid. (required)
3280        :param str document_id: The ID of the document being accessed. (required)
3281        :param str page_number: The page number being accessed. (required)
3282        :param str template_id: The ID of the template being accessed. (required)
3283        :return: Tabs
3284                 If the method is called asynchronously,
3285                 returns the request thread.
3286        """
3287
3288        all_params = ['account_id', 'document_id', 'page_number', 'template_id']
3289        all_params.append('callback')
3290        all_params.append('_return_http_data_only')
3291        all_params.append('_preload_content')
3292        all_params.append('_request_timeout')
3293
3294        params = locals()
3295        for key, val in iteritems(params['kwargs']):
3296            if key not in all_params:
3297                raise TypeError(
3298                    "Got an unexpected keyword argument '%s'"
3299                    " to method get_page_tabs" % key
3300                )
3301            params[key] = val
3302        del params['kwargs']
3303        # verify the required parameter 'account_id' is set
3304        if ('account_id' not in params) or (params['account_id'] is None):
3305            raise ValueError("Missing the required parameter `account_id` when calling `get_page_tabs`")
3306        # verify the required parameter 'document_id' is set
3307        if ('document_id' not in params) or (params['document_id'] is None):
3308            raise ValueError("Missing the required parameter `document_id` when calling `get_page_tabs`")
3309        # verify the required parameter 'page_number' is set
3310        if ('page_number' not in params) or (params['page_number'] is None):
3311            raise ValueError("Missing the required parameter `page_number` when calling `get_page_tabs`")
3312        # verify the required parameter 'template_id' is set
3313        if ('template_id' not in params) or (params['template_id'] is None):
3314            raise ValueError("Missing the required parameter `template_id` when calling `get_page_tabs`")
3315
3316
3317        collection_formats = {}
3318
3319        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs'.replace('{format}', 'json')
3320        path_params = {}
3321        if 'account_id' in params:
3322            path_params['accountId'] = params['account_id']
3323        if 'document_id' in params:
3324            path_params['documentId'] = params['document_id']
3325        if 'page_number' in params:
3326            path_params['pageNumber'] = params['page_number']
3327        if 'template_id' in params:
3328            path_params['templateId'] = params['template_id']
3329
3330        query_params = {}
3331
3332        header_params = {}
3333
3334        form_params = []
3335        local_var_files = {}
3336
3337        body_params = None
3338        # HTTP header `Accept`
3339        header_params['Accept'] = self.api_client.\
3340            select_header_accept(['application/json'])
3341
3342        # Authentication setting
3343        auth_settings = []
3344
3345        return self.api_client.call_api(resource_path, 'GET',
3346                                        path_params,
3347                                        query_params,
3348                                        header_params,
3349                                        body=body_params,
3350                                        post_params=form_params,
3351                                        files=local_var_files,
3352                                        response_type='Tabs',
3353                                        auth_settings=auth_settings,
3354                                        callback=params.get('callback'),
3355                                        _return_http_data_only=params.get('_return_http_data_only'),
3356                                        _preload_content=params.get('_preload_content', True),
3357                                        _request_timeout=params.get('_request_timeout'),
3358                                        collection_formats=collection_formats)
3359
3360    def get_pages(self, account_id, document_id, template_id, **kwargs):
3361        """
3362        Returns document page image(s) based on input.
3363        Returns images of the pages in a template document for display based on the parameters that you specify.
3364        This method makes a synchronous HTTP request by default. To make an
3365        asynchronous HTTP request, please define a `callback` function
3366        to be invoked when receiving the response.
3367        >>> def callback_function(response):
3368        >>>     pprint(response)
3369        >>>
3370        >>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function)
3371
3372        :param callback function: The callback function
3373            for asynchronous request. (optional)
3374        :param str account_id: The external account number (int) or account ID Guid. (required)
3375        :param str document_id: The ID of the document being accessed. (required)
3376        :param str template_id: The ID of the template being accessed. (required)
3377        :param str count:
3378        :param str dpi:
3379        :param str max_height:
3380        :param str max_width:
3381        :param str nocache:
3382        :param str show_changes:
3383        :param str start_position:
3384        :return: PageImages
3385                 If the method is called asynchronously,
3386                 returns the request thread.
3387        """
3388        kwargs['_return_http_data_only'] = True
3389        if kwargs.get('callback'):
3390            return self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3391        else:
3392            (data) = self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3393            return data
3394
3395    def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs):
3396        """
3397        Returns document page image(s) based on input.
3398        Returns images of the pages in a template document for display based on the parameters that you specify.
3399        This method makes a synchronous HTTP request by default. To make an
3400        asynchronous HTTP request, please define a `callback` function
3401        to be invoked when receiving the response.
3402        >>> def callback_function(response):
3403        >>>     pprint(response)
3404        >>>
3405        >>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function)
3406
3407        :param callback function: The callback function
3408            for asynchronous request. (optional)
3409        :param str account_id: The external account number (int) or account ID Guid. (required)
3410        :param str document_id: The ID of the document being accessed. (required)
3411        :param str template_id: The ID of the template being accessed. (required)
3412        :param str count:
3413        :param str dpi:
3414        :param str max_height:
3415        :param str max_width:
3416        :param str nocache:
3417        :param str show_changes:
3418        :param str start_position:
3419        :return: PageImages
3420                 If the method is called asynchronously,
3421                 returns the request thread.
3422        """
3423
3424        all_params = ['account_id', 'document_id', 'template_id', 'count', 'dpi', 'max_height', 'max_width', 'nocache', 'show_changes', 'start_position']
3425        all_params.append('callback')
3426        all_params.append('_return_http_data_only')
3427        all_params.append('_preload_content')
3428        all_params.append('_request_timeout')
3429
3430        params = locals()
3431        for key, val in iteritems(params['kwargs']):
3432            if key not in all_params:
3433                raise TypeError(
3434                    "Got an unexpected keyword argument '%s'"
3435                    " to method get_pages" % key
3436                )
3437            params[key] = val
3438        del params['kwargs']
3439        # verify the required parameter 'account_id' is set
3440        if ('account_id' not in params) or (params['account_id'] is None):
3441            raise ValueError("Missing the required parameter `account_id` when calling `get_pages`")
3442        # verify the required parameter 'document_id' is set
3443        if ('document_id' not in params) or (params['document_id'] is None):
3444            raise ValueError("Missing the required parameter `document_id` when calling `get_pages`")
3445        # verify the required parameter 'template_id' is set
3446        if ('template_id' not in params) or (params['template_id'] is None):
3447            raise ValueError("Missing the required parameter `template_id` when calling `get_pages`")
3448
3449
3450        collection_formats = {}
3451
3452        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages'.replace('{format}', 'json')
3453        path_params = {}
3454        if 'account_id' in params:
3455            path_params['accountId'] = params['account_id']
3456        if 'document_id' in params:
3457            path_params['documentId'] = params['document_id']
3458        if 'template_id' in params:
3459            path_params['templateId'] = params['template_id']
3460
3461        query_params = {}
3462        if 'count' in params:
3463            query_params['count'] = params['count']
3464        if 'dpi' in params:
3465            query_params['dpi'] = params['dpi']
3466        if 'max_height' in params:
3467            query_params['max_height'] = params['max_height']
3468        if 'max_width' in params:
3469            query_params['max_width'] = params['max_width']
3470        if 'nocache' in params:
3471            query_params['nocache'] = params['nocache']
3472        if 'show_changes' in params:
3473            query_params['show_changes'] = params['show_changes']
3474        if 'start_position' in params:
3475            query_params['start_position'] = params['start_position']
3476
3477        header_params = {}
3478
3479        form_params = []
3480        local_var_files = {}
3481
3482        body_params = None
3483        # HTTP header `Accept`
3484        header_params['Accept'] = self.api_client.\
3485            select_header_accept(['application/json'])
3486
3487        # Authentication setting
3488        auth_settings = []
3489
3490        return self.api_client.call_api(resource_path, 'GET',
3491                                        path_params,
3492                                        query_params,
3493                                        header_params,
3494                                        body=body_params,
3495                                        post_params=form_params,
3496                                        files=local_var_files,
3497                                        response_type='PageImages',
3498                                        auth_settings=auth_settings,
3499                                        callback=params.get('callback'),
3500                                        _return_http_data_only=params.get('_return_http_data_only'),
3501                                        _preload_content=params.get('_preload_content', True),
3502                                        _request_timeout=params.get('_request_timeout'),
3503                                        collection_formats=collection_formats)
3504
3505    def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs):
3506        """
3507        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3508        
3509        This method makes a synchronous HTTP request by default. To make an
3510        asynchronous HTTP request, please define a `callback` function
3511        to be invoked when receiving the response.
3512        >>> def callback_function(response):
3513        >>>     pprint(response)
3514        >>>
3515        >>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function)
3516
3517        :param callback function: The callback function
3518            for asynchronous request. (optional)
3519        :param str account_id: The external account number (int) or account ID Guid. (required)
3520        :param str document_id: The ID of the document being accessed. (required)
3521        :param str template_id: The ID of the template being accessed. (required)
3522        :return: DocumentHtmlDefinitionOriginals
3523                 If the method is called asynchronously,
3524                 returns the request thread.
3525        """
3526        kwargs['_return_http_data_only'] = True
3527        if kwargs.get('callback'):
3528            return self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3529        else:
3530            (data) = self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3531            return data
3532
3533    def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs):
3534        """
3535        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3536        
3537        This method makes a synchronous HTTP request by default. To make an
3538        asynchronous HTTP request, please define a `callback` function
3539        to be invoked when receiving the response.
3540        >>> def callback_function(response):
3541        >>>     pprint(response)
3542        >>>
3543        >>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function)
3544
3545        :param callback function: The callback function
3546            for asynchronous request. (optional)
3547        :param str account_id: The external account number (int) or account ID Guid. (required)
3548        :param str document_id: The ID of the document being accessed. (required)
3549        :param str template_id: The ID of the template being accessed. (required)
3550        :return: DocumentHtmlDefinitionOriginals
3551                 If the method is called asynchronously,
3552                 returns the request thread.
3553        """
3554
3555        all_params = ['account_id', 'document_id', 'template_id']
3556        all_params.append('callback')
3557        all_params.append('_return_http_data_only')
3558        all_params.append('_preload_content')
3559        all_params.append('_request_timeout')
3560
3561        params = locals()
3562        for key, val in iteritems(params['kwargs']):
3563            if key not in all_params:
3564                raise TypeError(
3565                    "Got an unexpected keyword argument '%s'"
3566                    " to method get_template_document_html_definitions" % key
3567                )
3568            params[key] = val
3569        del params['kwargs']
3570        # verify the required parameter 'account_id' is set
3571        if ('account_id' not in params) or (params['account_id'] is None):
3572            raise ValueError("Missing the required parameter `account_id` when calling `get_template_document_html_definitions`")
3573        # verify the required parameter 'document_id' is set
3574        if ('document_id' not in params) or (params['document_id'] is None):
3575            raise ValueError("Missing the required parameter `document_id` when calling `get_template_document_html_definitions`")
3576        # verify the required parameter 'template_id' is set
3577        if ('template_id' not in params) or (params['template_id'] is None):
3578            raise ValueError("Missing the required parameter `template_id` when calling `get_template_document_html_definitions`")
3579
3580
3581        collection_formats = {}
3582
3583        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions'.replace('{format}', 'json')
3584        path_params = {}
3585        if 'account_id' in params:
3586            path_params['accountId'] = params['account_id']
3587        if 'document_id' in params:
3588            path_params['documentId'] = params['document_id']
3589        if 'template_id' in params:
3590            path_params['templateId'] = params['template_id']
3591
3592        query_params = {}
3593
3594        header_params = {}
3595
3596        form_params = []
3597        local_var_files = {}
3598
3599        body_params = None
3600        # HTTP header `Accept`
3601        header_params['Accept'] = self.api_client.\
3602            select_header_accept(['application/json'])
3603
3604        # Authentication setting
3605        auth_settings = []
3606
3607        return self.api_client.call_api(resource_path, 'GET',
3608                                        path_params,
3609                                        query_params,
3610                                        header_params,
3611                                        body=body_params,
3612                                        post_params=form_params,
3613                                        files=local_var_files,
3614                                        response_type='DocumentHtmlDefinitionOriginals',
3615                                        auth_settings=auth_settings,
3616                                        callback=params.get('callback'),
3617                                        _return_http_data_only=params.get('_return_http_data_only'),
3618                                        _preload_content=params.get('_preload_content', True),
3619                                        _request_timeout=params.get('_request_timeout'),
3620                                        collection_formats=collection_formats)
3621
3622    def get_template_html_definitions(self, account_id, template_id, **kwargs):
3623        """
3624        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3625        
3626        This method makes a synchronous HTTP request by default. To make an
3627        asynchronous HTTP request, please define a `callback` function
3628        to be invoked when receiving the response.
3629        >>> def callback_function(response):
3630        >>>     pprint(response)
3631        >>>
3632        >>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function)
3633
3634        :param callback function: The callback function
3635            for asynchronous request. (optional)
3636        :param str account_id: The external account number (int) or account ID Guid. (required)
3637        :param str template_id: The ID of the template being accessed. (required)
3638        :return: DocumentHtmlDefinitionOriginals
3639                 If the method is called asynchronously,
3640                 returns the request thread.
3641        """
3642        kwargs['_return_http_data_only'] = True
3643        if kwargs.get('callback'):
3644            return self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3645        else:
3646            (data) = self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3647            return data
3648
3649    def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs):
3650        """
3651        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3652        
3653        This method makes a synchronous HTTP request by default. To make an
3654        asynchronous HTTP request, please define a `callback` function
3655        to be invoked when receiving the response.
3656        >>> def callback_function(response):
3657        >>>     pprint(response)
3658        >>>
3659        >>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function)
3660
3661        :param callback function: The callback function
3662            for asynchronous request. (optional)
3663        :param str account_id: The external account number (int) or account ID Guid. (required)
3664        :param str template_id: The ID of the template being accessed. (required)
3665        :return: DocumentHtmlDefinitionOriginals
3666                 If the method is called asynchronously,
3667                 returns the request thread.
3668        """
3669
3670        all_params = ['account_id', 'template_id']
3671        all_params.append('callback')
3672        all_params.append('_return_http_data_only')
3673        all_params.append('_preload_content')
3674        all_params.append('_request_timeout')
3675
3676        params = locals()
3677        for key, val in iteritems(params['kwargs']):
3678            if key not in all_params:
3679                raise TypeError(
3680                    "Got an unexpected keyword argument '%s'"
3681                    " to method get_template_html_definitions" % key
3682                )
3683            params[key] = val
3684        del params['kwargs']
3685        # verify the required parameter 'account_id' is set
3686        if ('account_id' not in params) or (params['account_id'] is None):
3687            raise ValueError("Missing the required parameter `account_id` when calling `get_template_html_definitions`")
3688        # verify the required parameter 'template_id' is set
3689        if ('template_id' not in params) or (params['template_id'] is None):
3690            raise ValueError("Missing the required parameter `template_id` when calling `get_template_html_definitions`")
3691
3692
3693        collection_formats = {}
3694
3695        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions'.replace('{format}', 'json')
3696        path_params = {}
3697        if 'account_id' in params:
3698            path_params['accountId'] = params['account_id']
3699        if 'template_id' in params:
3700            path_params['templateId'] = params['template_id']
3701
3702        query_params = {}
3703
3704        header_params = {}
3705
3706        form_params = []
3707        local_var_files = {}
3708
3709        body_params = None
3710        # HTTP header `Accept`
3711        header_params['Accept'] = self.api_client.\
3712            select_header_accept(['application/json'])
3713
3714        # Authentication setting
3715        auth_settings = []
3716
3717        return self.api_client.call_api(resource_path, 'GET',
3718                                        path_params,
3719                                        query_params,
3720                                        header_params,
3721                                        body=body_params,
3722                                        post_params=form_params,
3723                                        files=local_var_files,
3724                                        response_type='DocumentHtmlDefinitionOriginals',
3725                                        auth_settings=auth_settings,
3726                                        callback=params.get('callback'),
3727                                        _return_http_data_only=params.get('_return_http_data_only'),
3728                                        _preload_content=params.get('_preload_content', True),
3729                                        _request_timeout=params.get('_request_timeout'),
3730                                        collection_formats=collection_formats)
3731
3732    def list_custom_fields(self, account_id, template_id, **kwargs):
3733        """
3734        Gets the custom document fields from a template.
3735        Retrieves the custom document field information from an existing template.
3736        This method makes a synchronous HTTP request by default. To make an
3737        asynchronous HTTP request, please define a `callback` function
3738        to be invoked when receiving the response.
3739        >>> def callback_function(response):
3740        >>>     pprint(response)
3741        >>>
3742        >>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function)
3743
3744        :param callback function: The callback function
3745            for asynchronous request. (optional)
3746        :param str account_id: The external account number (int) or account ID Guid. (required)
3747        :param str template_id: The ID of the template being accessed. (required)
3748        :return: CustomFields
3749                 If the method is called asynchronously,
3750                 returns the request thread.
3751        """
3752        kwargs['_return_http_data_only'] = True
3753        if kwargs.get('callback'):
3754            return self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3755        else:
3756            (data) = self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3757            return data
3758
3759    def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
3760        """
3761        Gets the custom document fields from a template.
3762        Retrieves the custom document field information from an existing template.
3763        This method makes a synchronous HTTP request by default. To make an
3764        asynchronous HTTP request, please define a `callback` function
3765        to be invoked when receiving the response.
3766        >>> def callback_function(response):
3767        >>>     pprint(response)
3768        >>>
3769        >>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
3770
3771        :param callback function: The callback function
3772            for asynchronous request. (optional)
3773        :param str account_id: The external account number (int) or account ID Guid. (required)
3774        :param str template_id: The ID of the template being accessed. (required)
3775        :return: CustomFields
3776                 If the method is called asynchronously,
3777                 returns the request thread.
3778        """
3779
3780        all_params = ['account_id', 'template_id']
3781        all_params.append('callback')
3782        all_params.append('_return_http_data_only')
3783        all_params.append('_preload_content')
3784        all_params.append('_request_timeout')
3785
3786        params = locals()
3787        for key, val in iteritems(params['kwargs']):
3788            if key not in all_params:
3789                raise TypeError(
3790                    "Got an unexpected keyword argument '%s'"
3791                    " to method list_custom_fields" % key
3792                )
3793            params[key] = val
3794        del params['kwargs']
3795        # verify the required parameter 'account_id' is set
3796        if ('account_id' not in params) or (params['account_id'] is None):
3797            raise ValueError("Missing the required parameter `account_id` when calling `list_custom_fields`")
3798        # verify the required parameter 'template_id' is set
3799        if ('template_id' not in params) or (params['template_id'] is None):
3800            raise ValueError("Missing the required parameter `template_id` when calling `list_custom_fields`")
3801
3802
3803        collection_formats = {}
3804
3805        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
3806        path_params = {}
3807        if 'account_id' in params:
3808            path_params['accountId'] = params['account_id']
3809        if 'template_id' in params:
3810            path_params['templateId'] = params['template_id']
3811
3812        query_params = {}
3813
3814        header_params = {}
3815
3816        form_params = []
3817        local_var_files = {}
3818
3819        body_params = None
3820        # HTTP header `Accept`
3821        header_params['Accept'] = self.api_client.\
3822            select_header_accept(['application/json'])
3823
3824        # Authentication setting
3825        auth_settings = []
3826
3827        return self.api_client.call_api(resource_path, 'GET',
3828                                        path_params,
3829                                        query_params,
3830                                        header_params,
3831                                        body=body_params,
3832                                        post_params=form_params,
3833                                        files=local_var_files,
3834                                        response_type='CustomFields',
3835                                        auth_settings=auth_settings,
3836                                        callback=params.get('callback'),
3837                                        _return_http_data_only=params.get('_return_http_data_only'),
3838                                        _preload_content=params.get('_preload_content', True),
3839                                        _request_timeout=params.get('_request_timeout'),
3840                                        collection_formats=collection_formats)
3841
3842    def list_document_fields(self, account_id, document_id, template_id, **kwargs):
3843        """
3844        Gets the custom document fields for a an existing template document.
3845        Retrieves the custom document fields for an existing template document.
3846        This method makes a synchronous HTTP request by default. To make an
3847        asynchronous HTTP request, please define a `callback` function
3848        to be invoked when receiving the response.
3849        >>> def callback_function(response):
3850        >>>     pprint(response)
3851        >>>
3852        >>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function)
3853
3854        :param callback function: The callback function
3855            for asynchronous request. (optional)
3856        :param str account_id: The external account number (int) or account ID Guid. (required)
3857        :param str document_id: The ID of the document being accessed. (required)
3858        :param str template_id: The ID of the template being accessed. (required)
3859        :return: DocumentFieldsInformation
3860                 If the method is called asynchronously,
3861                 returns the request thread.
3862        """
3863        kwargs['_return_http_data_only'] = True
3864        if kwargs.get('callback'):
3865            return self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
3866        else:
3867            (data) = self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
3868            return data
3869
3870    def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
3871        """
3872        Gets the custom document fields for a an existing template document.
3873        Retrieves the custom document fields for an existing template document.
3874        This method makes a synchronous HTTP request by default. To make an
3875        asynchronous HTTP request, please define a `callback` function
3876        to be invoked when receiving the response.
3877        >>> def callback_function(response):
3878        >>>     pprint(response)
3879        >>>
3880        >>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
3881
3882        :param callback function: The callback function
3883            for asynchronous request. (optional)
3884        :param str account_id: The external account number (int) or account ID Guid. (required)
3885        :param str document_id: The ID of the document being accessed. (required)
3886        :param str template_id: The ID of the template being accessed. (required)
3887        :return: DocumentFieldsInformation
3888                 If the method is called asynchronously,
3889                 returns the request thread.
3890        """
3891
3892        all_params = ['account_id', 'document_id', 'template_id']
3893        all_params.append('callback')
3894        all_params.append('_return_http_data_only')
3895        all_params.append('_preload_content')
3896        all_params.append('_request_timeout')
3897
3898        params = locals()
3899        for key, val in iteritems(params['kwargs']):
3900            if key not in all_params:
3901                raise TypeError(
3902                    "Got an unexpected keyword argument '%s'"
3903                    " to method list_document_fields" % key
3904                )
3905            params[key] = val
3906        del params['kwargs']
3907        # verify the required parameter 'account_id' is set
3908        if ('account_id' not in params) or (params['account_id'] is None):
3909            raise ValueError("Missing the required parameter `account_id` when calling `list_document_fields`")
3910        # verify the required parameter 'document_id' is set
3911        if ('document_id' not in params) or (params['document_id'] is None):
3912            raise ValueError("Missing the required parameter `document_id` when calling `list_document_fields`")
3913        # verify the required parameter 'template_id' is set
3914        if ('template_id' not in params) or (params['template_id'] is None):
3915            raise ValueError("Missing the required parameter `template_id` when calling `list_document_fields`")
3916
3917
3918        collection_formats = {}
3919
3920        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
3921        path_params = {}
3922        if 'account_id' in params:
3923            path_params['accountId'] = params['account_id']
3924        if 'document_id' in params:
3925            path_params['documentId'] = params['document_id']
3926        if 'template_id' in params:
3927            path_params['templateId'] = params['template_id']
3928
3929        query_params = {}
3930
3931        header_params = {}
3932
3933        form_params = []
3934        local_var_files = {}
3935
3936        body_params = None
3937        # HTTP header `Accept`
3938        header_params['Accept'] = self.api_client.\
3939            select_header_accept(['application/json'])
3940
3941        # Authentication setting
3942        auth_settings = []
3943
3944        return self.api_client.call_api(resource_path, 'GET',
3945                                        path_params,
3946                                        query_params,
3947                                        header_params,
3948                                        body=body_params,
3949                                        post_params=form_params,
3950                                        files=local_var_files,
3951                                        response_type='DocumentFieldsInformation',
3952                                        auth_settings=auth_settings,
3953                                        callback=params.get('callback'),
3954                                        _return_http_data_only=params.get('_return_http_data_only'),
3955                                        _preload_content=params.get('_preload_content', True),
3956                                        _request_timeout=params.get('_request_timeout'),
3957                                        collection_formats=collection_formats)
3958
3959    def list_documents(self, account_id, template_id, **kwargs):
3960        """
3961        Gets a list of documents associated with a template.
3962        Retrieves a list of documents associated with the specified template.
3963        This method makes a synchronous HTTP request by default. To make an
3964        asynchronous HTTP request, please define a `callback` function
3965        to be invoked when receiving the response.
3966        >>> def callback_function(response):
3967        >>>     pprint(response)
3968        >>>
3969        >>> thread = api.list_documents(account_id, template_id, callback=callback_function)
3970
3971        :param callback function: The callback function
3972            for asynchronous request. (optional)
3973        :param str account_id: The external account number (int) or account ID Guid. (required)
3974        :param str template_id: The ID of the template being accessed. (required)
3975        :param str include_agreement_type:
3976        :param str include_is_edited:
3977        :param str include_tabs:
3978        :return: TemplateDocumentsResult
3979                 If the method is called asynchronously,
3980                 returns the request thread.
3981        """
3982        kwargs['_return_http_data_only'] = True
3983        if kwargs.get('callback'):
3984            return self.list_documents_with_http_info(account_id, template_id, **kwargs)
3985        else:
3986            (data) = self.list_documents_with_http_info(account_id, template_id, **kwargs)
3987            return data
3988
3989    def list_documents_with_http_info(self, account_id, template_id, **kwargs):
3990        """
3991        Gets a list of documents associated with a template.
3992        Retrieves a list of documents associated with the specified template.
3993        This method makes a synchronous HTTP request by default. To make an
3994        asynchronous HTTP request, please define a `callback` function
3995        to be invoked when receiving the response.
3996        >>> def callback_function(response):
3997        >>>     pprint(response)
3998        >>>
3999        >>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function)
4000
4001        :param callback function: The callback function
4002            for asynchronous request. (optional)
4003        :param str account_id: The external account number (int) or account ID Guid. (required)
4004        :param str template_id: The ID of the template being accessed. (required)
4005        :param str include_agreement_type:
4006        :param str include_is_edited:
4007        :param str include_tabs:
4008        :return: TemplateDocumentsResult
4009                 If the method is called asynchronously,
4010                 returns the request thread.
4011        """
4012
4013        all_params = ['account_id', 'template_id', 'include_agreement_type', 'include_is_edited', 'include_tabs']
4014        all_params.append('callback')
4015        all_params.append('_return_http_data_only')
4016        all_params.append('_preload_content')
4017        all_params.append('_request_timeout')
4018
4019        params = locals()
4020        for key, val in iteritems(params['kwargs']):
4021            if key not in all_params:
4022                raise TypeError(
4023                    "Got an unexpected keyword argument '%s'"
4024                    " to method list_documents" % key
4025                )
4026            params[key] = val
4027        del params['kwargs']
4028        # verify the required parameter 'account_id' is set
4029        if ('account_id' not in params) or (params['account_id'] is None):
4030            raise ValueError("Missing the required parameter `account_id` when calling `list_documents`")
4031        # verify the required parameter 'template_id' is set
4032        if ('template_id' not in params) or (params['template_id'] is None):
4033            raise ValueError("Missing the required parameter `template_id` when calling `list_documents`")
4034
4035
4036        collection_formats = {}
4037
4038        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
4039        path_params = {}
4040        if 'account_id' in params:
4041            path_params['accountId'] = params['account_id']
4042        if 'template_id' in params:
4043            path_params['templateId'] = params['template_id']
4044
4045        query_params = {}
4046        if 'include_agreement_type' in params:
4047            query_params['include_agreement_type'] = params['include_agreement_type']
4048        if 'include_is_edited' in params:
4049            query_params['include_is_edited'] = params['include_is_edited']
4050        if 'include_tabs' in params:
4051            query_params['include_tabs'] = params['include_tabs']
4052
4053        header_params = {}
4054
4055        form_params = []
4056        local_var_files = {}
4057
4058        body_params = None
4059        # HTTP header `Accept`
4060        header_params['Accept'] = self.api_client.\
4061            select_header_accept(['application/json'])
4062
4063        # Authentication setting
4064        auth_settings = []
4065
4066        return self.api_client.call_api(resource_path, 'GET',
4067                                        path_params,
4068                                        query_params,
4069                                        header_params,
4070                                        body=body_params,
4071                                        post_params=form_params,
4072                                        files=local_var_files,
4073                                        response_type='TemplateDocumentsResult',
4074                                        auth_settings=auth_settings,
4075                                        callback=params.get('callback'),
4076                                        _return_http_data_only=params.get('_return_http_data_only'),
4077                                        _preload_content=params.get('_preload_content', True),
4078                                        _request_timeout=params.get('_request_timeout'),
4079                                        collection_formats=collection_formats)
4080
4081    def list_recipients(self, account_id, template_id, **kwargs):
4082        """
4083        Gets recipient information from a template.
4084        Retrieves the information for all recipients in the specified template.
4085        This method makes a synchronous HTTP request by default. To make an
4086        asynchronous HTTP request, please define a `callback` function
4087        to be invoked when receiving the response.
4088        >>> def callback_function(response):
4089        >>>     pprint(response)
4090        >>>
4091        >>> thread = api.list_recipients(account_id, template_id, callback=callback_function)
4092
4093        :param callback function: The callback function
4094            for asynchronous request. (optional)
4095        :param str account_id: The external account number (int) or account ID Guid. (required)
4096        :param str template_id: The ID of the template being accessed. (required)
4097        :param str include_anchor_tab_locations:  When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. 
4098        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4099        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4100        :return: Recipients
4101                 If the method is called asynchronously,
4102                 returns the request thread.
4103        """
4104        kwargs['_return_http_data_only'] = True
4105        if kwargs.get('callback'):
4106            return self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4107        else:
4108            (data) = self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4109            return data
4110
4111    def list_recipients_with_http_info(self, account_id, template_id, **kwargs):
4112        """
4113        Gets recipient information from a template.
4114        Retrieves the information for all recipients in the specified template.
4115        This method makes a synchronous HTTP request by default. To make an
4116        asynchronous HTTP request, please define a `callback` function
4117        to be invoked when receiving the response.
4118        >>> def callback_function(response):
4119        >>>     pprint(response)
4120        >>>
4121        >>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function)
4122
4123        :param callback function: The callback function
4124            for asynchronous request. (optional)
4125        :param str account_id: The external account number (int) or account ID Guid. (required)
4126        :param str template_id: The ID of the template being accessed. (required)
4127        :param str include_anchor_tab_locations:  When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. 
4128        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4129        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4130        :return: Recipients
4131                 If the method is called asynchronously,
4132                 returns the request thread.
4133        """
4134
4135        all_params = ['account_id', 'template_id', 'include_anchor_tab_locations', 'include_extended', 'include_tabs']
4136        all_params.append('callback')
4137        all_params.append('_return_http_data_only')
4138        all_params.append('_preload_content')
4139        all_params.append('_request_timeout')
4140
4141        params = locals()
4142        for key, val in iteritems(params['kwargs']):
4143            if key not in all_params:
4144                raise TypeError(
4145                    "Got an unexpected keyword argument '%s'"
4146                    " to method list_recipients" % key
4147                )
4148            params[key] = val
4149        del params['kwargs']
4150        # verify the required parameter 'account_id' is set
4151        if ('account_id' not in params) or (params['account_id'] is None):
4152            raise ValueError("Missing the required parameter `account_id` when calling `list_recipients`")
4153        # verify the required parameter 'template_id' is set
4154        if ('template_id' not in params) or (params['template_id'] is None):
4155            raise ValueError("Missing the required parameter `template_id` when calling `list_recipients`")
4156
4157
4158        collection_formats = {}
4159
4160        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
4161        path_params = {}
4162        if 'account_id' in params:
4163            path_params['accountId'] = params['account_id']
4164        if 'template_id' in params:
4165            path_params['templateId'] = params['template_id']
4166
4167        query_params = {}
4168        if 'include_anchor_tab_locations' in params:
4169            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4170        if 'include_extended' in params:
4171            query_params['include_extended'] = params['include_extended']
4172        if 'include_tabs' in params:
4173            query_params['include_tabs'] = params['include_tabs']
4174
4175        header_params = {}
4176
4177        form_params = []
4178        local_var_files = {}
4179
4180        body_params = None
4181        # HTTP header `Accept`
4182        header_params['Accept'] = self.api_client.\
4183            select_header_accept(['application/json'])
4184
4185        # Authentication setting
4186        auth_settings = []
4187
4188        return self.api_client.call_api(resource_path, 'GET',
4189                                        path_params,
4190                                        query_params,
4191                                        header_params,
4192                                        body=body_params,
4193                                        post_params=form_params,
4194                                        files=local_var_files,
4195                                        response_type='Recipients',
4196                                        auth_settings=auth_settings,
4197                                        callback=params.get('callback'),
4198                                        _return_http_data_only=params.get('_return_http_data_only'),
4199                                        _preload_content=params.get('_preload_content', True),
4200                                        _request_timeout=params.get('_request_timeout'),
4201                                        collection_formats=collection_formats)
4202
4203    def list_tabs(self, account_id, recipient_id, template_id, **kwargs):
4204        """
4205        Gets the tabs information for a signer or sign-in-person recipient in a template.
4206        Gets the tabs information for a signer or sign-in-person recipient in a template.
4207        This method makes a synchronous HTTP request by default. To make an
4208        asynchronous HTTP request, please define a `callback` function
4209        to be invoked when receiving the response.
4210        >>> def callback_function(response):
4211        >>>     pprint(response)
4212        >>>
4213        >>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function)
4214
4215        :param callback function: The callback function
4216            for asynchronous request. (optional)
4217        :param str account_id: The external account number (int) or account ID Guid. (required)
4218        :param str recipient_id: The ID of the recipient being accessed. (required)
4219        :param str template_id: The ID of the template being accessed. (required)
4220        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4221        :param str include_metadata:
4222        :return: Tabs
4223                 If the method is called asynchronously,
4224                 returns the request thread.
4225        """
4226        kwargs['_return_http_data_only'] = True
4227        if kwargs.get('callback'):
4228            return self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4229        else:
4230            (data) = self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4231            return data
4232
4233    def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
4234        """
4235        Gets the tabs information for a signer or sign-in-person recipient in a template.
4236        Gets the tabs information for a signer or sign-in-person recipient in a template.
4237        This method makes a synchronous HTTP request by default. To make an
4238        asynchronous HTTP request, please define a `callback` function
4239        to be invoked when receiving the response.
4240        >>> def callback_function(response):
4241        >>>     pprint(response)
4242        >>>
4243        >>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
4244
4245        :param callback function: The callback function
4246            for asynchronous request. (optional)
4247        :param str account_id: The external account number (int) or account ID Guid. (required)
4248        :param str recipient_id: The ID of the recipient being accessed. (required)
4249        :param str template_id: The ID of the template being accessed. (required)
4250        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4251        :param str include_metadata:
4252        :return: Tabs
4253                 If the method is called asynchronously,
4254                 returns the request thread.
4255        """
4256
4257        all_params = ['account_id', 'recipient_id', 'template_id', 'include_anchor_tab_locations', 'include_metadata']
4258        all_params.append('callback')
4259        all_params.append('_return_http_data_only')
4260        all_params.append('_preload_content')
4261        all_params.append('_request_timeout')
4262
4263        params = locals()
4264        for key, val in iteritems(params['kwargs']):
4265            if key not in all_params:
4266                raise TypeError(
4267                    "Got an unexpected keyword argument '%s'"
4268                    " to method list_tabs" % key
4269                )
4270            params[key] = val
4271        del params['kwargs']
4272        # verify the required parameter 'account_id' is set
4273        if ('account_id' not in params) or (params['account_id'] is None):
4274            raise ValueError("Missing the required parameter `account_id` when calling `list_tabs`")
4275        # verify the required parameter 'recipient_id' is set
4276        if ('recipient_id' not in params) or (params['recipient_id'] is None):
4277            raise ValueError("Missing the required parameter `recipient_id` when calling `list_tabs`")
4278        # verify the required parameter 'template_id' is set
4279        if ('template_id' not in params) or (params['template_id'] is None):
4280            raise ValueError("Missing the required parameter `template_id` when calling `list_tabs`")
4281
4282
4283        collection_formats = {}
4284
4285        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
4286        path_params = {}
4287        if 'account_id' in params:
4288            path_params['accountId'] = params['account_id']
4289        if 'recipient_id' in params:
4290            path_params['recipientId'] = params['recipient_id']
4291        if 'template_id' in params:
4292            path_params['templateId'] = params['template_id']
4293
4294        query_params = {}
4295        if 'include_anchor_tab_locations' in params:
4296            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4297        if 'include_metadata' in params:
4298            query_params['include_metadata'] = params['include_metadata']
4299
4300        header_params = {}
4301
4302        form_params = []
4303        local_var_files = {}
4304
4305        body_params = None
4306        # HTTP header `Accept`
4307        header_params['Accept'] = self.api_client.\
4308            select_header_accept(['application/json'])
4309
4310        # Authentication setting
4311        auth_settings = []
4312
4313        return self.api_client.call_api(resource_path, 'GET',
4314                                        path_params,
4315                                        query_params,
4316                                        header_params,
4317                                        body=body_params,
4318                                        post_params=form_params,
4319                                        files=local_var_files,
4320                                        response_type='Tabs',
4321                                        auth_settings=auth_settings,
4322                                        callback=params.get('callback'),
4323                                        _return_http_data_only=params.get('_return_http_data_only'),
4324                                        _preload_content=params.get('_preload_content', True),
4325                                        _request_timeout=params.get('_request_timeout'),
4326                                        collection_formats=collection_formats)
4327
4328    def list_templates(self, account_id, **kwargs):
4329        """
4330        Gets the definition of a template.
4331        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4332        This method makes a synchronous HTTP request by default. To make an
4333        asynchronous HTTP request, please define a `callback` function
4334        to be invoked when receiving the response.
4335        >>> def callback_function(response):
4336        >>>     pprint(response)
4337        >>>
4338        >>> thread = api.list_templates(account_id, callback=callback_function)
4339
4340        :param callback function: The callback function
4341            for asynchronous request. (optional)
4342        :param str account_id: The external account number (int) or account ID Guid. (required)
4343        :param str count: Number of records to return in the cache.
4344        :param str created_from_date:
4345        :param str created_to_date:
4346        :param str folder_ids: A comma separated list of folder ID GUIDs.
4347        :param str folder_types:
4348        :param str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
4349        :param str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
4350        :param str is_deleted_template_only:
4351        :param str is_download:
4352        :param str link_configuration_id:
4353        :param str modified_from_date:
4354        :param str modified_to_date:
4355        :param str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z)  -desc = descending sort order (z to a)
4356        :param str order_by: Sets the file attribute used to sort the list. Valid values are:  -name: template name  -modified: date/time template was last modified.  -used: date/time the template was last used.
4357        :param str search_fields:
4358        :param str search_text: The search text used to search the names of templates.
4359        :param str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
4360        :param str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
4361        :param str template_ids:
4362        :param str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
4363        :param str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
4364        :param str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
4365        :param str user_filter: Sets if the templates shown in the response Valid values are:  -owned_by_me: only shows templates the user owns.  -shared_with_me: only shows templates that are shared with the user.  -all: shows all templates owned or shared with the user.
4366        :param str user_id:
4367        :return: EnvelopeTemplateResults
4368                 If the method is called asynchronously,
4369                 returns the request thread.
4370        """
4371        kwargs['_return_http_data_only'] = True
4372        if kwargs.get('callback'):
4373            return self.list_templates_with_http_info(account_id, **kwargs)
4374        else:
4375            (data) = self.list_templates_with_http_info(account_id, **kwargs)
4376            return data
4377
4378    def list_templates_with_http_info(self, account_id, **kwargs):
4379        """
4380        Gets the definition of a template.
4381        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4382        This method makes a synchronous HTTP request by default. To make an
4383        asynchronous HTTP request, please define a `callback` function
4384        to be invoked when receiving the response.
4385        >>> def callback_function(response):
4386        >>>     pprint(response)
4387        >>>
4388        >>> thread = api.list_templates_with_http_info(account_id, callback=callback_function)
4389
4390        :param callback function: The callback function
4391            for asynchronous request. (optional)
4392        :param str account_id: The external account number (int) or account ID Guid. (required)
4393        :param str count: Number of records to return in the cache.
4394        :param str created_from_date:
4395        :param str created_to_date:
4396        :param str folder_ids: A comma separated list of folder ID GUIDs.
4397        :param str folder_types:
4398        :param str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
4399        :param str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
4400        :param str is_deleted_template_only:
4401        :param str is_download:
4402        :param str link_configuration_id:
4403        :param str modified_from_date:
4404        :param str modified_to_date:
4405        :param str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z)  -desc = descending sort order (z to a)
4406        :param str order_by: Sets the file attribute used to sort the list. Valid values are:  -name: template name  -modified: date/time template was last modified.  -used: date/time the template was last used.
4407        :param str search_fields:
4408        :param str search_text: The search text used to search the names of templates.
4409        :param str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
4410        :param str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
4411        :param str template_ids:
4412        :param str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
4413        :param str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
4414        :param str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
4415        :param str user_filter: Sets if the templates shown in the response Valid values are:  -owned_by_me: only shows templates the user owns.  -shared_with_me: only shows templates that are shared with the user.  -all: shows all templates owned or shared with the user.
4416        :param str user_id:
4417        :return: EnvelopeTemplateResults
4418                 If the method is called asynchronously,
4419                 returns the request thread.
4420        """
4421
4422        all_params = ['account_id', 'count', 'created_from_date', 'created_to_date', 'folder_ids', 'folder_types', 'from_date', 'include', 'is_deleted_template_only', 'is_download', 'link_configuration_id', 'modified_from_date', 'modified_to_date', 'order', 'order_by', 'search_fields', 'search_text', 'shared_by_me', 'start_position', 'template_ids', 'to_date', 'used_from_date', 'used_to_date', 'user_filter', 'user_id']
4423        all_params.append('callback')
4424        all_params.append('_return_http_data_only')
4425        all_params.append('_preload_content')
4426        all_params.append('_request_timeout')
4427
4428        params = locals()
4429        for key, val in iteritems(params['kwargs']):
4430            if key not in all_params:
4431                raise TypeError(
4432                    "Got an unexpected keyword argument '%s'"
4433                    " to method list_templates" % key
4434                )
4435            params[key] = val
4436        del params['kwargs']
4437        # verify the required parameter 'account_id' is set
4438        if ('account_id' not in params) or (params['account_id'] is None):
4439            raise ValueError("Missing the required parameter `account_id` when calling `list_templates`")
4440
4441
4442        collection_formats = {}
4443
4444        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
4445        path_params = {}
4446        if 'account_id' in params:
4447            path_params['accountId'] = params['account_id']
4448
4449        query_params = {}
4450        if 'count' in params:
4451            query_params['count'] = params['count']
4452        if 'created_from_date' in params:
4453            query_params['created_from_date'] = params['created_from_date']
4454        if 'created_to_date' in params:
4455            query_params['created_to_date'] = params['created_to_date']
4456        if 'folder_ids' in params:
4457            query_params['folder_ids'] = params['folder_ids']
4458        if 'folder_types' in params:
4459            query_params['folder_types'] = params['folder_types']
4460        if 'from_date' in params:
4461            query_params['from_date'] = params['from_date']
4462        if 'include' in params:
4463            query_params['include'] = params['include']
4464        if 'is_deleted_template_only' in params:
4465            query_params['is_deleted_template_only'] = params['is_deleted_template_only']
4466        if 'is_download' in params:
4467            query_params['is_download'] = params['is_download']
4468        if 'link_configuration_id' in params:
4469            query_params['link_configuration_id'] = params['link_configuration_id']
4470        if 'modified_from_date' in params:
4471            query_params['modified_from_date'] = params['modified_from_date']
4472        if 'modified_to_date' in params:
4473            query_params['modified_to_date'] = params['modified_to_date']
4474        if 'order' in params:
4475            query_params['order'] = params['order']
4476        if 'order_by' in params:
4477            query_params['order_by'] = params['order_by']
4478        if 'search_fields' in params:
4479            query_params['search_fields'] = params['search_fields']
4480        if 'search_text' in params:
4481            query_params['search_text'] = params['search_text']
4482        if 'shared_by_me' in params:
4483            query_params['shared_by_me'] = params['shared_by_me']
4484        if 'start_position' in params:
4485            query_params['start_position'] = params['start_position']
4486        if 'template_ids' in params:
4487            query_params['template_ids'] = params['template_ids']
4488        if 'to_date' in params:
4489            query_params['to_date'] = params['to_date']
4490        if 'used_from_date' in params:
4491            query_params['used_from_date'] = params['used_from_date']
4492        if 'used_to_date' in params:
4493            query_params['used_to_date'] = params['used_to_date']
4494        if 'user_filter' in params:
4495            query_params['user_filter'] = params['user_filter']
4496        if 'user_id' in params:
4497            query_params['user_id'] = params['user_id']
4498
4499        header_params = {}
4500
4501        form_params = []
4502        local_var_files = {}
4503
4504        body_params = None
4505        # HTTP header `Accept`
4506        header_params['Accept'] = self.api_client.\
4507            select_header_accept(['application/json'])
4508
4509        # Authentication setting
4510        auth_settings = []
4511
4512        return self.api_client.call_api(resource_path, 'GET',
4513                                        path_params,
4514                                        query_params,
4515                                        header_params,
4516                                        body=body_params,
4517                                        post_params=form_params,
4518                                        files=local_var_files,
4519                                        response_type='EnvelopeTemplateResults',
4520                                        auth_settings=auth_settings,
4521                                        callback=params.get('callback'),
4522                                        _return_http_data_only=params.get('_return_http_data_only'),
4523                                        _preload_content=params.get('_preload_content', True),
4524                                        _request_timeout=params.get('_request_timeout'),
4525                                        collection_formats=collection_formats)
4526
4527    def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
4528        """
4529        Rotates page image from a template for display.
4530        Rotates page image from a template for display. The page image can be rotated to the left or right.
4531        This method makes a synchronous HTTP request by default. To make an
4532        asynchronous HTTP request, please define a `callback` function
4533        to be invoked when receiving the response.
4534        >>> def callback_function(response):
4535        >>>     pprint(response)
4536        >>>
4537        >>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
4538
4539        :param callback function: The callback function
4540            for asynchronous request. (optional)
4541        :param str account_id: The external account number (int) or account ID Guid. (required)
4542        :param str document_id: The ID of the document being accessed. (required)
4543        :param str page_number: The page number being accessed. (required)
4544        :param str template_id: The ID of the template being accessed. (required)
4545        :param PageRequest page_request:
4546        :return: None
4547                 If the method is called asynchronously,
4548                 returns the request thread.
4549        """
4550        kwargs['_return_http_data_only'] = True
4551        if kwargs.get('callback'):
4552            return self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4553        else:
4554            (data) = self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4555            return data
4556
4557    def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
4558        """
4559        Rotates page image from a template for display.
4560        Rotates page image from a template for display. The page image can be rotated to the left or right.
4561        This method makes a synchronous HTTP request by default. To make an
4562        asynchronous HTTP request, please define a `callback` function
4563        to be invoked when receiving the response.
4564        >>> def callback_function(response):
4565        >>>     pprint(response)
4566        >>>
4567        >>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
4568
4569        :param callback function: The callback function
4570            for asynchronous request. (optional)
4571        :param str account_id: The external account number (int) or account ID Guid. (required)
4572        :param str document_id: The ID of the document being accessed. (required)
4573        :param str page_number: The page number being accessed. (required)
4574        :param str template_id: The ID of the template being accessed. (required)
4575        :param PageRequest page_request:
4576        :return: None
4577                 If the method is called asynchronously,
4578                 returns the request thread.
4579        """
4580
4581        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
4582        all_params.append('callback')
4583        all_params.append('_return_http_data_only')
4584        all_params.append('_preload_content')
4585        all_params.append('_request_timeout')
4586
4587        params = locals()
4588        for key, val in iteritems(params['kwargs']):
4589            if key not in all_params:
4590                raise TypeError(
4591                    "Got an unexpected keyword argument '%s'"
4592                    " to method rotate_document_page" % key
4593                )
4594            params[key] = val
4595        del params['kwargs']
4596        # verify the required parameter 'account_id' is set
4597        if ('account_id' not in params) or (params['account_id'] is None):
4598            raise ValueError("Missing the required parameter `account_id` when calling `rotate_document_page`")
4599        # verify the required parameter 'document_id' is set
4600        if ('document_id' not in params) or (params['document_id'] is None):
4601            raise ValueError("Missing the required parameter `document_id` when calling `rotate_document_page`")
4602        # verify the required parameter 'page_number' is set
4603        if ('page_number' not in params) or (params['page_number'] is None):
4604            raise ValueError("Missing the required parameter `page_number` when calling `rotate_document_page`")
4605        # verify the required parameter 'template_id' is set
4606        if ('template_id' not in params) or (params['template_id'] is None):
4607            raise ValueError("Missing the required parameter `template_id` when calling `rotate_document_page`")
4608
4609
4610        collection_formats = {}
4611
4612        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
4613        path_params = {}
4614        if 'account_id' in params:
4615            path_params['accountId'] = params['account_id']
4616        if 'document_id' in params:
4617            path_params['documentId'] = params['document_id']
4618        if 'page_number' in params:
4619            path_params['pageNumber'] = params['page_number']
4620        if 'template_id' in params:
4621            path_params['templateId'] = params['template_id']
4622
4623        query_params = {}
4624
4625        header_params = {}
4626
4627        form_params = []
4628        local_var_files = {}
4629
4630        body_params = None
4631        if 'page_request' in params:
4632            body_params = params['page_request']
4633        # HTTP header `Accept`
4634        header_params['Accept'] = self.api_client.\
4635            select_header_accept(['application/json'])
4636
4637        # Authentication setting
4638        auth_settings = []
4639
4640        return self.api_client.call_api(resource_path, 'PUT',
4641                                        path_params,
4642                                        query_params,
4643                                        header_params,
4644                                        body=body_params,
4645                                        post_params=form_params,
4646                                        files=local_var_files,
4647                                        response_type=None,
4648                                        auth_settings=auth_settings,
4649                                        callback=params.get('callback'),
4650                                        _return_http_data_only=params.get('_return_http_data_only'),
4651                                        _preload_content=params.get('_preload_content', True),
4652                                        _request_timeout=params.get('_request_timeout'),
4653                                        collection_formats=collection_formats)
4654
4655    def update(self, account_id, template_id, **kwargs):
4656        """
4657        Updates an existing template.
4658        Updates an existing template.
4659        This method makes a synchronous HTTP request by default. To make an
4660        asynchronous HTTP request, please define a `callback` function
4661        to be invoked when receiving the response.
4662        >>> def callback_function(response):
4663        >>>     pprint(response)
4664        >>>
4665        >>> thread = api.update(account_id, template_id, callback=callback_function)
4666
4667        :param callback function: The callback function
4668            for asynchronous request. (optional)
4669        :param str account_id: The external account number (int) or account ID Guid. (required)
4670        :param str template_id: The ID of the template being accessed. (required)
4671        :param EnvelopeTemplate envelope_template:
4672        :return: TemplateUpdateSummary
4673                 If the method is called asynchronously,
4674                 returns the request thread.
4675        """
4676        kwargs['_return_http_data_only'] = True
4677        if kwargs.get('callback'):
4678            return self.update_with_http_info(account_id, template_id, **kwargs)
4679        else:
4680            (data) = self.update_with_http_info(account_id, template_id, **kwargs)
4681            return data
4682
4683    def update_with_http_info(self, account_id, template_id, **kwargs):
4684        """
4685        Updates an existing template.
4686        Updates an existing template.
4687        This method makes a synchronous HTTP request by default. To make an
4688        asynchronous HTTP request, please define a `callback` function
4689        to be invoked when receiving the response.
4690        >>> def callback_function(response):
4691        >>>     pprint(response)
4692        >>>
4693        >>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function)
4694
4695        :param callback function: The callback function
4696            for asynchronous request. (optional)
4697        :param str account_id: The external account number (int) or account ID Guid. (required)
4698        :param str template_id: The ID of the template being accessed. (required)
4699        :param EnvelopeTemplate envelope_template:
4700        :return: TemplateUpdateSummary
4701                 If the method is called asynchronously,
4702                 returns the request thread.
4703        """
4704
4705        all_params = ['account_id', 'template_id', 'envelope_template']
4706        all_params.append('callback')
4707        all_params.append('_return_http_data_only')
4708        all_params.append('_preload_content')
4709        all_params.append('_request_timeout')
4710
4711        params = locals()
4712        for key, val in iteritems(params['kwargs']):
4713            if key not in all_params:
4714                raise TypeError(
4715                    "Got an unexpected keyword argument '%s'"
4716                    " to method update" % key
4717                )
4718            params[key] = val
4719        del params['kwargs']
4720        # verify the required parameter 'account_id' is set
4721        if ('account_id' not in params) or (params['account_id'] is None):
4722            raise ValueError("Missing the required parameter `account_id` when calling `update`")
4723        # verify the required parameter 'template_id' is set
4724        if ('template_id' not in params) or (params['template_id'] is None):
4725            raise ValueError("Missing the required parameter `template_id` when calling `update`")
4726
4727
4728        collection_formats = {}
4729
4730        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
4731        path_params = {}
4732        if 'account_id' in params:
4733            path_params['accountId'] = params['account_id']
4734        if 'template_id' in params:
4735            path_params['templateId'] = params['template_id']
4736
4737        query_params = {}
4738
4739        header_params = {}
4740
4741        form_params = []
4742        local_var_files = {}
4743
4744        body_params = None
4745        if 'envelope_template' in params:
4746            body_params = params['envelope_template']
4747        # HTTP header `Accept`
4748        header_params['Accept'] = self.api_client.\
4749            select_header_accept(['application/json'])
4750
4751        # Authentication setting
4752        auth_settings = []
4753
4754        return self.api_client.call_api(resource_path, 'PUT',
4755                                        path_params,
4756                                        query_params,
4757                                        header_params,
4758                                        body=body_params,
4759                                        post_params=form_params,
4760                                        files=local_var_files,
4761                                        response_type='TemplateUpdateSummary',
4762                                        auth_settings=auth_settings,
4763                                        callback=params.get('callback'),
4764                                        _return_http_data_only=params.get('_return_http_data_only'),
4765                                        _preload_content=params.get('_preload_content', True),
4766                                        _request_timeout=params.get('_request_timeout'),
4767                                        collection_formats=collection_formats)
4768
4769    def update_custom_fields(self, account_id, template_id, **kwargs):
4770        """
4771        Updates envelope custom fields in a template.
4772        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4773        This method makes a synchronous HTTP request by default. To make an
4774        asynchronous HTTP request, please define a `callback` function
4775        to be invoked when receiving the response.
4776        >>> def callback_function(response):
4777        >>>     pprint(response)
4778        >>>
4779        >>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function)
4780
4781        :param callback function: The callback function
4782            for asynchronous request. (optional)
4783        :param str account_id: The external account number (int) or account ID Guid. (required)
4784        :param str template_id: The ID of the template being accessed. (required)
4785        :param TemplateCustomFields template_custom_fields:
4786        :return: CustomFields
4787                 If the method is called asynchronously,
4788                 returns the request thread.
4789        """
4790        kwargs['_return_http_data_only'] = True
4791        if kwargs.get('callback'):
4792            return self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
4793        else:
4794            (data) = self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
4795            return data
4796
4797    def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
4798        """
4799        Updates envelope custom fields in a template.
4800        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4801        This method makes a synchronous HTTP request by default. To make an
4802        asynchronous HTTP request, please define a `callback` function
4803        to be invoked when receiving the response.
4804        >>> def callback_function(response):
4805        >>>     pprint(response)
4806        >>>
4807        >>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
4808
4809        :param callback function: The callback function
4810            for asynchronous request. (optional)
4811        :param str account_id: The external account number (int) or account ID Guid. (required)
4812        :param str template_id: The ID of the template being accessed. (required)
4813        :param TemplateCustomFields template_custom_fields:
4814        :return: CustomFields
4815                 If the method is called asynchronously,
4816                 returns the request thread.
4817        """
4818
4819        all_params = ['account_id', 'template_id', 'template_custom_fields']
4820        all_params.append('callback')
4821        all_params.append('_return_http_data_only')
4822        all_params.append('_preload_content')
4823        all_params.append('_request_timeout')
4824
4825        params = locals()
4826        for key, val in iteritems(params['kwargs']):
4827            if key not in all_params:
4828                raise TypeError(
4829                    "Got an unexpected keyword argument '%s'"
4830                    " to method update_custom_fields" % key
4831                )
4832            params[key] = val
4833        del params['kwargs']
4834        # verify the required parameter 'account_id' is set
4835        if ('account_id' not in params) or (params['account_id'] is None):
4836            raise ValueError("Missing the required parameter `account_id` when calling `update_custom_fields`")
4837        # verify the required parameter 'template_id' is set
4838        if ('template_id' not in params) or (params['template_id'] is None):
4839            raise ValueError("Missing the required parameter `template_id` when calling `update_custom_fields`")
4840
4841
4842        collection_formats = {}
4843
4844        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
4845        path_params = {}
4846        if 'account_id' in params:
4847            path_params['accountId'] = params['account_id']
4848        if 'template_id' in params:
4849            path_params['templateId'] = params['template_id']
4850
4851        query_params = {}
4852
4853        header_params = {}
4854
4855        form_params = []
4856        local_var_files = {}
4857
4858        body_params = None
4859        if 'template_custom_fields' in params:
4860            body_params = params['template_custom_fields']
4861        # HTTP header `Accept`
4862        header_params['Accept'] = self.api_client.\
4863            select_header_accept(['application/json'])
4864
4865        # Authentication setting
4866        auth_settings = []
4867
4868        return self.api_client.call_api(resource_path, 'PUT',
4869                                        path_params,
4870                                        query_params,
4871                                        header_params,
4872                                        body=body_params,
4873                                        post_params=form_params,
4874                                        files=local_var_files,
4875                                        response_type='CustomFields',
4876                                        auth_settings=auth_settings,
4877                                        callback=params.get('callback'),
4878                                        _return_http_data_only=params.get('_return_http_data_only'),
4879                                        _preload_content=params.get('_preload_content', True),
4880                                        _request_timeout=params.get('_request_timeout'),
4881                                        collection_formats=collection_formats)
4882
4883    def update_document(self, account_id, document_id, template_id, **kwargs):
4884        """
4885        Adds a document to a template document.
4886        Adds the specified document to an existing template document.
4887        This method makes a synchronous HTTP request by default. To make an
4888        asynchronous HTTP request, please define a `callback` function
4889        to be invoked when receiving the response.
4890        >>> def callback_function(response):
4891        >>>     pprint(response)
4892        >>>
4893        >>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function)
4894
4895        :param callback function: The callback function
4896            for asynchronous request. (optional)
4897        :param str account_id: The external account number (int) or account ID Guid. (required)
4898        :param str document_id: The ID of the document being accessed. (required)
4899        :param str template_id: The ID of the template being accessed. (required)
4900        :param str is_envelope_definition:
4901        :param EnvelopeDefinition envelope_definition:
4902        :return: EnvelopeDocument
4903                 If the method is called asynchronously,
4904                 returns the request thread.
4905        """
4906        kwargs['_return_http_data_only'] = True
4907        if kwargs.get('callback'):
4908            return self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
4909        else:
4910            (data) = self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
4911            return data
4912
4913    def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
4914        """
4915        Adds a document to a template document.
4916        Adds the specified document to an existing template document.
4917        This method makes a synchronous HTTP request by default. To make an
4918        asynchronous HTTP request, please define a `callback` function
4919        to be invoked when receiving the response.
4920        >>> def callback_function(response):
4921        >>>     pprint(response)
4922        >>>
4923        >>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
4924
4925        :param callback function: The callback function
4926            for asynchronous request. (optional)
4927        :param str account_id: The external account number (int) or account ID Guid. (required)
4928        :param str document_id: The ID of the document being accessed. (required)
4929        :param str template_id: The ID of the template being accessed. (required)
4930        :param str is_envelope_definition:
4931        :param EnvelopeDefinition envelope_definition:
4932        :return: EnvelopeDocument
4933                 If the method is called asynchronously,
4934                 returns the request thread.
4935        """
4936
4937        all_params = ['account_id', 'document_id', 'template_id', 'is_envelope_definition', 'envelope_definition']
4938        all_params.append('callback')
4939        all_params.append('_return_http_data_only')
4940        all_params.append('_preload_content')
4941        all_params.append('_request_timeout')
4942
4943        params = locals()
4944        for key, val in iteritems(params['kwargs']):
4945            if key not in all_params:
4946                raise TypeError(
4947                    "Got an unexpected keyword argument '%s'"
4948                    " to method update_document" % key
4949                )
4950            params[key] = val
4951        del params['kwargs']
4952        # verify the required parameter 'account_id' is set
4953        if ('account_id' not in params) or (params['account_id'] is None):
4954            raise ValueError("Missing the required parameter `account_id` when calling `update_document`")
4955        # verify the required parameter 'document_id' is set
4956        if ('document_id' not in params) or (params['document_id'] is None):
4957            raise ValueError("Missing the required parameter `document_id` when calling `update_document`")
4958        # verify the required parameter 'template_id' is set
4959        if ('template_id' not in params) or (params['template_id'] is None):
4960            raise ValueError("Missing the required parameter `template_id` when calling `update_document`")
4961
4962
4963        collection_formats = {}
4964
4965        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
4966        path_params = {}
4967        if 'account_id' in params:
4968            path_params['accountId'] = params['account_id']
4969        if 'document_id' in params:
4970            path_params['documentId'] = params['document_id']
4971        if 'template_id' in params:
4972            path_params['templateId'] = params['template_id']
4973
4974        query_params = {}
4975        if 'is_envelope_definition' in params:
4976            query_params['is_envelope_definition'] = params['is_envelope_definition']
4977
4978        header_params = {}
4979
4980        form_params = []
4981        local_var_files = {}
4982
4983        body_params = None
4984        if 'envelope_definition' in params:
4985            body_params = params['envelope_definition']
4986        # HTTP header `Accept`
4987        header_params['Accept'] = self.api_client.\
4988            select_header_accept(['application/json'])
4989
4990        # Authentication setting
4991        auth_settings = []
4992
4993        return self.api_client.call_api(resource_path, 'PUT',
4994                                        path_params,
4995                                        query_params,
4996                                        header_params,
4997                                        body=body_params,
4998                                        post_params=form_params,
4999                                        files=local_var_files,
5000                                        response_type='EnvelopeDocument',
5001                                        auth_settings=auth_settings,
5002                                        callback=params.get('callback'),
5003                                        _return_http_data_only=params.get('_return_http_data_only'),
5004                                        _preload_content=params.get('_preload_content', True),
5005                                        _request_timeout=params.get('_request_timeout'),
5006                                        collection_formats=collection_formats)
5007
5008    def update_document_fields(self, account_id, document_id, template_id, **kwargs):
5009        """
5010        Updates existing custom document fields in an existing template document.
5011        Updates existing custom document fields in an existing template document.
5012        This method makes a synchronous HTTP request by default. To make an
5013        asynchronous HTTP request, please define a `callback` function
5014        to be invoked when receiving the response.
5015        >>> def callback_function(response):
5016        >>>     pprint(response)
5017        >>>
5018        >>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function)
5019
5020        :param callback function: The callback function
5021            for asynchronous request. (optional)
5022        :param str account_id: The external account number (int) or account ID Guid. (required)
5023        :param str document_id: The ID of the document being accessed. (required)
5024        :param str template_id: The ID of the template being accessed. (required)
5025        :param DocumentFieldsInformation document_fields_information:
5026        :return: DocumentFieldsInformation
5027                 If the method is called asynchronously,
5028                 returns the request thread.
5029        """
5030        kwargs['_return_http_data_only'] = True
5031        if kwargs.get('callback'):
5032            return self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5033        else:
5034            (data) = self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5035            return data
5036
5037    def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
5038        """
5039        Updates existing custom document fields in an existing template document.
5040        Updates existing custom document fields in an existing template document.
5041        This method makes a synchronous HTTP request by default. To make an
5042        asynchronous HTTP request, please define a `callback` function
5043        to be invoked when receiving the response.
5044        >>> def callback_function(response):
5045        >>>     pprint(response)
5046        >>>
5047        >>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
5048
5049        :param callback function: The callback function
5050            for asynchronous request. (optional)
5051        :param str account_id: The external account number (int) or account ID Guid. (required)
5052        :param str document_id: The ID of the document being accessed. (required)
5053        :param str template_id: The ID of the template being accessed. (required)
5054        :param DocumentFieldsInformation document_fields_information:
5055        :return: DocumentFieldsInformation
5056                 If the method is called asynchronously,
5057                 returns the request thread.
5058        """
5059
5060        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
5061        all_params.append('callback')
5062        all_params.append('_return_http_data_only')
5063        all_params.append('_preload_content')
5064        all_params.append('_request_timeout')
5065
5066        params = locals()
5067        for key, val in iteritems(params['kwargs']):
5068            if key not in all_params:
5069                raise TypeError(
5070                    "Got an unexpected keyword argument '%s'"
5071                    " to method update_document_fields" % key
5072                )
5073            params[key] = val
5074        del params['kwargs']
5075        # verify the required parameter 'account_id' is set
5076        if ('account_id' not in params) or (params['account_id'] is None):
5077            raise ValueError("Missing the required parameter `account_id` when calling `update_document_fields`")
5078        # verify the required parameter 'document_id' is set
5079        if ('document_id' not in params) or (params['document_id'] is None):
5080            raise ValueError("Missing the required parameter `document_id` when calling `update_document_fields`")
5081        # verify the required parameter 'template_id' is set
5082        if ('template_id' not in params) or (params['template_id'] is None):
5083            raise ValueError("Missing the required parameter `template_id` when calling `update_document_fields`")
5084
5085
5086        collection_formats = {}
5087
5088        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
5089        path_params = {}
5090        if 'account_id' in params:
5091            path_params['accountId'] = params['account_id']
5092        if 'document_id' in params:
5093            path_params['documentId'] = params['document_id']
5094        if 'template_id' in params:
5095            path_params['templateId'] = params['template_id']
5096
5097        query_params = {}
5098
5099        header_params = {}
5100
5101        form_params = []
5102        local_var_files = {}
5103
5104        body_params = None
5105        if 'document_fields_information' in params:
5106            body_params = params['document_fields_information']
5107        # HTTP header `Accept`
5108        header_params['Accept'] = self.api_client.\
5109            select_header_accept(['application/json'])
5110
5111        # Authentication setting
5112        auth_settings = []
5113
5114        return self.api_client.call_api(resource_path, 'PUT',
5115                                        path_params,
5116                                        query_params,
5117                                        header_params,
5118                                        body=body_params,
5119                                        post_params=form_params,
5120                                        files=local_var_files,
5121                                        response_type='DocumentFieldsInformation',
5122                                        auth_settings=auth_settings,
5123                                        callback=params.get('callback'),
5124                                        _return_http_data_only=params.get('_return_http_data_only'),
5125                                        _preload_content=params.get('_preload_content', True),
5126                                        _request_timeout=params.get('_request_timeout'),
5127                                        collection_formats=collection_formats)
5128
5129    def update_documents(self, account_id, template_id, **kwargs):
5130        """
5131        Adds documents to a template document.
5132        Adds one or more documents to an existing template document.
5133        This method makes a synchronous HTTP request by default. To make an
5134        asynchronous HTTP request, please define a `callback` function
5135        to be invoked when receiving the response.
5136        >>> def callback_function(response):
5137        >>>     pprint(response)
5138        >>>
5139        >>> thread = api.update_documents(account_id, template_id, callback=callback_function)
5140
5141        :param callback function: The callback function
5142            for asynchronous request. (optional)
5143        :param str account_id: The external account number (int) or account ID Guid. (required)
5144        :param str template_id: The ID of the template being accessed. (required)
5145        :param EnvelopeDefinition envelope_definition:
5146        :return: TemplateDocumentsResult
5147                 If the method is called asynchronously,
5148                 returns the request thread.
5149        """
5150        kwargs['_return_http_data_only'] = True
5151        if kwargs.get('callback'):
5152            return self.update_documents_with_http_info(account_id, template_id, **kwargs)
5153        else:
5154            (data) = self.update_documents_with_http_info(account_id, template_id, **kwargs)
5155            return data
5156
5157    def update_documents_with_http_info(self, account_id, template_id, **kwargs):
5158        """
5159        Adds documents to a template document.
5160        Adds one or more documents to an existing template document.
5161        This method makes a synchronous HTTP request by default. To make an
5162        asynchronous HTTP request, please define a `callback` function
5163        to be invoked when receiving the response.
5164        >>> def callback_function(response):
5165        >>>     pprint(response)
5166        >>>
5167        >>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function)
5168
5169        :param callback function: The callback function
5170            for asynchronous request. (optional)
5171        :param str account_id: The external account number (int) or account ID Guid. (required)
5172        :param str template_id: The ID of the template being accessed. (required)
5173        :param EnvelopeDefinition envelope_definition:
5174        :return: TemplateDocumentsResult
5175                 If the method is called asynchronously,
5176                 returns the request thread.
5177        """
5178
5179        all_params = ['account_id', 'template_id', 'envelope_definition']
5180        all_params.append('callback')
5181        all_params.append('_return_http_data_only')
5182        all_params.append('_preload_content')
5183        all_params.append('_request_timeout')
5184
5185        params = locals()
5186        for key, val in iteritems(params['kwargs']):
5187            if key not in all_params:
5188                raise TypeError(
5189                    "Got an unexpected keyword argument '%s'"
5190                    " to method update_documents" % key
5191                )
5192            params[key] = val
5193        del params['kwargs']
5194        # verify the required parameter 'account_id' is set
5195        if ('account_id' not in params) or (params['account_id'] is None):
5196            raise ValueError("Missing the required parameter `account_id` when calling `update_documents`")
5197        # verify the required parameter 'template_id' is set
5198        if ('template_id' not in params) or (params['template_id'] is None):
5199            raise ValueError("Missing the required parameter `template_id` when calling `update_documents`")
5200
5201
5202        collection_formats = {}
5203
5204        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
5205        path_params = {}
5206        if 'account_id' in params:
5207            path_params['accountId'] = params['account_id']
5208        if 'template_id' in params:
5209            path_params['templateId'] = params['template_id']
5210
5211        query_params = {}
5212
5213        header_params = {}
5214
5215        form_params = []
5216        local_var_files = {}
5217
5218        body_params = None
5219        if 'envelope_definition' in params:
5220            body_params = params['envelope_definition']
5221        # HTTP header `Accept`
5222        header_params['Accept'] = self.api_client.\
5223            select_header_accept(['application/json'])
5224
5225        # Authentication setting
5226        auth_settings = []
5227
5228        return self.api_client.call_api(resource_path, 'PUT',
5229                                        path_params,
5230                                        query_params,
5231                                        header_params,
5232                                        body=body_params,
5233                                        post_params=form_params,
5234                                        files=local_var_files,
5235                                        response_type='TemplateDocumentsResult',
5236                                        auth_settings=auth_settings,
5237                                        callback=params.get('callback'),
5238                                        _return_http_data_only=params.get('_return_http_data_only'),
5239                                        _preload_content=params.get('_preload_content', True),
5240                                        _request_timeout=params.get('_request_timeout'),
5241                                        collection_formats=collection_formats)
5242
5243    def update_group_share(self, account_id, template_id, template_part, **kwargs):
5244        """
5245        Shares a template with a group
5246        Shares a template with the specified members group.
5247        This method makes a synchronous HTTP request by default. To make an
5248        asynchronous HTTP request, please define a `callback` function
5249        to be invoked when receiving the response.
5250        >>> def callback_function(response):
5251        >>>     pprint(response)
5252        >>>
5253        >>> thread = api.update_group_share(account_id, template_id, template_part, callback=callback_function)
5254
5255        :param callback function: The callback function
5256            for asynchronous request. (optional)
5257        :param str account_id: The external account number (int) or account ID Guid. (required)
5258        :param str template_id: The ID of the template being accessed. (required)
5259        :param str template_part: Currently, the only defined part is **groups**. (required)
5260        :param GroupInformation group_information:
5261        :return: GroupInformation
5262                 If the method is called asynchronously,
5263                 returns the request thread.
5264        """
5265        kwargs['_return_http_data_only'] = True
5266        if kwargs.get('callback'):
5267            return self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5268        else:
5269            (data) = self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5270            return data
5271
5272    def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
5273        """
5274        Shares a template with a group
5275        Shares a template with the specified members group.
5276        This method makes a synchronous HTTP request by default. To make an
5277        asynchronous HTTP request, please define a `callback` function
5278        to be invoked when receiving the response.
5279        >>> def callback_function(response):
5280        >>>     pprint(response)
5281        >>>
5282        >>> thread = api.update_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
5283
5284        :param callback function: The callback function
5285            for asynchronous request. (optional)
5286        :param str account_id: The external account number (int) or account ID Guid. (required)
5287        :param str template_id: The ID of the template being accessed. (required)
5288        :param str template_part: Currently, the only defined part is **groups**. (required)
5289        :param GroupInformation group_information:
5290        :return: GroupInformation
5291                 If the method is called asynchronously,
5292                 returns the request thread.
5293        """
5294
5295        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
5296        all_params.append('callback')
5297        all_params.append('_return_http_data_only')
5298        all_params.append('_preload_content')
5299        all_params.append('_request_timeout')
5300
5301        params = locals()
5302        for key, val in iteritems(params['kwargs']):
5303            if key not in all_params:
5304                raise TypeError(
5305                    "Got an unexpected keyword argument '%s'"
5306                    " to method update_group_share" % key
5307                )
5308            params[key] = val
5309        del params['kwargs']
5310        # verify the required parameter 'account_id' is set
5311        if ('account_id' not in params) or (params['account_id'] is None):
5312            raise ValueError("Missing the required parameter `account_id` when calling `update_group_share`")
5313        # verify the required parameter 'template_id' is set
5314        if ('template_id' not in params) or (params['template_id'] is None):
5315            raise ValueError("Missing the required parameter `template_id` when calling `update_group_share`")
5316        # verify the required parameter 'template_part' is set
5317        if ('template_part' not in params) or (params['template_part'] is None):
5318            raise ValueError("Missing the required parameter `template_part` when calling `update_group_share`")
5319
5320
5321        collection_formats = {}
5322
5323        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
5324        path_params = {}
5325        if 'account_id' in params:
5326            path_params['accountId'] = params['account_id']
5327        if 'template_id' in params:
5328            path_params['templateId'] = params['template_id']
5329        if 'template_part' in params:
5330            path_params['templatePart'] = params['template_part']
5331
5332        query_params = {}
5333
5334        header_params = {}
5335
5336        form_params = []
5337        local_var_files = {}
5338
5339        body_params = None
5340        if 'group_information' in params:
5341            body_params = params['group_information']
5342        # HTTP header `Accept`
5343        header_params['Accept'] = self.api_client.\
5344            select_header_accept(['application/json'])
5345
5346        # Authentication setting
5347        auth_settings = []
5348
5349        return self.api_client.call_api(resource_path, 'PUT',
5350                                        path_params,
5351                                        query_params,
5352                                        header_params,
5353                                        body=body_params,
5354                                        post_params=form_params,
5355                                        files=local_var_files,
5356                                        response_type='GroupInformation',
5357                                        auth_settings=auth_settings,
5358                                        callback=params.get('callback'),
5359                                        _return_http_data_only=params.get('_return_http_data_only'),
5360                                        _preload_content=params.get('_preload_content', True),
5361                                        _request_timeout=params.get('_request_timeout'),
5362                                        collection_formats=collection_formats)
5363
5364    def update_lock(self, account_id, template_id, **kwargs):
5365        """
5366        Updates a template lock.
5367        Updates the lock duration time or update the `lockedByApp` property information for the specified template. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated.
5368        This method makes a synchronous HTTP request by default. To make an
5369        asynchronous HTTP request, please define a `callback` function
5370        to be invoked when receiving the response.
5371        >>> def callback_function(response):
5372        >>>     pprint(response)
5373        >>>
5374        >>> thread = api.update_lock(account_id, template_id, callback=callback_function)
5375
5376        :param callback function: The callback function
5377            for asynchronous request. (optional)
5378        :param str account_id: The external account number (int) or account ID Guid. (required)
5379        :param str template_id: The ID of the template being accessed. (required)
5380        :param LockRequest lock_request:
5381        :return: LockInformation
5382                 If the method is called asynchronously,
5383                 returns the request thread.
5384        """
5385        kwargs['_return_http_data_only'] = True
5386        if kwargs.get('callback'):
5387            return self.update_lock_with_http_info(account_id, template_id, **kwargs)
5388        else:
5389            (data) = self.update_lock_with_http_info(account_id, template_id, **kwargs)
5390            return data
5391
5392    def update_lock_with_http_info(self, account_id, template_id, **kwargs):
5393        """
5394        Updates a template lock.
5395        Updates the lock duration time or update the `lockedByApp` property information for the specified template. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated.
5396        This method makes a synchronous HTTP request by default. To make an
5397        asynchronous HTTP request, please define a `callback` function
5398        to be invoked when receiving the response.
5399        >>> def callback_function(response):
5400        >>>     pprint(response)
5401        >>>
5402        >>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function)
5403
5404        :param callback function: The callback function
5405            for asynchronous request. (optional)
5406        :param str account_id: The external account number (int) or account ID Guid. (required)
5407        :param str template_id: The ID of the template being accessed. (required)
5408        :param LockRequest lock_request:
5409        :return: LockInformation
5410                 If the method is called asynchronously,
5411                 returns the request thread.
5412        """
5413
5414        all_params = ['account_id', 'template_id', 'lock_request']
5415        all_params.append('callback')
5416        all_params.append('_return_http_data_only')
5417        all_params.append('_preload_content')
5418        all_params.append('_request_timeout')
5419
5420        params = locals()
5421        for key, val in iteritems(params['kwargs']):
5422            if key not in all_params:
5423                raise TypeError(
5424                    "Got an unexpected keyword argument '%s'"
5425                    " to method update_lock" % key
5426                )
5427            params[key] = val
5428        del params['kwargs']
5429        # verify the required parameter 'account_id' is set
5430        if ('account_id' not in params) or (params['account_id'] is None):
5431            raise ValueError("Missing the required parameter `account_id` when calling `update_lock`")
5432        # verify the required parameter 'template_id' is set
5433        if ('template_id' not in params) or (params['template_id'] is None):
5434            raise ValueError("Missing the required parameter `template_id` when calling `update_lock`")
5435
5436
5437        collection_formats = {}
5438
5439        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
5440        path_params = {}
5441        if 'account_id' in params:
5442            path_params['accountId'] = params['account_id']
5443        if 'template_id' in params:
5444            path_params['templateId'] = params['template_id']
5445
5446        query_params = {}
5447
5448        header_params = {}
5449
5450        form_params = []
5451        local_var_files = {}
5452
5453        body_params = None
5454        if 'lock_request' in params:
5455            body_params = params['lock_request']
5456        # HTTP header `Accept`
5457        header_params['Accept'] = self.api_client.\
5458            select_header_accept(['application/json'])
5459
5460        # Authentication setting
5461        auth_settings = []
5462
5463        return self.api_client.call_api(resource_path, 'PUT',
5464                                        path_params,
5465                                        query_params,
5466                                        header_params,
5467                                        body=body_params,
5468                                        post_params=form_params,
5469                                        files=local_var_files,
5470                                        response_type='LockInformation',
5471                                        auth_settings=auth_settings,
5472                                        callback=params.get('callback'),
5473                                        _return_http_data_only=params.get('_return_http_data_only'),
5474                                        _preload_content=params.get('_preload_content', True),
5475                                        _request_timeout=params.get('_request_timeout'),
5476                                        collection_formats=collection_formats)
5477
5478    def update_notification_settings(self, account_id, template_id, **kwargs):
5479        """
5480        Updates the notification  structure for an existing template.
5481        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5482        This method makes a synchronous HTTP request by default. To make an
5483        asynchronous HTTP request, please define a `callback` function
5484        to be invoked when receiving the response.
5485        >>> def callback_function(response):
5486        >>>     pprint(response)
5487        >>>
5488        >>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function)
5489
5490        :param callback function: The callback function
5491            for asynchronous request. (optional)
5492        :param str account_id: The external account number (int) or account ID Guid. (required)
5493        :param str template_id: The ID of the template being accessed. (required)
5494        :param TemplateNotificationRequest template_notification_request:
5495        :return: Notification
5496                 If the method is called asynchronously,
5497                 returns the request thread.
5498        """
5499        kwargs['_return_http_data_only'] = True
5500        if kwargs.get('callback'):
5501            return self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5502        else:
5503            (data) = self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5504            return data
5505
5506    def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
5507        """
5508        Updates the notification  structure for an existing template.
5509        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5510        This method makes a synchronous HTTP request by default. To make an
5511        asynchronous HTTP request, please define a `callback` function
5512        to be invoked when receiving the response.
5513        >>> def callback_function(response):
5514        >>>     pprint(response)
5515        >>>
5516        >>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
5517
5518        :param callback function: The callback function
5519            for asynchronous request. (optional)
5520        :param str account_id: The external account number (int) or account ID Guid. (required)
5521        :param str template_id: The ID of the template being accessed. (required)
5522        :param TemplateNotificationRequest template_notification_request:
5523        :return: Notification
5524                 If the method is called asynchronously,
5525                 returns the request thread.
5526        """
5527
5528        all_params = ['account_id', 'template_id', 'template_notification_request']
5529        all_params.append('callback')
5530        all_params.append('_return_http_data_only')
5531        all_params.append('_preload_content')
5532        all_params.append('_request_timeout')
5533
5534        params = locals()
5535        for key, val in iteritems(params['kwargs']):
5536            if key not in all_params:
5537                raise TypeError(
5538                    "Got an unexpected keyword argument '%s'"
5539                    " to method update_notification_settings" % key
5540                )
5541            params[key] = val
5542        del params['kwargs']
5543        # verify the required parameter 'account_id' is set
5544        if ('account_id' not in params) or (params['account_id'] is None):
5545            raise ValueError("Missing the required parameter `account_id` when calling `update_notification_settings`")
5546        # verify the required parameter 'template_id' is set
5547        if ('template_id' not in params) or (params['template_id'] is None):
5548            raise ValueError("Missing the required parameter `template_id` when calling `update_notification_settings`")
5549
5550
5551        collection_formats = {}
5552
5553        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
5554        path_params = {}
5555        if 'account_id' in params:
5556            path_params['accountId'] = params['account_id']
5557        if 'template_id' in params:
5558            path_params['templateId'] = params['template_id']
5559
5560        query_params = {}
5561
5562        header_params = {}
5563
5564        form_params = []
5565        local_var_files = {}
5566
5567        body_params = None
5568        if 'template_notification_request' in params:
5569            body_params = params['template_notification_request']
5570        # HTTP header `Accept`
5571        header_params['Accept'] = self.api_client.\
5572            select_header_accept(['application/json'])
5573
5574        # Authentication setting
5575        auth_settings = []
5576
5577        return self.api_client.call_api(resource_path, 'PUT',
5578                                        path_params,
5579                                        query_params,
5580                                        header_params,
5581                                        body=body_params,
5582                                        post_params=form_params,
5583                                        files=local_var_files,
5584                                        response_type='Notification',
5585                                        auth_settings=auth_settings,
5586                                        callback=params.get('callback'),
5587                                        _return_http_data_only=params.get('_return_http_data_only'),
5588                                        _preload_content=params.get('_preload_content', True),
5589                                        _request_timeout=params.get('_request_timeout'),
5590                                        collection_formats=collection_formats)
5591
5592    def update_recipients(self, account_id, template_id, **kwargs):
5593        """
5594        Updates recipients in a template.
5595        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5596        This method makes a synchronous HTTP request by default. To make an
5597        asynchronous HTTP request, please define a `callback` function
5598        to be invoked when receiving the response.
5599        >>> def callback_function(response):
5600        >>>     pprint(response)
5601        >>>
5602        >>> thread = api.update_recipients(account_id, template_id, callback=callback_function)
5603
5604        :param callback function: The callback function
5605            for asynchronous request. (optional)
5606        :param str account_id: The external account number (int) or account ID Guid. (required)
5607        :param str template_id: The ID of the template being accessed. (required)
5608        :param str resend_envelope:
5609        :param TemplateRecipients template_recipients:
5610        :return: RecipientsUpdateSummary
5611                 If the method is called asynchronously,
5612                 returns the request thread.
5613        """
5614        kwargs['_return_http_data_only'] = True
5615        if kwargs.get('callback'):
5616            return self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5617        else:
5618            (data) = self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5619            return data
5620
5621    def update_recipients_with_http_info(self, account_id, template_id, **kwargs):
5622        """
5623        Updates recipients in a template.
5624        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5625        This method makes a synchronous HTTP request by default. To make an
5626        asynchronous HTTP request, please define a `callback` function
5627        to be invoked when receiving the response.
5628        >>> def callback_function(response):
5629        >>>     pprint(response)
5630        >>>
5631        >>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function)
5632
5633        :param callback function: The callback function
5634            for asynchronous request. (optional)
5635        :param str account_id: The external account number (int) or account ID Guid. (required)
5636        :param str template_id: The ID of the template being accessed. (required)
5637        :param str resend_envelope:
5638        :param TemplateRecipients template_recipients:
5639        :return: RecipientsUpdateSummary
5640                 If the method is called asynchronously,
5641                 returns the request thread.
5642        """
5643
5644        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
5645        all_params.append('callback')
5646        all_params.append('_return_http_data_only')
5647        all_params.append('_preload_content')
5648        all_params.append('_request_timeout')
5649
5650        params = locals()
5651        for key, val in iteritems(params['kwargs']):
5652            if key not in all_params:
5653                raise TypeError(
5654                    "Got an unexpected keyword argument '%s'"
5655                    " to method update_recipients" % key
5656                )
5657            params[key] = val
5658        del params['kwargs']
5659        # verify the required parameter 'account_id' is set
5660        if ('account_id' not in params) or (params['account_id'] is None):
5661            raise ValueError("Missing the required parameter `account_id` when calling `update_recipients`")
5662        # verify the required parameter 'template_id' is set
5663        if ('template_id' not in params) or (params['template_id'] is None):
5664            raise ValueError("Missing the required parameter `template_id` when calling `update_recipients`")
5665
5666
5667        collection_formats = {}
5668
5669        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
5670        path_params = {}
5671        if 'account_id' in params:
5672            path_params['accountId'] = params['account_id']
5673        if 'template_id' in params:
5674            path_params['templateId'] = params['template_id']
5675
5676        query_params = {}
5677        if 'resend_envelope' in params:
5678            query_params['resend_envelope'] = params['resend_envelope']
5679
5680        header_params = {}
5681
5682        form_params = []
5683        local_var_files = {}
5684
5685        body_params = None
5686        if 'template_recipients' in params:
5687            body_params = params['template_recipients']
5688        # HTTP header `Accept`
5689        header_params['Accept'] = self.api_client.\
5690            select_header_accept(['application/json'])
5691
5692        # Authentication setting
5693        auth_settings = []
5694
5695        return self.api_client.call_api(resource_path, 'PUT',
5696                                        path_params,
5697                                        query_params,
5698                                        header_params,
5699                                        body=body_params,
5700                                        post_params=form_params,
5701                                        files=local_var_files,
5702                                        response_type='RecipientsUpdateSummary',
5703                                        auth_settings=auth_settings,
5704                                        callback=params.get('callback'),
5705                                        _return_http_data_only=params.get('_return_http_data_only'),
5706                                        _preload_content=params.get('_preload_content', True),
5707                                        _request_timeout=params.get('_request_timeout'),
5708                                        collection_formats=collection_formats)
5709
5710    def update_tabs(self, account_id, recipient_id, template_id, **kwargs):
5711        """
5712        Updates the tabs for a recipient.
5713        Updates one or more tabs for a recipient in a template.
5714        This method makes a synchronous HTTP request by default. To make an
5715        asynchronous HTTP request, please define a `callback` function
5716        to be invoked when receiving the response.
5717        >>> def callback_function(response):
5718        >>>     pprint(response)
5719        >>>
5720        >>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function)
5721
5722        :param callback function: The callback function
5723            for asynchronous request. (optional)
5724        :param str account_id: The external account number (int) or account ID Guid. (required)
5725        :param str recipient_id: The ID of the recipient being accessed. (required)
5726        :param str template_id: The ID of the template being accessed. (required)
5727        :param TemplateTabs template_tabs:
5728        :return: Tabs
5729                 If the method is called asynchronously,
5730                 returns the request thread.
5731        """
5732        kwargs['_return_http_data_only'] = True
5733        if kwargs.get('callback'):
5734            return self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5735        else:
5736            (data) = self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5737            return data
5738
5739    def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
5740        """
5741        Updates the tabs for a recipient.
5742        Updates one or more tabs for a recipient in a template.
5743        This method makes a synchronous HTTP request by default. To make an
5744        asynchronous HTTP request, please define a `callback` function
5745        to be invoked when receiving the response.
5746        >>> def callback_function(response):
5747        >>>     pprint(response)
5748        >>>
5749        >>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
5750
5751        :param callback function: The callback function
5752            for asynchronous request. (optional)
5753        :param str account_id: The external account number (int) or account ID Guid. (required)
5754        :param str recipient_id: The ID of the recipient being accessed. (required)
5755        :param str template_id: The ID of the template being accessed. (required)
5756        :param TemplateTabs template_tabs:
5757        :return: Tabs
5758                 If the method is called asynchronously,
5759                 returns the request thread.
5760        """
5761
5762        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
5763        all_params.append('callback')
5764        all_params.append('_return_http_data_only')
5765        all_params.append('_preload_content')
5766        all_params.append('_request_timeout')
5767
5768        params = locals()
5769        for key, val in iteritems(params['kwargs']):
5770            if key not in all_params:
5771                raise TypeError(
5772                    "Got an unexpected keyword argument '%s'"
5773                    " to method update_tabs" % key
5774                )
5775            params[key] = val
5776        del params['kwargs']
5777        # verify the required parameter 'account_id' is set
5778        if ('account_id' not in params) or (params['account_id'] is None):
5779            raise ValueError("Missing the required parameter `account_id` when calling `update_tabs`")
5780        # verify the required parameter 'recipient_id' is set
5781        if ('recipient_id' not in params) or (params['recipient_id'] is None):
5782            raise ValueError("Missing the required parameter `recipient_id` when calling `update_tabs`")
5783        # verify the required parameter 'template_id' is set
5784        if ('template_id' not in params) or (params['template_id'] is None):
5785            raise ValueError("Missing the required parameter `template_id` when calling `update_tabs`")
5786
5787
5788        collection_formats = {}
5789
5790        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
5791        path_params = {}
5792        if 'account_id' in params:
5793            path_params['accountId'] = params['account_id']
5794        if 'recipient_id' in params:
5795            path_params['recipientId'] = params['recipient_id']
5796        if 'template_id' in params:
5797            path_params['templateId'] = params['template_id']
5798
5799        query_params = {}
5800
5801        header_params = {}
5802
5803        form_params = []
5804        local_var_files = {}
5805
5806        body_params = None
5807        if 'template_tabs' in params:
5808            body_params = params['template_tabs']
5809        # HTTP header `Accept`
5810        header_params['Accept'] = self.api_client.\
5811            select_header_accept(['application/json'])
5812
5813        # Authentication setting
5814        auth_settings = []
5815
5816        return self.api_client.call_api(resource_path, 'PUT',
5817                                        path_params,
5818                                        query_params,
5819                                        header_params,
5820                                        body=body_params,
5821                                        post_params=form_params,
5822                                        files=local_var_files,
5823                                        response_type='Tabs',
5824                                        auth_settings=auth_settings,
5825                                        callback=params.get('callback'),
5826                                        _return_http_data_only=params.get('_return_http_data_only'),
5827                                        _preload_content=params.get('_preload_content', True),
5828                                        _request_timeout=params.get('_request_timeout'),
5829                                        collection_formats=collection_formats)
5830
5831    def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
5832        """
5833        Updates the tabs for a template
5834        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
5835        This method makes a synchronous HTTP request by default. To make an
5836        asynchronous HTTP request, please define a `callback` function
5837        to be invoked when receiving the response.
5838        >>> def callback_function(response):
5839        >>>     pprint(response)
5840        >>>
5841        >>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
5842
5843        :param callback function: The callback function
5844            for asynchronous request. (optional)
5845        :param str account_id: The external account number (int) or account ID Guid. (required)
5846        :param str document_id: The ID of the document being accessed. (required)
5847        :param str template_id: The ID of the template being accessed. (required)
5848        :param TemplateTabs template_tabs:
5849        :return: Tabs
5850                 If the method is called asynchronously,
5851                 returns the request thread.
5852        """
5853        kwargs['_return_http_data_only'] = True
5854        if kwargs.get('callback'):
5855            return self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
5856        else:
5857            (data) = self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
5858            return data
5859
5860    def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
5861        """
5862        Updates the tabs for a template
5863        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
5864        This method makes a synchronous HTTP request by default. To make an
5865        asynchronous HTTP request, please define a `callback` function
5866        to be invoked when receiving the response.
5867        >>> def callback_function(response):
5868        >>>     pprint(response)
5869        >>>
5870        >>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
5871
5872        :param callback function: The callback function
5873            for asynchronous request. (optional)
5874        :param str account_id: The external account number (int) or account ID Guid. (required)
5875        :param str document_id: The ID of the document being accessed. (required)
5876        :param str template_id: The ID of the template being accessed. (required)
5877        :param TemplateTabs template_tabs:
5878        :return: Tabs
5879                 If the method is called asynchronously,
5880                 returns the request thread.
5881        """
5882
5883        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
5884        all_params.append('callback')
5885        all_params.append('_return_http_data_only')
5886        all_params.append('_preload_content')
5887        all_params.append('_request_timeout')
5888
5889        params = locals()
5890        for key, val in iteritems(params['kwargs']):
5891            if key not in all_params:
5892                raise TypeError(
5893                    "Got an unexpected keyword argument '%s'"
5894                    " to method update_template_document_tabs" % key
5895                )
5896            params[key] = val
5897        del params['kwargs']
5898        # verify the required parameter 'account_id' is set
5899        if ('account_id' not in params) or (params['account_id'] is None):
5900            raise ValueError("Missing the required parameter `account_id` when calling `update_template_document_tabs`")
5901        # verify the required parameter 'document_id' is set
5902        if ('document_id' not in params) or (params['document_id'] is None):
5903            raise ValueError("Missing the required parameter `document_id` when calling `update_template_document_tabs`")
5904        # verify the required parameter 'template_id' is set
5905        if ('template_id' not in params) or (params['template_id'] is None):
5906            raise ValueError("Missing the required parameter `template_id` when calling `update_template_document_tabs`")
5907
5908
5909        collection_formats = {}
5910
5911        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
5912        path_params = {}
5913        if 'account_id' in params:
5914            path_params['accountId'] = params['account_id']
5915        if 'document_id' in params:
5916            path_params['documentId'] = params['document_id']
5917        if 'template_id' in params:
5918            path_params['templateId'] = params['template_id']
5919
5920        query_params = {}
5921
5922        header_params = {}
5923
5924        form_params = []
5925        local_var_files = {}
5926
5927        body_params = None
5928        if 'template_tabs' in params:
5929            body_params = params['template_tabs']
5930        # HTTP header `Accept`
5931        header_params['Accept'] = self.api_client.\
5932            select_header_accept(['application/json'])
5933
5934        # Authentication setting
5935        auth_settings = []
5936
5937        return self.api_client.call_api(resource_path, 'PUT',
5938                                        path_params,
5939                                        query_params,
5940                                        header_params,
5941                                        body=body_params,
5942                                        post_params=form_params,
5943                                        files=local_var_files,
5944                                        response_type='Tabs',
5945                                        auth_settings=auth_settings,
5946                                        callback=params.get('callback'),
5947                                        _return_http_data_only=params.get('_return_http_data_only'),
5948                                        _preload_content=params.get('_preload_content', True),
5949                                        _request_timeout=params.get('_request_timeout'),
5950                                        collection_formats=collection_formats)
5951
5952    def update_templates(self, account_id, **kwargs):
5953        """
5954        Update template autoMatch setting.
5955        This method makes a synchronous HTTP request by default. To make an
5956        asynchronous HTTP request, please define a `callback` function
5957        to be invoked when receiving the response.
5958        >>> def callback_function(response):
5959        >>>     pprint(response)
5960        >>>
5961        >>> thread = api.update_templates(account_id, callback=callback_function)
5962
5963        :param callback function: The callback function
5964            for asynchronous request. (optional)
5965        :param str account_id: The external account number (int) or account ID Guid. (required)
5966        :param TemplateAutoMatchList template_auto_match_list:
5967        :return: TemplateAutoMatchList
5968                 If the method is called asynchronously,
5969                 returns the request thread.
5970        """
5971        kwargs['_return_http_data_only'] = True
5972        if kwargs.get('callback'):
5973            return self.update_templates_with_http_info(account_id, **kwargs)
5974        else:
5975            (data) = self.update_templates_with_http_info(account_id, **kwargs)
5976            return data
5977
5978    def update_templates_with_http_info(self, account_id, **kwargs):
5979        """
5980        Update template autoMatch setting.
5981        This method makes a synchronous HTTP request by default. To make an
5982        asynchronous HTTP request, please define a `callback` function
5983        to be invoked when receiving the response.
5984        >>> def callback_function(response):
5985        >>>     pprint(response)
5986        >>>
5987        >>> thread = api.update_templates_with_http_info(account_id, callback=callback_function)
5988
5989        :param callback function: The callback function
5990            for asynchronous request. (optional)
5991        :param str account_id: The external account number (int) or account ID Guid. (required)
5992        :param TemplateAutoMatchList template_auto_match_list:
5993        :return: TemplateAutoMatchList
5994                 If the method is called asynchronously,
5995                 returns the request thread.
5996        """
5997
5998        all_params = ['account_id', 'template_auto_match_list']
5999        all_params.append('callback')
6000        all_params.append('_return_http_data_only')
6001        all_params.append('_preload_content')
6002        all_params.append('_request_timeout')
6003
6004        params = locals()
6005        for key, val in iteritems(params['kwargs']):
6006            if key not in all_params:
6007                raise TypeError(
6008                    "Got an unexpected keyword argument '%s'"
6009                    " to method update_templates" % key
6010                )
6011            params[key] = val
6012        del params['kwargs']
6013        # verify the required parameter 'account_id' is set
6014        if ('account_id' not in params) or (params['account_id'] is None):
6015            raise ValueError("Missing the required parameter `account_id` when calling `update_templates`")
6016
6017
6018        collection_formats = {}
6019
6020        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
6021        path_params = {}
6022        if 'account_id' in params:
6023            path_params['accountId'] = params['account_id']
6024
6025        query_params = {}
6026
6027        header_params = {}
6028
6029        form_params = []
6030        local_var_files = {}
6031
6032        body_params = None
6033        if 'template_auto_match_list' in params:
6034            body_params = params['template_auto_match_list']
6035        # HTTP header `Accept`
6036        header_params['Accept'] = self.api_client.\
6037            select_header_accept(['application/json'])
6038
6039        # Authentication setting
6040        auth_settings = []
6041
6042        return self.api_client.call_api(resource_path, 'PUT',
6043                                        path_params,
6044                                        query_params,
6045                                        header_params,
6046                                        body=body_params,
6047                                        post_params=form_params,
6048                                        files=local_var_files,
6049                                        response_type='TemplateAutoMatchList',
6050                                        auth_settings=auth_settings,
6051                                        callback=params.get('callback'),
6052                                        _return_http_data_only=params.get('_return_http_data_only'),
6053                                        _preload_content=params.get('_preload_content', True),
6054                                        _request_timeout=params.get('_request_timeout'),
6055                                        collection_formats=collection_formats)
6056
6057    def update_templates_auto_match(self, account_id, **kwargs):
6058        """
6059        Update template autoMatch setting.
6060        This method makes a synchronous HTTP request by default. To make an
6061        asynchronous HTTP request, please define a `callback` function
6062        to be invoked when receiving the response.
6063        >>> def callback_function(response):
6064        >>>     pprint(response)
6065        >>>
6066        >>> thread = api.update_templates_auto_match(account_id, callback=callback_function)
6067
6068        :param callback function: The callback function
6069            for asynchronous request. (optional)
6070        :param str account_id: The external account number (int) or account ID Guid. (required)
6071        :param TemplateAutoMatchList template_auto_match_list:
6072        :return: TemplateAutoMatchList
6073                 If the method is called asynchronously,
6074                 returns the request thread.
6075        """
6076        kwargs['_return_http_data_only'] = True
6077        if kwargs.get('callback'):
6078            return self.update_templates_auto_match_with_http_info(account_id, **kwargs)
6079        else:
6080            (data) = self.update_templates_auto_match_with_http_info(account_id, **kwargs)
6081            return data
6082
6083    def update_templates_auto_match_with_http_info(self, account_id, **kwargs):
6084        """
6085        Update template autoMatch setting.
6086        This method makes a synchronous HTTP request by default. To make an
6087        asynchronous HTTP request, please define a `callback` function
6088        to be invoked when receiving the response.
6089        >>> def callback_function(response):
6090        >>>     pprint(response)
6091        >>>
6092        >>> thread = api.update_templates_auto_match_with_http_info(account_id, callback=callback_function)
6093
6094        :param callback function: The callback function
6095            for asynchronous request. (optional)
6096        :param str account_id: The external account number (int) or account ID Guid. (required)
6097        :param TemplateAutoMatchList template_auto_match_list:
6098        :return: TemplateAutoMatchList
6099                 If the method is called asynchronously,
6100                 returns the request thread.
6101        """
6102
6103        all_params = ['account_id', 'template_auto_match_list']
6104        all_params.append('callback')
6105        all_params.append('_return_http_data_only')
6106        all_params.append('_preload_content')
6107        all_params.append('_request_timeout')
6108
6109        params = locals()
6110        for key, val in iteritems(params['kwargs']):
6111            if key not in all_params:
6112                raise TypeError(
6113                    "Got an unexpected keyword argument '%s'"
6114                    " to method update_templates_auto_match" % key
6115                )
6116            params[key] = val
6117        del params['kwargs']
6118        # verify the required parameter 'account_id' is set
6119        if ('account_id' not in params) or (params['account_id'] is None):
6120            raise ValueError("Missing the required parameter `account_id` when calling `update_templates_auto_match`")
6121
6122
6123        collection_formats = {}
6124
6125        resource_path = '/v2.1/accounts/{accountId}/templates/auto_match'.replace('{format}', 'json')
6126        path_params = {}
6127        if 'account_id' in params:
6128            path_params['accountId'] = params['account_id']
6129
6130        query_params = {}
6131
6132        header_params = {}
6133
6134        form_params = []
6135        local_var_files = {}
6136
6137        body_params = None
6138        if 'template_auto_match_list' in params:
6139            body_params = params['template_auto_match_list']
6140        # HTTP header `Accept`
6141        header_params['Accept'] = self.api_client.\
6142            select_header_accept(['application/json'])
6143
6144        # Authentication setting
6145        auth_settings = []
6146
6147        return self.api_client.call_api(resource_path, 'PUT',
6148                                        path_params,
6149                                        query_params,
6150                                        header_params,
6151                                        body=body_params,
6152                                        post_params=form_params,
6153                                        files=local_var_files,
6154                                        response_type='TemplateAutoMatchList',
6155                                        auth_settings=auth_settings,
6156                                        callback=params.get('callback'),
6157                                        _return_http_data_only=params.get('_return_http_data_only'),
6158                                        _preload_content=params.get('_preload_content', True),
6159                                        _request_timeout=params.get('_request_timeout'),
6160                                        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

TemplatesApi(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_custom_fields(self, account_id, template_id, **kwargs)
44    def create_custom_fields(self, account_id, template_id, **kwargs):
45        """
46        Creates custom document fields in an existing template document.
47        Creates custom document fields in an existing template document.
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_custom_fields(account_id, template_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 str template_id: The ID of the template being accessed. (required)
60        :param TemplateCustomFields template_custom_fields:
61        :return: CustomFields
62                 If the method is called asynchronously,
63                 returns the request thread.
64        """
65        kwargs['_return_http_data_only'] = True
66        if kwargs.get('callback'):
67            return self.create_custom_fields_with_http_info(account_id, template_id, **kwargs)
68        else:
69            (data) = self.create_custom_fields_with_http_info(account_id, template_id, **kwargs)
70            return data

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document. 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_custom_fields(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • TemplateCustomFields template_custom_fields:
Returns

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

def create_custom_fields_with_http_info(self, account_id, template_id, **kwargs)
 72    def create_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
 73        """
 74        Creates custom document fields in an existing template document.
 75        Creates custom document fields in an existing template document.
 76        This method makes a synchronous HTTP request by default. To make an
 77        asynchronous HTTP request, please define a `callback` function
 78        to be invoked when receiving the response.
 79        >>> def callback_function(response):
 80        >>>     pprint(response)
 81        >>>
 82        >>> thread = api.create_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
 83
 84        :param callback function: The callback function
 85            for asynchronous request. (optional)
 86        :param str account_id: The external account number (int) or account ID Guid. (required)
 87        :param str template_id: The ID of the template being accessed. (required)
 88        :param TemplateCustomFields template_custom_fields:
 89        :return: CustomFields
 90                 If the method is called asynchronously,
 91                 returns the request thread.
 92        """
 93
 94        all_params = ['account_id', 'template_id', 'template_custom_fields']
 95        all_params.append('callback')
 96        all_params.append('_return_http_data_only')
 97        all_params.append('_preload_content')
 98        all_params.append('_request_timeout')
 99
100        params = locals()
101        for key, val in iteritems(params['kwargs']):
102            if key not in all_params:
103                raise TypeError(
104                    "Got an unexpected keyword argument '%s'"
105                    " to method create_custom_fields" % key
106                )
107            params[key] = val
108        del params['kwargs']
109        # verify the required parameter 'account_id' is set
110        if ('account_id' not in params) or (params['account_id'] is None):
111            raise ValueError("Missing the required parameter `account_id` when calling `create_custom_fields`")
112        # verify the required parameter 'template_id' is set
113        if ('template_id' not in params) or (params['template_id'] is None):
114            raise ValueError("Missing the required parameter `template_id` when calling `create_custom_fields`")
115
116
117        collection_formats = {}
118
119        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
120        path_params = {}
121        if 'account_id' in params:
122            path_params['accountId'] = params['account_id']
123        if 'template_id' in params:
124            path_params['templateId'] = params['template_id']
125
126        query_params = {}
127
128        header_params = {}
129
130        form_params = []
131        local_var_files = {}
132
133        body_params = None
134        if 'template_custom_fields' in params:
135            body_params = params['template_custom_fields']
136        # HTTP header `Accept`
137        header_params['Accept'] = self.api_client.\
138            select_header_accept(['application/json'])
139
140        # Authentication setting
141        auth_settings = []
142
143        return self.api_client.call_api(resource_path, 'POST',
144                                        path_params,
145                                        query_params,
146                                        header_params,
147                                        body=body_params,
148                                        post_params=form_params,
149                                        files=local_var_files,
150                                        response_type='CustomFields',
151                                        auth_settings=auth_settings,
152                                        callback=params.get('callback'),
153                                        _return_http_data_only=params.get('_return_http_data_only'),
154                                        _preload_content=params.get('_preload_content', True),
155                                        _request_timeout=params.get('_request_timeout'),
156                                        collection_formats=collection_formats)

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document. 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_custom_fields_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • TemplateCustomFields template_custom_fields:
Returns

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

def create_document_fields(self, account_id, document_id, template_id, **kwargs)
158    def create_document_fields(self, account_id, document_id, template_id, **kwargs):
159        """
160        Creates custom document fields in an existing template document.
161        Creates custom document fields in an existing template document.
162        This method makes a synchronous HTTP request by default. To make an
163        asynchronous HTTP request, please define a `callback` function
164        to be invoked when receiving the response.
165        >>> def callback_function(response):
166        >>>     pprint(response)
167        >>>
168        >>> thread = api.create_document_fields(account_id, document_id, template_id, callback=callback_function)
169
170        :param callback function: The callback function
171            for asynchronous request. (optional)
172        :param str account_id: The external account number (int) or account ID Guid. (required)
173        :param str document_id: The ID of the document being accessed. (required)
174        :param str template_id: The ID of the template being accessed. (required)
175        :param DocumentFieldsInformation document_fields_information:
176        :return: DocumentFieldsInformation
177                 If the method is called asynchronously,
178                 returns the request thread.
179        """
180        kwargs['_return_http_data_only'] = True
181        if kwargs.get('callback'):
182            return self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
183        else:
184            (data) = self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
185            return data

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document. 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_document_fields(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentFieldsInformation document_fields_information:
Returns

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

def create_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs)
187    def create_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
188        """
189        Creates custom document fields in an existing template document.
190        Creates custom document fields in an existing template document.
191        This method makes a synchronous HTTP request by default. To make an
192        asynchronous HTTP request, please define a `callback` function
193        to be invoked when receiving the response.
194        >>> def callback_function(response):
195        >>>     pprint(response)
196        >>>
197        >>> thread = api.create_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
198
199        :param callback function: The callback function
200            for asynchronous request. (optional)
201        :param str account_id: The external account number (int) or account ID Guid. (required)
202        :param str document_id: The ID of the document being accessed. (required)
203        :param str template_id: The ID of the template being accessed. (required)
204        :param DocumentFieldsInformation document_fields_information:
205        :return: DocumentFieldsInformation
206                 If the method is called asynchronously,
207                 returns the request thread.
208        """
209
210        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
211        all_params.append('callback')
212        all_params.append('_return_http_data_only')
213        all_params.append('_preload_content')
214        all_params.append('_request_timeout')
215
216        params = locals()
217        for key, val in iteritems(params['kwargs']):
218            if key not in all_params:
219                raise TypeError(
220                    "Got an unexpected keyword argument '%s'"
221                    " to method create_document_fields" % key
222                )
223            params[key] = val
224        del params['kwargs']
225        # verify the required parameter 'account_id' is set
226        if ('account_id' not in params) or (params['account_id'] is None):
227            raise ValueError("Missing the required parameter `account_id` when calling `create_document_fields`")
228        # verify the required parameter 'document_id' is set
229        if ('document_id' not in params) or (params['document_id'] is None):
230            raise ValueError("Missing the required parameter `document_id` when calling `create_document_fields`")
231        # verify the required parameter 'template_id' is set
232        if ('template_id' not in params) or (params['template_id'] is None):
233            raise ValueError("Missing the required parameter `template_id` when calling `create_document_fields`")
234
235
236        collection_formats = {}
237
238        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
239        path_params = {}
240        if 'account_id' in params:
241            path_params['accountId'] = params['account_id']
242        if 'document_id' in params:
243            path_params['documentId'] = params['document_id']
244        if 'template_id' in params:
245            path_params['templateId'] = params['template_id']
246
247        query_params = {}
248
249        header_params = {}
250
251        form_params = []
252        local_var_files = {}
253
254        body_params = None
255        if 'document_fields_information' in params:
256            body_params = params['document_fields_information']
257        # HTTP header `Accept`
258        header_params['Accept'] = self.api_client.\
259            select_header_accept(['application/json'])
260
261        # Authentication setting
262        auth_settings = []
263
264        return self.api_client.call_api(resource_path, 'POST',
265                                        path_params,
266                                        query_params,
267                                        header_params,
268                                        body=body_params,
269                                        post_params=form_params,
270                                        files=local_var_files,
271                                        response_type='DocumentFieldsInformation',
272                                        auth_settings=auth_settings,
273                                        callback=params.get('callback'),
274                                        _return_http_data_only=params.get('_return_http_data_only'),
275                                        _preload_content=params.get('_preload_content', True),
276                                        _request_timeout=params.get('_request_timeout'),
277                                        collection_formats=collection_formats)

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document. 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_document_fields_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentFieldsInformation document_fields_information:
Returns

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

def create_edit_view(self, account_id, template_id, **kwargs)
279    def create_edit_view(self, account_id, template_id, **kwargs):
280        """
281        Provides a URL to start an edit view of the Template UI
282        This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
283        This method makes a synchronous HTTP request by default. To make an
284        asynchronous HTTP request, please define a `callback` function
285        to be invoked when receiving the response.
286        >>> def callback_function(response):
287        >>>     pprint(response)
288        >>>
289        >>> thread = api.create_edit_view(account_id, template_id, callback=callback_function)
290
291        :param callback function: The callback function
292            for asynchronous request. (optional)
293        :param str account_id: The external account number (int) or account ID Guid. (required)
294        :param str template_id: The ID of the template being accessed. (required)
295        :param TemplateViewRequest template_view_request:
296        :return: ViewUrl
297                 If the method is called asynchronously,
298                 returns the request thread.
299        """
300        kwargs['_return_http_data_only'] = True
301        if kwargs.get('callback'):
302            return self.create_edit_view_with_http_info(account_id, template_id, **kwargs)
303        else:
304            (data) = self.create_edit_view_with_http_info(account_id, template_id, **kwargs)
305            return data

Provides a URL to start an edit view of the Template UI This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI. 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_edit_view(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • TemplateViewRequest template_view_request:
Returns

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

def create_edit_view_with_http_info(self, account_id, template_id, **kwargs)
307    def create_edit_view_with_http_info(self, account_id, template_id, **kwargs):
308        """
309        Provides a URL to start an edit view of the Template UI
310        This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
311        This method makes a synchronous HTTP request by default. To make an
312        asynchronous HTTP request, please define a `callback` function
313        to be invoked when receiving the response.
314        >>> def callback_function(response):
315        >>>     pprint(response)
316        >>>
317        >>> thread = api.create_edit_view_with_http_info(account_id, template_id, callback=callback_function)
318
319        :param callback function: The callback function
320            for asynchronous request. (optional)
321        :param str account_id: The external account number (int) or account ID Guid. (required)
322        :param str template_id: The ID of the template being accessed. (required)
323        :param TemplateViewRequest template_view_request:
324        :return: ViewUrl
325                 If the method is called asynchronously,
326                 returns the request thread.
327        """
328
329        all_params = ['account_id', 'template_id', 'template_view_request']
330        all_params.append('callback')
331        all_params.append('_return_http_data_only')
332        all_params.append('_preload_content')
333        all_params.append('_request_timeout')
334
335        params = locals()
336        for key, val in iteritems(params['kwargs']):
337            if key not in all_params:
338                raise TypeError(
339                    "Got an unexpected keyword argument '%s'"
340                    " to method create_edit_view" % key
341                )
342            params[key] = val
343        del params['kwargs']
344        # verify the required parameter 'account_id' is set
345        if ('account_id' not in params) or (params['account_id'] is None):
346            raise ValueError("Missing the required parameter `account_id` when calling `create_edit_view`")
347        # verify the required parameter 'template_id' is set
348        if ('template_id' not in params) or (params['template_id'] is None):
349            raise ValueError("Missing the required parameter `template_id` when calling `create_edit_view`")
350
351
352        collection_formats = {}
353
354        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/edit'.replace('{format}', 'json')
355        path_params = {}
356        if 'account_id' in params:
357            path_params['accountId'] = params['account_id']
358        if 'template_id' in params:
359            path_params['templateId'] = params['template_id']
360
361        query_params = {}
362
363        header_params = {}
364
365        form_params = []
366        local_var_files = {}
367
368        body_params = None
369        if 'template_view_request' in params:
370            body_params = params['template_view_request']
371        # HTTP header `Accept`
372        header_params['Accept'] = self.api_client.\
373            select_header_accept(['application/json'])
374
375        # Authentication setting
376        auth_settings = []
377
378        return self.api_client.call_api(resource_path, 'POST',
379                                        path_params,
380                                        query_params,
381                                        header_params,
382                                        body=body_params,
383                                        post_params=form_params,
384                                        files=local_var_files,
385                                        response_type='ViewUrl',
386                                        auth_settings=auth_settings,
387                                        callback=params.get('callback'),
388                                        _return_http_data_only=params.get('_return_http_data_only'),
389                                        _preload_content=params.get('_preload_content', True),
390                                        _request_timeout=params.get('_request_timeout'),
391                                        collection_formats=collection_formats)

Provides a URL to start an edit view of the Template UI This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI. 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_edit_view_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • TemplateViewRequest template_view_request:
Returns

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

def create_lock(self, account_id, template_id, **kwargs)
393    def create_lock(self, account_id, template_id, **kwargs):
394        """
395        Lock a template.
396        Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.  ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
397        This method makes a synchronous HTTP request by default. To make an
398        asynchronous HTTP request, please define a `callback` function
399        to be invoked when receiving the response.
400        >>> def callback_function(response):
401        >>>     pprint(response)
402        >>>
403        >>> thread = api.create_lock(account_id, template_id, callback=callback_function)
404
405        :param callback function: The callback function
406            for asynchronous request. (optional)
407        :param str account_id: The external account number (int) or account ID Guid. (required)
408        :param str template_id: The ID of the template being accessed. (required)
409        :param LockRequest lock_request:
410        :return: LockInformation
411                 If the method is called asynchronously,
412                 returns the request thread.
413        """
414        kwargs['_return_http_data_only'] = True
415        if kwargs.get('callback'):
416            return self.create_lock_with_http_info(account_id, template_id, **kwargs)
417        else:
418            (data) = self.create_lock_with_http_info(account_id, template_id, **kwargs)
419            return data

Lock a template. Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template. ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property canLockEnvelopes must be set to true for the 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.create_lock(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • LockRequest lock_request:
Returns

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

def create_lock_with_http_info(self, account_id, template_id, **kwargs)
421    def create_lock_with_http_info(self, account_id, template_id, **kwargs):
422        """
423        Lock a template.
424        Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template.  ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
425        This method makes a synchronous HTTP request by default. To make an
426        asynchronous HTTP request, please define a `callback` function
427        to be invoked when receiving the response.
428        >>> def callback_function(response):
429        >>>     pprint(response)
430        >>>
431        >>> thread = api.create_lock_with_http_info(account_id, template_id, callback=callback_function)
432
433        :param callback function: The callback function
434            for asynchronous request. (optional)
435        :param str account_id: The external account number (int) or account ID Guid. (required)
436        :param str template_id: The ID of the template being accessed. (required)
437        :param LockRequest lock_request:
438        :return: LockInformation
439                 If the method is called asynchronously,
440                 returns the request thread.
441        """
442
443        all_params = ['account_id', 'template_id', 'lock_request']
444        all_params.append('callback')
445        all_params.append('_return_http_data_only')
446        all_params.append('_preload_content')
447        all_params.append('_request_timeout')
448
449        params = locals()
450        for key, val in iteritems(params['kwargs']):
451            if key not in all_params:
452                raise TypeError(
453                    "Got an unexpected keyword argument '%s'"
454                    " to method create_lock" % key
455                )
456            params[key] = val
457        del params['kwargs']
458        # verify the required parameter 'account_id' is set
459        if ('account_id' not in params) or (params['account_id'] is None):
460            raise ValueError("Missing the required parameter `account_id` when calling `create_lock`")
461        # verify the required parameter 'template_id' is set
462        if ('template_id' not in params) or (params['template_id'] is None):
463            raise ValueError("Missing the required parameter `template_id` when calling `create_lock`")
464
465
466        collection_formats = {}
467
468        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
469        path_params = {}
470        if 'account_id' in params:
471            path_params['accountId'] = params['account_id']
472        if 'template_id' in params:
473            path_params['templateId'] = params['template_id']
474
475        query_params = {}
476
477        header_params = {}
478
479        form_params = []
480        local_var_files = {}
481
482        body_params = None
483        if 'lock_request' in params:
484            body_params = params['lock_request']
485        # HTTP header `Accept`
486        header_params['Accept'] = self.api_client.\
487            select_header_accept(['application/json'])
488
489        # Authentication setting
490        auth_settings = []
491
492        return self.api_client.call_api(resource_path, 'POST',
493                                        path_params,
494                                        query_params,
495                                        header_params,
496                                        body=body_params,
497                                        post_params=form_params,
498                                        files=local_var_files,
499                                        response_type='LockInformation',
500                                        auth_settings=auth_settings,
501                                        callback=params.get('callback'),
502                                        _return_http_data_only=params.get('_return_http_data_only'),
503                                        _preload_content=params.get('_preload_content', True),
504                                        _request_timeout=params.get('_request_timeout'),
505                                        collection_formats=collection_formats)

Lock a template. Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template. ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property canLockEnvelopes must be set to true for the 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.create_lock_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • LockRequest lock_request:
Returns

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

def create_recipients(self, account_id, template_id, **kwargs)
507    def create_recipients(self, account_id, template_id, **kwargs):
508        """
509        Adds tabs for a recipient.
510        Adds one or more recipients to a template.
511        This method makes a synchronous HTTP request by default. To make an
512        asynchronous HTTP request, please define a `callback` function
513        to be invoked when receiving the response.
514        >>> def callback_function(response):
515        >>>     pprint(response)
516        >>>
517        >>> thread = api.create_recipients(account_id, template_id, callback=callback_function)
518
519        :param callback function: The callback function
520            for asynchronous request. (optional)
521        :param str account_id: The external account number (int) or account ID Guid. (required)
522        :param str template_id: The ID of the template being accessed. (required)
523        :param str resend_envelope:
524        :param TemplateRecipients template_recipients:
525        :return: Recipients
526                 If the method is called asynchronously,
527                 returns the request thread.
528        """
529        kwargs['_return_http_data_only'] = True
530        if kwargs.get('callback'):
531            return self.create_recipients_with_http_info(account_id, template_id, **kwargs)
532        else:
533            (data) = self.create_recipients_with_http_info(account_id, template_id, **kwargs)
534            return data

Adds tabs for a recipient. Adds one or more recipients to a template. 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_recipients(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • str resend_envelope:
  • TemplateRecipients template_recipients:
Returns

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

def create_recipients_with_http_info(self, account_id, template_id, **kwargs)
536    def create_recipients_with_http_info(self, account_id, template_id, **kwargs):
537        """
538        Adds tabs for a recipient.
539        Adds one or more recipients to a template.
540        This method makes a synchronous HTTP request by default. To make an
541        asynchronous HTTP request, please define a `callback` function
542        to be invoked when receiving the response.
543        >>> def callback_function(response):
544        >>>     pprint(response)
545        >>>
546        >>> thread = api.create_recipients_with_http_info(account_id, template_id, callback=callback_function)
547
548        :param callback function: The callback function
549            for asynchronous request. (optional)
550        :param str account_id: The external account number (int) or account ID Guid. (required)
551        :param str template_id: The ID of the template being accessed. (required)
552        :param str resend_envelope:
553        :param TemplateRecipients template_recipients:
554        :return: Recipients
555                 If the method is called asynchronously,
556                 returns the request thread.
557        """
558
559        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
560        all_params.append('callback')
561        all_params.append('_return_http_data_only')
562        all_params.append('_preload_content')
563        all_params.append('_request_timeout')
564
565        params = locals()
566        for key, val in iteritems(params['kwargs']):
567            if key not in all_params:
568                raise TypeError(
569                    "Got an unexpected keyword argument '%s'"
570                    " to method create_recipients" % key
571                )
572            params[key] = val
573        del params['kwargs']
574        # verify the required parameter 'account_id' is set
575        if ('account_id' not in params) or (params['account_id'] is None):
576            raise ValueError("Missing the required parameter `account_id` when calling `create_recipients`")
577        # verify the required parameter 'template_id' is set
578        if ('template_id' not in params) or (params['template_id'] is None):
579            raise ValueError("Missing the required parameter `template_id` when calling `create_recipients`")
580
581
582        collection_formats = {}
583
584        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
585        path_params = {}
586        if 'account_id' in params:
587            path_params['accountId'] = params['account_id']
588        if 'template_id' in params:
589            path_params['templateId'] = params['template_id']
590
591        query_params = {}
592        if 'resend_envelope' in params:
593            query_params['resend_envelope'] = params['resend_envelope']
594
595        header_params = {}
596
597        form_params = []
598        local_var_files = {}
599
600        body_params = None
601        if 'template_recipients' in params:
602            body_params = params['template_recipients']
603        # HTTP header `Accept`
604        header_params['Accept'] = self.api_client.\
605            select_header_accept(['application/json'])
606
607        # Authentication setting
608        auth_settings = []
609
610        return self.api_client.call_api(resource_path, 'POST',
611                                        path_params,
612                                        query_params,
613                                        header_params,
614                                        body=body_params,
615                                        post_params=form_params,
616                                        files=local_var_files,
617                                        response_type='Recipients',
618                                        auth_settings=auth_settings,
619                                        callback=params.get('callback'),
620                                        _return_http_data_only=params.get('_return_http_data_only'),
621                                        _preload_content=params.get('_preload_content', True),
622                                        _request_timeout=params.get('_request_timeout'),
623                                        collection_formats=collection_formats)

Adds tabs for a recipient. Adds one or more recipients to a template. 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_recipients_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • str resend_envelope:
  • TemplateRecipients template_recipients:
Returns

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

def create_tabs(self, account_id, recipient_id, template_id, **kwargs)
625    def create_tabs(self, account_id, recipient_id, template_id, **kwargs):
626        """
627        Adds tabs for a recipient.
628        Adds one or more tabs for a recipient.
629        This method makes a synchronous HTTP request by default. To make an
630        asynchronous HTTP request, please define a `callback` function
631        to be invoked when receiving the response.
632        >>> def callback_function(response):
633        >>>     pprint(response)
634        >>>
635        >>> thread = api.create_tabs(account_id, recipient_id, template_id, callback=callback_function)
636
637        :param callback function: The callback function
638            for asynchronous request. (optional)
639        :param str account_id: The external account number (int) or account ID Guid. (required)
640        :param str recipient_id: The ID of the recipient being accessed. (required)
641        :param str template_id: The ID of the template being accessed. (required)
642        :param TemplateTabs template_tabs:
643        :return: Tabs
644                 If the method is called asynchronously,
645                 returns the request thread.
646        """
647        kwargs['_return_http_data_only'] = True
648        if kwargs.get('callback'):
649            return self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
650        else:
651            (data) = self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
652            return data

Adds tabs for a recipient. Adds one or more tabs for a recipient. 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_tabs(account_id, recipient_id, template_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 recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

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

def create_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs)
654    def create_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
655        """
656        Adds tabs for a recipient.
657        Adds one or more tabs for a recipient.
658        This method makes a synchronous HTTP request by default. To make an
659        asynchronous HTTP request, please define a `callback` function
660        to be invoked when receiving the response.
661        >>> def callback_function(response):
662        >>>     pprint(response)
663        >>>
664        >>> thread = api.create_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
665
666        :param callback function: The callback function
667            for asynchronous request. (optional)
668        :param str account_id: The external account number (int) or account ID Guid. (required)
669        :param str recipient_id: The ID of the recipient being accessed. (required)
670        :param str template_id: The ID of the template being accessed. (required)
671        :param TemplateTabs template_tabs:
672        :return: Tabs
673                 If the method is called asynchronously,
674                 returns the request thread.
675        """
676
677        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
678        all_params.append('callback')
679        all_params.append('_return_http_data_only')
680        all_params.append('_preload_content')
681        all_params.append('_request_timeout')
682
683        params = locals()
684        for key, val in iteritems(params['kwargs']):
685            if key not in all_params:
686                raise TypeError(
687                    "Got an unexpected keyword argument '%s'"
688                    " to method create_tabs" % key
689                )
690            params[key] = val
691        del params['kwargs']
692        # verify the required parameter 'account_id' is set
693        if ('account_id' not in params) or (params['account_id'] is None):
694            raise ValueError("Missing the required parameter `account_id` when calling `create_tabs`")
695        # verify the required parameter 'recipient_id' is set
696        if ('recipient_id' not in params) or (params['recipient_id'] is None):
697            raise ValueError("Missing the required parameter `recipient_id` when calling `create_tabs`")
698        # verify the required parameter 'template_id' is set
699        if ('template_id' not in params) or (params['template_id'] is None):
700            raise ValueError("Missing the required parameter `template_id` when calling `create_tabs`")
701
702
703        collection_formats = {}
704
705        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
706        path_params = {}
707        if 'account_id' in params:
708            path_params['accountId'] = params['account_id']
709        if 'recipient_id' in params:
710            path_params['recipientId'] = params['recipient_id']
711        if 'template_id' in params:
712            path_params['templateId'] = params['template_id']
713
714        query_params = {}
715
716        header_params = {}
717
718        form_params = []
719        local_var_files = {}
720
721        body_params = None
722        if 'template_tabs' in params:
723            body_params = params['template_tabs']
724        # HTTP header `Accept`
725        header_params['Accept'] = self.api_client.\
726            select_header_accept(['application/json'])
727
728        # Authentication setting
729        auth_settings = []
730
731        return self.api_client.call_api(resource_path, 'POST',
732                                        path_params,
733                                        query_params,
734                                        header_params,
735                                        body=body_params,
736                                        post_params=form_params,
737                                        files=local_var_files,
738                                        response_type='Tabs',
739                                        auth_settings=auth_settings,
740                                        callback=params.get('callback'),
741                                        _return_http_data_only=params.get('_return_http_data_only'),
742                                        _preload_content=params.get('_preload_content', True),
743                                        _request_timeout=params.get('_request_timeout'),
744                                        collection_formats=collection_formats)

Adds tabs for a recipient. Adds one or more tabs for a recipient. 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_tabs_with_http_info(account_id, recipient_id, template_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 recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

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

def create_template(self, account_id, **kwargs)
746    def create_template(self, account_id, **kwargs):
747        """
748        Creates an envelope from a template.
749        Creates a template definition using a multipart request.  ###Template Email Subject Merge Fields  Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.  The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.  Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.  To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_UserName]]  Example:  `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",`  To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_Email]]  Example:  `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`   In both cases the <roleName> is the recipient's contents of the `roleName` property in the template.  For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
750        This method makes a synchronous HTTP request by default. To make an
751        asynchronous HTTP request, please define a `callback` function
752        to be invoked when receiving the response.
753        >>> def callback_function(response):
754        >>>     pprint(response)
755        >>>
756        >>> thread = api.create_template(account_id, callback=callback_function)
757
758        :param callback function: The callback function
759            for asynchronous request. (optional)
760        :param str account_id: The external account number (int) or account ID Guid. (required)
761        :param EnvelopeTemplate envelope_template:
762        :return: TemplateSummary
763                 If the method is called asynchronously,
764                 returns the request thread.
765        """
766        kwargs['_return_http_data_only'] = True
767        if kwargs.get('callback'):
768            return self.create_template_with_http_info(account_id, **kwargs)
769        else:
770            (data) = self.create_template_with_http_info(account_id, **kwargs)
771            return data

Creates an envelope from a template. Creates a template definition using a multipart request. ###Template Email Subject Merge Fields Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's role name, are added to the emailSubject property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. To add a recipient's name in the subject line add the following text in the emailSubject property when creating the template or when sending an envelope from a template: [[_UserName]] Example: "emailSubject":"[[Signer 1_UserName]], Please sign this NDA", To add a recipient's email address in the subject line add the following text in the emailSubject property when creating the template or when sending an envelope from a template: [[_Email]] Example: "emailSubject":"[[Signer 1_Email]], Please sign this NDA", In both cases the is the recipient's contents of the roleName property in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[_UserName]] or [[_Email]] is shown in the email subject. 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_template(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)
  • EnvelopeTemplate envelope_template:
Returns

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

def create_template_with_http_info(self, account_id, **kwargs)
773    def create_template_with_http_info(self, account_id, **kwargs):
774        """
775        Creates an envelope from a template.
776        Creates a template definition using a multipart request.  ###Template Email Subject Merge Fields  Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template.  The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line.  Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject.  To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_UserName]]  Example:  `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",`  To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template:  [[<roleName>_Email]]  Example:  `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",`   In both cases the <roleName> is the recipient's contents of the `roleName` property in the template.  For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
777        This method makes a synchronous HTTP request by default. To make an
778        asynchronous HTTP request, please define a `callback` function
779        to be invoked when receiving the response.
780        >>> def callback_function(response):
781        >>>     pprint(response)
782        >>>
783        >>> thread = api.create_template_with_http_info(account_id, callback=callback_function)
784
785        :param callback function: The callback function
786            for asynchronous request. (optional)
787        :param str account_id: The external account number (int) or account ID Guid. (required)
788        :param EnvelopeTemplate envelope_template:
789        :return: TemplateSummary
790                 If the method is called asynchronously,
791                 returns the request thread.
792        """
793
794        all_params = ['account_id', 'envelope_template']
795        all_params.append('callback')
796        all_params.append('_return_http_data_only')
797        all_params.append('_preload_content')
798        all_params.append('_request_timeout')
799
800        params = locals()
801        for key, val in iteritems(params['kwargs']):
802            if key not in all_params:
803                raise TypeError(
804                    "Got an unexpected keyword argument '%s'"
805                    " to method create_template" % key
806                )
807            params[key] = val
808        del params['kwargs']
809        # verify the required parameter 'account_id' is set
810        if ('account_id' not in params) or (params['account_id'] is None):
811            raise ValueError("Missing the required parameter `account_id` when calling `create_template`")
812
813
814        collection_formats = {}
815
816        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
817        path_params = {}
818        if 'account_id' in params:
819            path_params['accountId'] = params['account_id']
820
821        query_params = {}
822
823        header_params = {}
824
825        form_params = []
826        local_var_files = {}
827
828        body_params = None
829        if 'envelope_template' in params:
830            body_params = params['envelope_template']
831        # HTTP header `Accept`
832        header_params['Accept'] = self.api_client.\
833            select_header_accept(['application/json'])
834
835        # Authentication setting
836        auth_settings = []
837
838        return self.api_client.call_api(resource_path, 'POST',
839                                        path_params,
840                                        query_params,
841                                        header_params,
842                                        body=body_params,
843                                        post_params=form_params,
844                                        files=local_var_files,
845                                        response_type='TemplateSummary',
846                                        auth_settings=auth_settings,
847                                        callback=params.get('callback'),
848                                        _return_http_data_only=params.get('_return_http_data_only'),
849                                        _preload_content=params.get('_preload_content', True),
850                                        _request_timeout=params.get('_request_timeout'),
851                                        collection_formats=collection_formats)

Creates an envelope from a template. Creates a template definition using a multipart request. ###Template Email Subject Merge Fields Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's role name, are added to the emailSubject property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. To add a recipient's name in the subject line add the following text in the emailSubject property when creating the template or when sending an envelope from a template: [[_UserName]] Example: "emailSubject":"[[Signer 1_UserName]], Please sign this NDA", To add a recipient's email address in the subject line add the following text in the emailSubject property when creating the template or when sending an envelope from a template: [[_Email]] Example: "emailSubject":"[[Signer 1_Email]], Please sign this NDA", In both cases the is the recipient's contents of the roleName property in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[_UserName]] or [[_Email]] is shown in the email subject. 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_template_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)
  • EnvelopeTemplate envelope_template:
Returns

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

def create_template_document_responsive_html_preview(self, account_id, document_id, template_id, **kwargs)
853    def create_template_document_responsive_html_preview(self, account_id, document_id, template_id, **kwargs):
854        """
855        Post Responsive HTML Preview for a document in a template.
856        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
857        This method makes a synchronous HTTP request by default. To make an
858        asynchronous HTTP request, please define a `callback` function
859        to be invoked when receiving the response.
860        >>> def callback_function(response):
861        >>>     pprint(response)
862        >>>
863        >>> thread = api.create_template_document_responsive_html_preview(account_id, document_id, template_id, callback=callback_function)
864
865        :param callback function: The callback function
866            for asynchronous request. (optional)
867        :param str account_id: The external account number (int) or account ID Guid. (required)
868        :param str document_id: The ID of the document being accessed. (required)
869        :param str template_id: The ID of the template being accessed. (required)
870        :param DocumentHtmlDefinition document_html_definition:
871        :return: DocumentHtmlDefinitions
872                 If the method is called asynchronously,
873                 returns the request thread.
874        """
875        kwargs['_return_http_data_only'] = True
876        if kwargs.get('callback'):
877            return self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs)
878        else:
879            (data) = self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs)
880            return data

Post Responsive HTML Preview for a document in a template. Creates a preview of the responsive, HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a documentHtmlDefinition object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. 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_template_document_responsive_html_preview(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentHtmlDefinition document_html_definition:
Returns

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

def create_template_document_responsive_html_preview_with_http_info(self, account_id, document_id, template_id, **kwargs)
882    def create_template_document_responsive_html_preview_with_http_info(self, account_id, document_id, template_id, **kwargs):
883        """
884        Post Responsive HTML Preview for a document in a template.
885        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document.
886        This method makes a synchronous HTTP request by default. To make an
887        asynchronous HTTP request, please define a `callback` function
888        to be invoked when receiving the response.
889        >>> def callback_function(response):
890        >>>     pprint(response)
891        >>>
892        >>> thread = api.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, callback=callback_function)
893
894        :param callback function: The callback function
895            for asynchronous request. (optional)
896        :param str account_id: The external account number (int) or account ID Guid. (required)
897        :param str document_id: The ID of the document being accessed. (required)
898        :param str template_id: The ID of the template being accessed. (required)
899        :param DocumentHtmlDefinition document_html_definition:
900        :return: DocumentHtmlDefinitions
901                 If the method is called asynchronously,
902                 returns the request thread.
903        """
904
905        all_params = ['account_id', 'document_id', 'template_id', 'document_html_definition']
906        all_params.append('callback')
907        all_params.append('_return_http_data_only')
908        all_params.append('_preload_content')
909        all_params.append('_request_timeout')
910
911        params = locals()
912        for key, val in iteritems(params['kwargs']):
913            if key not in all_params:
914                raise TypeError(
915                    "Got an unexpected keyword argument '%s'"
916                    " to method create_template_document_responsive_html_preview" % key
917                )
918            params[key] = val
919        del params['kwargs']
920        # verify the required parameter 'account_id' is set
921        if ('account_id' not in params) or (params['account_id'] is None):
922            raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_responsive_html_preview`")
923        # verify the required parameter 'document_id' is set
924        if ('document_id' not in params) or (params['document_id'] is None):
925            raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_responsive_html_preview`")
926        # verify the required parameter 'template_id' is set
927        if ('template_id' not in params) or (params['template_id'] is None):
928            raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_responsive_html_preview`")
929
930
931        collection_formats = {}
932
933        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/responsive_html_preview'.replace('{format}', 'json')
934        path_params = {}
935        if 'account_id' in params:
936            path_params['accountId'] = params['account_id']
937        if 'document_id' in params:
938            path_params['documentId'] = params['document_id']
939        if 'template_id' in params:
940            path_params['templateId'] = params['template_id']
941
942        query_params = {}
943
944        header_params = {}
945
946        form_params = []
947        local_var_files = {}
948
949        body_params = None
950        if 'document_html_definition' in params:
951            body_params = params['document_html_definition']
952        # HTTP header `Accept`
953        header_params['Accept'] = self.api_client.\
954            select_header_accept(['application/json'])
955
956        # Authentication setting
957        auth_settings = []
958
959        return self.api_client.call_api(resource_path, 'POST',
960                                        path_params,
961                                        query_params,
962                                        header_params,
963                                        body=body_params,
964                                        post_params=form_params,
965                                        files=local_var_files,
966                                        response_type='DocumentHtmlDefinitions',
967                                        auth_settings=auth_settings,
968                                        callback=params.get('callback'),
969                                        _return_http_data_only=params.get('_return_http_data_only'),
970                                        _preload_content=params.get('_preload_content', True),
971                                        _request_timeout=params.get('_request_timeout'),
972                                        collection_formats=collection_formats)

Post Responsive HTML Preview for a document in a template. Creates a preview of the responsive, HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a documentHtmlDefinition object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. 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_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentHtmlDefinition document_html_definition:
Returns

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

def create_template_document_tabs(self, account_id, document_id, template_id, **kwargs)
 974    def create_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
 975        """
 976        Adds the tabs to a tempate
 977        Adds tabs to the document specified by `documentId` in the template specified by `templateId`.  In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this:  ``` {   \"prefillTabs\": {     \"textTabs\": [       {         \"value\": \"a prefill text tab\",         \"pageNumber\": \"1\",         \"documentId\": \"1\",         \"xPosition\": 316,         \"yPosition\": 97       }     ]   } } ``` 
 978        This method makes a synchronous HTTP request by default. To make an
 979        asynchronous HTTP request, please define a `callback` function
 980        to be invoked when receiving the response.
 981        >>> def callback_function(response):
 982        >>>     pprint(response)
 983        >>>
 984        >>> thread = api.create_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
 985
 986        :param callback function: The callback function
 987            for asynchronous request. (optional)
 988        :param str account_id: The external account number (int) or account ID Guid. (required)
 989        :param str document_id: The ID of the document being accessed. (required)
 990        :param str template_id: The ID of the template being accessed. (required)
 991        :param TemplateTabs template_tabs:
 992        :return: Tabs
 993                 If the method is called asynchronously,
 994                 returns the request thread.
 995        """
 996        kwargs['_return_http_data_only'] = True
 997        if kwargs.get('callback'):
 998            return self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
 999        else:
1000            (data) = self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
1001            return data

Adds the tabs to a tempate Adds tabs to the document specified by documentId in the template specified by templateId. In the request body, you only need to specify the tabs that your are adding. For example, to add a text prefill tab, your request body might look like this: { "prefillTabs": { "textTabs": [ { "value": "a prefill text tab", "pageNumber": "1", "documentId": "1", "xPosition": 316, "yPosition": 97 } ] } } 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_template_document_tabs(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

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

def create_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs)
1003    def create_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
1004        """
1005        Adds the tabs to a tempate
1006        Adds tabs to the document specified by `documentId` in the template specified by `templateId`.  In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this:  ``` {   \"prefillTabs\": {     \"textTabs\": [       {         \"value\": \"a prefill text tab\",         \"pageNumber\": \"1\",         \"documentId\": \"1\",         \"xPosition\": 316,         \"yPosition\": 97       }     ]   } } ``` 
1007        This method makes a synchronous HTTP request by default. To make an
1008        asynchronous HTTP request, please define a `callback` function
1009        to be invoked when receiving the response.
1010        >>> def callback_function(response):
1011        >>>     pprint(response)
1012        >>>
1013        >>> thread = api.create_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
1014
1015        :param callback function: The callback function
1016            for asynchronous request. (optional)
1017        :param str account_id: The external account number (int) or account ID Guid. (required)
1018        :param str document_id: The ID of the document being accessed. (required)
1019        :param str template_id: The ID of the template being accessed. (required)
1020        :param TemplateTabs template_tabs:
1021        :return: Tabs
1022                 If the method is called asynchronously,
1023                 returns the request thread.
1024        """
1025
1026        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
1027        all_params.append('callback')
1028        all_params.append('_return_http_data_only')
1029        all_params.append('_preload_content')
1030        all_params.append('_request_timeout')
1031
1032        params = locals()
1033        for key, val in iteritems(params['kwargs']):
1034            if key not in all_params:
1035                raise TypeError(
1036                    "Got an unexpected keyword argument '%s'"
1037                    " to method create_template_document_tabs" % key
1038                )
1039            params[key] = val
1040        del params['kwargs']
1041        # verify the required parameter 'account_id' is set
1042        if ('account_id' not in params) or (params['account_id'] is None):
1043            raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_tabs`")
1044        # verify the required parameter 'document_id' is set
1045        if ('document_id' not in params) or (params['document_id'] is None):
1046            raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_tabs`")
1047        # verify the required parameter 'template_id' is set
1048        if ('template_id' not in params) or (params['template_id'] is None):
1049            raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_tabs`")
1050
1051
1052        collection_formats = {}
1053
1054        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
1055        path_params = {}
1056        if 'account_id' in params:
1057            path_params['accountId'] = params['account_id']
1058        if 'document_id' in params:
1059            path_params['documentId'] = params['document_id']
1060        if 'template_id' in params:
1061            path_params['templateId'] = params['template_id']
1062
1063        query_params = {}
1064
1065        header_params = {}
1066
1067        form_params = []
1068        local_var_files = {}
1069
1070        body_params = None
1071        if 'template_tabs' in params:
1072            body_params = params['template_tabs']
1073        # HTTP header `Accept`
1074        header_params['Accept'] = self.api_client.\
1075            select_header_accept(['application/json'])
1076
1077        # Authentication setting
1078        auth_settings = []
1079
1080        return self.api_client.call_api(resource_path, 'POST',
1081                                        path_params,
1082                                        query_params,
1083                                        header_params,
1084                                        body=body_params,
1085                                        post_params=form_params,
1086                                        files=local_var_files,
1087                                        response_type='Tabs',
1088                                        auth_settings=auth_settings,
1089                                        callback=params.get('callback'),
1090                                        _return_http_data_only=params.get('_return_http_data_only'),
1091                                        _preload_content=params.get('_preload_content', True),
1092                                        _request_timeout=params.get('_request_timeout'),
1093                                        collection_formats=collection_formats)

Adds the tabs to a tempate Adds tabs to the document specified by documentId in the template specified by templateId. In the request body, you only need to specify the tabs that your are adding. For example, to add a text prefill tab, your request body might look like this: { "prefillTabs": { "textTabs": [ { "value": "a prefill text tab", "pageNumber": "1", "documentId": "1", "xPosition": 316, "yPosition": 97 } ] } } 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_template_document_tabs_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

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

def create_template_recipient_preview(self, account_id, template_id, **kwargs)
1095    def create_template_recipient_preview(self, account_id, template_id, **kwargs):
1096        """
1097        Provides a URL to start a recipient view of the Envelope UI
1098        This method returns a URL for a template recipient preview  in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
1099        This method makes a synchronous HTTP request by default. To make an
1100        asynchronous HTTP request, please define a `callback` function
1101        to be invoked when receiving the response.
1102        >>> def callback_function(response):
1103        >>>     pprint(response)
1104        >>>
1105        >>> thread = api.create_template_recipient_preview(account_id, template_id, callback=callback_function)
1106
1107        :param callback function: The callback function
1108            for asynchronous request. (optional)
1109        :param str account_id: The external account number (int) or account ID Guid. (required)
1110        :param str template_id: The ID of the template being accessed. (required)
1111        :param RecipientPreviewRequest recipient_preview_request:
1112        :return: ViewUrl
1113                 If the method is called asynchronously,
1114                 returns the request thread.
1115        """
1116        kwargs['_return_http_data_only'] = True
1117        if kwargs.get('callback'):
1118            return self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs)
1119        else:
1120            (data) = self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs)
1121            return data

Provides a URL to start a recipient view of the Envelope UI This method returns a URL for a template recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see Preview and Send. 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_template_recipient_preview(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • RecipientPreviewRequest recipient_preview_request:
Returns

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

def create_template_recipient_preview_with_http_info(self, account_id, template_id, **kwargs)
1123    def create_template_recipient_preview_with_http_info(self, account_id, template_id, **kwargs):
1124        """
1125        Provides a URL to start a recipient view of the Envelope UI
1126        This method returns a URL for a template recipient preview  in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience.  For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents).
1127        This method makes a synchronous HTTP request by default. To make an
1128        asynchronous HTTP request, please define a `callback` function
1129        to be invoked when receiving the response.
1130        >>> def callback_function(response):
1131        >>>     pprint(response)
1132        >>>
1133        >>> thread = api.create_template_recipient_preview_with_http_info(account_id, template_id, callback=callback_function)
1134
1135        :param callback function: The callback function
1136            for asynchronous request. (optional)
1137        :param str account_id: The external account number (int) or account ID Guid. (required)
1138        :param str template_id: The ID of the template being accessed. (required)
1139        :param RecipientPreviewRequest recipient_preview_request:
1140        :return: ViewUrl
1141                 If the method is called asynchronously,
1142                 returns the request thread.
1143        """
1144
1145        all_params = ['account_id', 'template_id', 'recipient_preview_request']
1146        all_params.append('callback')
1147        all_params.append('_return_http_data_only')
1148        all_params.append('_preload_content')
1149        all_params.append('_request_timeout')
1150
1151        params = locals()
1152        for key, val in iteritems(params['kwargs']):
1153            if key not in all_params:
1154                raise TypeError(
1155                    "Got an unexpected keyword argument '%s'"
1156                    " to method create_template_recipient_preview" % key
1157                )
1158            params[key] = val
1159        del params['kwargs']
1160        # verify the required parameter 'account_id' is set
1161        if ('account_id' not in params) or (params['account_id'] is None):
1162            raise ValueError("Missing the required parameter `account_id` when calling `create_template_recipient_preview`")
1163        # verify the required parameter 'template_id' is set
1164        if ('template_id' not in params) or (params['template_id'] is None):
1165            raise ValueError("Missing the required parameter `template_id` when calling `create_template_recipient_preview`")
1166
1167
1168        collection_formats = {}
1169
1170        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/recipient_preview'.replace('{format}', 'json')
1171        path_params = {}
1172        if 'account_id' in params:
1173            path_params['accountId'] = params['account_id']
1174        if 'template_id' in params:
1175            path_params['templateId'] = params['template_id']
1176
1177        query_params = {}
1178
1179        header_params = {}
1180
1181        form_params = []
1182        local_var_files = {}
1183
1184        body_params = None
1185        if 'recipient_preview_request' in params:
1186            body_params = params['recipient_preview_request']
1187        # HTTP header `Accept`
1188        header_params['Accept'] = self.api_client.\
1189            select_header_accept(['application/json'])
1190
1191        # Authentication setting
1192        auth_settings = []
1193
1194        return self.api_client.call_api(resource_path, 'POST',
1195                                        path_params,
1196                                        query_params,
1197                                        header_params,
1198                                        body=body_params,
1199                                        post_params=form_params,
1200                                        files=local_var_files,
1201                                        response_type='ViewUrl',
1202                                        auth_settings=auth_settings,
1203                                        callback=params.get('callback'),
1204                                        _return_http_data_only=params.get('_return_http_data_only'),
1205                                        _preload_content=params.get('_preload_content', True),
1206                                        _request_timeout=params.get('_request_timeout'),
1207                                        collection_formats=collection_formats)

Provides a URL to start a recipient view of the Envelope UI This method returns a URL for a template recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see Preview and Send. 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_template_recipient_preview_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • RecipientPreviewRequest recipient_preview_request:
Returns

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

def create_template_responsive_html_preview(self, account_id, template_id, **kwargs)
1209    def create_template_responsive_html_preview(self, account_id, template_id, **kwargs):
1210        """
1211        Get Responsive HTML Preview for all documents in a template.
1212        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
1213        This method makes a synchronous HTTP request by default. To make an
1214        asynchronous HTTP request, please define a `callback` function
1215        to be invoked when receiving the response.
1216        >>> def callback_function(response):
1217        >>>     pprint(response)
1218        >>>
1219        >>> thread = api.create_template_responsive_html_preview(account_id, template_id, callback=callback_function)
1220
1221        :param callback function: The callback function
1222            for asynchronous request. (optional)
1223        :param str account_id: The external account number (int) or account ID Guid. (required)
1224        :param str template_id: The ID of the template being accessed. (required)
1225        :param DocumentHtmlDefinition document_html_definition:
1226        :return: DocumentHtmlDefinitions
1227                 If the method is called asynchronously,
1228                 returns the request thread.
1229        """
1230        kwargs['_return_http_data_only'] = True
1231        if kwargs.get('callback'):
1232            return self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs)
1233        else:
1234            (data) = self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs)
1235            return data

Get Responsive HTML Preview for all documents in a template. Creates a preview of the responsive, HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a documentHtmlDefinition object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. 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_template_responsive_html_preview(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • DocumentHtmlDefinition document_html_definition:
Returns

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

def create_template_responsive_html_preview_with_http_info(self, account_id, template_id, **kwargs)
1237    def create_template_responsive_html_preview_with_http_info(self, account_id, template_id, **kwargs):
1238        """
1239        Get Responsive HTML Preview for all documents in a template.
1240        Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending.  The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents.
1241        This method makes a synchronous HTTP request by default. To make an
1242        asynchronous HTTP request, please define a `callback` function
1243        to be invoked when receiving the response.
1244        >>> def callback_function(response):
1245        >>>     pprint(response)
1246        >>>
1247        >>> thread = api.create_template_responsive_html_preview_with_http_info(account_id, template_id, callback=callback_function)
1248
1249        :param callback function: The callback function
1250            for asynchronous request. (optional)
1251        :param str account_id: The external account number (int) or account ID Guid. (required)
1252        :param str template_id: The ID of the template being accessed. (required)
1253        :param DocumentHtmlDefinition document_html_definition:
1254        :return: DocumentHtmlDefinitions
1255                 If the method is called asynchronously,
1256                 returns the request thread.
1257        """
1258
1259        all_params = ['account_id', 'template_id', 'document_html_definition']
1260        all_params.append('callback')
1261        all_params.append('_return_http_data_only')
1262        all_params.append('_preload_content')
1263        all_params.append('_request_timeout')
1264
1265        params = locals()
1266        for key, val in iteritems(params['kwargs']):
1267            if key not in all_params:
1268                raise TypeError(
1269                    "Got an unexpected keyword argument '%s'"
1270                    " to method create_template_responsive_html_preview" % key
1271                )
1272            params[key] = val
1273        del params['kwargs']
1274        # verify the required parameter 'account_id' is set
1275        if ('account_id' not in params) or (params['account_id'] is None):
1276            raise ValueError("Missing the required parameter `account_id` when calling `create_template_responsive_html_preview`")
1277        # verify the required parameter 'template_id' is set
1278        if ('template_id' not in params) or (params['template_id'] is None):
1279            raise ValueError("Missing the required parameter `template_id` when calling `create_template_responsive_html_preview`")
1280
1281
1282        collection_formats = {}
1283
1284        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/responsive_html_preview'.replace('{format}', 'json')
1285        path_params = {}
1286        if 'account_id' in params:
1287            path_params['accountId'] = params['account_id']
1288        if 'template_id' in params:
1289            path_params['templateId'] = params['template_id']
1290
1291        query_params = {}
1292
1293        header_params = {}
1294
1295        form_params = []
1296        local_var_files = {}
1297
1298        body_params = None
1299        if 'document_html_definition' in params:
1300            body_params = params['document_html_definition']
1301        # HTTP header `Accept`
1302        header_params['Accept'] = self.api_client.\
1303            select_header_accept(['application/json'])
1304
1305        # Authentication setting
1306        auth_settings = []
1307
1308        return self.api_client.call_api(resource_path, 'POST',
1309                                        path_params,
1310                                        query_params,
1311                                        header_params,
1312                                        body=body_params,
1313                                        post_params=form_params,
1314                                        files=local_var_files,
1315                                        response_type='DocumentHtmlDefinitions',
1316                                        auth_settings=auth_settings,
1317                                        callback=params.get('callback'),
1318                                        _return_http_data_only=params.get('_return_http_data_only'),
1319                                        _preload_content=params.get('_preload_content', True),
1320                                        _request_timeout=params.get('_request_timeout'),
1321                                        collection_formats=collection_formats)

Get Responsive HTML Preview for all documents in a template. Creates a preview of the responsive, HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a documentHtmlDefinition object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. 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_template_responsive_html_preview_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • DocumentHtmlDefinition document_html_definition:
Returns

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

def delete_custom_fields(self, account_id, template_id, **kwargs)
1323    def delete_custom_fields(self, account_id, template_id, **kwargs):
1324        """
1325        Deletes envelope custom fields in a template.
1326        Deletes envelope custom fields in a template.
1327        This method makes a synchronous HTTP request by default. To make an
1328        asynchronous HTTP request, please define a `callback` function
1329        to be invoked when receiving the response.
1330        >>> def callback_function(response):
1331        >>>     pprint(response)
1332        >>>
1333        >>> thread = api.delete_custom_fields(account_id, template_id, callback=callback_function)
1334
1335        :param callback function: The callback function
1336            for asynchronous request. (optional)
1337        :param str account_id: The external account number (int) or account ID Guid. (required)
1338        :param str template_id: The ID of the template being accessed. (required)
1339        :param TemplateCustomFields template_custom_fields:
1340        :return: CustomFields
1341                 If the method is called asynchronously,
1342                 returns the request thread.
1343        """
1344        kwargs['_return_http_data_only'] = True
1345        if kwargs.get('callback'):
1346            return self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs)
1347        else:
1348            (data) = self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs)
1349            return data

Deletes envelope custom fields in a template. Deletes envelope custom fields in a template. 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_fields(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • TemplateCustomFields template_custom_fields:
Returns

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

def delete_custom_fields_with_http_info(self, account_id, template_id, **kwargs)
1351    def delete_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
1352        """
1353        Deletes envelope custom fields in a template.
1354        Deletes envelope custom fields in a template.
1355        This method makes a synchronous HTTP request by default. To make an
1356        asynchronous HTTP request, please define a `callback` function
1357        to be invoked when receiving the response.
1358        >>> def callback_function(response):
1359        >>>     pprint(response)
1360        >>>
1361        >>> thread = api.delete_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
1362
1363        :param callback function: The callback function
1364            for asynchronous request. (optional)
1365        :param str account_id: The external account number (int) or account ID Guid. (required)
1366        :param str template_id: The ID of the template being accessed. (required)
1367        :param TemplateCustomFields template_custom_fields:
1368        :return: CustomFields
1369                 If the method is called asynchronously,
1370                 returns the request thread.
1371        """
1372
1373        all_params = ['account_id', 'template_id', 'template_custom_fields']
1374        all_params.append('callback')
1375        all_params.append('_return_http_data_only')
1376        all_params.append('_preload_content')
1377        all_params.append('_request_timeout')
1378
1379        params = locals()
1380        for key, val in iteritems(params['kwargs']):
1381            if key not in all_params:
1382                raise TypeError(
1383                    "Got an unexpected keyword argument '%s'"
1384                    " to method delete_custom_fields" % key
1385                )
1386            params[key] = val
1387        del params['kwargs']
1388        # verify the required parameter 'account_id' is set
1389        if ('account_id' not in params) or (params['account_id'] is None):
1390            raise ValueError("Missing the required parameter `account_id` when calling `delete_custom_fields`")
1391        # verify the required parameter 'template_id' is set
1392        if ('template_id' not in params) or (params['template_id'] is None):
1393            raise ValueError("Missing the required parameter `template_id` when calling `delete_custom_fields`")
1394
1395
1396        collection_formats = {}
1397
1398        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
1399        path_params = {}
1400        if 'account_id' in params:
1401            path_params['accountId'] = params['account_id']
1402        if 'template_id' in params:
1403            path_params['templateId'] = params['template_id']
1404
1405        query_params = {}
1406
1407        header_params = {}
1408
1409        form_params = []
1410        local_var_files = {}
1411
1412        body_params = None
1413        if 'template_custom_fields' in params:
1414            body_params = params['template_custom_fields']
1415        # HTTP header `Accept`
1416        header_params['Accept'] = self.api_client.\
1417            select_header_accept(['application/json'])
1418
1419        # Authentication setting
1420        auth_settings = []
1421
1422        return self.api_client.call_api(resource_path, 'DELETE',
1423                                        path_params,
1424                                        query_params,
1425                                        header_params,
1426                                        body=body_params,
1427                                        post_params=form_params,
1428                                        files=local_var_files,
1429                                        response_type='CustomFields',
1430                                        auth_settings=auth_settings,
1431                                        callback=params.get('callback'),
1432                                        _return_http_data_only=params.get('_return_http_data_only'),
1433                                        _preload_content=params.get('_preload_content', True),
1434                                        _request_timeout=params.get('_request_timeout'),
1435                                        collection_formats=collection_formats)

Deletes envelope custom fields in a template. Deletes envelope custom fields in a template. 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_fields_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • TemplateCustomFields template_custom_fields:
Returns

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

def delete_document_fields(self, account_id, document_id, template_id, **kwargs)
1437    def delete_document_fields(self, account_id, document_id, template_id, **kwargs):
1438        """
1439        Deletes custom document fields from an existing template document.
1440        Deletes custom document fields from an existing template document.
1441        This method makes a synchronous HTTP request by default. To make an
1442        asynchronous HTTP request, please define a `callback` function
1443        to be invoked when receiving the response.
1444        >>> def callback_function(response):
1445        >>>     pprint(response)
1446        >>>
1447        >>> thread = api.delete_document_fields(account_id, document_id, template_id, callback=callback_function)
1448
1449        :param callback function: The callback function
1450            for asynchronous request. (optional)
1451        :param str account_id: The external account number (int) or account ID Guid. (required)
1452        :param str document_id: The ID of the document being accessed. (required)
1453        :param str template_id: The ID of the template being accessed. (required)
1454        :param DocumentFieldsInformation document_fields_information:
1455        :return: DocumentFieldsInformation
1456                 If the method is called asynchronously,
1457                 returns the request thread.
1458        """
1459        kwargs['_return_http_data_only'] = True
1460        if kwargs.get('callback'):
1461            return self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
1462        else:
1463            (data) = self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
1464            return data

Deletes custom document fields from an existing template document. Deletes custom document fields from an existing template document. 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_document_fields(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentFieldsInformation document_fields_information:
Returns

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

def delete_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs)
1466    def delete_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
1467        """
1468        Deletes custom document fields from an existing template document.
1469        Deletes custom document fields from an existing template document.
1470        This method makes a synchronous HTTP request by default. To make an
1471        asynchronous HTTP request, please define a `callback` function
1472        to be invoked when receiving the response.
1473        >>> def callback_function(response):
1474        >>>     pprint(response)
1475        >>>
1476        >>> thread = api.delete_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
1477
1478        :param callback function: The callback function
1479            for asynchronous request. (optional)
1480        :param str account_id: The external account number (int) or account ID Guid. (required)
1481        :param str document_id: The ID of the document being accessed. (required)
1482        :param str template_id: The ID of the template being accessed. (required)
1483        :param DocumentFieldsInformation document_fields_information:
1484        :return: DocumentFieldsInformation
1485                 If the method is called asynchronously,
1486                 returns the request thread.
1487        """
1488
1489        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
1490        all_params.append('callback')
1491        all_params.append('_return_http_data_only')
1492        all_params.append('_preload_content')
1493        all_params.append('_request_timeout')
1494
1495        params = locals()
1496        for key, val in iteritems(params['kwargs']):
1497            if key not in all_params:
1498                raise TypeError(
1499                    "Got an unexpected keyword argument '%s'"
1500                    " to method delete_document_fields" % key
1501                )
1502            params[key] = val
1503        del params['kwargs']
1504        # verify the required parameter 'account_id' is set
1505        if ('account_id' not in params) or (params['account_id'] is None):
1506            raise ValueError("Missing the required parameter `account_id` when calling `delete_document_fields`")
1507        # verify the required parameter 'document_id' is set
1508        if ('document_id' not in params) or (params['document_id'] is None):
1509            raise ValueError("Missing the required parameter `document_id` when calling `delete_document_fields`")
1510        # verify the required parameter 'template_id' is set
1511        if ('template_id' not in params) or (params['template_id'] is None):
1512            raise ValueError("Missing the required parameter `template_id` when calling `delete_document_fields`")
1513
1514
1515        collection_formats = {}
1516
1517        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
1518        path_params = {}
1519        if 'account_id' in params:
1520            path_params['accountId'] = params['account_id']
1521        if 'document_id' in params:
1522            path_params['documentId'] = params['document_id']
1523        if 'template_id' in params:
1524            path_params['templateId'] = params['template_id']
1525
1526        query_params = {}
1527
1528        header_params = {}
1529
1530        form_params = []
1531        local_var_files = {}
1532
1533        body_params = None
1534        if 'document_fields_information' in params:
1535            body_params = params['document_fields_information']
1536        # HTTP header `Accept`
1537        header_params['Accept'] = self.api_client.\
1538            select_header_accept(['application/json'])
1539
1540        # Authentication setting
1541        auth_settings = []
1542
1543        return self.api_client.call_api(resource_path, 'DELETE',
1544                                        path_params,
1545                                        query_params,
1546                                        header_params,
1547                                        body=body_params,
1548                                        post_params=form_params,
1549                                        files=local_var_files,
1550                                        response_type='DocumentFieldsInformation',
1551                                        auth_settings=auth_settings,
1552                                        callback=params.get('callback'),
1553                                        _return_http_data_only=params.get('_return_http_data_only'),
1554                                        _preload_content=params.get('_preload_content', True),
1555                                        _request_timeout=params.get('_request_timeout'),
1556                                        collection_formats=collection_formats)

Deletes custom document fields from an existing template document. Deletes custom document fields from an existing template document. 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_document_fields_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentFieldsInformation document_fields_information:
Returns

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

def delete_document_page(self, account_id, document_id, page_number, template_id, **kwargs)
1558    def delete_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
1559        """
1560        Deletes a page from a document in an template.
1561        Deletes a page from a document in a template based on the page number.
1562        This method makes a synchronous HTTP request by default. To make an
1563        asynchronous HTTP request, please define a `callback` function
1564        to be invoked when receiving the response.
1565        >>> def callback_function(response):
1566        >>>     pprint(response)
1567        >>>
1568        >>> thread = api.delete_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
1569
1570        :param callback function: The callback function
1571            for asynchronous request. (optional)
1572        :param str account_id: The external account number (int) or account ID Guid. (required)
1573        :param str document_id: The ID of the document being accessed. (required)
1574        :param str page_number: The page number being accessed. (required)
1575        :param str template_id: The ID of the template being accessed. (required)
1576        :param PageRequest page_request:
1577        :return: None
1578                 If the method is called asynchronously,
1579                 returns the request thread.
1580        """
1581        kwargs['_return_http_data_only'] = True
1582        if kwargs.get('callback'):
1583            return self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
1584        else:
1585            (data) = self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
1586            return data

Deletes a page from a document in an template. Deletes a page from a document in a template based on the page number. 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_document_page(account_id, document_id, page_number, template_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 document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • PageRequest page_request:
Returns

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

def delete_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs)
1588    def delete_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
1589        """
1590        Deletes a page from a document in an template.
1591        Deletes a page from a document in a template based on the page number.
1592        This method makes a synchronous HTTP request by default. To make an
1593        asynchronous HTTP request, please define a `callback` function
1594        to be invoked when receiving the response.
1595        >>> def callback_function(response):
1596        >>>     pprint(response)
1597        >>>
1598        >>> thread = api.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
1599
1600        :param callback function: The callback function
1601            for asynchronous request. (optional)
1602        :param str account_id: The external account number (int) or account ID Guid. (required)
1603        :param str document_id: The ID of the document being accessed. (required)
1604        :param str page_number: The page number being accessed. (required)
1605        :param str template_id: The ID of the template being accessed. (required)
1606        :param PageRequest page_request:
1607        :return: None
1608                 If the method is called asynchronously,
1609                 returns the request thread.
1610        """
1611
1612        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
1613        all_params.append('callback')
1614        all_params.append('_return_http_data_only')
1615        all_params.append('_preload_content')
1616        all_params.append('_request_timeout')
1617
1618        params = locals()
1619        for key, val in iteritems(params['kwargs']):
1620            if key not in all_params:
1621                raise TypeError(
1622                    "Got an unexpected keyword argument '%s'"
1623                    " to method delete_document_page" % key
1624                )
1625            params[key] = val
1626        del params['kwargs']
1627        # verify the required parameter 'account_id' is set
1628        if ('account_id' not in params) or (params['account_id'] is None):
1629            raise ValueError("Missing the required parameter `account_id` when calling `delete_document_page`")
1630        # verify the required parameter 'document_id' is set
1631        if ('document_id' not in params) or (params['document_id'] is None):
1632            raise ValueError("Missing the required parameter `document_id` when calling `delete_document_page`")
1633        # verify the required parameter 'page_number' is set
1634        if ('page_number' not in params) or (params['page_number'] is None):
1635            raise ValueError("Missing the required parameter `page_number` when calling `delete_document_page`")
1636        # verify the required parameter 'template_id' is set
1637        if ('template_id' not in params) or (params['template_id'] is None):
1638            raise ValueError("Missing the required parameter `template_id` when calling `delete_document_page`")
1639
1640
1641        collection_formats = {}
1642
1643        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}'.replace('{format}', 'json')
1644        path_params = {}
1645        if 'account_id' in params:
1646            path_params['accountId'] = params['account_id']
1647        if 'document_id' in params:
1648            path_params['documentId'] = params['document_id']
1649        if 'page_number' in params:
1650            path_params['pageNumber'] = params['page_number']
1651        if 'template_id' in params:
1652            path_params['templateId'] = params['template_id']
1653
1654        query_params = {}
1655
1656        header_params = {}
1657
1658        form_params = []
1659        local_var_files = {}
1660
1661        body_params = None
1662        if 'page_request' in params:
1663            body_params = params['page_request']
1664        # HTTP header `Accept`
1665        header_params['Accept'] = self.api_client.\
1666            select_header_accept(['application/json'])
1667
1668        # Authentication setting
1669        auth_settings = []
1670
1671        return self.api_client.call_api(resource_path, 'DELETE',
1672                                        path_params,
1673                                        query_params,
1674                                        header_params,
1675                                        body=body_params,
1676                                        post_params=form_params,
1677                                        files=local_var_files,
1678                                        response_type=None,
1679                                        auth_settings=auth_settings,
1680                                        callback=params.get('callback'),
1681                                        _return_http_data_only=params.get('_return_http_data_only'),
1682                                        _preload_content=params.get('_preload_content', True),
1683                                        _request_timeout=params.get('_request_timeout'),
1684                                        collection_formats=collection_formats)

Deletes a page from a document in an template. Deletes a page from a document in a template based on the page number. 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_document_page_with_http_info(account_id, document_id, page_number, template_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 document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • PageRequest page_request:
Returns

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

def delete_documents(self, account_id, template_id, **kwargs)
1686    def delete_documents(self, account_id, template_id, **kwargs):
1687        """
1688        Deletes documents from a template.
1689        Deletes one or more documents from an existing template.
1690        This method makes a synchronous HTTP request by default. To make an
1691        asynchronous HTTP request, please define a `callback` function
1692        to be invoked when receiving the response.
1693        >>> def callback_function(response):
1694        >>>     pprint(response)
1695        >>>
1696        >>> thread = api.delete_documents(account_id, template_id, callback=callback_function)
1697
1698        :param callback function: The callback function
1699            for asynchronous request. (optional)
1700        :param str account_id: The external account number (int) or account ID Guid. (required)
1701        :param str template_id: The ID of the template being accessed. (required)
1702        :param EnvelopeDefinition envelope_definition:
1703        :return: TemplateDocumentsResult
1704                 If the method is called asynchronously,
1705                 returns the request thread.
1706        """
1707        kwargs['_return_http_data_only'] = True
1708        if kwargs.get('callback'):
1709            return self.delete_documents_with_http_info(account_id, template_id, **kwargs)
1710        else:
1711            (data) = self.delete_documents_with_http_info(account_id, template_id, **kwargs)
1712            return data

Deletes documents from a template. Deletes one or more documents from an existing template. 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_documents(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • EnvelopeDefinition envelope_definition:
Returns

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

def delete_documents_with_http_info(self, account_id, template_id, **kwargs)
1714    def delete_documents_with_http_info(self, account_id, template_id, **kwargs):
1715        """
1716        Deletes documents from a template.
1717        Deletes one or more documents from an existing template.
1718        This method makes a synchronous HTTP request by default. To make an
1719        asynchronous HTTP request, please define a `callback` function
1720        to be invoked when receiving the response.
1721        >>> def callback_function(response):
1722        >>>     pprint(response)
1723        >>>
1724        >>> thread = api.delete_documents_with_http_info(account_id, template_id, callback=callback_function)
1725
1726        :param callback function: The callback function
1727            for asynchronous request. (optional)
1728        :param str account_id: The external account number (int) or account ID Guid. (required)
1729        :param str template_id: The ID of the template being accessed. (required)
1730        :param EnvelopeDefinition envelope_definition:
1731        :return: TemplateDocumentsResult
1732                 If the method is called asynchronously,
1733                 returns the request thread.
1734        """
1735
1736        all_params = ['account_id', 'template_id', 'envelope_definition']
1737        all_params.append('callback')
1738        all_params.append('_return_http_data_only')
1739        all_params.append('_preload_content')
1740        all_params.append('_request_timeout')
1741
1742        params = locals()
1743        for key, val in iteritems(params['kwargs']):
1744            if key not in all_params:
1745                raise TypeError(
1746                    "Got an unexpected keyword argument '%s'"
1747                    " to method delete_documents" % key
1748                )
1749            params[key] = val
1750        del params['kwargs']
1751        # verify the required parameter 'account_id' is set
1752        if ('account_id' not in params) or (params['account_id'] is None):
1753            raise ValueError("Missing the required parameter `account_id` when calling `delete_documents`")
1754        # verify the required parameter 'template_id' is set
1755        if ('template_id' not in params) or (params['template_id'] is None):
1756            raise ValueError("Missing the required parameter `template_id` when calling `delete_documents`")
1757
1758
1759        collection_formats = {}
1760
1761        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
1762        path_params = {}
1763        if 'account_id' in params:
1764            path_params['accountId'] = params['account_id']
1765        if 'template_id' in params:
1766            path_params['templateId'] = params['template_id']
1767
1768        query_params = {}
1769
1770        header_params = {}
1771
1772        form_params = []
1773        local_var_files = {}
1774
1775        body_params = None
1776        if 'envelope_definition' in params:
1777            body_params = params['envelope_definition']
1778        # HTTP header `Accept`
1779        header_params['Accept'] = self.api_client.\
1780            select_header_accept(['application/json'])
1781
1782        # Authentication setting
1783        auth_settings = []
1784
1785        return self.api_client.call_api(resource_path, 'DELETE',
1786                                        path_params,
1787                                        query_params,
1788                                        header_params,
1789                                        body=body_params,
1790                                        post_params=form_params,
1791                                        files=local_var_files,
1792                                        response_type='TemplateDocumentsResult',
1793                                        auth_settings=auth_settings,
1794                                        callback=params.get('callback'),
1795                                        _return_http_data_only=params.get('_return_http_data_only'),
1796                                        _preload_content=params.get('_preload_content', True),
1797                                        _request_timeout=params.get('_request_timeout'),
1798                                        collection_formats=collection_formats)

Deletes documents from a template. Deletes one or more documents from an existing template. 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_documents_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • EnvelopeDefinition envelope_definition:
Returns

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

def delete_group_share(self, account_id, template_id, template_part, **kwargs)
1800    def delete_group_share(self, account_id, template_id, template_part, **kwargs):
1801        """
1802        Removes a member group's sharing permissions for a template.
1803        Removes a member group's sharing permissions for a specified template.
1804        This method makes a synchronous HTTP request by default. To make an
1805        asynchronous HTTP request, please define a `callback` function
1806        to be invoked when receiving the response.
1807        >>> def callback_function(response):
1808        >>>     pprint(response)
1809        >>>
1810        >>> thread = api.delete_group_share(account_id, template_id, template_part, callback=callback_function)
1811
1812        :param callback function: The callback function
1813            for asynchronous request. (optional)
1814        :param str account_id: The external account number (int) or account ID Guid. (required)
1815        :param str template_id: The ID of the template being accessed. (required)
1816        :param str template_part: Currently, the only defined part is **groups**. (required)
1817        :param GroupInformation group_information:
1818        :return: GroupInformation
1819                 If the method is called asynchronously,
1820                 returns the request thread.
1821        """
1822        kwargs['_return_http_data_only'] = True
1823        if kwargs.get('callback'):
1824            return self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
1825        else:
1826            (data) = self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
1827            return data

Removes a member group's sharing permissions for a template. Removes a member group's sharing permissions for a specified template. 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_group_share(account_id, template_id, template_part, 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 template_id: The ID of the template being accessed. (required)
  • str template_part: Currently, the only defined part is groups. (required)
  • GroupInformation group_information:
Returns

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

def delete_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs)
1829    def delete_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
1830        """
1831        Removes a member group's sharing permissions for a template.
1832        Removes a member group's sharing permissions for a specified template.
1833        This method makes a synchronous HTTP request by default. To make an
1834        asynchronous HTTP request, please define a `callback` function
1835        to be invoked when receiving the response.
1836        >>> def callback_function(response):
1837        >>>     pprint(response)
1838        >>>
1839        >>> thread = api.delete_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
1840
1841        :param callback function: The callback function
1842            for asynchronous request. (optional)
1843        :param str account_id: The external account number (int) or account ID Guid. (required)
1844        :param str template_id: The ID of the template being accessed. (required)
1845        :param str template_part: Currently, the only defined part is **groups**. (required)
1846        :param GroupInformation group_information:
1847        :return: GroupInformation
1848                 If the method is called asynchronously,
1849                 returns the request thread.
1850        """
1851
1852        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
1853        all_params.append('callback')
1854        all_params.append('_return_http_data_only')
1855        all_params.append('_preload_content')
1856        all_params.append('_request_timeout')
1857
1858        params = locals()
1859        for key, val in iteritems(params['kwargs']):
1860            if key not in all_params:
1861                raise TypeError(
1862                    "Got an unexpected keyword argument '%s'"
1863                    " to method delete_group_share" % key
1864                )
1865            params[key] = val
1866        del params['kwargs']
1867        # verify the required parameter 'account_id' is set
1868        if ('account_id' not in params) or (params['account_id'] is None):
1869            raise ValueError("Missing the required parameter `account_id` when calling `delete_group_share`")
1870        # verify the required parameter 'template_id' is set
1871        if ('template_id' not in params) or (params['template_id'] is None):
1872            raise ValueError("Missing the required parameter `template_id` when calling `delete_group_share`")
1873        # verify the required parameter 'template_part' is set
1874        if ('template_part' not in params) or (params['template_part'] is None):
1875            raise ValueError("Missing the required parameter `template_part` when calling `delete_group_share`")
1876
1877
1878        collection_formats = {}
1879
1880        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
1881        path_params = {}
1882        if 'account_id' in params:
1883            path_params['accountId'] = params['account_id']
1884        if 'template_id' in params:
1885            path_params['templateId'] = params['template_id']
1886        if 'template_part' in params:
1887            path_params['templatePart'] = params['template_part']
1888
1889        query_params = {}
1890
1891        header_params = {}
1892
1893        form_params = []
1894        local_var_files = {}
1895
1896        body_params = None
1897        if 'group_information' in params:
1898            body_params = params['group_information']
1899        # HTTP header `Accept`
1900        header_params['Accept'] = self.api_client.\
1901            select_header_accept(['application/json'])
1902
1903        # Authentication setting
1904        auth_settings = []
1905
1906        return self.api_client.call_api(resource_path, 'DELETE',
1907                                        path_params,
1908                                        query_params,
1909                                        header_params,
1910                                        body=body_params,
1911                                        post_params=form_params,
1912                                        files=local_var_files,
1913                                        response_type='GroupInformation',
1914                                        auth_settings=auth_settings,
1915                                        callback=params.get('callback'),
1916                                        _return_http_data_only=params.get('_return_http_data_only'),
1917                                        _preload_content=params.get('_preload_content', True),
1918                                        _request_timeout=params.get('_request_timeout'),
1919                                        collection_formats=collection_formats)

Removes a member group's sharing permissions for a template. Removes a member group's sharing permissions for a specified template. 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_group_share_with_http_info(account_id, template_id, template_part, 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 template_id: The ID of the template being accessed. (required)
  • str template_part: Currently, the only defined part is groups. (required)
  • GroupInformation group_information:
Returns

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

def delete_lock(self, account_id, template_id, **kwargs)
1921    def delete_lock(self, account_id, template_id, **kwargs):
1922        """
1923        Deletes a template lock.
1924        Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
1925        This method makes a synchronous HTTP request by default. To make an
1926        asynchronous HTTP request, please define a `callback` function
1927        to be invoked when receiving the response.
1928        >>> def callback_function(response):
1929        >>>     pprint(response)
1930        >>>
1931        >>> thread = api.delete_lock(account_id, template_id, callback=callback_function)
1932
1933        :param callback function: The callback function
1934            for asynchronous request. (optional)
1935        :param str account_id: The external account number (int) or account ID Guid. (required)
1936        :param str template_id: The ID of the template being accessed. (required)
1937        :param LockRequest lock_request:
1938        :return: LockInformation
1939                 If the method is called asynchronously,
1940                 returns the request thread.
1941        """
1942        kwargs['_return_http_data_only'] = True
1943        if kwargs.get('callback'):
1944            return self.delete_lock_with_http_info(account_id, template_id, **kwargs)
1945        else:
1946            (data) = self.delete_lock_with_http_info(account_id, template_id, **kwargs)
1947            return data

Deletes a template lock. Deletes the lock from the specified template. The X-DocuSign-Edit header must be included in the request. 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_lock(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • LockRequest lock_request:
Returns

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

def delete_lock_with_http_info(self, account_id, template_id, **kwargs)
1949    def delete_lock_with_http_info(self, account_id, template_id, **kwargs):
1950        """
1951        Deletes a template lock.
1952        Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
1953        This method makes a synchronous HTTP request by default. To make an
1954        asynchronous HTTP request, please define a `callback` function
1955        to be invoked when receiving the response.
1956        >>> def callback_function(response):
1957        >>>     pprint(response)
1958        >>>
1959        >>> thread = api.delete_lock_with_http_info(account_id, template_id, callback=callback_function)
1960
1961        :param callback function: The callback function
1962            for asynchronous request. (optional)
1963        :param str account_id: The external account number (int) or account ID Guid. (required)
1964        :param str template_id: The ID of the template being accessed. (required)
1965        :param LockRequest lock_request:
1966        :return: LockInformation
1967                 If the method is called asynchronously,
1968                 returns the request thread.
1969        """
1970
1971        all_params = ['account_id', 'template_id', 'lock_request']
1972        all_params.append('callback')
1973        all_params.append('_return_http_data_only')
1974        all_params.append('_preload_content')
1975        all_params.append('_request_timeout')
1976
1977        params = locals()
1978        for key, val in iteritems(params['kwargs']):
1979            if key not in all_params:
1980                raise TypeError(
1981                    "Got an unexpected keyword argument '%s'"
1982                    " to method delete_lock" % key
1983                )
1984            params[key] = val
1985        del params['kwargs']
1986        # verify the required parameter 'account_id' is set
1987        if ('account_id' not in params) or (params['account_id'] is None):
1988            raise ValueError("Missing the required parameter `account_id` when calling `delete_lock`")
1989        # verify the required parameter 'template_id' is set
1990        if ('template_id' not in params) or (params['template_id'] is None):
1991            raise ValueError("Missing the required parameter `template_id` when calling `delete_lock`")
1992
1993
1994        collection_formats = {}
1995
1996        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
1997        path_params = {}
1998        if 'account_id' in params:
1999            path_params['accountId'] = params['account_id']
2000        if 'template_id' in params:
2001            path_params['templateId'] = params['template_id']
2002
2003        query_params = {}
2004
2005        header_params = {}
2006
2007        form_params = []
2008        local_var_files = {}
2009
2010        body_params = None
2011        if 'lock_request' in params:
2012            body_params = params['lock_request']
2013        # HTTP header `Accept`
2014        header_params['Accept'] = self.api_client.\
2015            select_header_accept(['application/json'])
2016
2017        # Authentication setting
2018        auth_settings = []
2019
2020        return self.api_client.call_api(resource_path, 'DELETE',
2021                                        path_params,
2022                                        query_params,
2023                                        header_params,
2024                                        body=body_params,
2025                                        post_params=form_params,
2026                                        files=local_var_files,
2027                                        response_type='LockInformation',
2028                                        auth_settings=auth_settings,
2029                                        callback=params.get('callback'),
2030                                        _return_http_data_only=params.get('_return_http_data_only'),
2031                                        _preload_content=params.get('_preload_content', True),
2032                                        _request_timeout=params.get('_request_timeout'),
2033                                        collection_formats=collection_formats)

Deletes a template lock. Deletes the lock from the specified template. The X-DocuSign-Edit header must be included in the request. 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_lock_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • LockRequest lock_request:
Returns

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

def delete_recipient(self, account_id, recipient_id, template_id, **kwargs)
2035    def delete_recipient(self, account_id, recipient_id, template_id, **kwargs):
2036        """
2037        Deletes the specified recipient file from a template.
2038        Deletes the specified recipient file from the specified template.
2039        This method makes a synchronous HTTP request by default. To make an
2040        asynchronous HTTP request, please define a `callback` function
2041        to be invoked when receiving the response.
2042        >>> def callback_function(response):
2043        >>>     pprint(response)
2044        >>>
2045        >>> thread = api.delete_recipient(account_id, recipient_id, template_id, callback=callback_function)
2046
2047        :param callback function: The callback function
2048            for asynchronous request. (optional)
2049        :param str account_id: The external account number (int) or account ID Guid. (required)
2050        :param str recipient_id: The ID of the recipient being accessed. (required)
2051        :param str template_id: The ID of the template being accessed. (required)
2052        :param TemplateRecipients template_recipients:
2053        :return: Recipients
2054                 If the method is called asynchronously,
2055                 returns the request thread.
2056        """
2057        kwargs['_return_http_data_only'] = True
2058        if kwargs.get('callback'):
2059            return self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs)
2060        else:
2061            (data) = self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs)
2062            return data

Deletes the specified recipient file from a template. Deletes the specified recipient file from the specified template. 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_recipient(account_id, recipient_id, template_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 recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateRecipients template_recipients:
Returns

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

def delete_recipient_with_http_info(self, account_id, recipient_id, template_id, **kwargs)
2064    def delete_recipient_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
2065        """
2066        Deletes the specified recipient file from a template.
2067        Deletes the specified recipient file from the specified template.
2068        This method makes a synchronous HTTP request by default. To make an
2069        asynchronous HTTP request, please define a `callback` function
2070        to be invoked when receiving the response.
2071        >>> def callback_function(response):
2072        >>>     pprint(response)
2073        >>>
2074        >>> thread = api.delete_recipient_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
2075
2076        :param callback function: The callback function
2077            for asynchronous request. (optional)
2078        :param str account_id: The external account number (int) or account ID Guid. (required)
2079        :param str recipient_id: The ID of the recipient being accessed. (required)
2080        :param str template_id: The ID of the template being accessed. (required)
2081        :param TemplateRecipients template_recipients:
2082        :return: Recipients
2083                 If the method is called asynchronously,
2084                 returns the request thread.
2085        """
2086
2087        all_params = ['account_id', 'recipient_id', 'template_id', 'template_recipients']
2088        all_params.append('callback')
2089        all_params.append('_return_http_data_only')
2090        all_params.append('_preload_content')
2091        all_params.append('_request_timeout')
2092
2093        params = locals()
2094        for key, val in iteritems(params['kwargs']):
2095            if key not in all_params:
2096                raise TypeError(
2097                    "Got an unexpected keyword argument '%s'"
2098                    " to method delete_recipient" % key
2099                )
2100            params[key] = val
2101        del params['kwargs']
2102        # verify the required parameter 'account_id' is set
2103        if ('account_id' not in params) or (params['account_id'] is None):
2104            raise ValueError("Missing the required parameter `account_id` when calling `delete_recipient`")
2105        # verify the required parameter 'recipient_id' is set
2106        if ('recipient_id' not in params) or (params['recipient_id'] is None):
2107            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_recipient`")
2108        # verify the required parameter 'template_id' is set
2109        if ('template_id' not in params) or (params['template_id'] is None):
2110            raise ValueError("Missing the required parameter `template_id` when calling `delete_recipient`")
2111
2112
2113        collection_formats = {}
2114
2115        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}'.replace('{format}', 'json')
2116        path_params = {}
2117        if 'account_id' in params:
2118            path_params['accountId'] = params['account_id']
2119        if 'recipient_id' in params:
2120            path_params['recipientId'] = params['recipient_id']
2121        if 'template_id' in params:
2122            path_params['templateId'] = params['template_id']
2123
2124        query_params = {}
2125
2126        header_params = {}
2127
2128        form_params = []
2129        local_var_files = {}
2130
2131        body_params = None
2132        if 'template_recipients' in params:
2133            body_params = params['template_recipients']
2134        # HTTP header `Accept`
2135        header_params['Accept'] = self.api_client.\
2136            select_header_accept(['application/json'])
2137
2138        # Authentication setting
2139        auth_settings = []
2140
2141        return self.api_client.call_api(resource_path, 'DELETE',
2142                                        path_params,
2143                                        query_params,
2144                                        header_params,
2145                                        body=body_params,
2146                                        post_params=form_params,
2147                                        files=local_var_files,
2148                                        response_type='Recipients',
2149                                        auth_settings=auth_settings,
2150                                        callback=params.get('callback'),
2151                                        _return_http_data_only=params.get('_return_http_data_only'),
2152                                        _preload_content=params.get('_preload_content', True),
2153                                        _request_timeout=params.get('_request_timeout'),
2154                                        collection_formats=collection_formats)

Deletes the specified recipient file from a template. Deletes the specified recipient file from the specified template. 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_recipient_with_http_info(account_id, recipient_id, template_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 recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateRecipients template_recipients:
Returns

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

def delete_recipients(self, account_id, template_id, **kwargs)
2156    def delete_recipients(self, account_id, template_id, **kwargs):
2157        """
2158        Deletes recipients from a template.
2159        Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
2160        This method makes a synchronous HTTP request by default. To make an
2161        asynchronous HTTP request, please define a `callback` function
2162        to be invoked when receiving the response.
2163        >>> def callback_function(response):
2164        >>>     pprint(response)
2165        >>>
2166        >>> thread = api.delete_recipients(account_id, template_id, callback=callback_function)
2167
2168        :param callback function: The callback function
2169            for asynchronous request. (optional)
2170        :param str account_id: The external account number (int) or account ID Guid. (required)
2171        :param str template_id: The ID of the template being accessed. (required)
2172        :param TemplateRecipients template_recipients:
2173        :return: Recipients
2174                 If the method is called asynchronously,
2175                 returns the request thread.
2176        """
2177        kwargs['_return_http_data_only'] = True
2178        if kwargs.get('callback'):
2179            return self.delete_recipients_with_http_info(account_id, template_id, **kwargs)
2180        else:
2181            (data) = self.delete_recipients_with_http_info(account_id, template_id, **kwargs)
2182            return data

Deletes recipients from a template. Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the recipientId being used as the key for deleting recipients. 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_recipients(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • TemplateRecipients template_recipients:
Returns

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

def delete_recipients_with_http_info(self, account_id, template_id, **kwargs)
2184    def delete_recipients_with_http_info(self, account_id, template_id, **kwargs):
2185        """
2186        Deletes recipients from a template.
2187        Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
2188        This method makes a synchronous HTTP request by default. To make an
2189        asynchronous HTTP request, please define a `callback` function
2190        to be invoked when receiving the response.
2191        >>> def callback_function(response):
2192        >>>     pprint(response)
2193        >>>
2194        >>> thread = api.delete_recipients_with_http_info(account_id, template_id, callback=callback_function)
2195
2196        :param callback function: The callback function
2197            for asynchronous request. (optional)
2198        :param str account_id: The external account number (int) or account ID Guid. (required)
2199        :param str template_id: The ID of the template being accessed. (required)
2200        :param TemplateRecipients template_recipients:
2201        :return: Recipients
2202                 If the method is called asynchronously,
2203                 returns the request thread.
2204        """
2205
2206        all_params = ['account_id', 'template_id', 'template_recipients']
2207        all_params.append('callback')
2208        all_params.append('_return_http_data_only')
2209        all_params.append('_preload_content')
2210        all_params.append('_request_timeout')
2211
2212        params = locals()
2213        for key, val in iteritems(params['kwargs']):
2214            if key not in all_params:
2215                raise TypeError(
2216                    "Got an unexpected keyword argument '%s'"
2217                    " to method delete_recipients" % key
2218                )
2219            params[key] = val
2220        del params['kwargs']
2221        # verify the required parameter 'account_id' is set
2222        if ('account_id' not in params) or (params['account_id'] is None):
2223            raise ValueError("Missing the required parameter `account_id` when calling `delete_recipients`")
2224        # verify the required parameter 'template_id' is set
2225        if ('template_id' not in params) or (params['template_id'] is None):
2226            raise ValueError("Missing the required parameter `template_id` when calling `delete_recipients`")
2227
2228
2229        collection_formats = {}
2230
2231        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
2232        path_params = {}
2233        if 'account_id' in params:
2234            path_params['accountId'] = params['account_id']
2235        if 'template_id' in params:
2236            path_params['templateId'] = params['template_id']
2237
2238        query_params = {}
2239
2240        header_params = {}
2241
2242        form_params = []
2243        local_var_files = {}
2244
2245        body_params = None
2246        if 'template_recipients' in params:
2247            body_params = params['template_recipients']
2248        # HTTP header `Accept`
2249        header_params['Accept'] = self.api_client.\
2250            select_header_accept(['application/json'])
2251
2252        # Authentication setting
2253        auth_settings = []
2254
2255        return self.api_client.call_api(resource_path, 'DELETE',
2256                                        path_params,
2257                                        query_params,
2258                                        header_params,
2259                                        body=body_params,
2260                                        post_params=form_params,
2261                                        files=local_var_files,
2262                                        response_type='Recipients',
2263                                        auth_settings=auth_settings,
2264                                        callback=params.get('callback'),
2265                                        _return_http_data_only=params.get('_return_http_data_only'),
2266                                        _preload_content=params.get('_preload_content', True),
2267                                        _request_timeout=params.get('_request_timeout'),
2268                                        collection_formats=collection_formats)

Deletes recipients from a template. Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the recipientId being used as the key for deleting recipients. 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_recipients_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • TemplateRecipients template_recipients:
Returns

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

def delete_tabs(self, account_id, recipient_id, template_id, **kwargs)
2270    def delete_tabs(self, account_id, recipient_id, template_id, **kwargs):
2271        """
2272        Deletes the tabs associated with a recipient in a template.
2273        Deletes one or more tabs associated with a recipient in a template.
2274        This method makes a synchronous HTTP request by default. To make an
2275        asynchronous HTTP request, please define a `callback` function
2276        to be invoked when receiving the response.
2277        >>> def callback_function(response):
2278        >>>     pprint(response)
2279        >>>
2280        >>> thread = api.delete_tabs(account_id, recipient_id, template_id, callback=callback_function)
2281
2282        :param callback function: The callback function
2283            for asynchronous request. (optional)
2284        :param str account_id: The external account number (int) or account ID Guid. (required)
2285        :param str recipient_id: The ID of the recipient being accessed. (required)
2286        :param str template_id: The ID of the template being accessed. (required)
2287        :param TemplateTabs template_tabs:
2288        :return: Tabs
2289                 If the method is called asynchronously,
2290                 returns the request thread.
2291        """
2292        kwargs['_return_http_data_only'] = True
2293        if kwargs.get('callback'):
2294            return self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
2295        else:
2296            (data) = self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
2297            return data

Deletes the tabs associated with a recipient in a template. Deletes one or more tabs associated with a recipient in a template. 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_tabs(account_id, recipient_id, template_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 recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

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

def delete_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs)
2299    def delete_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
2300        """
2301        Deletes the tabs associated with a recipient in a template.
2302        Deletes one or more tabs associated with a recipient in a template.
2303        This method makes a synchronous HTTP request by default. To make an
2304        asynchronous HTTP request, please define a `callback` function
2305        to be invoked when receiving the response.
2306        >>> def callback_function(response):
2307        >>>     pprint(response)
2308        >>>
2309        >>> thread = api.delete_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
2310
2311        :param callback function: The callback function
2312            for asynchronous request. (optional)
2313        :param str account_id: The external account number (int) or account ID Guid. (required)
2314        :param str recipient_id: The ID of the recipient being accessed. (required)
2315        :param str template_id: The ID of the template being accessed. (required)
2316        :param TemplateTabs template_tabs:
2317        :return: Tabs
2318                 If the method is called asynchronously,
2319                 returns the request thread.
2320        """
2321
2322        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
2323        all_params.append('callback')
2324        all_params.append('_return_http_data_only')
2325        all_params.append('_preload_content')
2326        all_params.append('_request_timeout')
2327
2328        params = locals()
2329        for key, val in iteritems(params['kwargs']):
2330            if key not in all_params:
2331                raise TypeError(
2332                    "Got an unexpected keyword argument '%s'"
2333                    " to method delete_tabs" % key
2334                )
2335            params[key] = val
2336        del params['kwargs']
2337        # verify the required parameter 'account_id' is set
2338        if ('account_id' not in params) or (params['account_id'] is None):
2339            raise ValueError("Missing the required parameter `account_id` when calling `delete_tabs`")
2340        # verify the required parameter 'recipient_id' is set
2341        if ('recipient_id' not in params) or (params['recipient_id'] is None):
2342            raise ValueError("Missing the required parameter `recipient_id` when calling `delete_tabs`")
2343        # verify the required parameter 'template_id' is set
2344        if ('template_id' not in params) or (params['template_id'] is None):
2345            raise ValueError("Missing the required parameter `template_id` when calling `delete_tabs`")
2346
2347
2348        collection_formats = {}
2349
2350        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
2351        path_params = {}
2352        if 'account_id' in params:
2353            path_params['accountId'] = params['account_id']
2354        if 'recipient_id' in params:
2355            path_params['recipientId'] = params['recipient_id']
2356        if 'template_id' in params:
2357            path_params['templateId'] = params['template_id']
2358
2359        query_params = {}
2360
2361        header_params = {}
2362
2363        form_params = []
2364        local_var_files = {}
2365
2366        body_params = None
2367        if 'template_tabs' in params:
2368            body_params = params['template_tabs']
2369        # HTTP header `Accept`
2370        header_params['Accept'] = self.api_client.\
2371            select_header_accept(['application/json'])
2372
2373        # Authentication setting
2374        auth_settings = []
2375
2376        return self.api_client.call_api(resource_path, 'DELETE',
2377                                        path_params,
2378                                        query_params,
2379                                        header_params,
2380                                        body=body_params,
2381                                        post_params=form_params,
2382                                        files=local_var_files,
2383                                        response_type='Tabs',
2384                                        auth_settings=auth_settings,
2385                                        callback=params.get('callback'),
2386                                        _return_http_data_only=params.get('_return_http_data_only'),
2387                                        _preload_content=params.get('_preload_content', True),
2388                                        _request_timeout=params.get('_request_timeout'),
2389                                        collection_formats=collection_formats)

Deletes the tabs associated with a recipient in a template. Deletes one or more tabs associated with a recipient in a template. 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_tabs_with_http_info(account_id, recipient_id, template_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 recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

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

def delete_template_document_tabs(self, account_id, document_id, template_id, **kwargs)
2391    def delete_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
2392        """
2393        Deletes tabs from an envelope document
2394        Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 
2395        This method makes a synchronous HTTP request by default. To make an
2396        asynchronous HTTP request, please define a `callback` function
2397        to be invoked when receiving the response.
2398        >>> def callback_function(response):
2399        >>>     pprint(response)
2400        >>>
2401        >>> thread = api.delete_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
2402
2403        :param callback function: The callback function
2404            for asynchronous request. (optional)
2405        :param str account_id: The external account number (int) or account ID Guid. (required)
2406        :param str document_id: The ID of the document being accessed. (required)
2407        :param str template_id: The ID of the template being accessed. (required)
2408        :param TemplateTabs template_tabs:
2409        :return: Tabs
2410                 If the method is called asynchronously,
2411                 returns the request thread.
2412        """
2413        kwargs['_return_http_data_only'] = True
2414        if kwargs.get('callback'):
2415            return self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2416        else:
2417            (data) = self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2418            return data

Deletes tabs from an envelope document Deletes tabs from the document specified by documentId in the template specified by templateId. 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_template_document_tabs(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

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

def delete_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs)
2420    def delete_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
2421        """
2422        Deletes tabs from an envelope document
2423        Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 
2424        This method makes a synchronous HTTP request by default. To make an
2425        asynchronous HTTP request, please define a `callback` function
2426        to be invoked when receiving the response.
2427        >>> def callback_function(response):
2428        >>>     pprint(response)
2429        >>>
2430        >>> thread = api.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
2431
2432        :param callback function: The callback function
2433            for asynchronous request. (optional)
2434        :param str account_id: The external account number (int) or account ID Guid. (required)
2435        :param str document_id: The ID of the document being accessed. (required)
2436        :param str template_id: The ID of the template being accessed. (required)
2437        :param TemplateTabs template_tabs:
2438        :return: Tabs
2439                 If the method is called asynchronously,
2440                 returns the request thread.
2441        """
2442
2443        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
2444        all_params.append('callback')
2445        all_params.append('_return_http_data_only')
2446        all_params.append('_preload_content')
2447        all_params.append('_request_timeout')
2448
2449        params = locals()
2450        for key, val in iteritems(params['kwargs']):
2451            if key not in all_params:
2452                raise TypeError(
2453                    "Got an unexpected keyword argument '%s'"
2454                    " to method delete_template_document_tabs" % key
2455                )
2456            params[key] = val
2457        del params['kwargs']
2458        # verify the required parameter 'account_id' is set
2459        if ('account_id' not in params) or (params['account_id'] is None):
2460            raise ValueError("Missing the required parameter `account_id` when calling `delete_template_document_tabs`")
2461        # verify the required parameter 'document_id' is set
2462        if ('document_id' not in params) or (params['document_id'] is None):
2463            raise ValueError("Missing the required parameter `document_id` when calling `delete_template_document_tabs`")
2464        # verify the required parameter 'template_id' is set
2465        if ('template_id' not in params) or (params['template_id'] is None):
2466            raise ValueError("Missing the required parameter `template_id` when calling `delete_template_document_tabs`")
2467
2468
2469        collection_formats = {}
2470
2471        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
2472        path_params = {}
2473        if 'account_id' in params:
2474            path_params['accountId'] = params['account_id']
2475        if 'document_id' in params:
2476            path_params['documentId'] = params['document_id']
2477        if 'template_id' in params:
2478            path_params['templateId'] = params['template_id']
2479
2480        query_params = {}
2481
2482        header_params = {}
2483
2484        form_params = []
2485        local_var_files = {}
2486
2487        body_params = None
2488        if 'template_tabs' in params:
2489            body_params = params['template_tabs']
2490        # HTTP header `Accept`
2491        header_params['Accept'] = self.api_client.\
2492            select_header_accept(['application/json'])
2493
2494        # Authentication setting
2495        auth_settings = []
2496
2497        return self.api_client.call_api(resource_path, 'DELETE',
2498                                        path_params,
2499                                        query_params,
2500                                        header_params,
2501                                        body=body_params,
2502                                        post_params=form_params,
2503                                        files=local_var_files,
2504                                        response_type='Tabs',
2505                                        auth_settings=auth_settings,
2506                                        callback=params.get('callback'),
2507                                        _return_http_data_only=params.get('_return_http_data_only'),
2508                                        _preload_content=params.get('_preload_content', True),
2509                                        _request_timeout=params.get('_request_timeout'),
2510                                        collection_formats=collection_formats)

Deletes tabs from an envelope document Deletes tabs from the document specified by documentId in the template specified by templateId. 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_template_document_tabs_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

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

def get(self, account_id, template_id, **kwargs)
2512    def get(self, account_id, template_id, **kwargs):
2513        """
2514        Gets a list of templates for a specified account.
2515        Retrieves the definition of the specified template.
2516        This method makes a synchronous HTTP request by default. To make an
2517        asynchronous HTTP request, please define a `callback` function
2518        to be invoked when receiving the response.
2519        >>> def callback_function(response):
2520        >>>     pprint(response)
2521        >>>
2522        >>> thread = api.get(account_id, template_id, callback=callback_function)
2523
2524        :param callback function: The callback function
2525            for asynchronous request. (optional)
2526        :param str account_id: The external account number (int) or account ID Guid. (required)
2527        :param str template_id: The ID of the template being accessed. (required)
2528        :param str include:
2529        :return: EnvelopeTemplate
2530                 If the method is called asynchronously,
2531                 returns the request thread.
2532        """
2533        kwargs['_return_http_data_only'] = True
2534        if kwargs.get('callback'):
2535            return self.get_with_http_info(account_id, template_id, **kwargs)
2536        else:
2537            (data) = self.get_with_http_info(account_id, template_id, **kwargs)
2538            return data

Gets a list of templates for a specified account. Retrieves the definition of the specified template. 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(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • str include:
Returns

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

def get_with_http_info(self, account_id, template_id, **kwargs)
2540    def get_with_http_info(self, account_id, template_id, **kwargs):
2541        """
2542        Gets a list of templates for a specified account.
2543        Retrieves the definition of the specified template.
2544        This method makes a synchronous HTTP request by default. To make an
2545        asynchronous HTTP request, please define a `callback` function
2546        to be invoked when receiving the response.
2547        >>> def callback_function(response):
2548        >>>     pprint(response)
2549        >>>
2550        >>> thread = api.get_with_http_info(account_id, template_id, callback=callback_function)
2551
2552        :param callback function: The callback function
2553            for asynchronous request. (optional)
2554        :param str account_id: The external account number (int) or account ID Guid. (required)
2555        :param str template_id: The ID of the template being accessed. (required)
2556        :param str include:
2557        :return: EnvelopeTemplate
2558                 If the method is called asynchronously,
2559                 returns the request thread.
2560        """
2561
2562        all_params = ['account_id', 'template_id', 'include']
2563        all_params.append('callback')
2564        all_params.append('_return_http_data_only')
2565        all_params.append('_preload_content')
2566        all_params.append('_request_timeout')
2567
2568        params = locals()
2569        for key, val in iteritems(params['kwargs']):
2570            if key not in all_params:
2571                raise TypeError(
2572                    "Got an unexpected keyword argument '%s'"
2573                    " to method get" % key
2574                )
2575            params[key] = val
2576        del params['kwargs']
2577        # verify the required parameter 'account_id' is set
2578        if ('account_id' not in params) or (params['account_id'] is None):
2579            raise ValueError("Missing the required parameter `account_id` when calling `get`")
2580        # verify the required parameter 'template_id' is set
2581        if ('template_id' not in params) or (params['template_id'] is None):
2582            raise ValueError("Missing the required parameter `template_id` when calling `get`")
2583
2584
2585        collection_formats = {}
2586
2587        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
2588        path_params = {}
2589        if 'account_id' in params:
2590            path_params['accountId'] = params['account_id']
2591        if 'template_id' in params:
2592            path_params['templateId'] = params['template_id']
2593
2594        query_params = {}
2595        if 'include' in params:
2596            query_params['include'] = params['include']
2597
2598        header_params = {}
2599
2600        form_params = []
2601        local_var_files = {}
2602
2603        body_params = None
2604        # HTTP header `Accept`
2605        header_params['Accept'] = self.api_client.\
2606            select_header_accept(['application/json'])
2607
2608        # Authentication setting
2609        auth_settings = []
2610
2611        return self.api_client.call_api(resource_path, 'GET',
2612                                        path_params,
2613                                        query_params,
2614                                        header_params,
2615                                        body=body_params,
2616                                        post_params=form_params,
2617                                        files=local_var_files,
2618                                        response_type='EnvelopeTemplate',
2619                                        auth_settings=auth_settings,
2620                                        callback=params.get('callback'),
2621                                        _return_http_data_only=params.get('_return_http_data_only'),
2622                                        _preload_content=params.get('_preload_content', True),
2623                                        _request_timeout=params.get('_request_timeout'),
2624                                        collection_formats=collection_formats)

Gets a list of templates for a specified account. Retrieves the definition of the specified template. 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_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • str include:
Returns

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

def get_document(self, account_id, document_id, template_id, **kwargs)
2626    def get_document(self, account_id, document_id, template_id, **kwargs):
2627        """
2628        Gets PDF documents from a template.
2629        Retrieves one or more PDF documents from the specified template.  You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
2630        This method makes a synchronous HTTP request by default. To make an
2631        asynchronous HTTP request, please define a `callback` function
2632        to be invoked when receiving the response.
2633        >>> def callback_function(response):
2634        >>>     pprint(response)
2635        >>>
2636        >>> thread = api.get_document(account_id, document_id, template_id, callback=callback_function)
2637
2638        :param callback function: The callback function
2639            for asynchronous request. (optional)
2640        :param str account_id: The external account number (int) or account ID Guid. (required)
2641        :param str document_id: The ID of the document being accessed. (required)
2642        :param str template_id: The ID of the template being accessed. (required)
2643        :param str encrypt:
2644        :param str file_type:
2645        :param str show_changes:
2646        :return: file
2647                 If the method is called asynchronously,
2648                 returns the request thread.
2649        """
2650        kwargs['_return_http_data_only'] = True
2651        if kwargs.get('callback'):
2652            return self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2653        else:
2654            (data) = self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2655            return data

Gets PDF documents from a template. Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify combined to retrieve all documents in the template as one pdf. 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_document(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str encrypt:
  • str file_type:
  • str show_changes:
Returns

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

def get_document_with_http_info(self, account_id, document_id, template_id, **kwargs)
2657    def get_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
2658        """
2659        Gets PDF documents from a template.
2660        Retrieves one or more PDF documents from the specified template.  You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
2661        This method makes a synchronous HTTP request by default. To make an
2662        asynchronous HTTP request, please define a `callback` function
2663        to be invoked when receiving the response.
2664        >>> def callback_function(response):
2665        >>>     pprint(response)
2666        >>>
2667        >>> thread = api.get_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
2668
2669        :param callback function: The callback function
2670            for asynchronous request. (optional)
2671        :param str account_id: The external account number (int) or account ID Guid. (required)
2672        :param str document_id: The ID of the document being accessed. (required)
2673        :param str template_id: The ID of the template being accessed. (required)
2674        :param str encrypt:
2675        :param str file_type:
2676        :param str show_changes:
2677        :return: file
2678                 If the method is called asynchronously,
2679                 returns the request thread.
2680        """
2681
2682        all_params = ['account_id', 'document_id', 'template_id', 'encrypt', 'file_type', 'show_changes']
2683        all_params.append('callback')
2684        all_params.append('_return_http_data_only')
2685        all_params.append('_preload_content')
2686        all_params.append('_request_timeout')
2687
2688        params = locals()
2689        for key, val in iteritems(params['kwargs']):
2690            if key not in all_params:
2691                raise TypeError(
2692                    "Got an unexpected keyword argument '%s'"
2693                    " to method get_document" % key
2694                )
2695            params[key] = val
2696        del params['kwargs']
2697        # verify the required parameter 'account_id' is set
2698        if ('account_id' not in params) or (params['account_id'] is None):
2699            raise ValueError("Missing the required parameter `account_id` when calling `get_document`")
2700        # verify the required parameter 'document_id' is set
2701        if ('document_id' not in params) or (params['document_id'] is None):
2702            raise ValueError("Missing the required parameter `document_id` when calling `get_document`")
2703        # verify the required parameter 'template_id' is set
2704        if ('template_id' not in params) or (params['template_id'] is None):
2705            raise ValueError("Missing the required parameter `template_id` when calling `get_document`")
2706
2707
2708        collection_formats = {}
2709
2710        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
2711        path_params = {}
2712        if 'account_id' in params:
2713            path_params['accountId'] = params['account_id']
2714        if 'document_id' in params:
2715            path_params['documentId'] = params['document_id']
2716        if 'template_id' in params:
2717            path_params['templateId'] = params['template_id']
2718
2719        query_params = {}
2720        if 'encrypt' in params:
2721            query_params['encrypt'] = params['encrypt']
2722        if 'file_type' in params:
2723            query_params['file_type'] = params['file_type']
2724        if 'show_changes' in params:
2725            query_params['show_changes'] = params['show_changes']
2726
2727        header_params = {}
2728
2729        form_params = []
2730        local_var_files = {}
2731
2732        body_params = None
2733        # HTTP header `Accept`
2734        header_params['Accept'] = self.api_client.\
2735            select_header_accept(['application/pdf'])
2736
2737        # Authentication setting
2738        auth_settings = []
2739
2740        return self.api_client.call_api(resource_path, 'GET',
2741                                        path_params,
2742                                        query_params,
2743                                        header_params,
2744                                        body=body_params,
2745                                        post_params=form_params,
2746                                        files=local_var_files,
2747                                        response_type='file',
2748                                        auth_settings=auth_settings,
2749                                        callback=params.get('callback'),
2750                                        _return_http_data_only=params.get('_return_http_data_only'),
2751                                        _preload_content=params.get('_preload_content', True),
2752                                        _request_timeout=params.get('_request_timeout'),
2753                                        collection_formats=collection_formats)

Gets PDF documents from a template. Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify combined to retrieve all documents in the template as one pdf. 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_document_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str encrypt:
  • str file_type:
  • str show_changes:
Returns

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

def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs)
2755    def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs):
2756        """
2757        Gets a page image from a template for display.
2758        Retrieves a page image for display from the specified template.
2759        This method makes a synchronous HTTP request by default. To make an
2760        asynchronous HTTP request, please define a `callback` function
2761        to be invoked when receiving the response.
2762        >>> def callback_function(response):
2763        >>>     pprint(response)
2764        >>>
2765        >>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function)
2766
2767        :param callback function: The callback function
2768            for asynchronous request. (optional)
2769        :param str account_id: The external account number (int) or account ID Guid. (required)
2770        :param str document_id: The ID of the document being accessed. (required)
2771        :param str page_number: The page number being accessed. (required)
2772        :param str template_id: The ID of the template being accessed. (required)
2773        :param str dpi:
2774        :param str max_height:
2775        :param str max_width:
2776        :param str show_changes:
2777        :return: file
2778                 If the method is called asynchronously,
2779                 returns the request thread.
2780        """
2781        kwargs['_return_http_data_only'] = True
2782        if kwargs.get('callback'):
2783            return self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2784        else:
2785            (data) = self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2786            return data

Gets a page image from a template for display. Retrieves a page image for display from the specified template. 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_document_page_image(account_id, document_id, page_number, template_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 document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str dpi:
  • str max_height:
  • str max_width:
  • str show_changes:
Returns

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

def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs)
2788    def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
2789        """
2790        Gets a page image from a template for display.
2791        Retrieves a page image for display from the specified template.
2792        This method makes a synchronous HTTP request by default. To make an
2793        asynchronous HTTP request, please define a `callback` function
2794        to be invoked when receiving the response.
2795        >>> def callback_function(response):
2796        >>>     pprint(response)
2797        >>>
2798        >>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
2799
2800        :param callback function: The callback function
2801            for asynchronous request. (optional)
2802        :param str account_id: The external account number (int) or account ID Guid. (required)
2803        :param str document_id: The ID of the document being accessed. (required)
2804        :param str page_number: The page number being accessed. (required)
2805        :param str template_id: The ID of the template being accessed. (required)
2806        :param str dpi:
2807        :param str max_height:
2808        :param str max_width:
2809        :param str show_changes:
2810        :return: file
2811                 If the method is called asynchronously,
2812                 returns the request thread.
2813        """
2814
2815        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'dpi', 'max_height', 'max_width', 'show_changes']
2816        all_params.append('callback')
2817        all_params.append('_return_http_data_only')
2818        all_params.append('_preload_content')
2819        all_params.append('_request_timeout')
2820
2821        params = locals()
2822        for key, val in iteritems(params['kwargs']):
2823            if key not in all_params:
2824                raise TypeError(
2825                    "Got an unexpected keyword argument '%s'"
2826                    " to method get_document_page_image" % key
2827                )
2828            params[key] = val
2829        del params['kwargs']
2830        # verify the required parameter 'account_id' is set
2831        if ('account_id' not in params) or (params['account_id'] is None):
2832            raise ValueError("Missing the required parameter `account_id` when calling `get_document_page_image`")
2833        # verify the required parameter 'document_id' is set
2834        if ('document_id' not in params) or (params['document_id'] is None):
2835            raise ValueError("Missing the required parameter `document_id` when calling `get_document_page_image`")
2836        # verify the required parameter 'page_number' is set
2837        if ('page_number' not in params) or (params['page_number'] is None):
2838            raise ValueError("Missing the required parameter `page_number` when calling `get_document_page_image`")
2839        # verify the required parameter 'template_id' is set
2840        if ('template_id' not in params) or (params['template_id'] is None):
2841            raise ValueError("Missing the required parameter `template_id` when calling `get_document_page_image`")
2842
2843
2844        collection_formats = {}
2845
2846        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
2847        path_params = {}
2848        if 'account_id' in params:
2849            path_params['accountId'] = params['account_id']
2850        if 'document_id' in params:
2851            path_params['documentId'] = params['document_id']
2852        if 'page_number' in params:
2853            path_params['pageNumber'] = params['page_number']
2854        if 'template_id' in params:
2855            path_params['templateId'] = params['template_id']
2856
2857        query_params = {}
2858        if 'dpi' in params:
2859            query_params['dpi'] = params['dpi']
2860        if 'max_height' in params:
2861            query_params['max_height'] = params['max_height']
2862        if 'max_width' in params:
2863            query_params['max_width'] = params['max_width']
2864        if 'show_changes' in params:
2865            query_params['show_changes'] = params['show_changes']
2866
2867        header_params = {}
2868
2869        form_params = []
2870        local_var_files = {}
2871
2872        body_params = None
2873        # HTTP header `Accept`
2874        header_params['Accept'] = self.api_client.\
2875            select_header_accept(['image/png'])
2876
2877        # Authentication setting
2878        auth_settings = []
2879
2880        return self.api_client.call_api(resource_path, 'GET',
2881                                        path_params,
2882                                        query_params,
2883                                        header_params,
2884                                        body=body_params,
2885                                        post_params=form_params,
2886                                        files=local_var_files,
2887                                        response_type='file',
2888                                        auth_settings=auth_settings,
2889                                        callback=params.get('callback'),
2890                                        _return_http_data_only=params.get('_return_http_data_only'),
2891                                        _preload_content=params.get('_preload_content', True),
2892                                        _request_timeout=params.get('_request_timeout'),
2893                                        collection_formats=collection_formats)

Gets a page image from a template for display. Retrieves a page image for display from the specified template. 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_document_page_image_with_http_info(account_id, document_id, page_number, template_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 document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str dpi:
  • str max_height:
  • str max_width:
  • str show_changes:
Returns

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

def get_document_tabs(self, account_id, document_id, template_id, **kwargs)
2895    def get_document_tabs(self, account_id, document_id, template_id, **kwargs):
2896        """
2897        Returns tabs on the document.
2898        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
2899        This method makes a synchronous HTTP request by default. To make an
2900        asynchronous HTTP request, please define a `callback` function
2901        to be invoked when receiving the response.
2902        >>> def callback_function(response):
2903        >>>     pprint(response)
2904        >>>
2905        >>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function)
2906
2907        :param callback function: The callback function
2908            for asynchronous request. (optional)
2909        :param str account_id: The external account number (int) or account ID Guid. (required)
2910        :param str document_id: The ID of the document being accessed. (required)
2911        :param str template_id: The ID of the template being accessed. (required)
2912        :param str page_numbers:
2913        :return: Tabs
2914                 If the method is called asynchronously,
2915                 returns the request thread.
2916        """
2917        kwargs['_return_http_data_only'] = True
2918        if kwargs.get('callback'):
2919            return self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2920        else:
2921            (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2922            return data

Returns tabs on the document. Returns the tabs on the document specified by documentId in the template specified by templateId.
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_document_tabs(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str page_numbers:
Returns

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

def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs)
2924    def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
2925        """
2926        Returns tabs on the document.
2927        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
2928        This method makes a synchronous HTTP request by default. To make an
2929        asynchronous HTTP request, please define a `callback` function
2930        to be invoked when receiving the response.
2931        >>> def callback_function(response):
2932        >>>     pprint(response)
2933        >>>
2934        >>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
2935
2936        :param callback function: The callback function
2937            for asynchronous request. (optional)
2938        :param str account_id: The external account number (int) or account ID Guid. (required)
2939        :param str document_id: The ID of the document being accessed. (required)
2940        :param str template_id: The ID of the template being accessed. (required)
2941        :param str page_numbers:
2942        :return: Tabs
2943                 If the method is called asynchronously,
2944                 returns the request thread.
2945        """
2946
2947        all_params = ['account_id', 'document_id', 'template_id', 'page_numbers']
2948        all_params.append('callback')
2949        all_params.append('_return_http_data_only')
2950        all_params.append('_preload_content')
2951        all_params.append('_request_timeout')
2952
2953        params = locals()
2954        for key, val in iteritems(params['kwargs']):
2955            if key not in all_params:
2956                raise TypeError(
2957                    "Got an unexpected keyword argument '%s'"
2958                    " to method get_document_tabs" % key
2959                )
2960            params[key] = val
2961        del params['kwargs']
2962        # verify the required parameter 'account_id' is set
2963        if ('account_id' not in params) or (params['account_id'] is None):
2964            raise ValueError("Missing the required parameter `account_id` when calling `get_document_tabs`")
2965        # verify the required parameter 'document_id' is set
2966        if ('document_id' not in params) or (params['document_id'] is None):
2967            raise ValueError("Missing the required parameter `document_id` when calling `get_document_tabs`")
2968        # verify the required parameter 'template_id' is set
2969        if ('template_id' not in params) or (params['template_id'] is None):
2970            raise ValueError("Missing the required parameter `template_id` when calling `get_document_tabs`")
2971
2972
2973        collection_formats = {}
2974
2975        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
2976        path_params = {}
2977        if 'account_id' in params:
2978            path_params['accountId'] = params['account_id']
2979        if 'document_id' in params:
2980            path_params['documentId'] = params['document_id']
2981        if 'template_id' in params:
2982            path_params['templateId'] = params['template_id']
2983
2984        query_params = {}
2985        if 'page_numbers' in params:
2986            query_params['page_numbers'] = params['page_numbers']
2987
2988        header_params = {}
2989
2990        form_params = []
2991        local_var_files = {}
2992
2993        body_params = None
2994        # HTTP header `Accept`
2995        header_params['Accept'] = self.api_client.\
2996            select_header_accept(['application/json'])
2997
2998        # Authentication setting
2999        auth_settings = []
3000
3001        return self.api_client.call_api(resource_path, 'GET',
3002                                        path_params,
3003                                        query_params,
3004                                        header_params,
3005                                        body=body_params,
3006                                        post_params=form_params,
3007                                        files=local_var_files,
3008                                        response_type='Tabs',
3009                                        auth_settings=auth_settings,
3010                                        callback=params.get('callback'),
3011                                        _return_http_data_only=params.get('_return_http_data_only'),
3012                                        _preload_content=params.get('_preload_content', True),
3013                                        _request_timeout=params.get('_request_timeout'),
3014                                        collection_formats=collection_formats)

Returns tabs on the document. Returns the tabs on the document specified by documentId in the template specified by templateId.
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_document_tabs_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str page_numbers:
Returns

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

def get_lock(self, account_id, template_id, **kwargs)
3016    def get_lock(self, account_id, template_id, **kwargs):
3017        """
3018        Gets template lock information.
3019        Retrieves general information about the template lock.  If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header  field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header.
3020        This method makes a synchronous HTTP request by default. To make an
3021        asynchronous HTTP request, please define a `callback` function
3022        to be invoked when receiving the response.
3023        >>> def callback_function(response):
3024        >>>     pprint(response)
3025        >>>
3026        >>> thread = api.get_lock(account_id, template_id, callback=callback_function)
3027
3028        :param callback function: The callback function
3029            for asynchronous request. (optional)
3030        :param str account_id: The external account number (int) or account ID Guid. (required)
3031        :param str template_id: The ID of the template being accessed. (required)
3032        :return: LockInformation
3033                 If the method is called asynchronously,
3034                 returns the request thread.
3035        """
3036        kwargs['_return_http_data_only'] = True
3037        if kwargs.get('callback'):
3038            return self.get_lock_with_http_info(account_id, template_id, **kwargs)
3039        else:
3040            (data) = self.get_lock_with_http_info(account_id, template_id, **kwargs)
3041            return data

Gets template lock information. Retrieves general information about the template lock. If the call is made by the user who has the lock and the request has the same integrator key as original, then the X-DocuSign-Edit header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the X-DocuSign-Edit 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.get_lock(account_id, template_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 template_id: The ID of the template being accessed. (required)
Returns

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

def get_lock_with_http_info(self, account_id, template_id, **kwargs)
3043    def get_lock_with_http_info(self, account_id, template_id, **kwargs):
3044        """
3045        Gets template lock information.
3046        Retrieves general information about the template lock.  If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header  field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header.
3047        This method makes a synchronous HTTP request by default. To make an
3048        asynchronous HTTP request, please define a `callback` function
3049        to be invoked when receiving the response.
3050        >>> def callback_function(response):
3051        >>>     pprint(response)
3052        >>>
3053        >>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function)
3054
3055        :param callback function: The callback function
3056            for asynchronous request. (optional)
3057        :param str account_id: The external account number (int) or account ID Guid. (required)
3058        :param str template_id: The ID of the template being accessed. (required)
3059        :return: LockInformation
3060                 If the method is called asynchronously,
3061                 returns the request thread.
3062        """
3063
3064        all_params = ['account_id', 'template_id']
3065        all_params.append('callback')
3066        all_params.append('_return_http_data_only')
3067        all_params.append('_preload_content')
3068        all_params.append('_request_timeout')
3069
3070        params = locals()
3071        for key, val in iteritems(params['kwargs']):
3072            if key not in all_params:
3073                raise TypeError(
3074                    "Got an unexpected keyword argument '%s'"
3075                    " to method get_lock" % key
3076                )
3077            params[key] = val
3078        del params['kwargs']
3079        # verify the required parameter 'account_id' is set
3080        if ('account_id' not in params) or (params['account_id'] is None):
3081            raise ValueError("Missing the required parameter `account_id` when calling `get_lock`")
3082        # verify the required parameter 'template_id' is set
3083        if ('template_id' not in params) or (params['template_id'] is None):
3084            raise ValueError("Missing the required parameter `template_id` when calling `get_lock`")
3085
3086
3087        collection_formats = {}
3088
3089        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
3090        path_params = {}
3091        if 'account_id' in params:
3092            path_params['accountId'] = params['account_id']
3093        if 'template_id' in params:
3094            path_params['templateId'] = params['template_id']
3095
3096        query_params = {}
3097
3098        header_params = {}
3099
3100        form_params = []
3101        local_var_files = {}
3102
3103        body_params = None
3104        # HTTP header `Accept`
3105        header_params['Accept'] = self.api_client.\
3106            select_header_accept(['application/json'])
3107
3108        # Authentication setting
3109        auth_settings = []
3110
3111        return self.api_client.call_api(resource_path, 'GET',
3112                                        path_params,
3113                                        query_params,
3114                                        header_params,
3115                                        body=body_params,
3116                                        post_params=form_params,
3117                                        files=local_var_files,
3118                                        response_type='LockInformation',
3119                                        auth_settings=auth_settings,
3120                                        callback=params.get('callback'),
3121                                        _return_http_data_only=params.get('_return_http_data_only'),
3122                                        _preload_content=params.get('_preload_content', True),
3123                                        _request_timeout=params.get('_request_timeout'),
3124                                        collection_formats=collection_formats)

Gets template lock information. Retrieves general information about the template lock. If the call is made by the user who has the lock and the request has the same integrator key as original, then the X-DocuSign-Edit header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the X-DocuSign-Edit 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.get_lock_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
Returns

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

def get_notification_settings(self, account_id, template_id, **kwargs)
3126    def get_notification_settings(self, account_id, template_id, **kwargs):
3127        """
3128        Gets template notification information.
3129        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3130        This method makes a synchronous HTTP request by default. To make an
3131        asynchronous HTTP request, please define a `callback` function
3132        to be invoked when receiving the response.
3133        >>> def callback_function(response):
3134        >>>     pprint(response)
3135        >>>
3136        >>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function)
3137
3138        :param callback function: The callback function
3139            for asynchronous request. (optional)
3140        :param str account_id: The external account number (int) or account ID Guid. (required)
3141        :param str template_id: The ID of the template being accessed. (required)
3142        :return: Notification
3143                 If the method is called asynchronously,
3144                 returns the request thread.
3145        """
3146        kwargs['_return_http_data_only'] = True
3147        if kwargs.get('callback'):
3148            return self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3149        else:
3150            (data) = self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3151            return data

Gets template notification information. Retrieves the envelope notification, reminders and expirations, information for an existing template. 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_notification_settings(account_id, template_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 template_id: The ID of the template being accessed. (required)
Returns

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

def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs)
3153    def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
3154        """
3155        Gets template notification information.
3156        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3157        This method makes a synchronous HTTP request by default. To make an
3158        asynchronous HTTP request, please define a `callback` function
3159        to be invoked when receiving the response.
3160        >>> def callback_function(response):
3161        >>>     pprint(response)
3162        >>>
3163        >>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
3164
3165        :param callback function: The callback function
3166            for asynchronous request. (optional)
3167        :param str account_id: The external account number (int) or account ID Guid. (required)
3168        :param str template_id: The ID of the template being accessed. (required)
3169        :return: Notification
3170                 If the method is called asynchronously,
3171                 returns the request thread.
3172        """
3173
3174        all_params = ['account_id', 'template_id']
3175        all_params.append('callback')
3176        all_params.append('_return_http_data_only')
3177        all_params.append('_preload_content')
3178        all_params.append('_request_timeout')
3179
3180        params = locals()
3181        for key, val in iteritems(params['kwargs']):
3182            if key not in all_params:
3183                raise TypeError(
3184                    "Got an unexpected keyword argument '%s'"
3185                    " to method get_notification_settings" % key
3186                )
3187            params[key] = val
3188        del params['kwargs']
3189        # verify the required parameter 'account_id' is set
3190        if ('account_id' not in params) or (params['account_id'] is None):
3191            raise ValueError("Missing the required parameter `account_id` when calling `get_notification_settings`")
3192        # verify the required parameter 'template_id' is set
3193        if ('template_id' not in params) or (params['template_id'] is None):
3194            raise ValueError("Missing the required parameter `template_id` when calling `get_notification_settings`")
3195
3196
3197        collection_formats = {}
3198
3199        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
3200        path_params = {}
3201        if 'account_id' in params:
3202            path_params['accountId'] = params['account_id']
3203        if 'template_id' in params:
3204            path_params['templateId'] = params['template_id']
3205
3206        query_params = {}
3207
3208        header_params = {}
3209
3210        form_params = []
3211        local_var_files = {}
3212
3213        body_params = None
3214        # HTTP header `Accept`
3215        header_params['Accept'] = self.api_client.\
3216            select_header_accept(['application/json'])
3217
3218        # Authentication setting
3219        auth_settings = []
3220
3221        return self.api_client.call_api(resource_path, 'GET',
3222                                        path_params,
3223                                        query_params,
3224                                        header_params,
3225                                        body=body_params,
3226                                        post_params=form_params,
3227                                        files=local_var_files,
3228                                        response_type='Notification',
3229                                        auth_settings=auth_settings,
3230                                        callback=params.get('callback'),
3231                                        _return_http_data_only=params.get('_return_http_data_only'),
3232                                        _preload_content=params.get('_preload_content', True),
3233                                        _request_timeout=params.get('_request_timeout'),
3234                                        collection_formats=collection_formats)

Gets template notification information. Retrieves the envelope notification, reminders and expirations, information for an existing template. 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_notification_settings_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
Returns

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

def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs)
3236    def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs):
3237        """
3238        Returns tabs on the specified page.
3239        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3240        This method makes a synchronous HTTP request by default. To make an
3241        asynchronous HTTP request, please define a `callback` function
3242        to be invoked when receiving the response.
3243        >>> def callback_function(response):
3244        >>>     pprint(response)
3245        >>>
3246        >>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function)
3247
3248        :param callback function: The callback function
3249            for asynchronous request. (optional)
3250        :param str account_id: The external account number (int) or account ID Guid. (required)
3251        :param str document_id: The ID of the document being accessed. (required)
3252        :param str page_number: The page number being accessed. (required)
3253        :param str template_id: The ID of the template being accessed. (required)
3254        :return: Tabs
3255                 If the method is called asynchronously,
3256                 returns the request thread.
3257        """
3258        kwargs['_return_http_data_only'] = True
3259        if kwargs.get('callback'):
3260            return self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3261        else:
3262            (data) = self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3263            return data

Returns tabs on the specified page. Returns the tabs from the page specified by pageNumber of the document specified by documentId in the template specified by templateId. 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_page_tabs(account_id, document_id, page_number, template_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 document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

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

def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs)
3265    def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
3266        """
3267        Returns tabs on the specified page.
3268        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3269        This method makes a synchronous HTTP request by default. To make an
3270        asynchronous HTTP request, please define a `callback` function
3271        to be invoked when receiving the response.
3272        >>> def callback_function(response):
3273        >>>     pprint(response)
3274        >>>
3275        >>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
3276
3277        :param callback function: The callback function
3278            for asynchronous request. (optional)
3279        :param str account_id: The external account number (int) or account ID Guid. (required)
3280        :param str document_id: The ID of the document being accessed. (required)
3281        :param str page_number: The page number being accessed. (required)
3282        :param str template_id: The ID of the template being accessed. (required)
3283        :return: Tabs
3284                 If the method is called asynchronously,
3285                 returns the request thread.
3286        """
3287
3288        all_params = ['account_id', 'document_id', 'page_number', 'template_id']
3289        all_params.append('callback')
3290        all_params.append('_return_http_data_only')
3291        all_params.append('_preload_content')
3292        all_params.append('_request_timeout')
3293
3294        params = locals()
3295        for key, val in iteritems(params['kwargs']):
3296            if key not in all_params:
3297                raise TypeError(
3298                    "Got an unexpected keyword argument '%s'"
3299                    " to method get_page_tabs" % key
3300                )
3301            params[key] = val
3302        del params['kwargs']
3303        # verify the required parameter 'account_id' is set
3304        if ('account_id' not in params) or (params['account_id'] is None):
3305            raise ValueError("Missing the required parameter `account_id` when calling `get_page_tabs`")
3306        # verify the required parameter 'document_id' is set
3307        if ('document_id' not in params) or (params['document_id'] is None):
3308            raise ValueError("Missing the required parameter `document_id` when calling `get_page_tabs`")
3309        # verify the required parameter 'page_number' is set
3310        if ('page_number' not in params) or (params['page_number'] is None):
3311            raise ValueError("Missing the required parameter `page_number` when calling `get_page_tabs`")
3312        # verify the required parameter 'template_id' is set
3313        if ('template_id' not in params) or (params['template_id'] is None):
3314            raise ValueError("Missing the required parameter `template_id` when calling `get_page_tabs`")
3315
3316
3317        collection_formats = {}
3318
3319        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs'.replace('{format}', 'json')
3320        path_params = {}
3321        if 'account_id' in params:
3322            path_params['accountId'] = params['account_id']
3323        if 'document_id' in params:
3324            path_params['documentId'] = params['document_id']
3325        if 'page_number' in params:
3326            path_params['pageNumber'] = params['page_number']
3327        if 'template_id' in params:
3328            path_params['templateId'] = params['template_id']
3329
3330        query_params = {}
3331
3332        header_params = {}
3333
3334        form_params = []
3335        local_var_files = {}
3336
3337        body_params = None
3338        # HTTP header `Accept`
3339        header_params['Accept'] = self.api_client.\
3340            select_header_accept(['application/json'])
3341
3342        # Authentication setting
3343        auth_settings = []
3344
3345        return self.api_client.call_api(resource_path, 'GET',
3346                                        path_params,
3347                                        query_params,
3348                                        header_params,
3349                                        body=body_params,
3350                                        post_params=form_params,
3351                                        files=local_var_files,
3352                                        response_type='Tabs',
3353                                        auth_settings=auth_settings,
3354                                        callback=params.get('callback'),
3355                                        _return_http_data_only=params.get('_return_http_data_only'),
3356                                        _preload_content=params.get('_preload_content', True),
3357                                        _request_timeout=params.get('_request_timeout'),
3358                                        collection_formats=collection_formats)

Returns tabs on the specified page. Returns the tabs from the page specified by pageNumber of the document specified by documentId in the template specified by templateId. 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_page_tabs_with_http_info(account_id, document_id, page_number, template_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 document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

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

def get_pages(self, account_id, document_id, template_id, **kwargs)
3360    def get_pages(self, account_id, document_id, template_id, **kwargs):
3361        """
3362        Returns document page image(s) based on input.
3363        Returns images of the pages in a template document for display based on the parameters that you specify.
3364        This method makes a synchronous HTTP request by default. To make an
3365        asynchronous HTTP request, please define a `callback` function
3366        to be invoked when receiving the response.
3367        >>> def callback_function(response):
3368        >>>     pprint(response)
3369        >>>
3370        >>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function)
3371
3372        :param callback function: The callback function
3373            for asynchronous request. (optional)
3374        :param str account_id: The external account number (int) or account ID Guid. (required)
3375        :param str document_id: The ID of the document being accessed. (required)
3376        :param str template_id: The ID of the template being accessed. (required)
3377        :param str count:
3378        :param str dpi:
3379        :param str max_height:
3380        :param str max_width:
3381        :param str nocache:
3382        :param str show_changes:
3383        :param str start_position:
3384        :return: PageImages
3385                 If the method is called asynchronously,
3386                 returns the request thread.
3387        """
3388        kwargs['_return_http_data_only'] = True
3389        if kwargs.get('callback'):
3390            return self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3391        else:
3392            (data) = self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3393            return data

Returns document page image(s) based on input. Returns images of the pages in a template document for display based on the parameters that you specify. 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_pages(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str count:
  • str dpi:
  • str max_height:
  • str max_width:
  • str nocache:
  • str show_changes:
  • str start_position:
Returns

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

def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs)
3395    def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs):
3396        """
3397        Returns document page image(s) based on input.
3398        Returns images of the pages in a template document for display based on the parameters that you specify.
3399        This method makes a synchronous HTTP request by default. To make an
3400        asynchronous HTTP request, please define a `callback` function
3401        to be invoked when receiving the response.
3402        >>> def callback_function(response):
3403        >>>     pprint(response)
3404        >>>
3405        >>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function)
3406
3407        :param callback function: The callback function
3408            for asynchronous request. (optional)
3409        :param str account_id: The external account number (int) or account ID Guid. (required)
3410        :param str document_id: The ID of the document being accessed. (required)
3411        :param str template_id: The ID of the template being accessed. (required)
3412        :param str count:
3413        :param str dpi:
3414        :param str max_height:
3415        :param str max_width:
3416        :param str nocache:
3417        :param str show_changes:
3418        :param str start_position:
3419        :return: PageImages
3420                 If the method is called asynchronously,
3421                 returns the request thread.
3422        """
3423
3424        all_params = ['account_id', 'document_id', 'template_id', 'count', 'dpi', 'max_height', 'max_width', 'nocache', 'show_changes', 'start_position']
3425        all_params.append('callback')
3426        all_params.append('_return_http_data_only')
3427        all_params.append('_preload_content')
3428        all_params.append('_request_timeout')
3429
3430        params = locals()
3431        for key, val in iteritems(params['kwargs']):
3432            if key not in all_params:
3433                raise TypeError(
3434                    "Got an unexpected keyword argument '%s'"
3435                    " to method get_pages" % key
3436                )
3437            params[key] = val
3438        del params['kwargs']
3439        # verify the required parameter 'account_id' is set
3440        if ('account_id' not in params) or (params['account_id'] is None):
3441            raise ValueError("Missing the required parameter `account_id` when calling `get_pages`")
3442        # verify the required parameter 'document_id' is set
3443        if ('document_id' not in params) or (params['document_id'] is None):
3444            raise ValueError("Missing the required parameter `document_id` when calling `get_pages`")
3445        # verify the required parameter 'template_id' is set
3446        if ('template_id' not in params) or (params['template_id'] is None):
3447            raise ValueError("Missing the required parameter `template_id` when calling `get_pages`")
3448
3449
3450        collection_formats = {}
3451
3452        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages'.replace('{format}', 'json')
3453        path_params = {}
3454        if 'account_id' in params:
3455            path_params['accountId'] = params['account_id']
3456        if 'document_id' in params:
3457            path_params['documentId'] = params['document_id']
3458        if 'template_id' in params:
3459            path_params['templateId'] = params['template_id']
3460
3461        query_params = {}
3462        if 'count' in params:
3463            query_params['count'] = params['count']
3464        if 'dpi' in params:
3465            query_params['dpi'] = params['dpi']
3466        if 'max_height' in params:
3467            query_params['max_height'] = params['max_height']
3468        if 'max_width' in params:
3469            query_params['max_width'] = params['max_width']
3470        if 'nocache' in params:
3471            query_params['nocache'] = params['nocache']
3472        if 'show_changes' in params:
3473            query_params['show_changes'] = params['show_changes']
3474        if 'start_position' in params:
3475            query_params['start_position'] = params['start_position']
3476
3477        header_params = {}
3478
3479        form_params = []
3480        local_var_files = {}
3481
3482        body_params = None
3483        # HTTP header `Accept`
3484        header_params['Accept'] = self.api_client.\
3485            select_header_accept(['application/json'])
3486
3487        # Authentication setting
3488        auth_settings = []
3489
3490        return self.api_client.call_api(resource_path, 'GET',
3491                                        path_params,
3492                                        query_params,
3493                                        header_params,
3494                                        body=body_params,
3495                                        post_params=form_params,
3496                                        files=local_var_files,
3497                                        response_type='PageImages',
3498                                        auth_settings=auth_settings,
3499                                        callback=params.get('callback'),
3500                                        _return_http_data_only=params.get('_return_http_data_only'),
3501                                        _preload_content=params.get('_preload_content', True),
3502                                        _request_timeout=params.get('_request_timeout'),
3503                                        collection_formats=collection_formats)

Returns document page image(s) based on input. Returns images of the pages in a template document for display based on the parameters that you specify. 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_pages_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str count:
  • str dpi:
  • str max_height:
  • str max_width:
  • str nocache:
  • str show_changes:
  • str start_position:
Returns

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

def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs)
3505    def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs):
3506        """
3507        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3508        
3509        This method makes a synchronous HTTP request by default. To make an
3510        asynchronous HTTP request, please define a `callback` function
3511        to be invoked when receiving the response.
3512        >>> def callback_function(response):
3513        >>>     pprint(response)
3514        >>>
3515        >>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function)
3516
3517        :param callback function: The callback function
3518            for asynchronous request. (optional)
3519        :param str account_id: The external account number (int) or account ID Guid. (required)
3520        :param str document_id: The ID of the document being accessed. (required)
3521        :param str template_id: The ID of the template being accessed. (required)
3522        :return: DocumentHtmlDefinitionOriginals
3523                 If the method is called asynchronously,
3524                 returns the request thread.
3525        """
3526        kwargs['_return_http_data_only'] = True
3527        if kwargs.get('callback'):
3528            return self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3529        else:
3530            (data) = self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3531            return data

Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.

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_template_document_html_definitions(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

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

def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs)
3533    def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs):
3534        """
3535        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3536        
3537        This method makes a synchronous HTTP request by default. To make an
3538        asynchronous HTTP request, please define a `callback` function
3539        to be invoked when receiving the response.
3540        >>> def callback_function(response):
3541        >>>     pprint(response)
3542        >>>
3543        >>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function)
3544
3545        :param callback function: The callback function
3546            for asynchronous request. (optional)
3547        :param str account_id: The external account number (int) or account ID Guid. (required)
3548        :param str document_id: The ID of the document being accessed. (required)
3549        :param str template_id: The ID of the template being accessed. (required)
3550        :return: DocumentHtmlDefinitionOriginals
3551                 If the method is called asynchronously,
3552                 returns the request thread.
3553        """
3554
3555        all_params = ['account_id', 'document_id', 'template_id']
3556        all_params.append('callback')
3557        all_params.append('_return_http_data_only')
3558        all_params.append('_preload_content')
3559        all_params.append('_request_timeout')
3560
3561        params = locals()
3562        for key, val in iteritems(params['kwargs']):
3563            if key not in all_params:
3564                raise TypeError(
3565                    "Got an unexpected keyword argument '%s'"
3566                    " to method get_template_document_html_definitions" % key
3567                )
3568            params[key] = val
3569        del params['kwargs']
3570        # verify the required parameter 'account_id' is set
3571        if ('account_id' not in params) or (params['account_id'] is None):
3572            raise ValueError("Missing the required parameter `account_id` when calling `get_template_document_html_definitions`")
3573        # verify the required parameter 'document_id' is set
3574        if ('document_id' not in params) or (params['document_id'] is None):
3575            raise ValueError("Missing the required parameter `document_id` when calling `get_template_document_html_definitions`")
3576        # verify the required parameter 'template_id' is set
3577        if ('template_id' not in params) or (params['template_id'] is None):
3578            raise ValueError("Missing the required parameter `template_id` when calling `get_template_document_html_definitions`")
3579
3580
3581        collection_formats = {}
3582
3583        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions'.replace('{format}', 'json')
3584        path_params = {}
3585        if 'account_id' in params:
3586            path_params['accountId'] = params['account_id']
3587        if 'document_id' in params:
3588            path_params['documentId'] = params['document_id']
3589        if 'template_id' in params:
3590            path_params['templateId'] = params['template_id']
3591
3592        query_params = {}
3593
3594        header_params = {}
3595
3596        form_params = []
3597        local_var_files = {}
3598
3599        body_params = None
3600        # HTTP header `Accept`
3601        header_params['Accept'] = self.api_client.\
3602            select_header_accept(['application/json'])
3603
3604        # Authentication setting
3605        auth_settings = []
3606
3607        return self.api_client.call_api(resource_path, 'GET',
3608                                        path_params,
3609                                        query_params,
3610                                        header_params,
3611                                        body=body_params,
3612                                        post_params=form_params,
3613                                        files=local_var_files,
3614                                        response_type='DocumentHtmlDefinitionOriginals',
3615                                        auth_settings=auth_settings,
3616                                        callback=params.get('callback'),
3617                                        _return_http_data_only=params.get('_return_http_data_only'),
3618                                        _preload_content=params.get('_preload_content', True),
3619                                        _request_timeout=params.get('_request_timeout'),
3620                                        collection_formats=collection_formats)

Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.

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_template_document_html_definitions_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

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

def get_template_html_definitions(self, account_id, template_id, **kwargs)
3622    def get_template_html_definitions(self, account_id, template_id, **kwargs):
3623        """
3624        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3625        
3626        This method makes a synchronous HTTP request by default. To make an
3627        asynchronous HTTP request, please define a `callback` function
3628        to be invoked when receiving the response.
3629        >>> def callback_function(response):
3630        >>>     pprint(response)
3631        >>>
3632        >>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function)
3633
3634        :param callback function: The callback function
3635            for asynchronous request. (optional)
3636        :param str account_id: The external account number (int) or account ID Guid. (required)
3637        :param str template_id: The ID of the template being accessed. (required)
3638        :return: DocumentHtmlDefinitionOriginals
3639                 If the method is called asynchronously,
3640                 returns the request thread.
3641        """
3642        kwargs['_return_http_data_only'] = True
3643        if kwargs.get('callback'):
3644            return self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3645        else:
3646            (data) = self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3647            return data

Get the Original HTML Definition used to generate the Responsive HTML for the template.

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_template_html_definitions(account_id, template_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 template_id: The ID of the template being accessed. (required)
Returns

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

def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs)
3649    def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs):
3650        """
3651        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3652        
3653        This method makes a synchronous HTTP request by default. To make an
3654        asynchronous HTTP request, please define a `callback` function
3655        to be invoked when receiving the response.
3656        >>> def callback_function(response):
3657        >>>     pprint(response)
3658        >>>
3659        >>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function)
3660
3661        :param callback function: The callback function
3662            for asynchronous request. (optional)
3663        :param str account_id: The external account number (int) or account ID Guid. (required)
3664        :param str template_id: The ID of the template being accessed. (required)
3665        :return: DocumentHtmlDefinitionOriginals
3666                 If the method is called asynchronously,
3667                 returns the request thread.
3668        """
3669
3670        all_params = ['account_id', 'template_id']
3671        all_params.append('callback')
3672        all_params.append('_return_http_data_only')
3673        all_params.append('_preload_content')
3674        all_params.append('_request_timeout')
3675
3676        params = locals()
3677        for key, val in iteritems(params['kwargs']):
3678            if key not in all_params:
3679                raise TypeError(
3680                    "Got an unexpected keyword argument '%s'"
3681                    " to method get_template_html_definitions" % key
3682                )
3683            params[key] = val
3684        del params['kwargs']
3685        # verify the required parameter 'account_id' is set
3686        if ('account_id' not in params) or (params['account_id'] is None):
3687            raise ValueError("Missing the required parameter `account_id` when calling `get_template_html_definitions`")
3688        # verify the required parameter 'template_id' is set
3689        if ('template_id' not in params) or (params['template_id'] is None):
3690            raise ValueError("Missing the required parameter `template_id` when calling `get_template_html_definitions`")
3691
3692
3693        collection_formats = {}
3694
3695        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions'.replace('{format}', 'json')
3696        path_params = {}
3697        if 'account_id' in params:
3698            path_params['accountId'] = params['account_id']
3699        if 'template_id' in params:
3700            path_params['templateId'] = params['template_id']
3701
3702        query_params = {}
3703
3704        header_params = {}
3705
3706        form_params = []
3707        local_var_files = {}
3708
3709        body_params = None
3710        # HTTP header `Accept`
3711        header_params['Accept'] = self.api_client.\
3712            select_header_accept(['application/json'])
3713
3714        # Authentication setting
3715        auth_settings = []
3716
3717        return self.api_client.call_api(resource_path, 'GET',
3718                                        path_params,
3719                                        query_params,
3720                                        header_params,
3721                                        body=body_params,
3722                                        post_params=form_params,
3723                                        files=local_var_files,
3724                                        response_type='DocumentHtmlDefinitionOriginals',
3725                                        auth_settings=auth_settings,
3726                                        callback=params.get('callback'),
3727                                        _return_http_data_only=params.get('_return_http_data_only'),
3728                                        _preload_content=params.get('_preload_content', True),
3729                                        _request_timeout=params.get('_request_timeout'),
3730                                        collection_formats=collection_formats)

Get the Original HTML Definition used to generate the Responsive HTML for the template.

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_template_html_definitions_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
Returns

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

def list_custom_fields(self, account_id, template_id, **kwargs)
3732    def list_custom_fields(self, account_id, template_id, **kwargs):
3733        """
3734        Gets the custom document fields from a template.
3735        Retrieves the custom document field information from an existing template.
3736        This method makes a synchronous HTTP request by default. To make an
3737        asynchronous HTTP request, please define a `callback` function
3738        to be invoked when receiving the response.
3739        >>> def callback_function(response):
3740        >>>     pprint(response)
3741        >>>
3742        >>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function)
3743
3744        :param callback function: The callback function
3745            for asynchronous request. (optional)
3746        :param str account_id: The external account number (int) or account ID Guid. (required)
3747        :param str template_id: The ID of the template being accessed. (required)
3748        :return: CustomFields
3749                 If the method is called asynchronously,
3750                 returns the request thread.
3751        """
3752        kwargs['_return_http_data_only'] = True
3753        if kwargs.get('callback'):
3754            return self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3755        else:
3756            (data) = self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3757            return data

Gets the custom document fields from a template. Retrieves the custom document field information from an existing template. 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_fields(account_id, template_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 template_id: The ID of the template being accessed. (required)
Returns

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

def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs)
3759    def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
3760        """
3761        Gets the custom document fields from a template.
3762        Retrieves the custom document field information from an existing template.
3763        This method makes a synchronous HTTP request by default. To make an
3764        asynchronous HTTP request, please define a `callback` function
3765        to be invoked when receiving the response.
3766        >>> def callback_function(response):
3767        >>>     pprint(response)
3768        >>>
3769        >>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
3770
3771        :param callback function: The callback function
3772            for asynchronous request. (optional)
3773        :param str account_id: The external account number (int) or account ID Guid. (required)
3774        :param str template_id: The ID of the template being accessed. (required)
3775        :return: CustomFields
3776                 If the method is called asynchronously,
3777                 returns the request thread.
3778        """
3779
3780        all_params = ['account_id', 'template_id']
3781        all_params.append('callback')
3782        all_params.append('_return_http_data_only')
3783        all_params.append('_preload_content')
3784        all_params.append('_request_timeout')
3785
3786        params = locals()
3787        for key, val in iteritems(params['kwargs']):
3788            if key not in all_params:
3789                raise TypeError(
3790                    "Got an unexpected keyword argument '%s'"
3791                    " to method list_custom_fields" % key
3792                )
3793            params[key] = val
3794        del params['kwargs']
3795        # verify the required parameter 'account_id' is set
3796        if ('account_id' not in params) or (params['account_id'] is None):
3797            raise ValueError("Missing the required parameter `account_id` when calling `list_custom_fields`")
3798        # verify the required parameter 'template_id' is set
3799        if ('template_id' not in params) or (params['template_id'] is None):
3800            raise ValueError("Missing the required parameter `template_id` when calling `list_custom_fields`")
3801
3802
3803        collection_formats = {}
3804
3805        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
3806        path_params = {}
3807        if 'account_id' in params:
3808            path_params['accountId'] = params['account_id']
3809        if 'template_id' in params:
3810            path_params['templateId'] = params['template_id']
3811
3812        query_params = {}
3813
3814        header_params = {}
3815
3816        form_params = []
3817        local_var_files = {}
3818
3819        body_params = None
3820        # HTTP header `Accept`
3821        header_params['Accept'] = self.api_client.\
3822            select_header_accept(['application/json'])
3823
3824        # Authentication setting
3825        auth_settings = []
3826
3827        return self.api_client.call_api(resource_path, 'GET',
3828                                        path_params,
3829                                        query_params,
3830                                        header_params,
3831                                        body=body_params,
3832                                        post_params=form_params,
3833                                        files=local_var_files,
3834                                        response_type='CustomFields',
3835                                        auth_settings=auth_settings,
3836                                        callback=params.get('callback'),
3837                                        _return_http_data_only=params.get('_return_http_data_only'),
3838                                        _preload_content=params.get('_preload_content', True),
3839                                        _request_timeout=params.get('_request_timeout'),
3840                                        collection_formats=collection_formats)

Gets the custom document fields from a template. Retrieves the custom document field information from an existing template. 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_fields_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
Returns

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

def list_document_fields(self, account_id, document_id, template_id, **kwargs)
3842    def list_document_fields(self, account_id, document_id, template_id, **kwargs):
3843        """
3844        Gets the custom document fields for a an existing template document.
3845        Retrieves the custom document fields for an existing template document.
3846        This method makes a synchronous HTTP request by default. To make an
3847        asynchronous HTTP request, please define a `callback` function
3848        to be invoked when receiving the response.
3849        >>> def callback_function(response):
3850        >>>     pprint(response)
3851        >>>
3852        >>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function)
3853
3854        :param callback function: The callback function
3855            for asynchronous request. (optional)
3856        :param str account_id: The external account number (int) or account ID Guid. (required)
3857        :param str document_id: The ID of the document being accessed. (required)
3858        :param str template_id: The ID of the template being accessed. (required)
3859        :return: DocumentFieldsInformation
3860                 If the method is called asynchronously,
3861                 returns the request thread.
3862        """
3863        kwargs['_return_http_data_only'] = True
3864        if kwargs.get('callback'):
3865            return self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
3866        else:
3867            (data) = self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
3868            return data

Gets the custom document fields for a an existing template document. Retrieves the custom document fields for an existing template document. 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_document_fields(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

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

def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs)
3870    def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
3871        """
3872        Gets the custom document fields for a an existing template document.
3873        Retrieves the custom document fields for an existing template document.
3874        This method makes a synchronous HTTP request by default. To make an
3875        asynchronous HTTP request, please define a `callback` function
3876        to be invoked when receiving the response.
3877        >>> def callback_function(response):
3878        >>>     pprint(response)
3879        >>>
3880        >>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
3881
3882        :param callback function: The callback function
3883            for asynchronous request. (optional)
3884        :param str account_id: The external account number (int) or account ID Guid. (required)
3885        :param str document_id: The ID of the document being accessed. (required)
3886        :param str template_id: The ID of the template being accessed. (required)
3887        :return: DocumentFieldsInformation
3888                 If the method is called asynchronously,
3889                 returns the request thread.
3890        """
3891
3892        all_params = ['account_id', 'document_id', 'template_id']
3893        all_params.append('callback')
3894        all_params.append('_return_http_data_only')
3895        all_params.append('_preload_content')
3896        all_params.append('_request_timeout')
3897
3898        params = locals()
3899        for key, val in iteritems(params['kwargs']):
3900            if key not in all_params:
3901                raise TypeError(
3902                    "Got an unexpected keyword argument '%s'"
3903                    " to method list_document_fields" % key
3904                )
3905            params[key] = val
3906        del params['kwargs']
3907        # verify the required parameter 'account_id' is set
3908        if ('account_id' not in params) or (params['account_id'] is None):
3909            raise ValueError("Missing the required parameter `account_id` when calling `list_document_fields`")
3910        # verify the required parameter 'document_id' is set
3911        if ('document_id' not in params) or (params['document_id'] is None):
3912            raise ValueError("Missing the required parameter `document_id` when calling `list_document_fields`")
3913        # verify the required parameter 'template_id' is set
3914        if ('template_id' not in params) or (params['template_id'] is None):
3915            raise ValueError("Missing the required parameter `template_id` when calling `list_document_fields`")
3916
3917
3918        collection_formats = {}
3919
3920        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
3921        path_params = {}
3922        if 'account_id' in params:
3923            path_params['accountId'] = params['account_id']
3924        if 'document_id' in params:
3925            path_params['documentId'] = params['document_id']
3926        if 'template_id' in params:
3927            path_params['templateId'] = params['template_id']
3928
3929        query_params = {}
3930
3931        header_params = {}
3932
3933        form_params = []
3934        local_var_files = {}
3935
3936        body_params = None
3937        # HTTP header `Accept`
3938        header_params['Accept'] = self.api_client.\
3939            select_header_accept(['application/json'])
3940
3941        # Authentication setting
3942        auth_settings = []
3943
3944        return self.api_client.call_api(resource_path, 'GET',
3945                                        path_params,
3946                                        query_params,
3947                                        header_params,
3948                                        body=body_params,
3949                                        post_params=form_params,
3950                                        files=local_var_files,
3951                                        response_type='DocumentFieldsInformation',
3952                                        auth_settings=auth_settings,
3953                                        callback=params.get('callback'),
3954                                        _return_http_data_only=params.get('_return_http_data_only'),
3955                                        _preload_content=params.get('_preload_content', True),
3956                                        _request_timeout=params.get('_request_timeout'),
3957                                        collection_formats=collection_formats)

Gets the custom document fields for a an existing template document. Retrieves the custom document fields for an existing template document. 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_document_fields_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
Returns

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

def list_documents(self, account_id, template_id, **kwargs)
3959    def list_documents(self, account_id, template_id, **kwargs):
3960        """
3961        Gets a list of documents associated with a template.
3962        Retrieves a list of documents associated with the specified template.
3963        This method makes a synchronous HTTP request by default. To make an
3964        asynchronous HTTP request, please define a `callback` function
3965        to be invoked when receiving the response.
3966        >>> def callback_function(response):
3967        >>>     pprint(response)
3968        >>>
3969        >>> thread = api.list_documents(account_id, template_id, callback=callback_function)
3970
3971        :param callback function: The callback function
3972            for asynchronous request. (optional)
3973        :param str account_id: The external account number (int) or account ID Guid. (required)
3974        :param str template_id: The ID of the template being accessed. (required)
3975        :param str include_agreement_type:
3976        :param str include_is_edited:
3977        :param str include_tabs:
3978        :return: TemplateDocumentsResult
3979                 If the method is called asynchronously,
3980                 returns the request thread.
3981        """
3982        kwargs['_return_http_data_only'] = True
3983        if kwargs.get('callback'):
3984            return self.list_documents_with_http_info(account_id, template_id, **kwargs)
3985        else:
3986            (data) = self.list_documents_with_http_info(account_id, template_id, **kwargs)
3987            return data

Gets a list of documents associated with a template. Retrieves a list of documents associated with the specified template. 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_documents(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • str include_agreement_type:
  • str include_is_edited:
  • str include_tabs:
Returns

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

def list_documents_with_http_info(self, account_id, template_id, **kwargs)
3989    def list_documents_with_http_info(self, account_id, template_id, **kwargs):
3990        """
3991        Gets a list of documents associated with a template.
3992        Retrieves a list of documents associated with the specified template.
3993        This method makes a synchronous HTTP request by default. To make an
3994        asynchronous HTTP request, please define a `callback` function
3995        to be invoked when receiving the response.
3996        >>> def callback_function(response):
3997        >>>     pprint(response)
3998        >>>
3999        >>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function)
4000
4001        :param callback function: The callback function
4002            for asynchronous request. (optional)
4003        :param str account_id: The external account number (int) or account ID Guid. (required)
4004        :param str template_id: The ID of the template being accessed. (required)
4005        :param str include_agreement_type:
4006        :param str include_is_edited:
4007        :param str include_tabs:
4008        :return: TemplateDocumentsResult
4009                 If the method is called asynchronously,
4010                 returns the request thread.
4011        """
4012
4013        all_params = ['account_id', 'template_id', 'include_agreement_type', 'include_is_edited', 'include_tabs']
4014        all_params.append('callback')
4015        all_params.append('_return_http_data_only')
4016        all_params.append('_preload_content')
4017        all_params.append('_request_timeout')
4018
4019        params = locals()
4020        for key, val in iteritems(params['kwargs']):
4021            if key not in all_params:
4022                raise TypeError(
4023                    "Got an unexpected keyword argument '%s'"
4024                    " to method list_documents" % key
4025                )
4026            params[key] = val
4027        del params['kwargs']
4028        # verify the required parameter 'account_id' is set
4029        if ('account_id' not in params) or (params['account_id'] is None):
4030            raise ValueError("Missing the required parameter `account_id` when calling `list_documents`")
4031        # verify the required parameter 'template_id' is set
4032        if ('template_id' not in params) or (params['template_id'] is None):
4033            raise ValueError("Missing the required parameter `template_id` when calling `list_documents`")
4034
4035
4036        collection_formats = {}
4037
4038        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
4039        path_params = {}
4040        if 'account_id' in params:
4041            path_params['accountId'] = params['account_id']
4042        if 'template_id' in params:
4043            path_params['templateId'] = params['template_id']
4044
4045        query_params = {}
4046        if 'include_agreement_type' in params:
4047            query_params['include_agreement_type'] = params['include_agreement_type']
4048        if 'include_is_edited' in params:
4049            query_params['include_is_edited'] = params['include_is_edited']
4050        if 'include_tabs' in params:
4051            query_params['include_tabs'] = params['include_tabs']
4052
4053        header_params = {}
4054
4055        form_params = []
4056        local_var_files = {}
4057
4058        body_params = None
4059        # HTTP header `Accept`
4060        header_params['Accept'] = self.api_client.\
4061            select_header_accept(['application/json'])
4062
4063        # Authentication setting
4064        auth_settings = []
4065
4066        return self.api_client.call_api(resource_path, 'GET',
4067                                        path_params,
4068                                        query_params,
4069                                        header_params,
4070                                        body=body_params,
4071                                        post_params=form_params,
4072                                        files=local_var_files,
4073                                        response_type='TemplateDocumentsResult',
4074                                        auth_settings=auth_settings,
4075                                        callback=params.get('callback'),
4076                                        _return_http_data_only=params.get('_return_http_data_only'),
4077                                        _preload_content=params.get('_preload_content', True),
4078                                        _request_timeout=params.get('_request_timeout'),
4079                                        collection_formats=collection_formats)

Gets a list of documents associated with a template. Retrieves a list of documents associated with the specified template. 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_documents_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • str include_agreement_type:
  • str include_is_edited:
  • str include_tabs:
Returns

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

def list_recipients(self, account_id, template_id, **kwargs)
4081    def list_recipients(self, account_id, template_id, **kwargs):
4082        """
4083        Gets recipient information from a template.
4084        Retrieves the information for all recipients in the specified template.
4085        This method makes a synchronous HTTP request by default. To make an
4086        asynchronous HTTP request, please define a `callback` function
4087        to be invoked when receiving the response.
4088        >>> def callback_function(response):
4089        >>>     pprint(response)
4090        >>>
4091        >>> thread = api.list_recipients(account_id, template_id, callback=callback_function)
4092
4093        :param callback function: The callback function
4094            for asynchronous request. (optional)
4095        :param str account_id: The external account number (int) or account ID Guid. (required)
4096        :param str template_id: The ID of the template being accessed. (required)
4097        :param str include_anchor_tab_locations:  When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. 
4098        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4099        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4100        :return: Recipients
4101                 If the method is called asynchronously,
4102                 returns the request thread.
4103        """
4104        kwargs['_return_http_data_only'] = True
4105        if kwargs.get('callback'):
4106            return self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4107        else:
4108            (data) = self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4109            return data

Gets recipient information from a template. Retrieves the information for all recipients in the specified template. 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_recipients(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • str include_anchor_tab_locations: When set to true and include_tabs is set to true, all tabs with anchor tab properties are included in the response.
  • str include_extended: When set to true, the extended properties are included in the response.
  • str include_tabs: When set to true, the tab information associated with the recipient is included in the response.
Returns

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

def list_recipients_with_http_info(self, account_id, template_id, **kwargs)
4111    def list_recipients_with_http_info(self, account_id, template_id, **kwargs):
4112        """
4113        Gets recipient information from a template.
4114        Retrieves the information for all recipients in the specified template.
4115        This method makes a synchronous HTTP request by default. To make an
4116        asynchronous HTTP request, please define a `callback` function
4117        to be invoked when receiving the response.
4118        >>> def callback_function(response):
4119        >>>     pprint(response)
4120        >>>
4121        >>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function)
4122
4123        :param callback function: The callback function
4124            for asynchronous request. (optional)
4125        :param str account_id: The external account number (int) or account ID Guid. (required)
4126        :param str template_id: The ID of the template being accessed. (required)
4127        :param str include_anchor_tab_locations:  When set to **true** and `include_tabs` is set to **true**, all tabs with anchor tab properties are included in the response. 
4128        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4129        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4130        :return: Recipients
4131                 If the method is called asynchronously,
4132                 returns the request thread.
4133        """
4134
4135        all_params = ['account_id', 'template_id', 'include_anchor_tab_locations', 'include_extended', 'include_tabs']
4136        all_params.append('callback')
4137        all_params.append('_return_http_data_only')
4138        all_params.append('_preload_content')
4139        all_params.append('_request_timeout')
4140
4141        params = locals()
4142        for key, val in iteritems(params['kwargs']):
4143            if key not in all_params:
4144                raise TypeError(
4145                    "Got an unexpected keyword argument '%s'"
4146                    " to method list_recipients" % key
4147                )
4148            params[key] = val
4149        del params['kwargs']
4150        # verify the required parameter 'account_id' is set
4151        if ('account_id' not in params) or (params['account_id'] is None):
4152            raise ValueError("Missing the required parameter `account_id` when calling `list_recipients`")
4153        # verify the required parameter 'template_id' is set
4154        if ('template_id' not in params) or (params['template_id'] is None):
4155            raise ValueError("Missing the required parameter `template_id` when calling `list_recipients`")
4156
4157
4158        collection_formats = {}
4159
4160        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
4161        path_params = {}
4162        if 'account_id' in params:
4163            path_params['accountId'] = params['account_id']
4164        if 'template_id' in params:
4165            path_params['templateId'] = params['template_id']
4166
4167        query_params = {}
4168        if 'include_anchor_tab_locations' in params:
4169            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4170        if 'include_extended' in params:
4171            query_params['include_extended'] = params['include_extended']
4172        if 'include_tabs' in params:
4173            query_params['include_tabs'] = params['include_tabs']
4174
4175        header_params = {}
4176
4177        form_params = []
4178        local_var_files = {}
4179
4180        body_params = None
4181        # HTTP header `Accept`
4182        header_params['Accept'] = self.api_client.\
4183            select_header_accept(['application/json'])
4184
4185        # Authentication setting
4186        auth_settings = []
4187
4188        return self.api_client.call_api(resource_path, 'GET',
4189                                        path_params,
4190                                        query_params,
4191                                        header_params,
4192                                        body=body_params,
4193                                        post_params=form_params,
4194                                        files=local_var_files,
4195                                        response_type='Recipients',
4196                                        auth_settings=auth_settings,
4197                                        callback=params.get('callback'),
4198                                        _return_http_data_only=params.get('_return_http_data_only'),
4199                                        _preload_content=params.get('_preload_content', True),
4200                                        _request_timeout=params.get('_request_timeout'),
4201                                        collection_formats=collection_formats)

Gets recipient information from a template. Retrieves the information for all recipients in the specified template. 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_recipients_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • str include_anchor_tab_locations: When set to true and include_tabs is set to true, all tabs with anchor tab properties are included in the response.
  • str include_extended: When set to true, the extended properties are included in the response.
  • str include_tabs: When set to true, the tab information associated with the recipient is included in the response.
Returns

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

def list_tabs(self, account_id, recipient_id, template_id, **kwargs)
4203    def list_tabs(self, account_id, recipient_id, template_id, **kwargs):
4204        """
4205        Gets the tabs information for a signer or sign-in-person recipient in a template.
4206        Gets the tabs information for a signer or sign-in-person recipient in a template.
4207        This method makes a synchronous HTTP request by default. To make an
4208        asynchronous HTTP request, please define a `callback` function
4209        to be invoked when receiving the response.
4210        >>> def callback_function(response):
4211        >>>     pprint(response)
4212        >>>
4213        >>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function)
4214
4215        :param callback function: The callback function
4216            for asynchronous request. (optional)
4217        :param str account_id: The external account number (int) or account ID Guid. (required)
4218        :param str recipient_id: The ID of the recipient being accessed. (required)
4219        :param str template_id: The ID of the template being accessed. (required)
4220        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4221        :param str include_metadata:
4222        :return: Tabs
4223                 If the method is called asynchronously,
4224                 returns the request thread.
4225        """
4226        kwargs['_return_http_data_only'] = True
4227        if kwargs.get('callback'):
4228            return self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4229        else:
4230            (data) = self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4231            return data

Gets the tabs information for a signer or sign-in-person recipient in a template. Gets the tabs information for a signer or sign-in-person recipient in a template. 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_tabs(account_id, recipient_id, template_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 recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str include_anchor_tab_locations: When set to true, all tabs with anchor tab properties are included in the response.
  • str include_metadata:
Returns

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

def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs)
4233    def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
4234        """
4235        Gets the tabs information for a signer or sign-in-person recipient in a template.
4236        Gets the tabs information for a signer or sign-in-person recipient in a template.
4237        This method makes a synchronous HTTP request by default. To make an
4238        asynchronous HTTP request, please define a `callback` function
4239        to be invoked when receiving the response.
4240        >>> def callback_function(response):
4241        >>>     pprint(response)
4242        >>>
4243        >>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
4244
4245        :param callback function: The callback function
4246            for asynchronous request. (optional)
4247        :param str account_id: The external account number (int) or account ID Guid. (required)
4248        :param str recipient_id: The ID of the recipient being accessed. (required)
4249        :param str template_id: The ID of the template being accessed. (required)
4250        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4251        :param str include_metadata:
4252        :return: Tabs
4253                 If the method is called asynchronously,
4254                 returns the request thread.
4255        """
4256
4257        all_params = ['account_id', 'recipient_id', 'template_id', 'include_anchor_tab_locations', 'include_metadata']
4258        all_params.append('callback')
4259        all_params.append('_return_http_data_only')
4260        all_params.append('_preload_content')
4261        all_params.append('_request_timeout')
4262
4263        params = locals()
4264        for key, val in iteritems(params['kwargs']):
4265            if key not in all_params:
4266                raise TypeError(
4267                    "Got an unexpected keyword argument '%s'"
4268                    " to method list_tabs" % key
4269                )
4270            params[key] = val
4271        del params['kwargs']
4272        # verify the required parameter 'account_id' is set
4273        if ('account_id' not in params) or (params['account_id'] is None):
4274            raise ValueError("Missing the required parameter `account_id` when calling `list_tabs`")
4275        # verify the required parameter 'recipient_id' is set
4276        if ('recipient_id' not in params) or (params['recipient_id'] is None):
4277            raise ValueError("Missing the required parameter `recipient_id` when calling `list_tabs`")
4278        # verify the required parameter 'template_id' is set
4279        if ('template_id' not in params) or (params['template_id'] is None):
4280            raise ValueError("Missing the required parameter `template_id` when calling `list_tabs`")
4281
4282
4283        collection_formats = {}
4284
4285        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
4286        path_params = {}
4287        if 'account_id' in params:
4288            path_params['accountId'] = params['account_id']
4289        if 'recipient_id' in params:
4290            path_params['recipientId'] = params['recipient_id']
4291        if 'template_id' in params:
4292            path_params['templateId'] = params['template_id']
4293
4294        query_params = {}
4295        if 'include_anchor_tab_locations' in params:
4296            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4297        if 'include_metadata' in params:
4298            query_params['include_metadata'] = params['include_metadata']
4299
4300        header_params = {}
4301
4302        form_params = []
4303        local_var_files = {}
4304
4305        body_params = None
4306        # HTTP header `Accept`
4307        header_params['Accept'] = self.api_client.\
4308            select_header_accept(['application/json'])
4309
4310        # Authentication setting
4311        auth_settings = []
4312
4313        return self.api_client.call_api(resource_path, 'GET',
4314                                        path_params,
4315                                        query_params,
4316                                        header_params,
4317                                        body=body_params,
4318                                        post_params=form_params,
4319                                        files=local_var_files,
4320                                        response_type='Tabs',
4321                                        auth_settings=auth_settings,
4322                                        callback=params.get('callback'),
4323                                        _return_http_data_only=params.get('_return_http_data_only'),
4324                                        _preload_content=params.get('_preload_content', True),
4325                                        _request_timeout=params.get('_request_timeout'),
4326                                        collection_formats=collection_formats)

Gets the tabs information for a signer or sign-in-person recipient in a template. Gets the tabs information for a signer or sign-in-person recipient in a template. 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_tabs_with_http_info(account_id, recipient_id, template_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 recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str include_anchor_tab_locations: When set to true, all tabs with anchor tab properties are included in the response.
  • str include_metadata:
Returns

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

def list_templates(self, account_id, **kwargs)
4328    def list_templates(self, account_id, **kwargs):
4329        """
4330        Gets the definition of a template.
4331        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4332        This method makes a synchronous HTTP request by default. To make an
4333        asynchronous HTTP request, please define a `callback` function
4334        to be invoked when receiving the response.
4335        >>> def callback_function(response):
4336        >>>     pprint(response)
4337        >>>
4338        >>> thread = api.list_templates(account_id, callback=callback_function)
4339
4340        :param callback function: The callback function
4341            for asynchronous request. (optional)
4342        :param str account_id: The external account number (int) or account ID Guid. (required)
4343        :param str count: Number of records to return in the cache.
4344        :param str created_from_date:
4345        :param str created_to_date:
4346        :param str folder_ids: A comma separated list of folder ID GUIDs.
4347        :param str folder_types:
4348        :param str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
4349        :param str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
4350        :param str is_deleted_template_only:
4351        :param str is_download:
4352        :param str link_configuration_id:
4353        :param str modified_from_date:
4354        :param str modified_to_date:
4355        :param str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z)  -desc = descending sort order (z to a)
4356        :param str order_by: Sets the file attribute used to sort the list. Valid values are:  -name: template name  -modified: date/time template was last modified.  -used: date/time the template was last used.
4357        :param str search_fields:
4358        :param str search_text: The search text used to search the names of templates.
4359        :param str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
4360        :param str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
4361        :param str template_ids:
4362        :param str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
4363        :param str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
4364        :param str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
4365        :param str user_filter: Sets if the templates shown in the response Valid values are:  -owned_by_me: only shows templates the user owns.  -shared_with_me: only shows templates that are shared with the user.  -all: shows all templates owned or shared with the user.
4366        :param str user_id:
4367        :return: EnvelopeTemplateResults
4368                 If the method is called asynchronously,
4369                 returns the request thread.
4370        """
4371        kwargs['_return_http_data_only'] = True
4372        if kwargs.get('callback'):
4373            return self.list_templates_with_http_info(account_id, **kwargs)
4374        else:
4375            (data) = self.list_templates_with_http_info(account_id, **kwargs)
4376            return data

Gets the definition of a template. Retrieves the list of templates for the specified account. The request can be limited to a specific folder. 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_templates(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 count: Number of records to return in the cache.
  • str created_from_date:
  • str created_to_date:
  • str folder_ids: A comma separated list of folder ID GUIDs.
  • str folder_types:
  • str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
  • str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
  • str is_deleted_template_only:
  • str is_download:
  • str link_configuration_id:
  • str modified_from_date:
  • str modified_to_date:
  • str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z) -desc = descending sort order (z to a)
  • str order_by: Sets the file attribute used to sort the list. Valid values are: -name: template name -modified: date/time template was last modified. -used: date/time the template was last used.
  • str search_fields:
  • str search_text: The search text used to search the names of templates.
  • str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
  • str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
  • str template_ids:
  • str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
  • str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
  • str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
  • str user_filter: Sets if the templates shown in the response Valid values are: -owned_by_me: only shows templates the user owns. -shared_with_me: only shows templates that are shared with the user. -all: shows all templates owned or shared with the user.
  • str user_id:
Returns

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

def list_templates_with_http_info(self, account_id, **kwargs)
4378    def list_templates_with_http_info(self, account_id, **kwargs):
4379        """
4380        Gets the definition of a template.
4381        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4382        This method makes a synchronous HTTP request by default. To make an
4383        asynchronous HTTP request, please define a `callback` function
4384        to be invoked when receiving the response.
4385        >>> def callback_function(response):
4386        >>>     pprint(response)
4387        >>>
4388        >>> thread = api.list_templates_with_http_info(account_id, callback=callback_function)
4389
4390        :param callback function: The callback function
4391            for asynchronous request. (optional)
4392        :param str account_id: The external account number (int) or account ID Guid. (required)
4393        :param str count: Number of records to return in the cache.
4394        :param str created_from_date:
4395        :param str created_to_date:
4396        :param str folder_ids: A comma separated list of folder ID GUIDs.
4397        :param str folder_types:
4398        :param str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
4399        :param str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
4400        :param str is_deleted_template_only:
4401        :param str is_download:
4402        :param str link_configuration_id:
4403        :param str modified_from_date:
4404        :param str modified_to_date:
4405        :param str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z)  -desc = descending sort order (z to a)
4406        :param str order_by: Sets the file attribute used to sort the list. Valid values are:  -name: template name  -modified: date/time template was last modified.  -used: date/time the template was last used.
4407        :param str search_fields:
4408        :param str search_text: The search text used to search the names of templates.
4409        :param str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
4410        :param str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
4411        :param str template_ids:
4412        :param str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
4413        :param str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
4414        :param str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
4415        :param str user_filter: Sets if the templates shown in the response Valid values are:  -owned_by_me: only shows templates the user owns.  -shared_with_me: only shows templates that are shared with the user.  -all: shows all templates owned or shared with the user.
4416        :param str user_id:
4417        :return: EnvelopeTemplateResults
4418                 If the method is called asynchronously,
4419                 returns the request thread.
4420        """
4421
4422        all_params = ['account_id', 'count', 'created_from_date', 'created_to_date', 'folder_ids', 'folder_types', 'from_date', 'include', 'is_deleted_template_only', 'is_download', 'link_configuration_id', 'modified_from_date', 'modified_to_date', 'order', 'order_by', 'search_fields', 'search_text', 'shared_by_me', 'start_position', 'template_ids', 'to_date', 'used_from_date', 'used_to_date', 'user_filter', 'user_id']
4423        all_params.append('callback')
4424        all_params.append('_return_http_data_only')
4425        all_params.append('_preload_content')
4426        all_params.append('_request_timeout')
4427
4428        params = locals()
4429        for key, val in iteritems(params['kwargs']):
4430            if key not in all_params:
4431                raise TypeError(
4432                    "Got an unexpected keyword argument '%s'"
4433                    " to method list_templates" % key
4434                )
4435            params[key] = val
4436        del params['kwargs']
4437        # verify the required parameter 'account_id' is set
4438        if ('account_id' not in params) or (params['account_id'] is None):
4439            raise ValueError("Missing the required parameter `account_id` when calling `list_templates`")
4440
4441
4442        collection_formats = {}
4443
4444        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
4445        path_params = {}
4446        if 'account_id' in params:
4447            path_params['accountId'] = params['account_id']
4448
4449        query_params = {}
4450        if 'count' in params:
4451            query_params['count'] = params['count']
4452        if 'created_from_date' in params:
4453            query_params['created_from_date'] = params['created_from_date']
4454        if 'created_to_date' in params:
4455            query_params['created_to_date'] = params['created_to_date']
4456        if 'folder_ids' in params:
4457            query_params['folder_ids'] = params['folder_ids']
4458        if 'folder_types' in params:
4459            query_params['folder_types'] = params['folder_types']
4460        if 'from_date' in params:
4461            query_params['from_date'] = params['from_date']
4462        if 'include' in params:
4463            query_params['include'] = params['include']
4464        if 'is_deleted_template_only' in params:
4465            query_params['is_deleted_template_only'] = params['is_deleted_template_only']
4466        if 'is_download' in params:
4467            query_params['is_download'] = params['is_download']
4468        if 'link_configuration_id' in params:
4469            query_params['link_configuration_id'] = params['link_configuration_id']
4470        if 'modified_from_date' in params:
4471            query_params['modified_from_date'] = params['modified_from_date']
4472        if 'modified_to_date' in params:
4473            query_params['modified_to_date'] = params['modified_to_date']
4474        if 'order' in params:
4475            query_params['order'] = params['order']
4476        if 'order_by' in params:
4477            query_params['order_by'] = params['order_by']
4478        if 'search_fields' in params:
4479            query_params['search_fields'] = params['search_fields']
4480        if 'search_text' in params:
4481            query_params['search_text'] = params['search_text']
4482        if 'shared_by_me' in params:
4483            query_params['shared_by_me'] = params['shared_by_me']
4484        if 'start_position' in params:
4485            query_params['start_position'] = params['start_position']
4486        if 'template_ids' in params:
4487            query_params['template_ids'] = params['template_ids']
4488        if 'to_date' in params:
4489            query_params['to_date'] = params['to_date']
4490        if 'used_from_date' in params:
4491            query_params['used_from_date'] = params['used_from_date']
4492        if 'used_to_date' in params:
4493            query_params['used_to_date'] = params['used_to_date']
4494        if 'user_filter' in params:
4495            query_params['user_filter'] = params['user_filter']
4496        if 'user_id' in params:
4497            query_params['user_id'] = params['user_id']
4498
4499        header_params = {}
4500
4501        form_params = []
4502        local_var_files = {}
4503
4504        body_params = None
4505        # HTTP header `Accept`
4506        header_params['Accept'] = self.api_client.\
4507            select_header_accept(['application/json'])
4508
4509        # Authentication setting
4510        auth_settings = []
4511
4512        return self.api_client.call_api(resource_path, 'GET',
4513                                        path_params,
4514                                        query_params,
4515                                        header_params,
4516                                        body=body_params,
4517                                        post_params=form_params,
4518                                        files=local_var_files,
4519                                        response_type='EnvelopeTemplateResults',
4520                                        auth_settings=auth_settings,
4521                                        callback=params.get('callback'),
4522                                        _return_http_data_only=params.get('_return_http_data_only'),
4523                                        _preload_content=params.get('_preload_content', True),
4524                                        _request_timeout=params.get('_request_timeout'),
4525                                        collection_formats=collection_formats)

Gets the definition of a template. Retrieves the list of templates for the specified account. The request can be limited to a specific folder. 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_templates_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 count: Number of records to return in the cache.
  • str created_from_date:
  • str created_to_date:
  • str folder_ids: A comma separated list of folder ID GUIDs.
  • str folder_types:
  • str from_date: Start of the search date range. Only returns templates created on or after this date/time. If no value is specified, there is no limit on the earliest date created.
  • str include: A comma separated list of additional template attributes to include in the response. Valid values are: recipients, folders, documents, custom_fields, and notifications.
  • str is_deleted_template_only:
  • str is_download:
  • str link_configuration_id:
  • str modified_from_date:
  • str modified_to_date:
  • str order: Sets the direction order used to sort the list. Valid values are: -asc = ascending sort order (a to z) -desc = descending sort order (z to a)
  • str order_by: Sets the file attribute used to sort the list. Valid values are: -name: template name -modified: date/time template was last modified. -used: date/time the template was last used.
  • str search_fields:
  • str search_text: The search text used to search the names of templates.
  • str shared_by_me: If true, the response only includes templates shared by the user. If false, the response only returns template not shared by the user. If not specified, the response is not affected.
  • str start_position: The starting index for the first template shown in the response. This must be greater than or equal to 0 (zero).
  • str template_ids:
  • str to_date: End of the search date range. Only returns templates created up to this date/time. If no value is provided, this defaults to the current date.
  • str used_from_date: Start of the search date range. Only returns templates used or edited on or after this date/time. If no value is specified, there is no limit on the earliest date used.
  • str used_to_date: End of the search date range. Only returns templates used or edited up to this date/time. If no value is provided, this defaults to the current date.
  • str user_filter: Sets if the templates shown in the response Valid values are: -owned_by_me: only shows templates the user owns. -shared_with_me: only shows templates that are shared with the user. -all: shows all templates owned or shared with the user.
  • str user_id:
Returns

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

def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs)
4527    def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
4528        """
4529        Rotates page image from a template for display.
4530        Rotates page image from a template for display. The page image can be rotated to the left or right.
4531        This method makes a synchronous HTTP request by default. To make an
4532        asynchronous HTTP request, please define a `callback` function
4533        to be invoked when receiving the response.
4534        >>> def callback_function(response):
4535        >>>     pprint(response)
4536        >>>
4537        >>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
4538
4539        :param callback function: The callback function
4540            for asynchronous request. (optional)
4541        :param str account_id: The external account number (int) or account ID Guid. (required)
4542        :param str document_id: The ID of the document being accessed. (required)
4543        :param str page_number: The page number being accessed. (required)
4544        :param str template_id: The ID of the template being accessed. (required)
4545        :param PageRequest page_request:
4546        :return: None
4547                 If the method is called asynchronously,
4548                 returns the request thread.
4549        """
4550        kwargs['_return_http_data_only'] = True
4551        if kwargs.get('callback'):
4552            return self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4553        else:
4554            (data) = self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4555            return data

Rotates page image from a template for display. Rotates page image from a template for display. The page image can be rotated to the left or right. 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.rotate_document_page(account_id, document_id, page_number, template_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 document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • PageRequest page_request:
Returns

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

def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs)
4557    def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
4558        """
4559        Rotates page image from a template for display.
4560        Rotates page image from a template for display. The page image can be rotated to the left or right.
4561        This method makes a synchronous HTTP request by default. To make an
4562        asynchronous HTTP request, please define a `callback` function
4563        to be invoked when receiving the response.
4564        >>> def callback_function(response):
4565        >>>     pprint(response)
4566        >>>
4567        >>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
4568
4569        :param callback function: The callback function
4570            for asynchronous request. (optional)
4571        :param str account_id: The external account number (int) or account ID Guid. (required)
4572        :param str document_id: The ID of the document being accessed. (required)
4573        :param str page_number: The page number being accessed. (required)
4574        :param str template_id: The ID of the template being accessed. (required)
4575        :param PageRequest page_request:
4576        :return: None
4577                 If the method is called asynchronously,
4578                 returns the request thread.
4579        """
4580
4581        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
4582        all_params.append('callback')
4583        all_params.append('_return_http_data_only')
4584        all_params.append('_preload_content')
4585        all_params.append('_request_timeout')
4586
4587        params = locals()
4588        for key, val in iteritems(params['kwargs']):
4589            if key not in all_params:
4590                raise TypeError(
4591                    "Got an unexpected keyword argument '%s'"
4592                    " to method rotate_document_page" % key
4593                )
4594            params[key] = val
4595        del params['kwargs']
4596        # verify the required parameter 'account_id' is set
4597        if ('account_id' not in params) or (params['account_id'] is None):
4598            raise ValueError("Missing the required parameter `account_id` when calling `rotate_document_page`")
4599        # verify the required parameter 'document_id' is set
4600        if ('document_id' not in params) or (params['document_id'] is None):
4601            raise ValueError("Missing the required parameter `document_id` when calling `rotate_document_page`")
4602        # verify the required parameter 'page_number' is set
4603        if ('page_number' not in params) or (params['page_number'] is None):
4604            raise ValueError("Missing the required parameter `page_number` when calling `rotate_document_page`")
4605        # verify the required parameter 'template_id' is set
4606        if ('template_id' not in params) or (params['template_id'] is None):
4607            raise ValueError("Missing the required parameter `template_id` when calling `rotate_document_page`")
4608
4609
4610        collection_formats = {}
4611
4612        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
4613        path_params = {}
4614        if 'account_id' in params:
4615            path_params['accountId'] = params['account_id']
4616        if 'document_id' in params:
4617            path_params['documentId'] = params['document_id']
4618        if 'page_number' in params:
4619            path_params['pageNumber'] = params['page_number']
4620        if 'template_id' in params:
4621            path_params['templateId'] = params['template_id']
4622
4623        query_params = {}
4624
4625        header_params = {}
4626
4627        form_params = []
4628        local_var_files = {}
4629
4630        body_params = None
4631        if 'page_request' in params:
4632            body_params = params['page_request']
4633        # HTTP header `Accept`
4634        header_params['Accept'] = self.api_client.\
4635            select_header_accept(['application/json'])
4636
4637        # Authentication setting
4638        auth_settings = []
4639
4640        return self.api_client.call_api(resource_path, 'PUT',
4641                                        path_params,
4642                                        query_params,
4643                                        header_params,
4644                                        body=body_params,
4645                                        post_params=form_params,
4646                                        files=local_var_files,
4647                                        response_type=None,
4648                                        auth_settings=auth_settings,
4649                                        callback=params.get('callback'),
4650                                        _return_http_data_only=params.get('_return_http_data_only'),
4651                                        _preload_content=params.get('_preload_content', True),
4652                                        _request_timeout=params.get('_request_timeout'),
4653                                        collection_formats=collection_formats)

Rotates page image from a template for display. Rotates page image from a template for display. The page image can be rotated to the left or right. 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.rotate_document_page_with_http_info(account_id, document_id, page_number, template_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 document_id: The ID of the document being accessed. (required)
  • str page_number: The page number being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • PageRequest page_request:
Returns

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

def update(self, account_id, template_id, **kwargs)
4655    def update(self, account_id, template_id, **kwargs):
4656        """
4657        Updates an existing template.
4658        Updates an existing template.
4659        This method makes a synchronous HTTP request by default. To make an
4660        asynchronous HTTP request, please define a `callback` function
4661        to be invoked when receiving the response.
4662        >>> def callback_function(response):
4663        >>>     pprint(response)
4664        >>>
4665        >>> thread = api.update(account_id, template_id, callback=callback_function)
4666
4667        :param callback function: The callback function
4668            for asynchronous request. (optional)
4669        :param str account_id: The external account number (int) or account ID Guid. (required)
4670        :param str template_id: The ID of the template being accessed. (required)
4671        :param EnvelopeTemplate envelope_template:
4672        :return: TemplateUpdateSummary
4673                 If the method is called asynchronously,
4674                 returns the request thread.
4675        """
4676        kwargs['_return_http_data_only'] = True
4677        if kwargs.get('callback'):
4678            return self.update_with_http_info(account_id, template_id, **kwargs)
4679        else:
4680            (data) = self.update_with_http_info(account_id, template_id, **kwargs)
4681            return data

Updates an existing template. Updates an existing template. 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(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • EnvelopeTemplate envelope_template:
Returns

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

def update_with_http_info(self, account_id, template_id, **kwargs)
4683    def update_with_http_info(self, account_id, template_id, **kwargs):
4684        """
4685        Updates an existing template.
4686        Updates an existing template.
4687        This method makes a synchronous HTTP request by default. To make an
4688        asynchronous HTTP request, please define a `callback` function
4689        to be invoked when receiving the response.
4690        >>> def callback_function(response):
4691        >>>     pprint(response)
4692        >>>
4693        >>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function)
4694
4695        :param callback function: The callback function
4696            for asynchronous request. (optional)
4697        :param str account_id: The external account number (int) or account ID Guid. (required)
4698        :param str template_id: The ID of the template being accessed. (required)
4699        :param EnvelopeTemplate envelope_template:
4700        :return: TemplateUpdateSummary
4701                 If the method is called asynchronously,
4702                 returns the request thread.
4703        """
4704
4705        all_params = ['account_id', 'template_id', 'envelope_template']
4706        all_params.append('callback')
4707        all_params.append('_return_http_data_only')
4708        all_params.append('_preload_content')
4709        all_params.append('_request_timeout')
4710
4711        params = locals()
4712        for key, val in iteritems(params['kwargs']):
4713            if key not in all_params:
4714                raise TypeError(
4715                    "Got an unexpected keyword argument '%s'"
4716                    " to method update" % key
4717                )
4718            params[key] = val
4719        del params['kwargs']
4720        # verify the required parameter 'account_id' is set
4721        if ('account_id' not in params) or (params['account_id'] is None):
4722            raise ValueError("Missing the required parameter `account_id` when calling `update`")
4723        # verify the required parameter 'template_id' is set
4724        if ('template_id' not in params) or (params['template_id'] is None):
4725            raise ValueError("Missing the required parameter `template_id` when calling `update`")
4726
4727
4728        collection_formats = {}
4729
4730        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
4731        path_params = {}
4732        if 'account_id' in params:
4733            path_params['accountId'] = params['account_id']
4734        if 'template_id' in params:
4735            path_params['templateId'] = params['template_id']
4736
4737        query_params = {}
4738
4739        header_params = {}
4740
4741        form_params = []
4742        local_var_files = {}
4743
4744        body_params = None
4745        if 'envelope_template' in params:
4746            body_params = params['envelope_template']
4747        # HTTP header `Accept`
4748        header_params['Accept'] = self.api_client.\
4749            select_header_accept(['application/json'])
4750
4751        # Authentication setting
4752        auth_settings = []
4753
4754        return self.api_client.call_api(resource_path, 'PUT',
4755                                        path_params,
4756                                        query_params,
4757                                        header_params,
4758                                        body=body_params,
4759                                        post_params=form_params,
4760                                        files=local_var_files,
4761                                        response_type='TemplateUpdateSummary',
4762                                        auth_settings=auth_settings,
4763                                        callback=params.get('callback'),
4764                                        _return_http_data_only=params.get('_return_http_data_only'),
4765                                        _preload_content=params.get('_preload_content', True),
4766                                        _request_timeout=params.get('_request_timeout'),
4767                                        collection_formats=collection_formats)

Updates an existing template. Updates an existing template. 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_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • EnvelopeTemplate envelope_template:
Returns

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

def update_custom_fields(self, account_id, template_id, **kwargs)
4769    def update_custom_fields(self, account_id, template_id, **kwargs):
4770        """
4771        Updates envelope custom fields in a template.
4772        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4773        This method makes a synchronous HTTP request by default. To make an
4774        asynchronous HTTP request, please define a `callback` function
4775        to be invoked when receiving the response.
4776        >>> def callback_function(response):
4777        >>>     pprint(response)
4778        >>>
4779        >>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function)
4780
4781        :param callback function: The callback function
4782            for asynchronous request. (optional)
4783        :param str account_id: The external account number (int) or account ID Guid. (required)
4784        :param str template_id: The ID of the template being accessed. (required)
4785        :param TemplateCustomFields template_custom_fields:
4786        :return: CustomFields
4787                 If the method is called asynchronously,
4788                 returns the request thread.
4789        """
4790        kwargs['_return_http_data_only'] = True
4791        if kwargs.get('callback'):
4792            return self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
4793        else:
4794            (data) = self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
4795            return data

Updates envelope custom fields in a template. Updates the custom fields in a template. Each custom field used in a template must have a unique name. 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_fields(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • TemplateCustomFields template_custom_fields:
Returns

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

def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs)
4797    def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
4798        """
4799        Updates envelope custom fields in a template.
4800        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4801        This method makes a synchronous HTTP request by default. To make an
4802        asynchronous HTTP request, please define a `callback` function
4803        to be invoked when receiving the response.
4804        >>> def callback_function(response):
4805        >>>     pprint(response)
4806        >>>
4807        >>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
4808
4809        :param callback function: The callback function
4810            for asynchronous request. (optional)
4811        :param str account_id: The external account number (int) or account ID Guid. (required)
4812        :param str template_id: The ID of the template being accessed. (required)
4813        :param TemplateCustomFields template_custom_fields:
4814        :return: CustomFields
4815                 If the method is called asynchronously,
4816                 returns the request thread.
4817        """
4818
4819        all_params = ['account_id', 'template_id', 'template_custom_fields']
4820        all_params.append('callback')
4821        all_params.append('_return_http_data_only')
4822        all_params.append('_preload_content')
4823        all_params.append('_request_timeout')
4824
4825        params = locals()
4826        for key, val in iteritems(params['kwargs']):
4827            if key not in all_params:
4828                raise TypeError(
4829                    "Got an unexpected keyword argument '%s'"
4830                    " to method update_custom_fields" % key
4831                )
4832            params[key] = val
4833        del params['kwargs']
4834        # verify the required parameter 'account_id' is set
4835        if ('account_id' not in params) or (params['account_id'] is None):
4836            raise ValueError("Missing the required parameter `account_id` when calling `update_custom_fields`")
4837        # verify the required parameter 'template_id' is set
4838        if ('template_id' not in params) or (params['template_id'] is None):
4839            raise ValueError("Missing the required parameter `template_id` when calling `update_custom_fields`")
4840
4841
4842        collection_formats = {}
4843
4844        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
4845        path_params = {}
4846        if 'account_id' in params:
4847            path_params['accountId'] = params['account_id']
4848        if 'template_id' in params:
4849            path_params['templateId'] = params['template_id']
4850
4851        query_params = {}
4852
4853        header_params = {}
4854
4855        form_params = []
4856        local_var_files = {}
4857
4858        body_params = None
4859        if 'template_custom_fields' in params:
4860            body_params = params['template_custom_fields']
4861        # HTTP header `Accept`
4862        header_params['Accept'] = self.api_client.\
4863            select_header_accept(['application/json'])
4864
4865        # Authentication setting
4866        auth_settings = []
4867
4868        return self.api_client.call_api(resource_path, 'PUT',
4869                                        path_params,
4870                                        query_params,
4871                                        header_params,
4872                                        body=body_params,
4873                                        post_params=form_params,
4874                                        files=local_var_files,
4875                                        response_type='CustomFields',
4876                                        auth_settings=auth_settings,
4877                                        callback=params.get('callback'),
4878                                        _return_http_data_only=params.get('_return_http_data_only'),
4879                                        _preload_content=params.get('_preload_content', True),
4880                                        _request_timeout=params.get('_request_timeout'),
4881                                        collection_formats=collection_formats)

Updates envelope custom fields in a template. Updates the custom fields in a template. Each custom field used in a template must have a unique name. 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_fields_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • TemplateCustomFields template_custom_fields:
Returns

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

def update_document(self, account_id, document_id, template_id, **kwargs)
4883    def update_document(self, account_id, document_id, template_id, **kwargs):
4884        """
4885        Adds a document to a template document.
4886        Adds the specified document to an existing template document.
4887        This method makes a synchronous HTTP request by default. To make an
4888        asynchronous HTTP request, please define a `callback` function
4889        to be invoked when receiving the response.
4890        >>> def callback_function(response):
4891        >>>     pprint(response)
4892        >>>
4893        >>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function)
4894
4895        :param callback function: The callback function
4896            for asynchronous request. (optional)
4897        :param str account_id: The external account number (int) or account ID Guid. (required)
4898        :param str document_id: The ID of the document being accessed. (required)
4899        :param str template_id: The ID of the template being accessed. (required)
4900        :param str is_envelope_definition:
4901        :param EnvelopeDefinition envelope_definition:
4902        :return: EnvelopeDocument
4903                 If the method is called asynchronously,
4904                 returns the request thread.
4905        """
4906        kwargs['_return_http_data_only'] = True
4907        if kwargs.get('callback'):
4908            return self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
4909        else:
4910            (data) = self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
4911            return data

Adds a document to a template document. Adds the specified document to an existing template document. 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_document(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str is_envelope_definition:
  • EnvelopeDefinition envelope_definition:
Returns

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

def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs)
4913    def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
4914        """
4915        Adds a document to a template document.
4916        Adds the specified document to an existing template document.
4917        This method makes a synchronous HTTP request by default. To make an
4918        asynchronous HTTP request, please define a `callback` function
4919        to be invoked when receiving the response.
4920        >>> def callback_function(response):
4921        >>>     pprint(response)
4922        >>>
4923        >>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
4924
4925        :param callback function: The callback function
4926            for asynchronous request. (optional)
4927        :param str account_id: The external account number (int) or account ID Guid. (required)
4928        :param str document_id: The ID of the document being accessed. (required)
4929        :param str template_id: The ID of the template being accessed. (required)
4930        :param str is_envelope_definition:
4931        :param EnvelopeDefinition envelope_definition:
4932        :return: EnvelopeDocument
4933                 If the method is called asynchronously,
4934                 returns the request thread.
4935        """
4936
4937        all_params = ['account_id', 'document_id', 'template_id', 'is_envelope_definition', 'envelope_definition']
4938        all_params.append('callback')
4939        all_params.append('_return_http_data_only')
4940        all_params.append('_preload_content')
4941        all_params.append('_request_timeout')
4942
4943        params = locals()
4944        for key, val in iteritems(params['kwargs']):
4945            if key not in all_params:
4946                raise TypeError(
4947                    "Got an unexpected keyword argument '%s'"
4948                    " to method update_document" % key
4949                )
4950            params[key] = val
4951        del params['kwargs']
4952        # verify the required parameter 'account_id' is set
4953        if ('account_id' not in params) or (params['account_id'] is None):
4954            raise ValueError("Missing the required parameter `account_id` when calling `update_document`")
4955        # verify the required parameter 'document_id' is set
4956        if ('document_id' not in params) or (params['document_id'] is None):
4957            raise ValueError("Missing the required parameter `document_id` when calling `update_document`")
4958        # verify the required parameter 'template_id' is set
4959        if ('template_id' not in params) or (params['template_id'] is None):
4960            raise ValueError("Missing the required parameter `template_id` when calling `update_document`")
4961
4962
4963        collection_formats = {}
4964
4965        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
4966        path_params = {}
4967        if 'account_id' in params:
4968            path_params['accountId'] = params['account_id']
4969        if 'document_id' in params:
4970            path_params['documentId'] = params['document_id']
4971        if 'template_id' in params:
4972            path_params['templateId'] = params['template_id']
4973
4974        query_params = {}
4975        if 'is_envelope_definition' in params:
4976            query_params['is_envelope_definition'] = params['is_envelope_definition']
4977
4978        header_params = {}
4979
4980        form_params = []
4981        local_var_files = {}
4982
4983        body_params = None
4984        if 'envelope_definition' in params:
4985            body_params = params['envelope_definition']
4986        # HTTP header `Accept`
4987        header_params['Accept'] = self.api_client.\
4988            select_header_accept(['application/json'])
4989
4990        # Authentication setting
4991        auth_settings = []
4992
4993        return self.api_client.call_api(resource_path, 'PUT',
4994                                        path_params,
4995                                        query_params,
4996                                        header_params,
4997                                        body=body_params,
4998                                        post_params=form_params,
4999                                        files=local_var_files,
5000                                        response_type='EnvelopeDocument',
5001                                        auth_settings=auth_settings,
5002                                        callback=params.get('callback'),
5003                                        _return_http_data_only=params.get('_return_http_data_only'),
5004                                        _preload_content=params.get('_preload_content', True),
5005                                        _request_timeout=params.get('_request_timeout'),
5006                                        collection_formats=collection_formats)

Adds a document to a template document. Adds the specified document to an existing template document. 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_document_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • str is_envelope_definition:
  • EnvelopeDefinition envelope_definition:
Returns

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

def update_document_fields(self, account_id, document_id, template_id, **kwargs)
5008    def update_document_fields(self, account_id, document_id, template_id, **kwargs):
5009        """
5010        Updates existing custom document fields in an existing template document.
5011        Updates existing custom document fields in an existing template document.
5012        This method makes a synchronous HTTP request by default. To make an
5013        asynchronous HTTP request, please define a `callback` function
5014        to be invoked when receiving the response.
5015        >>> def callback_function(response):
5016        >>>     pprint(response)
5017        >>>
5018        >>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function)
5019
5020        :param callback function: The callback function
5021            for asynchronous request. (optional)
5022        :param str account_id: The external account number (int) or account ID Guid. (required)
5023        :param str document_id: The ID of the document being accessed. (required)
5024        :param str template_id: The ID of the template being accessed. (required)
5025        :param DocumentFieldsInformation document_fields_information:
5026        :return: DocumentFieldsInformation
5027                 If the method is called asynchronously,
5028                 returns the request thread.
5029        """
5030        kwargs['_return_http_data_only'] = True
5031        if kwargs.get('callback'):
5032            return self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5033        else:
5034            (data) = self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5035            return data

Updates existing custom document fields in an existing template document. Updates existing custom document fields in an existing template document. 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_document_fields(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentFieldsInformation document_fields_information:
Returns

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

def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs)
5037    def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
5038        """
5039        Updates existing custom document fields in an existing template document.
5040        Updates existing custom document fields in an existing template document.
5041        This method makes a synchronous HTTP request by default. To make an
5042        asynchronous HTTP request, please define a `callback` function
5043        to be invoked when receiving the response.
5044        >>> def callback_function(response):
5045        >>>     pprint(response)
5046        >>>
5047        >>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
5048
5049        :param callback function: The callback function
5050            for asynchronous request. (optional)
5051        :param str account_id: The external account number (int) or account ID Guid. (required)
5052        :param str document_id: The ID of the document being accessed. (required)
5053        :param str template_id: The ID of the template being accessed. (required)
5054        :param DocumentFieldsInformation document_fields_information:
5055        :return: DocumentFieldsInformation
5056                 If the method is called asynchronously,
5057                 returns the request thread.
5058        """
5059
5060        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
5061        all_params.append('callback')
5062        all_params.append('_return_http_data_only')
5063        all_params.append('_preload_content')
5064        all_params.append('_request_timeout')
5065
5066        params = locals()
5067        for key, val in iteritems(params['kwargs']):
5068            if key not in all_params:
5069                raise TypeError(
5070                    "Got an unexpected keyword argument '%s'"
5071                    " to method update_document_fields" % key
5072                )
5073            params[key] = val
5074        del params['kwargs']
5075        # verify the required parameter 'account_id' is set
5076        if ('account_id' not in params) or (params['account_id'] is None):
5077            raise ValueError("Missing the required parameter `account_id` when calling `update_document_fields`")
5078        # verify the required parameter 'document_id' is set
5079        if ('document_id' not in params) or (params['document_id'] is None):
5080            raise ValueError("Missing the required parameter `document_id` when calling `update_document_fields`")
5081        # verify the required parameter 'template_id' is set
5082        if ('template_id' not in params) or (params['template_id'] is None):
5083            raise ValueError("Missing the required parameter `template_id` when calling `update_document_fields`")
5084
5085
5086        collection_formats = {}
5087
5088        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
5089        path_params = {}
5090        if 'account_id' in params:
5091            path_params['accountId'] = params['account_id']
5092        if 'document_id' in params:
5093            path_params['documentId'] = params['document_id']
5094        if 'template_id' in params:
5095            path_params['templateId'] = params['template_id']
5096
5097        query_params = {}
5098
5099        header_params = {}
5100
5101        form_params = []
5102        local_var_files = {}
5103
5104        body_params = None
5105        if 'document_fields_information' in params:
5106            body_params = params['document_fields_information']
5107        # HTTP header `Accept`
5108        header_params['Accept'] = self.api_client.\
5109            select_header_accept(['application/json'])
5110
5111        # Authentication setting
5112        auth_settings = []
5113
5114        return self.api_client.call_api(resource_path, 'PUT',
5115                                        path_params,
5116                                        query_params,
5117                                        header_params,
5118                                        body=body_params,
5119                                        post_params=form_params,
5120                                        files=local_var_files,
5121                                        response_type='DocumentFieldsInformation',
5122                                        auth_settings=auth_settings,
5123                                        callback=params.get('callback'),
5124                                        _return_http_data_only=params.get('_return_http_data_only'),
5125                                        _preload_content=params.get('_preload_content', True),
5126                                        _request_timeout=params.get('_request_timeout'),
5127                                        collection_formats=collection_formats)

Updates existing custom document fields in an existing template document. Updates existing custom document fields in an existing template document. 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_document_fields_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • DocumentFieldsInformation document_fields_information:
Returns

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

def update_documents(self, account_id, template_id, **kwargs)
5129    def update_documents(self, account_id, template_id, **kwargs):
5130        """
5131        Adds documents to a template document.
5132        Adds one or more documents to an existing template document.
5133        This method makes a synchronous HTTP request by default. To make an
5134        asynchronous HTTP request, please define a `callback` function
5135        to be invoked when receiving the response.
5136        >>> def callback_function(response):
5137        >>>     pprint(response)
5138        >>>
5139        >>> thread = api.update_documents(account_id, template_id, callback=callback_function)
5140
5141        :param callback function: The callback function
5142            for asynchronous request. (optional)
5143        :param str account_id: The external account number (int) or account ID Guid. (required)
5144        :param str template_id: The ID of the template being accessed. (required)
5145        :param EnvelopeDefinition envelope_definition:
5146        :return: TemplateDocumentsResult
5147                 If the method is called asynchronously,
5148                 returns the request thread.
5149        """
5150        kwargs['_return_http_data_only'] = True
5151        if kwargs.get('callback'):
5152            return self.update_documents_with_http_info(account_id, template_id, **kwargs)
5153        else:
5154            (data) = self.update_documents_with_http_info(account_id, template_id, **kwargs)
5155            return data

Adds documents to a template document. Adds one or more documents to an existing template document. 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_documents(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • EnvelopeDefinition envelope_definition:
Returns

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

def update_documents_with_http_info(self, account_id, template_id, **kwargs)
5157    def update_documents_with_http_info(self, account_id, template_id, **kwargs):
5158        """
5159        Adds documents to a template document.
5160        Adds one or more documents to an existing template document.
5161        This method makes a synchronous HTTP request by default. To make an
5162        asynchronous HTTP request, please define a `callback` function
5163        to be invoked when receiving the response.
5164        >>> def callback_function(response):
5165        >>>     pprint(response)
5166        >>>
5167        >>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function)
5168
5169        :param callback function: The callback function
5170            for asynchronous request. (optional)
5171        :param str account_id: The external account number (int) or account ID Guid. (required)
5172        :param str template_id: The ID of the template being accessed. (required)
5173        :param EnvelopeDefinition envelope_definition:
5174        :return: TemplateDocumentsResult
5175                 If the method is called asynchronously,
5176                 returns the request thread.
5177        """
5178
5179        all_params = ['account_id', 'template_id', 'envelope_definition']
5180        all_params.append('callback')
5181        all_params.append('_return_http_data_only')
5182        all_params.append('_preload_content')
5183        all_params.append('_request_timeout')
5184
5185        params = locals()
5186        for key, val in iteritems(params['kwargs']):
5187            if key not in all_params:
5188                raise TypeError(
5189                    "Got an unexpected keyword argument '%s'"
5190                    " to method update_documents" % key
5191                )
5192            params[key] = val
5193        del params['kwargs']
5194        # verify the required parameter 'account_id' is set
5195        if ('account_id' not in params) or (params['account_id'] is None):
5196            raise ValueError("Missing the required parameter `account_id` when calling `update_documents`")
5197        # verify the required parameter 'template_id' is set
5198        if ('template_id' not in params) or (params['template_id'] is None):
5199            raise ValueError("Missing the required parameter `template_id` when calling `update_documents`")
5200
5201
5202        collection_formats = {}
5203
5204        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
5205        path_params = {}
5206        if 'account_id' in params:
5207            path_params['accountId'] = params['account_id']
5208        if 'template_id' in params:
5209            path_params['templateId'] = params['template_id']
5210
5211        query_params = {}
5212
5213        header_params = {}
5214
5215        form_params = []
5216        local_var_files = {}
5217
5218        body_params = None
5219        if 'envelope_definition' in params:
5220            body_params = params['envelope_definition']
5221        # HTTP header `Accept`
5222        header_params['Accept'] = self.api_client.\
5223            select_header_accept(['application/json'])
5224
5225        # Authentication setting
5226        auth_settings = []
5227
5228        return self.api_client.call_api(resource_path, 'PUT',
5229                                        path_params,
5230                                        query_params,
5231                                        header_params,
5232                                        body=body_params,
5233                                        post_params=form_params,
5234                                        files=local_var_files,
5235                                        response_type='TemplateDocumentsResult',
5236                                        auth_settings=auth_settings,
5237                                        callback=params.get('callback'),
5238                                        _return_http_data_only=params.get('_return_http_data_only'),
5239                                        _preload_content=params.get('_preload_content', True),
5240                                        _request_timeout=params.get('_request_timeout'),
5241                                        collection_formats=collection_formats)

Adds documents to a template document. Adds one or more documents to an existing template document. 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_documents_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • EnvelopeDefinition envelope_definition:
Returns

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

def update_group_share(self, account_id, template_id, template_part, **kwargs)
5243    def update_group_share(self, account_id, template_id, template_part, **kwargs):
5244        """
5245        Shares a template with a group
5246        Shares a template with the specified members group.
5247        This method makes a synchronous HTTP request by default. To make an
5248        asynchronous HTTP request, please define a `callback` function
5249        to be invoked when receiving the response.
5250        >>> def callback_function(response):
5251        >>>     pprint(response)
5252        >>>
5253        >>> thread = api.update_group_share(account_id, template_id, template_part, callback=callback_function)
5254
5255        :param callback function: The callback function
5256            for asynchronous request. (optional)
5257        :param str account_id: The external account number (int) or account ID Guid. (required)
5258        :param str template_id: The ID of the template being accessed. (required)
5259        :param str template_part: Currently, the only defined part is **groups**. (required)
5260        :param GroupInformation group_information:
5261        :return: GroupInformation
5262                 If the method is called asynchronously,
5263                 returns the request thread.
5264        """
5265        kwargs['_return_http_data_only'] = True
5266        if kwargs.get('callback'):
5267            return self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5268        else:
5269            (data) = self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5270            return data

Shares a template with a group Shares a template with the specified members group. 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_group_share(account_id, template_id, template_part, 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 template_id: The ID of the template being accessed. (required)
  • str template_part: Currently, the only defined part is groups. (required)
  • GroupInformation group_information:
Returns

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

def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs)
5272    def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
5273        """
5274        Shares a template with a group
5275        Shares a template with the specified members group.
5276        This method makes a synchronous HTTP request by default. To make an
5277        asynchronous HTTP request, please define a `callback` function
5278        to be invoked when receiving the response.
5279        >>> def callback_function(response):
5280        >>>     pprint(response)
5281        >>>
5282        >>> thread = api.update_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
5283
5284        :param callback function: The callback function
5285            for asynchronous request. (optional)
5286        :param str account_id: The external account number (int) or account ID Guid. (required)
5287        :param str template_id: The ID of the template being accessed. (required)
5288        :param str template_part: Currently, the only defined part is **groups**. (required)
5289        :param GroupInformation group_information:
5290        :return: GroupInformation
5291                 If the method is called asynchronously,
5292                 returns the request thread.
5293        """
5294
5295        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
5296        all_params.append('callback')
5297        all_params.append('_return_http_data_only')
5298        all_params.append('_preload_content')
5299        all_params.append('_request_timeout')
5300
5301        params = locals()
5302        for key, val in iteritems(params['kwargs']):
5303            if key not in all_params:
5304                raise TypeError(
5305                    "Got an unexpected keyword argument '%s'"
5306                    " to method update_group_share" % key
5307                )
5308            params[key] = val
5309        del params['kwargs']
5310        # verify the required parameter 'account_id' is set
5311        if ('account_id' not in params) or (params['account_id'] is None):
5312            raise ValueError("Missing the required parameter `account_id` when calling `update_group_share`")
5313        # verify the required parameter 'template_id' is set
5314        if ('template_id' not in params) or (params['template_id'] is None):
5315            raise ValueError("Missing the required parameter `template_id` when calling `update_group_share`")
5316        # verify the required parameter 'template_part' is set
5317        if ('template_part' not in params) or (params['template_part'] is None):
5318            raise ValueError("Missing the required parameter `template_part` when calling `update_group_share`")
5319
5320
5321        collection_formats = {}
5322
5323        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
5324        path_params = {}
5325        if 'account_id' in params:
5326            path_params['accountId'] = params['account_id']
5327        if 'template_id' in params:
5328            path_params['templateId'] = params['template_id']
5329        if 'template_part' in params:
5330            path_params['templatePart'] = params['template_part']
5331
5332        query_params = {}
5333
5334        header_params = {}
5335
5336        form_params = []
5337        local_var_files = {}
5338
5339        body_params = None
5340        if 'group_information' in params:
5341            body_params = params['group_information']
5342        # HTTP header `Accept`
5343        header_params['Accept'] = self.api_client.\
5344            select_header_accept(['application/json'])
5345
5346        # Authentication setting
5347        auth_settings = []
5348
5349        return self.api_client.call_api(resource_path, 'PUT',
5350                                        path_params,
5351                                        query_params,
5352                                        header_params,
5353                                        body=body_params,
5354                                        post_params=form_params,
5355                                        files=local_var_files,
5356                                        response_type='GroupInformation',
5357                                        auth_settings=auth_settings,
5358                                        callback=params.get('callback'),
5359                                        _return_http_data_only=params.get('_return_http_data_only'),
5360                                        _preload_content=params.get('_preload_content', True),
5361                                        _request_timeout=params.get('_request_timeout'),
5362                                        collection_formats=collection_formats)

Shares a template with a group Shares a template with the specified members group. 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_group_share_with_http_info(account_id, template_id, template_part, 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 template_id: The ID of the template being accessed. (required)
  • str template_part: Currently, the only defined part is groups. (required)
  • GroupInformation group_information:
Returns

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

def update_lock(self, account_id, template_id, **kwargs)
5364    def update_lock(self, account_id, template_id, **kwargs):
5365        """
5366        Updates a template lock.
5367        Updates the lock duration time or update the `lockedByApp` property information for the specified template. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated.
5368        This method makes a synchronous HTTP request by default. To make an
5369        asynchronous HTTP request, please define a `callback` function
5370        to be invoked when receiving the response.
5371        >>> def callback_function(response):
5372        >>>     pprint(response)
5373        >>>
5374        >>> thread = api.update_lock(account_id, template_id, callback=callback_function)
5375
5376        :param callback function: The callback function
5377            for asynchronous request. (optional)
5378        :param str account_id: The external account number (int) or account ID Guid. (required)
5379        :param str template_id: The ID of the template being accessed. (required)
5380        :param LockRequest lock_request:
5381        :return: LockInformation
5382                 If the method is called asynchronously,
5383                 returns the request thread.
5384        """
5385        kwargs['_return_http_data_only'] = True
5386        if kwargs.get('callback'):
5387            return self.update_lock_with_http_info(account_id, template_id, **kwargs)
5388        else:
5389            (data) = self.update_lock_with_http_info(account_id, template_id, **kwargs)
5390            return data

Updates a template lock. Updates the lock duration time or update the lockedByApp property information for the specified template. The user and integrator key must match the user specified by the lockByUser property and integrator key information and the X-DocuSign-Edit header must be included or an error will be generated. 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_lock(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • LockRequest lock_request:
Returns

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

def update_lock_with_http_info(self, account_id, template_id, **kwargs)
5392    def update_lock_with_http_info(self, account_id, template_id, **kwargs):
5393        """
5394        Updates a template lock.
5395        Updates the lock duration time or update the `lockedByApp` property information for the specified template. The user and integrator key must match the user specified by the `lockByUser` property and integrator key information and the `X-DocuSign-Edit` header must be included or an error will be generated.
5396        This method makes a synchronous HTTP request by default. To make an
5397        asynchronous HTTP request, please define a `callback` function
5398        to be invoked when receiving the response.
5399        >>> def callback_function(response):
5400        >>>     pprint(response)
5401        >>>
5402        >>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function)
5403
5404        :param callback function: The callback function
5405            for asynchronous request. (optional)
5406        :param str account_id: The external account number (int) or account ID Guid. (required)
5407        :param str template_id: The ID of the template being accessed. (required)
5408        :param LockRequest lock_request:
5409        :return: LockInformation
5410                 If the method is called asynchronously,
5411                 returns the request thread.
5412        """
5413
5414        all_params = ['account_id', 'template_id', 'lock_request']
5415        all_params.append('callback')
5416        all_params.append('_return_http_data_only')
5417        all_params.append('_preload_content')
5418        all_params.append('_request_timeout')
5419
5420        params = locals()
5421        for key, val in iteritems(params['kwargs']):
5422            if key not in all_params:
5423                raise TypeError(
5424                    "Got an unexpected keyword argument '%s'"
5425                    " to method update_lock" % key
5426                )
5427            params[key] = val
5428        del params['kwargs']
5429        # verify the required parameter 'account_id' is set
5430        if ('account_id' not in params) or (params['account_id'] is None):
5431            raise ValueError("Missing the required parameter `account_id` when calling `update_lock`")
5432        # verify the required parameter 'template_id' is set
5433        if ('template_id' not in params) or (params['template_id'] is None):
5434            raise ValueError("Missing the required parameter `template_id` when calling `update_lock`")
5435
5436
5437        collection_formats = {}
5438
5439        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
5440        path_params = {}
5441        if 'account_id' in params:
5442            path_params['accountId'] = params['account_id']
5443        if 'template_id' in params:
5444            path_params['templateId'] = params['template_id']
5445
5446        query_params = {}
5447
5448        header_params = {}
5449
5450        form_params = []
5451        local_var_files = {}
5452
5453        body_params = None
5454        if 'lock_request' in params:
5455            body_params = params['lock_request']
5456        # HTTP header `Accept`
5457        header_params['Accept'] = self.api_client.\
5458            select_header_accept(['application/json'])
5459
5460        # Authentication setting
5461        auth_settings = []
5462
5463        return self.api_client.call_api(resource_path, 'PUT',
5464                                        path_params,
5465                                        query_params,
5466                                        header_params,
5467                                        body=body_params,
5468                                        post_params=form_params,
5469                                        files=local_var_files,
5470                                        response_type='LockInformation',
5471                                        auth_settings=auth_settings,
5472                                        callback=params.get('callback'),
5473                                        _return_http_data_only=params.get('_return_http_data_only'),
5474                                        _preload_content=params.get('_preload_content', True),
5475                                        _request_timeout=params.get('_request_timeout'),
5476                                        collection_formats=collection_formats)

Updates a template lock. Updates the lock duration time or update the lockedByApp property information for the specified template. The user and integrator key must match the user specified by the lockByUser property and integrator key information and the X-DocuSign-Edit header must be included or an error will be generated. 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_lock_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • LockRequest lock_request:
Returns

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

def update_notification_settings(self, account_id, template_id, **kwargs)
5478    def update_notification_settings(self, account_id, template_id, **kwargs):
5479        """
5480        Updates the notification  structure for an existing template.
5481        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5482        This method makes a synchronous HTTP request by default. To make an
5483        asynchronous HTTP request, please define a `callback` function
5484        to be invoked when receiving the response.
5485        >>> def callback_function(response):
5486        >>>     pprint(response)
5487        >>>
5488        >>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function)
5489
5490        :param callback function: The callback function
5491            for asynchronous request. (optional)
5492        :param str account_id: The external account number (int) or account ID Guid. (required)
5493        :param str template_id: The ID of the template being accessed. (required)
5494        :param TemplateNotificationRequest template_notification_request:
5495        :return: Notification
5496                 If the method is called asynchronously,
5497                 returns the request thread.
5498        """
5499        kwargs['_return_http_data_only'] = True
5500        if kwargs.get('callback'):
5501            return self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5502        else:
5503            (data) = self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5504            return data

Updates the notification structure for an existing template. Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications. 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_notification_settings(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • TemplateNotificationRequest template_notification_request:
Returns

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

def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs)
5506    def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
5507        """
5508        Updates the notification  structure for an existing template.
5509        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5510        This method makes a synchronous HTTP request by default. To make an
5511        asynchronous HTTP request, please define a `callback` function
5512        to be invoked when receiving the response.
5513        >>> def callback_function(response):
5514        >>>     pprint(response)
5515        >>>
5516        >>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
5517
5518        :param callback function: The callback function
5519            for asynchronous request. (optional)
5520        :param str account_id: The external account number (int) or account ID Guid. (required)
5521        :param str template_id: The ID of the template being accessed. (required)
5522        :param TemplateNotificationRequest template_notification_request:
5523        :return: Notification
5524                 If the method is called asynchronously,
5525                 returns the request thread.
5526        """
5527
5528        all_params = ['account_id', 'template_id', 'template_notification_request']
5529        all_params.append('callback')
5530        all_params.append('_return_http_data_only')
5531        all_params.append('_preload_content')
5532        all_params.append('_request_timeout')
5533
5534        params = locals()
5535        for key, val in iteritems(params['kwargs']):
5536            if key not in all_params:
5537                raise TypeError(
5538                    "Got an unexpected keyword argument '%s'"
5539                    " to method update_notification_settings" % key
5540                )
5541            params[key] = val
5542        del params['kwargs']
5543        # verify the required parameter 'account_id' is set
5544        if ('account_id' not in params) or (params['account_id'] is None):
5545            raise ValueError("Missing the required parameter `account_id` when calling `update_notification_settings`")
5546        # verify the required parameter 'template_id' is set
5547        if ('template_id' not in params) or (params['template_id'] is None):
5548            raise ValueError("Missing the required parameter `template_id` when calling `update_notification_settings`")
5549
5550
5551        collection_formats = {}
5552
5553        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
5554        path_params = {}
5555        if 'account_id' in params:
5556            path_params['accountId'] = params['account_id']
5557        if 'template_id' in params:
5558            path_params['templateId'] = params['template_id']
5559
5560        query_params = {}
5561
5562        header_params = {}
5563
5564        form_params = []
5565        local_var_files = {}
5566
5567        body_params = None
5568        if 'template_notification_request' in params:
5569            body_params = params['template_notification_request']
5570        # HTTP header `Accept`
5571        header_params['Accept'] = self.api_client.\
5572            select_header_accept(['application/json'])
5573
5574        # Authentication setting
5575        auth_settings = []
5576
5577        return self.api_client.call_api(resource_path, 'PUT',
5578                                        path_params,
5579                                        query_params,
5580                                        header_params,
5581                                        body=body_params,
5582                                        post_params=form_params,
5583                                        files=local_var_files,
5584                                        response_type='Notification',
5585                                        auth_settings=auth_settings,
5586                                        callback=params.get('callback'),
5587                                        _return_http_data_only=params.get('_return_http_data_only'),
5588                                        _preload_content=params.get('_preload_content', True),
5589                                        _request_timeout=params.get('_request_timeout'),
5590                                        collection_formats=collection_formats)

Updates the notification structure for an existing template. Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications. 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_notification_settings_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • TemplateNotificationRequest template_notification_request:
Returns

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

def update_recipients(self, account_id, template_id, **kwargs)
5592    def update_recipients(self, account_id, template_id, **kwargs):
5593        """
5594        Updates recipients in a template.
5595        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5596        This method makes a synchronous HTTP request by default. To make an
5597        asynchronous HTTP request, please define a `callback` function
5598        to be invoked when receiving the response.
5599        >>> def callback_function(response):
5600        >>>     pprint(response)
5601        >>>
5602        >>> thread = api.update_recipients(account_id, template_id, callback=callback_function)
5603
5604        :param callback function: The callback function
5605            for asynchronous request. (optional)
5606        :param str account_id: The external account number (int) or account ID Guid. (required)
5607        :param str template_id: The ID of the template being accessed. (required)
5608        :param str resend_envelope:
5609        :param TemplateRecipients template_recipients:
5610        :return: RecipientsUpdateSummary
5611                 If the method is called asynchronously,
5612                 returns the request thread.
5613        """
5614        kwargs['_return_http_data_only'] = True
5615        if kwargs.get('callback'):
5616            return self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5617        else:
5618            (data) = self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5619            return data

Updates recipients in a template. Updates recipients in a template. You can edit the following properties: email, userName, routingOrder, faxNumber, deliveryMethod, accessCode, and requireIdLookup. 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_recipients(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • str resend_envelope:
  • TemplateRecipients template_recipients:
Returns

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

def update_recipients_with_http_info(self, account_id, template_id, **kwargs)
5621    def update_recipients_with_http_info(self, account_id, template_id, **kwargs):
5622        """
5623        Updates recipients in a template.
5624        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5625        This method makes a synchronous HTTP request by default. To make an
5626        asynchronous HTTP request, please define a `callback` function
5627        to be invoked when receiving the response.
5628        >>> def callback_function(response):
5629        >>>     pprint(response)
5630        >>>
5631        >>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function)
5632
5633        :param callback function: The callback function
5634            for asynchronous request. (optional)
5635        :param str account_id: The external account number (int) or account ID Guid. (required)
5636        :param str template_id: The ID of the template being accessed. (required)
5637        :param str resend_envelope:
5638        :param TemplateRecipients template_recipients:
5639        :return: RecipientsUpdateSummary
5640                 If the method is called asynchronously,
5641                 returns the request thread.
5642        """
5643
5644        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
5645        all_params.append('callback')
5646        all_params.append('_return_http_data_only')
5647        all_params.append('_preload_content')
5648        all_params.append('_request_timeout')
5649
5650        params = locals()
5651        for key, val in iteritems(params['kwargs']):
5652            if key not in all_params:
5653                raise TypeError(
5654                    "Got an unexpected keyword argument '%s'"
5655                    " to method update_recipients" % key
5656                )
5657            params[key] = val
5658        del params['kwargs']
5659        # verify the required parameter 'account_id' is set
5660        if ('account_id' not in params) or (params['account_id'] is None):
5661            raise ValueError("Missing the required parameter `account_id` when calling `update_recipients`")
5662        # verify the required parameter 'template_id' is set
5663        if ('template_id' not in params) or (params['template_id'] is None):
5664            raise ValueError("Missing the required parameter `template_id` when calling `update_recipients`")
5665
5666
5667        collection_formats = {}
5668
5669        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
5670        path_params = {}
5671        if 'account_id' in params:
5672            path_params['accountId'] = params['account_id']
5673        if 'template_id' in params:
5674            path_params['templateId'] = params['template_id']
5675
5676        query_params = {}
5677        if 'resend_envelope' in params:
5678            query_params['resend_envelope'] = params['resend_envelope']
5679
5680        header_params = {}
5681
5682        form_params = []
5683        local_var_files = {}
5684
5685        body_params = None
5686        if 'template_recipients' in params:
5687            body_params = params['template_recipients']
5688        # HTTP header `Accept`
5689        header_params['Accept'] = self.api_client.\
5690            select_header_accept(['application/json'])
5691
5692        # Authentication setting
5693        auth_settings = []
5694
5695        return self.api_client.call_api(resource_path, 'PUT',
5696                                        path_params,
5697                                        query_params,
5698                                        header_params,
5699                                        body=body_params,
5700                                        post_params=form_params,
5701                                        files=local_var_files,
5702                                        response_type='RecipientsUpdateSummary',
5703                                        auth_settings=auth_settings,
5704                                        callback=params.get('callback'),
5705                                        _return_http_data_only=params.get('_return_http_data_only'),
5706                                        _preload_content=params.get('_preload_content', True),
5707                                        _request_timeout=params.get('_request_timeout'),
5708                                        collection_formats=collection_formats)

Updates recipients in a template. Updates recipients in a template. You can edit the following properties: email, userName, routingOrder, faxNumber, deliveryMethod, accessCode, and requireIdLookup. 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_recipients_with_http_info(account_id, template_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 template_id: The ID of the template being accessed. (required)
  • str resend_envelope:
  • TemplateRecipients template_recipients:
Returns

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

def update_tabs(self, account_id, recipient_id, template_id, **kwargs)
5710    def update_tabs(self, account_id, recipient_id, template_id, **kwargs):
5711        """
5712        Updates the tabs for a recipient.
5713        Updates one or more tabs for a recipient in a template.
5714        This method makes a synchronous HTTP request by default. To make an
5715        asynchronous HTTP request, please define a `callback` function
5716        to be invoked when receiving the response.
5717        >>> def callback_function(response):
5718        >>>     pprint(response)
5719        >>>
5720        >>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function)
5721
5722        :param callback function: The callback function
5723            for asynchronous request. (optional)
5724        :param str account_id: The external account number (int) or account ID Guid. (required)
5725        :param str recipient_id: The ID of the recipient being accessed. (required)
5726        :param str template_id: The ID of the template being accessed. (required)
5727        :param TemplateTabs template_tabs:
5728        :return: Tabs
5729                 If the method is called asynchronously,
5730                 returns the request thread.
5731        """
5732        kwargs['_return_http_data_only'] = True
5733        if kwargs.get('callback'):
5734            return self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5735        else:
5736            (data) = self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5737            return data

Updates the tabs for a recipient. Updates one or more tabs for a recipient in a template. 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_tabs(account_id, recipient_id, template_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 recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

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

def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs)
5739    def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
5740        """
5741        Updates the tabs for a recipient.
5742        Updates one or more tabs for a recipient in a template.
5743        This method makes a synchronous HTTP request by default. To make an
5744        asynchronous HTTP request, please define a `callback` function
5745        to be invoked when receiving the response.
5746        >>> def callback_function(response):
5747        >>>     pprint(response)
5748        >>>
5749        >>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
5750
5751        :param callback function: The callback function
5752            for asynchronous request. (optional)
5753        :param str account_id: The external account number (int) or account ID Guid. (required)
5754        :param str recipient_id: The ID of the recipient being accessed. (required)
5755        :param str template_id: The ID of the template being accessed. (required)
5756        :param TemplateTabs template_tabs:
5757        :return: Tabs
5758                 If the method is called asynchronously,
5759                 returns the request thread.
5760        """
5761
5762        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
5763        all_params.append('callback')
5764        all_params.append('_return_http_data_only')
5765        all_params.append('_preload_content')
5766        all_params.append('_request_timeout')
5767
5768        params = locals()
5769        for key, val in iteritems(params['kwargs']):
5770            if key not in all_params:
5771                raise TypeError(
5772                    "Got an unexpected keyword argument '%s'"
5773                    " to method update_tabs" % key
5774                )
5775            params[key] = val
5776        del params['kwargs']
5777        # verify the required parameter 'account_id' is set
5778        if ('account_id' not in params) or (params['account_id'] is None):
5779            raise ValueError("Missing the required parameter `account_id` when calling `update_tabs`")
5780        # verify the required parameter 'recipient_id' is set
5781        if ('recipient_id' not in params) or (params['recipient_id'] is None):
5782            raise ValueError("Missing the required parameter `recipient_id` when calling `update_tabs`")
5783        # verify the required parameter 'template_id' is set
5784        if ('template_id' not in params) or (params['template_id'] is None):
5785            raise ValueError("Missing the required parameter `template_id` when calling `update_tabs`")
5786
5787
5788        collection_formats = {}
5789
5790        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
5791        path_params = {}
5792        if 'account_id' in params:
5793            path_params['accountId'] = params['account_id']
5794        if 'recipient_id' in params:
5795            path_params['recipientId'] = params['recipient_id']
5796        if 'template_id' in params:
5797            path_params['templateId'] = params['template_id']
5798
5799        query_params = {}
5800
5801        header_params = {}
5802
5803        form_params = []
5804        local_var_files = {}
5805
5806        body_params = None
5807        if 'template_tabs' in params:
5808            body_params = params['template_tabs']
5809        # HTTP header `Accept`
5810        header_params['Accept'] = self.api_client.\
5811            select_header_accept(['application/json'])
5812
5813        # Authentication setting
5814        auth_settings = []
5815
5816        return self.api_client.call_api(resource_path, 'PUT',
5817                                        path_params,
5818                                        query_params,
5819                                        header_params,
5820                                        body=body_params,
5821                                        post_params=form_params,
5822                                        files=local_var_files,
5823                                        response_type='Tabs',
5824                                        auth_settings=auth_settings,
5825                                        callback=params.get('callback'),
5826                                        _return_http_data_only=params.get('_return_http_data_only'),
5827                                        _preload_content=params.get('_preload_content', True),
5828                                        _request_timeout=params.get('_request_timeout'),
5829                                        collection_formats=collection_formats)

Updates the tabs for a recipient. Updates one or more tabs for a recipient in a template. 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_tabs_with_http_info(account_id, recipient_id, template_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 recipient_id: The ID of the recipient being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

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

def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs)
5831    def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
5832        """
5833        Updates the tabs for a template
5834        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
5835        This method makes a synchronous HTTP request by default. To make an
5836        asynchronous HTTP request, please define a `callback` function
5837        to be invoked when receiving the response.
5838        >>> def callback_function(response):
5839        >>>     pprint(response)
5840        >>>
5841        >>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
5842
5843        :param callback function: The callback function
5844            for asynchronous request. (optional)
5845        :param str account_id: The external account number (int) or account ID Guid. (required)
5846        :param str document_id: The ID of the document being accessed. (required)
5847        :param str template_id: The ID of the template being accessed. (required)
5848        :param TemplateTabs template_tabs:
5849        :return: Tabs
5850                 If the method is called asynchronously,
5851                 returns the request thread.
5852        """
5853        kwargs['_return_http_data_only'] = True
5854        if kwargs.get('callback'):
5855            return self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
5856        else:
5857            (data) = self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
5858            return data

Updates the tabs for a template Updates tabs in the document specified by documentId in the template specified by templateId. 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_template_document_tabs(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

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

def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs)
5860    def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
5861        """
5862        Updates the tabs for a template
5863        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
5864        This method makes a synchronous HTTP request by default. To make an
5865        asynchronous HTTP request, please define a `callback` function
5866        to be invoked when receiving the response.
5867        >>> def callback_function(response):
5868        >>>     pprint(response)
5869        >>>
5870        >>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
5871
5872        :param callback function: The callback function
5873            for asynchronous request. (optional)
5874        :param str account_id: The external account number (int) or account ID Guid. (required)
5875        :param str document_id: The ID of the document being accessed. (required)
5876        :param str template_id: The ID of the template being accessed. (required)
5877        :param TemplateTabs template_tabs:
5878        :return: Tabs
5879                 If the method is called asynchronously,
5880                 returns the request thread.
5881        """
5882
5883        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
5884        all_params.append('callback')
5885        all_params.append('_return_http_data_only')
5886        all_params.append('_preload_content')
5887        all_params.append('_request_timeout')
5888
5889        params = locals()
5890        for key, val in iteritems(params['kwargs']):
5891            if key not in all_params:
5892                raise TypeError(
5893                    "Got an unexpected keyword argument '%s'"
5894                    " to method update_template_document_tabs" % key
5895                )
5896            params[key] = val
5897        del params['kwargs']
5898        # verify the required parameter 'account_id' is set
5899        if ('account_id' not in params) or (params['account_id'] is None):
5900            raise ValueError("Missing the required parameter `account_id` when calling `update_template_document_tabs`")
5901        # verify the required parameter 'document_id' is set
5902        if ('document_id' not in params) or (params['document_id'] is None):
5903            raise ValueError("Missing the required parameter `document_id` when calling `update_template_document_tabs`")
5904        # verify the required parameter 'template_id' is set
5905        if ('template_id' not in params) or (params['template_id'] is None):
5906            raise ValueError("Missing the required parameter `template_id` when calling `update_template_document_tabs`")
5907
5908
5909        collection_formats = {}
5910
5911        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
5912        path_params = {}
5913        if 'account_id' in params:
5914            path_params['accountId'] = params['account_id']
5915        if 'document_id' in params:
5916            path_params['documentId'] = params['document_id']
5917        if 'template_id' in params:
5918            path_params['templateId'] = params['template_id']
5919
5920        query_params = {}
5921
5922        header_params = {}
5923
5924        form_params = []
5925        local_var_files = {}
5926
5927        body_params = None
5928        if 'template_tabs' in params:
5929            body_params = params['template_tabs']
5930        # HTTP header `Accept`
5931        header_params['Accept'] = self.api_client.\
5932            select_header_accept(['application/json'])
5933
5934        # Authentication setting
5935        auth_settings = []
5936
5937        return self.api_client.call_api(resource_path, 'PUT',
5938                                        path_params,
5939                                        query_params,
5940                                        header_params,
5941                                        body=body_params,
5942                                        post_params=form_params,
5943                                        files=local_var_files,
5944                                        response_type='Tabs',
5945                                        auth_settings=auth_settings,
5946                                        callback=params.get('callback'),
5947                                        _return_http_data_only=params.get('_return_http_data_only'),
5948                                        _preload_content=params.get('_preload_content', True),
5949                                        _request_timeout=params.get('_request_timeout'),
5950                                        collection_formats=collection_formats)

Updates the tabs for a template Updates tabs in the document specified by documentId in the template specified by templateId. 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_template_document_tabs_with_http_info(account_id, document_id, template_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 document_id: The ID of the document being accessed. (required)
  • str template_id: The ID of the template being accessed. (required)
  • TemplateTabs template_tabs:
Returns

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

def update_templates(self, account_id, **kwargs)
5952    def update_templates(self, account_id, **kwargs):
5953        """
5954        Update template autoMatch setting.
5955        This method makes a synchronous HTTP request by default. To make an
5956        asynchronous HTTP request, please define a `callback` function
5957        to be invoked when receiving the response.
5958        >>> def callback_function(response):
5959        >>>     pprint(response)
5960        >>>
5961        >>> thread = api.update_templates(account_id, callback=callback_function)
5962
5963        :param callback function: The callback function
5964            for asynchronous request. (optional)
5965        :param str account_id: The external account number (int) or account ID Guid. (required)
5966        :param TemplateAutoMatchList template_auto_match_list:
5967        :return: TemplateAutoMatchList
5968                 If the method is called asynchronously,
5969                 returns the request thread.
5970        """
5971        kwargs['_return_http_data_only'] = True
5972        if kwargs.get('callback'):
5973            return self.update_templates_with_http_info(account_id, **kwargs)
5974        else:
5975            (data) = self.update_templates_with_http_info(account_id, **kwargs)
5976            return data

Update template autoMatch setting. 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_templates(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)
  • TemplateAutoMatchList template_auto_match_list:
Returns

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

def update_templates_with_http_info(self, account_id, **kwargs)
5978    def update_templates_with_http_info(self, account_id, **kwargs):
5979        """
5980        Update template autoMatch setting.
5981        This method makes a synchronous HTTP request by default. To make an
5982        asynchronous HTTP request, please define a `callback` function
5983        to be invoked when receiving the response.
5984        >>> def callback_function(response):
5985        >>>     pprint(response)
5986        >>>
5987        >>> thread = api.update_templates_with_http_info(account_id, callback=callback_function)
5988
5989        :param callback function: The callback function
5990            for asynchronous request. (optional)
5991        :param str account_id: The external account number (int) or account ID Guid. (required)
5992        :param TemplateAutoMatchList template_auto_match_list:
5993        :return: TemplateAutoMatchList
5994                 If the method is called asynchronously,
5995                 returns the request thread.
5996        """
5997
5998        all_params = ['account_id', 'template_auto_match_list']
5999        all_params.append('callback')
6000        all_params.append('_return_http_data_only')
6001        all_params.append('_preload_content')
6002        all_params.append('_request_timeout')
6003
6004        params = locals()
6005        for key, val in iteritems(params['kwargs']):
6006            if key not in all_params:
6007                raise TypeError(
6008                    "Got an unexpected keyword argument '%s'"
6009                    " to method update_templates" % key
6010                )
6011            params[key] = val
6012        del params['kwargs']
6013        # verify the required parameter 'account_id' is set
6014        if ('account_id' not in params) or (params['account_id'] is None):
6015            raise ValueError("Missing the required parameter `account_id` when calling `update_templates`")
6016
6017
6018        collection_formats = {}
6019
6020        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
6021        path_params = {}
6022        if 'account_id' in params:
6023            path_params['accountId'] = params['account_id']
6024
6025        query_params = {}
6026
6027        header_params = {}
6028
6029        form_params = []
6030        local_var_files = {}
6031
6032        body_params = None
6033        if 'template_auto_match_list' in params:
6034            body_params = params['template_auto_match_list']
6035        # HTTP header `Accept`
6036        header_params['Accept'] = self.api_client.\
6037            select_header_accept(['application/json'])
6038
6039        # Authentication setting
6040        auth_settings = []
6041
6042        return self.api_client.call_api(resource_path, 'PUT',
6043                                        path_params,
6044                                        query_params,
6045                                        header_params,
6046                                        body=body_params,
6047                                        post_params=form_params,
6048                                        files=local_var_files,
6049                                        response_type='TemplateAutoMatchList',
6050                                        auth_settings=auth_settings,
6051                                        callback=params.get('callback'),
6052                                        _return_http_data_only=params.get('_return_http_data_only'),
6053                                        _preload_content=params.get('_preload_content', True),
6054                                        _request_timeout=params.get('_request_timeout'),
6055                                        collection_formats=collection_formats)

Update template autoMatch setting. 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_templates_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)
  • TemplateAutoMatchList template_auto_match_list:
Returns

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

def update_templates_auto_match(self, account_id, **kwargs)
6057    def update_templates_auto_match(self, account_id, **kwargs):
6058        """
6059        Update template autoMatch setting.
6060        This method makes a synchronous HTTP request by default. To make an
6061        asynchronous HTTP request, please define a `callback` function
6062        to be invoked when receiving the response.
6063        >>> def callback_function(response):
6064        >>>     pprint(response)
6065        >>>
6066        >>> thread = api.update_templates_auto_match(account_id, callback=callback_function)
6067
6068        :param callback function: The callback function
6069            for asynchronous request. (optional)
6070        :param str account_id: The external account number (int) or account ID Guid. (required)
6071        :param TemplateAutoMatchList template_auto_match_list:
6072        :return: TemplateAutoMatchList
6073                 If the method is called asynchronously,
6074                 returns the request thread.
6075        """
6076        kwargs['_return_http_data_only'] = True
6077        if kwargs.get('callback'):
6078            return self.update_templates_auto_match_with_http_info(account_id, **kwargs)
6079        else:
6080            (data) = self.update_templates_auto_match_with_http_info(account_id, **kwargs)
6081            return data

Update template autoMatch setting. 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_templates_auto_match(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)
  • TemplateAutoMatchList template_auto_match_list:
Returns

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

def update_templates_auto_match_with_http_info(self, account_id, **kwargs)
6083    def update_templates_auto_match_with_http_info(self, account_id, **kwargs):
6084        """
6085        Update template autoMatch setting.
6086        This method makes a synchronous HTTP request by default. To make an
6087        asynchronous HTTP request, please define a `callback` function
6088        to be invoked when receiving the response.
6089        >>> def callback_function(response):
6090        >>>     pprint(response)
6091        >>>
6092        >>> thread = api.update_templates_auto_match_with_http_info(account_id, callback=callback_function)
6093
6094        :param callback function: The callback function
6095            for asynchronous request. (optional)
6096        :param str account_id: The external account number (int) or account ID Guid. (required)
6097        :param TemplateAutoMatchList template_auto_match_list:
6098        :return: TemplateAutoMatchList
6099                 If the method is called asynchronously,
6100                 returns the request thread.
6101        """
6102
6103        all_params = ['account_id', 'template_auto_match_list']
6104        all_params.append('callback')
6105        all_params.append('_return_http_data_only')
6106        all_params.append('_preload_content')
6107        all_params.append('_request_timeout')
6108
6109        params = locals()
6110        for key, val in iteritems(params['kwargs']):
6111            if key not in all_params:
6112                raise TypeError(
6113                    "Got an unexpected keyword argument '%s'"
6114                    " to method update_templates_auto_match" % key
6115                )
6116            params[key] = val
6117        del params['kwargs']
6118        # verify the required parameter 'account_id' is set
6119        if ('account_id' not in params) or (params['account_id'] is None):
6120            raise ValueError("Missing the required parameter `account_id` when calling `update_templates_auto_match`")
6121
6122
6123        collection_formats = {}
6124
6125        resource_path = '/v2.1/accounts/{accountId}/templates/auto_match'.replace('{format}', 'json')
6126        path_params = {}
6127        if 'account_id' in params:
6128            path_params['accountId'] = params['account_id']
6129
6130        query_params = {}
6131
6132        header_params = {}
6133
6134        form_params = []
6135        local_var_files = {}
6136
6137        body_params = None
6138        if 'template_auto_match_list' in params:
6139            body_params = params['template_auto_match_list']
6140        # HTTP header `Accept`
6141        header_params['Accept'] = self.api_client.\
6142            select_header_accept(['application/json'])
6143
6144        # Authentication setting
6145        auth_settings = []
6146
6147        return self.api_client.call_api(resource_path, 'PUT',
6148                                        path_params,
6149                                        query_params,
6150                                        header_params,
6151                                        body=body_params,
6152                                        post_params=form_params,
6153                                        files=local_var_files,
6154                                        response_type='TemplateAutoMatchList',
6155                                        auth_settings=auth_settings,
6156                                        callback=params.get('callback'),
6157                                        _return_http_data_only=params.get('_return_http_data_only'),
6158                                        _preload_content=params.get('_preload_content', True),
6159                                        _request_timeout=params.get('_request_timeout'),
6160                                        collection_formats=collection_formats)

Update template autoMatch setting. 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_templates_auto_match_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)
  • TemplateAutoMatchList template_auto_match_list:
Returns

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