docusign_esign.apis.templates_api

DocuSign REST API

The DocuSign 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 REST API
   5
   6    The DocuSign 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 ReturnUrlRequest return_url_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 ReturnUrlRequest return_url_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', 'return_url_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 'return_url_request' in params:
 369            body_params = params['return_url_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 show_changes:
2644        :return: file
2645                 If the method is called asynchronously,
2646                 returns the request thread.
2647        """
2648        kwargs['_return_http_data_only'] = True
2649        if kwargs.get('callback'):
2650            return self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2651        else:
2652            (data) = self.get_document_with_http_info(account_id, document_id, template_id, **kwargs)
2653            return data
2654
2655    def get_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
2656        """
2657        Gets PDF documents from a template.
2658        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.
2659        This method makes a synchronous HTTP request by default. To make an
2660        asynchronous HTTP request, please define a `callback` function
2661        to be invoked when receiving the response.
2662        >>> def callback_function(response):
2663        >>>     pprint(response)
2664        >>>
2665        >>> thread = api.get_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
2666
2667        :param callback function: The callback function
2668            for asynchronous request. (optional)
2669        :param str account_id: The external account number (int) or account ID Guid. (required)
2670        :param str document_id: The ID of the document being accessed. (required)
2671        :param str template_id: The ID of the template being accessed. (required)
2672        :param str encrypt:
2673        :param str show_changes:
2674        :return: file
2675                 If the method is called asynchronously,
2676                 returns the request thread.
2677        """
2678
2679        all_params = ['account_id', 'document_id', 'template_id', 'encrypt', 'show_changes']
2680        all_params.append('callback')
2681        all_params.append('_return_http_data_only')
2682        all_params.append('_preload_content')
2683        all_params.append('_request_timeout')
2684
2685        params = locals()
2686        for key, val in iteritems(params['kwargs']):
2687            if key not in all_params:
2688                raise TypeError(
2689                    "Got an unexpected keyword argument '%s'"
2690                    " to method get_document" % key
2691                )
2692            params[key] = val
2693        del params['kwargs']
2694        # verify the required parameter 'account_id' is set
2695        if ('account_id' not in params) or (params['account_id'] is None):
2696            raise ValueError("Missing the required parameter `account_id` when calling `get_document`")
2697        # verify the required parameter 'document_id' is set
2698        if ('document_id' not in params) or (params['document_id'] is None):
2699            raise ValueError("Missing the required parameter `document_id` when calling `get_document`")
2700        # verify the required parameter 'template_id' is set
2701        if ('template_id' not in params) or (params['template_id'] is None):
2702            raise ValueError("Missing the required parameter `template_id` when calling `get_document`")
2703
2704
2705        collection_formats = {}
2706
2707        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
2708        path_params = {}
2709        if 'account_id' in params:
2710            path_params['accountId'] = params['account_id']
2711        if 'document_id' in params:
2712            path_params['documentId'] = params['document_id']
2713        if 'template_id' in params:
2714            path_params['templateId'] = params['template_id']
2715
2716        query_params = {}
2717        if 'encrypt' in params:
2718            query_params['encrypt'] = params['encrypt']
2719        if 'show_changes' in params:
2720            query_params['show_changes'] = params['show_changes']
2721
2722        header_params = {}
2723
2724        form_params = []
2725        local_var_files = {}
2726
2727        body_params = None
2728        # HTTP header `Accept`
2729        header_params['Accept'] = self.api_client.\
2730            select_header_accept(['application/pdf'])
2731
2732        # Authentication setting
2733        auth_settings = []
2734
2735        return self.api_client.call_api(resource_path, 'GET',
2736                                        path_params,
2737                                        query_params,
2738                                        header_params,
2739                                        body=body_params,
2740                                        post_params=form_params,
2741                                        files=local_var_files,
2742                                        response_type='file',
2743                                        auth_settings=auth_settings,
2744                                        callback=params.get('callback'),
2745                                        _return_http_data_only=params.get('_return_http_data_only'),
2746                                        _preload_content=params.get('_preload_content', True),
2747                                        _request_timeout=params.get('_request_timeout'),
2748                                        collection_formats=collection_formats)
2749
2750    def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs):
2751        """
2752        Gets a page image from a template for display.
2753        Retrieves a page image for display from the specified template.
2754        This method makes a synchronous HTTP request by default. To make an
2755        asynchronous HTTP request, please define a `callback` function
2756        to be invoked when receiving the response.
2757        >>> def callback_function(response):
2758        >>>     pprint(response)
2759        >>>
2760        >>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function)
2761
2762        :param callback function: The callback function
2763            for asynchronous request. (optional)
2764        :param str account_id: The external account number (int) or account ID Guid. (required)
2765        :param str document_id: The ID of the document being accessed. (required)
2766        :param str page_number: The page number being accessed. (required)
2767        :param str template_id: The ID of the template being accessed. (required)
2768        :param str dpi:
2769        :param str max_height:
2770        :param str max_width:
2771        :param str show_changes:
2772        :return: file
2773                 If the method is called asynchronously,
2774                 returns the request thread.
2775        """
2776        kwargs['_return_http_data_only'] = True
2777        if kwargs.get('callback'):
2778            return self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2779        else:
2780            (data) = self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2781            return data
2782
2783    def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
2784        """
2785        Gets a page image from a template for display.
2786        Retrieves a page image for display from the specified template.
2787        This method makes a synchronous HTTP request by default. To make an
2788        asynchronous HTTP request, please define a `callback` function
2789        to be invoked when receiving the response.
2790        >>> def callback_function(response):
2791        >>>     pprint(response)
2792        >>>
2793        >>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
2794
2795        :param callback function: The callback function
2796            for asynchronous request. (optional)
2797        :param str account_id: The external account number (int) or account ID Guid. (required)
2798        :param str document_id: The ID of the document being accessed. (required)
2799        :param str page_number: The page number being accessed. (required)
2800        :param str template_id: The ID of the template being accessed. (required)
2801        :param str dpi:
2802        :param str max_height:
2803        :param str max_width:
2804        :param str show_changes:
2805        :return: file
2806                 If the method is called asynchronously,
2807                 returns the request thread.
2808        """
2809
2810        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'dpi', 'max_height', 'max_width', 'show_changes']
2811        all_params.append('callback')
2812        all_params.append('_return_http_data_only')
2813        all_params.append('_preload_content')
2814        all_params.append('_request_timeout')
2815
2816        params = locals()
2817        for key, val in iteritems(params['kwargs']):
2818            if key not in all_params:
2819                raise TypeError(
2820                    "Got an unexpected keyword argument '%s'"
2821                    " to method get_document_page_image" % key
2822                )
2823            params[key] = val
2824        del params['kwargs']
2825        # verify the required parameter 'account_id' is set
2826        if ('account_id' not in params) or (params['account_id'] is None):
2827            raise ValueError("Missing the required parameter `account_id` when calling `get_document_page_image`")
2828        # verify the required parameter 'document_id' is set
2829        if ('document_id' not in params) or (params['document_id'] is None):
2830            raise ValueError("Missing the required parameter `document_id` when calling `get_document_page_image`")
2831        # verify the required parameter 'page_number' is set
2832        if ('page_number' not in params) or (params['page_number'] is None):
2833            raise ValueError("Missing the required parameter `page_number` when calling `get_document_page_image`")
2834        # verify the required parameter 'template_id' is set
2835        if ('template_id' not in params) or (params['template_id'] is None):
2836            raise ValueError("Missing the required parameter `template_id` when calling `get_document_page_image`")
2837
2838
2839        collection_formats = {}
2840
2841        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
2842        path_params = {}
2843        if 'account_id' in params:
2844            path_params['accountId'] = params['account_id']
2845        if 'document_id' in params:
2846            path_params['documentId'] = params['document_id']
2847        if 'page_number' in params:
2848            path_params['pageNumber'] = params['page_number']
2849        if 'template_id' in params:
2850            path_params['templateId'] = params['template_id']
2851
2852        query_params = {}
2853        if 'dpi' in params:
2854            query_params['dpi'] = params['dpi']
2855        if 'max_height' in params:
2856            query_params['max_height'] = params['max_height']
2857        if 'max_width' in params:
2858            query_params['max_width'] = params['max_width']
2859        if 'show_changes' in params:
2860            query_params['show_changes'] = params['show_changes']
2861
2862        header_params = {}
2863
2864        form_params = []
2865        local_var_files = {}
2866
2867        body_params = None
2868        # HTTP header `Accept`
2869        header_params['Accept'] = self.api_client.\
2870            select_header_accept(['image/png'])
2871
2872        # Authentication setting
2873        auth_settings = []
2874
2875        return self.api_client.call_api(resource_path, 'GET',
2876                                        path_params,
2877                                        query_params,
2878                                        header_params,
2879                                        body=body_params,
2880                                        post_params=form_params,
2881                                        files=local_var_files,
2882                                        response_type='file',
2883                                        auth_settings=auth_settings,
2884                                        callback=params.get('callback'),
2885                                        _return_http_data_only=params.get('_return_http_data_only'),
2886                                        _preload_content=params.get('_preload_content', True),
2887                                        _request_timeout=params.get('_request_timeout'),
2888                                        collection_formats=collection_formats)
2889
2890    def get_document_tabs(self, account_id, document_id, template_id, **kwargs):
2891        """
2892        Returns tabs on the document.
2893        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
2894        This method makes a synchronous HTTP request by default. To make an
2895        asynchronous HTTP request, please define a `callback` function
2896        to be invoked when receiving the response.
2897        >>> def callback_function(response):
2898        >>>     pprint(response)
2899        >>>
2900        >>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function)
2901
2902        :param callback function: The callback function
2903            for asynchronous request. (optional)
2904        :param str account_id: The external account number (int) or account ID Guid. (required)
2905        :param str document_id: The ID of the document being accessed. (required)
2906        :param str template_id: The ID of the template being accessed. (required)
2907        :param str page_numbers:
2908        :return: Tabs
2909                 If the method is called asynchronously,
2910                 returns the request thread.
2911        """
2912        kwargs['_return_http_data_only'] = True
2913        if kwargs.get('callback'):
2914            return self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2915        else:
2916            (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2917            return data
2918
2919    def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
2920        """
2921        Returns tabs on the document.
2922        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
2923        This method makes a synchronous HTTP request by default. To make an
2924        asynchronous HTTP request, please define a `callback` function
2925        to be invoked when receiving the response.
2926        >>> def callback_function(response):
2927        >>>     pprint(response)
2928        >>>
2929        >>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
2930
2931        :param callback function: The callback function
2932            for asynchronous request. (optional)
2933        :param str account_id: The external account number (int) or account ID Guid. (required)
2934        :param str document_id: The ID of the document being accessed. (required)
2935        :param str template_id: The ID of the template being accessed. (required)
2936        :param str page_numbers:
2937        :return: Tabs
2938                 If the method is called asynchronously,
2939                 returns the request thread.
2940        """
2941
2942        all_params = ['account_id', 'document_id', 'template_id', 'page_numbers']
2943        all_params.append('callback')
2944        all_params.append('_return_http_data_only')
2945        all_params.append('_preload_content')
2946        all_params.append('_request_timeout')
2947
2948        params = locals()
2949        for key, val in iteritems(params['kwargs']):
2950            if key not in all_params:
2951                raise TypeError(
2952                    "Got an unexpected keyword argument '%s'"
2953                    " to method get_document_tabs" % key
2954                )
2955            params[key] = val
2956        del params['kwargs']
2957        # verify the required parameter 'account_id' is set
2958        if ('account_id' not in params) or (params['account_id'] is None):
2959            raise ValueError("Missing the required parameter `account_id` when calling `get_document_tabs`")
2960        # verify the required parameter 'document_id' is set
2961        if ('document_id' not in params) or (params['document_id'] is None):
2962            raise ValueError("Missing the required parameter `document_id` when calling `get_document_tabs`")
2963        # verify the required parameter 'template_id' is set
2964        if ('template_id' not in params) or (params['template_id'] is None):
2965            raise ValueError("Missing the required parameter `template_id` when calling `get_document_tabs`")
2966
2967
2968        collection_formats = {}
2969
2970        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
2971        path_params = {}
2972        if 'account_id' in params:
2973            path_params['accountId'] = params['account_id']
2974        if 'document_id' in params:
2975            path_params['documentId'] = params['document_id']
2976        if 'template_id' in params:
2977            path_params['templateId'] = params['template_id']
2978
2979        query_params = {}
2980        if 'page_numbers' in params:
2981            query_params['page_numbers'] = params['page_numbers']
2982
2983        header_params = {}
2984
2985        form_params = []
2986        local_var_files = {}
2987
2988        body_params = None
2989        # HTTP header `Accept`
2990        header_params['Accept'] = self.api_client.\
2991            select_header_accept(['application/json'])
2992
2993        # Authentication setting
2994        auth_settings = []
2995
2996        return self.api_client.call_api(resource_path, 'GET',
2997                                        path_params,
2998                                        query_params,
2999                                        header_params,
3000                                        body=body_params,
3001                                        post_params=form_params,
3002                                        files=local_var_files,
3003                                        response_type='Tabs',
3004                                        auth_settings=auth_settings,
3005                                        callback=params.get('callback'),
3006                                        _return_http_data_only=params.get('_return_http_data_only'),
3007                                        _preload_content=params.get('_preload_content', True),
3008                                        _request_timeout=params.get('_request_timeout'),
3009                                        collection_formats=collection_formats)
3010
3011    def get_lock(self, account_id, template_id, **kwargs):
3012        """
3013        Gets template lock information.
3014        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.
3015        This method makes a synchronous HTTP request by default. To make an
3016        asynchronous HTTP request, please define a `callback` function
3017        to be invoked when receiving the response.
3018        >>> def callback_function(response):
3019        >>>     pprint(response)
3020        >>>
3021        >>> thread = api.get_lock(account_id, template_id, callback=callback_function)
3022
3023        :param callback function: The callback function
3024            for asynchronous request. (optional)
3025        :param str account_id: The external account number (int) or account ID Guid. (required)
3026        :param str template_id: The ID of the template being accessed. (required)
3027        :return: LockInformation
3028                 If the method is called asynchronously,
3029                 returns the request thread.
3030        """
3031        kwargs['_return_http_data_only'] = True
3032        if kwargs.get('callback'):
3033            return self.get_lock_with_http_info(account_id, template_id, **kwargs)
3034        else:
3035            (data) = self.get_lock_with_http_info(account_id, template_id, **kwargs)
3036            return data
3037
3038    def get_lock_with_http_info(self, account_id, template_id, **kwargs):
3039        """
3040        Gets template lock information.
3041        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.
3042        This method makes a synchronous HTTP request by default. To make an
3043        asynchronous HTTP request, please define a `callback` function
3044        to be invoked when receiving the response.
3045        >>> def callback_function(response):
3046        >>>     pprint(response)
3047        >>>
3048        >>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function)
3049
3050        :param callback function: The callback function
3051            for asynchronous request. (optional)
3052        :param str account_id: The external account number (int) or account ID Guid. (required)
3053        :param str template_id: The ID of the template being accessed. (required)
3054        :return: LockInformation
3055                 If the method is called asynchronously,
3056                 returns the request thread.
3057        """
3058
3059        all_params = ['account_id', 'template_id']
3060        all_params.append('callback')
3061        all_params.append('_return_http_data_only')
3062        all_params.append('_preload_content')
3063        all_params.append('_request_timeout')
3064
3065        params = locals()
3066        for key, val in iteritems(params['kwargs']):
3067            if key not in all_params:
3068                raise TypeError(
3069                    "Got an unexpected keyword argument '%s'"
3070                    " to method get_lock" % key
3071                )
3072            params[key] = val
3073        del params['kwargs']
3074        # verify the required parameter 'account_id' is set
3075        if ('account_id' not in params) or (params['account_id'] is None):
3076            raise ValueError("Missing the required parameter `account_id` when calling `get_lock`")
3077        # verify the required parameter 'template_id' is set
3078        if ('template_id' not in params) or (params['template_id'] is None):
3079            raise ValueError("Missing the required parameter `template_id` when calling `get_lock`")
3080
3081
3082        collection_formats = {}
3083
3084        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
3085        path_params = {}
3086        if 'account_id' in params:
3087            path_params['accountId'] = params['account_id']
3088        if 'template_id' in params:
3089            path_params['templateId'] = params['template_id']
3090
3091        query_params = {}
3092
3093        header_params = {}
3094
3095        form_params = []
3096        local_var_files = {}
3097
3098        body_params = None
3099        # HTTP header `Accept`
3100        header_params['Accept'] = self.api_client.\
3101            select_header_accept(['application/json'])
3102
3103        # Authentication setting
3104        auth_settings = []
3105
3106        return self.api_client.call_api(resource_path, 'GET',
3107                                        path_params,
3108                                        query_params,
3109                                        header_params,
3110                                        body=body_params,
3111                                        post_params=form_params,
3112                                        files=local_var_files,
3113                                        response_type='LockInformation',
3114                                        auth_settings=auth_settings,
3115                                        callback=params.get('callback'),
3116                                        _return_http_data_only=params.get('_return_http_data_only'),
3117                                        _preload_content=params.get('_preload_content', True),
3118                                        _request_timeout=params.get('_request_timeout'),
3119                                        collection_formats=collection_formats)
3120
3121    def get_notification_settings(self, account_id, template_id, **kwargs):
3122        """
3123        Gets template notification information.
3124        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3125        This method makes a synchronous HTTP request by default. To make an
3126        asynchronous HTTP request, please define a `callback` function
3127        to be invoked when receiving the response.
3128        >>> def callback_function(response):
3129        >>>     pprint(response)
3130        >>>
3131        >>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function)
3132
3133        :param callback function: The callback function
3134            for asynchronous request. (optional)
3135        :param str account_id: The external account number (int) or account ID Guid. (required)
3136        :param str template_id: The ID of the template being accessed. (required)
3137        :return: Notification
3138                 If the method is called asynchronously,
3139                 returns the request thread.
3140        """
3141        kwargs['_return_http_data_only'] = True
3142        if kwargs.get('callback'):
3143            return self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3144        else:
3145            (data) = self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3146            return data
3147
3148    def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
3149        """
3150        Gets template notification information.
3151        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3152        This method makes a synchronous HTTP request by default. To make an
3153        asynchronous HTTP request, please define a `callback` function
3154        to be invoked when receiving the response.
3155        >>> def callback_function(response):
3156        >>>     pprint(response)
3157        >>>
3158        >>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
3159
3160        :param callback function: The callback function
3161            for asynchronous request. (optional)
3162        :param str account_id: The external account number (int) or account ID Guid. (required)
3163        :param str template_id: The ID of the template being accessed. (required)
3164        :return: Notification
3165                 If the method is called asynchronously,
3166                 returns the request thread.
3167        """
3168
3169        all_params = ['account_id', 'template_id']
3170        all_params.append('callback')
3171        all_params.append('_return_http_data_only')
3172        all_params.append('_preload_content')
3173        all_params.append('_request_timeout')
3174
3175        params = locals()
3176        for key, val in iteritems(params['kwargs']):
3177            if key not in all_params:
3178                raise TypeError(
3179                    "Got an unexpected keyword argument '%s'"
3180                    " to method get_notification_settings" % key
3181                )
3182            params[key] = val
3183        del params['kwargs']
3184        # verify the required parameter 'account_id' is set
3185        if ('account_id' not in params) or (params['account_id'] is None):
3186            raise ValueError("Missing the required parameter `account_id` when calling `get_notification_settings`")
3187        # verify the required parameter 'template_id' is set
3188        if ('template_id' not in params) or (params['template_id'] is None):
3189            raise ValueError("Missing the required parameter `template_id` when calling `get_notification_settings`")
3190
3191
3192        collection_formats = {}
3193
3194        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
3195        path_params = {}
3196        if 'account_id' in params:
3197            path_params['accountId'] = params['account_id']
3198        if 'template_id' in params:
3199            path_params['templateId'] = params['template_id']
3200
3201        query_params = {}
3202
3203        header_params = {}
3204
3205        form_params = []
3206        local_var_files = {}
3207
3208        body_params = None
3209        # HTTP header `Accept`
3210        header_params['Accept'] = self.api_client.\
3211            select_header_accept(['application/json'])
3212
3213        # Authentication setting
3214        auth_settings = []
3215
3216        return self.api_client.call_api(resource_path, 'GET',
3217                                        path_params,
3218                                        query_params,
3219                                        header_params,
3220                                        body=body_params,
3221                                        post_params=form_params,
3222                                        files=local_var_files,
3223                                        response_type='Notification',
3224                                        auth_settings=auth_settings,
3225                                        callback=params.get('callback'),
3226                                        _return_http_data_only=params.get('_return_http_data_only'),
3227                                        _preload_content=params.get('_preload_content', True),
3228                                        _request_timeout=params.get('_request_timeout'),
3229                                        collection_formats=collection_formats)
3230
3231    def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs):
3232        """
3233        Returns tabs on the specified page.
3234        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3235        This method makes a synchronous HTTP request by default. To make an
3236        asynchronous HTTP request, please define a `callback` function
3237        to be invoked when receiving the response.
3238        >>> def callback_function(response):
3239        >>>     pprint(response)
3240        >>>
3241        >>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function)
3242
3243        :param callback function: The callback function
3244            for asynchronous request. (optional)
3245        :param str account_id: The external account number (int) or account ID Guid. (required)
3246        :param str document_id: The ID of the document being accessed. (required)
3247        :param str page_number: The page number being accessed. (required)
3248        :param str template_id: The ID of the template being accessed. (required)
3249        :return: Tabs
3250                 If the method is called asynchronously,
3251                 returns the request thread.
3252        """
3253        kwargs['_return_http_data_only'] = True
3254        if kwargs.get('callback'):
3255            return self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3256        else:
3257            (data) = self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3258            return data
3259
3260    def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
3261        """
3262        Returns tabs on the specified page.
3263        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3264        This method makes a synchronous HTTP request by default. To make an
3265        asynchronous HTTP request, please define a `callback` function
3266        to be invoked when receiving the response.
3267        >>> def callback_function(response):
3268        >>>     pprint(response)
3269        >>>
3270        >>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
3271
3272        :param callback function: The callback function
3273            for asynchronous request. (optional)
3274        :param str account_id: The external account number (int) or account ID Guid. (required)
3275        :param str document_id: The ID of the document being accessed. (required)
3276        :param str page_number: The page number being accessed. (required)
3277        :param str template_id: The ID of the template being accessed. (required)
3278        :return: Tabs
3279                 If the method is called asynchronously,
3280                 returns the request thread.
3281        """
3282
3283        all_params = ['account_id', 'document_id', 'page_number', 'template_id']
3284        all_params.append('callback')
3285        all_params.append('_return_http_data_only')
3286        all_params.append('_preload_content')
3287        all_params.append('_request_timeout')
3288
3289        params = locals()
3290        for key, val in iteritems(params['kwargs']):
3291            if key not in all_params:
3292                raise TypeError(
3293                    "Got an unexpected keyword argument '%s'"
3294                    " to method get_page_tabs" % key
3295                )
3296            params[key] = val
3297        del params['kwargs']
3298        # verify the required parameter 'account_id' is set
3299        if ('account_id' not in params) or (params['account_id'] is None):
3300            raise ValueError("Missing the required parameter `account_id` when calling `get_page_tabs`")
3301        # verify the required parameter 'document_id' is set
3302        if ('document_id' not in params) or (params['document_id'] is None):
3303            raise ValueError("Missing the required parameter `document_id` when calling `get_page_tabs`")
3304        # verify the required parameter 'page_number' is set
3305        if ('page_number' not in params) or (params['page_number'] is None):
3306            raise ValueError("Missing the required parameter `page_number` when calling `get_page_tabs`")
3307        # verify the required parameter 'template_id' is set
3308        if ('template_id' not in params) or (params['template_id'] is None):
3309            raise ValueError("Missing the required parameter `template_id` when calling `get_page_tabs`")
3310
3311
3312        collection_formats = {}
3313
3314        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs'.replace('{format}', 'json')
3315        path_params = {}
3316        if 'account_id' in params:
3317            path_params['accountId'] = params['account_id']
3318        if 'document_id' in params:
3319            path_params['documentId'] = params['document_id']
3320        if 'page_number' in params:
3321            path_params['pageNumber'] = params['page_number']
3322        if 'template_id' in params:
3323            path_params['templateId'] = params['template_id']
3324
3325        query_params = {}
3326
3327        header_params = {}
3328
3329        form_params = []
3330        local_var_files = {}
3331
3332        body_params = None
3333        # HTTP header `Accept`
3334        header_params['Accept'] = self.api_client.\
3335            select_header_accept(['application/json'])
3336
3337        # Authentication setting
3338        auth_settings = []
3339
3340        return self.api_client.call_api(resource_path, 'GET',
3341                                        path_params,
3342                                        query_params,
3343                                        header_params,
3344                                        body=body_params,
3345                                        post_params=form_params,
3346                                        files=local_var_files,
3347                                        response_type='Tabs',
3348                                        auth_settings=auth_settings,
3349                                        callback=params.get('callback'),
3350                                        _return_http_data_only=params.get('_return_http_data_only'),
3351                                        _preload_content=params.get('_preload_content', True),
3352                                        _request_timeout=params.get('_request_timeout'),
3353                                        collection_formats=collection_formats)
3354
3355    def get_pages(self, account_id, document_id, template_id, **kwargs):
3356        """
3357        Returns document page image(s) based on input.
3358        Returns images of the pages in a template document for display based on the parameters that you specify.
3359        This method makes a synchronous HTTP request by default. To make an
3360        asynchronous HTTP request, please define a `callback` function
3361        to be invoked when receiving the response.
3362        >>> def callback_function(response):
3363        >>>     pprint(response)
3364        >>>
3365        >>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function)
3366
3367        :param callback function: The callback function
3368            for asynchronous request. (optional)
3369        :param str account_id: The external account number (int) or account ID Guid. (required)
3370        :param str document_id: The ID of the document being accessed. (required)
3371        :param str template_id: The ID of the template being accessed. (required)
3372        :param str count:
3373        :param str dpi:
3374        :param str max_height:
3375        :param str max_width:
3376        :param str nocache:
3377        :param str show_changes:
3378        :param str start_position:
3379        :return: PageImages
3380                 If the method is called asynchronously,
3381                 returns the request thread.
3382        """
3383        kwargs['_return_http_data_only'] = True
3384        if kwargs.get('callback'):
3385            return self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3386        else:
3387            (data) = self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3388            return data
3389
3390    def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs):
3391        """
3392        Returns document page image(s) based on input.
3393        Returns images of the pages in a template document for display based on the parameters that you specify.
3394        This method makes a synchronous HTTP request by default. To make an
3395        asynchronous HTTP request, please define a `callback` function
3396        to be invoked when receiving the response.
3397        >>> def callback_function(response):
3398        >>>     pprint(response)
3399        >>>
3400        >>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function)
3401
3402        :param callback function: The callback function
3403            for asynchronous request. (optional)
3404        :param str account_id: The external account number (int) or account ID Guid. (required)
3405        :param str document_id: The ID of the document being accessed. (required)
3406        :param str template_id: The ID of the template being accessed. (required)
3407        :param str count:
3408        :param str dpi:
3409        :param str max_height:
3410        :param str max_width:
3411        :param str nocache:
3412        :param str show_changes:
3413        :param str start_position:
3414        :return: PageImages
3415                 If the method is called asynchronously,
3416                 returns the request thread.
3417        """
3418
3419        all_params = ['account_id', 'document_id', 'template_id', 'count', 'dpi', 'max_height', 'max_width', 'nocache', 'show_changes', 'start_position']
3420        all_params.append('callback')
3421        all_params.append('_return_http_data_only')
3422        all_params.append('_preload_content')
3423        all_params.append('_request_timeout')
3424
3425        params = locals()
3426        for key, val in iteritems(params['kwargs']):
3427            if key not in all_params:
3428                raise TypeError(
3429                    "Got an unexpected keyword argument '%s'"
3430                    " to method get_pages" % key
3431                )
3432            params[key] = val
3433        del params['kwargs']
3434        # verify the required parameter 'account_id' is set
3435        if ('account_id' not in params) or (params['account_id'] is None):
3436            raise ValueError("Missing the required parameter `account_id` when calling `get_pages`")
3437        # verify the required parameter 'document_id' is set
3438        if ('document_id' not in params) or (params['document_id'] is None):
3439            raise ValueError("Missing the required parameter `document_id` when calling `get_pages`")
3440        # verify the required parameter 'template_id' is set
3441        if ('template_id' not in params) or (params['template_id'] is None):
3442            raise ValueError("Missing the required parameter `template_id` when calling `get_pages`")
3443
3444
3445        collection_formats = {}
3446
3447        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages'.replace('{format}', 'json')
3448        path_params = {}
3449        if 'account_id' in params:
3450            path_params['accountId'] = params['account_id']
3451        if 'document_id' in params:
3452            path_params['documentId'] = params['document_id']
3453        if 'template_id' in params:
3454            path_params['templateId'] = params['template_id']
3455
3456        query_params = {}
3457        if 'count' in params:
3458            query_params['count'] = params['count']
3459        if 'dpi' in params:
3460            query_params['dpi'] = params['dpi']
3461        if 'max_height' in params:
3462            query_params['max_height'] = params['max_height']
3463        if 'max_width' in params:
3464            query_params['max_width'] = params['max_width']
3465        if 'nocache' in params:
3466            query_params['nocache'] = params['nocache']
3467        if 'show_changes' in params:
3468            query_params['show_changes'] = params['show_changes']
3469        if 'start_position' in params:
3470            query_params['start_position'] = params['start_position']
3471
3472        header_params = {}
3473
3474        form_params = []
3475        local_var_files = {}
3476
3477        body_params = None
3478        # HTTP header `Accept`
3479        header_params['Accept'] = self.api_client.\
3480            select_header_accept(['application/json'])
3481
3482        # Authentication setting
3483        auth_settings = []
3484
3485        return self.api_client.call_api(resource_path, 'GET',
3486                                        path_params,
3487                                        query_params,
3488                                        header_params,
3489                                        body=body_params,
3490                                        post_params=form_params,
3491                                        files=local_var_files,
3492                                        response_type='PageImages',
3493                                        auth_settings=auth_settings,
3494                                        callback=params.get('callback'),
3495                                        _return_http_data_only=params.get('_return_http_data_only'),
3496                                        _preload_content=params.get('_preload_content', True),
3497                                        _request_timeout=params.get('_request_timeout'),
3498                                        collection_formats=collection_formats)
3499
3500    def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs):
3501        """
3502        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3503        
3504        This method makes a synchronous HTTP request by default. To make an
3505        asynchronous HTTP request, please define a `callback` function
3506        to be invoked when receiving the response.
3507        >>> def callback_function(response):
3508        >>>     pprint(response)
3509        >>>
3510        >>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function)
3511
3512        :param callback function: The callback function
3513            for asynchronous request. (optional)
3514        :param str account_id: The external account number (int) or account ID Guid. (required)
3515        :param str document_id: The ID of the document being accessed. (required)
3516        :param str template_id: The ID of the template being accessed. (required)
3517        :return: DocumentHtmlDefinitionOriginals
3518                 If the method is called asynchronously,
3519                 returns the request thread.
3520        """
3521        kwargs['_return_http_data_only'] = True
3522        if kwargs.get('callback'):
3523            return self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3524        else:
3525            (data) = self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3526            return data
3527
3528    def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs):
3529        """
3530        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3531        
3532        This method makes a synchronous HTTP request by default. To make an
3533        asynchronous HTTP request, please define a `callback` function
3534        to be invoked when receiving the response.
3535        >>> def callback_function(response):
3536        >>>     pprint(response)
3537        >>>
3538        >>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function)
3539
3540        :param callback function: The callback function
3541            for asynchronous request. (optional)
3542        :param str account_id: The external account number (int) or account ID Guid. (required)
3543        :param str document_id: The ID of the document being accessed. (required)
3544        :param str template_id: The ID of the template being accessed. (required)
3545        :return: DocumentHtmlDefinitionOriginals
3546                 If the method is called asynchronously,
3547                 returns the request thread.
3548        """
3549
3550        all_params = ['account_id', 'document_id', 'template_id']
3551        all_params.append('callback')
3552        all_params.append('_return_http_data_only')
3553        all_params.append('_preload_content')
3554        all_params.append('_request_timeout')
3555
3556        params = locals()
3557        for key, val in iteritems(params['kwargs']):
3558            if key not in all_params:
3559                raise TypeError(
3560                    "Got an unexpected keyword argument '%s'"
3561                    " to method get_template_document_html_definitions" % key
3562                )
3563            params[key] = val
3564        del params['kwargs']
3565        # verify the required parameter 'account_id' is set
3566        if ('account_id' not in params) or (params['account_id'] is None):
3567            raise ValueError("Missing the required parameter `account_id` when calling `get_template_document_html_definitions`")
3568        # verify the required parameter 'document_id' is set
3569        if ('document_id' not in params) or (params['document_id'] is None):
3570            raise ValueError("Missing the required parameter `document_id` when calling `get_template_document_html_definitions`")
3571        # verify the required parameter 'template_id' is set
3572        if ('template_id' not in params) or (params['template_id'] is None):
3573            raise ValueError("Missing the required parameter `template_id` when calling `get_template_document_html_definitions`")
3574
3575
3576        collection_formats = {}
3577
3578        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions'.replace('{format}', 'json')
3579        path_params = {}
3580        if 'account_id' in params:
3581            path_params['accountId'] = params['account_id']
3582        if 'document_id' in params:
3583            path_params['documentId'] = params['document_id']
3584        if 'template_id' in params:
3585            path_params['templateId'] = params['template_id']
3586
3587        query_params = {}
3588
3589        header_params = {}
3590
3591        form_params = []
3592        local_var_files = {}
3593
3594        body_params = None
3595        # HTTP header `Accept`
3596        header_params['Accept'] = self.api_client.\
3597            select_header_accept(['application/json'])
3598
3599        # Authentication setting
3600        auth_settings = []
3601
3602        return self.api_client.call_api(resource_path, 'GET',
3603                                        path_params,
3604                                        query_params,
3605                                        header_params,
3606                                        body=body_params,
3607                                        post_params=form_params,
3608                                        files=local_var_files,
3609                                        response_type='DocumentHtmlDefinitionOriginals',
3610                                        auth_settings=auth_settings,
3611                                        callback=params.get('callback'),
3612                                        _return_http_data_only=params.get('_return_http_data_only'),
3613                                        _preload_content=params.get('_preload_content', True),
3614                                        _request_timeout=params.get('_request_timeout'),
3615                                        collection_formats=collection_formats)
3616
3617    def get_template_html_definitions(self, account_id, template_id, **kwargs):
3618        """
3619        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3620        
3621        This method makes a synchronous HTTP request by default. To make an
3622        asynchronous HTTP request, please define a `callback` function
3623        to be invoked when receiving the response.
3624        >>> def callback_function(response):
3625        >>>     pprint(response)
3626        >>>
3627        >>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function)
3628
3629        :param callback function: The callback function
3630            for asynchronous request. (optional)
3631        :param str account_id: The external account number (int) or account ID Guid. (required)
3632        :param str template_id: The ID of the template being accessed. (required)
3633        :return: DocumentHtmlDefinitionOriginals
3634                 If the method is called asynchronously,
3635                 returns the request thread.
3636        """
3637        kwargs['_return_http_data_only'] = True
3638        if kwargs.get('callback'):
3639            return self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3640        else:
3641            (data) = self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3642            return data
3643
3644    def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs):
3645        """
3646        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3647        
3648        This method makes a synchronous HTTP request by default. To make an
3649        asynchronous HTTP request, please define a `callback` function
3650        to be invoked when receiving the response.
3651        >>> def callback_function(response):
3652        >>>     pprint(response)
3653        >>>
3654        >>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function)
3655
3656        :param callback function: The callback function
3657            for asynchronous request. (optional)
3658        :param str account_id: The external account number (int) or account ID Guid. (required)
3659        :param str template_id: The ID of the template being accessed. (required)
3660        :return: DocumentHtmlDefinitionOriginals
3661                 If the method is called asynchronously,
3662                 returns the request thread.
3663        """
3664
3665        all_params = ['account_id', 'template_id']
3666        all_params.append('callback')
3667        all_params.append('_return_http_data_only')
3668        all_params.append('_preload_content')
3669        all_params.append('_request_timeout')
3670
3671        params = locals()
3672        for key, val in iteritems(params['kwargs']):
3673            if key not in all_params:
3674                raise TypeError(
3675                    "Got an unexpected keyword argument '%s'"
3676                    " to method get_template_html_definitions" % key
3677                )
3678            params[key] = val
3679        del params['kwargs']
3680        # verify the required parameter 'account_id' is set
3681        if ('account_id' not in params) or (params['account_id'] is None):
3682            raise ValueError("Missing the required parameter `account_id` when calling `get_template_html_definitions`")
3683        # verify the required parameter 'template_id' is set
3684        if ('template_id' not in params) or (params['template_id'] is None):
3685            raise ValueError("Missing the required parameter `template_id` when calling `get_template_html_definitions`")
3686
3687
3688        collection_formats = {}
3689
3690        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions'.replace('{format}', 'json')
3691        path_params = {}
3692        if 'account_id' in params:
3693            path_params['accountId'] = params['account_id']
3694        if 'template_id' in params:
3695            path_params['templateId'] = params['template_id']
3696
3697        query_params = {}
3698
3699        header_params = {}
3700
3701        form_params = []
3702        local_var_files = {}
3703
3704        body_params = None
3705        # HTTP header `Accept`
3706        header_params['Accept'] = self.api_client.\
3707            select_header_accept(['application/json'])
3708
3709        # Authentication setting
3710        auth_settings = []
3711
3712        return self.api_client.call_api(resource_path, 'GET',
3713                                        path_params,
3714                                        query_params,
3715                                        header_params,
3716                                        body=body_params,
3717                                        post_params=form_params,
3718                                        files=local_var_files,
3719                                        response_type='DocumentHtmlDefinitionOriginals',
3720                                        auth_settings=auth_settings,
3721                                        callback=params.get('callback'),
3722                                        _return_http_data_only=params.get('_return_http_data_only'),
3723                                        _preload_content=params.get('_preload_content', True),
3724                                        _request_timeout=params.get('_request_timeout'),
3725                                        collection_formats=collection_formats)
3726
3727    def list_custom_fields(self, account_id, template_id, **kwargs):
3728        """
3729        Gets the custom document fields from a template.
3730        Retrieves the custom document field information from an existing template.
3731        This method makes a synchronous HTTP request by default. To make an
3732        asynchronous HTTP request, please define a `callback` function
3733        to be invoked when receiving the response.
3734        >>> def callback_function(response):
3735        >>>     pprint(response)
3736        >>>
3737        >>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function)
3738
3739        :param callback function: The callback function
3740            for asynchronous request. (optional)
3741        :param str account_id: The external account number (int) or account ID Guid. (required)
3742        :param str template_id: The ID of the template being accessed. (required)
3743        :return: CustomFields
3744                 If the method is called asynchronously,
3745                 returns the request thread.
3746        """
3747        kwargs['_return_http_data_only'] = True
3748        if kwargs.get('callback'):
3749            return self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3750        else:
3751            (data) = self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3752            return data
3753
3754    def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
3755        """
3756        Gets the custom document fields from a template.
3757        Retrieves the custom document field information from an existing template.
3758        This method makes a synchronous HTTP request by default. To make an
3759        asynchronous HTTP request, please define a `callback` function
3760        to be invoked when receiving the response.
3761        >>> def callback_function(response):
3762        >>>     pprint(response)
3763        >>>
3764        >>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
3765
3766        :param callback function: The callback function
3767            for asynchronous request. (optional)
3768        :param str account_id: The external account number (int) or account ID Guid. (required)
3769        :param str template_id: The ID of the template being accessed. (required)
3770        :return: CustomFields
3771                 If the method is called asynchronously,
3772                 returns the request thread.
3773        """
3774
3775        all_params = ['account_id', 'template_id']
3776        all_params.append('callback')
3777        all_params.append('_return_http_data_only')
3778        all_params.append('_preload_content')
3779        all_params.append('_request_timeout')
3780
3781        params = locals()
3782        for key, val in iteritems(params['kwargs']):
3783            if key not in all_params:
3784                raise TypeError(
3785                    "Got an unexpected keyword argument '%s'"
3786                    " to method list_custom_fields" % key
3787                )
3788            params[key] = val
3789        del params['kwargs']
3790        # verify the required parameter 'account_id' is set
3791        if ('account_id' not in params) or (params['account_id'] is None):
3792            raise ValueError("Missing the required parameter `account_id` when calling `list_custom_fields`")
3793        # verify the required parameter 'template_id' is set
3794        if ('template_id' not in params) or (params['template_id'] is None):
3795            raise ValueError("Missing the required parameter `template_id` when calling `list_custom_fields`")
3796
3797
3798        collection_formats = {}
3799
3800        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
3801        path_params = {}
3802        if 'account_id' in params:
3803            path_params['accountId'] = params['account_id']
3804        if 'template_id' in params:
3805            path_params['templateId'] = params['template_id']
3806
3807        query_params = {}
3808
3809        header_params = {}
3810
3811        form_params = []
3812        local_var_files = {}
3813
3814        body_params = None
3815        # HTTP header `Accept`
3816        header_params['Accept'] = self.api_client.\
3817            select_header_accept(['application/json'])
3818
3819        # Authentication setting
3820        auth_settings = []
3821
3822        return self.api_client.call_api(resource_path, 'GET',
3823                                        path_params,
3824                                        query_params,
3825                                        header_params,
3826                                        body=body_params,
3827                                        post_params=form_params,
3828                                        files=local_var_files,
3829                                        response_type='CustomFields',
3830                                        auth_settings=auth_settings,
3831                                        callback=params.get('callback'),
3832                                        _return_http_data_only=params.get('_return_http_data_only'),
3833                                        _preload_content=params.get('_preload_content', True),
3834                                        _request_timeout=params.get('_request_timeout'),
3835                                        collection_formats=collection_formats)
3836
3837    def list_document_fields(self, account_id, document_id, template_id, **kwargs):
3838        """
3839        Gets the custom document fields for a an existing template document.
3840        Retrieves the custom document fields for an existing template document.
3841        This method makes a synchronous HTTP request by default. To make an
3842        asynchronous HTTP request, please define a `callback` function
3843        to be invoked when receiving the response.
3844        >>> def callback_function(response):
3845        >>>     pprint(response)
3846        >>>
3847        >>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function)
3848
3849        :param callback function: The callback function
3850            for asynchronous request. (optional)
3851        :param str account_id: The external account number (int) or account ID Guid. (required)
3852        :param str document_id: The ID of the document being accessed. (required)
3853        :param str template_id: The ID of the template being accessed. (required)
3854        :return: DocumentFieldsInformation
3855                 If the method is called asynchronously,
3856                 returns the request thread.
3857        """
3858        kwargs['_return_http_data_only'] = True
3859        if kwargs.get('callback'):
3860            return self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
3861        else:
3862            (data) = self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
3863            return data
3864
3865    def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
3866        """
3867        Gets the custom document fields for a an existing template document.
3868        Retrieves the custom document fields for an existing template document.
3869        This method makes a synchronous HTTP request by default. To make an
3870        asynchronous HTTP request, please define a `callback` function
3871        to be invoked when receiving the response.
3872        >>> def callback_function(response):
3873        >>>     pprint(response)
3874        >>>
3875        >>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
3876
3877        :param callback function: The callback function
3878            for asynchronous request. (optional)
3879        :param str account_id: The external account number (int) or account ID Guid. (required)
3880        :param str document_id: The ID of the document being accessed. (required)
3881        :param str template_id: The ID of the template being accessed. (required)
3882        :return: DocumentFieldsInformation
3883                 If the method is called asynchronously,
3884                 returns the request thread.
3885        """
3886
3887        all_params = ['account_id', 'document_id', 'template_id']
3888        all_params.append('callback')
3889        all_params.append('_return_http_data_only')
3890        all_params.append('_preload_content')
3891        all_params.append('_request_timeout')
3892
3893        params = locals()
3894        for key, val in iteritems(params['kwargs']):
3895            if key not in all_params:
3896                raise TypeError(
3897                    "Got an unexpected keyword argument '%s'"
3898                    " to method list_document_fields" % key
3899                )
3900            params[key] = val
3901        del params['kwargs']
3902        # verify the required parameter 'account_id' is set
3903        if ('account_id' not in params) or (params['account_id'] is None):
3904            raise ValueError("Missing the required parameter `account_id` when calling `list_document_fields`")
3905        # verify the required parameter 'document_id' is set
3906        if ('document_id' not in params) or (params['document_id'] is None):
3907            raise ValueError("Missing the required parameter `document_id` when calling `list_document_fields`")
3908        # verify the required parameter 'template_id' is set
3909        if ('template_id' not in params) or (params['template_id'] is None):
3910            raise ValueError("Missing the required parameter `template_id` when calling `list_document_fields`")
3911
3912
3913        collection_formats = {}
3914
3915        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
3916        path_params = {}
3917        if 'account_id' in params:
3918            path_params['accountId'] = params['account_id']
3919        if 'document_id' in params:
3920            path_params['documentId'] = params['document_id']
3921        if 'template_id' in params:
3922            path_params['templateId'] = params['template_id']
3923
3924        query_params = {}
3925
3926        header_params = {}
3927
3928        form_params = []
3929        local_var_files = {}
3930
3931        body_params = None
3932        # HTTP header `Accept`
3933        header_params['Accept'] = self.api_client.\
3934            select_header_accept(['application/json'])
3935
3936        # Authentication setting
3937        auth_settings = []
3938
3939        return self.api_client.call_api(resource_path, 'GET',
3940                                        path_params,
3941                                        query_params,
3942                                        header_params,
3943                                        body=body_params,
3944                                        post_params=form_params,
3945                                        files=local_var_files,
3946                                        response_type='DocumentFieldsInformation',
3947                                        auth_settings=auth_settings,
3948                                        callback=params.get('callback'),
3949                                        _return_http_data_only=params.get('_return_http_data_only'),
3950                                        _preload_content=params.get('_preload_content', True),
3951                                        _request_timeout=params.get('_request_timeout'),
3952                                        collection_formats=collection_formats)
3953
3954    def list_documents(self, account_id, template_id, **kwargs):
3955        """
3956        Gets a list of documents associated with a template.
3957        Retrieves a list of documents associated with the specified template.
3958        This method makes a synchronous HTTP request by default. To make an
3959        asynchronous HTTP request, please define a `callback` function
3960        to be invoked when receiving the response.
3961        >>> def callback_function(response):
3962        >>>     pprint(response)
3963        >>>
3964        >>> thread = api.list_documents(account_id, template_id, callback=callback_function)
3965
3966        :param callback function: The callback function
3967            for asynchronous request. (optional)
3968        :param str account_id: The external account number (int) or account ID Guid. (required)
3969        :param str template_id: The ID of the template being accessed. (required)
3970        :param str include_tabs:
3971        :return: TemplateDocumentsResult
3972                 If the method is called asynchronously,
3973                 returns the request thread.
3974        """
3975        kwargs['_return_http_data_only'] = True
3976        if kwargs.get('callback'):
3977            return self.list_documents_with_http_info(account_id, template_id, **kwargs)
3978        else:
3979            (data) = self.list_documents_with_http_info(account_id, template_id, **kwargs)
3980            return data
3981
3982    def list_documents_with_http_info(self, account_id, template_id, **kwargs):
3983        """
3984        Gets a list of documents associated with a template.
3985        Retrieves a list of documents associated with the specified template.
3986        This method makes a synchronous HTTP request by default. To make an
3987        asynchronous HTTP request, please define a `callback` function
3988        to be invoked when receiving the response.
3989        >>> def callback_function(response):
3990        >>>     pprint(response)
3991        >>>
3992        >>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function)
3993
3994        :param callback function: The callback function
3995            for asynchronous request. (optional)
3996        :param str account_id: The external account number (int) or account ID Guid. (required)
3997        :param str template_id: The ID of the template being accessed. (required)
3998        :param str include_tabs:
3999        :return: TemplateDocumentsResult
4000                 If the method is called asynchronously,
4001                 returns the request thread.
4002        """
4003
4004        all_params = ['account_id', 'template_id', 'include_tabs']
4005        all_params.append('callback')
4006        all_params.append('_return_http_data_only')
4007        all_params.append('_preload_content')
4008        all_params.append('_request_timeout')
4009
4010        params = locals()
4011        for key, val in iteritems(params['kwargs']):
4012            if key not in all_params:
4013                raise TypeError(
4014                    "Got an unexpected keyword argument '%s'"
4015                    " to method list_documents" % key
4016                )
4017            params[key] = val
4018        del params['kwargs']
4019        # verify the required parameter 'account_id' is set
4020        if ('account_id' not in params) or (params['account_id'] is None):
4021            raise ValueError("Missing the required parameter `account_id` when calling `list_documents`")
4022        # verify the required parameter 'template_id' is set
4023        if ('template_id' not in params) or (params['template_id'] is None):
4024            raise ValueError("Missing the required parameter `template_id` when calling `list_documents`")
4025
4026
4027        collection_formats = {}
4028
4029        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
4030        path_params = {}
4031        if 'account_id' in params:
4032            path_params['accountId'] = params['account_id']
4033        if 'template_id' in params:
4034            path_params['templateId'] = params['template_id']
4035
4036        query_params = {}
4037        if 'include_tabs' in params:
4038            query_params['include_tabs'] = params['include_tabs']
4039
4040        header_params = {}
4041
4042        form_params = []
4043        local_var_files = {}
4044
4045        body_params = None
4046        # HTTP header `Accept`
4047        header_params['Accept'] = self.api_client.\
4048            select_header_accept(['application/json'])
4049
4050        # Authentication setting
4051        auth_settings = []
4052
4053        return self.api_client.call_api(resource_path, 'GET',
4054                                        path_params,
4055                                        query_params,
4056                                        header_params,
4057                                        body=body_params,
4058                                        post_params=form_params,
4059                                        files=local_var_files,
4060                                        response_type='TemplateDocumentsResult',
4061                                        auth_settings=auth_settings,
4062                                        callback=params.get('callback'),
4063                                        _return_http_data_only=params.get('_return_http_data_only'),
4064                                        _preload_content=params.get('_preload_content', True),
4065                                        _request_timeout=params.get('_request_timeout'),
4066                                        collection_formats=collection_formats)
4067
4068    def list_recipients(self, account_id, template_id, **kwargs):
4069        """
4070        Gets recipient information from a template.
4071        Retrieves the information for all recipients in the specified template.
4072        This method makes a synchronous HTTP request by default. To make an
4073        asynchronous HTTP request, please define a `callback` function
4074        to be invoked when receiving the response.
4075        >>> def callback_function(response):
4076        >>>     pprint(response)
4077        >>>
4078        >>> thread = api.list_recipients(account_id, template_id, callback=callback_function)
4079
4080        :param callback function: The callback function
4081            for asynchronous request. (optional)
4082        :param str account_id: The external account number (int) or account ID Guid. (required)
4083        :param str template_id: The ID of the template being accessed. (required)
4084        :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. 
4085        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4086        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4087        :return: Recipients
4088                 If the method is called asynchronously,
4089                 returns the request thread.
4090        """
4091        kwargs['_return_http_data_only'] = True
4092        if kwargs.get('callback'):
4093            return self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4094        else:
4095            (data) = self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4096            return data
4097
4098    def list_recipients_with_http_info(self, account_id, template_id, **kwargs):
4099        """
4100        Gets recipient information from a template.
4101        Retrieves the information for all recipients in the specified template.
4102        This method makes a synchronous HTTP request by default. To make an
4103        asynchronous HTTP request, please define a `callback` function
4104        to be invoked when receiving the response.
4105        >>> def callback_function(response):
4106        >>>     pprint(response)
4107        >>>
4108        >>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function)
4109
4110        :param callback function: The callback function
4111            for asynchronous request. (optional)
4112        :param str account_id: The external account number (int) or account ID Guid. (required)
4113        :param str template_id: The ID of the template being accessed. (required)
4114        :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. 
4115        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4116        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4117        :return: Recipients
4118                 If the method is called asynchronously,
4119                 returns the request thread.
4120        """
4121
4122        all_params = ['account_id', 'template_id', 'include_anchor_tab_locations', 'include_extended', 'include_tabs']
4123        all_params.append('callback')
4124        all_params.append('_return_http_data_only')
4125        all_params.append('_preload_content')
4126        all_params.append('_request_timeout')
4127
4128        params = locals()
4129        for key, val in iteritems(params['kwargs']):
4130            if key not in all_params:
4131                raise TypeError(
4132                    "Got an unexpected keyword argument '%s'"
4133                    " to method list_recipients" % key
4134                )
4135            params[key] = val
4136        del params['kwargs']
4137        # verify the required parameter 'account_id' is set
4138        if ('account_id' not in params) or (params['account_id'] is None):
4139            raise ValueError("Missing the required parameter `account_id` when calling `list_recipients`")
4140        # verify the required parameter 'template_id' is set
4141        if ('template_id' not in params) or (params['template_id'] is None):
4142            raise ValueError("Missing the required parameter `template_id` when calling `list_recipients`")
4143
4144
4145        collection_formats = {}
4146
4147        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
4148        path_params = {}
4149        if 'account_id' in params:
4150            path_params['accountId'] = params['account_id']
4151        if 'template_id' in params:
4152            path_params['templateId'] = params['template_id']
4153
4154        query_params = {}
4155        if 'include_anchor_tab_locations' in params:
4156            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4157        if 'include_extended' in params:
4158            query_params['include_extended'] = params['include_extended']
4159        if 'include_tabs' in params:
4160            query_params['include_tabs'] = params['include_tabs']
4161
4162        header_params = {}
4163
4164        form_params = []
4165        local_var_files = {}
4166
4167        body_params = None
4168        # HTTP header `Accept`
4169        header_params['Accept'] = self.api_client.\
4170            select_header_accept(['application/json'])
4171
4172        # Authentication setting
4173        auth_settings = []
4174
4175        return self.api_client.call_api(resource_path, 'GET',
4176                                        path_params,
4177                                        query_params,
4178                                        header_params,
4179                                        body=body_params,
4180                                        post_params=form_params,
4181                                        files=local_var_files,
4182                                        response_type='Recipients',
4183                                        auth_settings=auth_settings,
4184                                        callback=params.get('callback'),
4185                                        _return_http_data_only=params.get('_return_http_data_only'),
4186                                        _preload_content=params.get('_preload_content', True),
4187                                        _request_timeout=params.get('_request_timeout'),
4188                                        collection_formats=collection_formats)
4189
4190    def list_tabs(self, account_id, recipient_id, template_id, **kwargs):
4191        """
4192        Gets the tabs information for a signer or sign-in-person recipient in a template.
4193        Gets the tabs information for a signer or sign-in-person recipient in a template.
4194        This method makes a synchronous HTTP request by default. To make an
4195        asynchronous HTTP request, please define a `callback` function
4196        to be invoked when receiving the response.
4197        >>> def callback_function(response):
4198        >>>     pprint(response)
4199        >>>
4200        >>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function)
4201
4202        :param callback function: The callback function
4203            for asynchronous request. (optional)
4204        :param str account_id: The external account number (int) or account ID Guid. (required)
4205        :param str recipient_id: The ID of the recipient being accessed. (required)
4206        :param str template_id: The ID of the template being accessed. (required)
4207        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4208        :param str include_metadata:
4209        :return: Tabs
4210                 If the method is called asynchronously,
4211                 returns the request thread.
4212        """
4213        kwargs['_return_http_data_only'] = True
4214        if kwargs.get('callback'):
4215            return self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4216        else:
4217            (data) = self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4218            return data
4219
4220    def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
4221        """
4222        Gets the tabs information for a signer or sign-in-person recipient in a template.
4223        Gets the tabs information for a signer or sign-in-person recipient in a template.
4224        This method makes a synchronous HTTP request by default. To make an
4225        asynchronous HTTP request, please define a `callback` function
4226        to be invoked when receiving the response.
4227        >>> def callback_function(response):
4228        >>>     pprint(response)
4229        >>>
4230        >>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
4231
4232        :param callback function: The callback function
4233            for asynchronous request. (optional)
4234        :param str account_id: The external account number (int) or account ID Guid. (required)
4235        :param str recipient_id: The ID of the recipient being accessed. (required)
4236        :param str template_id: The ID of the template being accessed. (required)
4237        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4238        :param str include_metadata:
4239        :return: Tabs
4240                 If the method is called asynchronously,
4241                 returns the request thread.
4242        """
4243
4244        all_params = ['account_id', 'recipient_id', 'template_id', 'include_anchor_tab_locations', 'include_metadata']
4245        all_params.append('callback')
4246        all_params.append('_return_http_data_only')
4247        all_params.append('_preload_content')
4248        all_params.append('_request_timeout')
4249
4250        params = locals()
4251        for key, val in iteritems(params['kwargs']):
4252            if key not in all_params:
4253                raise TypeError(
4254                    "Got an unexpected keyword argument '%s'"
4255                    " to method list_tabs" % key
4256                )
4257            params[key] = val
4258        del params['kwargs']
4259        # verify the required parameter 'account_id' is set
4260        if ('account_id' not in params) or (params['account_id'] is None):
4261            raise ValueError("Missing the required parameter `account_id` when calling `list_tabs`")
4262        # verify the required parameter 'recipient_id' is set
4263        if ('recipient_id' not in params) or (params['recipient_id'] is None):
4264            raise ValueError("Missing the required parameter `recipient_id` when calling `list_tabs`")
4265        # verify the required parameter 'template_id' is set
4266        if ('template_id' not in params) or (params['template_id'] is None):
4267            raise ValueError("Missing the required parameter `template_id` when calling `list_tabs`")
4268
4269
4270        collection_formats = {}
4271
4272        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
4273        path_params = {}
4274        if 'account_id' in params:
4275            path_params['accountId'] = params['account_id']
4276        if 'recipient_id' in params:
4277            path_params['recipientId'] = params['recipient_id']
4278        if 'template_id' in params:
4279            path_params['templateId'] = params['template_id']
4280
4281        query_params = {}
4282        if 'include_anchor_tab_locations' in params:
4283            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4284        if 'include_metadata' in params:
4285            query_params['include_metadata'] = params['include_metadata']
4286
4287        header_params = {}
4288
4289        form_params = []
4290        local_var_files = {}
4291
4292        body_params = None
4293        # HTTP header `Accept`
4294        header_params['Accept'] = self.api_client.\
4295            select_header_accept(['application/json'])
4296
4297        # Authentication setting
4298        auth_settings = []
4299
4300        return self.api_client.call_api(resource_path, 'GET',
4301                                        path_params,
4302                                        query_params,
4303                                        header_params,
4304                                        body=body_params,
4305                                        post_params=form_params,
4306                                        files=local_var_files,
4307                                        response_type='Tabs',
4308                                        auth_settings=auth_settings,
4309                                        callback=params.get('callback'),
4310                                        _return_http_data_only=params.get('_return_http_data_only'),
4311                                        _preload_content=params.get('_preload_content', True),
4312                                        _request_timeout=params.get('_request_timeout'),
4313                                        collection_formats=collection_formats)
4314
4315    def list_templates(self, account_id, **kwargs):
4316        """
4317        Gets the definition of a template.
4318        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4319        This method makes a synchronous HTTP request by default. To make an
4320        asynchronous HTTP request, please define a `callback` function
4321        to be invoked when receiving the response.
4322        >>> def callback_function(response):
4323        >>>     pprint(response)
4324        >>>
4325        >>> thread = api.list_templates(account_id, callback=callback_function)
4326
4327        :param callback function: The callback function
4328            for asynchronous request. (optional)
4329        :param str account_id: The external account number (int) or account ID Guid. (required)
4330        :param str count: Number of records to return in the cache.
4331        :param str created_from_date:
4332        :param str created_to_date:
4333        :param str folder_ids: A comma separated list of folder ID GUIDs.
4334        :param str folder_types:
4335        :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.
4336        :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.
4337        :param str is_deleted_template_only:
4338        :param str is_download:
4339        :param str modified_from_date:
4340        :param str modified_to_date:
4341        :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)
4342        :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.
4343        :param str search_fields:
4344        :param str search_text: The search text used to search the names of templates.
4345        :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.
4346        :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).
4347        :param str template_ids:
4348        :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.
4349        :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.
4350        :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.
4351        :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.
4352        :param str user_id:
4353        :return: EnvelopeTemplateResults
4354                 If the method is called asynchronously,
4355                 returns the request thread.
4356        """
4357        kwargs['_return_http_data_only'] = True
4358        if kwargs.get('callback'):
4359            return self.list_templates_with_http_info(account_id, **kwargs)
4360        else:
4361            (data) = self.list_templates_with_http_info(account_id, **kwargs)
4362            return data
4363
4364    def list_templates_with_http_info(self, account_id, **kwargs):
4365        """
4366        Gets the definition of a template.
4367        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4368        This method makes a synchronous HTTP request by default. To make an
4369        asynchronous HTTP request, please define a `callback` function
4370        to be invoked when receiving the response.
4371        >>> def callback_function(response):
4372        >>>     pprint(response)
4373        >>>
4374        >>> thread = api.list_templates_with_http_info(account_id, callback=callback_function)
4375
4376        :param callback function: The callback function
4377            for asynchronous request. (optional)
4378        :param str account_id: The external account number (int) or account ID Guid. (required)
4379        :param str count: Number of records to return in the cache.
4380        :param str created_from_date:
4381        :param str created_to_date:
4382        :param str folder_ids: A comma separated list of folder ID GUIDs.
4383        :param str folder_types:
4384        :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.
4385        :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.
4386        :param str is_deleted_template_only:
4387        :param str is_download:
4388        :param str modified_from_date:
4389        :param str modified_to_date:
4390        :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)
4391        :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.
4392        :param str search_fields:
4393        :param str search_text: The search text used to search the names of templates.
4394        :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.
4395        :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).
4396        :param str template_ids:
4397        :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.
4398        :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.
4399        :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.
4400        :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.
4401        :param str user_id:
4402        :return: EnvelopeTemplateResults
4403                 If the method is called asynchronously,
4404                 returns the request thread.
4405        """
4406
4407        all_params = ['account_id', 'count', 'created_from_date', 'created_to_date', 'folder_ids', 'folder_types', 'from_date', 'include', 'is_deleted_template_only', 'is_download', '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']
4408        all_params.append('callback')
4409        all_params.append('_return_http_data_only')
4410        all_params.append('_preload_content')
4411        all_params.append('_request_timeout')
4412
4413        params = locals()
4414        for key, val in iteritems(params['kwargs']):
4415            if key not in all_params:
4416                raise TypeError(
4417                    "Got an unexpected keyword argument '%s'"
4418                    " to method list_templates" % key
4419                )
4420            params[key] = val
4421        del params['kwargs']
4422        # verify the required parameter 'account_id' is set
4423        if ('account_id' not in params) or (params['account_id'] is None):
4424            raise ValueError("Missing the required parameter `account_id` when calling `list_templates`")
4425
4426
4427        collection_formats = {}
4428
4429        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
4430        path_params = {}
4431        if 'account_id' in params:
4432            path_params['accountId'] = params['account_id']
4433
4434        query_params = {}
4435        if 'count' in params:
4436            query_params['count'] = params['count']
4437        if 'created_from_date' in params:
4438            query_params['created_from_date'] = params['created_from_date']
4439        if 'created_to_date' in params:
4440            query_params['created_to_date'] = params['created_to_date']
4441        if 'folder_ids' in params:
4442            query_params['folder_ids'] = params['folder_ids']
4443        if 'folder_types' in params:
4444            query_params['folder_types'] = params['folder_types']
4445        if 'from_date' in params:
4446            query_params['from_date'] = params['from_date']
4447        if 'include' in params:
4448            query_params['include'] = params['include']
4449        if 'is_deleted_template_only' in params:
4450            query_params['is_deleted_template_only'] = params['is_deleted_template_only']
4451        if 'is_download' in params:
4452            query_params['is_download'] = params['is_download']
4453        if 'modified_from_date' in params:
4454            query_params['modified_from_date'] = params['modified_from_date']
4455        if 'modified_to_date' in params:
4456            query_params['modified_to_date'] = params['modified_to_date']
4457        if 'order' in params:
4458            query_params['order'] = params['order']
4459        if 'order_by' in params:
4460            query_params['order_by'] = params['order_by']
4461        if 'search_fields' in params:
4462            query_params['search_fields'] = params['search_fields']
4463        if 'search_text' in params:
4464            query_params['search_text'] = params['search_text']
4465        if 'shared_by_me' in params:
4466            query_params['shared_by_me'] = params['shared_by_me']
4467        if 'start_position' in params:
4468            query_params['start_position'] = params['start_position']
4469        if 'template_ids' in params:
4470            query_params['template_ids'] = params['template_ids']
4471        if 'to_date' in params:
4472            query_params['to_date'] = params['to_date']
4473        if 'used_from_date' in params:
4474            query_params['used_from_date'] = params['used_from_date']
4475        if 'used_to_date' in params:
4476            query_params['used_to_date'] = params['used_to_date']
4477        if 'user_filter' in params:
4478            query_params['user_filter'] = params['user_filter']
4479        if 'user_id' in params:
4480            query_params['user_id'] = params['user_id']
4481
4482        header_params = {}
4483
4484        form_params = []
4485        local_var_files = {}
4486
4487        body_params = None
4488        # HTTP header `Accept`
4489        header_params['Accept'] = self.api_client.\
4490            select_header_accept(['application/json'])
4491
4492        # Authentication setting
4493        auth_settings = []
4494
4495        return self.api_client.call_api(resource_path, 'GET',
4496                                        path_params,
4497                                        query_params,
4498                                        header_params,
4499                                        body=body_params,
4500                                        post_params=form_params,
4501                                        files=local_var_files,
4502                                        response_type='EnvelopeTemplateResults',
4503                                        auth_settings=auth_settings,
4504                                        callback=params.get('callback'),
4505                                        _return_http_data_only=params.get('_return_http_data_only'),
4506                                        _preload_content=params.get('_preload_content', True),
4507                                        _request_timeout=params.get('_request_timeout'),
4508                                        collection_formats=collection_formats)
4509
4510    def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
4511        """
4512        Rotates page image from a template for display.
4513        Rotates page image from a template for display. The page image can be rotated to the left or right.
4514        This method makes a synchronous HTTP request by default. To make an
4515        asynchronous HTTP request, please define a `callback` function
4516        to be invoked when receiving the response.
4517        >>> def callback_function(response):
4518        >>>     pprint(response)
4519        >>>
4520        >>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
4521
4522        :param callback function: The callback function
4523            for asynchronous request. (optional)
4524        :param str account_id: The external account number (int) or account ID Guid. (required)
4525        :param str document_id: The ID of the document being accessed. (required)
4526        :param str page_number: The page number being accessed. (required)
4527        :param str template_id: The ID of the template being accessed. (required)
4528        :param PageRequest page_request:
4529        :return: None
4530                 If the method is called asynchronously,
4531                 returns the request thread.
4532        """
4533        kwargs['_return_http_data_only'] = True
4534        if kwargs.get('callback'):
4535            return self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4536        else:
4537            (data) = self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4538            return data
4539
4540    def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
4541        """
4542        Rotates page image from a template for display.
4543        Rotates page image from a template for display. The page image can be rotated to the left or right.
4544        This method makes a synchronous HTTP request by default. To make an
4545        asynchronous HTTP request, please define a `callback` function
4546        to be invoked when receiving the response.
4547        >>> def callback_function(response):
4548        >>>     pprint(response)
4549        >>>
4550        >>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
4551
4552        :param callback function: The callback function
4553            for asynchronous request. (optional)
4554        :param str account_id: The external account number (int) or account ID Guid. (required)
4555        :param str document_id: The ID of the document being accessed. (required)
4556        :param str page_number: The page number being accessed. (required)
4557        :param str template_id: The ID of the template being accessed. (required)
4558        :param PageRequest page_request:
4559        :return: None
4560                 If the method is called asynchronously,
4561                 returns the request thread.
4562        """
4563
4564        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
4565        all_params.append('callback')
4566        all_params.append('_return_http_data_only')
4567        all_params.append('_preload_content')
4568        all_params.append('_request_timeout')
4569
4570        params = locals()
4571        for key, val in iteritems(params['kwargs']):
4572            if key not in all_params:
4573                raise TypeError(
4574                    "Got an unexpected keyword argument '%s'"
4575                    " to method rotate_document_page" % key
4576                )
4577            params[key] = val
4578        del params['kwargs']
4579        # verify the required parameter 'account_id' is set
4580        if ('account_id' not in params) or (params['account_id'] is None):
4581            raise ValueError("Missing the required parameter `account_id` when calling `rotate_document_page`")
4582        # verify the required parameter 'document_id' is set
4583        if ('document_id' not in params) or (params['document_id'] is None):
4584            raise ValueError("Missing the required parameter `document_id` when calling `rotate_document_page`")
4585        # verify the required parameter 'page_number' is set
4586        if ('page_number' not in params) or (params['page_number'] is None):
4587            raise ValueError("Missing the required parameter `page_number` when calling `rotate_document_page`")
4588        # verify the required parameter 'template_id' is set
4589        if ('template_id' not in params) or (params['template_id'] is None):
4590            raise ValueError("Missing the required parameter `template_id` when calling `rotate_document_page`")
4591
4592
4593        collection_formats = {}
4594
4595        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
4596        path_params = {}
4597        if 'account_id' in params:
4598            path_params['accountId'] = params['account_id']
4599        if 'document_id' in params:
4600            path_params['documentId'] = params['document_id']
4601        if 'page_number' in params:
4602            path_params['pageNumber'] = params['page_number']
4603        if 'template_id' in params:
4604            path_params['templateId'] = params['template_id']
4605
4606        query_params = {}
4607
4608        header_params = {}
4609
4610        form_params = []
4611        local_var_files = {}
4612
4613        body_params = None
4614        if 'page_request' in params:
4615            body_params = params['page_request']
4616        # HTTP header `Accept`
4617        header_params['Accept'] = self.api_client.\
4618            select_header_accept(['application/json'])
4619
4620        # Authentication setting
4621        auth_settings = []
4622
4623        return self.api_client.call_api(resource_path, 'PUT',
4624                                        path_params,
4625                                        query_params,
4626                                        header_params,
4627                                        body=body_params,
4628                                        post_params=form_params,
4629                                        files=local_var_files,
4630                                        response_type=None,
4631                                        auth_settings=auth_settings,
4632                                        callback=params.get('callback'),
4633                                        _return_http_data_only=params.get('_return_http_data_only'),
4634                                        _preload_content=params.get('_preload_content', True),
4635                                        _request_timeout=params.get('_request_timeout'),
4636                                        collection_formats=collection_formats)
4637
4638    def update(self, account_id, template_id, **kwargs):
4639        """
4640        Updates an existing template.
4641        Updates an existing template.
4642        This method makes a synchronous HTTP request by default. To make an
4643        asynchronous HTTP request, please define a `callback` function
4644        to be invoked when receiving the response.
4645        >>> def callback_function(response):
4646        >>>     pprint(response)
4647        >>>
4648        >>> thread = api.update(account_id, template_id, callback=callback_function)
4649
4650        :param callback function: The callback function
4651            for asynchronous request. (optional)
4652        :param str account_id: The external account number (int) or account ID Guid. (required)
4653        :param str template_id: The ID of the template being accessed. (required)
4654        :param EnvelopeTemplate envelope_template:
4655        :return: TemplateUpdateSummary
4656                 If the method is called asynchronously,
4657                 returns the request thread.
4658        """
4659        kwargs['_return_http_data_only'] = True
4660        if kwargs.get('callback'):
4661            return self.update_with_http_info(account_id, template_id, **kwargs)
4662        else:
4663            (data) = self.update_with_http_info(account_id, template_id, **kwargs)
4664            return data
4665
4666    def update_with_http_info(self, account_id, template_id, **kwargs):
4667        """
4668        Updates an existing template.
4669        Updates an existing template.
4670        This method makes a synchronous HTTP request by default. To make an
4671        asynchronous HTTP request, please define a `callback` function
4672        to be invoked when receiving the response.
4673        >>> def callback_function(response):
4674        >>>     pprint(response)
4675        >>>
4676        >>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function)
4677
4678        :param callback function: The callback function
4679            for asynchronous request. (optional)
4680        :param str account_id: The external account number (int) or account ID Guid. (required)
4681        :param str template_id: The ID of the template being accessed. (required)
4682        :param EnvelopeTemplate envelope_template:
4683        :return: TemplateUpdateSummary
4684                 If the method is called asynchronously,
4685                 returns the request thread.
4686        """
4687
4688        all_params = ['account_id', 'template_id', 'envelope_template']
4689        all_params.append('callback')
4690        all_params.append('_return_http_data_only')
4691        all_params.append('_preload_content')
4692        all_params.append('_request_timeout')
4693
4694        params = locals()
4695        for key, val in iteritems(params['kwargs']):
4696            if key not in all_params:
4697                raise TypeError(
4698                    "Got an unexpected keyword argument '%s'"
4699                    " to method update" % key
4700                )
4701            params[key] = val
4702        del params['kwargs']
4703        # verify the required parameter 'account_id' is set
4704        if ('account_id' not in params) or (params['account_id'] is None):
4705            raise ValueError("Missing the required parameter `account_id` when calling `update`")
4706        # verify the required parameter 'template_id' is set
4707        if ('template_id' not in params) or (params['template_id'] is None):
4708            raise ValueError("Missing the required parameter `template_id` when calling `update`")
4709
4710
4711        collection_formats = {}
4712
4713        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
4714        path_params = {}
4715        if 'account_id' in params:
4716            path_params['accountId'] = params['account_id']
4717        if 'template_id' in params:
4718            path_params['templateId'] = params['template_id']
4719
4720        query_params = {}
4721
4722        header_params = {}
4723
4724        form_params = []
4725        local_var_files = {}
4726
4727        body_params = None
4728        if 'envelope_template' in params:
4729            body_params = params['envelope_template']
4730        # HTTP header `Accept`
4731        header_params['Accept'] = self.api_client.\
4732            select_header_accept(['application/json'])
4733
4734        # Authentication setting
4735        auth_settings = []
4736
4737        return self.api_client.call_api(resource_path, 'PUT',
4738                                        path_params,
4739                                        query_params,
4740                                        header_params,
4741                                        body=body_params,
4742                                        post_params=form_params,
4743                                        files=local_var_files,
4744                                        response_type='TemplateUpdateSummary',
4745                                        auth_settings=auth_settings,
4746                                        callback=params.get('callback'),
4747                                        _return_http_data_only=params.get('_return_http_data_only'),
4748                                        _preload_content=params.get('_preload_content', True),
4749                                        _request_timeout=params.get('_request_timeout'),
4750                                        collection_formats=collection_formats)
4751
4752    def update_custom_fields(self, account_id, template_id, **kwargs):
4753        """
4754        Updates envelope custom fields in a template.
4755        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4756        This method makes a synchronous HTTP request by default. To make an
4757        asynchronous HTTP request, please define a `callback` function
4758        to be invoked when receiving the response.
4759        >>> def callback_function(response):
4760        >>>     pprint(response)
4761        >>>
4762        >>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function)
4763
4764        :param callback function: The callback function
4765            for asynchronous request. (optional)
4766        :param str account_id: The external account number (int) or account ID Guid. (required)
4767        :param str template_id: The ID of the template being accessed. (required)
4768        :param TemplateCustomFields template_custom_fields:
4769        :return: CustomFields
4770                 If the method is called asynchronously,
4771                 returns the request thread.
4772        """
4773        kwargs['_return_http_data_only'] = True
4774        if kwargs.get('callback'):
4775            return self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
4776        else:
4777            (data) = self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
4778            return data
4779
4780    def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
4781        """
4782        Updates envelope custom fields in a template.
4783        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4784        This method makes a synchronous HTTP request by default. To make an
4785        asynchronous HTTP request, please define a `callback` function
4786        to be invoked when receiving the response.
4787        >>> def callback_function(response):
4788        >>>     pprint(response)
4789        >>>
4790        >>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
4791
4792        :param callback function: The callback function
4793            for asynchronous request. (optional)
4794        :param str account_id: The external account number (int) or account ID Guid. (required)
4795        :param str template_id: The ID of the template being accessed. (required)
4796        :param TemplateCustomFields template_custom_fields:
4797        :return: CustomFields
4798                 If the method is called asynchronously,
4799                 returns the request thread.
4800        """
4801
4802        all_params = ['account_id', 'template_id', 'template_custom_fields']
4803        all_params.append('callback')
4804        all_params.append('_return_http_data_only')
4805        all_params.append('_preload_content')
4806        all_params.append('_request_timeout')
4807
4808        params = locals()
4809        for key, val in iteritems(params['kwargs']):
4810            if key not in all_params:
4811                raise TypeError(
4812                    "Got an unexpected keyword argument '%s'"
4813                    " to method update_custom_fields" % key
4814                )
4815            params[key] = val
4816        del params['kwargs']
4817        # verify the required parameter 'account_id' is set
4818        if ('account_id' not in params) or (params['account_id'] is None):
4819            raise ValueError("Missing the required parameter `account_id` when calling `update_custom_fields`")
4820        # verify the required parameter 'template_id' is set
4821        if ('template_id' not in params) or (params['template_id'] is None):
4822            raise ValueError("Missing the required parameter `template_id` when calling `update_custom_fields`")
4823
4824
4825        collection_formats = {}
4826
4827        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
4828        path_params = {}
4829        if 'account_id' in params:
4830            path_params['accountId'] = params['account_id']
4831        if 'template_id' in params:
4832            path_params['templateId'] = params['template_id']
4833
4834        query_params = {}
4835
4836        header_params = {}
4837
4838        form_params = []
4839        local_var_files = {}
4840
4841        body_params = None
4842        if 'template_custom_fields' in params:
4843            body_params = params['template_custom_fields']
4844        # HTTP header `Accept`
4845        header_params['Accept'] = self.api_client.\
4846            select_header_accept(['application/json'])
4847
4848        # Authentication setting
4849        auth_settings = []
4850
4851        return self.api_client.call_api(resource_path, 'PUT',
4852                                        path_params,
4853                                        query_params,
4854                                        header_params,
4855                                        body=body_params,
4856                                        post_params=form_params,
4857                                        files=local_var_files,
4858                                        response_type='CustomFields',
4859                                        auth_settings=auth_settings,
4860                                        callback=params.get('callback'),
4861                                        _return_http_data_only=params.get('_return_http_data_only'),
4862                                        _preload_content=params.get('_preload_content', True),
4863                                        _request_timeout=params.get('_request_timeout'),
4864                                        collection_formats=collection_formats)
4865
4866    def update_document(self, account_id, document_id, template_id, **kwargs):
4867        """
4868        Adds a document to a template document.
4869        Adds the specified document to an existing template document.
4870        This method makes a synchronous HTTP request by default. To make an
4871        asynchronous HTTP request, please define a `callback` function
4872        to be invoked when receiving the response.
4873        >>> def callback_function(response):
4874        >>>     pprint(response)
4875        >>>
4876        >>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function)
4877
4878        :param callback function: The callback function
4879            for asynchronous request. (optional)
4880        :param str account_id: The external account number (int) or account ID Guid. (required)
4881        :param str document_id: The ID of the document being accessed. (required)
4882        :param str template_id: The ID of the template being accessed. (required)
4883        :param str is_envelope_definition:
4884        :param EnvelopeDefinition envelope_definition:
4885        :return: EnvelopeDocument
4886                 If the method is called asynchronously,
4887                 returns the request thread.
4888        """
4889        kwargs['_return_http_data_only'] = True
4890        if kwargs.get('callback'):
4891            return self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
4892        else:
4893            (data) = self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
4894            return data
4895
4896    def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
4897        """
4898        Adds a document to a template document.
4899        Adds the specified document to an existing template document.
4900        This method makes a synchronous HTTP request by default. To make an
4901        asynchronous HTTP request, please define a `callback` function
4902        to be invoked when receiving the response.
4903        >>> def callback_function(response):
4904        >>>     pprint(response)
4905        >>>
4906        >>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
4907
4908        :param callback function: The callback function
4909            for asynchronous request. (optional)
4910        :param str account_id: The external account number (int) or account ID Guid. (required)
4911        :param str document_id: The ID of the document being accessed. (required)
4912        :param str template_id: The ID of the template being accessed. (required)
4913        :param str is_envelope_definition:
4914        :param EnvelopeDefinition envelope_definition:
4915        :return: EnvelopeDocument
4916                 If the method is called asynchronously,
4917                 returns the request thread.
4918        """
4919
4920        all_params = ['account_id', 'document_id', 'template_id', 'is_envelope_definition', 'envelope_definition']
4921        all_params.append('callback')
4922        all_params.append('_return_http_data_only')
4923        all_params.append('_preload_content')
4924        all_params.append('_request_timeout')
4925
4926        params = locals()
4927        for key, val in iteritems(params['kwargs']):
4928            if key not in all_params:
4929                raise TypeError(
4930                    "Got an unexpected keyword argument '%s'"
4931                    " to method update_document" % key
4932                )
4933            params[key] = val
4934        del params['kwargs']
4935        # verify the required parameter 'account_id' is set
4936        if ('account_id' not in params) or (params['account_id'] is None):
4937            raise ValueError("Missing the required parameter `account_id` when calling `update_document`")
4938        # verify the required parameter 'document_id' is set
4939        if ('document_id' not in params) or (params['document_id'] is None):
4940            raise ValueError("Missing the required parameter `document_id` when calling `update_document`")
4941        # verify the required parameter 'template_id' is set
4942        if ('template_id' not in params) or (params['template_id'] is None):
4943            raise ValueError("Missing the required parameter `template_id` when calling `update_document`")
4944
4945
4946        collection_formats = {}
4947
4948        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
4949        path_params = {}
4950        if 'account_id' in params:
4951            path_params['accountId'] = params['account_id']
4952        if 'document_id' in params:
4953            path_params['documentId'] = params['document_id']
4954        if 'template_id' in params:
4955            path_params['templateId'] = params['template_id']
4956
4957        query_params = {}
4958        if 'is_envelope_definition' in params:
4959            query_params['is_envelope_definition'] = params['is_envelope_definition']
4960
4961        header_params = {}
4962
4963        form_params = []
4964        local_var_files = {}
4965
4966        body_params = None
4967        if 'envelope_definition' in params:
4968            body_params = params['envelope_definition']
4969        # HTTP header `Accept`
4970        header_params['Accept'] = self.api_client.\
4971            select_header_accept(['application/json'])
4972
4973        # Authentication setting
4974        auth_settings = []
4975
4976        return self.api_client.call_api(resource_path, 'PUT',
4977                                        path_params,
4978                                        query_params,
4979                                        header_params,
4980                                        body=body_params,
4981                                        post_params=form_params,
4982                                        files=local_var_files,
4983                                        response_type='EnvelopeDocument',
4984                                        auth_settings=auth_settings,
4985                                        callback=params.get('callback'),
4986                                        _return_http_data_only=params.get('_return_http_data_only'),
4987                                        _preload_content=params.get('_preload_content', True),
4988                                        _request_timeout=params.get('_request_timeout'),
4989                                        collection_formats=collection_formats)
4990
4991    def update_document_fields(self, account_id, document_id, template_id, **kwargs):
4992        """
4993        Updates existing custom document fields in an existing template document.
4994        Updates existing custom document fields in an existing template document.
4995        This method makes a synchronous HTTP request by default. To make an
4996        asynchronous HTTP request, please define a `callback` function
4997        to be invoked when receiving the response.
4998        >>> def callback_function(response):
4999        >>>     pprint(response)
5000        >>>
5001        >>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function)
5002
5003        :param callback function: The callback function
5004            for asynchronous request. (optional)
5005        :param str account_id: The external account number (int) or account ID Guid. (required)
5006        :param str document_id: The ID of the document being accessed. (required)
5007        :param str template_id: The ID of the template being accessed. (required)
5008        :param DocumentFieldsInformation document_fields_information:
5009        :return: DocumentFieldsInformation
5010                 If the method is called asynchronously,
5011                 returns the request thread.
5012        """
5013        kwargs['_return_http_data_only'] = True
5014        if kwargs.get('callback'):
5015            return self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5016        else:
5017            (data) = self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5018            return data
5019
5020    def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
5021        """
5022        Updates existing custom document fields in an existing template document.
5023        Updates existing custom document fields in an existing template document.
5024        This method makes a synchronous HTTP request by default. To make an
5025        asynchronous HTTP request, please define a `callback` function
5026        to be invoked when receiving the response.
5027        >>> def callback_function(response):
5028        >>>     pprint(response)
5029        >>>
5030        >>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
5031
5032        :param callback function: The callback function
5033            for asynchronous request. (optional)
5034        :param str account_id: The external account number (int) or account ID Guid. (required)
5035        :param str document_id: The ID of the document being accessed. (required)
5036        :param str template_id: The ID of the template being accessed. (required)
5037        :param DocumentFieldsInformation document_fields_information:
5038        :return: DocumentFieldsInformation
5039                 If the method is called asynchronously,
5040                 returns the request thread.
5041        """
5042
5043        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
5044        all_params.append('callback')
5045        all_params.append('_return_http_data_only')
5046        all_params.append('_preload_content')
5047        all_params.append('_request_timeout')
5048
5049        params = locals()
5050        for key, val in iteritems(params['kwargs']):
5051            if key not in all_params:
5052                raise TypeError(
5053                    "Got an unexpected keyword argument '%s'"
5054                    " to method update_document_fields" % key
5055                )
5056            params[key] = val
5057        del params['kwargs']
5058        # verify the required parameter 'account_id' is set
5059        if ('account_id' not in params) or (params['account_id'] is None):
5060            raise ValueError("Missing the required parameter `account_id` when calling `update_document_fields`")
5061        # verify the required parameter 'document_id' is set
5062        if ('document_id' not in params) or (params['document_id'] is None):
5063            raise ValueError("Missing the required parameter `document_id` when calling `update_document_fields`")
5064        # verify the required parameter 'template_id' is set
5065        if ('template_id' not in params) or (params['template_id'] is None):
5066            raise ValueError("Missing the required parameter `template_id` when calling `update_document_fields`")
5067
5068
5069        collection_formats = {}
5070
5071        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
5072        path_params = {}
5073        if 'account_id' in params:
5074            path_params['accountId'] = params['account_id']
5075        if 'document_id' in params:
5076            path_params['documentId'] = params['document_id']
5077        if 'template_id' in params:
5078            path_params['templateId'] = params['template_id']
5079
5080        query_params = {}
5081
5082        header_params = {}
5083
5084        form_params = []
5085        local_var_files = {}
5086
5087        body_params = None
5088        if 'document_fields_information' in params:
5089            body_params = params['document_fields_information']
5090        # HTTP header `Accept`
5091        header_params['Accept'] = self.api_client.\
5092            select_header_accept(['application/json'])
5093
5094        # Authentication setting
5095        auth_settings = []
5096
5097        return self.api_client.call_api(resource_path, 'PUT',
5098                                        path_params,
5099                                        query_params,
5100                                        header_params,
5101                                        body=body_params,
5102                                        post_params=form_params,
5103                                        files=local_var_files,
5104                                        response_type='DocumentFieldsInformation',
5105                                        auth_settings=auth_settings,
5106                                        callback=params.get('callback'),
5107                                        _return_http_data_only=params.get('_return_http_data_only'),
5108                                        _preload_content=params.get('_preload_content', True),
5109                                        _request_timeout=params.get('_request_timeout'),
5110                                        collection_formats=collection_formats)
5111
5112    def update_documents(self, account_id, template_id, **kwargs):
5113        """
5114        Adds documents to a template document.
5115        Adds one or more documents to an existing template document.
5116        This method makes a synchronous HTTP request by default. To make an
5117        asynchronous HTTP request, please define a `callback` function
5118        to be invoked when receiving the response.
5119        >>> def callback_function(response):
5120        >>>     pprint(response)
5121        >>>
5122        >>> thread = api.update_documents(account_id, template_id, callback=callback_function)
5123
5124        :param callback function: The callback function
5125            for asynchronous request. (optional)
5126        :param str account_id: The external account number (int) or account ID Guid. (required)
5127        :param str template_id: The ID of the template being accessed. (required)
5128        :param EnvelopeDefinition envelope_definition:
5129        :return: TemplateDocumentsResult
5130                 If the method is called asynchronously,
5131                 returns the request thread.
5132        """
5133        kwargs['_return_http_data_only'] = True
5134        if kwargs.get('callback'):
5135            return self.update_documents_with_http_info(account_id, template_id, **kwargs)
5136        else:
5137            (data) = self.update_documents_with_http_info(account_id, template_id, **kwargs)
5138            return data
5139
5140    def update_documents_with_http_info(self, account_id, template_id, **kwargs):
5141        """
5142        Adds documents to a template document.
5143        Adds one or more documents to an existing template document.
5144        This method makes a synchronous HTTP request by default. To make an
5145        asynchronous HTTP request, please define a `callback` function
5146        to be invoked when receiving the response.
5147        >>> def callback_function(response):
5148        >>>     pprint(response)
5149        >>>
5150        >>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function)
5151
5152        :param callback function: The callback function
5153            for asynchronous request. (optional)
5154        :param str account_id: The external account number (int) or account ID Guid. (required)
5155        :param str template_id: The ID of the template being accessed. (required)
5156        :param EnvelopeDefinition envelope_definition:
5157        :return: TemplateDocumentsResult
5158                 If the method is called asynchronously,
5159                 returns the request thread.
5160        """
5161
5162        all_params = ['account_id', 'template_id', 'envelope_definition']
5163        all_params.append('callback')
5164        all_params.append('_return_http_data_only')
5165        all_params.append('_preload_content')
5166        all_params.append('_request_timeout')
5167
5168        params = locals()
5169        for key, val in iteritems(params['kwargs']):
5170            if key not in all_params:
5171                raise TypeError(
5172                    "Got an unexpected keyword argument '%s'"
5173                    " to method update_documents" % key
5174                )
5175            params[key] = val
5176        del params['kwargs']
5177        # verify the required parameter 'account_id' is set
5178        if ('account_id' not in params) or (params['account_id'] is None):
5179            raise ValueError("Missing the required parameter `account_id` when calling `update_documents`")
5180        # verify the required parameter 'template_id' is set
5181        if ('template_id' not in params) or (params['template_id'] is None):
5182            raise ValueError("Missing the required parameter `template_id` when calling `update_documents`")
5183
5184
5185        collection_formats = {}
5186
5187        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
5188        path_params = {}
5189        if 'account_id' in params:
5190            path_params['accountId'] = params['account_id']
5191        if 'template_id' in params:
5192            path_params['templateId'] = params['template_id']
5193
5194        query_params = {}
5195
5196        header_params = {}
5197
5198        form_params = []
5199        local_var_files = {}
5200
5201        body_params = None
5202        if 'envelope_definition' in params:
5203            body_params = params['envelope_definition']
5204        # HTTP header `Accept`
5205        header_params['Accept'] = self.api_client.\
5206            select_header_accept(['application/json'])
5207
5208        # Authentication setting
5209        auth_settings = []
5210
5211        return self.api_client.call_api(resource_path, 'PUT',
5212                                        path_params,
5213                                        query_params,
5214                                        header_params,
5215                                        body=body_params,
5216                                        post_params=form_params,
5217                                        files=local_var_files,
5218                                        response_type='TemplateDocumentsResult',
5219                                        auth_settings=auth_settings,
5220                                        callback=params.get('callback'),
5221                                        _return_http_data_only=params.get('_return_http_data_only'),
5222                                        _preload_content=params.get('_preload_content', True),
5223                                        _request_timeout=params.get('_request_timeout'),
5224                                        collection_formats=collection_formats)
5225
5226    def update_group_share(self, account_id, template_id, template_part, **kwargs):
5227        """
5228        Shares a template with a group
5229        Shares a template with the specified members group.
5230        This method makes a synchronous HTTP request by default. To make an
5231        asynchronous HTTP request, please define a `callback` function
5232        to be invoked when receiving the response.
5233        >>> def callback_function(response):
5234        >>>     pprint(response)
5235        >>>
5236        >>> thread = api.update_group_share(account_id, template_id, template_part, callback=callback_function)
5237
5238        :param callback function: The callback function
5239            for asynchronous request. (optional)
5240        :param str account_id: The external account number (int) or account ID Guid. (required)
5241        :param str template_id: The ID of the template being accessed. (required)
5242        :param str template_part: Currently, the only defined part is **groups**. (required)
5243        :param GroupInformation group_information:
5244        :return: GroupInformation
5245                 If the method is called asynchronously,
5246                 returns the request thread.
5247        """
5248        kwargs['_return_http_data_only'] = True
5249        if kwargs.get('callback'):
5250            return self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5251        else:
5252            (data) = self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5253            return data
5254
5255    def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
5256        """
5257        Shares a template with a group
5258        Shares a template with the specified members group.
5259        This method makes a synchronous HTTP request by default. To make an
5260        asynchronous HTTP request, please define a `callback` function
5261        to be invoked when receiving the response.
5262        >>> def callback_function(response):
5263        >>>     pprint(response)
5264        >>>
5265        >>> thread = api.update_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
5266
5267        :param callback function: The callback function
5268            for asynchronous request. (optional)
5269        :param str account_id: The external account number (int) or account ID Guid. (required)
5270        :param str template_id: The ID of the template being accessed. (required)
5271        :param str template_part: Currently, the only defined part is **groups**. (required)
5272        :param GroupInformation group_information:
5273        :return: GroupInformation
5274                 If the method is called asynchronously,
5275                 returns the request thread.
5276        """
5277
5278        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
5279        all_params.append('callback')
5280        all_params.append('_return_http_data_only')
5281        all_params.append('_preload_content')
5282        all_params.append('_request_timeout')
5283
5284        params = locals()
5285        for key, val in iteritems(params['kwargs']):
5286            if key not in all_params:
5287                raise TypeError(
5288                    "Got an unexpected keyword argument '%s'"
5289                    " to method update_group_share" % key
5290                )
5291            params[key] = val
5292        del params['kwargs']
5293        # verify the required parameter 'account_id' is set
5294        if ('account_id' not in params) or (params['account_id'] is None):
5295            raise ValueError("Missing the required parameter `account_id` when calling `update_group_share`")
5296        # verify the required parameter 'template_id' is set
5297        if ('template_id' not in params) or (params['template_id'] is None):
5298            raise ValueError("Missing the required parameter `template_id` when calling `update_group_share`")
5299        # verify the required parameter 'template_part' is set
5300        if ('template_part' not in params) or (params['template_part'] is None):
5301            raise ValueError("Missing the required parameter `template_part` when calling `update_group_share`")
5302
5303
5304        collection_formats = {}
5305
5306        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
5307        path_params = {}
5308        if 'account_id' in params:
5309            path_params['accountId'] = params['account_id']
5310        if 'template_id' in params:
5311            path_params['templateId'] = params['template_id']
5312        if 'template_part' in params:
5313            path_params['templatePart'] = params['template_part']
5314
5315        query_params = {}
5316
5317        header_params = {}
5318
5319        form_params = []
5320        local_var_files = {}
5321
5322        body_params = None
5323        if 'group_information' in params:
5324            body_params = params['group_information']
5325        # HTTP header `Accept`
5326        header_params['Accept'] = self.api_client.\
5327            select_header_accept(['application/json'])
5328
5329        # Authentication setting
5330        auth_settings = []
5331
5332        return self.api_client.call_api(resource_path, 'PUT',
5333                                        path_params,
5334                                        query_params,
5335                                        header_params,
5336                                        body=body_params,
5337                                        post_params=form_params,
5338                                        files=local_var_files,
5339                                        response_type='GroupInformation',
5340                                        auth_settings=auth_settings,
5341                                        callback=params.get('callback'),
5342                                        _return_http_data_only=params.get('_return_http_data_only'),
5343                                        _preload_content=params.get('_preload_content', True),
5344                                        _request_timeout=params.get('_request_timeout'),
5345                                        collection_formats=collection_formats)
5346
5347    def update_lock(self, account_id, template_id, **kwargs):
5348        """
5349        Updates a template lock.
5350        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.
5351        This method makes a synchronous HTTP request by default. To make an
5352        asynchronous HTTP request, please define a `callback` function
5353        to be invoked when receiving the response.
5354        >>> def callback_function(response):
5355        >>>     pprint(response)
5356        >>>
5357        >>> thread = api.update_lock(account_id, template_id, callback=callback_function)
5358
5359        :param callback function: The callback function
5360            for asynchronous request. (optional)
5361        :param str account_id: The external account number (int) or account ID Guid. (required)
5362        :param str template_id: The ID of the template being accessed. (required)
5363        :param LockRequest lock_request:
5364        :return: LockInformation
5365                 If the method is called asynchronously,
5366                 returns the request thread.
5367        """
5368        kwargs['_return_http_data_only'] = True
5369        if kwargs.get('callback'):
5370            return self.update_lock_with_http_info(account_id, template_id, **kwargs)
5371        else:
5372            (data) = self.update_lock_with_http_info(account_id, template_id, **kwargs)
5373            return data
5374
5375    def update_lock_with_http_info(self, account_id, template_id, **kwargs):
5376        """
5377        Updates a template lock.
5378        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.
5379        This method makes a synchronous HTTP request by default. To make an
5380        asynchronous HTTP request, please define a `callback` function
5381        to be invoked when receiving the response.
5382        >>> def callback_function(response):
5383        >>>     pprint(response)
5384        >>>
5385        >>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function)
5386
5387        :param callback function: The callback function
5388            for asynchronous request. (optional)
5389        :param str account_id: The external account number (int) or account ID Guid. (required)
5390        :param str template_id: The ID of the template being accessed. (required)
5391        :param LockRequest lock_request:
5392        :return: LockInformation
5393                 If the method is called asynchronously,
5394                 returns the request thread.
5395        """
5396
5397        all_params = ['account_id', 'template_id', 'lock_request']
5398        all_params.append('callback')
5399        all_params.append('_return_http_data_only')
5400        all_params.append('_preload_content')
5401        all_params.append('_request_timeout')
5402
5403        params = locals()
5404        for key, val in iteritems(params['kwargs']):
5405            if key not in all_params:
5406                raise TypeError(
5407                    "Got an unexpected keyword argument '%s'"
5408                    " to method update_lock" % key
5409                )
5410            params[key] = val
5411        del params['kwargs']
5412        # verify the required parameter 'account_id' is set
5413        if ('account_id' not in params) or (params['account_id'] is None):
5414            raise ValueError("Missing the required parameter `account_id` when calling `update_lock`")
5415        # verify the required parameter 'template_id' is set
5416        if ('template_id' not in params) or (params['template_id'] is None):
5417            raise ValueError("Missing the required parameter `template_id` when calling `update_lock`")
5418
5419
5420        collection_formats = {}
5421
5422        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
5423        path_params = {}
5424        if 'account_id' in params:
5425            path_params['accountId'] = params['account_id']
5426        if 'template_id' in params:
5427            path_params['templateId'] = params['template_id']
5428
5429        query_params = {}
5430
5431        header_params = {}
5432
5433        form_params = []
5434        local_var_files = {}
5435
5436        body_params = None
5437        if 'lock_request' in params:
5438            body_params = params['lock_request']
5439        # HTTP header `Accept`
5440        header_params['Accept'] = self.api_client.\
5441            select_header_accept(['application/json'])
5442
5443        # Authentication setting
5444        auth_settings = []
5445
5446        return self.api_client.call_api(resource_path, 'PUT',
5447                                        path_params,
5448                                        query_params,
5449                                        header_params,
5450                                        body=body_params,
5451                                        post_params=form_params,
5452                                        files=local_var_files,
5453                                        response_type='LockInformation',
5454                                        auth_settings=auth_settings,
5455                                        callback=params.get('callback'),
5456                                        _return_http_data_only=params.get('_return_http_data_only'),
5457                                        _preload_content=params.get('_preload_content', True),
5458                                        _request_timeout=params.get('_request_timeout'),
5459                                        collection_formats=collection_formats)
5460
5461    def update_notification_settings(self, account_id, template_id, **kwargs):
5462        """
5463        Updates the notification  structure for an existing template.
5464        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5465        This method makes a synchronous HTTP request by default. To make an
5466        asynchronous HTTP request, please define a `callback` function
5467        to be invoked when receiving the response.
5468        >>> def callback_function(response):
5469        >>>     pprint(response)
5470        >>>
5471        >>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function)
5472
5473        :param callback function: The callback function
5474            for asynchronous request. (optional)
5475        :param str account_id: The external account number (int) or account ID Guid. (required)
5476        :param str template_id: The ID of the template being accessed. (required)
5477        :param TemplateNotificationRequest template_notification_request:
5478        :return: Notification
5479                 If the method is called asynchronously,
5480                 returns the request thread.
5481        """
5482        kwargs['_return_http_data_only'] = True
5483        if kwargs.get('callback'):
5484            return self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5485        else:
5486            (data) = self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5487            return data
5488
5489    def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
5490        """
5491        Updates the notification  structure for an existing template.
5492        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5493        This method makes a synchronous HTTP request by default. To make an
5494        asynchronous HTTP request, please define a `callback` function
5495        to be invoked when receiving the response.
5496        >>> def callback_function(response):
5497        >>>     pprint(response)
5498        >>>
5499        >>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
5500
5501        :param callback function: The callback function
5502            for asynchronous request. (optional)
5503        :param str account_id: The external account number (int) or account ID Guid. (required)
5504        :param str template_id: The ID of the template being accessed. (required)
5505        :param TemplateNotificationRequest template_notification_request:
5506        :return: Notification
5507                 If the method is called asynchronously,
5508                 returns the request thread.
5509        """
5510
5511        all_params = ['account_id', 'template_id', 'template_notification_request']
5512        all_params.append('callback')
5513        all_params.append('_return_http_data_only')
5514        all_params.append('_preload_content')
5515        all_params.append('_request_timeout')
5516
5517        params = locals()
5518        for key, val in iteritems(params['kwargs']):
5519            if key not in all_params:
5520                raise TypeError(
5521                    "Got an unexpected keyword argument '%s'"
5522                    " to method update_notification_settings" % key
5523                )
5524            params[key] = val
5525        del params['kwargs']
5526        # verify the required parameter 'account_id' is set
5527        if ('account_id' not in params) or (params['account_id'] is None):
5528            raise ValueError("Missing the required parameter `account_id` when calling `update_notification_settings`")
5529        # verify the required parameter 'template_id' is set
5530        if ('template_id' not in params) or (params['template_id'] is None):
5531            raise ValueError("Missing the required parameter `template_id` when calling `update_notification_settings`")
5532
5533
5534        collection_formats = {}
5535
5536        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
5537        path_params = {}
5538        if 'account_id' in params:
5539            path_params['accountId'] = params['account_id']
5540        if 'template_id' in params:
5541            path_params['templateId'] = params['template_id']
5542
5543        query_params = {}
5544
5545        header_params = {}
5546
5547        form_params = []
5548        local_var_files = {}
5549
5550        body_params = None
5551        if 'template_notification_request' in params:
5552            body_params = params['template_notification_request']
5553        # HTTP header `Accept`
5554        header_params['Accept'] = self.api_client.\
5555            select_header_accept(['application/json'])
5556
5557        # Authentication setting
5558        auth_settings = []
5559
5560        return self.api_client.call_api(resource_path, 'PUT',
5561                                        path_params,
5562                                        query_params,
5563                                        header_params,
5564                                        body=body_params,
5565                                        post_params=form_params,
5566                                        files=local_var_files,
5567                                        response_type='Notification',
5568                                        auth_settings=auth_settings,
5569                                        callback=params.get('callback'),
5570                                        _return_http_data_only=params.get('_return_http_data_only'),
5571                                        _preload_content=params.get('_preload_content', True),
5572                                        _request_timeout=params.get('_request_timeout'),
5573                                        collection_formats=collection_formats)
5574
5575    def update_recipients(self, account_id, template_id, **kwargs):
5576        """
5577        Updates recipients in a template.
5578        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5579        This method makes a synchronous HTTP request by default. To make an
5580        asynchronous HTTP request, please define a `callback` function
5581        to be invoked when receiving the response.
5582        >>> def callback_function(response):
5583        >>>     pprint(response)
5584        >>>
5585        >>> thread = api.update_recipients(account_id, template_id, callback=callback_function)
5586
5587        :param callback function: The callback function
5588            for asynchronous request. (optional)
5589        :param str account_id: The external account number (int) or account ID Guid. (required)
5590        :param str template_id: The ID of the template being accessed. (required)
5591        :param str resend_envelope:
5592        :param TemplateRecipients template_recipients:
5593        :return: RecipientsUpdateSummary
5594                 If the method is called asynchronously,
5595                 returns the request thread.
5596        """
5597        kwargs['_return_http_data_only'] = True
5598        if kwargs.get('callback'):
5599            return self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5600        else:
5601            (data) = self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5602            return data
5603
5604    def update_recipients_with_http_info(self, account_id, template_id, **kwargs):
5605        """
5606        Updates recipients in a template.
5607        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5608        This method makes a synchronous HTTP request by default. To make an
5609        asynchronous HTTP request, please define a `callback` function
5610        to be invoked when receiving the response.
5611        >>> def callback_function(response):
5612        >>>     pprint(response)
5613        >>>
5614        >>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function)
5615
5616        :param callback function: The callback function
5617            for asynchronous request. (optional)
5618        :param str account_id: The external account number (int) or account ID Guid. (required)
5619        :param str template_id: The ID of the template being accessed. (required)
5620        :param str resend_envelope:
5621        :param TemplateRecipients template_recipients:
5622        :return: RecipientsUpdateSummary
5623                 If the method is called asynchronously,
5624                 returns the request thread.
5625        """
5626
5627        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
5628        all_params.append('callback')
5629        all_params.append('_return_http_data_only')
5630        all_params.append('_preload_content')
5631        all_params.append('_request_timeout')
5632
5633        params = locals()
5634        for key, val in iteritems(params['kwargs']):
5635            if key not in all_params:
5636                raise TypeError(
5637                    "Got an unexpected keyword argument '%s'"
5638                    " to method update_recipients" % key
5639                )
5640            params[key] = val
5641        del params['kwargs']
5642        # verify the required parameter 'account_id' is set
5643        if ('account_id' not in params) or (params['account_id'] is None):
5644            raise ValueError("Missing the required parameter `account_id` when calling `update_recipients`")
5645        # verify the required parameter 'template_id' is set
5646        if ('template_id' not in params) or (params['template_id'] is None):
5647            raise ValueError("Missing the required parameter `template_id` when calling `update_recipients`")
5648
5649
5650        collection_formats = {}
5651
5652        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
5653        path_params = {}
5654        if 'account_id' in params:
5655            path_params['accountId'] = params['account_id']
5656        if 'template_id' in params:
5657            path_params['templateId'] = params['template_id']
5658
5659        query_params = {}
5660        if 'resend_envelope' in params:
5661            query_params['resend_envelope'] = params['resend_envelope']
5662
5663        header_params = {}
5664
5665        form_params = []
5666        local_var_files = {}
5667
5668        body_params = None
5669        if 'template_recipients' in params:
5670            body_params = params['template_recipients']
5671        # HTTP header `Accept`
5672        header_params['Accept'] = self.api_client.\
5673            select_header_accept(['application/json'])
5674
5675        # Authentication setting
5676        auth_settings = []
5677
5678        return self.api_client.call_api(resource_path, 'PUT',
5679                                        path_params,
5680                                        query_params,
5681                                        header_params,
5682                                        body=body_params,
5683                                        post_params=form_params,
5684                                        files=local_var_files,
5685                                        response_type='RecipientsUpdateSummary',
5686                                        auth_settings=auth_settings,
5687                                        callback=params.get('callback'),
5688                                        _return_http_data_only=params.get('_return_http_data_only'),
5689                                        _preload_content=params.get('_preload_content', True),
5690                                        _request_timeout=params.get('_request_timeout'),
5691                                        collection_formats=collection_formats)
5692
5693    def update_tabs(self, account_id, recipient_id, template_id, **kwargs):
5694        """
5695        Updates the tabs for a recipient.
5696        Updates one or more tabs for a recipient in a template.
5697        This method makes a synchronous HTTP request by default. To make an
5698        asynchronous HTTP request, please define a `callback` function
5699        to be invoked when receiving the response.
5700        >>> def callback_function(response):
5701        >>>     pprint(response)
5702        >>>
5703        >>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function)
5704
5705        :param callback function: The callback function
5706            for asynchronous request. (optional)
5707        :param str account_id: The external account number (int) or account ID Guid. (required)
5708        :param str recipient_id: The ID of the recipient being accessed. (required)
5709        :param str template_id: The ID of the template being accessed. (required)
5710        :param TemplateTabs template_tabs:
5711        :return: Tabs
5712                 If the method is called asynchronously,
5713                 returns the request thread.
5714        """
5715        kwargs['_return_http_data_only'] = True
5716        if kwargs.get('callback'):
5717            return self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5718        else:
5719            (data) = self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5720            return data
5721
5722    def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
5723        """
5724        Updates the tabs for a recipient.
5725        Updates one or more tabs for a recipient in a template.
5726        This method makes a synchronous HTTP request by default. To make an
5727        asynchronous HTTP request, please define a `callback` function
5728        to be invoked when receiving the response.
5729        >>> def callback_function(response):
5730        >>>     pprint(response)
5731        >>>
5732        >>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
5733
5734        :param callback function: The callback function
5735            for asynchronous request. (optional)
5736        :param str account_id: The external account number (int) or account ID Guid. (required)
5737        :param str recipient_id: The ID of the recipient being accessed. (required)
5738        :param str template_id: The ID of the template being accessed. (required)
5739        :param TemplateTabs template_tabs:
5740        :return: Tabs
5741                 If the method is called asynchronously,
5742                 returns the request thread.
5743        """
5744
5745        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
5746        all_params.append('callback')
5747        all_params.append('_return_http_data_only')
5748        all_params.append('_preload_content')
5749        all_params.append('_request_timeout')
5750
5751        params = locals()
5752        for key, val in iteritems(params['kwargs']):
5753            if key not in all_params:
5754                raise TypeError(
5755                    "Got an unexpected keyword argument '%s'"
5756                    " to method update_tabs" % key
5757                )
5758            params[key] = val
5759        del params['kwargs']
5760        # verify the required parameter 'account_id' is set
5761        if ('account_id' not in params) or (params['account_id'] is None):
5762            raise ValueError("Missing the required parameter `account_id` when calling `update_tabs`")
5763        # verify the required parameter 'recipient_id' is set
5764        if ('recipient_id' not in params) or (params['recipient_id'] is None):
5765            raise ValueError("Missing the required parameter `recipient_id` when calling `update_tabs`")
5766        # verify the required parameter 'template_id' is set
5767        if ('template_id' not in params) or (params['template_id'] is None):
5768            raise ValueError("Missing the required parameter `template_id` when calling `update_tabs`")
5769
5770
5771        collection_formats = {}
5772
5773        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
5774        path_params = {}
5775        if 'account_id' in params:
5776            path_params['accountId'] = params['account_id']
5777        if 'recipient_id' in params:
5778            path_params['recipientId'] = params['recipient_id']
5779        if 'template_id' in params:
5780            path_params['templateId'] = params['template_id']
5781
5782        query_params = {}
5783
5784        header_params = {}
5785
5786        form_params = []
5787        local_var_files = {}
5788
5789        body_params = None
5790        if 'template_tabs' in params:
5791            body_params = params['template_tabs']
5792        # HTTP header `Accept`
5793        header_params['Accept'] = self.api_client.\
5794            select_header_accept(['application/json'])
5795
5796        # Authentication setting
5797        auth_settings = []
5798
5799        return self.api_client.call_api(resource_path, 'PUT',
5800                                        path_params,
5801                                        query_params,
5802                                        header_params,
5803                                        body=body_params,
5804                                        post_params=form_params,
5805                                        files=local_var_files,
5806                                        response_type='Tabs',
5807                                        auth_settings=auth_settings,
5808                                        callback=params.get('callback'),
5809                                        _return_http_data_only=params.get('_return_http_data_only'),
5810                                        _preload_content=params.get('_preload_content', True),
5811                                        _request_timeout=params.get('_request_timeout'),
5812                                        collection_formats=collection_formats)
5813
5814    def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
5815        """
5816        Updates the tabs for a template
5817        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
5818        This method makes a synchronous HTTP request by default. To make an
5819        asynchronous HTTP request, please define a `callback` function
5820        to be invoked when receiving the response.
5821        >>> def callback_function(response):
5822        >>>     pprint(response)
5823        >>>
5824        >>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
5825
5826        :param callback function: The callback function
5827            for asynchronous request. (optional)
5828        :param str account_id: The external account number (int) or account ID Guid. (required)
5829        :param str document_id: The ID of the document being accessed. (required)
5830        :param str template_id: The ID of the template being accessed. (required)
5831        :param TemplateTabs template_tabs:
5832        :return: Tabs
5833                 If the method is called asynchronously,
5834                 returns the request thread.
5835        """
5836        kwargs['_return_http_data_only'] = True
5837        if kwargs.get('callback'):
5838            return self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
5839        else:
5840            (data) = self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
5841            return data
5842
5843    def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
5844        """
5845        Updates the tabs for a template
5846        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
5847        This method makes a synchronous HTTP request by default. To make an
5848        asynchronous HTTP request, please define a `callback` function
5849        to be invoked when receiving the response.
5850        >>> def callback_function(response):
5851        >>>     pprint(response)
5852        >>>
5853        >>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
5854
5855        :param callback function: The callback function
5856            for asynchronous request. (optional)
5857        :param str account_id: The external account number (int) or account ID Guid. (required)
5858        :param str document_id: The ID of the document being accessed. (required)
5859        :param str template_id: The ID of the template being accessed. (required)
5860        :param TemplateTabs template_tabs:
5861        :return: Tabs
5862                 If the method is called asynchronously,
5863                 returns the request thread.
5864        """
5865
5866        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
5867        all_params.append('callback')
5868        all_params.append('_return_http_data_only')
5869        all_params.append('_preload_content')
5870        all_params.append('_request_timeout')
5871
5872        params = locals()
5873        for key, val in iteritems(params['kwargs']):
5874            if key not in all_params:
5875                raise TypeError(
5876                    "Got an unexpected keyword argument '%s'"
5877                    " to method update_template_document_tabs" % key
5878                )
5879            params[key] = val
5880        del params['kwargs']
5881        # verify the required parameter 'account_id' is set
5882        if ('account_id' not in params) or (params['account_id'] is None):
5883            raise ValueError("Missing the required parameter `account_id` when calling `update_template_document_tabs`")
5884        # verify the required parameter 'document_id' is set
5885        if ('document_id' not in params) or (params['document_id'] is None):
5886            raise ValueError("Missing the required parameter `document_id` when calling `update_template_document_tabs`")
5887        # verify the required parameter 'template_id' is set
5888        if ('template_id' not in params) or (params['template_id'] is None):
5889            raise ValueError("Missing the required parameter `template_id` when calling `update_template_document_tabs`")
5890
5891
5892        collection_formats = {}
5893
5894        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
5895        path_params = {}
5896        if 'account_id' in params:
5897            path_params['accountId'] = params['account_id']
5898        if 'document_id' in params:
5899            path_params['documentId'] = params['document_id']
5900        if 'template_id' in params:
5901            path_params['templateId'] = params['template_id']
5902
5903        query_params = {}
5904
5905        header_params = {}
5906
5907        form_params = []
5908        local_var_files = {}
5909
5910        body_params = None
5911        if 'template_tabs' in params:
5912            body_params = params['template_tabs']
5913        # HTTP header `Accept`
5914        header_params['Accept'] = self.api_client.\
5915            select_header_accept(['application/json'])
5916
5917        # Authentication setting
5918        auth_settings = []
5919
5920        return self.api_client.call_api(resource_path, 'PUT',
5921                                        path_params,
5922                                        query_params,
5923                                        header_params,
5924                                        body=body_params,
5925                                        post_params=form_params,
5926                                        files=local_var_files,
5927                                        response_type='Tabs',
5928                                        auth_settings=auth_settings,
5929                                        callback=params.get('callback'),
5930                                        _return_http_data_only=params.get('_return_http_data_only'),
5931                                        _preload_content=params.get('_preload_content', True),
5932                                        _request_timeout=params.get('_request_timeout'),
5933                                        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 ReturnUrlRequest return_url_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 ReturnUrlRequest return_url_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', 'return_url_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 'return_url_request' in params:
 370            body_params = params['return_url_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 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 show_changes:
2675        :return: file
2676                 If the method is called asynchronously,
2677                 returns the request thread.
2678        """
2679
2680        all_params = ['account_id', 'document_id', 'template_id', 'encrypt', 'show_changes']
2681        all_params.append('callback')
2682        all_params.append('_return_http_data_only')
2683        all_params.append('_preload_content')
2684        all_params.append('_request_timeout')
2685
2686        params = locals()
2687        for key, val in iteritems(params['kwargs']):
2688            if key not in all_params:
2689                raise TypeError(
2690                    "Got an unexpected keyword argument '%s'"
2691                    " to method get_document" % key
2692                )
2693            params[key] = val
2694        del params['kwargs']
2695        # verify the required parameter 'account_id' is set
2696        if ('account_id' not in params) or (params['account_id'] is None):
2697            raise ValueError("Missing the required parameter `account_id` when calling `get_document`")
2698        # verify the required parameter 'document_id' is set
2699        if ('document_id' not in params) or (params['document_id'] is None):
2700            raise ValueError("Missing the required parameter `document_id` when calling `get_document`")
2701        # verify the required parameter 'template_id' is set
2702        if ('template_id' not in params) or (params['template_id'] is None):
2703            raise ValueError("Missing the required parameter `template_id` when calling `get_document`")
2704
2705
2706        collection_formats = {}
2707
2708        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
2709        path_params = {}
2710        if 'account_id' in params:
2711            path_params['accountId'] = params['account_id']
2712        if 'document_id' in params:
2713            path_params['documentId'] = params['document_id']
2714        if 'template_id' in params:
2715            path_params['templateId'] = params['template_id']
2716
2717        query_params = {}
2718        if 'encrypt' in params:
2719            query_params['encrypt'] = params['encrypt']
2720        if 'show_changes' in params:
2721            query_params['show_changes'] = params['show_changes']
2722
2723        header_params = {}
2724
2725        form_params = []
2726        local_var_files = {}
2727
2728        body_params = None
2729        # HTTP header `Accept`
2730        header_params['Accept'] = self.api_client.\
2731            select_header_accept(['application/pdf'])
2732
2733        # Authentication setting
2734        auth_settings = []
2735
2736        return self.api_client.call_api(resource_path, 'GET',
2737                                        path_params,
2738                                        query_params,
2739                                        header_params,
2740                                        body=body_params,
2741                                        post_params=form_params,
2742                                        files=local_var_files,
2743                                        response_type='file',
2744                                        auth_settings=auth_settings,
2745                                        callback=params.get('callback'),
2746                                        _return_http_data_only=params.get('_return_http_data_only'),
2747                                        _preload_content=params.get('_preload_content', True),
2748                                        _request_timeout=params.get('_request_timeout'),
2749                                        collection_formats=collection_formats)
2750
2751    def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs):
2752        """
2753        Gets a page image from a template for display.
2754        Retrieves a page image for display from the specified template.
2755        This method makes a synchronous HTTP request by default. To make an
2756        asynchronous HTTP request, please define a `callback` function
2757        to be invoked when receiving the response.
2758        >>> def callback_function(response):
2759        >>>     pprint(response)
2760        >>>
2761        >>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function)
2762
2763        :param callback function: The callback function
2764            for asynchronous request. (optional)
2765        :param str account_id: The external account number (int) or account ID Guid. (required)
2766        :param str document_id: The ID of the document being accessed. (required)
2767        :param str page_number: The page number being accessed. (required)
2768        :param str template_id: The ID of the template being accessed. (required)
2769        :param str dpi:
2770        :param str max_height:
2771        :param str max_width:
2772        :param str show_changes:
2773        :return: file
2774                 If the method is called asynchronously,
2775                 returns the request thread.
2776        """
2777        kwargs['_return_http_data_only'] = True
2778        if kwargs.get('callback'):
2779            return self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2780        else:
2781            (data) = self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2782            return data
2783
2784    def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
2785        """
2786        Gets a page image from a template for display.
2787        Retrieves a page image for display from the specified template.
2788        This method makes a synchronous HTTP request by default. To make an
2789        asynchronous HTTP request, please define a `callback` function
2790        to be invoked when receiving the response.
2791        >>> def callback_function(response):
2792        >>>     pprint(response)
2793        >>>
2794        >>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
2795
2796        :param callback function: The callback function
2797            for asynchronous request. (optional)
2798        :param str account_id: The external account number (int) or account ID Guid. (required)
2799        :param str document_id: The ID of the document being accessed. (required)
2800        :param str page_number: The page number being accessed. (required)
2801        :param str template_id: The ID of the template being accessed. (required)
2802        :param str dpi:
2803        :param str max_height:
2804        :param str max_width:
2805        :param str show_changes:
2806        :return: file
2807                 If the method is called asynchronously,
2808                 returns the request thread.
2809        """
2810
2811        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'dpi', 'max_height', 'max_width', 'show_changes']
2812        all_params.append('callback')
2813        all_params.append('_return_http_data_only')
2814        all_params.append('_preload_content')
2815        all_params.append('_request_timeout')
2816
2817        params = locals()
2818        for key, val in iteritems(params['kwargs']):
2819            if key not in all_params:
2820                raise TypeError(
2821                    "Got an unexpected keyword argument '%s'"
2822                    " to method get_document_page_image" % key
2823                )
2824            params[key] = val
2825        del params['kwargs']
2826        # verify the required parameter 'account_id' is set
2827        if ('account_id' not in params) or (params['account_id'] is None):
2828            raise ValueError("Missing the required parameter `account_id` when calling `get_document_page_image`")
2829        # verify the required parameter 'document_id' is set
2830        if ('document_id' not in params) or (params['document_id'] is None):
2831            raise ValueError("Missing the required parameter `document_id` when calling `get_document_page_image`")
2832        # verify the required parameter 'page_number' is set
2833        if ('page_number' not in params) or (params['page_number'] is None):
2834            raise ValueError("Missing the required parameter `page_number` when calling `get_document_page_image`")
2835        # verify the required parameter 'template_id' is set
2836        if ('template_id' not in params) or (params['template_id'] is None):
2837            raise ValueError("Missing the required parameter `template_id` when calling `get_document_page_image`")
2838
2839
2840        collection_formats = {}
2841
2842        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
2843        path_params = {}
2844        if 'account_id' in params:
2845            path_params['accountId'] = params['account_id']
2846        if 'document_id' in params:
2847            path_params['documentId'] = params['document_id']
2848        if 'page_number' in params:
2849            path_params['pageNumber'] = params['page_number']
2850        if 'template_id' in params:
2851            path_params['templateId'] = params['template_id']
2852
2853        query_params = {}
2854        if 'dpi' in params:
2855            query_params['dpi'] = params['dpi']
2856        if 'max_height' in params:
2857            query_params['max_height'] = params['max_height']
2858        if 'max_width' in params:
2859            query_params['max_width'] = params['max_width']
2860        if 'show_changes' in params:
2861            query_params['show_changes'] = params['show_changes']
2862
2863        header_params = {}
2864
2865        form_params = []
2866        local_var_files = {}
2867
2868        body_params = None
2869        # HTTP header `Accept`
2870        header_params['Accept'] = self.api_client.\
2871            select_header_accept(['image/png'])
2872
2873        # Authentication setting
2874        auth_settings = []
2875
2876        return self.api_client.call_api(resource_path, 'GET',
2877                                        path_params,
2878                                        query_params,
2879                                        header_params,
2880                                        body=body_params,
2881                                        post_params=form_params,
2882                                        files=local_var_files,
2883                                        response_type='file',
2884                                        auth_settings=auth_settings,
2885                                        callback=params.get('callback'),
2886                                        _return_http_data_only=params.get('_return_http_data_only'),
2887                                        _preload_content=params.get('_preload_content', True),
2888                                        _request_timeout=params.get('_request_timeout'),
2889                                        collection_formats=collection_formats)
2890
2891    def get_document_tabs(self, account_id, document_id, template_id, **kwargs):
2892        """
2893        Returns tabs on the document.
2894        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
2895        This method makes a synchronous HTTP request by default. To make an
2896        asynchronous HTTP request, please define a `callback` function
2897        to be invoked when receiving the response.
2898        >>> def callback_function(response):
2899        >>>     pprint(response)
2900        >>>
2901        >>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function)
2902
2903        :param callback function: The callback function
2904            for asynchronous request. (optional)
2905        :param str account_id: The external account number (int) or account ID Guid. (required)
2906        :param str document_id: The ID of the document being accessed. (required)
2907        :param str template_id: The ID of the template being accessed. (required)
2908        :param str page_numbers:
2909        :return: Tabs
2910                 If the method is called asynchronously,
2911                 returns the request thread.
2912        """
2913        kwargs['_return_http_data_only'] = True
2914        if kwargs.get('callback'):
2915            return self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2916        else:
2917            (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2918            return data
2919
2920    def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
2921        """
2922        Returns tabs on the document.
2923        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
2924        This method makes a synchronous HTTP request by default. To make an
2925        asynchronous HTTP request, please define a `callback` function
2926        to be invoked when receiving the response.
2927        >>> def callback_function(response):
2928        >>>     pprint(response)
2929        >>>
2930        >>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
2931
2932        :param callback function: The callback function
2933            for asynchronous request. (optional)
2934        :param str account_id: The external account number (int) or account ID Guid. (required)
2935        :param str document_id: The ID of the document being accessed. (required)
2936        :param str template_id: The ID of the template being accessed. (required)
2937        :param str page_numbers:
2938        :return: Tabs
2939                 If the method is called asynchronously,
2940                 returns the request thread.
2941        """
2942
2943        all_params = ['account_id', 'document_id', 'template_id', 'page_numbers']
2944        all_params.append('callback')
2945        all_params.append('_return_http_data_only')
2946        all_params.append('_preload_content')
2947        all_params.append('_request_timeout')
2948
2949        params = locals()
2950        for key, val in iteritems(params['kwargs']):
2951            if key not in all_params:
2952                raise TypeError(
2953                    "Got an unexpected keyword argument '%s'"
2954                    " to method get_document_tabs" % key
2955                )
2956            params[key] = val
2957        del params['kwargs']
2958        # verify the required parameter 'account_id' is set
2959        if ('account_id' not in params) or (params['account_id'] is None):
2960            raise ValueError("Missing the required parameter `account_id` when calling `get_document_tabs`")
2961        # verify the required parameter 'document_id' is set
2962        if ('document_id' not in params) or (params['document_id'] is None):
2963            raise ValueError("Missing the required parameter `document_id` when calling `get_document_tabs`")
2964        # verify the required parameter 'template_id' is set
2965        if ('template_id' not in params) or (params['template_id'] is None):
2966            raise ValueError("Missing the required parameter `template_id` when calling `get_document_tabs`")
2967
2968
2969        collection_formats = {}
2970
2971        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
2972        path_params = {}
2973        if 'account_id' in params:
2974            path_params['accountId'] = params['account_id']
2975        if 'document_id' in params:
2976            path_params['documentId'] = params['document_id']
2977        if 'template_id' in params:
2978            path_params['templateId'] = params['template_id']
2979
2980        query_params = {}
2981        if 'page_numbers' in params:
2982            query_params['page_numbers'] = params['page_numbers']
2983
2984        header_params = {}
2985
2986        form_params = []
2987        local_var_files = {}
2988
2989        body_params = None
2990        # HTTP header `Accept`
2991        header_params['Accept'] = self.api_client.\
2992            select_header_accept(['application/json'])
2993
2994        # Authentication setting
2995        auth_settings = []
2996
2997        return self.api_client.call_api(resource_path, 'GET',
2998                                        path_params,
2999                                        query_params,
3000                                        header_params,
3001                                        body=body_params,
3002                                        post_params=form_params,
3003                                        files=local_var_files,
3004                                        response_type='Tabs',
3005                                        auth_settings=auth_settings,
3006                                        callback=params.get('callback'),
3007                                        _return_http_data_only=params.get('_return_http_data_only'),
3008                                        _preload_content=params.get('_preload_content', True),
3009                                        _request_timeout=params.get('_request_timeout'),
3010                                        collection_formats=collection_formats)
3011
3012    def get_lock(self, account_id, template_id, **kwargs):
3013        """
3014        Gets template lock information.
3015        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.
3016        This method makes a synchronous HTTP request by default. To make an
3017        asynchronous HTTP request, please define a `callback` function
3018        to be invoked when receiving the response.
3019        >>> def callback_function(response):
3020        >>>     pprint(response)
3021        >>>
3022        >>> thread = api.get_lock(account_id, template_id, callback=callback_function)
3023
3024        :param callback function: The callback function
3025            for asynchronous request. (optional)
3026        :param str account_id: The external account number (int) or account ID Guid. (required)
3027        :param str template_id: The ID of the template being accessed. (required)
3028        :return: LockInformation
3029                 If the method is called asynchronously,
3030                 returns the request thread.
3031        """
3032        kwargs['_return_http_data_only'] = True
3033        if kwargs.get('callback'):
3034            return self.get_lock_with_http_info(account_id, template_id, **kwargs)
3035        else:
3036            (data) = self.get_lock_with_http_info(account_id, template_id, **kwargs)
3037            return data
3038
3039    def get_lock_with_http_info(self, account_id, template_id, **kwargs):
3040        """
3041        Gets template lock information.
3042        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.
3043        This method makes a synchronous HTTP request by default. To make an
3044        asynchronous HTTP request, please define a `callback` function
3045        to be invoked when receiving the response.
3046        >>> def callback_function(response):
3047        >>>     pprint(response)
3048        >>>
3049        >>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function)
3050
3051        :param callback function: The callback function
3052            for asynchronous request. (optional)
3053        :param str account_id: The external account number (int) or account ID Guid. (required)
3054        :param str template_id: The ID of the template being accessed. (required)
3055        :return: LockInformation
3056                 If the method is called asynchronously,
3057                 returns the request thread.
3058        """
3059
3060        all_params = ['account_id', 'template_id']
3061        all_params.append('callback')
3062        all_params.append('_return_http_data_only')
3063        all_params.append('_preload_content')
3064        all_params.append('_request_timeout')
3065
3066        params = locals()
3067        for key, val in iteritems(params['kwargs']):
3068            if key not in all_params:
3069                raise TypeError(
3070                    "Got an unexpected keyword argument '%s'"
3071                    " to method get_lock" % key
3072                )
3073            params[key] = val
3074        del params['kwargs']
3075        # verify the required parameter 'account_id' is set
3076        if ('account_id' not in params) or (params['account_id'] is None):
3077            raise ValueError("Missing the required parameter `account_id` when calling `get_lock`")
3078        # verify the required parameter 'template_id' is set
3079        if ('template_id' not in params) or (params['template_id'] is None):
3080            raise ValueError("Missing the required parameter `template_id` when calling `get_lock`")
3081
3082
3083        collection_formats = {}
3084
3085        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
3086        path_params = {}
3087        if 'account_id' in params:
3088            path_params['accountId'] = params['account_id']
3089        if 'template_id' in params:
3090            path_params['templateId'] = params['template_id']
3091
3092        query_params = {}
3093
3094        header_params = {}
3095
3096        form_params = []
3097        local_var_files = {}
3098
3099        body_params = None
3100        # HTTP header `Accept`
3101        header_params['Accept'] = self.api_client.\
3102            select_header_accept(['application/json'])
3103
3104        # Authentication setting
3105        auth_settings = []
3106
3107        return self.api_client.call_api(resource_path, 'GET',
3108                                        path_params,
3109                                        query_params,
3110                                        header_params,
3111                                        body=body_params,
3112                                        post_params=form_params,
3113                                        files=local_var_files,
3114                                        response_type='LockInformation',
3115                                        auth_settings=auth_settings,
3116                                        callback=params.get('callback'),
3117                                        _return_http_data_only=params.get('_return_http_data_only'),
3118                                        _preload_content=params.get('_preload_content', True),
3119                                        _request_timeout=params.get('_request_timeout'),
3120                                        collection_formats=collection_formats)
3121
3122    def get_notification_settings(self, account_id, template_id, **kwargs):
3123        """
3124        Gets template notification information.
3125        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3126        This method makes a synchronous HTTP request by default. To make an
3127        asynchronous HTTP request, please define a `callback` function
3128        to be invoked when receiving the response.
3129        >>> def callback_function(response):
3130        >>>     pprint(response)
3131        >>>
3132        >>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function)
3133
3134        :param callback function: The callback function
3135            for asynchronous request. (optional)
3136        :param str account_id: The external account number (int) or account ID Guid. (required)
3137        :param str template_id: The ID of the template being accessed. (required)
3138        :return: Notification
3139                 If the method is called asynchronously,
3140                 returns the request thread.
3141        """
3142        kwargs['_return_http_data_only'] = True
3143        if kwargs.get('callback'):
3144            return self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3145        else:
3146            (data) = self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3147            return data
3148
3149    def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
3150        """
3151        Gets template notification information.
3152        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3153        This method makes a synchronous HTTP request by default. To make an
3154        asynchronous HTTP request, please define a `callback` function
3155        to be invoked when receiving the response.
3156        >>> def callback_function(response):
3157        >>>     pprint(response)
3158        >>>
3159        >>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
3160
3161        :param callback function: The callback function
3162            for asynchronous request. (optional)
3163        :param str account_id: The external account number (int) or account ID Guid. (required)
3164        :param str template_id: The ID of the template being accessed. (required)
3165        :return: Notification
3166                 If the method is called asynchronously,
3167                 returns the request thread.
3168        """
3169
3170        all_params = ['account_id', 'template_id']
3171        all_params.append('callback')
3172        all_params.append('_return_http_data_only')
3173        all_params.append('_preload_content')
3174        all_params.append('_request_timeout')
3175
3176        params = locals()
3177        for key, val in iteritems(params['kwargs']):
3178            if key not in all_params:
3179                raise TypeError(
3180                    "Got an unexpected keyword argument '%s'"
3181                    " to method get_notification_settings" % key
3182                )
3183            params[key] = val
3184        del params['kwargs']
3185        # verify the required parameter 'account_id' is set
3186        if ('account_id' not in params) or (params['account_id'] is None):
3187            raise ValueError("Missing the required parameter `account_id` when calling `get_notification_settings`")
3188        # verify the required parameter 'template_id' is set
3189        if ('template_id' not in params) or (params['template_id'] is None):
3190            raise ValueError("Missing the required parameter `template_id` when calling `get_notification_settings`")
3191
3192
3193        collection_formats = {}
3194
3195        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
3196        path_params = {}
3197        if 'account_id' in params:
3198            path_params['accountId'] = params['account_id']
3199        if 'template_id' in params:
3200            path_params['templateId'] = params['template_id']
3201
3202        query_params = {}
3203
3204        header_params = {}
3205
3206        form_params = []
3207        local_var_files = {}
3208
3209        body_params = None
3210        # HTTP header `Accept`
3211        header_params['Accept'] = self.api_client.\
3212            select_header_accept(['application/json'])
3213
3214        # Authentication setting
3215        auth_settings = []
3216
3217        return self.api_client.call_api(resource_path, 'GET',
3218                                        path_params,
3219                                        query_params,
3220                                        header_params,
3221                                        body=body_params,
3222                                        post_params=form_params,
3223                                        files=local_var_files,
3224                                        response_type='Notification',
3225                                        auth_settings=auth_settings,
3226                                        callback=params.get('callback'),
3227                                        _return_http_data_only=params.get('_return_http_data_only'),
3228                                        _preload_content=params.get('_preload_content', True),
3229                                        _request_timeout=params.get('_request_timeout'),
3230                                        collection_formats=collection_formats)
3231
3232    def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs):
3233        """
3234        Returns tabs on the specified page.
3235        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3236        This method makes a synchronous HTTP request by default. To make an
3237        asynchronous HTTP request, please define a `callback` function
3238        to be invoked when receiving the response.
3239        >>> def callback_function(response):
3240        >>>     pprint(response)
3241        >>>
3242        >>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function)
3243
3244        :param callback function: The callback function
3245            for asynchronous request. (optional)
3246        :param str account_id: The external account number (int) or account ID Guid. (required)
3247        :param str document_id: The ID of the document being accessed. (required)
3248        :param str page_number: The page number being accessed. (required)
3249        :param str template_id: The ID of the template being accessed. (required)
3250        :return: Tabs
3251                 If the method is called asynchronously,
3252                 returns the request thread.
3253        """
3254        kwargs['_return_http_data_only'] = True
3255        if kwargs.get('callback'):
3256            return self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3257        else:
3258            (data) = self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3259            return data
3260
3261    def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
3262        """
3263        Returns tabs on the specified page.
3264        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3265        This method makes a synchronous HTTP request by default. To make an
3266        asynchronous HTTP request, please define a `callback` function
3267        to be invoked when receiving the response.
3268        >>> def callback_function(response):
3269        >>>     pprint(response)
3270        >>>
3271        >>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
3272
3273        :param callback function: The callback function
3274            for asynchronous request. (optional)
3275        :param str account_id: The external account number (int) or account ID Guid. (required)
3276        :param str document_id: The ID of the document being accessed. (required)
3277        :param str page_number: The page number being accessed. (required)
3278        :param str template_id: The ID of the template being accessed. (required)
3279        :return: Tabs
3280                 If the method is called asynchronously,
3281                 returns the request thread.
3282        """
3283
3284        all_params = ['account_id', 'document_id', 'page_number', 'template_id']
3285        all_params.append('callback')
3286        all_params.append('_return_http_data_only')
3287        all_params.append('_preload_content')
3288        all_params.append('_request_timeout')
3289
3290        params = locals()
3291        for key, val in iteritems(params['kwargs']):
3292            if key not in all_params:
3293                raise TypeError(
3294                    "Got an unexpected keyword argument '%s'"
3295                    " to method get_page_tabs" % key
3296                )
3297            params[key] = val
3298        del params['kwargs']
3299        # verify the required parameter 'account_id' is set
3300        if ('account_id' not in params) or (params['account_id'] is None):
3301            raise ValueError("Missing the required parameter `account_id` when calling `get_page_tabs`")
3302        # verify the required parameter 'document_id' is set
3303        if ('document_id' not in params) or (params['document_id'] is None):
3304            raise ValueError("Missing the required parameter `document_id` when calling `get_page_tabs`")
3305        # verify the required parameter 'page_number' is set
3306        if ('page_number' not in params) or (params['page_number'] is None):
3307            raise ValueError("Missing the required parameter `page_number` when calling `get_page_tabs`")
3308        # verify the required parameter 'template_id' is set
3309        if ('template_id' not in params) or (params['template_id'] is None):
3310            raise ValueError("Missing the required parameter `template_id` when calling `get_page_tabs`")
3311
3312
3313        collection_formats = {}
3314
3315        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs'.replace('{format}', 'json')
3316        path_params = {}
3317        if 'account_id' in params:
3318            path_params['accountId'] = params['account_id']
3319        if 'document_id' in params:
3320            path_params['documentId'] = params['document_id']
3321        if 'page_number' in params:
3322            path_params['pageNumber'] = params['page_number']
3323        if 'template_id' in params:
3324            path_params['templateId'] = params['template_id']
3325
3326        query_params = {}
3327
3328        header_params = {}
3329
3330        form_params = []
3331        local_var_files = {}
3332
3333        body_params = None
3334        # HTTP header `Accept`
3335        header_params['Accept'] = self.api_client.\
3336            select_header_accept(['application/json'])
3337
3338        # Authentication setting
3339        auth_settings = []
3340
3341        return self.api_client.call_api(resource_path, 'GET',
3342                                        path_params,
3343                                        query_params,
3344                                        header_params,
3345                                        body=body_params,
3346                                        post_params=form_params,
3347                                        files=local_var_files,
3348                                        response_type='Tabs',
3349                                        auth_settings=auth_settings,
3350                                        callback=params.get('callback'),
3351                                        _return_http_data_only=params.get('_return_http_data_only'),
3352                                        _preload_content=params.get('_preload_content', True),
3353                                        _request_timeout=params.get('_request_timeout'),
3354                                        collection_formats=collection_formats)
3355
3356    def get_pages(self, account_id, document_id, template_id, **kwargs):
3357        """
3358        Returns document page image(s) based on input.
3359        Returns images of the pages in a template document for display based on the parameters that you specify.
3360        This method makes a synchronous HTTP request by default. To make an
3361        asynchronous HTTP request, please define a `callback` function
3362        to be invoked when receiving the response.
3363        >>> def callback_function(response):
3364        >>>     pprint(response)
3365        >>>
3366        >>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function)
3367
3368        :param callback function: The callback function
3369            for asynchronous request. (optional)
3370        :param str account_id: The external account number (int) or account ID Guid. (required)
3371        :param str document_id: The ID of the document being accessed. (required)
3372        :param str template_id: The ID of the template being accessed. (required)
3373        :param str count:
3374        :param str dpi:
3375        :param str max_height:
3376        :param str max_width:
3377        :param str nocache:
3378        :param str show_changes:
3379        :param str start_position:
3380        :return: PageImages
3381                 If the method is called asynchronously,
3382                 returns the request thread.
3383        """
3384        kwargs['_return_http_data_only'] = True
3385        if kwargs.get('callback'):
3386            return self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3387        else:
3388            (data) = self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3389            return data
3390
3391    def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs):
3392        """
3393        Returns document page image(s) based on input.
3394        Returns images of the pages in a template document for display based on the parameters that you specify.
3395        This method makes a synchronous HTTP request by default. To make an
3396        asynchronous HTTP request, please define a `callback` function
3397        to be invoked when receiving the response.
3398        >>> def callback_function(response):
3399        >>>     pprint(response)
3400        >>>
3401        >>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function)
3402
3403        :param callback function: The callback function
3404            for asynchronous request. (optional)
3405        :param str account_id: The external account number (int) or account ID Guid. (required)
3406        :param str document_id: The ID of the document being accessed. (required)
3407        :param str template_id: The ID of the template being accessed. (required)
3408        :param str count:
3409        :param str dpi:
3410        :param str max_height:
3411        :param str max_width:
3412        :param str nocache:
3413        :param str show_changes:
3414        :param str start_position:
3415        :return: PageImages
3416                 If the method is called asynchronously,
3417                 returns the request thread.
3418        """
3419
3420        all_params = ['account_id', 'document_id', 'template_id', 'count', 'dpi', 'max_height', 'max_width', 'nocache', 'show_changes', 'start_position']
3421        all_params.append('callback')
3422        all_params.append('_return_http_data_only')
3423        all_params.append('_preload_content')
3424        all_params.append('_request_timeout')
3425
3426        params = locals()
3427        for key, val in iteritems(params['kwargs']):
3428            if key not in all_params:
3429                raise TypeError(
3430                    "Got an unexpected keyword argument '%s'"
3431                    " to method get_pages" % key
3432                )
3433            params[key] = val
3434        del params['kwargs']
3435        # verify the required parameter 'account_id' is set
3436        if ('account_id' not in params) or (params['account_id'] is None):
3437            raise ValueError("Missing the required parameter `account_id` when calling `get_pages`")
3438        # verify the required parameter 'document_id' is set
3439        if ('document_id' not in params) or (params['document_id'] is None):
3440            raise ValueError("Missing the required parameter `document_id` when calling `get_pages`")
3441        # verify the required parameter 'template_id' is set
3442        if ('template_id' not in params) or (params['template_id'] is None):
3443            raise ValueError("Missing the required parameter `template_id` when calling `get_pages`")
3444
3445
3446        collection_formats = {}
3447
3448        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages'.replace('{format}', 'json')
3449        path_params = {}
3450        if 'account_id' in params:
3451            path_params['accountId'] = params['account_id']
3452        if 'document_id' in params:
3453            path_params['documentId'] = params['document_id']
3454        if 'template_id' in params:
3455            path_params['templateId'] = params['template_id']
3456
3457        query_params = {}
3458        if 'count' in params:
3459            query_params['count'] = params['count']
3460        if 'dpi' in params:
3461            query_params['dpi'] = params['dpi']
3462        if 'max_height' in params:
3463            query_params['max_height'] = params['max_height']
3464        if 'max_width' in params:
3465            query_params['max_width'] = params['max_width']
3466        if 'nocache' in params:
3467            query_params['nocache'] = params['nocache']
3468        if 'show_changes' in params:
3469            query_params['show_changes'] = params['show_changes']
3470        if 'start_position' in params:
3471            query_params['start_position'] = params['start_position']
3472
3473        header_params = {}
3474
3475        form_params = []
3476        local_var_files = {}
3477
3478        body_params = None
3479        # HTTP header `Accept`
3480        header_params['Accept'] = self.api_client.\
3481            select_header_accept(['application/json'])
3482
3483        # Authentication setting
3484        auth_settings = []
3485
3486        return self.api_client.call_api(resource_path, 'GET',
3487                                        path_params,
3488                                        query_params,
3489                                        header_params,
3490                                        body=body_params,
3491                                        post_params=form_params,
3492                                        files=local_var_files,
3493                                        response_type='PageImages',
3494                                        auth_settings=auth_settings,
3495                                        callback=params.get('callback'),
3496                                        _return_http_data_only=params.get('_return_http_data_only'),
3497                                        _preload_content=params.get('_preload_content', True),
3498                                        _request_timeout=params.get('_request_timeout'),
3499                                        collection_formats=collection_formats)
3500
3501    def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs):
3502        """
3503        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3504        
3505        This method makes a synchronous HTTP request by default. To make an
3506        asynchronous HTTP request, please define a `callback` function
3507        to be invoked when receiving the response.
3508        >>> def callback_function(response):
3509        >>>     pprint(response)
3510        >>>
3511        >>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function)
3512
3513        :param callback function: The callback function
3514            for asynchronous request. (optional)
3515        :param str account_id: The external account number (int) or account ID Guid. (required)
3516        :param str document_id: The ID of the document being accessed. (required)
3517        :param str template_id: The ID of the template being accessed. (required)
3518        :return: DocumentHtmlDefinitionOriginals
3519                 If the method is called asynchronously,
3520                 returns the request thread.
3521        """
3522        kwargs['_return_http_data_only'] = True
3523        if kwargs.get('callback'):
3524            return self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3525        else:
3526            (data) = self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3527            return data
3528
3529    def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs):
3530        """
3531        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3532        
3533        This method makes a synchronous HTTP request by default. To make an
3534        asynchronous HTTP request, please define a `callback` function
3535        to be invoked when receiving the response.
3536        >>> def callback_function(response):
3537        >>>     pprint(response)
3538        >>>
3539        >>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function)
3540
3541        :param callback function: The callback function
3542            for asynchronous request. (optional)
3543        :param str account_id: The external account number (int) or account ID Guid. (required)
3544        :param str document_id: The ID of the document being accessed. (required)
3545        :param str template_id: The ID of the template being accessed. (required)
3546        :return: DocumentHtmlDefinitionOriginals
3547                 If the method is called asynchronously,
3548                 returns the request thread.
3549        """
3550
3551        all_params = ['account_id', 'document_id', 'template_id']
3552        all_params.append('callback')
3553        all_params.append('_return_http_data_only')
3554        all_params.append('_preload_content')
3555        all_params.append('_request_timeout')
3556
3557        params = locals()
3558        for key, val in iteritems(params['kwargs']):
3559            if key not in all_params:
3560                raise TypeError(
3561                    "Got an unexpected keyword argument '%s'"
3562                    " to method get_template_document_html_definitions" % key
3563                )
3564            params[key] = val
3565        del params['kwargs']
3566        # verify the required parameter 'account_id' is set
3567        if ('account_id' not in params) or (params['account_id'] is None):
3568            raise ValueError("Missing the required parameter `account_id` when calling `get_template_document_html_definitions`")
3569        # verify the required parameter 'document_id' is set
3570        if ('document_id' not in params) or (params['document_id'] is None):
3571            raise ValueError("Missing the required parameter `document_id` when calling `get_template_document_html_definitions`")
3572        # verify the required parameter 'template_id' is set
3573        if ('template_id' not in params) or (params['template_id'] is None):
3574            raise ValueError("Missing the required parameter `template_id` when calling `get_template_document_html_definitions`")
3575
3576
3577        collection_formats = {}
3578
3579        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions'.replace('{format}', 'json')
3580        path_params = {}
3581        if 'account_id' in params:
3582            path_params['accountId'] = params['account_id']
3583        if 'document_id' in params:
3584            path_params['documentId'] = params['document_id']
3585        if 'template_id' in params:
3586            path_params['templateId'] = params['template_id']
3587
3588        query_params = {}
3589
3590        header_params = {}
3591
3592        form_params = []
3593        local_var_files = {}
3594
3595        body_params = None
3596        # HTTP header `Accept`
3597        header_params['Accept'] = self.api_client.\
3598            select_header_accept(['application/json'])
3599
3600        # Authentication setting
3601        auth_settings = []
3602
3603        return self.api_client.call_api(resource_path, 'GET',
3604                                        path_params,
3605                                        query_params,
3606                                        header_params,
3607                                        body=body_params,
3608                                        post_params=form_params,
3609                                        files=local_var_files,
3610                                        response_type='DocumentHtmlDefinitionOriginals',
3611                                        auth_settings=auth_settings,
3612                                        callback=params.get('callback'),
3613                                        _return_http_data_only=params.get('_return_http_data_only'),
3614                                        _preload_content=params.get('_preload_content', True),
3615                                        _request_timeout=params.get('_request_timeout'),
3616                                        collection_formats=collection_formats)
3617
3618    def get_template_html_definitions(self, account_id, template_id, **kwargs):
3619        """
3620        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3621        
3622        This method makes a synchronous HTTP request by default. To make an
3623        asynchronous HTTP request, please define a `callback` function
3624        to be invoked when receiving the response.
3625        >>> def callback_function(response):
3626        >>>     pprint(response)
3627        >>>
3628        >>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function)
3629
3630        :param callback function: The callback function
3631            for asynchronous request. (optional)
3632        :param str account_id: The external account number (int) or account ID Guid. (required)
3633        :param str template_id: The ID of the template being accessed. (required)
3634        :return: DocumentHtmlDefinitionOriginals
3635                 If the method is called asynchronously,
3636                 returns the request thread.
3637        """
3638        kwargs['_return_http_data_only'] = True
3639        if kwargs.get('callback'):
3640            return self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3641        else:
3642            (data) = self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3643            return data
3644
3645    def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs):
3646        """
3647        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3648        
3649        This method makes a synchronous HTTP request by default. To make an
3650        asynchronous HTTP request, please define a `callback` function
3651        to be invoked when receiving the response.
3652        >>> def callback_function(response):
3653        >>>     pprint(response)
3654        >>>
3655        >>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function)
3656
3657        :param callback function: The callback function
3658            for asynchronous request. (optional)
3659        :param str account_id: The external account number (int) or account ID Guid. (required)
3660        :param str template_id: The ID of the template being accessed. (required)
3661        :return: DocumentHtmlDefinitionOriginals
3662                 If the method is called asynchronously,
3663                 returns the request thread.
3664        """
3665
3666        all_params = ['account_id', 'template_id']
3667        all_params.append('callback')
3668        all_params.append('_return_http_data_only')
3669        all_params.append('_preload_content')
3670        all_params.append('_request_timeout')
3671
3672        params = locals()
3673        for key, val in iteritems(params['kwargs']):
3674            if key not in all_params:
3675                raise TypeError(
3676                    "Got an unexpected keyword argument '%s'"
3677                    " to method get_template_html_definitions" % key
3678                )
3679            params[key] = val
3680        del params['kwargs']
3681        # verify the required parameter 'account_id' is set
3682        if ('account_id' not in params) or (params['account_id'] is None):
3683            raise ValueError("Missing the required parameter `account_id` when calling `get_template_html_definitions`")
3684        # verify the required parameter 'template_id' is set
3685        if ('template_id' not in params) or (params['template_id'] is None):
3686            raise ValueError("Missing the required parameter `template_id` when calling `get_template_html_definitions`")
3687
3688
3689        collection_formats = {}
3690
3691        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions'.replace('{format}', 'json')
3692        path_params = {}
3693        if 'account_id' in params:
3694            path_params['accountId'] = params['account_id']
3695        if 'template_id' in params:
3696            path_params['templateId'] = params['template_id']
3697
3698        query_params = {}
3699
3700        header_params = {}
3701
3702        form_params = []
3703        local_var_files = {}
3704
3705        body_params = None
3706        # HTTP header `Accept`
3707        header_params['Accept'] = self.api_client.\
3708            select_header_accept(['application/json'])
3709
3710        # Authentication setting
3711        auth_settings = []
3712
3713        return self.api_client.call_api(resource_path, 'GET',
3714                                        path_params,
3715                                        query_params,
3716                                        header_params,
3717                                        body=body_params,
3718                                        post_params=form_params,
3719                                        files=local_var_files,
3720                                        response_type='DocumentHtmlDefinitionOriginals',
3721                                        auth_settings=auth_settings,
3722                                        callback=params.get('callback'),
3723                                        _return_http_data_only=params.get('_return_http_data_only'),
3724                                        _preload_content=params.get('_preload_content', True),
3725                                        _request_timeout=params.get('_request_timeout'),
3726                                        collection_formats=collection_formats)
3727
3728    def list_custom_fields(self, account_id, template_id, **kwargs):
3729        """
3730        Gets the custom document fields from a template.
3731        Retrieves the custom document field information from an existing template.
3732        This method makes a synchronous HTTP request by default. To make an
3733        asynchronous HTTP request, please define a `callback` function
3734        to be invoked when receiving the response.
3735        >>> def callback_function(response):
3736        >>>     pprint(response)
3737        >>>
3738        >>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function)
3739
3740        :param callback function: The callback function
3741            for asynchronous request. (optional)
3742        :param str account_id: The external account number (int) or account ID Guid. (required)
3743        :param str template_id: The ID of the template being accessed. (required)
3744        :return: CustomFields
3745                 If the method is called asynchronously,
3746                 returns the request thread.
3747        """
3748        kwargs['_return_http_data_only'] = True
3749        if kwargs.get('callback'):
3750            return self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3751        else:
3752            (data) = self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3753            return data
3754
3755    def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
3756        """
3757        Gets the custom document fields from a template.
3758        Retrieves the custom document field information from an existing template.
3759        This method makes a synchronous HTTP request by default. To make an
3760        asynchronous HTTP request, please define a `callback` function
3761        to be invoked when receiving the response.
3762        >>> def callback_function(response):
3763        >>>     pprint(response)
3764        >>>
3765        >>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
3766
3767        :param callback function: The callback function
3768            for asynchronous request. (optional)
3769        :param str account_id: The external account number (int) or account ID Guid. (required)
3770        :param str template_id: The ID of the template being accessed. (required)
3771        :return: CustomFields
3772                 If the method is called asynchronously,
3773                 returns the request thread.
3774        """
3775
3776        all_params = ['account_id', 'template_id']
3777        all_params.append('callback')
3778        all_params.append('_return_http_data_only')
3779        all_params.append('_preload_content')
3780        all_params.append('_request_timeout')
3781
3782        params = locals()
3783        for key, val in iteritems(params['kwargs']):
3784            if key not in all_params:
3785                raise TypeError(
3786                    "Got an unexpected keyword argument '%s'"
3787                    " to method list_custom_fields" % key
3788                )
3789            params[key] = val
3790        del params['kwargs']
3791        # verify the required parameter 'account_id' is set
3792        if ('account_id' not in params) or (params['account_id'] is None):
3793            raise ValueError("Missing the required parameter `account_id` when calling `list_custom_fields`")
3794        # verify the required parameter 'template_id' is set
3795        if ('template_id' not in params) or (params['template_id'] is None):
3796            raise ValueError("Missing the required parameter `template_id` when calling `list_custom_fields`")
3797
3798
3799        collection_formats = {}
3800
3801        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
3802        path_params = {}
3803        if 'account_id' in params:
3804            path_params['accountId'] = params['account_id']
3805        if 'template_id' in params:
3806            path_params['templateId'] = params['template_id']
3807
3808        query_params = {}
3809
3810        header_params = {}
3811
3812        form_params = []
3813        local_var_files = {}
3814
3815        body_params = None
3816        # HTTP header `Accept`
3817        header_params['Accept'] = self.api_client.\
3818            select_header_accept(['application/json'])
3819
3820        # Authentication setting
3821        auth_settings = []
3822
3823        return self.api_client.call_api(resource_path, 'GET',
3824                                        path_params,
3825                                        query_params,
3826                                        header_params,
3827                                        body=body_params,
3828                                        post_params=form_params,
3829                                        files=local_var_files,
3830                                        response_type='CustomFields',
3831                                        auth_settings=auth_settings,
3832                                        callback=params.get('callback'),
3833                                        _return_http_data_only=params.get('_return_http_data_only'),
3834                                        _preload_content=params.get('_preload_content', True),
3835                                        _request_timeout=params.get('_request_timeout'),
3836                                        collection_formats=collection_formats)
3837
3838    def list_document_fields(self, account_id, document_id, template_id, **kwargs):
3839        """
3840        Gets the custom document fields for a an existing template document.
3841        Retrieves the custom document fields for an existing template document.
3842        This method makes a synchronous HTTP request by default. To make an
3843        asynchronous HTTP request, please define a `callback` function
3844        to be invoked when receiving the response.
3845        >>> def callback_function(response):
3846        >>>     pprint(response)
3847        >>>
3848        >>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function)
3849
3850        :param callback function: The callback function
3851            for asynchronous request. (optional)
3852        :param str account_id: The external account number (int) or account ID Guid. (required)
3853        :param str document_id: The ID of the document being accessed. (required)
3854        :param str template_id: The ID of the template being accessed. (required)
3855        :return: DocumentFieldsInformation
3856                 If the method is called asynchronously,
3857                 returns the request thread.
3858        """
3859        kwargs['_return_http_data_only'] = True
3860        if kwargs.get('callback'):
3861            return self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
3862        else:
3863            (data) = self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
3864            return data
3865
3866    def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
3867        """
3868        Gets the custom document fields for a an existing template document.
3869        Retrieves the custom document fields for an existing template document.
3870        This method makes a synchronous HTTP request by default. To make an
3871        asynchronous HTTP request, please define a `callback` function
3872        to be invoked when receiving the response.
3873        >>> def callback_function(response):
3874        >>>     pprint(response)
3875        >>>
3876        >>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
3877
3878        :param callback function: The callback function
3879            for asynchronous request. (optional)
3880        :param str account_id: The external account number (int) or account ID Guid. (required)
3881        :param str document_id: The ID of the document being accessed. (required)
3882        :param str template_id: The ID of the template being accessed. (required)
3883        :return: DocumentFieldsInformation
3884                 If the method is called asynchronously,
3885                 returns the request thread.
3886        """
3887
3888        all_params = ['account_id', 'document_id', 'template_id']
3889        all_params.append('callback')
3890        all_params.append('_return_http_data_only')
3891        all_params.append('_preload_content')
3892        all_params.append('_request_timeout')
3893
3894        params = locals()
3895        for key, val in iteritems(params['kwargs']):
3896            if key not in all_params:
3897                raise TypeError(
3898                    "Got an unexpected keyword argument '%s'"
3899                    " to method list_document_fields" % key
3900                )
3901            params[key] = val
3902        del params['kwargs']
3903        # verify the required parameter 'account_id' is set
3904        if ('account_id' not in params) or (params['account_id'] is None):
3905            raise ValueError("Missing the required parameter `account_id` when calling `list_document_fields`")
3906        # verify the required parameter 'document_id' is set
3907        if ('document_id' not in params) or (params['document_id'] is None):
3908            raise ValueError("Missing the required parameter `document_id` when calling `list_document_fields`")
3909        # verify the required parameter 'template_id' is set
3910        if ('template_id' not in params) or (params['template_id'] is None):
3911            raise ValueError("Missing the required parameter `template_id` when calling `list_document_fields`")
3912
3913
3914        collection_formats = {}
3915
3916        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
3917        path_params = {}
3918        if 'account_id' in params:
3919            path_params['accountId'] = params['account_id']
3920        if 'document_id' in params:
3921            path_params['documentId'] = params['document_id']
3922        if 'template_id' in params:
3923            path_params['templateId'] = params['template_id']
3924
3925        query_params = {}
3926
3927        header_params = {}
3928
3929        form_params = []
3930        local_var_files = {}
3931
3932        body_params = None
3933        # HTTP header `Accept`
3934        header_params['Accept'] = self.api_client.\
3935            select_header_accept(['application/json'])
3936
3937        # Authentication setting
3938        auth_settings = []
3939
3940        return self.api_client.call_api(resource_path, 'GET',
3941                                        path_params,
3942                                        query_params,
3943                                        header_params,
3944                                        body=body_params,
3945                                        post_params=form_params,
3946                                        files=local_var_files,
3947                                        response_type='DocumentFieldsInformation',
3948                                        auth_settings=auth_settings,
3949                                        callback=params.get('callback'),
3950                                        _return_http_data_only=params.get('_return_http_data_only'),
3951                                        _preload_content=params.get('_preload_content', True),
3952                                        _request_timeout=params.get('_request_timeout'),
3953                                        collection_formats=collection_formats)
3954
3955    def list_documents(self, account_id, template_id, **kwargs):
3956        """
3957        Gets a list of documents associated with a template.
3958        Retrieves a list of documents associated with the specified template.
3959        This method makes a synchronous HTTP request by default. To make an
3960        asynchronous HTTP request, please define a `callback` function
3961        to be invoked when receiving the response.
3962        >>> def callback_function(response):
3963        >>>     pprint(response)
3964        >>>
3965        >>> thread = api.list_documents(account_id, template_id, callback=callback_function)
3966
3967        :param callback function: The callback function
3968            for asynchronous request. (optional)
3969        :param str account_id: The external account number (int) or account ID Guid. (required)
3970        :param str template_id: The ID of the template being accessed. (required)
3971        :param str include_tabs:
3972        :return: TemplateDocumentsResult
3973                 If the method is called asynchronously,
3974                 returns the request thread.
3975        """
3976        kwargs['_return_http_data_only'] = True
3977        if kwargs.get('callback'):
3978            return self.list_documents_with_http_info(account_id, template_id, **kwargs)
3979        else:
3980            (data) = self.list_documents_with_http_info(account_id, template_id, **kwargs)
3981            return data
3982
3983    def list_documents_with_http_info(self, account_id, template_id, **kwargs):
3984        """
3985        Gets a list of documents associated with a template.
3986        Retrieves a list of documents associated with the specified template.
3987        This method makes a synchronous HTTP request by default. To make an
3988        asynchronous HTTP request, please define a `callback` function
3989        to be invoked when receiving the response.
3990        >>> def callback_function(response):
3991        >>>     pprint(response)
3992        >>>
3993        >>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function)
3994
3995        :param callback function: The callback function
3996            for asynchronous request. (optional)
3997        :param str account_id: The external account number (int) or account ID Guid. (required)
3998        :param str template_id: The ID of the template being accessed. (required)
3999        :param str include_tabs:
4000        :return: TemplateDocumentsResult
4001                 If the method is called asynchronously,
4002                 returns the request thread.
4003        """
4004
4005        all_params = ['account_id', 'template_id', 'include_tabs']
4006        all_params.append('callback')
4007        all_params.append('_return_http_data_only')
4008        all_params.append('_preload_content')
4009        all_params.append('_request_timeout')
4010
4011        params = locals()
4012        for key, val in iteritems(params['kwargs']):
4013            if key not in all_params:
4014                raise TypeError(
4015                    "Got an unexpected keyword argument '%s'"
4016                    " to method list_documents" % key
4017                )
4018            params[key] = val
4019        del params['kwargs']
4020        # verify the required parameter 'account_id' is set
4021        if ('account_id' not in params) or (params['account_id'] is None):
4022            raise ValueError("Missing the required parameter `account_id` when calling `list_documents`")
4023        # verify the required parameter 'template_id' is set
4024        if ('template_id' not in params) or (params['template_id'] is None):
4025            raise ValueError("Missing the required parameter `template_id` when calling `list_documents`")
4026
4027
4028        collection_formats = {}
4029
4030        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
4031        path_params = {}
4032        if 'account_id' in params:
4033            path_params['accountId'] = params['account_id']
4034        if 'template_id' in params:
4035            path_params['templateId'] = params['template_id']
4036
4037        query_params = {}
4038        if 'include_tabs' in params:
4039            query_params['include_tabs'] = params['include_tabs']
4040
4041        header_params = {}
4042
4043        form_params = []
4044        local_var_files = {}
4045
4046        body_params = None
4047        # HTTP header `Accept`
4048        header_params['Accept'] = self.api_client.\
4049            select_header_accept(['application/json'])
4050
4051        # Authentication setting
4052        auth_settings = []
4053
4054        return self.api_client.call_api(resource_path, 'GET',
4055                                        path_params,
4056                                        query_params,
4057                                        header_params,
4058                                        body=body_params,
4059                                        post_params=form_params,
4060                                        files=local_var_files,
4061                                        response_type='TemplateDocumentsResult',
4062                                        auth_settings=auth_settings,
4063                                        callback=params.get('callback'),
4064                                        _return_http_data_only=params.get('_return_http_data_only'),
4065                                        _preload_content=params.get('_preload_content', True),
4066                                        _request_timeout=params.get('_request_timeout'),
4067                                        collection_formats=collection_formats)
4068
4069    def list_recipients(self, account_id, template_id, **kwargs):
4070        """
4071        Gets recipient information from a template.
4072        Retrieves the information for all recipients in the specified template.
4073        This method makes a synchronous HTTP request by default. To make an
4074        asynchronous HTTP request, please define a `callback` function
4075        to be invoked when receiving the response.
4076        >>> def callback_function(response):
4077        >>>     pprint(response)
4078        >>>
4079        >>> thread = api.list_recipients(account_id, template_id, callback=callback_function)
4080
4081        :param callback function: The callback function
4082            for asynchronous request. (optional)
4083        :param str account_id: The external account number (int) or account ID Guid. (required)
4084        :param str template_id: The ID of the template being accessed. (required)
4085        :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. 
4086        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4087        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4088        :return: Recipients
4089                 If the method is called asynchronously,
4090                 returns the request thread.
4091        """
4092        kwargs['_return_http_data_only'] = True
4093        if kwargs.get('callback'):
4094            return self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4095        else:
4096            (data) = self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4097            return data
4098
4099    def list_recipients_with_http_info(self, account_id, template_id, **kwargs):
4100        """
4101        Gets recipient information from a template.
4102        Retrieves the information for all recipients in the specified template.
4103        This method makes a synchronous HTTP request by default. To make an
4104        asynchronous HTTP request, please define a `callback` function
4105        to be invoked when receiving the response.
4106        >>> def callback_function(response):
4107        >>>     pprint(response)
4108        >>>
4109        >>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function)
4110
4111        :param callback function: The callback function
4112            for asynchronous request. (optional)
4113        :param str account_id: The external account number (int) or account ID Guid. (required)
4114        :param str template_id: The ID of the template being accessed. (required)
4115        :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. 
4116        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4117        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4118        :return: Recipients
4119                 If the method is called asynchronously,
4120                 returns the request thread.
4121        """
4122
4123        all_params = ['account_id', 'template_id', 'include_anchor_tab_locations', 'include_extended', 'include_tabs']
4124        all_params.append('callback')
4125        all_params.append('_return_http_data_only')
4126        all_params.append('_preload_content')
4127        all_params.append('_request_timeout')
4128
4129        params = locals()
4130        for key, val in iteritems(params['kwargs']):
4131            if key not in all_params:
4132                raise TypeError(
4133                    "Got an unexpected keyword argument '%s'"
4134                    " to method list_recipients" % key
4135                )
4136            params[key] = val
4137        del params['kwargs']
4138        # verify the required parameter 'account_id' is set
4139        if ('account_id' not in params) or (params['account_id'] is None):
4140            raise ValueError("Missing the required parameter `account_id` when calling `list_recipients`")
4141        # verify the required parameter 'template_id' is set
4142        if ('template_id' not in params) or (params['template_id'] is None):
4143            raise ValueError("Missing the required parameter `template_id` when calling `list_recipients`")
4144
4145
4146        collection_formats = {}
4147
4148        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
4149        path_params = {}
4150        if 'account_id' in params:
4151            path_params['accountId'] = params['account_id']
4152        if 'template_id' in params:
4153            path_params['templateId'] = params['template_id']
4154
4155        query_params = {}
4156        if 'include_anchor_tab_locations' in params:
4157            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4158        if 'include_extended' in params:
4159            query_params['include_extended'] = params['include_extended']
4160        if 'include_tabs' in params:
4161            query_params['include_tabs'] = params['include_tabs']
4162
4163        header_params = {}
4164
4165        form_params = []
4166        local_var_files = {}
4167
4168        body_params = None
4169        # HTTP header `Accept`
4170        header_params['Accept'] = self.api_client.\
4171            select_header_accept(['application/json'])
4172
4173        # Authentication setting
4174        auth_settings = []
4175
4176        return self.api_client.call_api(resource_path, 'GET',
4177                                        path_params,
4178                                        query_params,
4179                                        header_params,
4180                                        body=body_params,
4181                                        post_params=form_params,
4182                                        files=local_var_files,
4183                                        response_type='Recipients',
4184                                        auth_settings=auth_settings,
4185                                        callback=params.get('callback'),
4186                                        _return_http_data_only=params.get('_return_http_data_only'),
4187                                        _preload_content=params.get('_preload_content', True),
4188                                        _request_timeout=params.get('_request_timeout'),
4189                                        collection_formats=collection_formats)
4190
4191    def list_tabs(self, account_id, recipient_id, template_id, **kwargs):
4192        """
4193        Gets the tabs information for a signer or sign-in-person recipient in a template.
4194        Gets the tabs information for a signer or sign-in-person recipient in a template.
4195        This method makes a synchronous HTTP request by default. To make an
4196        asynchronous HTTP request, please define a `callback` function
4197        to be invoked when receiving the response.
4198        >>> def callback_function(response):
4199        >>>     pprint(response)
4200        >>>
4201        >>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function)
4202
4203        :param callback function: The callback function
4204            for asynchronous request. (optional)
4205        :param str account_id: The external account number (int) or account ID Guid. (required)
4206        :param str recipient_id: The ID of the recipient being accessed. (required)
4207        :param str template_id: The ID of the template being accessed. (required)
4208        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4209        :param str include_metadata:
4210        :return: Tabs
4211                 If the method is called asynchronously,
4212                 returns the request thread.
4213        """
4214        kwargs['_return_http_data_only'] = True
4215        if kwargs.get('callback'):
4216            return self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4217        else:
4218            (data) = self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4219            return data
4220
4221    def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
4222        """
4223        Gets the tabs information for a signer or sign-in-person recipient in a template.
4224        Gets the tabs information for a signer or sign-in-person recipient in a template.
4225        This method makes a synchronous HTTP request by default. To make an
4226        asynchronous HTTP request, please define a `callback` function
4227        to be invoked when receiving the response.
4228        >>> def callback_function(response):
4229        >>>     pprint(response)
4230        >>>
4231        >>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
4232
4233        :param callback function: The callback function
4234            for asynchronous request. (optional)
4235        :param str account_id: The external account number (int) or account ID Guid. (required)
4236        :param str recipient_id: The ID of the recipient being accessed. (required)
4237        :param str template_id: The ID of the template being accessed. (required)
4238        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4239        :param str include_metadata:
4240        :return: Tabs
4241                 If the method is called asynchronously,
4242                 returns the request thread.
4243        """
4244
4245        all_params = ['account_id', 'recipient_id', 'template_id', 'include_anchor_tab_locations', 'include_metadata']
4246        all_params.append('callback')
4247        all_params.append('_return_http_data_only')
4248        all_params.append('_preload_content')
4249        all_params.append('_request_timeout')
4250
4251        params = locals()
4252        for key, val in iteritems(params['kwargs']):
4253            if key not in all_params:
4254                raise TypeError(
4255                    "Got an unexpected keyword argument '%s'"
4256                    " to method list_tabs" % key
4257                )
4258            params[key] = val
4259        del params['kwargs']
4260        # verify the required parameter 'account_id' is set
4261        if ('account_id' not in params) or (params['account_id'] is None):
4262            raise ValueError("Missing the required parameter `account_id` when calling `list_tabs`")
4263        # verify the required parameter 'recipient_id' is set
4264        if ('recipient_id' not in params) or (params['recipient_id'] is None):
4265            raise ValueError("Missing the required parameter `recipient_id` when calling `list_tabs`")
4266        # verify the required parameter 'template_id' is set
4267        if ('template_id' not in params) or (params['template_id'] is None):
4268            raise ValueError("Missing the required parameter `template_id` when calling `list_tabs`")
4269
4270
4271        collection_formats = {}
4272
4273        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
4274        path_params = {}
4275        if 'account_id' in params:
4276            path_params['accountId'] = params['account_id']
4277        if 'recipient_id' in params:
4278            path_params['recipientId'] = params['recipient_id']
4279        if 'template_id' in params:
4280            path_params['templateId'] = params['template_id']
4281
4282        query_params = {}
4283        if 'include_anchor_tab_locations' in params:
4284            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4285        if 'include_metadata' in params:
4286            query_params['include_metadata'] = params['include_metadata']
4287
4288        header_params = {}
4289
4290        form_params = []
4291        local_var_files = {}
4292
4293        body_params = None
4294        # HTTP header `Accept`
4295        header_params['Accept'] = self.api_client.\
4296            select_header_accept(['application/json'])
4297
4298        # Authentication setting
4299        auth_settings = []
4300
4301        return self.api_client.call_api(resource_path, 'GET',
4302                                        path_params,
4303                                        query_params,
4304                                        header_params,
4305                                        body=body_params,
4306                                        post_params=form_params,
4307                                        files=local_var_files,
4308                                        response_type='Tabs',
4309                                        auth_settings=auth_settings,
4310                                        callback=params.get('callback'),
4311                                        _return_http_data_only=params.get('_return_http_data_only'),
4312                                        _preload_content=params.get('_preload_content', True),
4313                                        _request_timeout=params.get('_request_timeout'),
4314                                        collection_formats=collection_formats)
4315
4316    def list_templates(self, account_id, **kwargs):
4317        """
4318        Gets the definition of a template.
4319        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4320        This method makes a synchronous HTTP request by default. To make an
4321        asynchronous HTTP request, please define a `callback` function
4322        to be invoked when receiving the response.
4323        >>> def callback_function(response):
4324        >>>     pprint(response)
4325        >>>
4326        >>> thread = api.list_templates(account_id, callback=callback_function)
4327
4328        :param callback function: The callback function
4329            for asynchronous request. (optional)
4330        :param str account_id: The external account number (int) or account ID Guid. (required)
4331        :param str count: Number of records to return in the cache.
4332        :param str created_from_date:
4333        :param str created_to_date:
4334        :param str folder_ids: A comma separated list of folder ID GUIDs.
4335        :param str folder_types:
4336        :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.
4337        :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.
4338        :param str is_deleted_template_only:
4339        :param str is_download:
4340        :param str modified_from_date:
4341        :param str modified_to_date:
4342        :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)
4343        :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.
4344        :param str search_fields:
4345        :param str search_text: The search text used to search the names of templates.
4346        :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.
4347        :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).
4348        :param str template_ids:
4349        :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.
4350        :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.
4351        :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.
4352        :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.
4353        :param str user_id:
4354        :return: EnvelopeTemplateResults
4355                 If the method is called asynchronously,
4356                 returns the request thread.
4357        """
4358        kwargs['_return_http_data_only'] = True
4359        if kwargs.get('callback'):
4360            return self.list_templates_with_http_info(account_id, **kwargs)
4361        else:
4362            (data) = self.list_templates_with_http_info(account_id, **kwargs)
4363            return data
4364
4365    def list_templates_with_http_info(self, account_id, **kwargs):
4366        """
4367        Gets the definition of a template.
4368        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4369        This method makes a synchronous HTTP request by default. To make an
4370        asynchronous HTTP request, please define a `callback` function
4371        to be invoked when receiving the response.
4372        >>> def callback_function(response):
4373        >>>     pprint(response)
4374        >>>
4375        >>> thread = api.list_templates_with_http_info(account_id, callback=callback_function)
4376
4377        :param callback function: The callback function
4378            for asynchronous request. (optional)
4379        :param str account_id: The external account number (int) or account ID Guid. (required)
4380        :param str count: Number of records to return in the cache.
4381        :param str created_from_date:
4382        :param str created_to_date:
4383        :param str folder_ids: A comma separated list of folder ID GUIDs.
4384        :param str folder_types:
4385        :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.
4386        :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.
4387        :param str is_deleted_template_only:
4388        :param str is_download:
4389        :param str modified_from_date:
4390        :param str modified_to_date:
4391        :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)
4392        :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.
4393        :param str search_fields:
4394        :param str search_text: The search text used to search the names of templates.
4395        :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.
4396        :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).
4397        :param str template_ids:
4398        :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.
4399        :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.
4400        :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.
4401        :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.
4402        :param str user_id:
4403        :return: EnvelopeTemplateResults
4404                 If the method is called asynchronously,
4405                 returns the request thread.
4406        """
4407
4408        all_params = ['account_id', 'count', 'created_from_date', 'created_to_date', 'folder_ids', 'folder_types', 'from_date', 'include', 'is_deleted_template_only', 'is_download', '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']
4409        all_params.append('callback')
4410        all_params.append('_return_http_data_only')
4411        all_params.append('_preload_content')
4412        all_params.append('_request_timeout')
4413
4414        params = locals()
4415        for key, val in iteritems(params['kwargs']):
4416            if key not in all_params:
4417                raise TypeError(
4418                    "Got an unexpected keyword argument '%s'"
4419                    " to method list_templates" % key
4420                )
4421            params[key] = val
4422        del params['kwargs']
4423        # verify the required parameter 'account_id' is set
4424        if ('account_id' not in params) or (params['account_id'] is None):
4425            raise ValueError("Missing the required parameter `account_id` when calling `list_templates`")
4426
4427
4428        collection_formats = {}
4429
4430        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
4431        path_params = {}
4432        if 'account_id' in params:
4433            path_params['accountId'] = params['account_id']
4434
4435        query_params = {}
4436        if 'count' in params:
4437            query_params['count'] = params['count']
4438        if 'created_from_date' in params:
4439            query_params['created_from_date'] = params['created_from_date']
4440        if 'created_to_date' in params:
4441            query_params['created_to_date'] = params['created_to_date']
4442        if 'folder_ids' in params:
4443            query_params['folder_ids'] = params['folder_ids']
4444        if 'folder_types' in params:
4445            query_params['folder_types'] = params['folder_types']
4446        if 'from_date' in params:
4447            query_params['from_date'] = params['from_date']
4448        if 'include' in params:
4449            query_params['include'] = params['include']
4450        if 'is_deleted_template_only' in params:
4451            query_params['is_deleted_template_only'] = params['is_deleted_template_only']
4452        if 'is_download' in params:
4453            query_params['is_download'] = params['is_download']
4454        if 'modified_from_date' in params:
4455            query_params['modified_from_date'] = params['modified_from_date']
4456        if 'modified_to_date' in params:
4457            query_params['modified_to_date'] = params['modified_to_date']
4458        if 'order' in params:
4459            query_params['order'] = params['order']
4460        if 'order_by' in params:
4461            query_params['order_by'] = params['order_by']
4462        if 'search_fields' in params:
4463            query_params['search_fields'] = params['search_fields']
4464        if 'search_text' in params:
4465            query_params['search_text'] = params['search_text']
4466        if 'shared_by_me' in params:
4467            query_params['shared_by_me'] = params['shared_by_me']
4468        if 'start_position' in params:
4469            query_params['start_position'] = params['start_position']
4470        if 'template_ids' in params:
4471            query_params['template_ids'] = params['template_ids']
4472        if 'to_date' in params:
4473            query_params['to_date'] = params['to_date']
4474        if 'used_from_date' in params:
4475            query_params['used_from_date'] = params['used_from_date']
4476        if 'used_to_date' in params:
4477            query_params['used_to_date'] = params['used_to_date']
4478        if 'user_filter' in params:
4479            query_params['user_filter'] = params['user_filter']
4480        if 'user_id' in params:
4481            query_params['user_id'] = params['user_id']
4482
4483        header_params = {}
4484
4485        form_params = []
4486        local_var_files = {}
4487
4488        body_params = None
4489        # HTTP header `Accept`
4490        header_params['Accept'] = self.api_client.\
4491            select_header_accept(['application/json'])
4492
4493        # Authentication setting
4494        auth_settings = []
4495
4496        return self.api_client.call_api(resource_path, 'GET',
4497                                        path_params,
4498                                        query_params,
4499                                        header_params,
4500                                        body=body_params,
4501                                        post_params=form_params,
4502                                        files=local_var_files,
4503                                        response_type='EnvelopeTemplateResults',
4504                                        auth_settings=auth_settings,
4505                                        callback=params.get('callback'),
4506                                        _return_http_data_only=params.get('_return_http_data_only'),
4507                                        _preload_content=params.get('_preload_content', True),
4508                                        _request_timeout=params.get('_request_timeout'),
4509                                        collection_formats=collection_formats)
4510
4511    def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
4512        """
4513        Rotates page image from a template for display.
4514        Rotates page image from a template for display. The page image can be rotated to the left or right.
4515        This method makes a synchronous HTTP request by default. To make an
4516        asynchronous HTTP request, please define a `callback` function
4517        to be invoked when receiving the response.
4518        >>> def callback_function(response):
4519        >>>     pprint(response)
4520        >>>
4521        >>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
4522
4523        :param callback function: The callback function
4524            for asynchronous request. (optional)
4525        :param str account_id: The external account number (int) or account ID Guid. (required)
4526        :param str document_id: The ID of the document being accessed. (required)
4527        :param str page_number: The page number being accessed. (required)
4528        :param str template_id: The ID of the template being accessed. (required)
4529        :param PageRequest page_request:
4530        :return: None
4531                 If the method is called asynchronously,
4532                 returns the request thread.
4533        """
4534        kwargs['_return_http_data_only'] = True
4535        if kwargs.get('callback'):
4536            return self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4537        else:
4538            (data) = self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4539            return data
4540
4541    def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
4542        """
4543        Rotates page image from a template for display.
4544        Rotates page image from a template for display. The page image can be rotated to the left or right.
4545        This method makes a synchronous HTTP request by default. To make an
4546        asynchronous HTTP request, please define a `callback` function
4547        to be invoked when receiving the response.
4548        >>> def callback_function(response):
4549        >>>     pprint(response)
4550        >>>
4551        >>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
4552
4553        :param callback function: The callback function
4554            for asynchronous request. (optional)
4555        :param str account_id: The external account number (int) or account ID Guid. (required)
4556        :param str document_id: The ID of the document being accessed. (required)
4557        :param str page_number: The page number being accessed. (required)
4558        :param str template_id: The ID of the template being accessed. (required)
4559        :param PageRequest page_request:
4560        :return: None
4561                 If the method is called asynchronously,
4562                 returns the request thread.
4563        """
4564
4565        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
4566        all_params.append('callback')
4567        all_params.append('_return_http_data_only')
4568        all_params.append('_preload_content')
4569        all_params.append('_request_timeout')
4570
4571        params = locals()
4572        for key, val in iteritems(params['kwargs']):
4573            if key not in all_params:
4574                raise TypeError(
4575                    "Got an unexpected keyword argument '%s'"
4576                    " to method rotate_document_page" % key
4577                )
4578            params[key] = val
4579        del params['kwargs']
4580        # verify the required parameter 'account_id' is set
4581        if ('account_id' not in params) or (params['account_id'] is None):
4582            raise ValueError("Missing the required parameter `account_id` when calling `rotate_document_page`")
4583        # verify the required parameter 'document_id' is set
4584        if ('document_id' not in params) or (params['document_id'] is None):
4585            raise ValueError("Missing the required parameter `document_id` when calling `rotate_document_page`")
4586        # verify the required parameter 'page_number' is set
4587        if ('page_number' not in params) or (params['page_number'] is None):
4588            raise ValueError("Missing the required parameter `page_number` when calling `rotate_document_page`")
4589        # verify the required parameter 'template_id' is set
4590        if ('template_id' not in params) or (params['template_id'] is None):
4591            raise ValueError("Missing the required parameter `template_id` when calling `rotate_document_page`")
4592
4593
4594        collection_formats = {}
4595
4596        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
4597        path_params = {}
4598        if 'account_id' in params:
4599            path_params['accountId'] = params['account_id']
4600        if 'document_id' in params:
4601            path_params['documentId'] = params['document_id']
4602        if 'page_number' in params:
4603            path_params['pageNumber'] = params['page_number']
4604        if 'template_id' in params:
4605            path_params['templateId'] = params['template_id']
4606
4607        query_params = {}
4608
4609        header_params = {}
4610
4611        form_params = []
4612        local_var_files = {}
4613
4614        body_params = None
4615        if 'page_request' in params:
4616            body_params = params['page_request']
4617        # HTTP header `Accept`
4618        header_params['Accept'] = self.api_client.\
4619            select_header_accept(['application/json'])
4620
4621        # Authentication setting
4622        auth_settings = []
4623
4624        return self.api_client.call_api(resource_path, 'PUT',
4625                                        path_params,
4626                                        query_params,
4627                                        header_params,
4628                                        body=body_params,
4629                                        post_params=form_params,
4630                                        files=local_var_files,
4631                                        response_type=None,
4632                                        auth_settings=auth_settings,
4633                                        callback=params.get('callback'),
4634                                        _return_http_data_only=params.get('_return_http_data_only'),
4635                                        _preload_content=params.get('_preload_content', True),
4636                                        _request_timeout=params.get('_request_timeout'),
4637                                        collection_formats=collection_formats)
4638
4639    def update(self, account_id, template_id, **kwargs):
4640        """
4641        Updates an existing template.
4642        Updates an existing template.
4643        This method makes a synchronous HTTP request by default. To make an
4644        asynchronous HTTP request, please define a `callback` function
4645        to be invoked when receiving the response.
4646        >>> def callback_function(response):
4647        >>>     pprint(response)
4648        >>>
4649        >>> thread = api.update(account_id, template_id, callback=callback_function)
4650
4651        :param callback function: The callback function
4652            for asynchronous request. (optional)
4653        :param str account_id: The external account number (int) or account ID Guid. (required)
4654        :param str template_id: The ID of the template being accessed. (required)
4655        :param EnvelopeTemplate envelope_template:
4656        :return: TemplateUpdateSummary
4657                 If the method is called asynchronously,
4658                 returns the request thread.
4659        """
4660        kwargs['_return_http_data_only'] = True
4661        if kwargs.get('callback'):
4662            return self.update_with_http_info(account_id, template_id, **kwargs)
4663        else:
4664            (data) = self.update_with_http_info(account_id, template_id, **kwargs)
4665            return data
4666
4667    def update_with_http_info(self, account_id, template_id, **kwargs):
4668        """
4669        Updates an existing template.
4670        Updates an existing template.
4671        This method makes a synchronous HTTP request by default. To make an
4672        asynchronous HTTP request, please define a `callback` function
4673        to be invoked when receiving the response.
4674        >>> def callback_function(response):
4675        >>>     pprint(response)
4676        >>>
4677        >>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function)
4678
4679        :param callback function: The callback function
4680            for asynchronous request. (optional)
4681        :param str account_id: The external account number (int) or account ID Guid. (required)
4682        :param str template_id: The ID of the template being accessed. (required)
4683        :param EnvelopeTemplate envelope_template:
4684        :return: TemplateUpdateSummary
4685                 If the method is called asynchronously,
4686                 returns the request thread.
4687        """
4688
4689        all_params = ['account_id', 'template_id', 'envelope_template']
4690        all_params.append('callback')
4691        all_params.append('_return_http_data_only')
4692        all_params.append('_preload_content')
4693        all_params.append('_request_timeout')
4694
4695        params = locals()
4696        for key, val in iteritems(params['kwargs']):
4697            if key not in all_params:
4698                raise TypeError(
4699                    "Got an unexpected keyword argument '%s'"
4700                    " to method update" % key
4701                )
4702            params[key] = val
4703        del params['kwargs']
4704        # verify the required parameter 'account_id' is set
4705        if ('account_id' not in params) or (params['account_id'] is None):
4706            raise ValueError("Missing the required parameter `account_id` when calling `update`")
4707        # verify the required parameter 'template_id' is set
4708        if ('template_id' not in params) or (params['template_id'] is None):
4709            raise ValueError("Missing the required parameter `template_id` when calling `update`")
4710
4711
4712        collection_formats = {}
4713
4714        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
4715        path_params = {}
4716        if 'account_id' in params:
4717            path_params['accountId'] = params['account_id']
4718        if 'template_id' in params:
4719            path_params['templateId'] = params['template_id']
4720
4721        query_params = {}
4722
4723        header_params = {}
4724
4725        form_params = []
4726        local_var_files = {}
4727
4728        body_params = None
4729        if 'envelope_template' in params:
4730            body_params = params['envelope_template']
4731        # HTTP header `Accept`
4732        header_params['Accept'] = self.api_client.\
4733            select_header_accept(['application/json'])
4734
4735        # Authentication setting
4736        auth_settings = []
4737
4738        return self.api_client.call_api(resource_path, 'PUT',
4739                                        path_params,
4740                                        query_params,
4741                                        header_params,
4742                                        body=body_params,
4743                                        post_params=form_params,
4744                                        files=local_var_files,
4745                                        response_type='TemplateUpdateSummary',
4746                                        auth_settings=auth_settings,
4747                                        callback=params.get('callback'),
4748                                        _return_http_data_only=params.get('_return_http_data_only'),
4749                                        _preload_content=params.get('_preload_content', True),
4750                                        _request_timeout=params.get('_request_timeout'),
4751                                        collection_formats=collection_formats)
4752
4753    def update_custom_fields(self, account_id, template_id, **kwargs):
4754        """
4755        Updates envelope custom fields in a template.
4756        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4757        This method makes a synchronous HTTP request by default. To make an
4758        asynchronous HTTP request, please define a `callback` function
4759        to be invoked when receiving the response.
4760        >>> def callback_function(response):
4761        >>>     pprint(response)
4762        >>>
4763        >>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function)
4764
4765        :param callback function: The callback function
4766            for asynchronous request. (optional)
4767        :param str account_id: The external account number (int) or account ID Guid. (required)
4768        :param str template_id: The ID of the template being accessed. (required)
4769        :param TemplateCustomFields template_custom_fields:
4770        :return: CustomFields
4771                 If the method is called asynchronously,
4772                 returns the request thread.
4773        """
4774        kwargs['_return_http_data_only'] = True
4775        if kwargs.get('callback'):
4776            return self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
4777        else:
4778            (data) = self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
4779            return data
4780
4781    def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
4782        """
4783        Updates envelope custom fields in a template.
4784        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4785        This method makes a synchronous HTTP request by default. To make an
4786        asynchronous HTTP request, please define a `callback` function
4787        to be invoked when receiving the response.
4788        >>> def callback_function(response):
4789        >>>     pprint(response)
4790        >>>
4791        >>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
4792
4793        :param callback function: The callback function
4794            for asynchronous request. (optional)
4795        :param str account_id: The external account number (int) or account ID Guid. (required)
4796        :param str template_id: The ID of the template being accessed. (required)
4797        :param TemplateCustomFields template_custom_fields:
4798        :return: CustomFields
4799                 If the method is called asynchronously,
4800                 returns the request thread.
4801        """
4802
4803        all_params = ['account_id', 'template_id', 'template_custom_fields']
4804        all_params.append('callback')
4805        all_params.append('_return_http_data_only')
4806        all_params.append('_preload_content')
4807        all_params.append('_request_timeout')
4808
4809        params = locals()
4810        for key, val in iteritems(params['kwargs']):
4811            if key not in all_params:
4812                raise TypeError(
4813                    "Got an unexpected keyword argument '%s'"
4814                    " to method update_custom_fields" % key
4815                )
4816            params[key] = val
4817        del params['kwargs']
4818        # verify the required parameter 'account_id' is set
4819        if ('account_id' not in params) or (params['account_id'] is None):
4820            raise ValueError("Missing the required parameter `account_id` when calling `update_custom_fields`")
4821        # verify the required parameter 'template_id' is set
4822        if ('template_id' not in params) or (params['template_id'] is None):
4823            raise ValueError("Missing the required parameter `template_id` when calling `update_custom_fields`")
4824
4825
4826        collection_formats = {}
4827
4828        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
4829        path_params = {}
4830        if 'account_id' in params:
4831            path_params['accountId'] = params['account_id']
4832        if 'template_id' in params:
4833            path_params['templateId'] = params['template_id']
4834
4835        query_params = {}
4836
4837        header_params = {}
4838
4839        form_params = []
4840        local_var_files = {}
4841
4842        body_params = None
4843        if 'template_custom_fields' in params:
4844            body_params = params['template_custom_fields']
4845        # HTTP header `Accept`
4846        header_params['Accept'] = self.api_client.\
4847            select_header_accept(['application/json'])
4848
4849        # Authentication setting
4850        auth_settings = []
4851
4852        return self.api_client.call_api(resource_path, 'PUT',
4853                                        path_params,
4854                                        query_params,
4855                                        header_params,
4856                                        body=body_params,
4857                                        post_params=form_params,
4858                                        files=local_var_files,
4859                                        response_type='CustomFields',
4860                                        auth_settings=auth_settings,
4861                                        callback=params.get('callback'),
4862                                        _return_http_data_only=params.get('_return_http_data_only'),
4863                                        _preload_content=params.get('_preload_content', True),
4864                                        _request_timeout=params.get('_request_timeout'),
4865                                        collection_formats=collection_formats)
4866
4867    def update_document(self, account_id, document_id, template_id, **kwargs):
4868        """
4869        Adds a document to a template document.
4870        Adds the specified document to an existing template document.
4871        This method makes a synchronous HTTP request by default. To make an
4872        asynchronous HTTP request, please define a `callback` function
4873        to be invoked when receiving the response.
4874        >>> def callback_function(response):
4875        >>>     pprint(response)
4876        >>>
4877        >>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function)
4878
4879        :param callback function: The callback function
4880            for asynchronous request. (optional)
4881        :param str account_id: The external account number (int) or account ID Guid. (required)
4882        :param str document_id: The ID of the document being accessed. (required)
4883        :param str template_id: The ID of the template being accessed. (required)
4884        :param str is_envelope_definition:
4885        :param EnvelopeDefinition envelope_definition:
4886        :return: EnvelopeDocument
4887                 If the method is called asynchronously,
4888                 returns the request thread.
4889        """
4890        kwargs['_return_http_data_only'] = True
4891        if kwargs.get('callback'):
4892            return self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
4893        else:
4894            (data) = self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
4895            return data
4896
4897    def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
4898        """
4899        Adds a document to a template document.
4900        Adds the specified document to an existing template document.
4901        This method makes a synchronous HTTP request by default. To make an
4902        asynchronous HTTP request, please define a `callback` function
4903        to be invoked when receiving the response.
4904        >>> def callback_function(response):
4905        >>>     pprint(response)
4906        >>>
4907        >>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
4908
4909        :param callback function: The callback function
4910            for asynchronous request. (optional)
4911        :param str account_id: The external account number (int) or account ID Guid. (required)
4912        :param str document_id: The ID of the document being accessed. (required)
4913        :param str template_id: The ID of the template being accessed. (required)
4914        :param str is_envelope_definition:
4915        :param EnvelopeDefinition envelope_definition:
4916        :return: EnvelopeDocument
4917                 If the method is called asynchronously,
4918                 returns the request thread.
4919        """
4920
4921        all_params = ['account_id', 'document_id', 'template_id', 'is_envelope_definition', 'envelope_definition']
4922        all_params.append('callback')
4923        all_params.append('_return_http_data_only')
4924        all_params.append('_preload_content')
4925        all_params.append('_request_timeout')
4926
4927        params = locals()
4928        for key, val in iteritems(params['kwargs']):
4929            if key not in all_params:
4930                raise TypeError(
4931                    "Got an unexpected keyword argument '%s'"
4932                    " to method update_document" % key
4933                )
4934            params[key] = val
4935        del params['kwargs']
4936        # verify the required parameter 'account_id' is set
4937        if ('account_id' not in params) or (params['account_id'] is None):
4938            raise ValueError("Missing the required parameter `account_id` when calling `update_document`")
4939        # verify the required parameter 'document_id' is set
4940        if ('document_id' not in params) or (params['document_id'] is None):
4941            raise ValueError("Missing the required parameter `document_id` when calling `update_document`")
4942        # verify the required parameter 'template_id' is set
4943        if ('template_id' not in params) or (params['template_id'] is None):
4944            raise ValueError("Missing the required parameter `template_id` when calling `update_document`")
4945
4946
4947        collection_formats = {}
4948
4949        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
4950        path_params = {}
4951        if 'account_id' in params:
4952            path_params['accountId'] = params['account_id']
4953        if 'document_id' in params:
4954            path_params['documentId'] = params['document_id']
4955        if 'template_id' in params:
4956            path_params['templateId'] = params['template_id']
4957
4958        query_params = {}
4959        if 'is_envelope_definition' in params:
4960            query_params['is_envelope_definition'] = params['is_envelope_definition']
4961
4962        header_params = {}
4963
4964        form_params = []
4965        local_var_files = {}
4966
4967        body_params = None
4968        if 'envelope_definition' in params:
4969            body_params = params['envelope_definition']
4970        # HTTP header `Accept`
4971        header_params['Accept'] = self.api_client.\
4972            select_header_accept(['application/json'])
4973
4974        # Authentication setting
4975        auth_settings = []
4976
4977        return self.api_client.call_api(resource_path, 'PUT',
4978                                        path_params,
4979                                        query_params,
4980                                        header_params,
4981                                        body=body_params,
4982                                        post_params=form_params,
4983                                        files=local_var_files,
4984                                        response_type='EnvelopeDocument',
4985                                        auth_settings=auth_settings,
4986                                        callback=params.get('callback'),
4987                                        _return_http_data_only=params.get('_return_http_data_only'),
4988                                        _preload_content=params.get('_preload_content', True),
4989                                        _request_timeout=params.get('_request_timeout'),
4990                                        collection_formats=collection_formats)
4991
4992    def update_document_fields(self, account_id, document_id, template_id, **kwargs):
4993        """
4994        Updates existing custom document fields in an existing template document.
4995        Updates existing custom document fields in an existing template document.
4996        This method makes a synchronous HTTP request by default. To make an
4997        asynchronous HTTP request, please define a `callback` function
4998        to be invoked when receiving the response.
4999        >>> def callback_function(response):
5000        >>>     pprint(response)
5001        >>>
5002        >>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function)
5003
5004        :param callback function: The callback function
5005            for asynchronous request. (optional)
5006        :param str account_id: The external account number (int) or account ID Guid. (required)
5007        :param str document_id: The ID of the document being accessed. (required)
5008        :param str template_id: The ID of the template being accessed. (required)
5009        :param DocumentFieldsInformation document_fields_information:
5010        :return: DocumentFieldsInformation
5011                 If the method is called asynchronously,
5012                 returns the request thread.
5013        """
5014        kwargs['_return_http_data_only'] = True
5015        if kwargs.get('callback'):
5016            return self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5017        else:
5018            (data) = self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5019            return data
5020
5021    def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
5022        """
5023        Updates existing custom document fields in an existing template document.
5024        Updates existing custom document fields in an existing template document.
5025        This method makes a synchronous HTTP request by default. To make an
5026        asynchronous HTTP request, please define a `callback` function
5027        to be invoked when receiving the response.
5028        >>> def callback_function(response):
5029        >>>     pprint(response)
5030        >>>
5031        >>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
5032
5033        :param callback function: The callback function
5034            for asynchronous request. (optional)
5035        :param str account_id: The external account number (int) or account ID Guid. (required)
5036        :param str document_id: The ID of the document being accessed. (required)
5037        :param str template_id: The ID of the template being accessed. (required)
5038        :param DocumentFieldsInformation document_fields_information:
5039        :return: DocumentFieldsInformation
5040                 If the method is called asynchronously,
5041                 returns the request thread.
5042        """
5043
5044        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
5045        all_params.append('callback')
5046        all_params.append('_return_http_data_only')
5047        all_params.append('_preload_content')
5048        all_params.append('_request_timeout')
5049
5050        params = locals()
5051        for key, val in iteritems(params['kwargs']):
5052            if key not in all_params:
5053                raise TypeError(
5054                    "Got an unexpected keyword argument '%s'"
5055                    " to method update_document_fields" % key
5056                )
5057            params[key] = val
5058        del params['kwargs']
5059        # verify the required parameter 'account_id' is set
5060        if ('account_id' not in params) or (params['account_id'] is None):
5061            raise ValueError("Missing the required parameter `account_id` when calling `update_document_fields`")
5062        # verify the required parameter 'document_id' is set
5063        if ('document_id' not in params) or (params['document_id'] is None):
5064            raise ValueError("Missing the required parameter `document_id` when calling `update_document_fields`")
5065        # verify the required parameter 'template_id' is set
5066        if ('template_id' not in params) or (params['template_id'] is None):
5067            raise ValueError("Missing the required parameter `template_id` when calling `update_document_fields`")
5068
5069
5070        collection_formats = {}
5071
5072        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
5073        path_params = {}
5074        if 'account_id' in params:
5075            path_params['accountId'] = params['account_id']
5076        if 'document_id' in params:
5077            path_params['documentId'] = params['document_id']
5078        if 'template_id' in params:
5079            path_params['templateId'] = params['template_id']
5080
5081        query_params = {}
5082
5083        header_params = {}
5084
5085        form_params = []
5086        local_var_files = {}
5087
5088        body_params = None
5089        if 'document_fields_information' in params:
5090            body_params = params['document_fields_information']
5091        # HTTP header `Accept`
5092        header_params['Accept'] = self.api_client.\
5093            select_header_accept(['application/json'])
5094
5095        # Authentication setting
5096        auth_settings = []
5097
5098        return self.api_client.call_api(resource_path, 'PUT',
5099                                        path_params,
5100                                        query_params,
5101                                        header_params,
5102                                        body=body_params,
5103                                        post_params=form_params,
5104                                        files=local_var_files,
5105                                        response_type='DocumentFieldsInformation',
5106                                        auth_settings=auth_settings,
5107                                        callback=params.get('callback'),
5108                                        _return_http_data_only=params.get('_return_http_data_only'),
5109                                        _preload_content=params.get('_preload_content', True),
5110                                        _request_timeout=params.get('_request_timeout'),
5111                                        collection_formats=collection_formats)
5112
5113    def update_documents(self, account_id, template_id, **kwargs):
5114        """
5115        Adds documents to a template document.
5116        Adds one or more documents to an existing template document.
5117        This method makes a synchronous HTTP request by default. To make an
5118        asynchronous HTTP request, please define a `callback` function
5119        to be invoked when receiving the response.
5120        >>> def callback_function(response):
5121        >>>     pprint(response)
5122        >>>
5123        >>> thread = api.update_documents(account_id, template_id, callback=callback_function)
5124
5125        :param callback function: The callback function
5126            for asynchronous request. (optional)
5127        :param str account_id: The external account number (int) or account ID Guid. (required)
5128        :param str template_id: The ID of the template being accessed. (required)
5129        :param EnvelopeDefinition envelope_definition:
5130        :return: TemplateDocumentsResult
5131                 If the method is called asynchronously,
5132                 returns the request thread.
5133        """
5134        kwargs['_return_http_data_only'] = True
5135        if kwargs.get('callback'):
5136            return self.update_documents_with_http_info(account_id, template_id, **kwargs)
5137        else:
5138            (data) = self.update_documents_with_http_info(account_id, template_id, **kwargs)
5139            return data
5140
5141    def update_documents_with_http_info(self, account_id, template_id, **kwargs):
5142        """
5143        Adds documents to a template document.
5144        Adds one or more documents to an existing template document.
5145        This method makes a synchronous HTTP request by default. To make an
5146        asynchronous HTTP request, please define a `callback` function
5147        to be invoked when receiving the response.
5148        >>> def callback_function(response):
5149        >>>     pprint(response)
5150        >>>
5151        >>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function)
5152
5153        :param callback function: The callback function
5154            for asynchronous request. (optional)
5155        :param str account_id: The external account number (int) or account ID Guid. (required)
5156        :param str template_id: The ID of the template being accessed. (required)
5157        :param EnvelopeDefinition envelope_definition:
5158        :return: TemplateDocumentsResult
5159                 If the method is called asynchronously,
5160                 returns the request thread.
5161        """
5162
5163        all_params = ['account_id', 'template_id', 'envelope_definition']
5164        all_params.append('callback')
5165        all_params.append('_return_http_data_only')
5166        all_params.append('_preload_content')
5167        all_params.append('_request_timeout')
5168
5169        params = locals()
5170        for key, val in iteritems(params['kwargs']):
5171            if key not in all_params:
5172                raise TypeError(
5173                    "Got an unexpected keyword argument '%s'"
5174                    " to method update_documents" % key
5175                )
5176            params[key] = val
5177        del params['kwargs']
5178        # verify the required parameter 'account_id' is set
5179        if ('account_id' not in params) or (params['account_id'] is None):
5180            raise ValueError("Missing the required parameter `account_id` when calling `update_documents`")
5181        # verify the required parameter 'template_id' is set
5182        if ('template_id' not in params) or (params['template_id'] is None):
5183            raise ValueError("Missing the required parameter `template_id` when calling `update_documents`")
5184
5185
5186        collection_formats = {}
5187
5188        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
5189        path_params = {}
5190        if 'account_id' in params:
5191            path_params['accountId'] = params['account_id']
5192        if 'template_id' in params:
5193            path_params['templateId'] = params['template_id']
5194
5195        query_params = {}
5196
5197        header_params = {}
5198
5199        form_params = []
5200        local_var_files = {}
5201
5202        body_params = None
5203        if 'envelope_definition' in params:
5204            body_params = params['envelope_definition']
5205        # HTTP header `Accept`
5206        header_params['Accept'] = self.api_client.\
5207            select_header_accept(['application/json'])
5208
5209        # Authentication setting
5210        auth_settings = []
5211
5212        return self.api_client.call_api(resource_path, 'PUT',
5213                                        path_params,
5214                                        query_params,
5215                                        header_params,
5216                                        body=body_params,
5217                                        post_params=form_params,
5218                                        files=local_var_files,
5219                                        response_type='TemplateDocumentsResult',
5220                                        auth_settings=auth_settings,
5221                                        callback=params.get('callback'),
5222                                        _return_http_data_only=params.get('_return_http_data_only'),
5223                                        _preload_content=params.get('_preload_content', True),
5224                                        _request_timeout=params.get('_request_timeout'),
5225                                        collection_formats=collection_formats)
5226
5227    def update_group_share(self, account_id, template_id, template_part, **kwargs):
5228        """
5229        Shares a template with a group
5230        Shares a template with the specified members group.
5231        This method makes a synchronous HTTP request by default. To make an
5232        asynchronous HTTP request, please define a `callback` function
5233        to be invoked when receiving the response.
5234        >>> def callback_function(response):
5235        >>>     pprint(response)
5236        >>>
5237        >>> thread = api.update_group_share(account_id, template_id, template_part, callback=callback_function)
5238
5239        :param callback function: The callback function
5240            for asynchronous request. (optional)
5241        :param str account_id: The external account number (int) or account ID Guid. (required)
5242        :param str template_id: The ID of the template being accessed. (required)
5243        :param str template_part: Currently, the only defined part is **groups**. (required)
5244        :param GroupInformation group_information:
5245        :return: GroupInformation
5246                 If the method is called asynchronously,
5247                 returns the request thread.
5248        """
5249        kwargs['_return_http_data_only'] = True
5250        if kwargs.get('callback'):
5251            return self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5252        else:
5253            (data) = self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5254            return data
5255
5256    def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
5257        """
5258        Shares a template with a group
5259        Shares a template with the specified members group.
5260        This method makes a synchronous HTTP request by default. To make an
5261        asynchronous HTTP request, please define a `callback` function
5262        to be invoked when receiving the response.
5263        >>> def callback_function(response):
5264        >>>     pprint(response)
5265        >>>
5266        >>> thread = api.update_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
5267
5268        :param callback function: The callback function
5269            for asynchronous request. (optional)
5270        :param str account_id: The external account number (int) or account ID Guid. (required)
5271        :param str template_id: The ID of the template being accessed. (required)
5272        :param str template_part: Currently, the only defined part is **groups**. (required)
5273        :param GroupInformation group_information:
5274        :return: GroupInformation
5275                 If the method is called asynchronously,
5276                 returns the request thread.
5277        """
5278
5279        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
5280        all_params.append('callback')
5281        all_params.append('_return_http_data_only')
5282        all_params.append('_preload_content')
5283        all_params.append('_request_timeout')
5284
5285        params = locals()
5286        for key, val in iteritems(params['kwargs']):
5287            if key not in all_params:
5288                raise TypeError(
5289                    "Got an unexpected keyword argument '%s'"
5290                    " to method update_group_share" % key
5291                )
5292            params[key] = val
5293        del params['kwargs']
5294        # verify the required parameter 'account_id' is set
5295        if ('account_id' not in params) or (params['account_id'] is None):
5296            raise ValueError("Missing the required parameter `account_id` when calling `update_group_share`")
5297        # verify the required parameter 'template_id' is set
5298        if ('template_id' not in params) or (params['template_id'] is None):
5299            raise ValueError("Missing the required parameter `template_id` when calling `update_group_share`")
5300        # verify the required parameter 'template_part' is set
5301        if ('template_part' not in params) or (params['template_part'] is None):
5302            raise ValueError("Missing the required parameter `template_part` when calling `update_group_share`")
5303
5304
5305        collection_formats = {}
5306
5307        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
5308        path_params = {}
5309        if 'account_id' in params:
5310            path_params['accountId'] = params['account_id']
5311        if 'template_id' in params:
5312            path_params['templateId'] = params['template_id']
5313        if 'template_part' in params:
5314            path_params['templatePart'] = params['template_part']
5315
5316        query_params = {}
5317
5318        header_params = {}
5319
5320        form_params = []
5321        local_var_files = {}
5322
5323        body_params = None
5324        if 'group_information' in params:
5325            body_params = params['group_information']
5326        # HTTP header `Accept`
5327        header_params['Accept'] = self.api_client.\
5328            select_header_accept(['application/json'])
5329
5330        # Authentication setting
5331        auth_settings = []
5332
5333        return self.api_client.call_api(resource_path, 'PUT',
5334                                        path_params,
5335                                        query_params,
5336                                        header_params,
5337                                        body=body_params,
5338                                        post_params=form_params,
5339                                        files=local_var_files,
5340                                        response_type='GroupInformation',
5341                                        auth_settings=auth_settings,
5342                                        callback=params.get('callback'),
5343                                        _return_http_data_only=params.get('_return_http_data_only'),
5344                                        _preload_content=params.get('_preload_content', True),
5345                                        _request_timeout=params.get('_request_timeout'),
5346                                        collection_formats=collection_formats)
5347
5348    def update_lock(self, account_id, template_id, **kwargs):
5349        """
5350        Updates a template lock.
5351        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.
5352        This method makes a synchronous HTTP request by default. To make an
5353        asynchronous HTTP request, please define a `callback` function
5354        to be invoked when receiving the response.
5355        >>> def callback_function(response):
5356        >>>     pprint(response)
5357        >>>
5358        >>> thread = api.update_lock(account_id, template_id, callback=callback_function)
5359
5360        :param callback function: The callback function
5361            for asynchronous request. (optional)
5362        :param str account_id: The external account number (int) or account ID Guid. (required)
5363        :param str template_id: The ID of the template being accessed. (required)
5364        :param LockRequest lock_request:
5365        :return: LockInformation
5366                 If the method is called asynchronously,
5367                 returns the request thread.
5368        """
5369        kwargs['_return_http_data_only'] = True
5370        if kwargs.get('callback'):
5371            return self.update_lock_with_http_info(account_id, template_id, **kwargs)
5372        else:
5373            (data) = self.update_lock_with_http_info(account_id, template_id, **kwargs)
5374            return data
5375
5376    def update_lock_with_http_info(self, account_id, template_id, **kwargs):
5377        """
5378        Updates a template lock.
5379        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.
5380        This method makes a synchronous HTTP request by default. To make an
5381        asynchronous HTTP request, please define a `callback` function
5382        to be invoked when receiving the response.
5383        >>> def callback_function(response):
5384        >>>     pprint(response)
5385        >>>
5386        >>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function)
5387
5388        :param callback function: The callback function
5389            for asynchronous request. (optional)
5390        :param str account_id: The external account number (int) or account ID Guid. (required)
5391        :param str template_id: The ID of the template being accessed. (required)
5392        :param LockRequest lock_request:
5393        :return: LockInformation
5394                 If the method is called asynchronously,
5395                 returns the request thread.
5396        """
5397
5398        all_params = ['account_id', 'template_id', 'lock_request']
5399        all_params.append('callback')
5400        all_params.append('_return_http_data_only')
5401        all_params.append('_preload_content')
5402        all_params.append('_request_timeout')
5403
5404        params = locals()
5405        for key, val in iteritems(params['kwargs']):
5406            if key not in all_params:
5407                raise TypeError(
5408                    "Got an unexpected keyword argument '%s'"
5409                    " to method update_lock" % key
5410                )
5411            params[key] = val
5412        del params['kwargs']
5413        # verify the required parameter 'account_id' is set
5414        if ('account_id' not in params) or (params['account_id'] is None):
5415            raise ValueError("Missing the required parameter `account_id` when calling `update_lock`")
5416        # verify the required parameter 'template_id' is set
5417        if ('template_id' not in params) or (params['template_id'] is None):
5418            raise ValueError("Missing the required parameter `template_id` when calling `update_lock`")
5419
5420
5421        collection_formats = {}
5422
5423        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
5424        path_params = {}
5425        if 'account_id' in params:
5426            path_params['accountId'] = params['account_id']
5427        if 'template_id' in params:
5428            path_params['templateId'] = params['template_id']
5429
5430        query_params = {}
5431
5432        header_params = {}
5433
5434        form_params = []
5435        local_var_files = {}
5436
5437        body_params = None
5438        if 'lock_request' in params:
5439            body_params = params['lock_request']
5440        # HTTP header `Accept`
5441        header_params['Accept'] = self.api_client.\
5442            select_header_accept(['application/json'])
5443
5444        # Authentication setting
5445        auth_settings = []
5446
5447        return self.api_client.call_api(resource_path, 'PUT',
5448                                        path_params,
5449                                        query_params,
5450                                        header_params,
5451                                        body=body_params,
5452                                        post_params=form_params,
5453                                        files=local_var_files,
5454                                        response_type='LockInformation',
5455                                        auth_settings=auth_settings,
5456                                        callback=params.get('callback'),
5457                                        _return_http_data_only=params.get('_return_http_data_only'),
5458                                        _preload_content=params.get('_preload_content', True),
5459                                        _request_timeout=params.get('_request_timeout'),
5460                                        collection_formats=collection_formats)
5461
5462    def update_notification_settings(self, account_id, template_id, **kwargs):
5463        """
5464        Updates the notification  structure for an existing template.
5465        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5466        This method makes a synchronous HTTP request by default. To make an
5467        asynchronous HTTP request, please define a `callback` function
5468        to be invoked when receiving the response.
5469        >>> def callback_function(response):
5470        >>>     pprint(response)
5471        >>>
5472        >>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function)
5473
5474        :param callback function: The callback function
5475            for asynchronous request. (optional)
5476        :param str account_id: The external account number (int) or account ID Guid. (required)
5477        :param str template_id: The ID of the template being accessed. (required)
5478        :param TemplateNotificationRequest template_notification_request:
5479        :return: Notification
5480                 If the method is called asynchronously,
5481                 returns the request thread.
5482        """
5483        kwargs['_return_http_data_only'] = True
5484        if kwargs.get('callback'):
5485            return self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5486        else:
5487            (data) = self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5488            return data
5489
5490    def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
5491        """
5492        Updates the notification  structure for an existing template.
5493        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5494        This method makes a synchronous HTTP request by default. To make an
5495        asynchronous HTTP request, please define a `callback` function
5496        to be invoked when receiving the response.
5497        >>> def callback_function(response):
5498        >>>     pprint(response)
5499        >>>
5500        >>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
5501
5502        :param callback function: The callback function
5503            for asynchronous request. (optional)
5504        :param str account_id: The external account number (int) or account ID Guid. (required)
5505        :param str template_id: The ID of the template being accessed. (required)
5506        :param TemplateNotificationRequest template_notification_request:
5507        :return: Notification
5508                 If the method is called asynchronously,
5509                 returns the request thread.
5510        """
5511
5512        all_params = ['account_id', 'template_id', 'template_notification_request']
5513        all_params.append('callback')
5514        all_params.append('_return_http_data_only')
5515        all_params.append('_preload_content')
5516        all_params.append('_request_timeout')
5517
5518        params = locals()
5519        for key, val in iteritems(params['kwargs']):
5520            if key not in all_params:
5521                raise TypeError(
5522                    "Got an unexpected keyword argument '%s'"
5523                    " to method update_notification_settings" % key
5524                )
5525            params[key] = val
5526        del params['kwargs']
5527        # verify the required parameter 'account_id' is set
5528        if ('account_id' not in params) or (params['account_id'] is None):
5529            raise ValueError("Missing the required parameter `account_id` when calling `update_notification_settings`")
5530        # verify the required parameter 'template_id' is set
5531        if ('template_id' not in params) or (params['template_id'] is None):
5532            raise ValueError("Missing the required parameter `template_id` when calling `update_notification_settings`")
5533
5534
5535        collection_formats = {}
5536
5537        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
5538        path_params = {}
5539        if 'account_id' in params:
5540            path_params['accountId'] = params['account_id']
5541        if 'template_id' in params:
5542            path_params['templateId'] = params['template_id']
5543
5544        query_params = {}
5545
5546        header_params = {}
5547
5548        form_params = []
5549        local_var_files = {}
5550
5551        body_params = None
5552        if 'template_notification_request' in params:
5553            body_params = params['template_notification_request']
5554        # HTTP header `Accept`
5555        header_params['Accept'] = self.api_client.\
5556            select_header_accept(['application/json'])
5557
5558        # Authentication setting
5559        auth_settings = []
5560
5561        return self.api_client.call_api(resource_path, 'PUT',
5562                                        path_params,
5563                                        query_params,
5564                                        header_params,
5565                                        body=body_params,
5566                                        post_params=form_params,
5567                                        files=local_var_files,
5568                                        response_type='Notification',
5569                                        auth_settings=auth_settings,
5570                                        callback=params.get('callback'),
5571                                        _return_http_data_only=params.get('_return_http_data_only'),
5572                                        _preload_content=params.get('_preload_content', True),
5573                                        _request_timeout=params.get('_request_timeout'),
5574                                        collection_formats=collection_formats)
5575
5576    def update_recipients(self, account_id, template_id, **kwargs):
5577        """
5578        Updates recipients in a template.
5579        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5580        This method makes a synchronous HTTP request by default. To make an
5581        asynchronous HTTP request, please define a `callback` function
5582        to be invoked when receiving the response.
5583        >>> def callback_function(response):
5584        >>>     pprint(response)
5585        >>>
5586        >>> thread = api.update_recipients(account_id, template_id, callback=callback_function)
5587
5588        :param callback function: The callback function
5589            for asynchronous request. (optional)
5590        :param str account_id: The external account number (int) or account ID Guid. (required)
5591        :param str template_id: The ID of the template being accessed. (required)
5592        :param str resend_envelope:
5593        :param TemplateRecipients template_recipients:
5594        :return: RecipientsUpdateSummary
5595                 If the method is called asynchronously,
5596                 returns the request thread.
5597        """
5598        kwargs['_return_http_data_only'] = True
5599        if kwargs.get('callback'):
5600            return self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5601        else:
5602            (data) = self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5603            return data
5604
5605    def update_recipients_with_http_info(self, account_id, template_id, **kwargs):
5606        """
5607        Updates recipients in a template.
5608        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5609        This method makes a synchronous HTTP request by default. To make an
5610        asynchronous HTTP request, please define a `callback` function
5611        to be invoked when receiving the response.
5612        >>> def callback_function(response):
5613        >>>     pprint(response)
5614        >>>
5615        >>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function)
5616
5617        :param callback function: The callback function
5618            for asynchronous request. (optional)
5619        :param str account_id: The external account number (int) or account ID Guid. (required)
5620        :param str template_id: The ID of the template being accessed. (required)
5621        :param str resend_envelope:
5622        :param TemplateRecipients template_recipients:
5623        :return: RecipientsUpdateSummary
5624                 If the method is called asynchronously,
5625                 returns the request thread.
5626        """
5627
5628        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
5629        all_params.append('callback')
5630        all_params.append('_return_http_data_only')
5631        all_params.append('_preload_content')
5632        all_params.append('_request_timeout')
5633
5634        params = locals()
5635        for key, val in iteritems(params['kwargs']):
5636            if key not in all_params:
5637                raise TypeError(
5638                    "Got an unexpected keyword argument '%s'"
5639                    " to method update_recipients" % key
5640                )
5641            params[key] = val
5642        del params['kwargs']
5643        # verify the required parameter 'account_id' is set
5644        if ('account_id' not in params) or (params['account_id'] is None):
5645            raise ValueError("Missing the required parameter `account_id` when calling `update_recipients`")
5646        # verify the required parameter 'template_id' is set
5647        if ('template_id' not in params) or (params['template_id'] is None):
5648            raise ValueError("Missing the required parameter `template_id` when calling `update_recipients`")
5649
5650
5651        collection_formats = {}
5652
5653        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
5654        path_params = {}
5655        if 'account_id' in params:
5656            path_params['accountId'] = params['account_id']
5657        if 'template_id' in params:
5658            path_params['templateId'] = params['template_id']
5659
5660        query_params = {}
5661        if 'resend_envelope' in params:
5662            query_params['resend_envelope'] = params['resend_envelope']
5663
5664        header_params = {}
5665
5666        form_params = []
5667        local_var_files = {}
5668
5669        body_params = None
5670        if 'template_recipients' in params:
5671            body_params = params['template_recipients']
5672        # HTTP header `Accept`
5673        header_params['Accept'] = self.api_client.\
5674            select_header_accept(['application/json'])
5675
5676        # Authentication setting
5677        auth_settings = []
5678
5679        return self.api_client.call_api(resource_path, 'PUT',
5680                                        path_params,
5681                                        query_params,
5682                                        header_params,
5683                                        body=body_params,
5684                                        post_params=form_params,
5685                                        files=local_var_files,
5686                                        response_type='RecipientsUpdateSummary',
5687                                        auth_settings=auth_settings,
5688                                        callback=params.get('callback'),
5689                                        _return_http_data_only=params.get('_return_http_data_only'),
5690                                        _preload_content=params.get('_preload_content', True),
5691                                        _request_timeout=params.get('_request_timeout'),
5692                                        collection_formats=collection_formats)
5693
5694    def update_tabs(self, account_id, recipient_id, template_id, **kwargs):
5695        """
5696        Updates the tabs for a recipient.
5697        Updates one or more tabs for a recipient in a template.
5698        This method makes a synchronous HTTP request by default. To make an
5699        asynchronous HTTP request, please define a `callback` function
5700        to be invoked when receiving the response.
5701        >>> def callback_function(response):
5702        >>>     pprint(response)
5703        >>>
5704        >>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function)
5705
5706        :param callback function: The callback function
5707            for asynchronous request. (optional)
5708        :param str account_id: The external account number (int) or account ID Guid. (required)
5709        :param str recipient_id: The ID of the recipient being accessed. (required)
5710        :param str template_id: The ID of the template being accessed. (required)
5711        :param TemplateTabs template_tabs:
5712        :return: Tabs
5713                 If the method is called asynchronously,
5714                 returns the request thread.
5715        """
5716        kwargs['_return_http_data_only'] = True
5717        if kwargs.get('callback'):
5718            return self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5719        else:
5720            (data) = self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5721            return data
5722
5723    def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
5724        """
5725        Updates the tabs for a recipient.
5726        Updates one or more tabs for a recipient in a template.
5727        This method makes a synchronous HTTP request by default. To make an
5728        asynchronous HTTP request, please define a `callback` function
5729        to be invoked when receiving the response.
5730        >>> def callback_function(response):
5731        >>>     pprint(response)
5732        >>>
5733        >>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
5734
5735        :param callback function: The callback function
5736            for asynchronous request. (optional)
5737        :param str account_id: The external account number (int) or account ID Guid. (required)
5738        :param str recipient_id: The ID of the recipient being accessed. (required)
5739        :param str template_id: The ID of the template being accessed. (required)
5740        :param TemplateTabs template_tabs:
5741        :return: Tabs
5742                 If the method is called asynchronously,
5743                 returns the request thread.
5744        """
5745
5746        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
5747        all_params.append('callback')
5748        all_params.append('_return_http_data_only')
5749        all_params.append('_preload_content')
5750        all_params.append('_request_timeout')
5751
5752        params = locals()
5753        for key, val in iteritems(params['kwargs']):
5754            if key not in all_params:
5755                raise TypeError(
5756                    "Got an unexpected keyword argument '%s'"
5757                    " to method update_tabs" % key
5758                )
5759            params[key] = val
5760        del params['kwargs']
5761        # verify the required parameter 'account_id' is set
5762        if ('account_id' not in params) or (params['account_id'] is None):
5763            raise ValueError("Missing the required parameter `account_id` when calling `update_tabs`")
5764        # verify the required parameter 'recipient_id' is set
5765        if ('recipient_id' not in params) or (params['recipient_id'] is None):
5766            raise ValueError("Missing the required parameter `recipient_id` when calling `update_tabs`")
5767        # verify the required parameter 'template_id' is set
5768        if ('template_id' not in params) or (params['template_id'] is None):
5769            raise ValueError("Missing the required parameter `template_id` when calling `update_tabs`")
5770
5771
5772        collection_formats = {}
5773
5774        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
5775        path_params = {}
5776        if 'account_id' in params:
5777            path_params['accountId'] = params['account_id']
5778        if 'recipient_id' in params:
5779            path_params['recipientId'] = params['recipient_id']
5780        if 'template_id' in params:
5781            path_params['templateId'] = params['template_id']
5782
5783        query_params = {}
5784
5785        header_params = {}
5786
5787        form_params = []
5788        local_var_files = {}
5789
5790        body_params = None
5791        if 'template_tabs' in params:
5792            body_params = params['template_tabs']
5793        # HTTP header `Accept`
5794        header_params['Accept'] = self.api_client.\
5795            select_header_accept(['application/json'])
5796
5797        # Authentication setting
5798        auth_settings = []
5799
5800        return self.api_client.call_api(resource_path, 'PUT',
5801                                        path_params,
5802                                        query_params,
5803                                        header_params,
5804                                        body=body_params,
5805                                        post_params=form_params,
5806                                        files=local_var_files,
5807                                        response_type='Tabs',
5808                                        auth_settings=auth_settings,
5809                                        callback=params.get('callback'),
5810                                        _return_http_data_only=params.get('_return_http_data_only'),
5811                                        _preload_content=params.get('_preload_content', True),
5812                                        _request_timeout=params.get('_request_timeout'),
5813                                        collection_formats=collection_formats)
5814
5815    def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
5816        """
5817        Updates the tabs for a template
5818        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
5819        This method makes a synchronous HTTP request by default. To make an
5820        asynchronous HTTP request, please define a `callback` function
5821        to be invoked when receiving the response.
5822        >>> def callback_function(response):
5823        >>>     pprint(response)
5824        >>>
5825        >>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
5826
5827        :param callback function: The callback function
5828            for asynchronous request. (optional)
5829        :param str account_id: The external account number (int) or account ID Guid. (required)
5830        :param str document_id: The ID of the document being accessed. (required)
5831        :param str template_id: The ID of the template being accessed. (required)
5832        :param TemplateTabs template_tabs:
5833        :return: Tabs
5834                 If the method is called asynchronously,
5835                 returns the request thread.
5836        """
5837        kwargs['_return_http_data_only'] = True
5838        if kwargs.get('callback'):
5839            return self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
5840        else:
5841            (data) = self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
5842            return data
5843
5844    def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
5845        """
5846        Updates the tabs for a template
5847        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
5848        This method makes a synchronous HTTP request by default. To make an
5849        asynchronous HTTP request, please define a `callback` function
5850        to be invoked when receiving the response.
5851        >>> def callback_function(response):
5852        >>>     pprint(response)
5853        >>>
5854        >>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
5855
5856        :param callback function: The callback function
5857            for asynchronous request. (optional)
5858        :param str account_id: The external account number (int) or account ID Guid. (required)
5859        :param str document_id: The ID of the document being accessed. (required)
5860        :param str template_id: The ID of the template being accessed. (required)
5861        :param TemplateTabs template_tabs:
5862        :return: Tabs
5863                 If the method is called asynchronously,
5864                 returns the request thread.
5865        """
5866
5867        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
5868        all_params.append('callback')
5869        all_params.append('_return_http_data_only')
5870        all_params.append('_preload_content')
5871        all_params.append('_request_timeout')
5872
5873        params = locals()
5874        for key, val in iteritems(params['kwargs']):
5875            if key not in all_params:
5876                raise TypeError(
5877                    "Got an unexpected keyword argument '%s'"
5878                    " to method update_template_document_tabs" % key
5879                )
5880            params[key] = val
5881        del params['kwargs']
5882        # verify the required parameter 'account_id' is set
5883        if ('account_id' not in params) or (params['account_id'] is None):
5884            raise ValueError("Missing the required parameter `account_id` when calling `update_template_document_tabs`")
5885        # verify the required parameter 'document_id' is set
5886        if ('document_id' not in params) or (params['document_id'] is None):
5887            raise ValueError("Missing the required parameter `document_id` when calling `update_template_document_tabs`")
5888        # verify the required parameter 'template_id' is set
5889        if ('template_id' not in params) or (params['template_id'] is None):
5890            raise ValueError("Missing the required parameter `template_id` when calling `update_template_document_tabs`")
5891
5892
5893        collection_formats = {}
5894
5895        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
5896        path_params = {}
5897        if 'account_id' in params:
5898            path_params['accountId'] = params['account_id']
5899        if 'document_id' in params:
5900            path_params['documentId'] = params['document_id']
5901        if 'template_id' in params:
5902            path_params['templateId'] = params['template_id']
5903
5904        query_params = {}
5905
5906        header_params = {}
5907
5908        form_params = []
5909        local_var_files = {}
5910
5911        body_params = None
5912        if 'template_tabs' in params:
5913            body_params = params['template_tabs']
5914        # HTTP header `Accept`
5915        header_params['Accept'] = self.api_client.\
5916            select_header_accept(['application/json'])
5917
5918        # Authentication setting
5919        auth_settings = []
5920
5921        return self.api_client.call_api(resource_path, 'PUT',
5922                                        path_params,
5923                                        query_params,
5924                                        header_params,
5925                                        body=body_params,
5926                                        post_params=form_params,
5927                                        files=local_var_files,
5928                                        response_type='Tabs',
5929                                        auth_settings=auth_settings,
5930                                        callback=params.get('callback'),
5931                                        _return_http_data_only=params.get('_return_http_data_only'),
5932                                        _preload_content=params.get('_preload_content', True),
5933                                        _request_timeout=params.get('_request_timeout'),
5934                                        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 ReturnUrlRequest return_url_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)
  • ReturnUrlRequest return_url_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 ReturnUrlRequest return_url_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', 'return_url_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 'return_url_request' in params:
370            body_params = params['return_url_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)
  • ReturnUrlRequest return_url_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 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

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 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)
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 show_changes:
2675        :return: file
2676                 If the method is called asynchronously,
2677                 returns the request thread.
2678        """
2679
2680        all_params = ['account_id', 'document_id', 'template_id', 'encrypt', 'show_changes']
2681        all_params.append('callback')
2682        all_params.append('_return_http_data_only')
2683        all_params.append('_preload_content')
2684        all_params.append('_request_timeout')
2685
2686        params = locals()
2687        for key, val in iteritems(params['kwargs']):
2688            if key not in all_params:
2689                raise TypeError(
2690                    "Got an unexpected keyword argument '%s'"
2691                    " to method get_document" % key
2692                )
2693            params[key] = val
2694        del params['kwargs']
2695        # verify the required parameter 'account_id' is set
2696        if ('account_id' not in params) or (params['account_id'] is None):
2697            raise ValueError("Missing the required parameter `account_id` when calling `get_document`")
2698        # verify the required parameter 'document_id' is set
2699        if ('document_id' not in params) or (params['document_id'] is None):
2700            raise ValueError("Missing the required parameter `document_id` when calling `get_document`")
2701        # verify the required parameter 'template_id' is set
2702        if ('template_id' not in params) or (params['template_id'] is None):
2703            raise ValueError("Missing the required parameter `template_id` when calling `get_document`")
2704
2705
2706        collection_formats = {}
2707
2708        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
2709        path_params = {}
2710        if 'account_id' in params:
2711            path_params['accountId'] = params['account_id']
2712        if 'document_id' in params:
2713            path_params['documentId'] = params['document_id']
2714        if 'template_id' in params:
2715            path_params['templateId'] = params['template_id']
2716
2717        query_params = {}
2718        if 'encrypt' in params:
2719            query_params['encrypt'] = params['encrypt']
2720        if 'show_changes' in params:
2721            query_params['show_changes'] = params['show_changes']
2722
2723        header_params = {}
2724
2725        form_params = []
2726        local_var_files = {}
2727
2728        body_params = None
2729        # HTTP header `Accept`
2730        header_params['Accept'] = self.api_client.\
2731            select_header_accept(['application/pdf'])
2732
2733        # Authentication setting
2734        auth_settings = []
2735
2736        return self.api_client.call_api(resource_path, 'GET',
2737                                        path_params,
2738                                        query_params,
2739                                        header_params,
2740                                        body=body_params,
2741                                        post_params=form_params,
2742                                        files=local_var_files,
2743                                        response_type='file',
2744                                        auth_settings=auth_settings,
2745                                        callback=params.get('callback'),
2746                                        _return_http_data_only=params.get('_return_http_data_only'),
2747                                        _preload_content=params.get('_preload_content', True),
2748                                        _request_timeout=params.get('_request_timeout'),
2749                                        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 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)
2751    def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs):
2752        """
2753        Gets a page image from a template for display.
2754        Retrieves a page image for display from the specified template.
2755        This method makes a synchronous HTTP request by default. To make an
2756        asynchronous HTTP request, please define a `callback` function
2757        to be invoked when receiving the response.
2758        >>> def callback_function(response):
2759        >>>     pprint(response)
2760        >>>
2761        >>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function)
2762
2763        :param callback function: The callback function
2764            for asynchronous request. (optional)
2765        :param str account_id: The external account number (int) or account ID Guid. (required)
2766        :param str document_id: The ID of the document being accessed. (required)
2767        :param str page_number: The page number being accessed. (required)
2768        :param str template_id: The ID of the template being accessed. (required)
2769        :param str dpi:
2770        :param str max_height:
2771        :param str max_width:
2772        :param str show_changes:
2773        :return: file
2774                 If the method is called asynchronously,
2775                 returns the request thread.
2776        """
2777        kwargs['_return_http_data_only'] = True
2778        if kwargs.get('callback'):
2779            return self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2780        else:
2781            (data) = self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
2782            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)
2784    def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
2785        """
2786        Gets a page image from a template for display.
2787        Retrieves a page image for display from the specified template.
2788        This method makes a synchronous HTTP request by default. To make an
2789        asynchronous HTTP request, please define a `callback` function
2790        to be invoked when receiving the response.
2791        >>> def callback_function(response):
2792        >>>     pprint(response)
2793        >>>
2794        >>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
2795
2796        :param callback function: The callback function
2797            for asynchronous request. (optional)
2798        :param str account_id: The external account number (int) or account ID Guid. (required)
2799        :param str document_id: The ID of the document being accessed. (required)
2800        :param str page_number: The page number being accessed. (required)
2801        :param str template_id: The ID of the template being accessed. (required)
2802        :param str dpi:
2803        :param str max_height:
2804        :param str max_width:
2805        :param str show_changes:
2806        :return: file
2807                 If the method is called asynchronously,
2808                 returns the request thread.
2809        """
2810
2811        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'dpi', 'max_height', 'max_width', 'show_changes']
2812        all_params.append('callback')
2813        all_params.append('_return_http_data_only')
2814        all_params.append('_preload_content')
2815        all_params.append('_request_timeout')
2816
2817        params = locals()
2818        for key, val in iteritems(params['kwargs']):
2819            if key not in all_params:
2820                raise TypeError(
2821                    "Got an unexpected keyword argument '%s'"
2822                    " to method get_document_page_image" % key
2823                )
2824            params[key] = val
2825        del params['kwargs']
2826        # verify the required parameter 'account_id' is set
2827        if ('account_id' not in params) or (params['account_id'] is None):
2828            raise ValueError("Missing the required parameter `account_id` when calling `get_document_page_image`")
2829        # verify the required parameter 'document_id' is set
2830        if ('document_id' not in params) or (params['document_id'] is None):
2831            raise ValueError("Missing the required parameter `document_id` when calling `get_document_page_image`")
2832        # verify the required parameter 'page_number' is set
2833        if ('page_number' not in params) or (params['page_number'] is None):
2834            raise ValueError("Missing the required parameter `page_number` when calling `get_document_page_image`")
2835        # verify the required parameter 'template_id' is set
2836        if ('template_id' not in params) or (params['template_id'] is None):
2837            raise ValueError("Missing the required parameter `template_id` when calling `get_document_page_image`")
2838
2839
2840        collection_formats = {}
2841
2842        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
2843        path_params = {}
2844        if 'account_id' in params:
2845            path_params['accountId'] = params['account_id']
2846        if 'document_id' in params:
2847            path_params['documentId'] = params['document_id']
2848        if 'page_number' in params:
2849            path_params['pageNumber'] = params['page_number']
2850        if 'template_id' in params:
2851            path_params['templateId'] = params['template_id']
2852
2853        query_params = {}
2854        if 'dpi' in params:
2855            query_params['dpi'] = params['dpi']
2856        if 'max_height' in params:
2857            query_params['max_height'] = params['max_height']
2858        if 'max_width' in params:
2859            query_params['max_width'] = params['max_width']
2860        if 'show_changes' in params:
2861            query_params['show_changes'] = params['show_changes']
2862
2863        header_params = {}
2864
2865        form_params = []
2866        local_var_files = {}
2867
2868        body_params = None
2869        # HTTP header `Accept`
2870        header_params['Accept'] = self.api_client.\
2871            select_header_accept(['image/png'])
2872
2873        # Authentication setting
2874        auth_settings = []
2875
2876        return self.api_client.call_api(resource_path, 'GET',
2877                                        path_params,
2878                                        query_params,
2879                                        header_params,
2880                                        body=body_params,
2881                                        post_params=form_params,
2882                                        files=local_var_files,
2883                                        response_type='file',
2884                                        auth_settings=auth_settings,
2885                                        callback=params.get('callback'),
2886                                        _return_http_data_only=params.get('_return_http_data_only'),
2887                                        _preload_content=params.get('_preload_content', True),
2888                                        _request_timeout=params.get('_request_timeout'),
2889                                        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)
2891    def get_document_tabs(self, account_id, document_id, template_id, **kwargs):
2892        """
2893        Returns tabs on the document.
2894        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
2895        This method makes a synchronous HTTP request by default. To make an
2896        asynchronous HTTP request, please define a `callback` function
2897        to be invoked when receiving the response.
2898        >>> def callback_function(response):
2899        >>>     pprint(response)
2900        >>>
2901        >>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function)
2902
2903        :param callback function: The callback function
2904            for asynchronous request. (optional)
2905        :param str account_id: The external account number (int) or account ID Guid. (required)
2906        :param str document_id: The ID of the document being accessed. (required)
2907        :param str template_id: The ID of the template being accessed. (required)
2908        :param str page_numbers:
2909        :return: Tabs
2910                 If the method is called asynchronously,
2911                 returns the request thread.
2912        """
2913        kwargs['_return_http_data_only'] = True
2914        if kwargs.get('callback'):
2915            return self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2916        else:
2917            (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
2918            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)
2920    def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
2921        """
2922        Returns tabs on the document.
2923        Returns the tabs on the document specified by `documentId` in the template specified by `templateId`.  
2924        This method makes a synchronous HTTP request by default. To make an
2925        asynchronous HTTP request, please define a `callback` function
2926        to be invoked when receiving the response.
2927        >>> def callback_function(response):
2928        >>>     pprint(response)
2929        >>>
2930        >>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
2931
2932        :param callback function: The callback function
2933            for asynchronous request. (optional)
2934        :param str account_id: The external account number (int) or account ID Guid. (required)
2935        :param str document_id: The ID of the document being accessed. (required)
2936        :param str template_id: The ID of the template being accessed. (required)
2937        :param str page_numbers:
2938        :return: Tabs
2939                 If the method is called asynchronously,
2940                 returns the request thread.
2941        """
2942
2943        all_params = ['account_id', 'document_id', 'template_id', 'page_numbers']
2944        all_params.append('callback')
2945        all_params.append('_return_http_data_only')
2946        all_params.append('_preload_content')
2947        all_params.append('_request_timeout')
2948
2949        params = locals()
2950        for key, val in iteritems(params['kwargs']):
2951            if key not in all_params:
2952                raise TypeError(
2953                    "Got an unexpected keyword argument '%s'"
2954                    " to method get_document_tabs" % key
2955                )
2956            params[key] = val
2957        del params['kwargs']
2958        # verify the required parameter 'account_id' is set
2959        if ('account_id' not in params) or (params['account_id'] is None):
2960            raise ValueError("Missing the required parameter `account_id` when calling `get_document_tabs`")
2961        # verify the required parameter 'document_id' is set
2962        if ('document_id' not in params) or (params['document_id'] is None):
2963            raise ValueError("Missing the required parameter `document_id` when calling `get_document_tabs`")
2964        # verify the required parameter 'template_id' is set
2965        if ('template_id' not in params) or (params['template_id'] is None):
2966            raise ValueError("Missing the required parameter `template_id` when calling `get_document_tabs`")
2967
2968
2969        collection_formats = {}
2970
2971        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
2972        path_params = {}
2973        if 'account_id' in params:
2974            path_params['accountId'] = params['account_id']
2975        if 'document_id' in params:
2976            path_params['documentId'] = params['document_id']
2977        if 'template_id' in params:
2978            path_params['templateId'] = params['template_id']
2979
2980        query_params = {}
2981        if 'page_numbers' in params:
2982            query_params['page_numbers'] = params['page_numbers']
2983
2984        header_params = {}
2985
2986        form_params = []
2987        local_var_files = {}
2988
2989        body_params = None
2990        # HTTP header `Accept`
2991        header_params['Accept'] = self.api_client.\
2992            select_header_accept(['application/json'])
2993
2994        # Authentication setting
2995        auth_settings = []
2996
2997        return self.api_client.call_api(resource_path, 'GET',
2998                                        path_params,
2999                                        query_params,
3000                                        header_params,
3001                                        body=body_params,
3002                                        post_params=form_params,
3003                                        files=local_var_files,
3004                                        response_type='Tabs',
3005                                        auth_settings=auth_settings,
3006                                        callback=params.get('callback'),
3007                                        _return_http_data_only=params.get('_return_http_data_only'),
3008                                        _preload_content=params.get('_preload_content', True),
3009                                        _request_timeout=params.get('_request_timeout'),
3010                                        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)
3012    def get_lock(self, account_id, template_id, **kwargs):
3013        """
3014        Gets template lock information.
3015        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.
3016        This method makes a synchronous HTTP request by default. To make an
3017        asynchronous HTTP request, please define a `callback` function
3018        to be invoked when receiving the response.
3019        >>> def callback_function(response):
3020        >>>     pprint(response)
3021        >>>
3022        >>> thread = api.get_lock(account_id, template_id, callback=callback_function)
3023
3024        :param callback function: The callback function
3025            for asynchronous request. (optional)
3026        :param str account_id: The external account number (int) or account ID Guid. (required)
3027        :param str template_id: The ID of the template being accessed. (required)
3028        :return: LockInformation
3029                 If the method is called asynchronously,
3030                 returns the request thread.
3031        """
3032        kwargs['_return_http_data_only'] = True
3033        if kwargs.get('callback'):
3034            return self.get_lock_with_http_info(account_id, template_id, **kwargs)
3035        else:
3036            (data) = self.get_lock_with_http_info(account_id, template_id, **kwargs)
3037            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)
3039    def get_lock_with_http_info(self, account_id, template_id, **kwargs):
3040        """
3041        Gets template lock information.
3042        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.
3043        This method makes a synchronous HTTP request by default. To make an
3044        asynchronous HTTP request, please define a `callback` function
3045        to be invoked when receiving the response.
3046        >>> def callback_function(response):
3047        >>>     pprint(response)
3048        >>>
3049        >>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function)
3050
3051        :param callback function: The callback function
3052            for asynchronous request. (optional)
3053        :param str account_id: The external account number (int) or account ID Guid. (required)
3054        :param str template_id: The ID of the template being accessed. (required)
3055        :return: LockInformation
3056                 If the method is called asynchronously,
3057                 returns the request thread.
3058        """
3059
3060        all_params = ['account_id', 'template_id']
3061        all_params.append('callback')
3062        all_params.append('_return_http_data_only')
3063        all_params.append('_preload_content')
3064        all_params.append('_request_timeout')
3065
3066        params = locals()
3067        for key, val in iteritems(params['kwargs']):
3068            if key not in all_params:
3069                raise TypeError(
3070                    "Got an unexpected keyword argument '%s'"
3071                    " to method get_lock" % key
3072                )
3073            params[key] = val
3074        del params['kwargs']
3075        # verify the required parameter 'account_id' is set
3076        if ('account_id' not in params) or (params['account_id'] is None):
3077            raise ValueError("Missing the required parameter `account_id` when calling `get_lock`")
3078        # verify the required parameter 'template_id' is set
3079        if ('template_id' not in params) or (params['template_id'] is None):
3080            raise ValueError("Missing the required parameter `template_id` when calling `get_lock`")
3081
3082
3083        collection_formats = {}
3084
3085        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
3086        path_params = {}
3087        if 'account_id' in params:
3088            path_params['accountId'] = params['account_id']
3089        if 'template_id' in params:
3090            path_params['templateId'] = params['template_id']
3091
3092        query_params = {}
3093
3094        header_params = {}
3095
3096        form_params = []
3097        local_var_files = {}
3098
3099        body_params = None
3100        # HTTP header `Accept`
3101        header_params['Accept'] = self.api_client.\
3102            select_header_accept(['application/json'])
3103
3104        # Authentication setting
3105        auth_settings = []
3106
3107        return self.api_client.call_api(resource_path, 'GET',
3108                                        path_params,
3109                                        query_params,
3110                                        header_params,
3111                                        body=body_params,
3112                                        post_params=form_params,
3113                                        files=local_var_files,
3114                                        response_type='LockInformation',
3115                                        auth_settings=auth_settings,
3116                                        callback=params.get('callback'),
3117                                        _return_http_data_only=params.get('_return_http_data_only'),
3118                                        _preload_content=params.get('_preload_content', True),
3119                                        _request_timeout=params.get('_request_timeout'),
3120                                        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)
3122    def get_notification_settings(self, account_id, template_id, **kwargs):
3123        """
3124        Gets template notification information.
3125        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3126        This method makes a synchronous HTTP request by default. To make an
3127        asynchronous HTTP request, please define a `callback` function
3128        to be invoked when receiving the response.
3129        >>> def callback_function(response):
3130        >>>     pprint(response)
3131        >>>
3132        >>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function)
3133
3134        :param callback function: The callback function
3135            for asynchronous request. (optional)
3136        :param str account_id: The external account number (int) or account ID Guid. (required)
3137        :param str template_id: The ID of the template being accessed. (required)
3138        :return: Notification
3139                 If the method is called asynchronously,
3140                 returns the request thread.
3141        """
3142        kwargs['_return_http_data_only'] = True
3143        if kwargs.get('callback'):
3144            return self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3145        else:
3146            (data) = self.get_notification_settings_with_http_info(account_id, template_id, **kwargs)
3147            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)
3149    def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
3150        """
3151        Gets template notification information.
3152        Retrieves the envelope notification, reminders and expirations, information for an existing template.
3153        This method makes a synchronous HTTP request by default. To make an
3154        asynchronous HTTP request, please define a `callback` function
3155        to be invoked when receiving the response.
3156        >>> def callback_function(response):
3157        >>>     pprint(response)
3158        >>>
3159        >>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
3160
3161        :param callback function: The callback function
3162            for asynchronous request. (optional)
3163        :param str account_id: The external account number (int) or account ID Guid. (required)
3164        :param str template_id: The ID of the template being accessed. (required)
3165        :return: Notification
3166                 If the method is called asynchronously,
3167                 returns the request thread.
3168        """
3169
3170        all_params = ['account_id', 'template_id']
3171        all_params.append('callback')
3172        all_params.append('_return_http_data_only')
3173        all_params.append('_preload_content')
3174        all_params.append('_request_timeout')
3175
3176        params = locals()
3177        for key, val in iteritems(params['kwargs']):
3178            if key not in all_params:
3179                raise TypeError(
3180                    "Got an unexpected keyword argument '%s'"
3181                    " to method get_notification_settings" % key
3182                )
3183            params[key] = val
3184        del params['kwargs']
3185        # verify the required parameter 'account_id' is set
3186        if ('account_id' not in params) or (params['account_id'] is None):
3187            raise ValueError("Missing the required parameter `account_id` when calling `get_notification_settings`")
3188        # verify the required parameter 'template_id' is set
3189        if ('template_id' not in params) or (params['template_id'] is None):
3190            raise ValueError("Missing the required parameter `template_id` when calling `get_notification_settings`")
3191
3192
3193        collection_formats = {}
3194
3195        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
3196        path_params = {}
3197        if 'account_id' in params:
3198            path_params['accountId'] = params['account_id']
3199        if 'template_id' in params:
3200            path_params['templateId'] = params['template_id']
3201
3202        query_params = {}
3203
3204        header_params = {}
3205
3206        form_params = []
3207        local_var_files = {}
3208
3209        body_params = None
3210        # HTTP header `Accept`
3211        header_params['Accept'] = self.api_client.\
3212            select_header_accept(['application/json'])
3213
3214        # Authentication setting
3215        auth_settings = []
3216
3217        return self.api_client.call_api(resource_path, 'GET',
3218                                        path_params,
3219                                        query_params,
3220                                        header_params,
3221                                        body=body_params,
3222                                        post_params=form_params,
3223                                        files=local_var_files,
3224                                        response_type='Notification',
3225                                        auth_settings=auth_settings,
3226                                        callback=params.get('callback'),
3227                                        _return_http_data_only=params.get('_return_http_data_only'),
3228                                        _preload_content=params.get('_preload_content', True),
3229                                        _request_timeout=params.get('_request_timeout'),
3230                                        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)
3232    def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs):
3233        """
3234        Returns tabs on the specified page.
3235        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3236        This method makes a synchronous HTTP request by default. To make an
3237        asynchronous HTTP request, please define a `callback` function
3238        to be invoked when receiving the response.
3239        >>> def callback_function(response):
3240        >>>     pprint(response)
3241        >>>
3242        >>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function)
3243
3244        :param callback function: The callback function
3245            for asynchronous request. (optional)
3246        :param str account_id: The external account number (int) or account ID Guid. (required)
3247        :param str document_id: The ID of the document being accessed. (required)
3248        :param str page_number: The page number being accessed. (required)
3249        :param str template_id: The ID of the template being accessed. (required)
3250        :return: Tabs
3251                 If the method is called asynchronously,
3252                 returns the request thread.
3253        """
3254        kwargs['_return_http_data_only'] = True
3255        if kwargs.get('callback'):
3256            return self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3257        else:
3258            (data) = self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
3259            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)
3261    def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
3262        """
3263        Returns tabs on the specified page.
3264        Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 
3265        This method makes a synchronous HTTP request by default. To make an
3266        asynchronous HTTP request, please define a `callback` function
3267        to be invoked when receiving the response.
3268        >>> def callback_function(response):
3269        >>>     pprint(response)
3270        >>>
3271        >>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
3272
3273        :param callback function: The callback function
3274            for asynchronous request. (optional)
3275        :param str account_id: The external account number (int) or account ID Guid. (required)
3276        :param str document_id: The ID of the document being accessed. (required)
3277        :param str page_number: The page number being accessed. (required)
3278        :param str template_id: The ID of the template being accessed. (required)
3279        :return: Tabs
3280                 If the method is called asynchronously,
3281                 returns the request thread.
3282        """
3283
3284        all_params = ['account_id', 'document_id', 'page_number', 'template_id']
3285        all_params.append('callback')
3286        all_params.append('_return_http_data_only')
3287        all_params.append('_preload_content')
3288        all_params.append('_request_timeout')
3289
3290        params = locals()
3291        for key, val in iteritems(params['kwargs']):
3292            if key not in all_params:
3293                raise TypeError(
3294                    "Got an unexpected keyword argument '%s'"
3295                    " to method get_page_tabs" % key
3296                )
3297            params[key] = val
3298        del params['kwargs']
3299        # verify the required parameter 'account_id' is set
3300        if ('account_id' not in params) or (params['account_id'] is None):
3301            raise ValueError("Missing the required parameter `account_id` when calling `get_page_tabs`")
3302        # verify the required parameter 'document_id' is set
3303        if ('document_id' not in params) or (params['document_id'] is None):
3304            raise ValueError("Missing the required parameter `document_id` when calling `get_page_tabs`")
3305        # verify the required parameter 'page_number' is set
3306        if ('page_number' not in params) or (params['page_number'] is None):
3307            raise ValueError("Missing the required parameter `page_number` when calling `get_page_tabs`")
3308        # verify the required parameter 'template_id' is set
3309        if ('template_id' not in params) or (params['template_id'] is None):
3310            raise ValueError("Missing the required parameter `template_id` when calling `get_page_tabs`")
3311
3312
3313        collection_formats = {}
3314
3315        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs'.replace('{format}', 'json')
3316        path_params = {}
3317        if 'account_id' in params:
3318            path_params['accountId'] = params['account_id']
3319        if 'document_id' in params:
3320            path_params['documentId'] = params['document_id']
3321        if 'page_number' in params:
3322            path_params['pageNumber'] = params['page_number']
3323        if 'template_id' in params:
3324            path_params['templateId'] = params['template_id']
3325
3326        query_params = {}
3327
3328        header_params = {}
3329
3330        form_params = []
3331        local_var_files = {}
3332
3333        body_params = None
3334        # HTTP header `Accept`
3335        header_params['Accept'] = self.api_client.\
3336            select_header_accept(['application/json'])
3337
3338        # Authentication setting
3339        auth_settings = []
3340
3341        return self.api_client.call_api(resource_path, 'GET',
3342                                        path_params,
3343                                        query_params,
3344                                        header_params,
3345                                        body=body_params,
3346                                        post_params=form_params,
3347                                        files=local_var_files,
3348                                        response_type='Tabs',
3349                                        auth_settings=auth_settings,
3350                                        callback=params.get('callback'),
3351                                        _return_http_data_only=params.get('_return_http_data_only'),
3352                                        _preload_content=params.get('_preload_content', True),
3353                                        _request_timeout=params.get('_request_timeout'),
3354                                        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)
3356    def get_pages(self, account_id, document_id, template_id, **kwargs):
3357        """
3358        Returns document page image(s) based on input.
3359        Returns images of the pages in a template document for display based on the parameters that you specify.
3360        This method makes a synchronous HTTP request by default. To make an
3361        asynchronous HTTP request, please define a `callback` function
3362        to be invoked when receiving the response.
3363        >>> def callback_function(response):
3364        >>>     pprint(response)
3365        >>>
3366        >>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function)
3367
3368        :param callback function: The callback function
3369            for asynchronous request. (optional)
3370        :param str account_id: The external account number (int) or account ID Guid. (required)
3371        :param str document_id: The ID of the document being accessed. (required)
3372        :param str template_id: The ID of the template being accessed. (required)
3373        :param str count:
3374        :param str dpi:
3375        :param str max_height:
3376        :param str max_width:
3377        :param str nocache:
3378        :param str show_changes:
3379        :param str start_position:
3380        :return: PageImages
3381                 If the method is called asynchronously,
3382                 returns the request thread.
3383        """
3384        kwargs['_return_http_data_only'] = True
3385        if kwargs.get('callback'):
3386            return self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3387        else:
3388            (data) = self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs)
3389            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)
3391    def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs):
3392        """
3393        Returns document page image(s) based on input.
3394        Returns images of the pages in a template document for display based on the parameters that you specify.
3395        This method makes a synchronous HTTP request by default. To make an
3396        asynchronous HTTP request, please define a `callback` function
3397        to be invoked when receiving the response.
3398        >>> def callback_function(response):
3399        >>>     pprint(response)
3400        >>>
3401        >>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function)
3402
3403        :param callback function: The callback function
3404            for asynchronous request. (optional)
3405        :param str account_id: The external account number (int) or account ID Guid. (required)
3406        :param str document_id: The ID of the document being accessed. (required)
3407        :param str template_id: The ID of the template being accessed. (required)
3408        :param str count:
3409        :param str dpi:
3410        :param str max_height:
3411        :param str max_width:
3412        :param str nocache:
3413        :param str show_changes:
3414        :param str start_position:
3415        :return: PageImages
3416                 If the method is called asynchronously,
3417                 returns the request thread.
3418        """
3419
3420        all_params = ['account_id', 'document_id', 'template_id', 'count', 'dpi', 'max_height', 'max_width', 'nocache', 'show_changes', 'start_position']
3421        all_params.append('callback')
3422        all_params.append('_return_http_data_only')
3423        all_params.append('_preload_content')
3424        all_params.append('_request_timeout')
3425
3426        params = locals()
3427        for key, val in iteritems(params['kwargs']):
3428            if key not in all_params:
3429                raise TypeError(
3430                    "Got an unexpected keyword argument '%s'"
3431                    " to method get_pages" % key
3432                )
3433            params[key] = val
3434        del params['kwargs']
3435        # verify the required parameter 'account_id' is set
3436        if ('account_id' not in params) or (params['account_id'] is None):
3437            raise ValueError("Missing the required parameter `account_id` when calling `get_pages`")
3438        # verify the required parameter 'document_id' is set
3439        if ('document_id' not in params) or (params['document_id'] is None):
3440            raise ValueError("Missing the required parameter `document_id` when calling `get_pages`")
3441        # verify the required parameter 'template_id' is set
3442        if ('template_id' not in params) or (params['template_id'] is None):
3443            raise ValueError("Missing the required parameter `template_id` when calling `get_pages`")
3444
3445
3446        collection_formats = {}
3447
3448        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages'.replace('{format}', 'json')
3449        path_params = {}
3450        if 'account_id' in params:
3451            path_params['accountId'] = params['account_id']
3452        if 'document_id' in params:
3453            path_params['documentId'] = params['document_id']
3454        if 'template_id' in params:
3455            path_params['templateId'] = params['template_id']
3456
3457        query_params = {}
3458        if 'count' in params:
3459            query_params['count'] = params['count']
3460        if 'dpi' in params:
3461            query_params['dpi'] = params['dpi']
3462        if 'max_height' in params:
3463            query_params['max_height'] = params['max_height']
3464        if 'max_width' in params:
3465            query_params['max_width'] = params['max_width']
3466        if 'nocache' in params:
3467            query_params['nocache'] = params['nocache']
3468        if 'show_changes' in params:
3469            query_params['show_changes'] = params['show_changes']
3470        if 'start_position' in params:
3471            query_params['start_position'] = params['start_position']
3472
3473        header_params = {}
3474
3475        form_params = []
3476        local_var_files = {}
3477
3478        body_params = None
3479        # HTTP header `Accept`
3480        header_params['Accept'] = self.api_client.\
3481            select_header_accept(['application/json'])
3482
3483        # Authentication setting
3484        auth_settings = []
3485
3486        return self.api_client.call_api(resource_path, 'GET',
3487                                        path_params,
3488                                        query_params,
3489                                        header_params,
3490                                        body=body_params,
3491                                        post_params=form_params,
3492                                        files=local_var_files,
3493                                        response_type='PageImages',
3494                                        auth_settings=auth_settings,
3495                                        callback=params.get('callback'),
3496                                        _return_http_data_only=params.get('_return_http_data_only'),
3497                                        _preload_content=params.get('_preload_content', True),
3498                                        _request_timeout=params.get('_request_timeout'),
3499                                        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)
3501    def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs):
3502        """
3503        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3504        
3505        This method makes a synchronous HTTP request by default. To make an
3506        asynchronous HTTP request, please define a `callback` function
3507        to be invoked when receiving the response.
3508        >>> def callback_function(response):
3509        >>>     pprint(response)
3510        >>>
3511        >>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function)
3512
3513        :param callback function: The callback function
3514            for asynchronous request. (optional)
3515        :param str account_id: The external account number (int) or account ID Guid. (required)
3516        :param str document_id: The ID of the document being accessed. (required)
3517        :param str template_id: The ID of the template being accessed. (required)
3518        :return: DocumentHtmlDefinitionOriginals
3519                 If the method is called asynchronously,
3520                 returns the request thread.
3521        """
3522        kwargs['_return_http_data_only'] = True
3523        if kwargs.get('callback'):
3524            return self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3525        else:
3526            (data) = self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs)
3527            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)
3529    def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs):
3530        """
3531        Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
3532        
3533        This method makes a synchronous HTTP request by default. To make an
3534        asynchronous HTTP request, please define a `callback` function
3535        to be invoked when receiving the response.
3536        >>> def callback_function(response):
3537        >>>     pprint(response)
3538        >>>
3539        >>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function)
3540
3541        :param callback function: The callback function
3542            for asynchronous request. (optional)
3543        :param str account_id: The external account number (int) or account ID Guid. (required)
3544        :param str document_id: The ID of the document being accessed. (required)
3545        :param str template_id: The ID of the template being accessed. (required)
3546        :return: DocumentHtmlDefinitionOriginals
3547                 If the method is called asynchronously,
3548                 returns the request thread.
3549        """
3550
3551        all_params = ['account_id', 'document_id', 'template_id']
3552        all_params.append('callback')
3553        all_params.append('_return_http_data_only')
3554        all_params.append('_preload_content')
3555        all_params.append('_request_timeout')
3556
3557        params = locals()
3558        for key, val in iteritems(params['kwargs']):
3559            if key not in all_params:
3560                raise TypeError(
3561                    "Got an unexpected keyword argument '%s'"
3562                    " to method get_template_document_html_definitions" % key
3563                )
3564            params[key] = val
3565        del params['kwargs']
3566        # verify the required parameter 'account_id' is set
3567        if ('account_id' not in params) or (params['account_id'] is None):
3568            raise ValueError("Missing the required parameter `account_id` when calling `get_template_document_html_definitions`")
3569        # verify the required parameter 'document_id' is set
3570        if ('document_id' not in params) or (params['document_id'] is None):
3571            raise ValueError("Missing the required parameter `document_id` when calling `get_template_document_html_definitions`")
3572        # verify the required parameter 'template_id' is set
3573        if ('template_id' not in params) or (params['template_id'] is None):
3574            raise ValueError("Missing the required parameter `template_id` when calling `get_template_document_html_definitions`")
3575
3576
3577        collection_formats = {}
3578
3579        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions'.replace('{format}', 'json')
3580        path_params = {}
3581        if 'account_id' in params:
3582            path_params['accountId'] = params['account_id']
3583        if 'document_id' in params:
3584            path_params['documentId'] = params['document_id']
3585        if 'template_id' in params:
3586            path_params['templateId'] = params['template_id']
3587
3588        query_params = {}
3589
3590        header_params = {}
3591
3592        form_params = []
3593        local_var_files = {}
3594
3595        body_params = None
3596        # HTTP header `Accept`
3597        header_params['Accept'] = self.api_client.\
3598            select_header_accept(['application/json'])
3599
3600        # Authentication setting
3601        auth_settings = []
3602
3603        return self.api_client.call_api(resource_path, 'GET',
3604                                        path_params,
3605                                        query_params,
3606                                        header_params,
3607                                        body=body_params,
3608                                        post_params=form_params,
3609                                        files=local_var_files,
3610                                        response_type='DocumentHtmlDefinitionOriginals',
3611                                        auth_settings=auth_settings,
3612                                        callback=params.get('callback'),
3613                                        _return_http_data_only=params.get('_return_http_data_only'),
3614                                        _preload_content=params.get('_preload_content', True),
3615                                        _request_timeout=params.get('_request_timeout'),
3616                                        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)
3618    def get_template_html_definitions(self, account_id, template_id, **kwargs):
3619        """
3620        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3621        
3622        This method makes a synchronous HTTP request by default. To make an
3623        asynchronous HTTP request, please define a `callback` function
3624        to be invoked when receiving the response.
3625        >>> def callback_function(response):
3626        >>>     pprint(response)
3627        >>>
3628        >>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function)
3629
3630        :param callback function: The callback function
3631            for asynchronous request. (optional)
3632        :param str account_id: The external account number (int) or account ID Guid. (required)
3633        :param str template_id: The ID of the template being accessed. (required)
3634        :return: DocumentHtmlDefinitionOriginals
3635                 If the method is called asynchronously,
3636                 returns the request thread.
3637        """
3638        kwargs['_return_http_data_only'] = True
3639        if kwargs.get('callback'):
3640            return self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3641        else:
3642            (data) = self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs)
3643            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)
3645    def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs):
3646        """
3647        Get the Original HTML Definition used to generate the Responsive HTML for the template.
3648        
3649        This method makes a synchronous HTTP request by default. To make an
3650        asynchronous HTTP request, please define a `callback` function
3651        to be invoked when receiving the response.
3652        >>> def callback_function(response):
3653        >>>     pprint(response)
3654        >>>
3655        >>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function)
3656
3657        :param callback function: The callback function
3658            for asynchronous request. (optional)
3659        :param str account_id: The external account number (int) or account ID Guid. (required)
3660        :param str template_id: The ID of the template being accessed. (required)
3661        :return: DocumentHtmlDefinitionOriginals
3662                 If the method is called asynchronously,
3663                 returns the request thread.
3664        """
3665
3666        all_params = ['account_id', 'template_id']
3667        all_params.append('callback')
3668        all_params.append('_return_http_data_only')
3669        all_params.append('_preload_content')
3670        all_params.append('_request_timeout')
3671
3672        params = locals()
3673        for key, val in iteritems(params['kwargs']):
3674            if key not in all_params:
3675                raise TypeError(
3676                    "Got an unexpected keyword argument '%s'"
3677                    " to method get_template_html_definitions" % key
3678                )
3679            params[key] = val
3680        del params['kwargs']
3681        # verify the required parameter 'account_id' is set
3682        if ('account_id' not in params) or (params['account_id'] is None):
3683            raise ValueError("Missing the required parameter `account_id` when calling `get_template_html_definitions`")
3684        # verify the required parameter 'template_id' is set
3685        if ('template_id' not in params) or (params['template_id'] is None):
3686            raise ValueError("Missing the required parameter `template_id` when calling `get_template_html_definitions`")
3687
3688
3689        collection_formats = {}
3690
3691        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions'.replace('{format}', 'json')
3692        path_params = {}
3693        if 'account_id' in params:
3694            path_params['accountId'] = params['account_id']
3695        if 'template_id' in params:
3696            path_params['templateId'] = params['template_id']
3697
3698        query_params = {}
3699
3700        header_params = {}
3701
3702        form_params = []
3703        local_var_files = {}
3704
3705        body_params = None
3706        # HTTP header `Accept`
3707        header_params['Accept'] = self.api_client.\
3708            select_header_accept(['application/json'])
3709
3710        # Authentication setting
3711        auth_settings = []
3712
3713        return self.api_client.call_api(resource_path, 'GET',
3714                                        path_params,
3715                                        query_params,
3716                                        header_params,
3717                                        body=body_params,
3718                                        post_params=form_params,
3719                                        files=local_var_files,
3720                                        response_type='DocumentHtmlDefinitionOriginals',
3721                                        auth_settings=auth_settings,
3722                                        callback=params.get('callback'),
3723                                        _return_http_data_only=params.get('_return_http_data_only'),
3724                                        _preload_content=params.get('_preload_content', True),
3725                                        _request_timeout=params.get('_request_timeout'),
3726                                        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)
3728    def list_custom_fields(self, account_id, template_id, **kwargs):
3729        """
3730        Gets the custom document fields from a template.
3731        Retrieves the custom document field information from an existing template.
3732        This method makes a synchronous HTTP request by default. To make an
3733        asynchronous HTTP request, please define a `callback` function
3734        to be invoked when receiving the response.
3735        >>> def callback_function(response):
3736        >>>     pprint(response)
3737        >>>
3738        >>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function)
3739
3740        :param callback function: The callback function
3741            for asynchronous request. (optional)
3742        :param str account_id: The external account number (int) or account ID Guid. (required)
3743        :param str template_id: The ID of the template being accessed. (required)
3744        :return: CustomFields
3745                 If the method is called asynchronously,
3746                 returns the request thread.
3747        """
3748        kwargs['_return_http_data_only'] = True
3749        if kwargs.get('callback'):
3750            return self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3751        else:
3752            (data) = self.list_custom_fields_with_http_info(account_id, template_id, **kwargs)
3753            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)
3755    def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
3756        """
3757        Gets the custom document fields from a template.
3758        Retrieves the custom document field information from an existing template.
3759        This method makes a synchronous HTTP request by default. To make an
3760        asynchronous HTTP request, please define a `callback` function
3761        to be invoked when receiving the response.
3762        >>> def callback_function(response):
3763        >>>     pprint(response)
3764        >>>
3765        >>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
3766
3767        :param callback function: The callback function
3768            for asynchronous request. (optional)
3769        :param str account_id: The external account number (int) or account ID Guid. (required)
3770        :param str template_id: The ID of the template being accessed. (required)
3771        :return: CustomFields
3772                 If the method is called asynchronously,
3773                 returns the request thread.
3774        """
3775
3776        all_params = ['account_id', 'template_id']
3777        all_params.append('callback')
3778        all_params.append('_return_http_data_only')
3779        all_params.append('_preload_content')
3780        all_params.append('_request_timeout')
3781
3782        params = locals()
3783        for key, val in iteritems(params['kwargs']):
3784            if key not in all_params:
3785                raise TypeError(
3786                    "Got an unexpected keyword argument '%s'"
3787                    " to method list_custom_fields" % key
3788                )
3789            params[key] = val
3790        del params['kwargs']
3791        # verify the required parameter 'account_id' is set
3792        if ('account_id' not in params) or (params['account_id'] is None):
3793            raise ValueError("Missing the required parameter `account_id` when calling `list_custom_fields`")
3794        # verify the required parameter 'template_id' is set
3795        if ('template_id' not in params) or (params['template_id'] is None):
3796            raise ValueError("Missing the required parameter `template_id` when calling `list_custom_fields`")
3797
3798
3799        collection_formats = {}
3800
3801        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
3802        path_params = {}
3803        if 'account_id' in params:
3804            path_params['accountId'] = params['account_id']
3805        if 'template_id' in params:
3806            path_params['templateId'] = params['template_id']
3807
3808        query_params = {}
3809
3810        header_params = {}
3811
3812        form_params = []
3813        local_var_files = {}
3814
3815        body_params = None
3816        # HTTP header `Accept`
3817        header_params['Accept'] = self.api_client.\
3818            select_header_accept(['application/json'])
3819
3820        # Authentication setting
3821        auth_settings = []
3822
3823        return self.api_client.call_api(resource_path, 'GET',
3824                                        path_params,
3825                                        query_params,
3826                                        header_params,
3827                                        body=body_params,
3828                                        post_params=form_params,
3829                                        files=local_var_files,
3830                                        response_type='CustomFields',
3831                                        auth_settings=auth_settings,
3832                                        callback=params.get('callback'),
3833                                        _return_http_data_only=params.get('_return_http_data_only'),
3834                                        _preload_content=params.get('_preload_content', True),
3835                                        _request_timeout=params.get('_request_timeout'),
3836                                        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)
3838    def list_document_fields(self, account_id, document_id, template_id, **kwargs):
3839        """
3840        Gets the custom document fields for a an existing template document.
3841        Retrieves the custom document fields for an existing template document.
3842        This method makes a synchronous HTTP request by default. To make an
3843        asynchronous HTTP request, please define a `callback` function
3844        to be invoked when receiving the response.
3845        >>> def callback_function(response):
3846        >>>     pprint(response)
3847        >>>
3848        >>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function)
3849
3850        :param callback function: The callback function
3851            for asynchronous request. (optional)
3852        :param str account_id: The external account number (int) or account ID Guid. (required)
3853        :param str document_id: The ID of the document being accessed. (required)
3854        :param str template_id: The ID of the template being accessed. (required)
3855        :return: DocumentFieldsInformation
3856                 If the method is called asynchronously,
3857                 returns the request thread.
3858        """
3859        kwargs['_return_http_data_only'] = True
3860        if kwargs.get('callback'):
3861            return self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
3862        else:
3863            (data) = self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
3864            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)
3866    def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
3867        """
3868        Gets the custom document fields for a an existing template document.
3869        Retrieves the custom document fields for an existing template document.
3870        This method makes a synchronous HTTP request by default. To make an
3871        asynchronous HTTP request, please define a `callback` function
3872        to be invoked when receiving the response.
3873        >>> def callback_function(response):
3874        >>>     pprint(response)
3875        >>>
3876        >>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
3877
3878        :param callback function: The callback function
3879            for asynchronous request. (optional)
3880        :param str account_id: The external account number (int) or account ID Guid. (required)
3881        :param str document_id: The ID of the document being accessed. (required)
3882        :param str template_id: The ID of the template being accessed. (required)
3883        :return: DocumentFieldsInformation
3884                 If the method is called asynchronously,
3885                 returns the request thread.
3886        """
3887
3888        all_params = ['account_id', 'document_id', 'template_id']
3889        all_params.append('callback')
3890        all_params.append('_return_http_data_only')
3891        all_params.append('_preload_content')
3892        all_params.append('_request_timeout')
3893
3894        params = locals()
3895        for key, val in iteritems(params['kwargs']):
3896            if key not in all_params:
3897                raise TypeError(
3898                    "Got an unexpected keyword argument '%s'"
3899                    " to method list_document_fields" % key
3900                )
3901            params[key] = val
3902        del params['kwargs']
3903        # verify the required parameter 'account_id' is set
3904        if ('account_id' not in params) or (params['account_id'] is None):
3905            raise ValueError("Missing the required parameter `account_id` when calling `list_document_fields`")
3906        # verify the required parameter 'document_id' is set
3907        if ('document_id' not in params) or (params['document_id'] is None):
3908            raise ValueError("Missing the required parameter `document_id` when calling `list_document_fields`")
3909        # verify the required parameter 'template_id' is set
3910        if ('template_id' not in params) or (params['template_id'] is None):
3911            raise ValueError("Missing the required parameter `template_id` when calling `list_document_fields`")
3912
3913
3914        collection_formats = {}
3915
3916        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
3917        path_params = {}
3918        if 'account_id' in params:
3919            path_params['accountId'] = params['account_id']
3920        if 'document_id' in params:
3921            path_params['documentId'] = params['document_id']
3922        if 'template_id' in params:
3923            path_params['templateId'] = params['template_id']
3924
3925        query_params = {}
3926
3927        header_params = {}
3928
3929        form_params = []
3930        local_var_files = {}
3931
3932        body_params = None
3933        # HTTP header `Accept`
3934        header_params['Accept'] = self.api_client.\
3935            select_header_accept(['application/json'])
3936
3937        # Authentication setting
3938        auth_settings = []
3939
3940        return self.api_client.call_api(resource_path, 'GET',
3941                                        path_params,
3942                                        query_params,
3943                                        header_params,
3944                                        body=body_params,
3945                                        post_params=form_params,
3946                                        files=local_var_files,
3947                                        response_type='DocumentFieldsInformation',
3948                                        auth_settings=auth_settings,
3949                                        callback=params.get('callback'),
3950                                        _return_http_data_only=params.get('_return_http_data_only'),
3951                                        _preload_content=params.get('_preload_content', True),
3952                                        _request_timeout=params.get('_request_timeout'),
3953                                        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)
3955    def list_documents(self, account_id, template_id, **kwargs):
3956        """
3957        Gets a list of documents associated with a template.
3958        Retrieves a list of documents associated with the specified template.
3959        This method makes a synchronous HTTP request by default. To make an
3960        asynchronous HTTP request, please define a `callback` function
3961        to be invoked when receiving the response.
3962        >>> def callback_function(response):
3963        >>>     pprint(response)
3964        >>>
3965        >>> thread = api.list_documents(account_id, template_id, callback=callback_function)
3966
3967        :param callback function: The callback function
3968            for asynchronous request. (optional)
3969        :param str account_id: The external account number (int) or account ID Guid. (required)
3970        :param str template_id: The ID of the template being accessed. (required)
3971        :param str include_tabs:
3972        :return: TemplateDocumentsResult
3973                 If the method is called asynchronously,
3974                 returns the request thread.
3975        """
3976        kwargs['_return_http_data_only'] = True
3977        if kwargs.get('callback'):
3978            return self.list_documents_with_http_info(account_id, template_id, **kwargs)
3979        else:
3980            (data) = self.list_documents_with_http_info(account_id, template_id, **kwargs)
3981            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_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)
3983    def list_documents_with_http_info(self, account_id, template_id, **kwargs):
3984        """
3985        Gets a list of documents associated with a template.
3986        Retrieves a list of documents associated with the specified template.
3987        This method makes a synchronous HTTP request by default. To make an
3988        asynchronous HTTP request, please define a `callback` function
3989        to be invoked when receiving the response.
3990        >>> def callback_function(response):
3991        >>>     pprint(response)
3992        >>>
3993        >>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function)
3994
3995        :param callback function: The callback function
3996            for asynchronous request. (optional)
3997        :param str account_id: The external account number (int) or account ID Guid. (required)
3998        :param str template_id: The ID of the template being accessed. (required)
3999        :param str include_tabs:
4000        :return: TemplateDocumentsResult
4001                 If the method is called asynchronously,
4002                 returns the request thread.
4003        """
4004
4005        all_params = ['account_id', 'template_id', 'include_tabs']
4006        all_params.append('callback')
4007        all_params.append('_return_http_data_only')
4008        all_params.append('_preload_content')
4009        all_params.append('_request_timeout')
4010
4011        params = locals()
4012        for key, val in iteritems(params['kwargs']):
4013            if key not in all_params:
4014                raise TypeError(
4015                    "Got an unexpected keyword argument '%s'"
4016                    " to method list_documents" % key
4017                )
4018            params[key] = val
4019        del params['kwargs']
4020        # verify the required parameter 'account_id' is set
4021        if ('account_id' not in params) or (params['account_id'] is None):
4022            raise ValueError("Missing the required parameter `account_id` when calling `list_documents`")
4023        # verify the required parameter 'template_id' is set
4024        if ('template_id' not in params) or (params['template_id'] is None):
4025            raise ValueError("Missing the required parameter `template_id` when calling `list_documents`")
4026
4027
4028        collection_formats = {}
4029
4030        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
4031        path_params = {}
4032        if 'account_id' in params:
4033            path_params['accountId'] = params['account_id']
4034        if 'template_id' in params:
4035            path_params['templateId'] = params['template_id']
4036
4037        query_params = {}
4038        if 'include_tabs' in params:
4039            query_params['include_tabs'] = params['include_tabs']
4040
4041        header_params = {}
4042
4043        form_params = []
4044        local_var_files = {}
4045
4046        body_params = None
4047        # HTTP header `Accept`
4048        header_params['Accept'] = self.api_client.\
4049            select_header_accept(['application/json'])
4050
4051        # Authentication setting
4052        auth_settings = []
4053
4054        return self.api_client.call_api(resource_path, 'GET',
4055                                        path_params,
4056                                        query_params,
4057                                        header_params,
4058                                        body=body_params,
4059                                        post_params=form_params,
4060                                        files=local_var_files,
4061                                        response_type='TemplateDocumentsResult',
4062                                        auth_settings=auth_settings,
4063                                        callback=params.get('callback'),
4064                                        _return_http_data_only=params.get('_return_http_data_only'),
4065                                        _preload_content=params.get('_preload_content', True),
4066                                        _request_timeout=params.get('_request_timeout'),
4067                                        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_tabs:
Returns

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

def list_recipients(self, account_id, template_id, **kwargs)
4069    def list_recipients(self, account_id, template_id, **kwargs):
4070        """
4071        Gets recipient information from a template.
4072        Retrieves the information for all recipients in the specified template.
4073        This method makes a synchronous HTTP request by default. To make an
4074        asynchronous HTTP request, please define a `callback` function
4075        to be invoked when receiving the response.
4076        >>> def callback_function(response):
4077        >>>     pprint(response)
4078        >>>
4079        >>> thread = api.list_recipients(account_id, template_id, callback=callback_function)
4080
4081        :param callback function: The callback function
4082            for asynchronous request. (optional)
4083        :param str account_id: The external account number (int) or account ID Guid. (required)
4084        :param str template_id: The ID of the template being accessed. (required)
4085        :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. 
4086        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4087        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4088        :return: Recipients
4089                 If the method is called asynchronously,
4090                 returns the request thread.
4091        """
4092        kwargs['_return_http_data_only'] = True
4093        if kwargs.get('callback'):
4094            return self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4095        else:
4096            (data) = self.list_recipients_with_http_info(account_id, template_id, **kwargs)
4097            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)
4099    def list_recipients_with_http_info(self, account_id, template_id, **kwargs):
4100        """
4101        Gets recipient information from a template.
4102        Retrieves the information for all recipients in the specified template.
4103        This method makes a synchronous HTTP request by default. To make an
4104        asynchronous HTTP request, please define a `callback` function
4105        to be invoked when receiving the response.
4106        >>> def callback_function(response):
4107        >>>     pprint(response)
4108        >>>
4109        >>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function)
4110
4111        :param callback function: The callback function
4112            for asynchronous request. (optional)
4113        :param str account_id: The external account number (int) or account ID Guid. (required)
4114        :param str template_id: The ID of the template being accessed. (required)
4115        :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. 
4116        :param str include_extended:  When set to **true**, the extended properties are included in the response. 
4117        :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response.
4118        :return: Recipients
4119                 If the method is called asynchronously,
4120                 returns the request thread.
4121        """
4122
4123        all_params = ['account_id', 'template_id', 'include_anchor_tab_locations', 'include_extended', 'include_tabs']
4124        all_params.append('callback')
4125        all_params.append('_return_http_data_only')
4126        all_params.append('_preload_content')
4127        all_params.append('_request_timeout')
4128
4129        params = locals()
4130        for key, val in iteritems(params['kwargs']):
4131            if key not in all_params:
4132                raise TypeError(
4133                    "Got an unexpected keyword argument '%s'"
4134                    " to method list_recipients" % key
4135                )
4136            params[key] = val
4137        del params['kwargs']
4138        # verify the required parameter 'account_id' is set
4139        if ('account_id' not in params) or (params['account_id'] is None):
4140            raise ValueError("Missing the required parameter `account_id` when calling `list_recipients`")
4141        # verify the required parameter 'template_id' is set
4142        if ('template_id' not in params) or (params['template_id'] is None):
4143            raise ValueError("Missing the required parameter `template_id` when calling `list_recipients`")
4144
4145
4146        collection_formats = {}
4147
4148        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
4149        path_params = {}
4150        if 'account_id' in params:
4151            path_params['accountId'] = params['account_id']
4152        if 'template_id' in params:
4153            path_params['templateId'] = params['template_id']
4154
4155        query_params = {}
4156        if 'include_anchor_tab_locations' in params:
4157            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4158        if 'include_extended' in params:
4159            query_params['include_extended'] = params['include_extended']
4160        if 'include_tabs' in params:
4161            query_params['include_tabs'] = params['include_tabs']
4162
4163        header_params = {}
4164
4165        form_params = []
4166        local_var_files = {}
4167
4168        body_params = None
4169        # HTTP header `Accept`
4170        header_params['Accept'] = self.api_client.\
4171            select_header_accept(['application/json'])
4172
4173        # Authentication setting
4174        auth_settings = []
4175
4176        return self.api_client.call_api(resource_path, 'GET',
4177                                        path_params,
4178                                        query_params,
4179                                        header_params,
4180                                        body=body_params,
4181                                        post_params=form_params,
4182                                        files=local_var_files,
4183                                        response_type='Recipients',
4184                                        auth_settings=auth_settings,
4185                                        callback=params.get('callback'),
4186                                        _return_http_data_only=params.get('_return_http_data_only'),
4187                                        _preload_content=params.get('_preload_content', True),
4188                                        _request_timeout=params.get('_request_timeout'),
4189                                        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)
4191    def list_tabs(self, account_id, recipient_id, template_id, **kwargs):
4192        """
4193        Gets the tabs information for a signer or sign-in-person recipient in a template.
4194        Gets the tabs information for a signer or sign-in-person recipient in a template.
4195        This method makes a synchronous HTTP request by default. To make an
4196        asynchronous HTTP request, please define a `callback` function
4197        to be invoked when receiving the response.
4198        >>> def callback_function(response):
4199        >>>     pprint(response)
4200        >>>
4201        >>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function)
4202
4203        :param callback function: The callback function
4204            for asynchronous request. (optional)
4205        :param str account_id: The external account number (int) or account ID Guid. (required)
4206        :param str recipient_id: The ID of the recipient being accessed. (required)
4207        :param str template_id: The ID of the template being accessed. (required)
4208        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4209        :param str include_metadata:
4210        :return: Tabs
4211                 If the method is called asynchronously,
4212                 returns the request thread.
4213        """
4214        kwargs['_return_http_data_only'] = True
4215        if kwargs.get('callback'):
4216            return self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4217        else:
4218            (data) = self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
4219            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)
4221    def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
4222        """
4223        Gets the tabs information for a signer or sign-in-person recipient in a template.
4224        Gets the tabs information for a signer or sign-in-person recipient in a template.
4225        This method makes a synchronous HTTP request by default. To make an
4226        asynchronous HTTP request, please define a `callback` function
4227        to be invoked when receiving the response.
4228        >>> def callback_function(response):
4229        >>>     pprint(response)
4230        >>>
4231        >>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
4232
4233        :param callback function: The callback function
4234            for asynchronous request. (optional)
4235        :param str account_id: The external account number (int) or account ID Guid. (required)
4236        :param str recipient_id: The ID of the recipient being accessed. (required)
4237        :param str template_id: The ID of the template being accessed. (required)
4238        :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 
4239        :param str include_metadata:
4240        :return: Tabs
4241                 If the method is called asynchronously,
4242                 returns the request thread.
4243        """
4244
4245        all_params = ['account_id', 'recipient_id', 'template_id', 'include_anchor_tab_locations', 'include_metadata']
4246        all_params.append('callback')
4247        all_params.append('_return_http_data_only')
4248        all_params.append('_preload_content')
4249        all_params.append('_request_timeout')
4250
4251        params = locals()
4252        for key, val in iteritems(params['kwargs']):
4253            if key not in all_params:
4254                raise TypeError(
4255                    "Got an unexpected keyword argument '%s'"
4256                    " to method list_tabs" % key
4257                )
4258            params[key] = val
4259        del params['kwargs']
4260        # verify the required parameter 'account_id' is set
4261        if ('account_id' not in params) or (params['account_id'] is None):
4262            raise ValueError("Missing the required parameter `account_id` when calling `list_tabs`")
4263        # verify the required parameter 'recipient_id' is set
4264        if ('recipient_id' not in params) or (params['recipient_id'] is None):
4265            raise ValueError("Missing the required parameter `recipient_id` when calling `list_tabs`")
4266        # verify the required parameter 'template_id' is set
4267        if ('template_id' not in params) or (params['template_id'] is None):
4268            raise ValueError("Missing the required parameter `template_id` when calling `list_tabs`")
4269
4270
4271        collection_formats = {}
4272
4273        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
4274        path_params = {}
4275        if 'account_id' in params:
4276            path_params['accountId'] = params['account_id']
4277        if 'recipient_id' in params:
4278            path_params['recipientId'] = params['recipient_id']
4279        if 'template_id' in params:
4280            path_params['templateId'] = params['template_id']
4281
4282        query_params = {}
4283        if 'include_anchor_tab_locations' in params:
4284            query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations']
4285        if 'include_metadata' in params:
4286            query_params['include_metadata'] = params['include_metadata']
4287
4288        header_params = {}
4289
4290        form_params = []
4291        local_var_files = {}
4292
4293        body_params = None
4294        # HTTP header `Accept`
4295        header_params['Accept'] = self.api_client.\
4296            select_header_accept(['application/json'])
4297
4298        # Authentication setting
4299        auth_settings = []
4300
4301        return self.api_client.call_api(resource_path, 'GET',
4302                                        path_params,
4303                                        query_params,
4304                                        header_params,
4305                                        body=body_params,
4306                                        post_params=form_params,
4307                                        files=local_var_files,
4308                                        response_type='Tabs',
4309                                        auth_settings=auth_settings,
4310                                        callback=params.get('callback'),
4311                                        _return_http_data_only=params.get('_return_http_data_only'),
4312                                        _preload_content=params.get('_preload_content', True),
4313                                        _request_timeout=params.get('_request_timeout'),
4314                                        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)
4316    def list_templates(self, account_id, **kwargs):
4317        """
4318        Gets the definition of a template.
4319        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4320        This method makes a synchronous HTTP request by default. To make an
4321        asynchronous HTTP request, please define a `callback` function
4322        to be invoked when receiving the response.
4323        >>> def callback_function(response):
4324        >>>     pprint(response)
4325        >>>
4326        >>> thread = api.list_templates(account_id, callback=callback_function)
4327
4328        :param callback function: The callback function
4329            for asynchronous request. (optional)
4330        :param str account_id: The external account number (int) or account ID Guid. (required)
4331        :param str count: Number of records to return in the cache.
4332        :param str created_from_date:
4333        :param str created_to_date:
4334        :param str folder_ids: A comma separated list of folder ID GUIDs.
4335        :param str folder_types:
4336        :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.
4337        :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.
4338        :param str is_deleted_template_only:
4339        :param str is_download:
4340        :param str modified_from_date:
4341        :param str modified_to_date:
4342        :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)
4343        :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.
4344        :param str search_fields:
4345        :param str search_text: The search text used to search the names of templates.
4346        :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.
4347        :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).
4348        :param str template_ids:
4349        :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.
4350        :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.
4351        :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.
4352        :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.
4353        :param str user_id:
4354        :return: EnvelopeTemplateResults
4355                 If the method is called asynchronously,
4356                 returns the request thread.
4357        """
4358        kwargs['_return_http_data_only'] = True
4359        if kwargs.get('callback'):
4360            return self.list_templates_with_http_info(account_id, **kwargs)
4361        else:
4362            (data) = self.list_templates_with_http_info(account_id, **kwargs)
4363            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 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)
4365    def list_templates_with_http_info(self, account_id, **kwargs):
4366        """
4367        Gets the definition of a template.
4368        Retrieves the list of templates for the specified account. The request can be limited to a specific folder.
4369        This method makes a synchronous HTTP request by default. To make an
4370        asynchronous HTTP request, please define a `callback` function
4371        to be invoked when receiving the response.
4372        >>> def callback_function(response):
4373        >>>     pprint(response)
4374        >>>
4375        >>> thread = api.list_templates_with_http_info(account_id, callback=callback_function)
4376
4377        :param callback function: The callback function
4378            for asynchronous request. (optional)
4379        :param str account_id: The external account number (int) or account ID Guid. (required)
4380        :param str count: Number of records to return in the cache.
4381        :param str created_from_date:
4382        :param str created_to_date:
4383        :param str folder_ids: A comma separated list of folder ID GUIDs.
4384        :param str folder_types:
4385        :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.
4386        :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.
4387        :param str is_deleted_template_only:
4388        :param str is_download:
4389        :param str modified_from_date:
4390        :param str modified_to_date:
4391        :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)
4392        :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.
4393        :param str search_fields:
4394        :param str search_text: The search text used to search the names of templates.
4395        :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.
4396        :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).
4397        :param str template_ids:
4398        :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.
4399        :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.
4400        :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.
4401        :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.
4402        :param str user_id:
4403        :return: EnvelopeTemplateResults
4404                 If the method is called asynchronously,
4405                 returns the request thread.
4406        """
4407
4408        all_params = ['account_id', 'count', 'created_from_date', 'created_to_date', 'folder_ids', 'folder_types', 'from_date', 'include', 'is_deleted_template_only', 'is_download', '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']
4409        all_params.append('callback')
4410        all_params.append('_return_http_data_only')
4411        all_params.append('_preload_content')
4412        all_params.append('_request_timeout')
4413
4414        params = locals()
4415        for key, val in iteritems(params['kwargs']):
4416            if key not in all_params:
4417                raise TypeError(
4418                    "Got an unexpected keyword argument '%s'"
4419                    " to method list_templates" % key
4420                )
4421            params[key] = val
4422        del params['kwargs']
4423        # verify the required parameter 'account_id' is set
4424        if ('account_id' not in params) or (params['account_id'] is None):
4425            raise ValueError("Missing the required parameter `account_id` when calling `list_templates`")
4426
4427
4428        collection_formats = {}
4429
4430        resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json')
4431        path_params = {}
4432        if 'account_id' in params:
4433            path_params['accountId'] = params['account_id']
4434
4435        query_params = {}
4436        if 'count' in params:
4437            query_params['count'] = params['count']
4438        if 'created_from_date' in params:
4439            query_params['created_from_date'] = params['created_from_date']
4440        if 'created_to_date' in params:
4441            query_params['created_to_date'] = params['created_to_date']
4442        if 'folder_ids' in params:
4443            query_params['folder_ids'] = params['folder_ids']
4444        if 'folder_types' in params:
4445            query_params['folder_types'] = params['folder_types']
4446        if 'from_date' in params:
4447            query_params['from_date'] = params['from_date']
4448        if 'include' in params:
4449            query_params['include'] = params['include']
4450        if 'is_deleted_template_only' in params:
4451            query_params['is_deleted_template_only'] = params['is_deleted_template_only']
4452        if 'is_download' in params:
4453            query_params['is_download'] = params['is_download']
4454        if 'modified_from_date' in params:
4455            query_params['modified_from_date'] = params['modified_from_date']
4456        if 'modified_to_date' in params:
4457            query_params['modified_to_date'] = params['modified_to_date']
4458        if 'order' in params:
4459            query_params['order'] = params['order']
4460        if 'order_by' in params:
4461            query_params['order_by'] = params['order_by']
4462        if 'search_fields' in params:
4463            query_params['search_fields'] = params['search_fields']
4464        if 'search_text' in params:
4465            query_params['search_text'] = params['search_text']
4466        if 'shared_by_me' in params:
4467            query_params['shared_by_me'] = params['shared_by_me']
4468        if 'start_position' in params:
4469            query_params['start_position'] = params['start_position']
4470        if 'template_ids' in params:
4471            query_params['template_ids'] = params['template_ids']
4472        if 'to_date' in params:
4473            query_params['to_date'] = params['to_date']
4474        if 'used_from_date' in params:
4475            query_params['used_from_date'] = params['used_from_date']
4476        if 'used_to_date' in params:
4477            query_params['used_to_date'] = params['used_to_date']
4478        if 'user_filter' in params:
4479            query_params['user_filter'] = params['user_filter']
4480        if 'user_id' in params:
4481            query_params['user_id'] = params['user_id']
4482
4483        header_params = {}
4484
4485        form_params = []
4486        local_var_files = {}
4487
4488        body_params = None
4489        # HTTP header `Accept`
4490        header_params['Accept'] = self.api_client.\
4491            select_header_accept(['application/json'])
4492
4493        # Authentication setting
4494        auth_settings = []
4495
4496        return self.api_client.call_api(resource_path, 'GET',
4497                                        path_params,
4498                                        query_params,
4499                                        header_params,
4500                                        body=body_params,
4501                                        post_params=form_params,
4502                                        files=local_var_files,
4503                                        response_type='EnvelopeTemplateResults',
4504                                        auth_settings=auth_settings,
4505                                        callback=params.get('callback'),
4506                                        _return_http_data_only=params.get('_return_http_data_only'),
4507                                        _preload_content=params.get('_preload_content', True),
4508                                        _request_timeout=params.get('_request_timeout'),
4509                                        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 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)
4511    def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs):
4512        """
4513        Rotates page image from a template for display.
4514        Rotates page image from a template for display. The page image can be rotated to the left or right.
4515        This method makes a synchronous HTTP request by default. To make an
4516        asynchronous HTTP request, please define a `callback` function
4517        to be invoked when receiving the response.
4518        >>> def callback_function(response):
4519        >>>     pprint(response)
4520        >>>
4521        >>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function)
4522
4523        :param callback function: The callback function
4524            for asynchronous request. (optional)
4525        :param str account_id: The external account number (int) or account ID Guid. (required)
4526        :param str document_id: The ID of the document being accessed. (required)
4527        :param str page_number: The page number being accessed. (required)
4528        :param str template_id: The ID of the template being accessed. (required)
4529        :param PageRequest page_request:
4530        :return: None
4531                 If the method is called asynchronously,
4532                 returns the request thread.
4533        """
4534        kwargs['_return_http_data_only'] = True
4535        if kwargs.get('callback'):
4536            return self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4537        else:
4538            (data) = self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs)
4539            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)
4541    def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs):
4542        """
4543        Rotates page image from a template for display.
4544        Rotates page image from a template for display. The page image can be rotated to the left or right.
4545        This method makes a synchronous HTTP request by default. To make an
4546        asynchronous HTTP request, please define a `callback` function
4547        to be invoked when receiving the response.
4548        >>> def callback_function(response):
4549        >>>     pprint(response)
4550        >>>
4551        >>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
4552
4553        :param callback function: The callback function
4554            for asynchronous request. (optional)
4555        :param str account_id: The external account number (int) or account ID Guid. (required)
4556        :param str document_id: The ID of the document being accessed. (required)
4557        :param str page_number: The page number being accessed. (required)
4558        :param str template_id: The ID of the template being accessed. (required)
4559        :param PageRequest page_request:
4560        :return: None
4561                 If the method is called asynchronously,
4562                 returns the request thread.
4563        """
4564
4565        all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request']
4566        all_params.append('callback')
4567        all_params.append('_return_http_data_only')
4568        all_params.append('_preload_content')
4569        all_params.append('_request_timeout')
4570
4571        params = locals()
4572        for key, val in iteritems(params['kwargs']):
4573            if key not in all_params:
4574                raise TypeError(
4575                    "Got an unexpected keyword argument '%s'"
4576                    " to method rotate_document_page" % key
4577                )
4578            params[key] = val
4579        del params['kwargs']
4580        # verify the required parameter 'account_id' is set
4581        if ('account_id' not in params) or (params['account_id'] is None):
4582            raise ValueError("Missing the required parameter `account_id` when calling `rotate_document_page`")
4583        # verify the required parameter 'document_id' is set
4584        if ('document_id' not in params) or (params['document_id'] is None):
4585            raise ValueError("Missing the required parameter `document_id` when calling `rotate_document_page`")
4586        # verify the required parameter 'page_number' is set
4587        if ('page_number' not in params) or (params['page_number'] is None):
4588            raise ValueError("Missing the required parameter `page_number` when calling `rotate_document_page`")
4589        # verify the required parameter 'template_id' is set
4590        if ('template_id' not in params) or (params['template_id'] is None):
4591            raise ValueError("Missing the required parameter `template_id` when calling `rotate_document_page`")
4592
4593
4594        collection_formats = {}
4595
4596        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json')
4597        path_params = {}
4598        if 'account_id' in params:
4599            path_params['accountId'] = params['account_id']
4600        if 'document_id' in params:
4601            path_params['documentId'] = params['document_id']
4602        if 'page_number' in params:
4603            path_params['pageNumber'] = params['page_number']
4604        if 'template_id' in params:
4605            path_params['templateId'] = params['template_id']
4606
4607        query_params = {}
4608
4609        header_params = {}
4610
4611        form_params = []
4612        local_var_files = {}
4613
4614        body_params = None
4615        if 'page_request' in params:
4616            body_params = params['page_request']
4617        # HTTP header `Accept`
4618        header_params['Accept'] = self.api_client.\
4619            select_header_accept(['application/json'])
4620
4621        # Authentication setting
4622        auth_settings = []
4623
4624        return self.api_client.call_api(resource_path, 'PUT',
4625                                        path_params,
4626                                        query_params,
4627                                        header_params,
4628                                        body=body_params,
4629                                        post_params=form_params,
4630                                        files=local_var_files,
4631                                        response_type=None,
4632                                        auth_settings=auth_settings,
4633                                        callback=params.get('callback'),
4634                                        _return_http_data_only=params.get('_return_http_data_only'),
4635                                        _preload_content=params.get('_preload_content', True),
4636                                        _request_timeout=params.get('_request_timeout'),
4637                                        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)
4639    def update(self, account_id, template_id, **kwargs):
4640        """
4641        Updates an existing template.
4642        Updates an existing template.
4643        This method makes a synchronous HTTP request by default. To make an
4644        asynchronous HTTP request, please define a `callback` function
4645        to be invoked when receiving the response.
4646        >>> def callback_function(response):
4647        >>>     pprint(response)
4648        >>>
4649        >>> thread = api.update(account_id, template_id, callback=callback_function)
4650
4651        :param callback function: The callback function
4652            for asynchronous request. (optional)
4653        :param str account_id: The external account number (int) or account ID Guid. (required)
4654        :param str template_id: The ID of the template being accessed. (required)
4655        :param EnvelopeTemplate envelope_template:
4656        :return: TemplateUpdateSummary
4657                 If the method is called asynchronously,
4658                 returns the request thread.
4659        """
4660        kwargs['_return_http_data_only'] = True
4661        if kwargs.get('callback'):
4662            return self.update_with_http_info(account_id, template_id, **kwargs)
4663        else:
4664            (data) = self.update_with_http_info(account_id, template_id, **kwargs)
4665            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)
4667    def update_with_http_info(self, account_id, template_id, **kwargs):
4668        """
4669        Updates an existing template.
4670        Updates an existing template.
4671        This method makes a synchronous HTTP request by default. To make an
4672        asynchronous HTTP request, please define a `callback` function
4673        to be invoked when receiving the response.
4674        >>> def callback_function(response):
4675        >>>     pprint(response)
4676        >>>
4677        >>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function)
4678
4679        :param callback function: The callback function
4680            for asynchronous request. (optional)
4681        :param str account_id: The external account number (int) or account ID Guid. (required)
4682        :param str template_id: The ID of the template being accessed. (required)
4683        :param EnvelopeTemplate envelope_template:
4684        :return: TemplateUpdateSummary
4685                 If the method is called asynchronously,
4686                 returns the request thread.
4687        """
4688
4689        all_params = ['account_id', 'template_id', 'envelope_template']
4690        all_params.append('callback')
4691        all_params.append('_return_http_data_only')
4692        all_params.append('_preload_content')
4693        all_params.append('_request_timeout')
4694
4695        params = locals()
4696        for key, val in iteritems(params['kwargs']):
4697            if key not in all_params:
4698                raise TypeError(
4699                    "Got an unexpected keyword argument '%s'"
4700                    " to method update" % key
4701                )
4702            params[key] = val
4703        del params['kwargs']
4704        # verify the required parameter 'account_id' is set
4705        if ('account_id' not in params) or (params['account_id'] is None):
4706            raise ValueError("Missing the required parameter `account_id` when calling `update`")
4707        # verify the required parameter 'template_id' is set
4708        if ('template_id' not in params) or (params['template_id'] is None):
4709            raise ValueError("Missing the required parameter `template_id` when calling `update`")
4710
4711
4712        collection_formats = {}
4713
4714        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json')
4715        path_params = {}
4716        if 'account_id' in params:
4717            path_params['accountId'] = params['account_id']
4718        if 'template_id' in params:
4719            path_params['templateId'] = params['template_id']
4720
4721        query_params = {}
4722
4723        header_params = {}
4724
4725        form_params = []
4726        local_var_files = {}
4727
4728        body_params = None
4729        if 'envelope_template' in params:
4730            body_params = params['envelope_template']
4731        # HTTP header `Accept`
4732        header_params['Accept'] = self.api_client.\
4733            select_header_accept(['application/json'])
4734
4735        # Authentication setting
4736        auth_settings = []
4737
4738        return self.api_client.call_api(resource_path, 'PUT',
4739                                        path_params,
4740                                        query_params,
4741                                        header_params,
4742                                        body=body_params,
4743                                        post_params=form_params,
4744                                        files=local_var_files,
4745                                        response_type='TemplateUpdateSummary',
4746                                        auth_settings=auth_settings,
4747                                        callback=params.get('callback'),
4748                                        _return_http_data_only=params.get('_return_http_data_only'),
4749                                        _preload_content=params.get('_preload_content', True),
4750                                        _request_timeout=params.get('_request_timeout'),
4751                                        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)
4753    def update_custom_fields(self, account_id, template_id, **kwargs):
4754        """
4755        Updates envelope custom fields in a template.
4756        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4757        This method makes a synchronous HTTP request by default. To make an
4758        asynchronous HTTP request, please define a `callback` function
4759        to be invoked when receiving the response.
4760        >>> def callback_function(response):
4761        >>>     pprint(response)
4762        >>>
4763        >>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function)
4764
4765        :param callback function: The callback function
4766            for asynchronous request. (optional)
4767        :param str account_id: The external account number (int) or account ID Guid. (required)
4768        :param str template_id: The ID of the template being accessed. (required)
4769        :param TemplateCustomFields template_custom_fields:
4770        :return: CustomFields
4771                 If the method is called asynchronously,
4772                 returns the request thread.
4773        """
4774        kwargs['_return_http_data_only'] = True
4775        if kwargs.get('callback'):
4776            return self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
4777        else:
4778            (data) = self.update_custom_fields_with_http_info(account_id, template_id, **kwargs)
4779            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)
4781    def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs):
4782        """
4783        Updates envelope custom fields in a template.
4784        Updates the custom fields in a template.  Each custom field used in a template must have a unique name.
4785        This method makes a synchronous HTTP request by default. To make an
4786        asynchronous HTTP request, please define a `callback` function
4787        to be invoked when receiving the response.
4788        >>> def callback_function(response):
4789        >>>     pprint(response)
4790        >>>
4791        >>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
4792
4793        :param callback function: The callback function
4794            for asynchronous request. (optional)
4795        :param str account_id: The external account number (int) or account ID Guid. (required)
4796        :param str template_id: The ID of the template being accessed. (required)
4797        :param TemplateCustomFields template_custom_fields:
4798        :return: CustomFields
4799                 If the method is called asynchronously,
4800                 returns the request thread.
4801        """
4802
4803        all_params = ['account_id', 'template_id', 'template_custom_fields']
4804        all_params.append('callback')
4805        all_params.append('_return_http_data_only')
4806        all_params.append('_preload_content')
4807        all_params.append('_request_timeout')
4808
4809        params = locals()
4810        for key, val in iteritems(params['kwargs']):
4811            if key not in all_params:
4812                raise TypeError(
4813                    "Got an unexpected keyword argument '%s'"
4814                    " to method update_custom_fields" % key
4815                )
4816            params[key] = val
4817        del params['kwargs']
4818        # verify the required parameter 'account_id' is set
4819        if ('account_id' not in params) or (params['account_id'] is None):
4820            raise ValueError("Missing the required parameter `account_id` when calling `update_custom_fields`")
4821        # verify the required parameter 'template_id' is set
4822        if ('template_id' not in params) or (params['template_id'] is None):
4823            raise ValueError("Missing the required parameter `template_id` when calling `update_custom_fields`")
4824
4825
4826        collection_formats = {}
4827
4828        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json')
4829        path_params = {}
4830        if 'account_id' in params:
4831            path_params['accountId'] = params['account_id']
4832        if 'template_id' in params:
4833            path_params['templateId'] = params['template_id']
4834
4835        query_params = {}
4836
4837        header_params = {}
4838
4839        form_params = []
4840        local_var_files = {}
4841
4842        body_params = None
4843        if 'template_custom_fields' in params:
4844            body_params = params['template_custom_fields']
4845        # HTTP header `Accept`
4846        header_params['Accept'] = self.api_client.\
4847            select_header_accept(['application/json'])
4848
4849        # Authentication setting
4850        auth_settings = []
4851
4852        return self.api_client.call_api(resource_path, 'PUT',
4853                                        path_params,
4854                                        query_params,
4855                                        header_params,
4856                                        body=body_params,
4857                                        post_params=form_params,
4858                                        files=local_var_files,
4859                                        response_type='CustomFields',
4860                                        auth_settings=auth_settings,
4861                                        callback=params.get('callback'),
4862                                        _return_http_data_only=params.get('_return_http_data_only'),
4863                                        _preload_content=params.get('_preload_content', True),
4864                                        _request_timeout=params.get('_request_timeout'),
4865                                        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)
4867    def update_document(self, account_id, document_id, template_id, **kwargs):
4868        """
4869        Adds a document to a template document.
4870        Adds the specified document to an existing template document.
4871        This method makes a synchronous HTTP request by default. To make an
4872        asynchronous HTTP request, please define a `callback` function
4873        to be invoked when receiving the response.
4874        >>> def callback_function(response):
4875        >>>     pprint(response)
4876        >>>
4877        >>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function)
4878
4879        :param callback function: The callback function
4880            for asynchronous request. (optional)
4881        :param str account_id: The external account number (int) or account ID Guid. (required)
4882        :param str document_id: The ID of the document being accessed. (required)
4883        :param str template_id: The ID of the template being accessed. (required)
4884        :param str is_envelope_definition:
4885        :param EnvelopeDefinition envelope_definition:
4886        :return: EnvelopeDocument
4887                 If the method is called asynchronously,
4888                 returns the request thread.
4889        """
4890        kwargs['_return_http_data_only'] = True
4891        if kwargs.get('callback'):
4892            return self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
4893        else:
4894            (data) = self.update_document_with_http_info(account_id, document_id, template_id, **kwargs)
4895            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)
4897    def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs):
4898        """
4899        Adds a document to a template document.
4900        Adds the specified document to an existing template document.
4901        This method makes a synchronous HTTP request by default. To make an
4902        asynchronous HTTP request, please define a `callback` function
4903        to be invoked when receiving the response.
4904        >>> def callback_function(response):
4905        >>>     pprint(response)
4906        >>>
4907        >>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
4908
4909        :param callback function: The callback function
4910            for asynchronous request. (optional)
4911        :param str account_id: The external account number (int) or account ID Guid. (required)
4912        :param str document_id: The ID of the document being accessed. (required)
4913        :param str template_id: The ID of the template being accessed. (required)
4914        :param str is_envelope_definition:
4915        :param EnvelopeDefinition envelope_definition:
4916        :return: EnvelopeDocument
4917                 If the method is called asynchronously,
4918                 returns the request thread.
4919        """
4920
4921        all_params = ['account_id', 'document_id', 'template_id', 'is_envelope_definition', 'envelope_definition']
4922        all_params.append('callback')
4923        all_params.append('_return_http_data_only')
4924        all_params.append('_preload_content')
4925        all_params.append('_request_timeout')
4926
4927        params = locals()
4928        for key, val in iteritems(params['kwargs']):
4929            if key not in all_params:
4930                raise TypeError(
4931                    "Got an unexpected keyword argument '%s'"
4932                    " to method update_document" % key
4933                )
4934            params[key] = val
4935        del params['kwargs']
4936        # verify the required parameter 'account_id' is set
4937        if ('account_id' not in params) or (params['account_id'] is None):
4938            raise ValueError("Missing the required parameter `account_id` when calling `update_document`")
4939        # verify the required parameter 'document_id' is set
4940        if ('document_id' not in params) or (params['document_id'] is None):
4941            raise ValueError("Missing the required parameter `document_id` when calling `update_document`")
4942        # verify the required parameter 'template_id' is set
4943        if ('template_id' not in params) or (params['template_id'] is None):
4944            raise ValueError("Missing the required parameter `template_id` when calling `update_document`")
4945
4946
4947        collection_formats = {}
4948
4949        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json')
4950        path_params = {}
4951        if 'account_id' in params:
4952            path_params['accountId'] = params['account_id']
4953        if 'document_id' in params:
4954            path_params['documentId'] = params['document_id']
4955        if 'template_id' in params:
4956            path_params['templateId'] = params['template_id']
4957
4958        query_params = {}
4959        if 'is_envelope_definition' in params:
4960            query_params['is_envelope_definition'] = params['is_envelope_definition']
4961
4962        header_params = {}
4963
4964        form_params = []
4965        local_var_files = {}
4966
4967        body_params = None
4968        if 'envelope_definition' in params:
4969            body_params = params['envelope_definition']
4970        # HTTP header `Accept`
4971        header_params['Accept'] = self.api_client.\
4972            select_header_accept(['application/json'])
4973
4974        # Authentication setting
4975        auth_settings = []
4976
4977        return self.api_client.call_api(resource_path, 'PUT',
4978                                        path_params,
4979                                        query_params,
4980                                        header_params,
4981                                        body=body_params,
4982                                        post_params=form_params,
4983                                        files=local_var_files,
4984                                        response_type='EnvelopeDocument',
4985                                        auth_settings=auth_settings,
4986                                        callback=params.get('callback'),
4987                                        _return_http_data_only=params.get('_return_http_data_only'),
4988                                        _preload_content=params.get('_preload_content', True),
4989                                        _request_timeout=params.get('_request_timeout'),
4990                                        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)
4992    def update_document_fields(self, account_id, document_id, template_id, **kwargs):
4993        """
4994        Updates existing custom document fields in an existing template document.
4995        Updates existing custom document fields in an existing template document.
4996        This method makes a synchronous HTTP request by default. To make an
4997        asynchronous HTTP request, please define a `callback` function
4998        to be invoked when receiving the response.
4999        >>> def callback_function(response):
5000        >>>     pprint(response)
5001        >>>
5002        >>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function)
5003
5004        :param callback function: The callback function
5005            for asynchronous request. (optional)
5006        :param str account_id: The external account number (int) or account ID Guid. (required)
5007        :param str document_id: The ID of the document being accessed. (required)
5008        :param str template_id: The ID of the template being accessed. (required)
5009        :param DocumentFieldsInformation document_fields_information:
5010        :return: DocumentFieldsInformation
5011                 If the method is called asynchronously,
5012                 returns the request thread.
5013        """
5014        kwargs['_return_http_data_only'] = True
5015        if kwargs.get('callback'):
5016            return self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5017        else:
5018            (data) = self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs)
5019            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)
5021    def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs):
5022        """
5023        Updates existing custom document fields in an existing template document.
5024        Updates existing custom document fields in an existing template document.
5025        This method makes a synchronous HTTP request by default. To make an
5026        asynchronous HTTP request, please define a `callback` function
5027        to be invoked when receiving the response.
5028        >>> def callback_function(response):
5029        >>>     pprint(response)
5030        >>>
5031        >>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
5032
5033        :param callback function: The callback function
5034            for asynchronous request. (optional)
5035        :param str account_id: The external account number (int) or account ID Guid. (required)
5036        :param str document_id: The ID of the document being accessed. (required)
5037        :param str template_id: The ID of the template being accessed. (required)
5038        :param DocumentFieldsInformation document_fields_information:
5039        :return: DocumentFieldsInformation
5040                 If the method is called asynchronously,
5041                 returns the request thread.
5042        """
5043
5044        all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information']
5045        all_params.append('callback')
5046        all_params.append('_return_http_data_only')
5047        all_params.append('_preload_content')
5048        all_params.append('_request_timeout')
5049
5050        params = locals()
5051        for key, val in iteritems(params['kwargs']):
5052            if key not in all_params:
5053                raise TypeError(
5054                    "Got an unexpected keyword argument '%s'"
5055                    " to method update_document_fields" % key
5056                )
5057            params[key] = val
5058        del params['kwargs']
5059        # verify the required parameter 'account_id' is set
5060        if ('account_id' not in params) or (params['account_id'] is None):
5061            raise ValueError("Missing the required parameter `account_id` when calling `update_document_fields`")
5062        # verify the required parameter 'document_id' is set
5063        if ('document_id' not in params) or (params['document_id'] is None):
5064            raise ValueError("Missing the required parameter `document_id` when calling `update_document_fields`")
5065        # verify the required parameter 'template_id' is set
5066        if ('template_id' not in params) or (params['template_id'] is None):
5067            raise ValueError("Missing the required parameter `template_id` when calling `update_document_fields`")
5068
5069
5070        collection_formats = {}
5071
5072        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json')
5073        path_params = {}
5074        if 'account_id' in params:
5075            path_params['accountId'] = params['account_id']
5076        if 'document_id' in params:
5077            path_params['documentId'] = params['document_id']
5078        if 'template_id' in params:
5079            path_params['templateId'] = params['template_id']
5080
5081        query_params = {}
5082
5083        header_params = {}
5084
5085        form_params = []
5086        local_var_files = {}
5087
5088        body_params = None
5089        if 'document_fields_information' in params:
5090            body_params = params['document_fields_information']
5091        # HTTP header `Accept`
5092        header_params['Accept'] = self.api_client.\
5093            select_header_accept(['application/json'])
5094
5095        # Authentication setting
5096        auth_settings = []
5097
5098        return self.api_client.call_api(resource_path, 'PUT',
5099                                        path_params,
5100                                        query_params,
5101                                        header_params,
5102                                        body=body_params,
5103                                        post_params=form_params,
5104                                        files=local_var_files,
5105                                        response_type='DocumentFieldsInformation',
5106                                        auth_settings=auth_settings,
5107                                        callback=params.get('callback'),
5108                                        _return_http_data_only=params.get('_return_http_data_only'),
5109                                        _preload_content=params.get('_preload_content', True),
5110                                        _request_timeout=params.get('_request_timeout'),
5111                                        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)
5113    def update_documents(self, account_id, template_id, **kwargs):
5114        """
5115        Adds documents to a template document.
5116        Adds one or more documents to an existing template document.
5117        This method makes a synchronous HTTP request by default. To make an
5118        asynchronous HTTP request, please define a `callback` function
5119        to be invoked when receiving the response.
5120        >>> def callback_function(response):
5121        >>>     pprint(response)
5122        >>>
5123        >>> thread = api.update_documents(account_id, template_id, callback=callback_function)
5124
5125        :param callback function: The callback function
5126            for asynchronous request. (optional)
5127        :param str account_id: The external account number (int) or account ID Guid. (required)
5128        :param str template_id: The ID of the template being accessed. (required)
5129        :param EnvelopeDefinition envelope_definition:
5130        :return: TemplateDocumentsResult
5131                 If the method is called asynchronously,
5132                 returns the request thread.
5133        """
5134        kwargs['_return_http_data_only'] = True
5135        if kwargs.get('callback'):
5136            return self.update_documents_with_http_info(account_id, template_id, **kwargs)
5137        else:
5138            (data) = self.update_documents_with_http_info(account_id, template_id, **kwargs)
5139            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)
5141    def update_documents_with_http_info(self, account_id, template_id, **kwargs):
5142        """
5143        Adds documents to a template document.
5144        Adds one or more documents to an existing template document.
5145        This method makes a synchronous HTTP request by default. To make an
5146        asynchronous HTTP request, please define a `callback` function
5147        to be invoked when receiving the response.
5148        >>> def callback_function(response):
5149        >>>     pprint(response)
5150        >>>
5151        >>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function)
5152
5153        :param callback function: The callback function
5154            for asynchronous request. (optional)
5155        :param str account_id: The external account number (int) or account ID Guid. (required)
5156        :param str template_id: The ID of the template being accessed. (required)
5157        :param EnvelopeDefinition envelope_definition:
5158        :return: TemplateDocumentsResult
5159                 If the method is called asynchronously,
5160                 returns the request thread.
5161        """
5162
5163        all_params = ['account_id', 'template_id', 'envelope_definition']
5164        all_params.append('callback')
5165        all_params.append('_return_http_data_only')
5166        all_params.append('_preload_content')
5167        all_params.append('_request_timeout')
5168
5169        params = locals()
5170        for key, val in iteritems(params['kwargs']):
5171            if key not in all_params:
5172                raise TypeError(
5173                    "Got an unexpected keyword argument '%s'"
5174                    " to method update_documents" % key
5175                )
5176            params[key] = val
5177        del params['kwargs']
5178        # verify the required parameter 'account_id' is set
5179        if ('account_id' not in params) or (params['account_id'] is None):
5180            raise ValueError("Missing the required parameter `account_id` when calling `update_documents`")
5181        # verify the required parameter 'template_id' is set
5182        if ('template_id' not in params) or (params['template_id'] is None):
5183            raise ValueError("Missing the required parameter `template_id` when calling `update_documents`")
5184
5185
5186        collection_formats = {}
5187
5188        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json')
5189        path_params = {}
5190        if 'account_id' in params:
5191            path_params['accountId'] = params['account_id']
5192        if 'template_id' in params:
5193            path_params['templateId'] = params['template_id']
5194
5195        query_params = {}
5196
5197        header_params = {}
5198
5199        form_params = []
5200        local_var_files = {}
5201
5202        body_params = None
5203        if 'envelope_definition' in params:
5204            body_params = params['envelope_definition']
5205        # HTTP header `Accept`
5206        header_params['Accept'] = self.api_client.\
5207            select_header_accept(['application/json'])
5208
5209        # Authentication setting
5210        auth_settings = []
5211
5212        return self.api_client.call_api(resource_path, 'PUT',
5213                                        path_params,
5214                                        query_params,
5215                                        header_params,
5216                                        body=body_params,
5217                                        post_params=form_params,
5218                                        files=local_var_files,
5219                                        response_type='TemplateDocumentsResult',
5220                                        auth_settings=auth_settings,
5221                                        callback=params.get('callback'),
5222                                        _return_http_data_only=params.get('_return_http_data_only'),
5223                                        _preload_content=params.get('_preload_content', True),
5224                                        _request_timeout=params.get('_request_timeout'),
5225                                        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)
5227    def update_group_share(self, account_id, template_id, template_part, **kwargs):
5228        """
5229        Shares a template with a group
5230        Shares a template with the specified members group.
5231        This method makes a synchronous HTTP request by default. To make an
5232        asynchronous HTTP request, please define a `callback` function
5233        to be invoked when receiving the response.
5234        >>> def callback_function(response):
5235        >>>     pprint(response)
5236        >>>
5237        >>> thread = api.update_group_share(account_id, template_id, template_part, callback=callback_function)
5238
5239        :param callback function: The callback function
5240            for asynchronous request. (optional)
5241        :param str account_id: The external account number (int) or account ID Guid. (required)
5242        :param str template_id: The ID of the template being accessed. (required)
5243        :param str template_part: Currently, the only defined part is **groups**. (required)
5244        :param GroupInformation group_information:
5245        :return: GroupInformation
5246                 If the method is called asynchronously,
5247                 returns the request thread.
5248        """
5249        kwargs['_return_http_data_only'] = True
5250        if kwargs.get('callback'):
5251            return self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5252        else:
5253            (data) = self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs)
5254            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)
5256    def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs):
5257        """
5258        Shares a template with a group
5259        Shares a template with the specified members group.
5260        This method makes a synchronous HTTP request by default. To make an
5261        asynchronous HTTP request, please define a `callback` function
5262        to be invoked when receiving the response.
5263        >>> def callback_function(response):
5264        >>>     pprint(response)
5265        >>>
5266        >>> thread = api.update_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function)
5267
5268        :param callback function: The callback function
5269            for asynchronous request. (optional)
5270        :param str account_id: The external account number (int) or account ID Guid. (required)
5271        :param str template_id: The ID of the template being accessed. (required)
5272        :param str template_part: Currently, the only defined part is **groups**. (required)
5273        :param GroupInformation group_information:
5274        :return: GroupInformation
5275                 If the method is called asynchronously,
5276                 returns the request thread.
5277        """
5278
5279        all_params = ['account_id', 'template_id', 'template_part', 'group_information']
5280        all_params.append('callback')
5281        all_params.append('_return_http_data_only')
5282        all_params.append('_preload_content')
5283        all_params.append('_request_timeout')
5284
5285        params = locals()
5286        for key, val in iteritems(params['kwargs']):
5287            if key not in all_params:
5288                raise TypeError(
5289                    "Got an unexpected keyword argument '%s'"
5290                    " to method update_group_share" % key
5291                )
5292            params[key] = val
5293        del params['kwargs']
5294        # verify the required parameter 'account_id' is set
5295        if ('account_id' not in params) or (params['account_id'] is None):
5296            raise ValueError("Missing the required parameter `account_id` when calling `update_group_share`")
5297        # verify the required parameter 'template_id' is set
5298        if ('template_id' not in params) or (params['template_id'] is None):
5299            raise ValueError("Missing the required parameter `template_id` when calling `update_group_share`")
5300        # verify the required parameter 'template_part' is set
5301        if ('template_part' not in params) or (params['template_part'] is None):
5302            raise ValueError("Missing the required parameter `template_part` when calling `update_group_share`")
5303
5304
5305        collection_formats = {}
5306
5307        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json')
5308        path_params = {}
5309        if 'account_id' in params:
5310            path_params['accountId'] = params['account_id']
5311        if 'template_id' in params:
5312            path_params['templateId'] = params['template_id']
5313        if 'template_part' in params:
5314            path_params['templatePart'] = params['template_part']
5315
5316        query_params = {}
5317
5318        header_params = {}
5319
5320        form_params = []
5321        local_var_files = {}
5322
5323        body_params = None
5324        if 'group_information' in params:
5325            body_params = params['group_information']
5326        # HTTP header `Accept`
5327        header_params['Accept'] = self.api_client.\
5328            select_header_accept(['application/json'])
5329
5330        # Authentication setting
5331        auth_settings = []
5332
5333        return self.api_client.call_api(resource_path, 'PUT',
5334                                        path_params,
5335                                        query_params,
5336                                        header_params,
5337                                        body=body_params,
5338                                        post_params=form_params,
5339                                        files=local_var_files,
5340                                        response_type='GroupInformation',
5341                                        auth_settings=auth_settings,
5342                                        callback=params.get('callback'),
5343                                        _return_http_data_only=params.get('_return_http_data_only'),
5344                                        _preload_content=params.get('_preload_content', True),
5345                                        _request_timeout=params.get('_request_timeout'),
5346                                        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)
5348    def update_lock(self, account_id, template_id, **kwargs):
5349        """
5350        Updates a template lock.
5351        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.
5352        This method makes a synchronous HTTP request by default. To make an
5353        asynchronous HTTP request, please define a `callback` function
5354        to be invoked when receiving the response.
5355        >>> def callback_function(response):
5356        >>>     pprint(response)
5357        >>>
5358        >>> thread = api.update_lock(account_id, template_id, callback=callback_function)
5359
5360        :param callback function: The callback function
5361            for asynchronous request. (optional)
5362        :param str account_id: The external account number (int) or account ID Guid. (required)
5363        :param str template_id: The ID of the template being accessed. (required)
5364        :param LockRequest lock_request:
5365        :return: LockInformation
5366                 If the method is called asynchronously,
5367                 returns the request thread.
5368        """
5369        kwargs['_return_http_data_only'] = True
5370        if kwargs.get('callback'):
5371            return self.update_lock_with_http_info(account_id, template_id, **kwargs)
5372        else:
5373            (data) = self.update_lock_with_http_info(account_id, template_id, **kwargs)
5374            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)
5376    def update_lock_with_http_info(self, account_id, template_id, **kwargs):
5377        """
5378        Updates a template lock.
5379        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.
5380        This method makes a synchronous HTTP request by default. To make an
5381        asynchronous HTTP request, please define a `callback` function
5382        to be invoked when receiving the response.
5383        >>> def callback_function(response):
5384        >>>     pprint(response)
5385        >>>
5386        >>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function)
5387
5388        :param callback function: The callback function
5389            for asynchronous request. (optional)
5390        :param str account_id: The external account number (int) or account ID Guid. (required)
5391        :param str template_id: The ID of the template being accessed. (required)
5392        :param LockRequest lock_request:
5393        :return: LockInformation
5394                 If the method is called asynchronously,
5395                 returns the request thread.
5396        """
5397
5398        all_params = ['account_id', 'template_id', 'lock_request']
5399        all_params.append('callback')
5400        all_params.append('_return_http_data_only')
5401        all_params.append('_preload_content')
5402        all_params.append('_request_timeout')
5403
5404        params = locals()
5405        for key, val in iteritems(params['kwargs']):
5406            if key not in all_params:
5407                raise TypeError(
5408                    "Got an unexpected keyword argument '%s'"
5409                    " to method update_lock" % key
5410                )
5411            params[key] = val
5412        del params['kwargs']
5413        # verify the required parameter 'account_id' is set
5414        if ('account_id' not in params) or (params['account_id'] is None):
5415            raise ValueError("Missing the required parameter `account_id` when calling `update_lock`")
5416        # verify the required parameter 'template_id' is set
5417        if ('template_id' not in params) or (params['template_id'] is None):
5418            raise ValueError("Missing the required parameter `template_id` when calling `update_lock`")
5419
5420
5421        collection_formats = {}
5422
5423        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json')
5424        path_params = {}
5425        if 'account_id' in params:
5426            path_params['accountId'] = params['account_id']
5427        if 'template_id' in params:
5428            path_params['templateId'] = params['template_id']
5429
5430        query_params = {}
5431
5432        header_params = {}
5433
5434        form_params = []
5435        local_var_files = {}
5436
5437        body_params = None
5438        if 'lock_request' in params:
5439            body_params = params['lock_request']
5440        # HTTP header `Accept`
5441        header_params['Accept'] = self.api_client.\
5442            select_header_accept(['application/json'])
5443
5444        # Authentication setting
5445        auth_settings = []
5446
5447        return self.api_client.call_api(resource_path, 'PUT',
5448                                        path_params,
5449                                        query_params,
5450                                        header_params,
5451                                        body=body_params,
5452                                        post_params=form_params,
5453                                        files=local_var_files,
5454                                        response_type='LockInformation',
5455                                        auth_settings=auth_settings,
5456                                        callback=params.get('callback'),
5457                                        _return_http_data_only=params.get('_return_http_data_only'),
5458                                        _preload_content=params.get('_preload_content', True),
5459                                        _request_timeout=params.get('_request_timeout'),
5460                                        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)
5462    def update_notification_settings(self, account_id, template_id, **kwargs):
5463        """
5464        Updates the notification  structure for an existing template.
5465        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5466        This method makes a synchronous HTTP request by default. To make an
5467        asynchronous HTTP request, please define a `callback` function
5468        to be invoked when receiving the response.
5469        >>> def callback_function(response):
5470        >>>     pprint(response)
5471        >>>
5472        >>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function)
5473
5474        :param callback function: The callback function
5475            for asynchronous request. (optional)
5476        :param str account_id: The external account number (int) or account ID Guid. (required)
5477        :param str template_id: The ID of the template being accessed. (required)
5478        :param TemplateNotificationRequest template_notification_request:
5479        :return: Notification
5480                 If the method is called asynchronously,
5481                 returns the request thread.
5482        """
5483        kwargs['_return_http_data_only'] = True
5484        if kwargs.get('callback'):
5485            return self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5486        else:
5487            (data) = self.update_notification_settings_with_http_info(account_id, template_id, **kwargs)
5488            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)
5490    def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs):
5491        """
5492        Updates the notification  structure for an existing template.
5493        Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications.
5494        This method makes a synchronous HTTP request by default. To make an
5495        asynchronous HTTP request, please define a `callback` function
5496        to be invoked when receiving the response.
5497        >>> def callback_function(response):
5498        >>>     pprint(response)
5499        >>>
5500        >>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
5501
5502        :param callback function: The callback function
5503            for asynchronous request. (optional)
5504        :param str account_id: The external account number (int) or account ID Guid. (required)
5505        :param str template_id: The ID of the template being accessed. (required)
5506        :param TemplateNotificationRequest template_notification_request:
5507        :return: Notification
5508                 If the method is called asynchronously,
5509                 returns the request thread.
5510        """
5511
5512        all_params = ['account_id', 'template_id', 'template_notification_request']
5513        all_params.append('callback')
5514        all_params.append('_return_http_data_only')
5515        all_params.append('_preload_content')
5516        all_params.append('_request_timeout')
5517
5518        params = locals()
5519        for key, val in iteritems(params['kwargs']):
5520            if key not in all_params:
5521                raise TypeError(
5522                    "Got an unexpected keyword argument '%s'"
5523                    " to method update_notification_settings" % key
5524                )
5525            params[key] = val
5526        del params['kwargs']
5527        # verify the required parameter 'account_id' is set
5528        if ('account_id' not in params) or (params['account_id'] is None):
5529            raise ValueError("Missing the required parameter `account_id` when calling `update_notification_settings`")
5530        # verify the required parameter 'template_id' is set
5531        if ('template_id' not in params) or (params['template_id'] is None):
5532            raise ValueError("Missing the required parameter `template_id` when calling `update_notification_settings`")
5533
5534
5535        collection_formats = {}
5536
5537        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json')
5538        path_params = {}
5539        if 'account_id' in params:
5540            path_params['accountId'] = params['account_id']
5541        if 'template_id' in params:
5542            path_params['templateId'] = params['template_id']
5543
5544        query_params = {}
5545
5546        header_params = {}
5547
5548        form_params = []
5549        local_var_files = {}
5550
5551        body_params = None
5552        if 'template_notification_request' in params:
5553            body_params = params['template_notification_request']
5554        # HTTP header `Accept`
5555        header_params['Accept'] = self.api_client.\
5556            select_header_accept(['application/json'])
5557
5558        # Authentication setting
5559        auth_settings = []
5560
5561        return self.api_client.call_api(resource_path, 'PUT',
5562                                        path_params,
5563                                        query_params,
5564                                        header_params,
5565                                        body=body_params,
5566                                        post_params=form_params,
5567                                        files=local_var_files,
5568                                        response_type='Notification',
5569                                        auth_settings=auth_settings,
5570                                        callback=params.get('callback'),
5571                                        _return_http_data_only=params.get('_return_http_data_only'),
5572                                        _preload_content=params.get('_preload_content', True),
5573                                        _request_timeout=params.get('_request_timeout'),
5574                                        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)
5576    def update_recipients(self, account_id, template_id, **kwargs):
5577        """
5578        Updates recipients in a template.
5579        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5580        This method makes a synchronous HTTP request by default. To make an
5581        asynchronous HTTP request, please define a `callback` function
5582        to be invoked when receiving the response.
5583        >>> def callback_function(response):
5584        >>>     pprint(response)
5585        >>>
5586        >>> thread = api.update_recipients(account_id, template_id, callback=callback_function)
5587
5588        :param callback function: The callback function
5589            for asynchronous request. (optional)
5590        :param str account_id: The external account number (int) or account ID Guid. (required)
5591        :param str template_id: The ID of the template being accessed. (required)
5592        :param str resend_envelope:
5593        :param TemplateRecipients template_recipients:
5594        :return: RecipientsUpdateSummary
5595                 If the method is called asynchronously,
5596                 returns the request thread.
5597        """
5598        kwargs['_return_http_data_only'] = True
5599        if kwargs.get('callback'):
5600            return self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5601        else:
5602            (data) = self.update_recipients_with_http_info(account_id, template_id, **kwargs)
5603            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)
5605    def update_recipients_with_http_info(self, account_id, template_id, **kwargs):
5606        """
5607        Updates recipients in a template.
5608        Updates recipients in a template.   You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.
5609        This method makes a synchronous HTTP request by default. To make an
5610        asynchronous HTTP request, please define a `callback` function
5611        to be invoked when receiving the response.
5612        >>> def callback_function(response):
5613        >>>     pprint(response)
5614        >>>
5615        >>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function)
5616
5617        :param callback function: The callback function
5618            for asynchronous request. (optional)
5619        :param str account_id: The external account number (int) or account ID Guid. (required)
5620        :param str template_id: The ID of the template being accessed. (required)
5621        :param str resend_envelope:
5622        :param TemplateRecipients template_recipients:
5623        :return: RecipientsUpdateSummary
5624                 If the method is called asynchronously,
5625                 returns the request thread.
5626        """
5627
5628        all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients']
5629        all_params.append('callback')
5630        all_params.append('_return_http_data_only')
5631        all_params.append('_preload_content')
5632        all_params.append('_request_timeout')
5633
5634        params = locals()
5635        for key, val in iteritems(params['kwargs']):
5636            if key not in all_params:
5637                raise TypeError(
5638                    "Got an unexpected keyword argument '%s'"
5639                    " to method update_recipients" % key
5640                )
5641            params[key] = val
5642        del params['kwargs']
5643        # verify the required parameter 'account_id' is set
5644        if ('account_id' not in params) or (params['account_id'] is None):
5645            raise ValueError("Missing the required parameter `account_id` when calling `update_recipients`")
5646        # verify the required parameter 'template_id' is set
5647        if ('template_id' not in params) or (params['template_id'] is None):
5648            raise ValueError("Missing the required parameter `template_id` when calling `update_recipients`")
5649
5650
5651        collection_formats = {}
5652
5653        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json')
5654        path_params = {}
5655        if 'account_id' in params:
5656            path_params['accountId'] = params['account_id']
5657        if 'template_id' in params:
5658            path_params['templateId'] = params['template_id']
5659
5660        query_params = {}
5661        if 'resend_envelope' in params:
5662            query_params['resend_envelope'] = params['resend_envelope']
5663
5664        header_params = {}
5665
5666        form_params = []
5667        local_var_files = {}
5668
5669        body_params = None
5670        if 'template_recipients' in params:
5671            body_params = params['template_recipients']
5672        # HTTP header `Accept`
5673        header_params['Accept'] = self.api_client.\
5674            select_header_accept(['application/json'])
5675
5676        # Authentication setting
5677        auth_settings = []
5678
5679        return self.api_client.call_api(resource_path, 'PUT',
5680                                        path_params,
5681                                        query_params,
5682                                        header_params,
5683                                        body=body_params,
5684                                        post_params=form_params,
5685                                        files=local_var_files,
5686                                        response_type='RecipientsUpdateSummary',
5687                                        auth_settings=auth_settings,
5688                                        callback=params.get('callback'),
5689                                        _return_http_data_only=params.get('_return_http_data_only'),
5690                                        _preload_content=params.get('_preload_content', True),
5691                                        _request_timeout=params.get('_request_timeout'),
5692                                        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)
5694    def update_tabs(self, account_id, recipient_id, template_id, **kwargs):
5695        """
5696        Updates the tabs for a recipient.
5697        Updates one or more tabs for a recipient in a template.
5698        This method makes a synchronous HTTP request by default. To make an
5699        asynchronous HTTP request, please define a `callback` function
5700        to be invoked when receiving the response.
5701        >>> def callback_function(response):
5702        >>>     pprint(response)
5703        >>>
5704        >>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function)
5705
5706        :param callback function: The callback function
5707            for asynchronous request. (optional)
5708        :param str account_id: The external account number (int) or account ID Guid. (required)
5709        :param str recipient_id: The ID of the recipient being accessed. (required)
5710        :param str template_id: The ID of the template being accessed. (required)
5711        :param TemplateTabs template_tabs:
5712        :return: Tabs
5713                 If the method is called asynchronously,
5714                 returns the request thread.
5715        """
5716        kwargs['_return_http_data_only'] = True
5717        if kwargs.get('callback'):
5718            return self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5719        else:
5720            (data) = self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs)
5721            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)
5723    def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs):
5724        """
5725        Updates the tabs for a recipient.
5726        Updates one or more tabs for a recipient in a template.
5727        This method makes a synchronous HTTP request by default. To make an
5728        asynchronous HTTP request, please define a `callback` function
5729        to be invoked when receiving the response.
5730        >>> def callback_function(response):
5731        >>>     pprint(response)
5732        >>>
5733        >>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function)
5734
5735        :param callback function: The callback function
5736            for asynchronous request. (optional)
5737        :param str account_id: The external account number (int) or account ID Guid. (required)
5738        :param str recipient_id: The ID of the recipient being accessed. (required)
5739        :param str template_id: The ID of the template being accessed. (required)
5740        :param TemplateTabs template_tabs:
5741        :return: Tabs
5742                 If the method is called asynchronously,
5743                 returns the request thread.
5744        """
5745
5746        all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs']
5747        all_params.append('callback')
5748        all_params.append('_return_http_data_only')
5749        all_params.append('_preload_content')
5750        all_params.append('_request_timeout')
5751
5752        params = locals()
5753        for key, val in iteritems(params['kwargs']):
5754            if key not in all_params:
5755                raise TypeError(
5756                    "Got an unexpected keyword argument '%s'"
5757                    " to method update_tabs" % key
5758                )
5759            params[key] = val
5760        del params['kwargs']
5761        # verify the required parameter 'account_id' is set
5762        if ('account_id' not in params) or (params['account_id'] is None):
5763            raise ValueError("Missing the required parameter `account_id` when calling `update_tabs`")
5764        # verify the required parameter 'recipient_id' is set
5765        if ('recipient_id' not in params) or (params['recipient_id'] is None):
5766            raise ValueError("Missing the required parameter `recipient_id` when calling `update_tabs`")
5767        # verify the required parameter 'template_id' is set
5768        if ('template_id' not in params) or (params['template_id'] is None):
5769            raise ValueError("Missing the required parameter `template_id` when calling `update_tabs`")
5770
5771
5772        collection_formats = {}
5773
5774        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json')
5775        path_params = {}
5776        if 'account_id' in params:
5777            path_params['accountId'] = params['account_id']
5778        if 'recipient_id' in params:
5779            path_params['recipientId'] = params['recipient_id']
5780        if 'template_id' in params:
5781            path_params['templateId'] = params['template_id']
5782
5783        query_params = {}
5784
5785        header_params = {}
5786
5787        form_params = []
5788        local_var_files = {}
5789
5790        body_params = None
5791        if 'template_tabs' in params:
5792            body_params = params['template_tabs']
5793        # HTTP header `Accept`
5794        header_params['Accept'] = self.api_client.\
5795            select_header_accept(['application/json'])
5796
5797        # Authentication setting
5798        auth_settings = []
5799
5800        return self.api_client.call_api(resource_path, 'PUT',
5801                                        path_params,
5802                                        query_params,
5803                                        header_params,
5804                                        body=body_params,
5805                                        post_params=form_params,
5806                                        files=local_var_files,
5807                                        response_type='Tabs',
5808                                        auth_settings=auth_settings,
5809                                        callback=params.get('callback'),
5810                                        _return_http_data_only=params.get('_return_http_data_only'),
5811                                        _preload_content=params.get('_preload_content', True),
5812                                        _request_timeout=params.get('_request_timeout'),
5813                                        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)
5815    def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs):
5816        """
5817        Updates the tabs for a template
5818        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
5819        This method makes a synchronous HTTP request by default. To make an
5820        asynchronous HTTP request, please define a `callback` function
5821        to be invoked when receiving the response.
5822        >>> def callback_function(response):
5823        >>>     pprint(response)
5824        >>>
5825        >>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function)
5826
5827        :param callback function: The callback function
5828            for asynchronous request. (optional)
5829        :param str account_id: The external account number (int) or account ID Guid. (required)
5830        :param str document_id: The ID of the document being accessed. (required)
5831        :param str template_id: The ID of the template being accessed. (required)
5832        :param TemplateTabs template_tabs:
5833        :return: Tabs
5834                 If the method is called asynchronously,
5835                 returns the request thread.
5836        """
5837        kwargs['_return_http_data_only'] = True
5838        if kwargs.get('callback'):
5839            return self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
5840        else:
5841            (data) = self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs)
5842            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)
5844    def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs):
5845        """
5846        Updates the tabs for a template
5847        Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 
5848        This method makes a synchronous HTTP request by default. To make an
5849        asynchronous HTTP request, please define a `callback` function
5850        to be invoked when receiving the response.
5851        >>> def callback_function(response):
5852        >>>     pprint(response)
5853        >>>
5854        >>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
5855
5856        :param callback function: The callback function
5857            for asynchronous request. (optional)
5858        :param str account_id: The external account number (int) or account ID Guid. (required)
5859        :param str document_id: The ID of the document being accessed. (required)
5860        :param str template_id: The ID of the template being accessed. (required)
5861        :param TemplateTabs template_tabs:
5862        :return: Tabs
5863                 If the method is called asynchronously,
5864                 returns the request thread.
5865        """
5866
5867        all_params = ['account_id', 'document_id', 'template_id', 'template_tabs']
5868        all_params.append('callback')
5869        all_params.append('_return_http_data_only')
5870        all_params.append('_preload_content')
5871        all_params.append('_request_timeout')
5872
5873        params = locals()
5874        for key, val in iteritems(params['kwargs']):
5875            if key not in all_params:
5876                raise TypeError(
5877                    "Got an unexpected keyword argument '%s'"
5878                    " to method update_template_document_tabs" % key
5879                )
5880            params[key] = val
5881        del params['kwargs']
5882        # verify the required parameter 'account_id' is set
5883        if ('account_id' not in params) or (params['account_id'] is None):
5884            raise ValueError("Missing the required parameter `account_id` when calling `update_template_document_tabs`")
5885        # verify the required parameter 'document_id' is set
5886        if ('document_id' not in params) or (params['document_id'] is None):
5887            raise ValueError("Missing the required parameter `document_id` when calling `update_template_document_tabs`")
5888        # verify the required parameter 'template_id' is set
5889        if ('template_id' not in params) or (params['template_id'] is None):
5890            raise ValueError("Missing the required parameter `template_id` when calling `update_template_document_tabs`")
5891
5892
5893        collection_formats = {}
5894
5895        resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json')
5896        path_params = {}
5897        if 'account_id' in params:
5898            path_params['accountId'] = params['account_id']
5899        if 'document_id' in params:
5900            path_params['documentId'] = params['document_id']
5901        if 'template_id' in params:
5902            path_params['templateId'] = params['template_id']
5903
5904        query_params = {}
5905
5906        header_params = {}
5907
5908        form_params = []
5909        local_var_files = {}
5910
5911        body_params = None
5912        if 'template_tabs' in params:
5913            body_params = params['template_tabs']
5914        # HTTP header `Accept`
5915        header_params['Accept'] = self.api_client.\
5916            select_header_accept(['application/json'])
5917
5918        # Authentication setting
5919        auth_settings = []
5920
5921        return self.api_client.call_api(resource_path, 'PUT',
5922                                        path_params,
5923                                        query_params,
5924                                        header_params,
5925                                        body=body_params,
5926                                        post_params=form_params,
5927                                        files=local_var_files,
5928                                        response_type='Tabs',
5929                                        auth_settings=auth_settings,
5930                                        callback=params.get('callback'),
5931                                        _return_http_data_only=params.get('_return_http_data_only'),
5932                                        _preload_content=params.get('_preload_content', True),
5933                                        _request_timeout=params.get('_request_timeout'),
5934                                        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.