docusign_esign.apis.templates_api
Docusign eSignature REST API
The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. # noqa: E501
OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git
1# coding: utf-8 2 3""" 4 Docusign eSignature REST API 5 6 The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. # noqa: E501 7 8 OpenAPI spec version: v2.1 9 Contact: devcenter@docusign.com 10 Generated by: https://github.com/swagger-api/swagger-codegen.git 11""" 12 13 14from __future__ import absolute_import 15 16import sys 17import os 18import re 19 20# python 2 and python 3 compatibility library 21from six import iteritems 22 23from ..client.configuration import Configuration 24from ..client.api_client import ApiClient 25 26 27class TemplatesApi(object): 28 """ 29 NOTE: This class is auto generated by the swagger code generator program. 30 Do not edit the class manually. 31 Ref: https://github.com/swagger-api/swagger-codegen 32 """ 33 34 def __init__(self, api_client=None): 35 config = Configuration() 36 if api_client: 37 self.api_client = api_client 38 else: 39 if not config.api_client: 40 config.api_client = ApiClient() 41 self.api_client = config.api_client 42 43 def create_custom_fields(self, account_id, template_id, **kwargs): 44 """ 45 Creates custom document fields in an existing template document. 46 Creates custom document fields in an existing template document. 47 This method makes a synchronous HTTP request by default. To make an 48 asynchronous HTTP request, please define a `callback` function 49 to be invoked when receiving the response. 50 >>> def callback_function(response): 51 >>> pprint(response) 52 >>> 53 >>> thread = api.create_custom_fields(account_id, template_id, callback=callback_function) 54 55 :param callback function: The callback function 56 for asynchronous request. (optional) 57 :param str account_id: The external account number (int) or account ID Guid. (required) 58 :param str template_id: The ID of the template being accessed. (required) 59 :param TemplateCustomFields template_custom_fields: 60 :return: CustomFields 61 If the method is called asynchronously, 62 returns the request thread. 63 """ 64 kwargs['_return_http_data_only'] = True 65 if kwargs.get('callback'): 66 return self.create_custom_fields_with_http_info(account_id, template_id, **kwargs) 67 else: 68 (data) = self.create_custom_fields_with_http_info(account_id, template_id, **kwargs) 69 return data 70 71 def create_custom_fields_with_http_info(self, account_id, template_id, **kwargs): 72 """ 73 Creates custom document fields in an existing template document. 74 Creates custom document fields in an existing template document. 75 This method makes a synchronous HTTP request by default. To make an 76 asynchronous HTTP request, please define a `callback` function 77 to be invoked when receiving the response. 78 >>> def callback_function(response): 79 >>> pprint(response) 80 >>> 81 >>> thread = api.create_custom_fields_with_http_info(account_id, template_id, callback=callback_function) 82 83 :param callback function: The callback function 84 for asynchronous request. (optional) 85 :param str account_id: The external account number (int) or account ID Guid. (required) 86 :param str template_id: The ID of the template being accessed. (required) 87 :param TemplateCustomFields template_custom_fields: 88 :return: CustomFields 89 If the method is called asynchronously, 90 returns the request thread. 91 """ 92 93 all_params = ['account_id', 'template_id', 'template_custom_fields'] 94 all_params.append('callback') 95 all_params.append('_return_http_data_only') 96 all_params.append('_preload_content') 97 all_params.append('_request_timeout') 98 99 params = locals() 100 for key, val in iteritems(params['kwargs']): 101 if key not in all_params: 102 raise TypeError( 103 "Got an unexpected keyword argument '%s'" 104 " to method create_custom_fields" % key 105 ) 106 params[key] = val 107 del params['kwargs'] 108 # verify the required parameter 'account_id' is set 109 if ('account_id' not in params) or (params['account_id'] is None): 110 raise ValueError("Missing the required parameter `account_id` when calling `create_custom_fields`") 111 # verify the required parameter 'template_id' is set 112 if ('template_id' not in params) or (params['template_id'] is None): 113 raise ValueError("Missing the required parameter `template_id` when calling `create_custom_fields`") 114 115 116 collection_formats = {} 117 118 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json') 119 path_params = {} 120 if 'account_id' in params: 121 path_params['accountId'] = params['account_id'] 122 if 'template_id' in params: 123 path_params['templateId'] = params['template_id'] 124 125 query_params = {} 126 127 header_params = {} 128 129 form_params = [] 130 local_var_files = {} 131 132 body_params = None 133 if 'template_custom_fields' in params: 134 body_params = params['template_custom_fields'] 135 # HTTP header `Accept` 136 header_params['Accept'] = self.api_client.\ 137 select_header_accept(['application/json']) 138 139 # Authentication setting 140 auth_settings = [] 141 142 return self.api_client.call_api(resource_path, 'POST', 143 path_params, 144 query_params, 145 header_params, 146 body=body_params, 147 post_params=form_params, 148 files=local_var_files, 149 response_type='CustomFields', 150 auth_settings=auth_settings, 151 callback=params.get('callback'), 152 _return_http_data_only=params.get('_return_http_data_only'), 153 _preload_content=params.get('_preload_content', True), 154 _request_timeout=params.get('_request_timeout'), 155 collection_formats=collection_formats) 156 157 def create_document_fields(self, account_id, document_id, template_id, **kwargs): 158 """ 159 Creates custom document fields in an existing template document. 160 Creates custom document fields in an existing template document. 161 This method makes a synchronous HTTP request by default. To make an 162 asynchronous HTTP request, please define a `callback` function 163 to be invoked when receiving the response. 164 >>> def callback_function(response): 165 >>> pprint(response) 166 >>> 167 >>> thread = api.create_document_fields(account_id, document_id, template_id, callback=callback_function) 168 169 :param callback function: The callback function 170 for asynchronous request. (optional) 171 :param str account_id: The external account number (int) or account ID Guid. (required) 172 :param str document_id: The ID of the document being accessed. (required) 173 :param str template_id: The ID of the template being accessed. (required) 174 :param DocumentFieldsInformation document_fields_information: 175 :return: DocumentFieldsInformation 176 If the method is called asynchronously, 177 returns the request thread. 178 """ 179 kwargs['_return_http_data_only'] = True 180 if kwargs.get('callback'): 181 return self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 182 else: 183 (data) = self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 184 return data 185 186 def create_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs): 187 """ 188 Creates custom document fields in an existing template document. 189 Creates custom document fields in an existing template document. 190 This method makes a synchronous HTTP request by default. To make an 191 asynchronous HTTP request, please define a `callback` function 192 to be invoked when receiving the response. 193 >>> def callback_function(response): 194 >>> pprint(response) 195 >>> 196 >>> thread = api.create_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function) 197 198 :param callback function: The callback function 199 for asynchronous request. (optional) 200 :param str account_id: The external account number (int) or account ID Guid. (required) 201 :param str document_id: The ID of the document being accessed. (required) 202 :param str template_id: The ID of the template being accessed. (required) 203 :param DocumentFieldsInformation document_fields_information: 204 :return: DocumentFieldsInformation 205 If the method is called asynchronously, 206 returns the request thread. 207 """ 208 209 all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information'] 210 all_params.append('callback') 211 all_params.append('_return_http_data_only') 212 all_params.append('_preload_content') 213 all_params.append('_request_timeout') 214 215 params = locals() 216 for key, val in iteritems(params['kwargs']): 217 if key not in all_params: 218 raise TypeError( 219 "Got an unexpected keyword argument '%s'" 220 " to method create_document_fields" % key 221 ) 222 params[key] = val 223 del params['kwargs'] 224 # verify the required parameter 'account_id' is set 225 if ('account_id' not in params) or (params['account_id'] is None): 226 raise ValueError("Missing the required parameter `account_id` when calling `create_document_fields`") 227 # verify the required parameter 'document_id' is set 228 if ('document_id' not in params) or (params['document_id'] is None): 229 raise ValueError("Missing the required parameter `document_id` when calling `create_document_fields`") 230 # verify the required parameter 'template_id' is set 231 if ('template_id' not in params) or (params['template_id'] is None): 232 raise ValueError("Missing the required parameter `template_id` when calling `create_document_fields`") 233 234 235 collection_formats = {} 236 237 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json') 238 path_params = {} 239 if 'account_id' in params: 240 path_params['accountId'] = params['account_id'] 241 if 'document_id' in params: 242 path_params['documentId'] = params['document_id'] 243 if 'template_id' in params: 244 path_params['templateId'] = params['template_id'] 245 246 query_params = {} 247 248 header_params = {} 249 250 form_params = [] 251 local_var_files = {} 252 253 body_params = None 254 if 'document_fields_information' in params: 255 body_params = params['document_fields_information'] 256 # HTTP header `Accept` 257 header_params['Accept'] = self.api_client.\ 258 select_header_accept(['application/json']) 259 260 # Authentication setting 261 auth_settings = [] 262 263 return self.api_client.call_api(resource_path, 'POST', 264 path_params, 265 query_params, 266 header_params, 267 body=body_params, 268 post_params=form_params, 269 files=local_var_files, 270 response_type='DocumentFieldsInformation', 271 auth_settings=auth_settings, 272 callback=params.get('callback'), 273 _return_http_data_only=params.get('_return_http_data_only'), 274 _preload_content=params.get('_preload_content', True), 275 _request_timeout=params.get('_request_timeout'), 276 collection_formats=collection_formats) 277 278 def create_edit_view(self, account_id, template_id, **kwargs): 279 """ 280 Provides a URL to start an edit view of the Template UI 281 This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI. 282 This method makes a synchronous HTTP request by default. To make an 283 asynchronous HTTP request, please define a `callback` function 284 to be invoked when receiving the response. 285 >>> def callback_function(response): 286 >>> pprint(response) 287 >>> 288 >>> thread = api.create_edit_view(account_id, template_id, callback=callback_function) 289 290 :param callback function: The callback function 291 for asynchronous request. (optional) 292 :param str account_id: The external account number (int) or account ID Guid. (required) 293 :param str template_id: The ID of the template being accessed. (required) 294 :param TemplateViewRequest template_view_request: 295 :return: ViewUrl 296 If the method is called asynchronously, 297 returns the request thread. 298 """ 299 kwargs['_return_http_data_only'] = True 300 if kwargs.get('callback'): 301 return self.create_edit_view_with_http_info(account_id, template_id, **kwargs) 302 else: 303 (data) = self.create_edit_view_with_http_info(account_id, template_id, **kwargs) 304 return data 305 306 def create_edit_view_with_http_info(self, account_id, template_id, **kwargs): 307 """ 308 Provides a URL to start an edit view of the Template UI 309 This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI. 310 This method makes a synchronous HTTP request by default. To make an 311 asynchronous HTTP request, please define a `callback` function 312 to be invoked when receiving the response. 313 >>> def callback_function(response): 314 >>> pprint(response) 315 >>> 316 >>> thread = api.create_edit_view_with_http_info(account_id, template_id, callback=callback_function) 317 318 :param callback function: The callback function 319 for asynchronous request. (optional) 320 :param str account_id: The external account number (int) or account ID Guid. (required) 321 :param str template_id: The ID of the template being accessed. (required) 322 :param TemplateViewRequest template_view_request: 323 :return: ViewUrl 324 If the method is called asynchronously, 325 returns the request thread. 326 """ 327 328 all_params = ['account_id', 'template_id', 'template_view_request'] 329 all_params.append('callback') 330 all_params.append('_return_http_data_only') 331 all_params.append('_preload_content') 332 all_params.append('_request_timeout') 333 334 params = locals() 335 for key, val in iteritems(params['kwargs']): 336 if key not in all_params: 337 raise TypeError( 338 "Got an unexpected keyword argument '%s'" 339 " to method create_edit_view" % key 340 ) 341 params[key] = val 342 del params['kwargs'] 343 # verify the required parameter 'account_id' is set 344 if ('account_id' not in params) or (params['account_id'] is None): 345 raise ValueError("Missing the required parameter `account_id` when calling `create_edit_view`") 346 # verify the required parameter 'template_id' is set 347 if ('template_id' not in params) or (params['template_id'] is None): 348 raise ValueError("Missing the required parameter `template_id` when calling `create_edit_view`") 349 350 351 collection_formats = {} 352 353 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/edit'.replace('{format}', 'json') 354 path_params = {} 355 if 'account_id' in params: 356 path_params['accountId'] = params['account_id'] 357 if 'template_id' in params: 358 path_params['templateId'] = params['template_id'] 359 360 query_params = {} 361 362 header_params = {} 363 364 form_params = [] 365 local_var_files = {} 366 367 body_params = None 368 if 'template_view_request' in params: 369 body_params = params['template_view_request'] 370 # HTTP header `Accept` 371 header_params['Accept'] = self.api_client.\ 372 select_header_accept(['application/json']) 373 374 # Authentication setting 375 auth_settings = [] 376 377 return self.api_client.call_api(resource_path, 'POST', 378 path_params, 379 query_params, 380 header_params, 381 body=body_params, 382 post_params=form_params, 383 files=local_var_files, 384 response_type='ViewUrl', 385 auth_settings=auth_settings, 386 callback=params.get('callback'), 387 _return_http_data_only=params.get('_return_http_data_only'), 388 _preload_content=params.get('_preload_content', True), 389 _request_timeout=params.get('_request_timeout'), 390 collection_formats=collection_formats) 391 392 def create_lock(self, account_id, template_id, **kwargs): 393 """ 394 Lock a template. 395 Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template. ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user). 396 This method makes a synchronous HTTP request by default. To make an 397 asynchronous HTTP request, please define a `callback` function 398 to be invoked when receiving the response. 399 >>> def callback_function(response): 400 >>> pprint(response) 401 >>> 402 >>> thread = api.create_lock(account_id, template_id, callback=callback_function) 403 404 :param callback function: The callback function 405 for asynchronous request. (optional) 406 :param str account_id: The external account number (int) or account ID Guid. (required) 407 :param str template_id: The ID of the template being accessed. (required) 408 :param LockRequest lock_request: 409 :return: LockInformation 410 If the method is called asynchronously, 411 returns the request thread. 412 """ 413 kwargs['_return_http_data_only'] = True 414 if kwargs.get('callback'): 415 return self.create_lock_with_http_info(account_id, template_id, **kwargs) 416 else: 417 (data) = self.create_lock_with_http_info(account_id, template_id, **kwargs) 418 return data 419 420 def create_lock_with_http_info(self, account_id, template_id, **kwargs): 421 """ 422 Lock a template. 423 Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template. ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user). 424 This method makes a synchronous HTTP request by default. To make an 425 asynchronous HTTP request, please define a `callback` function 426 to be invoked when receiving the response. 427 >>> def callback_function(response): 428 >>> pprint(response) 429 >>> 430 >>> thread = api.create_lock_with_http_info(account_id, template_id, callback=callback_function) 431 432 :param callback function: The callback function 433 for asynchronous request. (optional) 434 :param str account_id: The external account number (int) or account ID Guid. (required) 435 :param str template_id: The ID of the template being accessed. (required) 436 :param LockRequest lock_request: 437 :return: LockInformation 438 If the method is called asynchronously, 439 returns the request thread. 440 """ 441 442 all_params = ['account_id', 'template_id', 'lock_request'] 443 all_params.append('callback') 444 all_params.append('_return_http_data_only') 445 all_params.append('_preload_content') 446 all_params.append('_request_timeout') 447 448 params = locals() 449 for key, val in iteritems(params['kwargs']): 450 if key not in all_params: 451 raise TypeError( 452 "Got an unexpected keyword argument '%s'" 453 " to method create_lock" % key 454 ) 455 params[key] = val 456 del params['kwargs'] 457 # verify the required parameter 'account_id' is set 458 if ('account_id' not in params) or (params['account_id'] is None): 459 raise ValueError("Missing the required parameter `account_id` when calling `create_lock`") 460 # verify the required parameter 'template_id' is set 461 if ('template_id' not in params) or (params['template_id'] is None): 462 raise ValueError("Missing the required parameter `template_id` when calling `create_lock`") 463 464 465 collection_formats = {} 466 467 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json') 468 path_params = {} 469 if 'account_id' in params: 470 path_params['accountId'] = params['account_id'] 471 if 'template_id' in params: 472 path_params['templateId'] = params['template_id'] 473 474 query_params = {} 475 476 header_params = {} 477 478 form_params = [] 479 local_var_files = {} 480 481 body_params = None 482 if 'lock_request' in params: 483 body_params = params['lock_request'] 484 # HTTP header `Accept` 485 header_params['Accept'] = self.api_client.\ 486 select_header_accept(['application/json']) 487 488 # Authentication setting 489 auth_settings = [] 490 491 return self.api_client.call_api(resource_path, 'POST', 492 path_params, 493 query_params, 494 header_params, 495 body=body_params, 496 post_params=form_params, 497 files=local_var_files, 498 response_type='LockInformation', 499 auth_settings=auth_settings, 500 callback=params.get('callback'), 501 _return_http_data_only=params.get('_return_http_data_only'), 502 _preload_content=params.get('_preload_content', True), 503 _request_timeout=params.get('_request_timeout'), 504 collection_formats=collection_formats) 505 506 def create_recipients(self, account_id, template_id, **kwargs): 507 """ 508 Adds tabs for a recipient. 509 Adds one or more recipients to a template. 510 This method makes a synchronous HTTP request by default. To make an 511 asynchronous HTTP request, please define a `callback` function 512 to be invoked when receiving the response. 513 >>> def callback_function(response): 514 >>> pprint(response) 515 >>> 516 >>> thread = api.create_recipients(account_id, template_id, callback=callback_function) 517 518 :param callback function: The callback function 519 for asynchronous request. (optional) 520 :param str account_id: The external account number (int) or account ID Guid. (required) 521 :param str template_id: The ID of the template being accessed. (required) 522 :param str resend_envelope: 523 :param TemplateRecipients template_recipients: 524 :return: Recipients 525 If the method is called asynchronously, 526 returns the request thread. 527 """ 528 kwargs['_return_http_data_only'] = True 529 if kwargs.get('callback'): 530 return self.create_recipients_with_http_info(account_id, template_id, **kwargs) 531 else: 532 (data) = self.create_recipients_with_http_info(account_id, template_id, **kwargs) 533 return data 534 535 def create_recipients_with_http_info(self, account_id, template_id, **kwargs): 536 """ 537 Adds tabs for a recipient. 538 Adds one or more recipients to a template. 539 This method makes a synchronous HTTP request by default. To make an 540 asynchronous HTTP request, please define a `callback` function 541 to be invoked when receiving the response. 542 >>> def callback_function(response): 543 >>> pprint(response) 544 >>> 545 >>> thread = api.create_recipients_with_http_info(account_id, template_id, callback=callback_function) 546 547 :param callback function: The callback function 548 for asynchronous request. (optional) 549 :param str account_id: The external account number (int) or account ID Guid. (required) 550 :param str template_id: The ID of the template being accessed. (required) 551 :param str resend_envelope: 552 :param TemplateRecipients template_recipients: 553 :return: Recipients 554 If the method is called asynchronously, 555 returns the request thread. 556 """ 557 558 all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients'] 559 all_params.append('callback') 560 all_params.append('_return_http_data_only') 561 all_params.append('_preload_content') 562 all_params.append('_request_timeout') 563 564 params = locals() 565 for key, val in iteritems(params['kwargs']): 566 if key not in all_params: 567 raise TypeError( 568 "Got an unexpected keyword argument '%s'" 569 " to method create_recipients" % key 570 ) 571 params[key] = val 572 del params['kwargs'] 573 # verify the required parameter 'account_id' is set 574 if ('account_id' not in params) or (params['account_id'] is None): 575 raise ValueError("Missing the required parameter `account_id` when calling `create_recipients`") 576 # verify the required parameter 'template_id' is set 577 if ('template_id' not in params) or (params['template_id'] is None): 578 raise ValueError("Missing the required parameter `template_id` when calling `create_recipients`") 579 580 581 collection_formats = {} 582 583 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json') 584 path_params = {} 585 if 'account_id' in params: 586 path_params['accountId'] = params['account_id'] 587 if 'template_id' in params: 588 path_params['templateId'] = params['template_id'] 589 590 query_params = {} 591 if 'resend_envelope' in params: 592 query_params['resend_envelope'] = params['resend_envelope'] 593 594 header_params = {} 595 596 form_params = [] 597 local_var_files = {} 598 599 body_params = None 600 if 'template_recipients' in params: 601 body_params = params['template_recipients'] 602 # HTTP header `Accept` 603 header_params['Accept'] = self.api_client.\ 604 select_header_accept(['application/json']) 605 606 # Authentication setting 607 auth_settings = [] 608 609 return self.api_client.call_api(resource_path, 'POST', 610 path_params, 611 query_params, 612 header_params, 613 body=body_params, 614 post_params=form_params, 615 files=local_var_files, 616 response_type='Recipients', 617 auth_settings=auth_settings, 618 callback=params.get('callback'), 619 _return_http_data_only=params.get('_return_http_data_only'), 620 _preload_content=params.get('_preload_content', True), 621 _request_timeout=params.get('_request_timeout'), 622 collection_formats=collection_formats) 623 624 def create_tabs(self, account_id, recipient_id, template_id, **kwargs): 625 """ 626 Adds tabs for a recipient. 627 Adds one or more tabs for a recipient. 628 This method makes a synchronous HTTP request by default. To make an 629 asynchronous HTTP request, please define a `callback` function 630 to be invoked when receiving the response. 631 >>> def callback_function(response): 632 >>> pprint(response) 633 >>> 634 >>> thread = api.create_tabs(account_id, recipient_id, template_id, callback=callback_function) 635 636 :param callback function: The callback function 637 for asynchronous request. (optional) 638 :param str account_id: The external account number (int) or account ID Guid. (required) 639 :param str recipient_id: The ID of the recipient being accessed. (required) 640 :param str template_id: The ID of the template being accessed. (required) 641 :param TemplateTabs template_tabs: 642 :return: Tabs 643 If the method is called asynchronously, 644 returns the request thread. 645 """ 646 kwargs['_return_http_data_only'] = True 647 if kwargs.get('callback'): 648 return self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 649 else: 650 (data) = self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 651 return data 652 653 def create_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs): 654 """ 655 Adds tabs for a recipient. 656 Adds one or more tabs for a recipient. 657 This method makes a synchronous HTTP request by default. To make an 658 asynchronous HTTP request, please define a `callback` function 659 to be invoked when receiving the response. 660 >>> def callback_function(response): 661 >>> pprint(response) 662 >>> 663 >>> thread = api.create_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function) 664 665 :param callback function: The callback function 666 for asynchronous request. (optional) 667 :param str account_id: The external account number (int) or account ID Guid. (required) 668 :param str recipient_id: The ID of the recipient being accessed. (required) 669 :param str template_id: The ID of the template being accessed. (required) 670 :param TemplateTabs template_tabs: 671 :return: Tabs 672 If the method is called asynchronously, 673 returns the request thread. 674 """ 675 676 all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs'] 677 all_params.append('callback') 678 all_params.append('_return_http_data_only') 679 all_params.append('_preload_content') 680 all_params.append('_request_timeout') 681 682 params = locals() 683 for key, val in iteritems(params['kwargs']): 684 if key not in all_params: 685 raise TypeError( 686 "Got an unexpected keyword argument '%s'" 687 " to method create_tabs" % key 688 ) 689 params[key] = val 690 del params['kwargs'] 691 # verify the required parameter 'account_id' is set 692 if ('account_id' not in params) or (params['account_id'] is None): 693 raise ValueError("Missing the required parameter `account_id` when calling `create_tabs`") 694 # verify the required parameter 'recipient_id' is set 695 if ('recipient_id' not in params) or (params['recipient_id'] is None): 696 raise ValueError("Missing the required parameter `recipient_id` when calling `create_tabs`") 697 # verify the required parameter 'template_id' is set 698 if ('template_id' not in params) or (params['template_id'] is None): 699 raise ValueError("Missing the required parameter `template_id` when calling `create_tabs`") 700 701 702 collection_formats = {} 703 704 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json') 705 path_params = {} 706 if 'account_id' in params: 707 path_params['accountId'] = params['account_id'] 708 if 'recipient_id' in params: 709 path_params['recipientId'] = params['recipient_id'] 710 if 'template_id' in params: 711 path_params['templateId'] = params['template_id'] 712 713 query_params = {} 714 715 header_params = {} 716 717 form_params = [] 718 local_var_files = {} 719 720 body_params = None 721 if 'template_tabs' in params: 722 body_params = params['template_tabs'] 723 # HTTP header `Accept` 724 header_params['Accept'] = self.api_client.\ 725 select_header_accept(['application/json']) 726 727 # Authentication setting 728 auth_settings = [] 729 730 return self.api_client.call_api(resource_path, 'POST', 731 path_params, 732 query_params, 733 header_params, 734 body=body_params, 735 post_params=form_params, 736 files=local_var_files, 737 response_type='Tabs', 738 auth_settings=auth_settings, 739 callback=params.get('callback'), 740 _return_http_data_only=params.get('_return_http_data_only'), 741 _preload_content=params.get('_preload_content', True), 742 _request_timeout=params.get('_request_timeout'), 743 collection_formats=collection_formats) 744 745 def create_template(self, account_id, **kwargs): 746 """ 747 Creates an envelope from a template. 748 Creates a template definition using a multipart request. ###Template Email Subject Merge Fields Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's contents of the `roleName` property in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. 749 This method makes a synchronous HTTP request by default. To make an 750 asynchronous HTTP request, please define a `callback` function 751 to be invoked when receiving the response. 752 >>> def callback_function(response): 753 >>> pprint(response) 754 >>> 755 >>> thread = api.create_template(account_id, callback=callback_function) 756 757 :param callback function: The callback function 758 for asynchronous request. (optional) 759 :param str account_id: The external account number (int) or account ID Guid. (required) 760 :param EnvelopeTemplate envelope_template: 761 :return: TemplateSummary 762 If the method is called asynchronously, 763 returns the request thread. 764 """ 765 kwargs['_return_http_data_only'] = True 766 if kwargs.get('callback'): 767 return self.create_template_with_http_info(account_id, **kwargs) 768 else: 769 (data) = self.create_template_with_http_info(account_id, **kwargs) 770 return data 771 772 def create_template_with_http_info(self, account_id, **kwargs): 773 """ 774 Creates an envelope from a template. 775 Creates a template definition using a multipart request. ###Template Email Subject Merge Fields Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's contents of the `roleName` property in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. 776 This method makes a synchronous HTTP request by default. To make an 777 asynchronous HTTP request, please define a `callback` function 778 to be invoked when receiving the response. 779 >>> def callback_function(response): 780 >>> pprint(response) 781 >>> 782 >>> thread = api.create_template_with_http_info(account_id, callback=callback_function) 783 784 :param callback function: The callback function 785 for asynchronous request. (optional) 786 :param str account_id: The external account number (int) or account ID Guid. (required) 787 :param EnvelopeTemplate envelope_template: 788 :return: TemplateSummary 789 If the method is called asynchronously, 790 returns the request thread. 791 """ 792 793 all_params = ['account_id', 'envelope_template'] 794 all_params.append('callback') 795 all_params.append('_return_http_data_only') 796 all_params.append('_preload_content') 797 all_params.append('_request_timeout') 798 799 params = locals() 800 for key, val in iteritems(params['kwargs']): 801 if key not in all_params: 802 raise TypeError( 803 "Got an unexpected keyword argument '%s'" 804 " to method create_template" % key 805 ) 806 params[key] = val 807 del params['kwargs'] 808 # verify the required parameter 'account_id' is set 809 if ('account_id' not in params) or (params['account_id'] is None): 810 raise ValueError("Missing the required parameter `account_id` when calling `create_template`") 811 812 813 collection_formats = {} 814 815 resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json') 816 path_params = {} 817 if 'account_id' in params: 818 path_params['accountId'] = params['account_id'] 819 820 query_params = {} 821 822 header_params = {} 823 824 form_params = [] 825 local_var_files = {} 826 827 body_params = None 828 if 'envelope_template' in params: 829 body_params = params['envelope_template'] 830 # HTTP header `Accept` 831 header_params['Accept'] = self.api_client.\ 832 select_header_accept(['application/json']) 833 834 # Authentication setting 835 auth_settings = [] 836 837 return self.api_client.call_api(resource_path, 'POST', 838 path_params, 839 query_params, 840 header_params, 841 body=body_params, 842 post_params=form_params, 843 files=local_var_files, 844 response_type='TemplateSummary', 845 auth_settings=auth_settings, 846 callback=params.get('callback'), 847 _return_http_data_only=params.get('_return_http_data_only'), 848 _preload_content=params.get('_preload_content', True), 849 _request_timeout=params.get('_request_timeout'), 850 collection_formats=collection_formats) 851 852 def create_template_document_responsive_html_preview(self, account_id, document_id, template_id, **kwargs): 853 """ 854 Post Responsive HTML Preview for a document in a template. 855 Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. 856 This method makes a synchronous HTTP request by default. To make an 857 asynchronous HTTP request, please define a `callback` function 858 to be invoked when receiving the response. 859 >>> def callback_function(response): 860 >>> pprint(response) 861 >>> 862 >>> thread = api.create_template_document_responsive_html_preview(account_id, document_id, template_id, callback=callback_function) 863 864 :param callback function: The callback function 865 for asynchronous request. (optional) 866 :param str account_id: The external account number (int) or account ID Guid. (required) 867 :param str document_id: The ID of the document being accessed. (required) 868 :param str template_id: The ID of the template being accessed. (required) 869 :param DocumentHtmlDefinition document_html_definition: 870 :return: DocumentHtmlDefinitions 871 If the method is called asynchronously, 872 returns the request thread. 873 """ 874 kwargs['_return_http_data_only'] = True 875 if kwargs.get('callback'): 876 return self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs) 877 else: 878 (data) = self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs) 879 return data 880 881 def create_template_document_responsive_html_preview_with_http_info(self, account_id, document_id, template_id, **kwargs): 882 """ 883 Post Responsive HTML Preview for a document in a template. 884 Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. 885 This method makes a synchronous HTTP request by default. To make an 886 asynchronous HTTP request, please define a `callback` function 887 to be invoked when receiving the response. 888 >>> def callback_function(response): 889 >>> pprint(response) 890 >>> 891 >>> thread = api.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, callback=callback_function) 892 893 :param callback function: The callback function 894 for asynchronous request. (optional) 895 :param str account_id: The external account number (int) or account ID Guid. (required) 896 :param str document_id: The ID of the document being accessed. (required) 897 :param str template_id: The ID of the template being accessed. (required) 898 :param DocumentHtmlDefinition document_html_definition: 899 :return: DocumentHtmlDefinitions 900 If the method is called asynchronously, 901 returns the request thread. 902 """ 903 904 all_params = ['account_id', 'document_id', 'template_id', 'document_html_definition'] 905 all_params.append('callback') 906 all_params.append('_return_http_data_only') 907 all_params.append('_preload_content') 908 all_params.append('_request_timeout') 909 910 params = locals() 911 for key, val in iteritems(params['kwargs']): 912 if key not in all_params: 913 raise TypeError( 914 "Got an unexpected keyword argument '%s'" 915 " to method create_template_document_responsive_html_preview" % key 916 ) 917 params[key] = val 918 del params['kwargs'] 919 # verify the required parameter 'account_id' is set 920 if ('account_id' not in params) or (params['account_id'] is None): 921 raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_responsive_html_preview`") 922 # verify the required parameter 'document_id' is set 923 if ('document_id' not in params) or (params['document_id'] is None): 924 raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_responsive_html_preview`") 925 # verify the required parameter 'template_id' is set 926 if ('template_id' not in params) or (params['template_id'] is None): 927 raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_responsive_html_preview`") 928 929 930 collection_formats = {} 931 932 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/responsive_html_preview'.replace('{format}', 'json') 933 path_params = {} 934 if 'account_id' in params: 935 path_params['accountId'] = params['account_id'] 936 if 'document_id' in params: 937 path_params['documentId'] = params['document_id'] 938 if 'template_id' in params: 939 path_params['templateId'] = params['template_id'] 940 941 query_params = {} 942 943 header_params = {} 944 945 form_params = [] 946 local_var_files = {} 947 948 body_params = None 949 if 'document_html_definition' in params: 950 body_params = params['document_html_definition'] 951 # HTTP header `Accept` 952 header_params['Accept'] = self.api_client.\ 953 select_header_accept(['application/json']) 954 955 # Authentication setting 956 auth_settings = [] 957 958 return self.api_client.call_api(resource_path, 'POST', 959 path_params, 960 query_params, 961 header_params, 962 body=body_params, 963 post_params=form_params, 964 files=local_var_files, 965 response_type='DocumentHtmlDefinitions', 966 auth_settings=auth_settings, 967 callback=params.get('callback'), 968 _return_http_data_only=params.get('_return_http_data_only'), 969 _preload_content=params.get('_preload_content', True), 970 _request_timeout=params.get('_request_timeout'), 971 collection_formats=collection_formats) 972 973 def create_template_document_tabs(self, account_id, document_id, template_id, **kwargs): 974 """ 975 Adds the tabs to a tempate 976 Adds tabs to the document specified by `documentId` in the template specified by `templateId`. In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this: ``` { \"prefillTabs\": { \"textTabs\": [ { \"value\": \"a prefill text tab\", \"pageNumber\": \"1\", \"documentId\": \"1\", \"xPosition\": 316, \"yPosition\": 97 } ] } } ``` 977 This method makes a synchronous HTTP request by default. To make an 978 asynchronous HTTP request, please define a `callback` function 979 to be invoked when receiving the response. 980 >>> def callback_function(response): 981 >>> pprint(response) 982 >>> 983 >>> thread = api.create_template_document_tabs(account_id, document_id, template_id, callback=callback_function) 984 985 :param callback function: The callback function 986 for asynchronous request. (optional) 987 :param str account_id: The external account number (int) or account ID Guid. (required) 988 :param str document_id: The ID of the document being accessed. (required) 989 :param str template_id: The ID of the template being accessed. (required) 990 :param TemplateTabs template_tabs: 991 :return: Tabs 992 If the method is called asynchronously, 993 returns the request thread. 994 """ 995 kwargs['_return_http_data_only'] = True 996 if kwargs.get('callback'): 997 return self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 998 else: 999 (data) = self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 1000 return data 1001 1002 def create_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs): 1003 """ 1004 Adds the tabs to a tempate 1005 Adds tabs to the document specified by `documentId` in the template specified by `templateId`. In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this: ``` { \"prefillTabs\": { \"textTabs\": [ { \"value\": \"a prefill text tab\", \"pageNumber\": \"1\", \"documentId\": \"1\", \"xPosition\": 316, \"yPosition\": 97 } ] } } ``` 1006 This method makes a synchronous HTTP request by default. To make an 1007 asynchronous HTTP request, please define a `callback` function 1008 to be invoked when receiving the response. 1009 >>> def callback_function(response): 1010 >>> pprint(response) 1011 >>> 1012 >>> thread = api.create_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function) 1013 1014 :param callback function: The callback function 1015 for asynchronous request. (optional) 1016 :param str account_id: The external account number (int) or account ID Guid. (required) 1017 :param str document_id: The ID of the document being accessed. (required) 1018 :param str template_id: The ID of the template being accessed. (required) 1019 :param TemplateTabs template_tabs: 1020 :return: Tabs 1021 If the method is called asynchronously, 1022 returns the request thread. 1023 """ 1024 1025 all_params = ['account_id', 'document_id', 'template_id', 'template_tabs'] 1026 all_params.append('callback') 1027 all_params.append('_return_http_data_only') 1028 all_params.append('_preload_content') 1029 all_params.append('_request_timeout') 1030 1031 params = locals() 1032 for key, val in iteritems(params['kwargs']): 1033 if key not in all_params: 1034 raise TypeError( 1035 "Got an unexpected keyword argument '%s'" 1036 " to method create_template_document_tabs" % key 1037 ) 1038 params[key] = val 1039 del params['kwargs'] 1040 # verify the required parameter 'account_id' is set 1041 if ('account_id' not in params) or (params['account_id'] is None): 1042 raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_tabs`") 1043 # verify the required parameter 'document_id' is set 1044 if ('document_id' not in params) or (params['document_id'] is None): 1045 raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_tabs`") 1046 # verify the required parameter 'template_id' is set 1047 if ('template_id' not in params) or (params['template_id'] is None): 1048 raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_tabs`") 1049 1050 1051 collection_formats = {} 1052 1053 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json') 1054 path_params = {} 1055 if 'account_id' in params: 1056 path_params['accountId'] = params['account_id'] 1057 if 'document_id' in params: 1058 path_params['documentId'] = params['document_id'] 1059 if 'template_id' in params: 1060 path_params['templateId'] = params['template_id'] 1061 1062 query_params = {} 1063 1064 header_params = {} 1065 1066 form_params = [] 1067 local_var_files = {} 1068 1069 body_params = None 1070 if 'template_tabs' in params: 1071 body_params = params['template_tabs'] 1072 # HTTP header `Accept` 1073 header_params['Accept'] = self.api_client.\ 1074 select_header_accept(['application/json']) 1075 1076 # Authentication setting 1077 auth_settings = [] 1078 1079 return self.api_client.call_api(resource_path, 'POST', 1080 path_params, 1081 query_params, 1082 header_params, 1083 body=body_params, 1084 post_params=form_params, 1085 files=local_var_files, 1086 response_type='Tabs', 1087 auth_settings=auth_settings, 1088 callback=params.get('callback'), 1089 _return_http_data_only=params.get('_return_http_data_only'), 1090 _preload_content=params.get('_preload_content', True), 1091 _request_timeout=params.get('_request_timeout'), 1092 collection_formats=collection_formats) 1093 1094 def create_template_recipient_preview(self, account_id, template_id, **kwargs): 1095 """ 1096 Provides a URL to start a recipient view of the Envelope UI 1097 This method returns a URL for a template recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents). 1098 This method makes a synchronous HTTP request by default. To make an 1099 asynchronous HTTP request, please define a `callback` function 1100 to be invoked when receiving the response. 1101 >>> def callback_function(response): 1102 >>> pprint(response) 1103 >>> 1104 >>> thread = api.create_template_recipient_preview(account_id, template_id, callback=callback_function) 1105 1106 :param callback function: The callback function 1107 for asynchronous request. (optional) 1108 :param str account_id: The external account number (int) or account ID Guid. (required) 1109 :param str template_id: The ID of the template being accessed. (required) 1110 :param RecipientPreviewRequest recipient_preview_request: 1111 :return: ViewUrl 1112 If the method is called asynchronously, 1113 returns the request thread. 1114 """ 1115 kwargs['_return_http_data_only'] = True 1116 if kwargs.get('callback'): 1117 return self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs) 1118 else: 1119 (data) = self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs) 1120 return data 1121 1122 def create_template_recipient_preview_with_http_info(self, account_id, template_id, **kwargs): 1123 """ 1124 Provides a URL to start a recipient view of the Envelope UI 1125 This method returns a URL for a template recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents). 1126 This method makes a synchronous HTTP request by default. To make an 1127 asynchronous HTTP request, please define a `callback` function 1128 to be invoked when receiving the response. 1129 >>> def callback_function(response): 1130 >>> pprint(response) 1131 >>> 1132 >>> thread = api.create_template_recipient_preview_with_http_info(account_id, template_id, callback=callback_function) 1133 1134 :param callback function: The callback function 1135 for asynchronous request. (optional) 1136 :param str account_id: The external account number (int) or account ID Guid. (required) 1137 :param str template_id: The ID of the template being accessed. (required) 1138 :param RecipientPreviewRequest recipient_preview_request: 1139 :return: ViewUrl 1140 If the method is called asynchronously, 1141 returns the request thread. 1142 """ 1143 1144 all_params = ['account_id', 'template_id', 'recipient_preview_request'] 1145 all_params.append('callback') 1146 all_params.append('_return_http_data_only') 1147 all_params.append('_preload_content') 1148 all_params.append('_request_timeout') 1149 1150 params = locals() 1151 for key, val in iteritems(params['kwargs']): 1152 if key not in all_params: 1153 raise TypeError( 1154 "Got an unexpected keyword argument '%s'" 1155 " to method create_template_recipient_preview" % key 1156 ) 1157 params[key] = val 1158 del params['kwargs'] 1159 # verify the required parameter 'account_id' is set 1160 if ('account_id' not in params) or (params['account_id'] is None): 1161 raise ValueError("Missing the required parameter `account_id` when calling `create_template_recipient_preview`") 1162 # verify the required parameter 'template_id' is set 1163 if ('template_id' not in params) or (params['template_id'] is None): 1164 raise ValueError("Missing the required parameter `template_id` when calling `create_template_recipient_preview`") 1165 1166 1167 collection_formats = {} 1168 1169 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/recipient_preview'.replace('{format}', 'json') 1170 path_params = {} 1171 if 'account_id' in params: 1172 path_params['accountId'] = params['account_id'] 1173 if 'template_id' in params: 1174 path_params['templateId'] = params['template_id'] 1175 1176 query_params = {} 1177 1178 header_params = {} 1179 1180 form_params = [] 1181 local_var_files = {} 1182 1183 body_params = None 1184 if 'recipient_preview_request' in params: 1185 body_params = params['recipient_preview_request'] 1186 # HTTP header `Accept` 1187 header_params['Accept'] = self.api_client.\ 1188 select_header_accept(['application/json']) 1189 1190 # Authentication setting 1191 auth_settings = [] 1192 1193 return self.api_client.call_api(resource_path, 'POST', 1194 path_params, 1195 query_params, 1196 header_params, 1197 body=body_params, 1198 post_params=form_params, 1199 files=local_var_files, 1200 response_type='ViewUrl', 1201 auth_settings=auth_settings, 1202 callback=params.get('callback'), 1203 _return_http_data_only=params.get('_return_http_data_only'), 1204 _preload_content=params.get('_preload_content', True), 1205 _request_timeout=params.get('_request_timeout'), 1206 collection_formats=collection_formats) 1207 1208 def create_template_responsive_html_preview(self, account_id, template_id, **kwargs): 1209 """ 1210 Get Responsive HTML Preview for all documents in a template. 1211 Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. 1212 This method makes a synchronous HTTP request by default. To make an 1213 asynchronous HTTP request, please define a `callback` function 1214 to be invoked when receiving the response. 1215 >>> def callback_function(response): 1216 >>> pprint(response) 1217 >>> 1218 >>> thread = api.create_template_responsive_html_preview(account_id, template_id, callback=callback_function) 1219 1220 :param callback function: The callback function 1221 for asynchronous request. (optional) 1222 :param str account_id: The external account number (int) or account ID Guid. (required) 1223 :param str template_id: The ID of the template being accessed. (required) 1224 :param DocumentHtmlDefinition document_html_definition: 1225 :return: DocumentHtmlDefinitions 1226 If the method is called asynchronously, 1227 returns the request thread. 1228 """ 1229 kwargs['_return_http_data_only'] = True 1230 if kwargs.get('callback'): 1231 return self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs) 1232 else: 1233 (data) = self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs) 1234 return data 1235 1236 def create_template_responsive_html_preview_with_http_info(self, account_id, template_id, **kwargs): 1237 """ 1238 Get Responsive HTML Preview for all documents in a template. 1239 Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. 1240 This method makes a synchronous HTTP request by default. To make an 1241 asynchronous HTTP request, please define a `callback` function 1242 to be invoked when receiving the response. 1243 >>> def callback_function(response): 1244 >>> pprint(response) 1245 >>> 1246 >>> thread = api.create_template_responsive_html_preview_with_http_info(account_id, template_id, callback=callback_function) 1247 1248 :param callback function: The callback function 1249 for asynchronous request. (optional) 1250 :param str account_id: The external account number (int) or account ID Guid. (required) 1251 :param str template_id: The ID of the template being accessed. (required) 1252 :param DocumentHtmlDefinition document_html_definition: 1253 :return: DocumentHtmlDefinitions 1254 If the method is called asynchronously, 1255 returns the request thread. 1256 """ 1257 1258 all_params = ['account_id', 'template_id', 'document_html_definition'] 1259 all_params.append('callback') 1260 all_params.append('_return_http_data_only') 1261 all_params.append('_preload_content') 1262 all_params.append('_request_timeout') 1263 1264 params = locals() 1265 for key, val in iteritems(params['kwargs']): 1266 if key not in all_params: 1267 raise TypeError( 1268 "Got an unexpected keyword argument '%s'" 1269 " to method create_template_responsive_html_preview" % key 1270 ) 1271 params[key] = val 1272 del params['kwargs'] 1273 # verify the required parameter 'account_id' is set 1274 if ('account_id' not in params) or (params['account_id'] is None): 1275 raise ValueError("Missing the required parameter `account_id` when calling `create_template_responsive_html_preview`") 1276 # verify the required parameter 'template_id' is set 1277 if ('template_id' not in params) or (params['template_id'] is None): 1278 raise ValueError("Missing the required parameter `template_id` when calling `create_template_responsive_html_preview`") 1279 1280 1281 collection_formats = {} 1282 1283 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/responsive_html_preview'.replace('{format}', 'json') 1284 path_params = {} 1285 if 'account_id' in params: 1286 path_params['accountId'] = params['account_id'] 1287 if 'template_id' in params: 1288 path_params['templateId'] = params['template_id'] 1289 1290 query_params = {} 1291 1292 header_params = {} 1293 1294 form_params = [] 1295 local_var_files = {} 1296 1297 body_params = None 1298 if 'document_html_definition' in params: 1299 body_params = params['document_html_definition'] 1300 # HTTP header `Accept` 1301 header_params['Accept'] = self.api_client.\ 1302 select_header_accept(['application/json']) 1303 1304 # Authentication setting 1305 auth_settings = [] 1306 1307 return self.api_client.call_api(resource_path, 'POST', 1308 path_params, 1309 query_params, 1310 header_params, 1311 body=body_params, 1312 post_params=form_params, 1313 files=local_var_files, 1314 response_type='DocumentHtmlDefinitions', 1315 auth_settings=auth_settings, 1316 callback=params.get('callback'), 1317 _return_http_data_only=params.get('_return_http_data_only'), 1318 _preload_content=params.get('_preload_content', True), 1319 _request_timeout=params.get('_request_timeout'), 1320 collection_formats=collection_formats) 1321 1322 def delete_custom_fields(self, account_id, template_id, **kwargs): 1323 """ 1324 Deletes envelope custom fields in a template. 1325 Deletes envelope custom fields in a template. 1326 This method makes a synchronous HTTP request by default. To make an 1327 asynchronous HTTP request, please define a `callback` function 1328 to be invoked when receiving the response. 1329 >>> def callback_function(response): 1330 >>> pprint(response) 1331 >>> 1332 >>> thread = api.delete_custom_fields(account_id, template_id, callback=callback_function) 1333 1334 :param callback function: The callback function 1335 for asynchronous request. (optional) 1336 :param str account_id: The external account number (int) or account ID Guid. (required) 1337 :param str template_id: The ID of the template being accessed. (required) 1338 :param TemplateCustomFields template_custom_fields: 1339 :return: CustomFields 1340 If the method is called asynchronously, 1341 returns the request thread. 1342 """ 1343 kwargs['_return_http_data_only'] = True 1344 if kwargs.get('callback'): 1345 return self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs) 1346 else: 1347 (data) = self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs) 1348 return data 1349 1350 def delete_custom_fields_with_http_info(self, account_id, template_id, **kwargs): 1351 """ 1352 Deletes envelope custom fields in a template. 1353 Deletes envelope custom fields in a template. 1354 This method makes a synchronous HTTP request by default. To make an 1355 asynchronous HTTP request, please define a `callback` function 1356 to be invoked when receiving the response. 1357 >>> def callback_function(response): 1358 >>> pprint(response) 1359 >>> 1360 >>> thread = api.delete_custom_fields_with_http_info(account_id, template_id, callback=callback_function) 1361 1362 :param callback function: The callback function 1363 for asynchronous request. (optional) 1364 :param str account_id: The external account number (int) or account ID Guid. (required) 1365 :param str template_id: The ID of the template being accessed. (required) 1366 :param TemplateCustomFields template_custom_fields: 1367 :return: CustomFields 1368 If the method is called asynchronously, 1369 returns the request thread. 1370 """ 1371 1372 all_params = ['account_id', 'template_id', 'template_custom_fields'] 1373 all_params.append('callback') 1374 all_params.append('_return_http_data_only') 1375 all_params.append('_preload_content') 1376 all_params.append('_request_timeout') 1377 1378 params = locals() 1379 for key, val in iteritems(params['kwargs']): 1380 if key not in all_params: 1381 raise TypeError( 1382 "Got an unexpected keyword argument '%s'" 1383 " to method delete_custom_fields" % key 1384 ) 1385 params[key] = val 1386 del params['kwargs'] 1387 # verify the required parameter 'account_id' is set 1388 if ('account_id' not in params) or (params['account_id'] is None): 1389 raise ValueError("Missing the required parameter `account_id` when calling `delete_custom_fields`") 1390 # verify the required parameter 'template_id' is set 1391 if ('template_id' not in params) or (params['template_id'] is None): 1392 raise ValueError("Missing the required parameter `template_id` when calling `delete_custom_fields`") 1393 1394 1395 collection_formats = {} 1396 1397 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json') 1398 path_params = {} 1399 if 'account_id' in params: 1400 path_params['accountId'] = params['account_id'] 1401 if 'template_id' in params: 1402 path_params['templateId'] = params['template_id'] 1403 1404 query_params = {} 1405 1406 header_params = {} 1407 1408 form_params = [] 1409 local_var_files = {} 1410 1411 body_params = None 1412 if 'template_custom_fields' in params: 1413 body_params = params['template_custom_fields'] 1414 # HTTP header `Accept` 1415 header_params['Accept'] = self.api_client.\ 1416 select_header_accept(['application/json']) 1417 1418 # Authentication setting 1419 auth_settings = [] 1420 1421 return self.api_client.call_api(resource_path, 'DELETE', 1422 path_params, 1423 query_params, 1424 header_params, 1425 body=body_params, 1426 post_params=form_params, 1427 files=local_var_files, 1428 response_type='CustomFields', 1429 auth_settings=auth_settings, 1430 callback=params.get('callback'), 1431 _return_http_data_only=params.get('_return_http_data_only'), 1432 _preload_content=params.get('_preload_content', True), 1433 _request_timeout=params.get('_request_timeout'), 1434 collection_formats=collection_formats) 1435 1436 def delete_document_fields(self, account_id, document_id, template_id, **kwargs): 1437 """ 1438 Deletes custom document fields from an existing template document. 1439 Deletes custom document fields from an existing template document. 1440 This method makes a synchronous HTTP request by default. To make an 1441 asynchronous HTTP request, please define a `callback` function 1442 to be invoked when receiving the response. 1443 >>> def callback_function(response): 1444 >>> pprint(response) 1445 >>> 1446 >>> thread = api.delete_document_fields(account_id, document_id, template_id, callback=callback_function) 1447 1448 :param callback function: The callback function 1449 for asynchronous request. (optional) 1450 :param str account_id: The external account number (int) or account ID Guid. (required) 1451 :param str document_id: The ID of the document being accessed. (required) 1452 :param str template_id: The ID of the template being accessed. (required) 1453 :param DocumentFieldsInformation document_fields_information: 1454 :return: DocumentFieldsInformation 1455 If the method is called asynchronously, 1456 returns the request thread. 1457 """ 1458 kwargs['_return_http_data_only'] = True 1459 if kwargs.get('callback'): 1460 return self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 1461 else: 1462 (data) = self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 1463 return data 1464 1465 def delete_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs): 1466 """ 1467 Deletes custom document fields from an existing template document. 1468 Deletes custom document fields from an existing template document. 1469 This method makes a synchronous HTTP request by default. To make an 1470 asynchronous HTTP request, please define a `callback` function 1471 to be invoked when receiving the response. 1472 >>> def callback_function(response): 1473 >>> pprint(response) 1474 >>> 1475 >>> thread = api.delete_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function) 1476 1477 :param callback function: The callback function 1478 for asynchronous request. (optional) 1479 :param str account_id: The external account number (int) or account ID Guid. (required) 1480 :param str document_id: The ID of the document being accessed. (required) 1481 :param str template_id: The ID of the template being accessed. (required) 1482 :param DocumentFieldsInformation document_fields_information: 1483 :return: DocumentFieldsInformation 1484 If the method is called asynchronously, 1485 returns the request thread. 1486 """ 1487 1488 all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information'] 1489 all_params.append('callback') 1490 all_params.append('_return_http_data_only') 1491 all_params.append('_preload_content') 1492 all_params.append('_request_timeout') 1493 1494 params = locals() 1495 for key, val in iteritems(params['kwargs']): 1496 if key not in all_params: 1497 raise TypeError( 1498 "Got an unexpected keyword argument '%s'" 1499 " to method delete_document_fields" % key 1500 ) 1501 params[key] = val 1502 del params['kwargs'] 1503 # verify the required parameter 'account_id' is set 1504 if ('account_id' not in params) or (params['account_id'] is None): 1505 raise ValueError("Missing the required parameter `account_id` when calling `delete_document_fields`") 1506 # verify the required parameter 'document_id' is set 1507 if ('document_id' not in params) or (params['document_id'] is None): 1508 raise ValueError("Missing the required parameter `document_id` when calling `delete_document_fields`") 1509 # verify the required parameter 'template_id' is set 1510 if ('template_id' not in params) or (params['template_id'] is None): 1511 raise ValueError("Missing the required parameter `template_id` when calling `delete_document_fields`") 1512 1513 1514 collection_formats = {} 1515 1516 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json') 1517 path_params = {} 1518 if 'account_id' in params: 1519 path_params['accountId'] = params['account_id'] 1520 if 'document_id' in params: 1521 path_params['documentId'] = params['document_id'] 1522 if 'template_id' in params: 1523 path_params['templateId'] = params['template_id'] 1524 1525 query_params = {} 1526 1527 header_params = {} 1528 1529 form_params = [] 1530 local_var_files = {} 1531 1532 body_params = None 1533 if 'document_fields_information' in params: 1534 body_params = params['document_fields_information'] 1535 # HTTP header `Accept` 1536 header_params['Accept'] = self.api_client.\ 1537 select_header_accept(['application/json']) 1538 1539 # Authentication setting 1540 auth_settings = [] 1541 1542 return self.api_client.call_api(resource_path, 'DELETE', 1543 path_params, 1544 query_params, 1545 header_params, 1546 body=body_params, 1547 post_params=form_params, 1548 files=local_var_files, 1549 response_type='DocumentFieldsInformation', 1550 auth_settings=auth_settings, 1551 callback=params.get('callback'), 1552 _return_http_data_only=params.get('_return_http_data_only'), 1553 _preload_content=params.get('_preload_content', True), 1554 _request_timeout=params.get('_request_timeout'), 1555 collection_formats=collection_formats) 1556 1557 def delete_document_page(self, account_id, document_id, page_number, template_id, **kwargs): 1558 """ 1559 Deletes a page from a document in an template. 1560 Deletes a page from a document in a template based on the page number. 1561 This method makes a synchronous HTTP request by default. To make an 1562 asynchronous HTTP request, please define a `callback` function 1563 to be invoked when receiving the response. 1564 >>> def callback_function(response): 1565 >>> pprint(response) 1566 >>> 1567 >>> thread = api.delete_document_page(account_id, document_id, page_number, template_id, callback=callback_function) 1568 1569 :param callback function: The callback function 1570 for asynchronous request. (optional) 1571 :param str account_id: The external account number (int) or account ID Guid. (required) 1572 :param str document_id: The ID of the document being accessed. (required) 1573 :param str page_number: The page number being accessed. (required) 1574 :param str template_id: The ID of the template being accessed. (required) 1575 :param PageRequest page_request: 1576 :return: None 1577 If the method is called asynchronously, 1578 returns the request thread. 1579 """ 1580 kwargs['_return_http_data_only'] = True 1581 if kwargs.get('callback'): 1582 return self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 1583 else: 1584 (data) = self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 1585 return data 1586 1587 def delete_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs): 1588 """ 1589 Deletes a page from a document in an template. 1590 Deletes a page from a document in a template based on the page number. 1591 This method makes a synchronous HTTP request by default. To make an 1592 asynchronous HTTP request, please define a `callback` function 1593 to be invoked when receiving the response. 1594 >>> def callback_function(response): 1595 >>> pprint(response) 1596 >>> 1597 >>> thread = api.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function) 1598 1599 :param callback function: The callback function 1600 for asynchronous request. (optional) 1601 :param str account_id: The external account number (int) or account ID Guid. (required) 1602 :param str document_id: The ID of the document being accessed. (required) 1603 :param str page_number: The page number being accessed. (required) 1604 :param str template_id: The ID of the template being accessed. (required) 1605 :param PageRequest page_request: 1606 :return: None 1607 If the method is called asynchronously, 1608 returns the request thread. 1609 """ 1610 1611 all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request'] 1612 all_params.append('callback') 1613 all_params.append('_return_http_data_only') 1614 all_params.append('_preload_content') 1615 all_params.append('_request_timeout') 1616 1617 params = locals() 1618 for key, val in iteritems(params['kwargs']): 1619 if key not in all_params: 1620 raise TypeError( 1621 "Got an unexpected keyword argument '%s'" 1622 " to method delete_document_page" % key 1623 ) 1624 params[key] = val 1625 del params['kwargs'] 1626 # verify the required parameter 'account_id' is set 1627 if ('account_id' not in params) or (params['account_id'] is None): 1628 raise ValueError("Missing the required parameter `account_id` when calling `delete_document_page`") 1629 # verify the required parameter 'document_id' is set 1630 if ('document_id' not in params) or (params['document_id'] is None): 1631 raise ValueError("Missing the required parameter `document_id` when calling `delete_document_page`") 1632 # verify the required parameter 'page_number' is set 1633 if ('page_number' not in params) or (params['page_number'] is None): 1634 raise ValueError("Missing the required parameter `page_number` when calling `delete_document_page`") 1635 # verify the required parameter 'template_id' is set 1636 if ('template_id' not in params) or (params['template_id'] is None): 1637 raise ValueError("Missing the required parameter `template_id` when calling `delete_document_page`") 1638 1639 1640 collection_formats = {} 1641 1642 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}'.replace('{format}', 'json') 1643 path_params = {} 1644 if 'account_id' in params: 1645 path_params['accountId'] = params['account_id'] 1646 if 'document_id' in params: 1647 path_params['documentId'] = params['document_id'] 1648 if 'page_number' in params: 1649 path_params['pageNumber'] = params['page_number'] 1650 if 'template_id' in params: 1651 path_params['templateId'] = params['template_id'] 1652 1653 query_params = {} 1654 1655 header_params = {} 1656 1657 form_params = [] 1658 local_var_files = {} 1659 1660 body_params = None 1661 if 'page_request' in params: 1662 body_params = params['page_request'] 1663 # HTTP header `Accept` 1664 header_params['Accept'] = self.api_client.\ 1665 select_header_accept(['application/json']) 1666 1667 # Authentication setting 1668 auth_settings = [] 1669 1670 return self.api_client.call_api(resource_path, 'DELETE', 1671 path_params, 1672 query_params, 1673 header_params, 1674 body=body_params, 1675 post_params=form_params, 1676 files=local_var_files, 1677 response_type=None, 1678 auth_settings=auth_settings, 1679 callback=params.get('callback'), 1680 _return_http_data_only=params.get('_return_http_data_only'), 1681 _preload_content=params.get('_preload_content', True), 1682 _request_timeout=params.get('_request_timeout'), 1683 collection_formats=collection_formats) 1684 1685 def delete_documents(self, account_id, template_id, **kwargs): 1686 """ 1687 Deletes documents from a template. 1688 Deletes one or more documents from an existing template. 1689 This method makes a synchronous HTTP request by default. To make an 1690 asynchronous HTTP request, please define a `callback` function 1691 to be invoked when receiving the response. 1692 >>> def callback_function(response): 1693 >>> pprint(response) 1694 >>> 1695 >>> thread = api.delete_documents(account_id, template_id, callback=callback_function) 1696 1697 :param callback function: The callback function 1698 for asynchronous request. (optional) 1699 :param str account_id: The external account number (int) or account ID Guid. (required) 1700 :param str template_id: The ID of the template being accessed. (required) 1701 :param EnvelopeDefinition envelope_definition: 1702 :return: TemplateDocumentsResult 1703 If the method is called asynchronously, 1704 returns the request thread. 1705 """ 1706 kwargs['_return_http_data_only'] = True 1707 if kwargs.get('callback'): 1708 return self.delete_documents_with_http_info(account_id, template_id, **kwargs) 1709 else: 1710 (data) = self.delete_documents_with_http_info(account_id, template_id, **kwargs) 1711 return data 1712 1713 def delete_documents_with_http_info(self, account_id, template_id, **kwargs): 1714 """ 1715 Deletes documents from a template. 1716 Deletes one or more documents from an existing template. 1717 This method makes a synchronous HTTP request by default. To make an 1718 asynchronous HTTP request, please define a `callback` function 1719 to be invoked when receiving the response. 1720 >>> def callback_function(response): 1721 >>> pprint(response) 1722 >>> 1723 >>> thread = api.delete_documents_with_http_info(account_id, template_id, callback=callback_function) 1724 1725 :param callback function: The callback function 1726 for asynchronous request. (optional) 1727 :param str account_id: The external account number (int) or account ID Guid. (required) 1728 :param str template_id: The ID of the template being accessed. (required) 1729 :param EnvelopeDefinition envelope_definition: 1730 :return: TemplateDocumentsResult 1731 If the method is called asynchronously, 1732 returns the request thread. 1733 """ 1734 1735 all_params = ['account_id', 'template_id', 'envelope_definition'] 1736 all_params.append('callback') 1737 all_params.append('_return_http_data_only') 1738 all_params.append('_preload_content') 1739 all_params.append('_request_timeout') 1740 1741 params = locals() 1742 for key, val in iteritems(params['kwargs']): 1743 if key not in all_params: 1744 raise TypeError( 1745 "Got an unexpected keyword argument '%s'" 1746 " to method delete_documents" % key 1747 ) 1748 params[key] = val 1749 del params['kwargs'] 1750 # verify the required parameter 'account_id' is set 1751 if ('account_id' not in params) or (params['account_id'] is None): 1752 raise ValueError("Missing the required parameter `account_id` when calling `delete_documents`") 1753 # verify the required parameter 'template_id' is set 1754 if ('template_id' not in params) or (params['template_id'] is None): 1755 raise ValueError("Missing the required parameter `template_id` when calling `delete_documents`") 1756 1757 1758 collection_formats = {} 1759 1760 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json') 1761 path_params = {} 1762 if 'account_id' in params: 1763 path_params['accountId'] = params['account_id'] 1764 if 'template_id' in params: 1765 path_params['templateId'] = params['template_id'] 1766 1767 query_params = {} 1768 1769 header_params = {} 1770 1771 form_params = [] 1772 local_var_files = {} 1773 1774 body_params = None 1775 if 'envelope_definition' in params: 1776 body_params = params['envelope_definition'] 1777 # HTTP header `Accept` 1778 header_params['Accept'] = self.api_client.\ 1779 select_header_accept(['application/json']) 1780 1781 # Authentication setting 1782 auth_settings = [] 1783 1784 return self.api_client.call_api(resource_path, 'DELETE', 1785 path_params, 1786 query_params, 1787 header_params, 1788 body=body_params, 1789 post_params=form_params, 1790 files=local_var_files, 1791 response_type='TemplateDocumentsResult', 1792 auth_settings=auth_settings, 1793 callback=params.get('callback'), 1794 _return_http_data_only=params.get('_return_http_data_only'), 1795 _preload_content=params.get('_preload_content', True), 1796 _request_timeout=params.get('_request_timeout'), 1797 collection_formats=collection_formats) 1798 1799 def delete_group_share(self, account_id, template_id, template_part, **kwargs): 1800 """ 1801 Removes a member group's sharing permissions for a template. 1802 Removes a member group's sharing permissions for a specified template. 1803 This method makes a synchronous HTTP request by default. To make an 1804 asynchronous HTTP request, please define a `callback` function 1805 to be invoked when receiving the response. 1806 >>> def callback_function(response): 1807 >>> pprint(response) 1808 >>> 1809 >>> thread = api.delete_group_share(account_id, template_id, template_part, callback=callback_function) 1810 1811 :param callback function: The callback function 1812 for asynchronous request. (optional) 1813 :param str account_id: The external account number (int) or account ID Guid. (required) 1814 :param str template_id: The ID of the template being accessed. (required) 1815 :param str template_part: Currently, the only defined part is **groups**. (required) 1816 :param GroupInformation group_information: 1817 :return: GroupInformation 1818 If the method is called asynchronously, 1819 returns the request thread. 1820 """ 1821 kwargs['_return_http_data_only'] = True 1822 if kwargs.get('callback'): 1823 return self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs) 1824 else: 1825 (data) = self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs) 1826 return data 1827 1828 def delete_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs): 1829 """ 1830 Removes a member group's sharing permissions for a template. 1831 Removes a member group's sharing permissions for a specified template. 1832 This method makes a synchronous HTTP request by default. To make an 1833 asynchronous HTTP request, please define a `callback` function 1834 to be invoked when receiving the response. 1835 >>> def callback_function(response): 1836 >>> pprint(response) 1837 >>> 1838 >>> thread = api.delete_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function) 1839 1840 :param callback function: The callback function 1841 for asynchronous request. (optional) 1842 :param str account_id: The external account number (int) or account ID Guid. (required) 1843 :param str template_id: The ID of the template being accessed. (required) 1844 :param str template_part: Currently, the only defined part is **groups**. (required) 1845 :param GroupInformation group_information: 1846 :return: GroupInformation 1847 If the method is called asynchronously, 1848 returns the request thread. 1849 """ 1850 1851 all_params = ['account_id', 'template_id', 'template_part', 'group_information'] 1852 all_params.append('callback') 1853 all_params.append('_return_http_data_only') 1854 all_params.append('_preload_content') 1855 all_params.append('_request_timeout') 1856 1857 params = locals() 1858 for key, val in iteritems(params['kwargs']): 1859 if key not in all_params: 1860 raise TypeError( 1861 "Got an unexpected keyword argument '%s'" 1862 " to method delete_group_share" % key 1863 ) 1864 params[key] = val 1865 del params['kwargs'] 1866 # verify the required parameter 'account_id' is set 1867 if ('account_id' not in params) or (params['account_id'] is None): 1868 raise ValueError("Missing the required parameter `account_id` when calling `delete_group_share`") 1869 # verify the required parameter 'template_id' is set 1870 if ('template_id' not in params) or (params['template_id'] is None): 1871 raise ValueError("Missing the required parameter `template_id` when calling `delete_group_share`") 1872 # verify the required parameter 'template_part' is set 1873 if ('template_part' not in params) or (params['template_part'] is None): 1874 raise ValueError("Missing the required parameter `template_part` when calling `delete_group_share`") 1875 1876 1877 collection_formats = {} 1878 1879 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json') 1880 path_params = {} 1881 if 'account_id' in params: 1882 path_params['accountId'] = params['account_id'] 1883 if 'template_id' in params: 1884 path_params['templateId'] = params['template_id'] 1885 if 'template_part' in params: 1886 path_params['templatePart'] = params['template_part'] 1887 1888 query_params = {} 1889 1890 header_params = {} 1891 1892 form_params = [] 1893 local_var_files = {} 1894 1895 body_params = None 1896 if 'group_information' in params: 1897 body_params = params['group_information'] 1898 # HTTP header `Accept` 1899 header_params['Accept'] = self.api_client.\ 1900 select_header_accept(['application/json']) 1901 1902 # Authentication setting 1903 auth_settings = [] 1904 1905 return self.api_client.call_api(resource_path, 'DELETE', 1906 path_params, 1907 query_params, 1908 header_params, 1909 body=body_params, 1910 post_params=form_params, 1911 files=local_var_files, 1912 response_type='GroupInformation', 1913 auth_settings=auth_settings, 1914 callback=params.get('callback'), 1915 _return_http_data_only=params.get('_return_http_data_only'), 1916 _preload_content=params.get('_preload_content', True), 1917 _request_timeout=params.get('_request_timeout'), 1918 collection_formats=collection_formats) 1919 1920 def delete_lock(self, account_id, template_id, **kwargs): 1921 """ 1922 Deletes a template lock. 1923 Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request. 1924 This method makes a synchronous HTTP request by default. To make an 1925 asynchronous HTTP request, please define a `callback` function 1926 to be invoked when receiving the response. 1927 >>> def callback_function(response): 1928 >>> pprint(response) 1929 >>> 1930 >>> thread = api.delete_lock(account_id, template_id, callback=callback_function) 1931 1932 :param callback function: The callback function 1933 for asynchronous request. (optional) 1934 :param str account_id: The external account number (int) or account ID Guid. (required) 1935 :param str template_id: The ID of the template being accessed. (required) 1936 :param LockRequest lock_request: 1937 :return: LockInformation 1938 If the method is called asynchronously, 1939 returns the request thread. 1940 """ 1941 kwargs['_return_http_data_only'] = True 1942 if kwargs.get('callback'): 1943 return self.delete_lock_with_http_info(account_id, template_id, **kwargs) 1944 else: 1945 (data) = self.delete_lock_with_http_info(account_id, template_id, **kwargs) 1946 return data 1947 1948 def delete_lock_with_http_info(self, account_id, template_id, **kwargs): 1949 """ 1950 Deletes a template lock. 1951 Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request. 1952 This method makes a synchronous HTTP request by default. To make an 1953 asynchronous HTTP request, please define a `callback` function 1954 to be invoked when receiving the response. 1955 >>> def callback_function(response): 1956 >>> pprint(response) 1957 >>> 1958 >>> thread = api.delete_lock_with_http_info(account_id, template_id, callback=callback_function) 1959 1960 :param callback function: The callback function 1961 for asynchronous request. (optional) 1962 :param str account_id: The external account number (int) or account ID Guid. (required) 1963 :param str template_id: The ID of the template being accessed. (required) 1964 :param LockRequest lock_request: 1965 :return: LockInformation 1966 If the method is called asynchronously, 1967 returns the request thread. 1968 """ 1969 1970 all_params = ['account_id', 'template_id', 'lock_request'] 1971 all_params.append('callback') 1972 all_params.append('_return_http_data_only') 1973 all_params.append('_preload_content') 1974 all_params.append('_request_timeout') 1975 1976 params = locals() 1977 for key, val in iteritems(params['kwargs']): 1978 if key not in all_params: 1979 raise TypeError( 1980 "Got an unexpected keyword argument '%s'" 1981 " to method delete_lock" % key 1982 ) 1983 params[key] = val 1984 del params['kwargs'] 1985 # verify the required parameter 'account_id' is set 1986 if ('account_id' not in params) or (params['account_id'] is None): 1987 raise ValueError("Missing the required parameter `account_id` when calling `delete_lock`") 1988 # verify the required parameter 'template_id' is set 1989 if ('template_id' not in params) or (params['template_id'] is None): 1990 raise ValueError("Missing the required parameter `template_id` when calling `delete_lock`") 1991 1992 1993 collection_formats = {} 1994 1995 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json') 1996 path_params = {} 1997 if 'account_id' in params: 1998 path_params['accountId'] = params['account_id'] 1999 if 'template_id' in params: 2000 path_params['templateId'] = params['template_id'] 2001 2002 query_params = {} 2003 2004 header_params = {} 2005 2006 form_params = [] 2007 local_var_files = {} 2008 2009 body_params = None 2010 if 'lock_request' in params: 2011 body_params = params['lock_request'] 2012 # HTTP header `Accept` 2013 header_params['Accept'] = self.api_client.\ 2014 select_header_accept(['application/json']) 2015 2016 # Authentication setting 2017 auth_settings = [] 2018 2019 return self.api_client.call_api(resource_path, 'DELETE', 2020 path_params, 2021 query_params, 2022 header_params, 2023 body=body_params, 2024 post_params=form_params, 2025 files=local_var_files, 2026 response_type='LockInformation', 2027 auth_settings=auth_settings, 2028 callback=params.get('callback'), 2029 _return_http_data_only=params.get('_return_http_data_only'), 2030 _preload_content=params.get('_preload_content', True), 2031 _request_timeout=params.get('_request_timeout'), 2032 collection_formats=collection_formats) 2033 2034 def delete_recipient(self, account_id, recipient_id, template_id, **kwargs): 2035 """ 2036 Deletes the specified recipient file from a template. 2037 Deletes the specified recipient file from the specified template. 2038 This method makes a synchronous HTTP request by default. To make an 2039 asynchronous HTTP request, please define a `callback` function 2040 to be invoked when receiving the response. 2041 >>> def callback_function(response): 2042 >>> pprint(response) 2043 >>> 2044 >>> thread = api.delete_recipient(account_id, recipient_id, template_id, callback=callback_function) 2045 2046 :param callback function: The callback function 2047 for asynchronous request. (optional) 2048 :param str account_id: The external account number (int) or account ID Guid. (required) 2049 :param str recipient_id: The ID of the recipient being accessed. (required) 2050 :param str template_id: The ID of the template being accessed. (required) 2051 :param TemplateRecipients template_recipients: 2052 :return: Recipients 2053 If the method is called asynchronously, 2054 returns the request thread. 2055 """ 2056 kwargs['_return_http_data_only'] = True 2057 if kwargs.get('callback'): 2058 return self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs) 2059 else: 2060 (data) = self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs) 2061 return data 2062 2063 def delete_recipient_with_http_info(self, account_id, recipient_id, template_id, **kwargs): 2064 """ 2065 Deletes the specified recipient file from a template. 2066 Deletes the specified recipient file from the specified template. 2067 This method makes a synchronous HTTP request by default. To make an 2068 asynchronous HTTP request, please define a `callback` function 2069 to be invoked when receiving the response. 2070 >>> def callback_function(response): 2071 >>> pprint(response) 2072 >>> 2073 >>> thread = api.delete_recipient_with_http_info(account_id, recipient_id, template_id, callback=callback_function) 2074 2075 :param callback function: The callback function 2076 for asynchronous request. (optional) 2077 :param str account_id: The external account number (int) or account ID Guid. (required) 2078 :param str recipient_id: The ID of the recipient being accessed. (required) 2079 :param str template_id: The ID of the template being accessed. (required) 2080 :param TemplateRecipients template_recipients: 2081 :return: Recipients 2082 If the method is called asynchronously, 2083 returns the request thread. 2084 """ 2085 2086 all_params = ['account_id', 'recipient_id', 'template_id', 'template_recipients'] 2087 all_params.append('callback') 2088 all_params.append('_return_http_data_only') 2089 all_params.append('_preload_content') 2090 all_params.append('_request_timeout') 2091 2092 params = locals() 2093 for key, val in iteritems(params['kwargs']): 2094 if key not in all_params: 2095 raise TypeError( 2096 "Got an unexpected keyword argument '%s'" 2097 " to method delete_recipient" % key 2098 ) 2099 params[key] = val 2100 del params['kwargs'] 2101 # verify the required parameter 'account_id' is set 2102 if ('account_id' not in params) or (params['account_id'] is None): 2103 raise ValueError("Missing the required parameter `account_id` when calling `delete_recipient`") 2104 # verify the required parameter 'recipient_id' is set 2105 if ('recipient_id' not in params) or (params['recipient_id'] is None): 2106 raise ValueError("Missing the required parameter `recipient_id` when calling `delete_recipient`") 2107 # verify the required parameter 'template_id' is set 2108 if ('template_id' not in params) or (params['template_id'] is None): 2109 raise ValueError("Missing the required parameter `template_id` when calling `delete_recipient`") 2110 2111 2112 collection_formats = {} 2113 2114 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}'.replace('{format}', 'json') 2115 path_params = {} 2116 if 'account_id' in params: 2117 path_params['accountId'] = params['account_id'] 2118 if 'recipient_id' in params: 2119 path_params['recipientId'] = params['recipient_id'] 2120 if 'template_id' in params: 2121 path_params['templateId'] = params['template_id'] 2122 2123 query_params = {} 2124 2125 header_params = {} 2126 2127 form_params = [] 2128 local_var_files = {} 2129 2130 body_params = None 2131 if 'template_recipients' in params: 2132 body_params = params['template_recipients'] 2133 # HTTP header `Accept` 2134 header_params['Accept'] = self.api_client.\ 2135 select_header_accept(['application/json']) 2136 2137 # Authentication setting 2138 auth_settings = [] 2139 2140 return self.api_client.call_api(resource_path, 'DELETE', 2141 path_params, 2142 query_params, 2143 header_params, 2144 body=body_params, 2145 post_params=form_params, 2146 files=local_var_files, 2147 response_type='Recipients', 2148 auth_settings=auth_settings, 2149 callback=params.get('callback'), 2150 _return_http_data_only=params.get('_return_http_data_only'), 2151 _preload_content=params.get('_preload_content', True), 2152 _request_timeout=params.get('_request_timeout'), 2153 collection_formats=collection_formats) 2154 2155 def delete_recipients(self, account_id, template_id, **kwargs): 2156 """ 2157 Deletes recipients from a template. 2158 Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients. 2159 This method makes a synchronous HTTP request by default. To make an 2160 asynchronous HTTP request, please define a `callback` function 2161 to be invoked when receiving the response. 2162 >>> def callback_function(response): 2163 >>> pprint(response) 2164 >>> 2165 >>> thread = api.delete_recipients(account_id, template_id, callback=callback_function) 2166 2167 :param callback function: The callback function 2168 for asynchronous request. (optional) 2169 :param str account_id: The external account number (int) or account ID Guid. (required) 2170 :param str template_id: The ID of the template being accessed. (required) 2171 :param TemplateRecipients template_recipients: 2172 :return: Recipients 2173 If the method is called asynchronously, 2174 returns the request thread. 2175 """ 2176 kwargs['_return_http_data_only'] = True 2177 if kwargs.get('callback'): 2178 return self.delete_recipients_with_http_info(account_id, template_id, **kwargs) 2179 else: 2180 (data) = self.delete_recipients_with_http_info(account_id, template_id, **kwargs) 2181 return data 2182 2183 def delete_recipients_with_http_info(self, account_id, template_id, **kwargs): 2184 """ 2185 Deletes recipients from a template. 2186 Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients. 2187 This method makes a synchronous HTTP request by default. To make an 2188 asynchronous HTTP request, please define a `callback` function 2189 to be invoked when receiving the response. 2190 >>> def callback_function(response): 2191 >>> pprint(response) 2192 >>> 2193 >>> thread = api.delete_recipients_with_http_info(account_id, template_id, callback=callback_function) 2194 2195 :param callback function: The callback function 2196 for asynchronous request. (optional) 2197 :param str account_id: The external account number (int) or account ID Guid. (required) 2198 :param str template_id: The ID of the template being accessed. (required) 2199 :param TemplateRecipients template_recipients: 2200 :return: Recipients 2201 If the method is called asynchronously, 2202 returns the request thread. 2203 """ 2204 2205 all_params = ['account_id', 'template_id', 'template_recipients'] 2206 all_params.append('callback') 2207 all_params.append('_return_http_data_only') 2208 all_params.append('_preload_content') 2209 all_params.append('_request_timeout') 2210 2211 params = locals() 2212 for key, val in iteritems(params['kwargs']): 2213 if key not in all_params: 2214 raise TypeError( 2215 "Got an unexpected keyword argument '%s'" 2216 " to method delete_recipients" % key 2217 ) 2218 params[key] = val 2219 del params['kwargs'] 2220 # verify the required parameter 'account_id' is set 2221 if ('account_id' not in params) or (params['account_id'] is None): 2222 raise ValueError("Missing the required parameter `account_id` when calling `delete_recipients`") 2223 # verify the required parameter 'template_id' is set 2224 if ('template_id' not in params) or (params['template_id'] is None): 2225 raise ValueError("Missing the required parameter `template_id` when calling `delete_recipients`") 2226 2227 2228 collection_formats = {} 2229 2230 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json') 2231 path_params = {} 2232 if 'account_id' in params: 2233 path_params['accountId'] = params['account_id'] 2234 if 'template_id' in params: 2235 path_params['templateId'] = params['template_id'] 2236 2237 query_params = {} 2238 2239 header_params = {} 2240 2241 form_params = [] 2242 local_var_files = {} 2243 2244 body_params = None 2245 if 'template_recipients' in params: 2246 body_params = params['template_recipients'] 2247 # HTTP header `Accept` 2248 header_params['Accept'] = self.api_client.\ 2249 select_header_accept(['application/json']) 2250 2251 # Authentication setting 2252 auth_settings = [] 2253 2254 return self.api_client.call_api(resource_path, 'DELETE', 2255 path_params, 2256 query_params, 2257 header_params, 2258 body=body_params, 2259 post_params=form_params, 2260 files=local_var_files, 2261 response_type='Recipients', 2262 auth_settings=auth_settings, 2263 callback=params.get('callback'), 2264 _return_http_data_only=params.get('_return_http_data_only'), 2265 _preload_content=params.get('_preload_content', True), 2266 _request_timeout=params.get('_request_timeout'), 2267 collection_formats=collection_formats) 2268 2269 def delete_tabs(self, account_id, recipient_id, template_id, **kwargs): 2270 """ 2271 Deletes the tabs associated with a recipient in a template. 2272 Deletes one or more tabs associated with a recipient in a template. 2273 This method makes a synchronous HTTP request by default. To make an 2274 asynchronous HTTP request, please define a `callback` function 2275 to be invoked when receiving the response. 2276 >>> def callback_function(response): 2277 >>> pprint(response) 2278 >>> 2279 >>> thread = api.delete_tabs(account_id, recipient_id, template_id, callback=callback_function) 2280 2281 :param callback function: The callback function 2282 for asynchronous request. (optional) 2283 :param str account_id: The external account number (int) or account ID Guid. (required) 2284 :param str recipient_id: The ID of the recipient being accessed. (required) 2285 :param str template_id: The ID of the template being accessed. (required) 2286 :param TemplateTabs template_tabs: 2287 :return: Tabs 2288 If the method is called asynchronously, 2289 returns the request thread. 2290 """ 2291 kwargs['_return_http_data_only'] = True 2292 if kwargs.get('callback'): 2293 return self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 2294 else: 2295 (data) = self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 2296 return data 2297 2298 def delete_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs): 2299 """ 2300 Deletes the tabs associated with a recipient in a template. 2301 Deletes one or more tabs associated with a recipient in a template. 2302 This method makes a synchronous HTTP request by default. To make an 2303 asynchronous HTTP request, please define a `callback` function 2304 to be invoked when receiving the response. 2305 >>> def callback_function(response): 2306 >>> pprint(response) 2307 >>> 2308 >>> thread = api.delete_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function) 2309 2310 :param callback function: The callback function 2311 for asynchronous request. (optional) 2312 :param str account_id: The external account number (int) or account ID Guid. (required) 2313 :param str recipient_id: The ID of the recipient being accessed. (required) 2314 :param str template_id: The ID of the template being accessed. (required) 2315 :param TemplateTabs template_tabs: 2316 :return: Tabs 2317 If the method is called asynchronously, 2318 returns the request thread. 2319 """ 2320 2321 all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs'] 2322 all_params.append('callback') 2323 all_params.append('_return_http_data_only') 2324 all_params.append('_preload_content') 2325 all_params.append('_request_timeout') 2326 2327 params = locals() 2328 for key, val in iteritems(params['kwargs']): 2329 if key not in all_params: 2330 raise TypeError( 2331 "Got an unexpected keyword argument '%s'" 2332 " to method delete_tabs" % key 2333 ) 2334 params[key] = val 2335 del params['kwargs'] 2336 # verify the required parameter 'account_id' is set 2337 if ('account_id' not in params) or (params['account_id'] is None): 2338 raise ValueError("Missing the required parameter `account_id` when calling `delete_tabs`") 2339 # verify the required parameter 'recipient_id' is set 2340 if ('recipient_id' not in params) or (params['recipient_id'] is None): 2341 raise ValueError("Missing the required parameter `recipient_id` when calling `delete_tabs`") 2342 # verify the required parameter 'template_id' is set 2343 if ('template_id' not in params) or (params['template_id'] is None): 2344 raise ValueError("Missing the required parameter `template_id` when calling `delete_tabs`") 2345 2346 2347 collection_formats = {} 2348 2349 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json') 2350 path_params = {} 2351 if 'account_id' in params: 2352 path_params['accountId'] = params['account_id'] 2353 if 'recipient_id' in params: 2354 path_params['recipientId'] = params['recipient_id'] 2355 if 'template_id' in params: 2356 path_params['templateId'] = params['template_id'] 2357 2358 query_params = {} 2359 2360 header_params = {} 2361 2362 form_params = [] 2363 local_var_files = {} 2364 2365 body_params = None 2366 if 'template_tabs' in params: 2367 body_params = params['template_tabs'] 2368 # HTTP header `Accept` 2369 header_params['Accept'] = self.api_client.\ 2370 select_header_accept(['application/json']) 2371 2372 # Authentication setting 2373 auth_settings = [] 2374 2375 return self.api_client.call_api(resource_path, 'DELETE', 2376 path_params, 2377 query_params, 2378 header_params, 2379 body=body_params, 2380 post_params=form_params, 2381 files=local_var_files, 2382 response_type='Tabs', 2383 auth_settings=auth_settings, 2384 callback=params.get('callback'), 2385 _return_http_data_only=params.get('_return_http_data_only'), 2386 _preload_content=params.get('_preload_content', True), 2387 _request_timeout=params.get('_request_timeout'), 2388 collection_formats=collection_formats) 2389 2390 def delete_template_document_tabs(self, account_id, document_id, template_id, **kwargs): 2391 """ 2392 Deletes tabs from an envelope document 2393 Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 2394 This method makes a synchronous HTTP request by default. To make an 2395 asynchronous HTTP request, please define a `callback` function 2396 to be invoked when receiving the response. 2397 >>> def callback_function(response): 2398 >>> pprint(response) 2399 >>> 2400 >>> thread = api.delete_template_document_tabs(account_id, document_id, template_id, callback=callback_function) 2401 2402 :param callback function: The callback function 2403 for asynchronous request. (optional) 2404 :param str account_id: The external account number (int) or account ID Guid. (required) 2405 :param str document_id: The ID of the document being accessed. (required) 2406 :param str template_id: The ID of the template being accessed. (required) 2407 :param TemplateTabs template_tabs: 2408 :return: Tabs 2409 If the method is called asynchronously, 2410 returns the request thread. 2411 """ 2412 kwargs['_return_http_data_only'] = True 2413 if kwargs.get('callback'): 2414 return self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 2415 else: 2416 (data) = self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 2417 return data 2418 2419 def delete_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs): 2420 """ 2421 Deletes tabs from an envelope document 2422 Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 2423 This method makes a synchronous HTTP request by default. To make an 2424 asynchronous HTTP request, please define a `callback` function 2425 to be invoked when receiving the response. 2426 >>> def callback_function(response): 2427 >>> pprint(response) 2428 >>> 2429 >>> thread = api.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function) 2430 2431 :param callback function: The callback function 2432 for asynchronous request. (optional) 2433 :param str account_id: The external account number (int) or account ID Guid. (required) 2434 :param str document_id: The ID of the document being accessed. (required) 2435 :param str template_id: The ID of the template being accessed. (required) 2436 :param TemplateTabs template_tabs: 2437 :return: Tabs 2438 If the method is called asynchronously, 2439 returns the request thread. 2440 """ 2441 2442 all_params = ['account_id', 'document_id', 'template_id', 'template_tabs'] 2443 all_params.append('callback') 2444 all_params.append('_return_http_data_only') 2445 all_params.append('_preload_content') 2446 all_params.append('_request_timeout') 2447 2448 params = locals() 2449 for key, val in iteritems(params['kwargs']): 2450 if key not in all_params: 2451 raise TypeError( 2452 "Got an unexpected keyword argument '%s'" 2453 " to method delete_template_document_tabs" % key 2454 ) 2455 params[key] = val 2456 del params['kwargs'] 2457 # verify the required parameter 'account_id' is set 2458 if ('account_id' not in params) or (params['account_id'] is None): 2459 raise ValueError("Missing the required parameter `account_id` when calling `delete_template_document_tabs`") 2460 # verify the required parameter 'document_id' is set 2461 if ('document_id' not in params) or (params['document_id'] is None): 2462 raise ValueError("Missing the required parameter `document_id` when calling `delete_template_document_tabs`") 2463 # verify the required parameter 'template_id' is set 2464 if ('template_id' not in params) or (params['template_id'] is None): 2465 raise ValueError("Missing the required parameter `template_id` when calling `delete_template_document_tabs`") 2466 2467 2468 collection_formats = {} 2469 2470 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json') 2471 path_params = {} 2472 if 'account_id' in params: 2473 path_params['accountId'] = params['account_id'] 2474 if 'document_id' in params: 2475 path_params['documentId'] = params['document_id'] 2476 if 'template_id' in params: 2477 path_params['templateId'] = params['template_id'] 2478 2479 query_params = {} 2480 2481 header_params = {} 2482 2483 form_params = [] 2484 local_var_files = {} 2485 2486 body_params = None 2487 if 'template_tabs' in params: 2488 body_params = params['template_tabs'] 2489 # HTTP header `Accept` 2490 header_params['Accept'] = self.api_client.\ 2491 select_header_accept(['application/json']) 2492 2493 # Authentication setting 2494 auth_settings = [] 2495 2496 return self.api_client.call_api(resource_path, 'DELETE', 2497 path_params, 2498 query_params, 2499 header_params, 2500 body=body_params, 2501 post_params=form_params, 2502 files=local_var_files, 2503 response_type='Tabs', 2504 auth_settings=auth_settings, 2505 callback=params.get('callback'), 2506 _return_http_data_only=params.get('_return_http_data_only'), 2507 _preload_content=params.get('_preload_content', True), 2508 _request_timeout=params.get('_request_timeout'), 2509 collection_formats=collection_formats) 2510 2511 def get(self, account_id, template_id, **kwargs): 2512 """ 2513 Gets a list of templates for a specified account. 2514 Retrieves the definition of the specified template. 2515 This method makes a synchronous HTTP request by default. To make an 2516 asynchronous HTTP request, please define a `callback` function 2517 to be invoked when receiving the response. 2518 >>> def callback_function(response): 2519 >>> pprint(response) 2520 >>> 2521 >>> thread = api.get(account_id, template_id, callback=callback_function) 2522 2523 :param callback function: The callback function 2524 for asynchronous request. (optional) 2525 :param str account_id: The external account number (int) or account ID Guid. (required) 2526 :param str template_id: The ID of the template being accessed. (required) 2527 :param str include: 2528 :return: EnvelopeTemplate 2529 If the method is called asynchronously, 2530 returns the request thread. 2531 """ 2532 kwargs['_return_http_data_only'] = True 2533 if kwargs.get('callback'): 2534 return self.get_with_http_info(account_id, template_id, **kwargs) 2535 else: 2536 (data) = self.get_with_http_info(account_id, template_id, **kwargs) 2537 return data 2538 2539 def get_with_http_info(self, account_id, template_id, **kwargs): 2540 """ 2541 Gets a list of templates for a specified account. 2542 Retrieves the definition of the specified template. 2543 This method makes a synchronous HTTP request by default. To make an 2544 asynchronous HTTP request, please define a `callback` function 2545 to be invoked when receiving the response. 2546 >>> def callback_function(response): 2547 >>> pprint(response) 2548 >>> 2549 >>> thread = api.get_with_http_info(account_id, template_id, callback=callback_function) 2550 2551 :param callback function: The callback function 2552 for asynchronous request. (optional) 2553 :param str account_id: The external account number (int) or account ID Guid. (required) 2554 :param str template_id: The ID of the template being accessed. (required) 2555 :param str include: 2556 :return: EnvelopeTemplate 2557 If the method is called asynchronously, 2558 returns the request thread. 2559 """ 2560 2561 all_params = ['account_id', 'template_id', 'include'] 2562 all_params.append('callback') 2563 all_params.append('_return_http_data_only') 2564 all_params.append('_preload_content') 2565 all_params.append('_request_timeout') 2566 2567 params = locals() 2568 for key, val in iteritems(params['kwargs']): 2569 if key not in all_params: 2570 raise TypeError( 2571 "Got an unexpected keyword argument '%s'" 2572 " to method get" % key 2573 ) 2574 params[key] = val 2575 del params['kwargs'] 2576 # verify the required parameter 'account_id' is set 2577 if ('account_id' not in params) or (params['account_id'] is None): 2578 raise ValueError("Missing the required parameter `account_id` when calling `get`") 2579 # verify the required parameter 'template_id' is set 2580 if ('template_id' not in params) or (params['template_id'] is None): 2581 raise ValueError("Missing the required parameter `template_id` when calling `get`") 2582 2583 2584 collection_formats = {} 2585 2586 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json') 2587 path_params = {} 2588 if 'account_id' in params: 2589 path_params['accountId'] = params['account_id'] 2590 if 'template_id' in params: 2591 path_params['templateId'] = params['template_id'] 2592 2593 query_params = {} 2594 if 'include' in params: 2595 query_params['include'] = params['include'] 2596 2597 header_params = {} 2598 2599 form_params = [] 2600 local_var_files = {} 2601 2602 body_params = None 2603 # HTTP header `Accept` 2604 header_params['Accept'] = self.api_client.\ 2605 select_header_accept(['application/json']) 2606 2607 # Authentication setting 2608 auth_settings = [] 2609 2610 return self.api_client.call_api(resource_path, 'GET', 2611 path_params, 2612 query_params, 2613 header_params, 2614 body=body_params, 2615 post_params=form_params, 2616 files=local_var_files, 2617 response_type='EnvelopeTemplate', 2618 auth_settings=auth_settings, 2619 callback=params.get('callback'), 2620 _return_http_data_only=params.get('_return_http_data_only'), 2621 _preload_content=params.get('_preload_content', True), 2622 _request_timeout=params.get('_request_timeout'), 2623 collection_formats=collection_formats) 2624 2625 def get_document(self, account_id, document_id, template_id, **kwargs): 2626 """ 2627 Gets PDF documents from a template. 2628 Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf. 2629 This method makes a synchronous HTTP request by default. To make an 2630 asynchronous HTTP request, please define a `callback` function 2631 to be invoked when receiving the response. 2632 >>> def callback_function(response): 2633 >>> pprint(response) 2634 >>> 2635 >>> thread = api.get_document(account_id, document_id, template_id, callback=callback_function) 2636 2637 :param callback function: The callback function 2638 for asynchronous request. (optional) 2639 :param str account_id: The external account number (int) or account ID Guid. (required) 2640 :param str document_id: The ID of the document being accessed. (required) 2641 :param str template_id: The ID of the template being accessed. (required) 2642 :param str encrypt: 2643 :param str file_type: 2644 :param str show_changes: 2645 :return: file 2646 If the method is called asynchronously, 2647 returns the request thread. 2648 """ 2649 kwargs['_return_http_data_only'] = True 2650 if kwargs.get('callback'): 2651 return self.get_document_with_http_info(account_id, document_id, template_id, **kwargs) 2652 else: 2653 (data) = self.get_document_with_http_info(account_id, document_id, template_id, **kwargs) 2654 return data 2655 2656 def get_document_with_http_info(self, account_id, document_id, template_id, **kwargs): 2657 """ 2658 Gets PDF documents from a template. 2659 Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf. 2660 This method makes a synchronous HTTP request by default. To make an 2661 asynchronous HTTP request, please define a `callback` function 2662 to be invoked when receiving the response. 2663 >>> def callback_function(response): 2664 >>> pprint(response) 2665 >>> 2666 >>> thread = api.get_document_with_http_info(account_id, document_id, template_id, callback=callback_function) 2667 2668 :param callback function: The callback function 2669 for asynchronous request. (optional) 2670 :param str account_id: The external account number (int) or account ID Guid. (required) 2671 :param str document_id: The ID of the document being accessed. (required) 2672 :param str template_id: The ID of the template being accessed. (required) 2673 :param str encrypt: 2674 :param str file_type: 2675 :param str show_changes: 2676 :return: file 2677 If the method is called asynchronously, 2678 returns the request thread. 2679 """ 2680 2681 all_params = ['account_id', 'document_id', 'template_id', 'encrypt', 'file_type', 'show_changes'] 2682 all_params.append('callback') 2683 all_params.append('_return_http_data_only') 2684 all_params.append('_preload_content') 2685 all_params.append('_request_timeout') 2686 2687 params = locals() 2688 for key, val in iteritems(params['kwargs']): 2689 if key not in all_params: 2690 raise TypeError( 2691 "Got an unexpected keyword argument '%s'" 2692 " to method get_document" % key 2693 ) 2694 params[key] = val 2695 del params['kwargs'] 2696 # verify the required parameter 'account_id' is set 2697 if ('account_id' not in params) or (params['account_id'] is None): 2698 raise ValueError("Missing the required parameter `account_id` when calling `get_document`") 2699 # verify the required parameter 'document_id' is set 2700 if ('document_id' not in params) or (params['document_id'] is None): 2701 raise ValueError("Missing the required parameter `document_id` when calling `get_document`") 2702 # verify the required parameter 'template_id' is set 2703 if ('template_id' not in params) or (params['template_id'] is None): 2704 raise ValueError("Missing the required parameter `template_id` when calling `get_document`") 2705 2706 2707 collection_formats = {} 2708 2709 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json') 2710 path_params = {} 2711 if 'account_id' in params: 2712 path_params['accountId'] = params['account_id'] 2713 if 'document_id' in params: 2714 path_params['documentId'] = params['document_id'] 2715 if 'template_id' in params: 2716 path_params['templateId'] = params['template_id'] 2717 2718 query_params = {} 2719 if 'encrypt' in params: 2720 query_params['encrypt'] = params['encrypt'] 2721 if 'file_type' in params: 2722 query_params['file_type'] = params['file_type'] 2723 if 'show_changes' in params: 2724 query_params['show_changes'] = params['show_changes'] 2725 2726 header_params = {} 2727 2728 form_params = [] 2729 local_var_files = {} 2730 2731 body_params = None 2732 # HTTP header `Accept` 2733 header_params['Accept'] = self.api_client.\ 2734 select_header_accept(['application/pdf']) 2735 2736 # Authentication setting 2737 auth_settings = [] 2738 2739 return self.api_client.call_api(resource_path, 'GET', 2740 path_params, 2741 query_params, 2742 header_params, 2743 body=body_params, 2744 post_params=form_params, 2745 files=local_var_files, 2746 response_type='file', 2747 auth_settings=auth_settings, 2748 callback=params.get('callback'), 2749 _return_http_data_only=params.get('_return_http_data_only'), 2750 _preload_content=params.get('_preload_content', True), 2751 _request_timeout=params.get('_request_timeout'), 2752 collection_formats=collection_formats) 2753 2754 def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs): 2755 """ 2756 Gets a page image from a template for display. 2757 Retrieves a page image for display from the specified template. 2758 This method makes a synchronous HTTP request by default. To make an 2759 asynchronous HTTP request, please define a `callback` function 2760 to be invoked when receiving the response. 2761 >>> def callback_function(response): 2762 >>> pprint(response) 2763 >>> 2764 >>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function) 2765 2766 :param callback function: The callback function 2767 for asynchronous request. (optional) 2768 :param str account_id: The external account number (int) or account ID Guid. (required) 2769 :param str document_id: The ID of the document being accessed. (required) 2770 :param str page_number: The page number being accessed. (required) 2771 :param str template_id: The ID of the template being accessed. (required) 2772 :param str dpi: 2773 :param str max_height: 2774 :param str max_width: 2775 :param str show_changes: 2776 :return: file 2777 If the method is called asynchronously, 2778 returns the request thread. 2779 """ 2780 kwargs['_return_http_data_only'] = True 2781 if kwargs.get('callback'): 2782 return self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 2783 else: 2784 (data) = self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 2785 return data 2786 2787 def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs): 2788 """ 2789 Gets a page image from a template for display. 2790 Retrieves a page image for display from the specified template. 2791 This method makes a synchronous HTTP request by default. To make an 2792 asynchronous HTTP request, please define a `callback` function 2793 to be invoked when receiving the response. 2794 >>> def callback_function(response): 2795 >>> pprint(response) 2796 >>> 2797 >>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function) 2798 2799 :param callback function: The callback function 2800 for asynchronous request. (optional) 2801 :param str account_id: The external account number (int) or account ID Guid. (required) 2802 :param str document_id: The ID of the document being accessed. (required) 2803 :param str page_number: The page number being accessed. (required) 2804 :param str template_id: The ID of the template being accessed. (required) 2805 :param str dpi: 2806 :param str max_height: 2807 :param str max_width: 2808 :param str show_changes: 2809 :return: file 2810 If the method is called asynchronously, 2811 returns the request thread. 2812 """ 2813 2814 all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'dpi', 'max_height', 'max_width', 'show_changes'] 2815 all_params.append('callback') 2816 all_params.append('_return_http_data_only') 2817 all_params.append('_preload_content') 2818 all_params.append('_request_timeout') 2819 2820 params = locals() 2821 for key, val in iteritems(params['kwargs']): 2822 if key not in all_params: 2823 raise TypeError( 2824 "Got an unexpected keyword argument '%s'" 2825 " to method get_document_page_image" % key 2826 ) 2827 params[key] = val 2828 del params['kwargs'] 2829 # verify the required parameter 'account_id' is set 2830 if ('account_id' not in params) or (params['account_id'] is None): 2831 raise ValueError("Missing the required parameter `account_id` when calling `get_document_page_image`") 2832 # verify the required parameter 'document_id' is set 2833 if ('document_id' not in params) or (params['document_id'] is None): 2834 raise ValueError("Missing the required parameter `document_id` when calling `get_document_page_image`") 2835 # verify the required parameter 'page_number' is set 2836 if ('page_number' not in params) or (params['page_number'] is None): 2837 raise ValueError("Missing the required parameter `page_number` when calling `get_document_page_image`") 2838 # verify the required parameter 'template_id' is set 2839 if ('template_id' not in params) or (params['template_id'] is None): 2840 raise ValueError("Missing the required parameter `template_id` when calling `get_document_page_image`") 2841 2842 2843 collection_formats = {} 2844 2845 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json') 2846 path_params = {} 2847 if 'account_id' in params: 2848 path_params['accountId'] = params['account_id'] 2849 if 'document_id' in params: 2850 path_params['documentId'] = params['document_id'] 2851 if 'page_number' in params: 2852 path_params['pageNumber'] = params['page_number'] 2853 if 'template_id' in params: 2854 path_params['templateId'] = params['template_id'] 2855 2856 query_params = {} 2857 if 'dpi' in params: 2858 query_params['dpi'] = params['dpi'] 2859 if 'max_height' in params: 2860 query_params['max_height'] = params['max_height'] 2861 if 'max_width' in params: 2862 query_params['max_width'] = params['max_width'] 2863 if 'show_changes' in params: 2864 query_params['show_changes'] = params['show_changes'] 2865 2866 header_params = {} 2867 2868 form_params = [] 2869 local_var_files = {} 2870 2871 body_params = None 2872 # HTTP header `Accept` 2873 header_params['Accept'] = self.api_client.\ 2874 select_header_accept(['image/png']) 2875 2876 # Authentication setting 2877 auth_settings = [] 2878 2879 return self.api_client.call_api(resource_path, 'GET', 2880 path_params, 2881 query_params, 2882 header_params, 2883 body=body_params, 2884 post_params=form_params, 2885 files=local_var_files, 2886 response_type='file', 2887 auth_settings=auth_settings, 2888 callback=params.get('callback'), 2889 _return_http_data_only=params.get('_return_http_data_only'), 2890 _preload_content=params.get('_preload_content', True), 2891 _request_timeout=params.get('_request_timeout'), 2892 collection_formats=collection_formats) 2893 2894 def get_document_tabs(self, account_id, document_id, template_id, **kwargs): 2895 """ 2896 Returns tabs on the document. 2897 Returns the tabs on the document specified by `documentId` in the template specified by `templateId`. 2898 This method makes a synchronous HTTP request by default. To make an 2899 asynchronous HTTP request, please define a `callback` function 2900 to be invoked when receiving the response. 2901 >>> def callback_function(response): 2902 >>> pprint(response) 2903 >>> 2904 >>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function) 2905 2906 :param callback function: The callback function 2907 for asynchronous request. (optional) 2908 :param str account_id: The external account number (int) or account ID Guid. (required) 2909 :param str document_id: The ID of the document being accessed. (required) 2910 :param str template_id: The ID of the template being accessed. (required) 2911 :param str page_numbers: 2912 :return: Tabs 2913 If the method is called asynchronously, 2914 returns the request thread. 2915 """ 2916 kwargs['_return_http_data_only'] = True 2917 if kwargs.get('callback'): 2918 return self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 2919 else: 2920 (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 2921 return data 2922 2923 def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs): 2924 """ 2925 Returns tabs on the document. 2926 Returns the tabs on the document specified by `documentId` in the template specified by `templateId`. 2927 This method makes a synchronous HTTP request by default. To make an 2928 asynchronous HTTP request, please define a `callback` function 2929 to be invoked when receiving the response. 2930 >>> def callback_function(response): 2931 >>> pprint(response) 2932 >>> 2933 >>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function) 2934 2935 :param callback function: The callback function 2936 for asynchronous request. (optional) 2937 :param str account_id: The external account number (int) or account ID Guid. (required) 2938 :param str document_id: The ID of the document being accessed. (required) 2939 :param str template_id: The ID of the template being accessed. (required) 2940 :param str page_numbers: 2941 :return: Tabs 2942 If the method is called asynchronously, 2943 returns the request thread. 2944 """ 2945 2946 all_params = ['account_id', 'document_id', 'template_id', 'page_numbers'] 2947 all_params.append('callback') 2948 all_params.append('_return_http_data_only') 2949 all_params.append('_preload_content') 2950 all_params.append('_request_timeout') 2951 2952 params = locals() 2953 for key, val in iteritems(params['kwargs']): 2954 if key not in all_params: 2955 raise TypeError( 2956 "Got an unexpected keyword argument '%s'" 2957 " to method get_document_tabs" % key 2958 ) 2959 params[key] = val 2960 del params['kwargs'] 2961 # verify the required parameter 'account_id' is set 2962 if ('account_id' not in params) or (params['account_id'] is None): 2963 raise ValueError("Missing the required parameter `account_id` when calling `get_document_tabs`") 2964 # verify the required parameter 'document_id' is set 2965 if ('document_id' not in params) or (params['document_id'] is None): 2966 raise ValueError("Missing the required parameter `document_id` when calling `get_document_tabs`") 2967 # verify the required parameter 'template_id' is set 2968 if ('template_id' not in params) or (params['template_id'] is None): 2969 raise ValueError("Missing the required parameter `template_id` when calling `get_document_tabs`") 2970 2971 2972 collection_formats = {} 2973 2974 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json') 2975 path_params = {} 2976 if 'account_id' in params: 2977 path_params['accountId'] = params['account_id'] 2978 if 'document_id' in params: 2979 path_params['documentId'] = params['document_id'] 2980 if 'template_id' in params: 2981 path_params['templateId'] = params['template_id'] 2982 2983 query_params = {} 2984 if 'page_numbers' in params: 2985 query_params['page_numbers'] = params['page_numbers'] 2986 2987 header_params = {} 2988 2989 form_params = [] 2990 local_var_files = {} 2991 2992 body_params = None 2993 # HTTP header `Accept` 2994 header_params['Accept'] = self.api_client.\ 2995 select_header_accept(['application/json']) 2996 2997 # Authentication setting 2998 auth_settings = [] 2999 3000 return self.api_client.call_api(resource_path, 'GET', 3001 path_params, 3002 query_params, 3003 header_params, 3004 body=body_params, 3005 post_params=form_params, 3006 files=local_var_files, 3007 response_type='Tabs', 3008 auth_settings=auth_settings, 3009 callback=params.get('callback'), 3010 _return_http_data_only=params.get('_return_http_data_only'), 3011 _preload_content=params.get('_preload_content', True), 3012 _request_timeout=params.get('_request_timeout'), 3013 collection_formats=collection_formats) 3014 3015 def get_lock(self, account_id, template_id, **kwargs): 3016 """ 3017 Gets template lock information. 3018 Retrieves general information about the template lock. If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. 3019 This method makes a synchronous HTTP request by default. To make an 3020 asynchronous HTTP request, please define a `callback` function 3021 to be invoked when receiving the response. 3022 >>> def callback_function(response): 3023 >>> pprint(response) 3024 >>> 3025 >>> thread = api.get_lock(account_id, template_id, callback=callback_function) 3026 3027 :param callback function: The callback function 3028 for asynchronous request. (optional) 3029 :param str account_id: The external account number (int) or account ID Guid. (required) 3030 :param str template_id: The ID of the template being accessed. (required) 3031 :return: LockInformation 3032 If the method is called asynchronously, 3033 returns the request thread. 3034 """ 3035 kwargs['_return_http_data_only'] = True 3036 if kwargs.get('callback'): 3037 return self.get_lock_with_http_info(account_id, template_id, **kwargs) 3038 else: 3039 (data) = self.get_lock_with_http_info(account_id, template_id, **kwargs) 3040 return data 3041 3042 def get_lock_with_http_info(self, account_id, template_id, **kwargs): 3043 """ 3044 Gets template lock information. 3045 Retrieves general information about the template lock. If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. 3046 This method makes a synchronous HTTP request by default. To make an 3047 asynchronous HTTP request, please define a `callback` function 3048 to be invoked when receiving the response. 3049 >>> def callback_function(response): 3050 >>> pprint(response) 3051 >>> 3052 >>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function) 3053 3054 :param callback function: The callback function 3055 for asynchronous request. (optional) 3056 :param str account_id: The external account number (int) or account ID Guid. (required) 3057 :param str template_id: The ID of the template being accessed. (required) 3058 :return: LockInformation 3059 If the method is called asynchronously, 3060 returns the request thread. 3061 """ 3062 3063 all_params = ['account_id', 'template_id'] 3064 all_params.append('callback') 3065 all_params.append('_return_http_data_only') 3066 all_params.append('_preload_content') 3067 all_params.append('_request_timeout') 3068 3069 params = locals() 3070 for key, val in iteritems(params['kwargs']): 3071 if key not in all_params: 3072 raise TypeError( 3073 "Got an unexpected keyword argument '%s'" 3074 " to method get_lock" % key 3075 ) 3076 params[key] = val 3077 del params['kwargs'] 3078 # verify the required parameter 'account_id' is set 3079 if ('account_id' not in params) or (params['account_id'] is None): 3080 raise ValueError("Missing the required parameter `account_id` when calling `get_lock`") 3081 # verify the required parameter 'template_id' is set 3082 if ('template_id' not in params) or (params['template_id'] is None): 3083 raise ValueError("Missing the required parameter `template_id` when calling `get_lock`") 3084 3085 3086 collection_formats = {} 3087 3088 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json') 3089 path_params = {} 3090 if 'account_id' in params: 3091 path_params['accountId'] = params['account_id'] 3092 if 'template_id' in params: 3093 path_params['templateId'] = params['template_id'] 3094 3095 query_params = {} 3096 3097 header_params = {} 3098 3099 form_params = [] 3100 local_var_files = {} 3101 3102 body_params = None 3103 # HTTP header `Accept` 3104 header_params['Accept'] = self.api_client.\ 3105 select_header_accept(['application/json']) 3106 3107 # Authentication setting 3108 auth_settings = [] 3109 3110 return self.api_client.call_api(resource_path, 'GET', 3111 path_params, 3112 query_params, 3113 header_params, 3114 body=body_params, 3115 post_params=form_params, 3116 files=local_var_files, 3117 response_type='LockInformation', 3118 auth_settings=auth_settings, 3119 callback=params.get('callback'), 3120 _return_http_data_only=params.get('_return_http_data_only'), 3121 _preload_content=params.get('_preload_content', True), 3122 _request_timeout=params.get('_request_timeout'), 3123 collection_formats=collection_formats) 3124 3125 def get_notification_settings(self, account_id, template_id, **kwargs): 3126 """ 3127 Gets template notification information. 3128 Retrieves the envelope notification, reminders and expirations, information for an existing template. 3129 This method makes a synchronous HTTP request by default. To make an 3130 asynchronous HTTP request, please define a `callback` function 3131 to be invoked when receiving the response. 3132 >>> def callback_function(response): 3133 >>> pprint(response) 3134 >>> 3135 >>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function) 3136 3137 :param callback function: The callback function 3138 for asynchronous request. (optional) 3139 :param str account_id: The external account number (int) or account ID Guid. (required) 3140 :param str template_id: The ID of the template being accessed. (required) 3141 :return: Notification 3142 If the method is called asynchronously, 3143 returns the request thread. 3144 """ 3145 kwargs['_return_http_data_only'] = True 3146 if kwargs.get('callback'): 3147 return self.get_notification_settings_with_http_info(account_id, template_id, **kwargs) 3148 else: 3149 (data) = self.get_notification_settings_with_http_info(account_id, template_id, **kwargs) 3150 return data 3151 3152 def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs): 3153 """ 3154 Gets template notification information. 3155 Retrieves the envelope notification, reminders and expirations, information for an existing template. 3156 This method makes a synchronous HTTP request by default. To make an 3157 asynchronous HTTP request, please define a `callback` function 3158 to be invoked when receiving the response. 3159 >>> def callback_function(response): 3160 >>> pprint(response) 3161 >>> 3162 >>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function) 3163 3164 :param callback function: The callback function 3165 for asynchronous request. (optional) 3166 :param str account_id: The external account number (int) or account ID Guid. (required) 3167 :param str template_id: The ID of the template being accessed. (required) 3168 :return: Notification 3169 If the method is called asynchronously, 3170 returns the request thread. 3171 """ 3172 3173 all_params = ['account_id', 'template_id'] 3174 all_params.append('callback') 3175 all_params.append('_return_http_data_only') 3176 all_params.append('_preload_content') 3177 all_params.append('_request_timeout') 3178 3179 params = locals() 3180 for key, val in iteritems(params['kwargs']): 3181 if key not in all_params: 3182 raise TypeError( 3183 "Got an unexpected keyword argument '%s'" 3184 " to method get_notification_settings" % key 3185 ) 3186 params[key] = val 3187 del params['kwargs'] 3188 # verify the required parameter 'account_id' is set 3189 if ('account_id' not in params) or (params['account_id'] is None): 3190 raise ValueError("Missing the required parameter `account_id` when calling `get_notification_settings`") 3191 # verify the required parameter 'template_id' is set 3192 if ('template_id' not in params) or (params['template_id'] is None): 3193 raise ValueError("Missing the required parameter `template_id` when calling `get_notification_settings`") 3194 3195 3196 collection_formats = {} 3197 3198 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json') 3199 path_params = {} 3200 if 'account_id' in params: 3201 path_params['accountId'] = params['account_id'] 3202 if 'template_id' in params: 3203 path_params['templateId'] = params['template_id'] 3204 3205 query_params = {} 3206 3207 header_params = {} 3208 3209 form_params = [] 3210 local_var_files = {} 3211 3212 body_params = None 3213 # HTTP header `Accept` 3214 header_params['Accept'] = self.api_client.\ 3215 select_header_accept(['application/json']) 3216 3217 # Authentication setting 3218 auth_settings = [] 3219 3220 return self.api_client.call_api(resource_path, 'GET', 3221 path_params, 3222 query_params, 3223 header_params, 3224 body=body_params, 3225 post_params=form_params, 3226 files=local_var_files, 3227 response_type='Notification', 3228 auth_settings=auth_settings, 3229 callback=params.get('callback'), 3230 _return_http_data_only=params.get('_return_http_data_only'), 3231 _preload_content=params.get('_preload_content', True), 3232 _request_timeout=params.get('_request_timeout'), 3233 collection_formats=collection_formats) 3234 3235 def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs): 3236 """ 3237 Returns tabs on the specified page. 3238 Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 3239 This method makes a synchronous HTTP request by default. To make an 3240 asynchronous HTTP request, please define a `callback` function 3241 to be invoked when receiving the response. 3242 >>> def callback_function(response): 3243 >>> pprint(response) 3244 >>> 3245 >>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function) 3246 3247 :param callback function: The callback function 3248 for asynchronous request. (optional) 3249 :param str account_id: The external account number (int) or account ID Guid. (required) 3250 :param str document_id: The ID of the document being accessed. (required) 3251 :param str page_number: The page number being accessed. (required) 3252 :param str template_id: The ID of the template being accessed. (required) 3253 :return: Tabs 3254 If the method is called asynchronously, 3255 returns the request thread. 3256 """ 3257 kwargs['_return_http_data_only'] = True 3258 if kwargs.get('callback'): 3259 return self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 3260 else: 3261 (data) = self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 3262 return data 3263 3264 def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs): 3265 """ 3266 Returns tabs on the specified page. 3267 Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 3268 This method makes a synchronous HTTP request by default. To make an 3269 asynchronous HTTP request, please define a `callback` function 3270 to be invoked when receiving the response. 3271 >>> def callback_function(response): 3272 >>> pprint(response) 3273 >>> 3274 >>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function) 3275 3276 :param callback function: The callback function 3277 for asynchronous request. (optional) 3278 :param str account_id: The external account number (int) or account ID Guid. (required) 3279 :param str document_id: The ID of the document being accessed. (required) 3280 :param str page_number: The page number being accessed. (required) 3281 :param str template_id: The ID of the template being accessed. (required) 3282 :return: Tabs 3283 If the method is called asynchronously, 3284 returns the request thread. 3285 """ 3286 3287 all_params = ['account_id', 'document_id', 'page_number', 'template_id'] 3288 all_params.append('callback') 3289 all_params.append('_return_http_data_only') 3290 all_params.append('_preload_content') 3291 all_params.append('_request_timeout') 3292 3293 params = locals() 3294 for key, val in iteritems(params['kwargs']): 3295 if key not in all_params: 3296 raise TypeError( 3297 "Got an unexpected keyword argument '%s'" 3298 " to method get_page_tabs" % key 3299 ) 3300 params[key] = val 3301 del params['kwargs'] 3302 # verify the required parameter 'account_id' is set 3303 if ('account_id' not in params) or (params['account_id'] is None): 3304 raise ValueError("Missing the required parameter `account_id` when calling `get_page_tabs`") 3305 # verify the required parameter 'document_id' is set 3306 if ('document_id' not in params) or (params['document_id'] is None): 3307 raise ValueError("Missing the required parameter `document_id` when calling `get_page_tabs`") 3308 # verify the required parameter 'page_number' is set 3309 if ('page_number' not in params) or (params['page_number'] is None): 3310 raise ValueError("Missing the required parameter `page_number` when calling `get_page_tabs`") 3311 # verify the required parameter 'template_id' is set 3312 if ('template_id' not in params) or (params['template_id'] is None): 3313 raise ValueError("Missing the required parameter `template_id` when calling `get_page_tabs`") 3314 3315 3316 collection_formats = {} 3317 3318 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs'.replace('{format}', 'json') 3319 path_params = {} 3320 if 'account_id' in params: 3321 path_params['accountId'] = params['account_id'] 3322 if 'document_id' in params: 3323 path_params['documentId'] = params['document_id'] 3324 if 'page_number' in params: 3325 path_params['pageNumber'] = params['page_number'] 3326 if 'template_id' in params: 3327 path_params['templateId'] = params['template_id'] 3328 3329 query_params = {} 3330 3331 header_params = {} 3332 3333 form_params = [] 3334 local_var_files = {} 3335 3336 body_params = None 3337 # HTTP header `Accept` 3338 header_params['Accept'] = self.api_client.\ 3339 select_header_accept(['application/json']) 3340 3341 # Authentication setting 3342 auth_settings = [] 3343 3344 return self.api_client.call_api(resource_path, 'GET', 3345 path_params, 3346 query_params, 3347 header_params, 3348 body=body_params, 3349 post_params=form_params, 3350 files=local_var_files, 3351 response_type='Tabs', 3352 auth_settings=auth_settings, 3353 callback=params.get('callback'), 3354 _return_http_data_only=params.get('_return_http_data_only'), 3355 _preload_content=params.get('_preload_content', True), 3356 _request_timeout=params.get('_request_timeout'), 3357 collection_formats=collection_formats) 3358 3359 def get_pages(self, account_id, document_id, template_id, **kwargs): 3360 """ 3361 Returns document page image(s) based on input. 3362 Returns images of the pages in a template document for display based on the parameters that you specify. 3363 This method makes a synchronous HTTP request by default. To make an 3364 asynchronous HTTP request, please define a `callback` function 3365 to be invoked when receiving the response. 3366 >>> def callback_function(response): 3367 >>> pprint(response) 3368 >>> 3369 >>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function) 3370 3371 :param callback function: The callback function 3372 for asynchronous request. (optional) 3373 :param str account_id: The external account number (int) or account ID Guid. (required) 3374 :param str document_id: The ID of the document being accessed. (required) 3375 :param str template_id: The ID of the template being accessed. (required) 3376 :param str count: 3377 :param str dpi: 3378 :param str max_height: 3379 :param str max_width: 3380 :param str nocache: 3381 :param str show_changes: 3382 :param str start_position: 3383 :return: PageImages 3384 If the method is called asynchronously, 3385 returns the request thread. 3386 """ 3387 kwargs['_return_http_data_only'] = True 3388 if kwargs.get('callback'): 3389 return self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs) 3390 else: 3391 (data) = self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs) 3392 return data 3393 3394 def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs): 3395 """ 3396 Returns document page image(s) based on input. 3397 Returns images of the pages in a template document for display based on the parameters that you specify. 3398 This method makes a synchronous HTTP request by default. To make an 3399 asynchronous HTTP request, please define a `callback` function 3400 to be invoked when receiving the response. 3401 >>> def callback_function(response): 3402 >>> pprint(response) 3403 >>> 3404 >>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function) 3405 3406 :param callback function: The callback function 3407 for asynchronous request. (optional) 3408 :param str account_id: The external account number (int) or account ID Guid. (required) 3409 :param str document_id: The ID of the document being accessed. (required) 3410 :param str template_id: The ID of the template being accessed. (required) 3411 :param str count: 3412 :param str dpi: 3413 :param str max_height: 3414 :param str max_width: 3415 :param str nocache: 3416 :param str show_changes: 3417 :param str start_position: 3418 :return: PageImages 3419 If the method is called asynchronously, 3420 returns the request thread. 3421 """ 3422 3423 all_params = ['account_id', 'document_id', 'template_id', 'count', 'dpi', 'max_height', 'max_width', 'nocache', 'show_changes', 'start_position'] 3424 all_params.append('callback') 3425 all_params.append('_return_http_data_only') 3426 all_params.append('_preload_content') 3427 all_params.append('_request_timeout') 3428 3429 params = locals() 3430 for key, val in iteritems(params['kwargs']): 3431 if key not in all_params: 3432 raise TypeError( 3433 "Got an unexpected keyword argument '%s'" 3434 " to method get_pages" % key 3435 ) 3436 params[key] = val 3437 del params['kwargs'] 3438 # verify the required parameter 'account_id' is set 3439 if ('account_id' not in params) or (params['account_id'] is None): 3440 raise ValueError("Missing the required parameter `account_id` when calling `get_pages`") 3441 # verify the required parameter 'document_id' is set 3442 if ('document_id' not in params) or (params['document_id'] is None): 3443 raise ValueError("Missing the required parameter `document_id` when calling `get_pages`") 3444 # verify the required parameter 'template_id' is set 3445 if ('template_id' not in params) or (params['template_id'] is None): 3446 raise ValueError("Missing the required parameter `template_id` when calling `get_pages`") 3447 3448 3449 collection_formats = {} 3450 3451 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages'.replace('{format}', 'json') 3452 path_params = {} 3453 if 'account_id' in params: 3454 path_params['accountId'] = params['account_id'] 3455 if 'document_id' in params: 3456 path_params['documentId'] = params['document_id'] 3457 if 'template_id' in params: 3458 path_params['templateId'] = params['template_id'] 3459 3460 query_params = {} 3461 if 'count' in params: 3462 query_params['count'] = params['count'] 3463 if 'dpi' in params: 3464 query_params['dpi'] = params['dpi'] 3465 if 'max_height' in params: 3466 query_params['max_height'] = params['max_height'] 3467 if 'max_width' in params: 3468 query_params['max_width'] = params['max_width'] 3469 if 'nocache' in params: 3470 query_params['nocache'] = params['nocache'] 3471 if 'show_changes' in params: 3472 query_params['show_changes'] = params['show_changes'] 3473 if 'start_position' in params: 3474 query_params['start_position'] = params['start_position'] 3475 3476 header_params = {} 3477 3478 form_params = [] 3479 local_var_files = {} 3480 3481 body_params = None 3482 # HTTP header `Accept` 3483 header_params['Accept'] = self.api_client.\ 3484 select_header_accept(['application/json']) 3485 3486 # Authentication setting 3487 auth_settings = [] 3488 3489 return self.api_client.call_api(resource_path, 'GET', 3490 path_params, 3491 query_params, 3492 header_params, 3493 body=body_params, 3494 post_params=form_params, 3495 files=local_var_files, 3496 response_type='PageImages', 3497 auth_settings=auth_settings, 3498 callback=params.get('callback'), 3499 _return_http_data_only=params.get('_return_http_data_only'), 3500 _preload_content=params.get('_preload_content', True), 3501 _request_timeout=params.get('_request_timeout'), 3502 collection_formats=collection_formats) 3503 3504 def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs): 3505 """ 3506 Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template. 3507 3508 This method makes a synchronous HTTP request by default. To make an 3509 asynchronous HTTP request, please define a `callback` function 3510 to be invoked when receiving the response. 3511 >>> def callback_function(response): 3512 >>> pprint(response) 3513 >>> 3514 >>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function) 3515 3516 :param callback function: The callback function 3517 for asynchronous request. (optional) 3518 :param str account_id: The external account number (int) or account ID Guid. (required) 3519 :param str document_id: The ID of the document being accessed. (required) 3520 :param str template_id: The ID of the template being accessed. (required) 3521 :return: DocumentHtmlDefinitionOriginals 3522 If the method is called asynchronously, 3523 returns the request thread. 3524 """ 3525 kwargs['_return_http_data_only'] = True 3526 if kwargs.get('callback'): 3527 return self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs) 3528 else: 3529 (data) = self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs) 3530 return data 3531 3532 def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs): 3533 """ 3534 Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template. 3535 3536 This method makes a synchronous HTTP request by default. To make an 3537 asynchronous HTTP request, please define a `callback` function 3538 to be invoked when receiving the response. 3539 >>> def callback_function(response): 3540 >>> pprint(response) 3541 >>> 3542 >>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function) 3543 3544 :param callback function: The callback function 3545 for asynchronous request. (optional) 3546 :param str account_id: The external account number (int) or account ID Guid. (required) 3547 :param str document_id: The ID of the document being accessed. (required) 3548 :param str template_id: The ID of the template being accessed. (required) 3549 :return: DocumentHtmlDefinitionOriginals 3550 If the method is called asynchronously, 3551 returns the request thread. 3552 """ 3553 3554 all_params = ['account_id', 'document_id', 'template_id'] 3555 all_params.append('callback') 3556 all_params.append('_return_http_data_only') 3557 all_params.append('_preload_content') 3558 all_params.append('_request_timeout') 3559 3560 params = locals() 3561 for key, val in iteritems(params['kwargs']): 3562 if key not in all_params: 3563 raise TypeError( 3564 "Got an unexpected keyword argument '%s'" 3565 " to method get_template_document_html_definitions" % key 3566 ) 3567 params[key] = val 3568 del params['kwargs'] 3569 # verify the required parameter 'account_id' is set 3570 if ('account_id' not in params) or (params['account_id'] is None): 3571 raise ValueError("Missing the required parameter `account_id` when calling `get_template_document_html_definitions`") 3572 # verify the required parameter 'document_id' is set 3573 if ('document_id' not in params) or (params['document_id'] is None): 3574 raise ValueError("Missing the required parameter `document_id` when calling `get_template_document_html_definitions`") 3575 # verify the required parameter 'template_id' is set 3576 if ('template_id' not in params) or (params['template_id'] is None): 3577 raise ValueError("Missing the required parameter `template_id` when calling `get_template_document_html_definitions`") 3578 3579 3580 collection_formats = {} 3581 3582 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions'.replace('{format}', 'json') 3583 path_params = {} 3584 if 'account_id' in params: 3585 path_params['accountId'] = params['account_id'] 3586 if 'document_id' in params: 3587 path_params['documentId'] = params['document_id'] 3588 if 'template_id' in params: 3589 path_params['templateId'] = params['template_id'] 3590 3591 query_params = {} 3592 3593 header_params = {} 3594 3595 form_params = [] 3596 local_var_files = {} 3597 3598 body_params = None 3599 # HTTP header `Accept` 3600 header_params['Accept'] = self.api_client.\ 3601 select_header_accept(['application/json']) 3602 3603 # Authentication setting 3604 auth_settings = [] 3605 3606 return self.api_client.call_api(resource_path, 'GET', 3607 path_params, 3608 query_params, 3609 header_params, 3610 body=body_params, 3611 post_params=form_params, 3612 files=local_var_files, 3613 response_type='DocumentHtmlDefinitionOriginals', 3614 auth_settings=auth_settings, 3615 callback=params.get('callback'), 3616 _return_http_data_only=params.get('_return_http_data_only'), 3617 _preload_content=params.get('_preload_content', True), 3618 _request_timeout=params.get('_request_timeout'), 3619 collection_formats=collection_formats) 3620 3621 def get_template_html_definitions(self, account_id, template_id, **kwargs): 3622 """ 3623 Get the Original HTML Definition used to generate the Responsive HTML for the template. 3624 3625 This method makes a synchronous HTTP request by default. To make an 3626 asynchronous HTTP request, please define a `callback` function 3627 to be invoked when receiving the response. 3628 >>> def callback_function(response): 3629 >>> pprint(response) 3630 >>> 3631 >>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function) 3632 3633 :param callback function: The callback function 3634 for asynchronous request. (optional) 3635 :param str account_id: The external account number (int) or account ID Guid. (required) 3636 :param str template_id: The ID of the template being accessed. (required) 3637 :return: DocumentHtmlDefinitionOriginals 3638 If the method is called asynchronously, 3639 returns the request thread. 3640 """ 3641 kwargs['_return_http_data_only'] = True 3642 if kwargs.get('callback'): 3643 return self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs) 3644 else: 3645 (data) = self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs) 3646 return data 3647 3648 def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs): 3649 """ 3650 Get the Original HTML Definition used to generate the Responsive HTML for the template. 3651 3652 This method makes a synchronous HTTP request by default. To make an 3653 asynchronous HTTP request, please define a `callback` function 3654 to be invoked when receiving the response. 3655 >>> def callback_function(response): 3656 >>> pprint(response) 3657 >>> 3658 >>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function) 3659 3660 :param callback function: The callback function 3661 for asynchronous request. (optional) 3662 :param str account_id: The external account number (int) or account ID Guid. (required) 3663 :param str template_id: The ID of the template being accessed. (required) 3664 :return: DocumentHtmlDefinitionOriginals 3665 If the method is called asynchronously, 3666 returns the request thread. 3667 """ 3668 3669 all_params = ['account_id', 'template_id'] 3670 all_params.append('callback') 3671 all_params.append('_return_http_data_only') 3672 all_params.append('_preload_content') 3673 all_params.append('_request_timeout') 3674 3675 params = locals() 3676 for key, val in iteritems(params['kwargs']): 3677 if key not in all_params: 3678 raise TypeError( 3679 "Got an unexpected keyword argument '%s'" 3680 " to method get_template_html_definitions" % key 3681 ) 3682 params[key] = val 3683 del params['kwargs'] 3684 # verify the required parameter 'account_id' is set 3685 if ('account_id' not in params) or (params['account_id'] is None): 3686 raise ValueError("Missing the required parameter `account_id` when calling `get_template_html_definitions`") 3687 # verify the required parameter 'template_id' is set 3688 if ('template_id' not in params) or (params['template_id'] is None): 3689 raise ValueError("Missing the required parameter `template_id` when calling `get_template_html_definitions`") 3690 3691 3692 collection_formats = {} 3693 3694 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions'.replace('{format}', 'json') 3695 path_params = {} 3696 if 'account_id' in params: 3697 path_params['accountId'] = params['account_id'] 3698 if 'template_id' in params: 3699 path_params['templateId'] = params['template_id'] 3700 3701 query_params = {} 3702 3703 header_params = {} 3704 3705 form_params = [] 3706 local_var_files = {} 3707 3708 body_params = None 3709 # HTTP header `Accept` 3710 header_params['Accept'] = self.api_client.\ 3711 select_header_accept(['application/json']) 3712 3713 # Authentication setting 3714 auth_settings = [] 3715 3716 return self.api_client.call_api(resource_path, 'GET', 3717 path_params, 3718 query_params, 3719 header_params, 3720 body=body_params, 3721 post_params=form_params, 3722 files=local_var_files, 3723 response_type='DocumentHtmlDefinitionOriginals', 3724 auth_settings=auth_settings, 3725 callback=params.get('callback'), 3726 _return_http_data_only=params.get('_return_http_data_only'), 3727 _preload_content=params.get('_preload_content', True), 3728 _request_timeout=params.get('_request_timeout'), 3729 collection_formats=collection_formats) 3730 3731 def list_custom_fields(self, account_id, template_id, **kwargs): 3732 """ 3733 Gets the custom document fields from a template. 3734 Retrieves the custom document field information from an existing template. 3735 This method makes a synchronous HTTP request by default. To make an 3736 asynchronous HTTP request, please define a `callback` function 3737 to be invoked when receiving the response. 3738 >>> def callback_function(response): 3739 >>> pprint(response) 3740 >>> 3741 >>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function) 3742 3743 :param callback function: The callback function 3744 for asynchronous request. (optional) 3745 :param str account_id: The external account number (int) or account ID Guid. (required) 3746 :param str template_id: The ID of the template being accessed. (required) 3747 :return: CustomFields 3748 If the method is called asynchronously, 3749 returns the request thread. 3750 """ 3751 kwargs['_return_http_data_only'] = True 3752 if kwargs.get('callback'): 3753 return self.list_custom_fields_with_http_info(account_id, template_id, **kwargs) 3754 else: 3755 (data) = self.list_custom_fields_with_http_info(account_id, template_id, **kwargs) 3756 return data 3757 3758 def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs): 3759 """ 3760 Gets the custom document fields from a template. 3761 Retrieves the custom document field information from an existing template. 3762 This method makes a synchronous HTTP request by default. To make an 3763 asynchronous HTTP request, please define a `callback` function 3764 to be invoked when receiving the response. 3765 >>> def callback_function(response): 3766 >>> pprint(response) 3767 >>> 3768 >>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function) 3769 3770 :param callback function: The callback function 3771 for asynchronous request. (optional) 3772 :param str account_id: The external account number (int) or account ID Guid. (required) 3773 :param str template_id: The ID of the template being accessed. (required) 3774 :return: CustomFields 3775 If the method is called asynchronously, 3776 returns the request thread. 3777 """ 3778 3779 all_params = ['account_id', 'template_id'] 3780 all_params.append('callback') 3781 all_params.append('_return_http_data_only') 3782 all_params.append('_preload_content') 3783 all_params.append('_request_timeout') 3784 3785 params = locals() 3786 for key, val in iteritems(params['kwargs']): 3787 if key not in all_params: 3788 raise TypeError( 3789 "Got an unexpected keyword argument '%s'" 3790 " to method list_custom_fields" % key 3791 ) 3792 params[key] = val 3793 del params['kwargs'] 3794 # verify the required parameter 'account_id' is set 3795 if ('account_id' not in params) or (params['account_id'] is None): 3796 raise ValueError("Missing the required parameter `account_id` when calling `list_custom_fields`") 3797 # verify the required parameter 'template_id' is set 3798 if ('template_id' not in params) or (params['template_id'] is None): 3799 raise ValueError("Missing the required parameter `template_id` when calling `list_custom_fields`") 3800 3801 3802 collection_formats = {} 3803 3804 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json') 3805 path_params = {} 3806 if 'account_id' in params: 3807 path_params['accountId'] = params['account_id'] 3808 if 'template_id' in params: 3809 path_params['templateId'] = params['template_id'] 3810 3811 query_params = {} 3812 3813 header_params = {} 3814 3815 form_params = [] 3816 local_var_files = {} 3817 3818 body_params = None 3819 # HTTP header `Accept` 3820 header_params['Accept'] = self.api_client.\ 3821 select_header_accept(['application/json']) 3822 3823 # Authentication setting 3824 auth_settings = [] 3825 3826 return self.api_client.call_api(resource_path, 'GET', 3827 path_params, 3828 query_params, 3829 header_params, 3830 body=body_params, 3831 post_params=form_params, 3832 files=local_var_files, 3833 response_type='CustomFields', 3834 auth_settings=auth_settings, 3835 callback=params.get('callback'), 3836 _return_http_data_only=params.get('_return_http_data_only'), 3837 _preload_content=params.get('_preload_content', True), 3838 _request_timeout=params.get('_request_timeout'), 3839 collection_formats=collection_formats) 3840 3841 def list_document_fields(self, account_id, document_id, template_id, **kwargs): 3842 """ 3843 Gets the custom document fields for a an existing template document. 3844 Retrieves the custom document fields for an existing template document. 3845 This method makes a synchronous HTTP request by default. To make an 3846 asynchronous HTTP request, please define a `callback` function 3847 to be invoked when receiving the response. 3848 >>> def callback_function(response): 3849 >>> pprint(response) 3850 >>> 3851 >>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function) 3852 3853 :param callback function: The callback function 3854 for asynchronous request. (optional) 3855 :param str account_id: The external account number (int) or account ID Guid. (required) 3856 :param str document_id: The ID of the document being accessed. (required) 3857 :param str template_id: The ID of the template being accessed. (required) 3858 :return: DocumentFieldsInformation 3859 If the method is called asynchronously, 3860 returns the request thread. 3861 """ 3862 kwargs['_return_http_data_only'] = True 3863 if kwargs.get('callback'): 3864 return self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 3865 else: 3866 (data) = self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 3867 return data 3868 3869 def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs): 3870 """ 3871 Gets the custom document fields for a an existing template document. 3872 Retrieves the custom document fields for an existing template document. 3873 This method makes a synchronous HTTP request by default. To make an 3874 asynchronous HTTP request, please define a `callback` function 3875 to be invoked when receiving the response. 3876 >>> def callback_function(response): 3877 >>> pprint(response) 3878 >>> 3879 >>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function) 3880 3881 :param callback function: The callback function 3882 for asynchronous request. (optional) 3883 :param str account_id: The external account number (int) or account ID Guid. (required) 3884 :param str document_id: The ID of the document being accessed. (required) 3885 :param str template_id: The ID of the template being accessed. (required) 3886 :return: DocumentFieldsInformation 3887 If the method is called asynchronously, 3888 returns the request thread. 3889 """ 3890 3891 all_params = ['account_id', 'document_id', 'template_id'] 3892 all_params.append('callback') 3893 all_params.append('_return_http_data_only') 3894 all_params.append('_preload_content') 3895 all_params.append('_request_timeout') 3896 3897 params = locals() 3898 for key, val in iteritems(params['kwargs']): 3899 if key not in all_params: 3900 raise TypeError( 3901 "Got an unexpected keyword argument '%s'" 3902 " to method list_document_fields" % key 3903 ) 3904 params[key] = val 3905 del params['kwargs'] 3906 # verify the required parameter 'account_id' is set 3907 if ('account_id' not in params) or (params['account_id'] is None): 3908 raise ValueError("Missing the required parameter `account_id` when calling `list_document_fields`") 3909 # verify the required parameter 'document_id' is set 3910 if ('document_id' not in params) or (params['document_id'] is None): 3911 raise ValueError("Missing the required parameter `document_id` when calling `list_document_fields`") 3912 # verify the required parameter 'template_id' is set 3913 if ('template_id' not in params) or (params['template_id'] is None): 3914 raise ValueError("Missing the required parameter `template_id` when calling `list_document_fields`") 3915 3916 3917 collection_formats = {} 3918 3919 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json') 3920 path_params = {} 3921 if 'account_id' in params: 3922 path_params['accountId'] = params['account_id'] 3923 if 'document_id' in params: 3924 path_params['documentId'] = params['document_id'] 3925 if 'template_id' in params: 3926 path_params['templateId'] = params['template_id'] 3927 3928 query_params = {} 3929 3930 header_params = {} 3931 3932 form_params = [] 3933 local_var_files = {} 3934 3935 body_params = None 3936 # HTTP header `Accept` 3937 header_params['Accept'] = self.api_client.\ 3938 select_header_accept(['application/json']) 3939 3940 # Authentication setting 3941 auth_settings = [] 3942 3943 return self.api_client.call_api(resource_path, 'GET', 3944 path_params, 3945 query_params, 3946 header_params, 3947 body=body_params, 3948 post_params=form_params, 3949 files=local_var_files, 3950 response_type='DocumentFieldsInformation', 3951 auth_settings=auth_settings, 3952 callback=params.get('callback'), 3953 _return_http_data_only=params.get('_return_http_data_only'), 3954 _preload_content=params.get('_preload_content', True), 3955 _request_timeout=params.get('_request_timeout'), 3956 collection_formats=collection_formats) 3957 3958 def list_documents(self, account_id, template_id, **kwargs): 3959 """ 3960 Gets a list of documents associated with a template. 3961 Retrieves a list of documents associated with the specified template. 3962 This method makes a synchronous HTTP request by default. To make an 3963 asynchronous HTTP request, please define a `callback` function 3964 to be invoked when receiving the response. 3965 >>> def callback_function(response): 3966 >>> pprint(response) 3967 >>> 3968 >>> thread = api.list_documents(account_id, template_id, callback=callback_function) 3969 3970 :param callback function: The callback function 3971 for asynchronous request. (optional) 3972 :param str account_id: The external account number (int) or account ID Guid. (required) 3973 :param str template_id: The ID of the template being accessed. (required) 3974 :param str include_agreement_type: 3975 :param str include_tabs: 3976 :return: TemplateDocumentsResult 3977 If the method is called asynchronously, 3978 returns the request thread. 3979 """ 3980 kwargs['_return_http_data_only'] = True 3981 if kwargs.get('callback'): 3982 return self.list_documents_with_http_info(account_id, template_id, **kwargs) 3983 else: 3984 (data) = self.list_documents_with_http_info(account_id, template_id, **kwargs) 3985 return data 3986 3987 def list_documents_with_http_info(self, account_id, template_id, **kwargs): 3988 """ 3989 Gets a list of documents associated with a template. 3990 Retrieves a list of documents associated with the specified template. 3991 This method makes a synchronous HTTP request by default. To make an 3992 asynchronous HTTP request, please define a `callback` function 3993 to be invoked when receiving the response. 3994 >>> def callback_function(response): 3995 >>> pprint(response) 3996 >>> 3997 >>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function) 3998 3999 :param callback function: The callback function 4000 for asynchronous request. (optional) 4001 :param str account_id: The external account number (int) or account ID Guid. (required) 4002 :param str template_id: The ID of the template being accessed. (required) 4003 :param str include_agreement_type: 4004 :param str include_tabs: 4005 :return: TemplateDocumentsResult 4006 If the method is called asynchronously, 4007 returns the request thread. 4008 """ 4009 4010 all_params = ['account_id', 'template_id', 'include_agreement_type', 'include_tabs'] 4011 all_params.append('callback') 4012 all_params.append('_return_http_data_only') 4013 all_params.append('_preload_content') 4014 all_params.append('_request_timeout') 4015 4016 params = locals() 4017 for key, val in iteritems(params['kwargs']): 4018 if key not in all_params: 4019 raise TypeError( 4020 "Got an unexpected keyword argument '%s'" 4021 " to method list_documents" % key 4022 ) 4023 params[key] = val 4024 del params['kwargs'] 4025 # verify the required parameter 'account_id' is set 4026 if ('account_id' not in params) or (params['account_id'] is None): 4027 raise ValueError("Missing the required parameter `account_id` when calling `list_documents`") 4028 # verify the required parameter 'template_id' is set 4029 if ('template_id' not in params) or (params['template_id'] is None): 4030 raise ValueError("Missing the required parameter `template_id` when calling `list_documents`") 4031 4032 4033 collection_formats = {} 4034 4035 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json') 4036 path_params = {} 4037 if 'account_id' in params: 4038 path_params['accountId'] = params['account_id'] 4039 if 'template_id' in params: 4040 path_params['templateId'] = params['template_id'] 4041 4042 query_params = {} 4043 if 'include_agreement_type' in params: 4044 query_params['include_agreement_type'] = params['include_agreement_type'] 4045 if 'include_tabs' in params: 4046 query_params['include_tabs'] = params['include_tabs'] 4047 4048 header_params = {} 4049 4050 form_params = [] 4051 local_var_files = {} 4052 4053 body_params = None 4054 # HTTP header `Accept` 4055 header_params['Accept'] = self.api_client.\ 4056 select_header_accept(['application/json']) 4057 4058 # Authentication setting 4059 auth_settings = [] 4060 4061 return self.api_client.call_api(resource_path, 'GET', 4062 path_params, 4063 query_params, 4064 header_params, 4065 body=body_params, 4066 post_params=form_params, 4067 files=local_var_files, 4068 response_type='TemplateDocumentsResult', 4069 auth_settings=auth_settings, 4070 callback=params.get('callback'), 4071 _return_http_data_only=params.get('_return_http_data_only'), 4072 _preload_content=params.get('_preload_content', True), 4073 _request_timeout=params.get('_request_timeout'), 4074 collection_formats=collection_formats) 4075 4076 def list_recipients(self, account_id, template_id, **kwargs): 4077 """ 4078 Gets recipient information from a template. 4079 Retrieves the information for all recipients in the specified template. 4080 This method makes a synchronous HTTP request by default. To make an 4081 asynchronous HTTP request, please define a `callback` function 4082 to be invoked when receiving the response. 4083 >>> def callback_function(response): 4084 >>> pprint(response) 4085 >>> 4086 >>> thread = api.list_recipients(account_id, template_id, callback=callback_function) 4087 4088 :param callback function: The callback function 4089 for asynchronous request. (optional) 4090 :param str account_id: The external account number (int) or account ID Guid. (required) 4091 :param str template_id: The ID of the template being accessed. (required) 4092 :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. 4093 :param str include_extended: When set to **true**, the extended properties are included in the response. 4094 :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response. 4095 :return: Recipients 4096 If the method is called asynchronously, 4097 returns the request thread. 4098 """ 4099 kwargs['_return_http_data_only'] = True 4100 if kwargs.get('callback'): 4101 return self.list_recipients_with_http_info(account_id, template_id, **kwargs) 4102 else: 4103 (data) = self.list_recipients_with_http_info(account_id, template_id, **kwargs) 4104 return data 4105 4106 def list_recipients_with_http_info(self, account_id, template_id, **kwargs): 4107 """ 4108 Gets recipient information from a template. 4109 Retrieves the information for all recipients in the specified template. 4110 This method makes a synchronous HTTP request by default. To make an 4111 asynchronous HTTP request, please define a `callback` function 4112 to be invoked when receiving the response. 4113 >>> def callback_function(response): 4114 >>> pprint(response) 4115 >>> 4116 >>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function) 4117 4118 :param callback function: The callback function 4119 for asynchronous request. (optional) 4120 :param str account_id: The external account number (int) or account ID Guid. (required) 4121 :param str template_id: The ID of the template being accessed. (required) 4122 :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. 4123 :param str include_extended: When set to **true**, the extended properties are included in the response. 4124 :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response. 4125 :return: Recipients 4126 If the method is called asynchronously, 4127 returns the request thread. 4128 """ 4129 4130 all_params = ['account_id', 'template_id', 'include_anchor_tab_locations', 'include_extended', 'include_tabs'] 4131 all_params.append('callback') 4132 all_params.append('_return_http_data_only') 4133 all_params.append('_preload_content') 4134 all_params.append('_request_timeout') 4135 4136 params = locals() 4137 for key, val in iteritems(params['kwargs']): 4138 if key not in all_params: 4139 raise TypeError( 4140 "Got an unexpected keyword argument '%s'" 4141 " to method list_recipients" % key 4142 ) 4143 params[key] = val 4144 del params['kwargs'] 4145 # verify the required parameter 'account_id' is set 4146 if ('account_id' not in params) or (params['account_id'] is None): 4147 raise ValueError("Missing the required parameter `account_id` when calling `list_recipients`") 4148 # verify the required parameter 'template_id' is set 4149 if ('template_id' not in params) or (params['template_id'] is None): 4150 raise ValueError("Missing the required parameter `template_id` when calling `list_recipients`") 4151 4152 4153 collection_formats = {} 4154 4155 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json') 4156 path_params = {} 4157 if 'account_id' in params: 4158 path_params['accountId'] = params['account_id'] 4159 if 'template_id' in params: 4160 path_params['templateId'] = params['template_id'] 4161 4162 query_params = {} 4163 if 'include_anchor_tab_locations' in params: 4164 query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations'] 4165 if 'include_extended' in params: 4166 query_params['include_extended'] = params['include_extended'] 4167 if 'include_tabs' in params: 4168 query_params['include_tabs'] = params['include_tabs'] 4169 4170 header_params = {} 4171 4172 form_params = [] 4173 local_var_files = {} 4174 4175 body_params = None 4176 # HTTP header `Accept` 4177 header_params['Accept'] = self.api_client.\ 4178 select_header_accept(['application/json']) 4179 4180 # Authentication setting 4181 auth_settings = [] 4182 4183 return self.api_client.call_api(resource_path, 'GET', 4184 path_params, 4185 query_params, 4186 header_params, 4187 body=body_params, 4188 post_params=form_params, 4189 files=local_var_files, 4190 response_type='Recipients', 4191 auth_settings=auth_settings, 4192 callback=params.get('callback'), 4193 _return_http_data_only=params.get('_return_http_data_only'), 4194 _preload_content=params.get('_preload_content', True), 4195 _request_timeout=params.get('_request_timeout'), 4196 collection_formats=collection_formats) 4197 4198 def list_tabs(self, account_id, recipient_id, template_id, **kwargs): 4199 """ 4200 Gets the tabs information for a signer or sign-in-person recipient in a template. 4201 Gets the tabs information for a signer or sign-in-person recipient in a template. 4202 This method makes a synchronous HTTP request by default. To make an 4203 asynchronous HTTP request, please define a `callback` function 4204 to be invoked when receiving the response. 4205 >>> def callback_function(response): 4206 >>> pprint(response) 4207 >>> 4208 >>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function) 4209 4210 :param callback function: The callback function 4211 for asynchronous request. (optional) 4212 :param str account_id: The external account number (int) or account ID Guid. (required) 4213 :param str recipient_id: The ID of the recipient being accessed. (required) 4214 :param str template_id: The ID of the template being accessed. (required) 4215 :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 4216 :param str include_metadata: 4217 :return: Tabs 4218 If the method is called asynchronously, 4219 returns the request thread. 4220 """ 4221 kwargs['_return_http_data_only'] = True 4222 if kwargs.get('callback'): 4223 return self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 4224 else: 4225 (data) = self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 4226 return data 4227 4228 def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs): 4229 """ 4230 Gets the tabs information for a signer or sign-in-person recipient in a template. 4231 Gets the tabs information for a signer or sign-in-person recipient in a template. 4232 This method makes a synchronous HTTP request by default. To make an 4233 asynchronous HTTP request, please define a `callback` function 4234 to be invoked when receiving the response. 4235 >>> def callback_function(response): 4236 >>> pprint(response) 4237 >>> 4238 >>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function) 4239 4240 :param callback function: The callback function 4241 for asynchronous request. (optional) 4242 :param str account_id: The external account number (int) or account ID Guid. (required) 4243 :param str recipient_id: The ID of the recipient being accessed. (required) 4244 :param str template_id: The ID of the template being accessed. (required) 4245 :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 4246 :param str include_metadata: 4247 :return: Tabs 4248 If the method is called asynchronously, 4249 returns the request thread. 4250 """ 4251 4252 all_params = ['account_id', 'recipient_id', 'template_id', 'include_anchor_tab_locations', 'include_metadata'] 4253 all_params.append('callback') 4254 all_params.append('_return_http_data_only') 4255 all_params.append('_preload_content') 4256 all_params.append('_request_timeout') 4257 4258 params = locals() 4259 for key, val in iteritems(params['kwargs']): 4260 if key not in all_params: 4261 raise TypeError( 4262 "Got an unexpected keyword argument '%s'" 4263 " to method list_tabs" % key 4264 ) 4265 params[key] = val 4266 del params['kwargs'] 4267 # verify the required parameter 'account_id' is set 4268 if ('account_id' not in params) or (params['account_id'] is None): 4269 raise ValueError("Missing the required parameter `account_id` when calling `list_tabs`") 4270 # verify the required parameter 'recipient_id' is set 4271 if ('recipient_id' not in params) or (params['recipient_id'] is None): 4272 raise ValueError("Missing the required parameter `recipient_id` when calling `list_tabs`") 4273 # verify the required parameter 'template_id' is set 4274 if ('template_id' not in params) or (params['template_id'] is None): 4275 raise ValueError("Missing the required parameter `template_id` when calling `list_tabs`") 4276 4277 4278 collection_formats = {} 4279 4280 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json') 4281 path_params = {} 4282 if 'account_id' in params: 4283 path_params['accountId'] = params['account_id'] 4284 if 'recipient_id' in params: 4285 path_params['recipientId'] = params['recipient_id'] 4286 if 'template_id' in params: 4287 path_params['templateId'] = params['template_id'] 4288 4289 query_params = {} 4290 if 'include_anchor_tab_locations' in params: 4291 query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations'] 4292 if 'include_metadata' in params: 4293 query_params['include_metadata'] = params['include_metadata'] 4294 4295 header_params = {} 4296 4297 form_params = [] 4298 local_var_files = {} 4299 4300 body_params = None 4301 # HTTP header `Accept` 4302 header_params['Accept'] = self.api_client.\ 4303 select_header_accept(['application/json']) 4304 4305 # Authentication setting 4306 auth_settings = [] 4307 4308 return self.api_client.call_api(resource_path, 'GET', 4309 path_params, 4310 query_params, 4311 header_params, 4312 body=body_params, 4313 post_params=form_params, 4314 files=local_var_files, 4315 response_type='Tabs', 4316 auth_settings=auth_settings, 4317 callback=params.get('callback'), 4318 _return_http_data_only=params.get('_return_http_data_only'), 4319 _preload_content=params.get('_preload_content', True), 4320 _request_timeout=params.get('_request_timeout'), 4321 collection_formats=collection_formats) 4322 4323 def list_templates(self, account_id, **kwargs): 4324 """ 4325 Gets the definition of a template. 4326 Retrieves the list of templates for the specified account. The request can be limited to a specific folder. 4327 This method makes a synchronous HTTP request by default. To make an 4328 asynchronous HTTP request, please define a `callback` function 4329 to be invoked when receiving the response. 4330 >>> def callback_function(response): 4331 >>> pprint(response) 4332 >>> 4333 >>> thread = api.list_templates(account_id, callback=callback_function) 4334 4335 :param callback function: The callback function 4336 for asynchronous request. (optional) 4337 :param str account_id: The external account number (int) or account ID Guid. (required) 4338 :param str count: Number of records to return in the cache. 4339 :param str created_from_date: 4340 :param str created_to_date: 4341 :param str folder_ids: A comma separated list of folder ID GUIDs. 4342 :param str folder_types: 4343 :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. 4344 :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. 4345 :param str is_deleted_template_only: 4346 :param str is_download: 4347 :param str modified_from_date: 4348 :param str modified_to_date: 4349 :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) 4350 :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. 4351 :param str search_fields: 4352 :param str search_text: The search text used to search the names of templates. 4353 :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. 4354 :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). 4355 :param str template_ids: 4356 :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. 4357 :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. 4358 :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. 4359 :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. 4360 :param str user_id: 4361 :return: EnvelopeTemplateResults 4362 If the method is called asynchronously, 4363 returns the request thread. 4364 """ 4365 kwargs['_return_http_data_only'] = True 4366 if kwargs.get('callback'): 4367 return self.list_templates_with_http_info(account_id, **kwargs) 4368 else: 4369 (data) = self.list_templates_with_http_info(account_id, **kwargs) 4370 return data 4371 4372 def list_templates_with_http_info(self, account_id, **kwargs): 4373 """ 4374 Gets the definition of a template. 4375 Retrieves the list of templates for the specified account. The request can be limited to a specific folder. 4376 This method makes a synchronous HTTP request by default. To make an 4377 asynchronous HTTP request, please define a `callback` function 4378 to be invoked when receiving the response. 4379 >>> def callback_function(response): 4380 >>> pprint(response) 4381 >>> 4382 >>> thread = api.list_templates_with_http_info(account_id, callback=callback_function) 4383 4384 :param callback function: The callback function 4385 for asynchronous request. (optional) 4386 :param str account_id: The external account number (int) or account ID Guid. (required) 4387 :param str count: Number of records to return in the cache. 4388 :param str created_from_date: 4389 :param str created_to_date: 4390 :param str folder_ids: A comma separated list of folder ID GUIDs. 4391 :param str folder_types: 4392 :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. 4393 :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. 4394 :param str is_deleted_template_only: 4395 :param str is_download: 4396 :param str modified_from_date: 4397 :param str modified_to_date: 4398 :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) 4399 :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. 4400 :param str search_fields: 4401 :param str search_text: The search text used to search the names of templates. 4402 :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. 4403 :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). 4404 :param str template_ids: 4405 :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. 4406 :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. 4407 :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. 4408 :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. 4409 :param str user_id: 4410 :return: EnvelopeTemplateResults 4411 If the method is called asynchronously, 4412 returns the request thread. 4413 """ 4414 4415 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'] 4416 all_params.append('callback') 4417 all_params.append('_return_http_data_only') 4418 all_params.append('_preload_content') 4419 all_params.append('_request_timeout') 4420 4421 params = locals() 4422 for key, val in iteritems(params['kwargs']): 4423 if key not in all_params: 4424 raise TypeError( 4425 "Got an unexpected keyword argument '%s'" 4426 " to method list_templates" % key 4427 ) 4428 params[key] = val 4429 del params['kwargs'] 4430 # verify the required parameter 'account_id' is set 4431 if ('account_id' not in params) or (params['account_id'] is None): 4432 raise ValueError("Missing the required parameter `account_id` when calling `list_templates`") 4433 4434 4435 collection_formats = {} 4436 4437 resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json') 4438 path_params = {} 4439 if 'account_id' in params: 4440 path_params['accountId'] = params['account_id'] 4441 4442 query_params = {} 4443 if 'count' in params: 4444 query_params['count'] = params['count'] 4445 if 'created_from_date' in params: 4446 query_params['created_from_date'] = params['created_from_date'] 4447 if 'created_to_date' in params: 4448 query_params['created_to_date'] = params['created_to_date'] 4449 if 'folder_ids' in params: 4450 query_params['folder_ids'] = params['folder_ids'] 4451 if 'folder_types' in params: 4452 query_params['folder_types'] = params['folder_types'] 4453 if 'from_date' in params: 4454 query_params['from_date'] = params['from_date'] 4455 if 'include' in params: 4456 query_params['include'] = params['include'] 4457 if 'is_deleted_template_only' in params: 4458 query_params['is_deleted_template_only'] = params['is_deleted_template_only'] 4459 if 'is_download' in params: 4460 query_params['is_download'] = params['is_download'] 4461 if 'modified_from_date' in params: 4462 query_params['modified_from_date'] = params['modified_from_date'] 4463 if 'modified_to_date' in params: 4464 query_params['modified_to_date'] = params['modified_to_date'] 4465 if 'order' in params: 4466 query_params['order'] = params['order'] 4467 if 'order_by' in params: 4468 query_params['order_by'] = params['order_by'] 4469 if 'search_fields' in params: 4470 query_params['search_fields'] = params['search_fields'] 4471 if 'search_text' in params: 4472 query_params['search_text'] = params['search_text'] 4473 if 'shared_by_me' in params: 4474 query_params['shared_by_me'] = params['shared_by_me'] 4475 if 'start_position' in params: 4476 query_params['start_position'] = params['start_position'] 4477 if 'template_ids' in params: 4478 query_params['template_ids'] = params['template_ids'] 4479 if 'to_date' in params: 4480 query_params['to_date'] = params['to_date'] 4481 if 'used_from_date' in params: 4482 query_params['used_from_date'] = params['used_from_date'] 4483 if 'used_to_date' in params: 4484 query_params['used_to_date'] = params['used_to_date'] 4485 if 'user_filter' in params: 4486 query_params['user_filter'] = params['user_filter'] 4487 if 'user_id' in params: 4488 query_params['user_id'] = params['user_id'] 4489 4490 header_params = {} 4491 4492 form_params = [] 4493 local_var_files = {} 4494 4495 body_params = None 4496 # HTTP header `Accept` 4497 header_params['Accept'] = self.api_client.\ 4498 select_header_accept(['application/json']) 4499 4500 # Authentication setting 4501 auth_settings = [] 4502 4503 return self.api_client.call_api(resource_path, 'GET', 4504 path_params, 4505 query_params, 4506 header_params, 4507 body=body_params, 4508 post_params=form_params, 4509 files=local_var_files, 4510 response_type='EnvelopeTemplateResults', 4511 auth_settings=auth_settings, 4512 callback=params.get('callback'), 4513 _return_http_data_only=params.get('_return_http_data_only'), 4514 _preload_content=params.get('_preload_content', True), 4515 _request_timeout=params.get('_request_timeout'), 4516 collection_formats=collection_formats) 4517 4518 def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs): 4519 """ 4520 Rotates page image from a template for display. 4521 Rotates page image from a template for display. The page image can be rotated to the left or right. 4522 This method makes a synchronous HTTP request by default. To make an 4523 asynchronous HTTP request, please define a `callback` function 4524 to be invoked when receiving the response. 4525 >>> def callback_function(response): 4526 >>> pprint(response) 4527 >>> 4528 >>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function) 4529 4530 :param callback function: The callback function 4531 for asynchronous request. (optional) 4532 :param str account_id: The external account number (int) or account ID Guid. (required) 4533 :param str document_id: The ID of the document being accessed. (required) 4534 :param str page_number: The page number being accessed. (required) 4535 :param str template_id: The ID of the template being accessed. (required) 4536 :param PageRequest page_request: 4537 :return: None 4538 If the method is called asynchronously, 4539 returns the request thread. 4540 """ 4541 kwargs['_return_http_data_only'] = True 4542 if kwargs.get('callback'): 4543 return self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 4544 else: 4545 (data) = self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 4546 return data 4547 4548 def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs): 4549 """ 4550 Rotates page image from a template for display. 4551 Rotates page image from a template for display. The page image can be rotated to the left or right. 4552 This method makes a synchronous HTTP request by default. To make an 4553 asynchronous HTTP request, please define a `callback` function 4554 to be invoked when receiving the response. 4555 >>> def callback_function(response): 4556 >>> pprint(response) 4557 >>> 4558 >>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function) 4559 4560 :param callback function: The callback function 4561 for asynchronous request. (optional) 4562 :param str account_id: The external account number (int) or account ID Guid. (required) 4563 :param str document_id: The ID of the document being accessed. (required) 4564 :param str page_number: The page number being accessed. (required) 4565 :param str template_id: The ID of the template being accessed. (required) 4566 :param PageRequest page_request: 4567 :return: None 4568 If the method is called asynchronously, 4569 returns the request thread. 4570 """ 4571 4572 all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request'] 4573 all_params.append('callback') 4574 all_params.append('_return_http_data_only') 4575 all_params.append('_preload_content') 4576 all_params.append('_request_timeout') 4577 4578 params = locals() 4579 for key, val in iteritems(params['kwargs']): 4580 if key not in all_params: 4581 raise TypeError( 4582 "Got an unexpected keyword argument '%s'" 4583 " to method rotate_document_page" % key 4584 ) 4585 params[key] = val 4586 del params['kwargs'] 4587 # verify the required parameter 'account_id' is set 4588 if ('account_id' not in params) or (params['account_id'] is None): 4589 raise ValueError("Missing the required parameter `account_id` when calling `rotate_document_page`") 4590 # verify the required parameter 'document_id' is set 4591 if ('document_id' not in params) or (params['document_id'] is None): 4592 raise ValueError("Missing the required parameter `document_id` when calling `rotate_document_page`") 4593 # verify the required parameter 'page_number' is set 4594 if ('page_number' not in params) or (params['page_number'] is None): 4595 raise ValueError("Missing the required parameter `page_number` when calling `rotate_document_page`") 4596 # verify the required parameter 'template_id' is set 4597 if ('template_id' not in params) or (params['template_id'] is None): 4598 raise ValueError("Missing the required parameter `template_id` when calling `rotate_document_page`") 4599 4600 4601 collection_formats = {} 4602 4603 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json') 4604 path_params = {} 4605 if 'account_id' in params: 4606 path_params['accountId'] = params['account_id'] 4607 if 'document_id' in params: 4608 path_params['documentId'] = params['document_id'] 4609 if 'page_number' in params: 4610 path_params['pageNumber'] = params['page_number'] 4611 if 'template_id' in params: 4612 path_params['templateId'] = params['template_id'] 4613 4614 query_params = {} 4615 4616 header_params = {} 4617 4618 form_params = [] 4619 local_var_files = {} 4620 4621 body_params = None 4622 if 'page_request' in params: 4623 body_params = params['page_request'] 4624 # HTTP header `Accept` 4625 header_params['Accept'] = self.api_client.\ 4626 select_header_accept(['application/json']) 4627 4628 # Authentication setting 4629 auth_settings = [] 4630 4631 return self.api_client.call_api(resource_path, 'PUT', 4632 path_params, 4633 query_params, 4634 header_params, 4635 body=body_params, 4636 post_params=form_params, 4637 files=local_var_files, 4638 response_type=None, 4639 auth_settings=auth_settings, 4640 callback=params.get('callback'), 4641 _return_http_data_only=params.get('_return_http_data_only'), 4642 _preload_content=params.get('_preload_content', True), 4643 _request_timeout=params.get('_request_timeout'), 4644 collection_formats=collection_formats) 4645 4646 def update(self, account_id, template_id, **kwargs): 4647 """ 4648 Updates an existing template. 4649 Updates an existing template. 4650 This method makes a synchronous HTTP request by default. To make an 4651 asynchronous HTTP request, please define a `callback` function 4652 to be invoked when receiving the response. 4653 >>> def callback_function(response): 4654 >>> pprint(response) 4655 >>> 4656 >>> thread = api.update(account_id, template_id, callback=callback_function) 4657 4658 :param callback function: The callback function 4659 for asynchronous request. (optional) 4660 :param str account_id: The external account number (int) or account ID Guid. (required) 4661 :param str template_id: The ID of the template being accessed. (required) 4662 :param EnvelopeTemplate envelope_template: 4663 :return: TemplateUpdateSummary 4664 If the method is called asynchronously, 4665 returns the request thread. 4666 """ 4667 kwargs['_return_http_data_only'] = True 4668 if kwargs.get('callback'): 4669 return self.update_with_http_info(account_id, template_id, **kwargs) 4670 else: 4671 (data) = self.update_with_http_info(account_id, template_id, **kwargs) 4672 return data 4673 4674 def update_with_http_info(self, account_id, template_id, **kwargs): 4675 """ 4676 Updates an existing template. 4677 Updates an existing template. 4678 This method makes a synchronous HTTP request by default. To make an 4679 asynchronous HTTP request, please define a `callback` function 4680 to be invoked when receiving the response. 4681 >>> def callback_function(response): 4682 >>> pprint(response) 4683 >>> 4684 >>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function) 4685 4686 :param callback function: The callback function 4687 for asynchronous request. (optional) 4688 :param str account_id: The external account number (int) or account ID Guid. (required) 4689 :param str template_id: The ID of the template being accessed. (required) 4690 :param EnvelopeTemplate envelope_template: 4691 :return: TemplateUpdateSummary 4692 If the method is called asynchronously, 4693 returns the request thread. 4694 """ 4695 4696 all_params = ['account_id', 'template_id', 'envelope_template'] 4697 all_params.append('callback') 4698 all_params.append('_return_http_data_only') 4699 all_params.append('_preload_content') 4700 all_params.append('_request_timeout') 4701 4702 params = locals() 4703 for key, val in iteritems(params['kwargs']): 4704 if key not in all_params: 4705 raise TypeError( 4706 "Got an unexpected keyword argument '%s'" 4707 " to method update" % key 4708 ) 4709 params[key] = val 4710 del params['kwargs'] 4711 # verify the required parameter 'account_id' is set 4712 if ('account_id' not in params) or (params['account_id'] is None): 4713 raise ValueError("Missing the required parameter `account_id` when calling `update`") 4714 # verify the required parameter 'template_id' is set 4715 if ('template_id' not in params) or (params['template_id'] is None): 4716 raise ValueError("Missing the required parameter `template_id` when calling `update`") 4717 4718 4719 collection_formats = {} 4720 4721 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json') 4722 path_params = {} 4723 if 'account_id' in params: 4724 path_params['accountId'] = params['account_id'] 4725 if 'template_id' in params: 4726 path_params['templateId'] = params['template_id'] 4727 4728 query_params = {} 4729 4730 header_params = {} 4731 4732 form_params = [] 4733 local_var_files = {} 4734 4735 body_params = None 4736 if 'envelope_template' in params: 4737 body_params = params['envelope_template'] 4738 # HTTP header `Accept` 4739 header_params['Accept'] = self.api_client.\ 4740 select_header_accept(['application/json']) 4741 4742 # Authentication setting 4743 auth_settings = [] 4744 4745 return self.api_client.call_api(resource_path, 'PUT', 4746 path_params, 4747 query_params, 4748 header_params, 4749 body=body_params, 4750 post_params=form_params, 4751 files=local_var_files, 4752 response_type='TemplateUpdateSummary', 4753 auth_settings=auth_settings, 4754 callback=params.get('callback'), 4755 _return_http_data_only=params.get('_return_http_data_only'), 4756 _preload_content=params.get('_preload_content', True), 4757 _request_timeout=params.get('_request_timeout'), 4758 collection_formats=collection_formats) 4759 4760 def update_custom_fields(self, account_id, template_id, **kwargs): 4761 """ 4762 Updates envelope custom fields in a template. 4763 Updates the custom fields in a template. Each custom field used in a template must have a unique name. 4764 This method makes a synchronous HTTP request by default. To make an 4765 asynchronous HTTP request, please define a `callback` function 4766 to be invoked when receiving the response. 4767 >>> def callback_function(response): 4768 >>> pprint(response) 4769 >>> 4770 >>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function) 4771 4772 :param callback function: The callback function 4773 for asynchronous request. (optional) 4774 :param str account_id: The external account number (int) or account ID Guid. (required) 4775 :param str template_id: The ID of the template being accessed. (required) 4776 :param TemplateCustomFields template_custom_fields: 4777 :return: CustomFields 4778 If the method is called asynchronously, 4779 returns the request thread. 4780 """ 4781 kwargs['_return_http_data_only'] = True 4782 if kwargs.get('callback'): 4783 return self.update_custom_fields_with_http_info(account_id, template_id, **kwargs) 4784 else: 4785 (data) = self.update_custom_fields_with_http_info(account_id, template_id, **kwargs) 4786 return data 4787 4788 def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs): 4789 """ 4790 Updates envelope custom fields in a template. 4791 Updates the custom fields in a template. Each custom field used in a template must have a unique name. 4792 This method makes a synchronous HTTP request by default. To make an 4793 asynchronous HTTP request, please define a `callback` function 4794 to be invoked when receiving the response. 4795 >>> def callback_function(response): 4796 >>> pprint(response) 4797 >>> 4798 >>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function) 4799 4800 :param callback function: The callback function 4801 for asynchronous request. (optional) 4802 :param str account_id: The external account number (int) or account ID Guid. (required) 4803 :param str template_id: The ID of the template being accessed. (required) 4804 :param TemplateCustomFields template_custom_fields: 4805 :return: CustomFields 4806 If the method is called asynchronously, 4807 returns the request thread. 4808 """ 4809 4810 all_params = ['account_id', 'template_id', 'template_custom_fields'] 4811 all_params.append('callback') 4812 all_params.append('_return_http_data_only') 4813 all_params.append('_preload_content') 4814 all_params.append('_request_timeout') 4815 4816 params = locals() 4817 for key, val in iteritems(params['kwargs']): 4818 if key not in all_params: 4819 raise TypeError( 4820 "Got an unexpected keyword argument '%s'" 4821 " to method update_custom_fields" % key 4822 ) 4823 params[key] = val 4824 del params['kwargs'] 4825 # verify the required parameter 'account_id' is set 4826 if ('account_id' not in params) or (params['account_id'] is None): 4827 raise ValueError("Missing the required parameter `account_id` when calling `update_custom_fields`") 4828 # verify the required parameter 'template_id' is set 4829 if ('template_id' not in params) or (params['template_id'] is None): 4830 raise ValueError("Missing the required parameter `template_id` when calling `update_custom_fields`") 4831 4832 4833 collection_formats = {} 4834 4835 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json') 4836 path_params = {} 4837 if 'account_id' in params: 4838 path_params['accountId'] = params['account_id'] 4839 if 'template_id' in params: 4840 path_params['templateId'] = params['template_id'] 4841 4842 query_params = {} 4843 4844 header_params = {} 4845 4846 form_params = [] 4847 local_var_files = {} 4848 4849 body_params = None 4850 if 'template_custom_fields' in params: 4851 body_params = params['template_custom_fields'] 4852 # HTTP header `Accept` 4853 header_params['Accept'] = self.api_client.\ 4854 select_header_accept(['application/json']) 4855 4856 # Authentication setting 4857 auth_settings = [] 4858 4859 return self.api_client.call_api(resource_path, 'PUT', 4860 path_params, 4861 query_params, 4862 header_params, 4863 body=body_params, 4864 post_params=form_params, 4865 files=local_var_files, 4866 response_type='CustomFields', 4867 auth_settings=auth_settings, 4868 callback=params.get('callback'), 4869 _return_http_data_only=params.get('_return_http_data_only'), 4870 _preload_content=params.get('_preload_content', True), 4871 _request_timeout=params.get('_request_timeout'), 4872 collection_formats=collection_formats) 4873 4874 def update_document(self, account_id, document_id, template_id, **kwargs): 4875 """ 4876 Adds a document to a template document. 4877 Adds the specified document to an existing template document. 4878 This method makes a synchronous HTTP request by default. To make an 4879 asynchronous HTTP request, please define a `callback` function 4880 to be invoked when receiving the response. 4881 >>> def callback_function(response): 4882 >>> pprint(response) 4883 >>> 4884 >>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function) 4885 4886 :param callback function: The callback function 4887 for asynchronous request. (optional) 4888 :param str account_id: The external account number (int) or account ID Guid. (required) 4889 :param str document_id: The ID of the document being accessed. (required) 4890 :param str template_id: The ID of the template being accessed. (required) 4891 :param str is_envelope_definition: 4892 :param EnvelopeDefinition envelope_definition: 4893 :return: EnvelopeDocument 4894 If the method is called asynchronously, 4895 returns the request thread. 4896 """ 4897 kwargs['_return_http_data_only'] = True 4898 if kwargs.get('callback'): 4899 return self.update_document_with_http_info(account_id, document_id, template_id, **kwargs) 4900 else: 4901 (data) = self.update_document_with_http_info(account_id, document_id, template_id, **kwargs) 4902 return data 4903 4904 def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs): 4905 """ 4906 Adds a document to a template document. 4907 Adds the specified document to an existing template document. 4908 This method makes a synchronous HTTP request by default. To make an 4909 asynchronous HTTP request, please define a `callback` function 4910 to be invoked when receiving the response. 4911 >>> def callback_function(response): 4912 >>> pprint(response) 4913 >>> 4914 >>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function) 4915 4916 :param callback function: The callback function 4917 for asynchronous request. (optional) 4918 :param str account_id: The external account number (int) or account ID Guid. (required) 4919 :param str document_id: The ID of the document being accessed. (required) 4920 :param str template_id: The ID of the template being accessed. (required) 4921 :param str is_envelope_definition: 4922 :param EnvelopeDefinition envelope_definition: 4923 :return: EnvelopeDocument 4924 If the method is called asynchronously, 4925 returns the request thread. 4926 """ 4927 4928 all_params = ['account_id', 'document_id', 'template_id', 'is_envelope_definition', 'envelope_definition'] 4929 all_params.append('callback') 4930 all_params.append('_return_http_data_only') 4931 all_params.append('_preload_content') 4932 all_params.append('_request_timeout') 4933 4934 params = locals() 4935 for key, val in iteritems(params['kwargs']): 4936 if key not in all_params: 4937 raise TypeError( 4938 "Got an unexpected keyword argument '%s'" 4939 " to method update_document" % key 4940 ) 4941 params[key] = val 4942 del params['kwargs'] 4943 # verify the required parameter 'account_id' is set 4944 if ('account_id' not in params) or (params['account_id'] is None): 4945 raise ValueError("Missing the required parameter `account_id` when calling `update_document`") 4946 # verify the required parameter 'document_id' is set 4947 if ('document_id' not in params) or (params['document_id'] is None): 4948 raise ValueError("Missing the required parameter `document_id` when calling `update_document`") 4949 # verify the required parameter 'template_id' is set 4950 if ('template_id' not in params) or (params['template_id'] is None): 4951 raise ValueError("Missing the required parameter `template_id` when calling `update_document`") 4952 4953 4954 collection_formats = {} 4955 4956 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json') 4957 path_params = {} 4958 if 'account_id' in params: 4959 path_params['accountId'] = params['account_id'] 4960 if 'document_id' in params: 4961 path_params['documentId'] = params['document_id'] 4962 if 'template_id' in params: 4963 path_params['templateId'] = params['template_id'] 4964 4965 query_params = {} 4966 if 'is_envelope_definition' in params: 4967 query_params['is_envelope_definition'] = params['is_envelope_definition'] 4968 4969 header_params = {} 4970 4971 form_params = [] 4972 local_var_files = {} 4973 4974 body_params = None 4975 if 'envelope_definition' in params: 4976 body_params = params['envelope_definition'] 4977 # HTTP header `Accept` 4978 header_params['Accept'] = self.api_client.\ 4979 select_header_accept(['application/json']) 4980 4981 # Authentication setting 4982 auth_settings = [] 4983 4984 return self.api_client.call_api(resource_path, 'PUT', 4985 path_params, 4986 query_params, 4987 header_params, 4988 body=body_params, 4989 post_params=form_params, 4990 files=local_var_files, 4991 response_type='EnvelopeDocument', 4992 auth_settings=auth_settings, 4993 callback=params.get('callback'), 4994 _return_http_data_only=params.get('_return_http_data_only'), 4995 _preload_content=params.get('_preload_content', True), 4996 _request_timeout=params.get('_request_timeout'), 4997 collection_formats=collection_formats) 4998 4999 def update_document_fields(self, account_id, document_id, template_id, **kwargs): 5000 """ 5001 Updates existing custom document fields in an existing template document. 5002 Updates existing custom document fields in an existing template document. 5003 This method makes a synchronous HTTP request by default. To make an 5004 asynchronous HTTP request, please define a `callback` function 5005 to be invoked when receiving the response. 5006 >>> def callback_function(response): 5007 >>> pprint(response) 5008 >>> 5009 >>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function) 5010 5011 :param callback function: The callback function 5012 for asynchronous request. (optional) 5013 :param str account_id: The external account number (int) or account ID Guid. (required) 5014 :param str document_id: The ID of the document being accessed. (required) 5015 :param str template_id: The ID of the template being accessed. (required) 5016 :param DocumentFieldsInformation document_fields_information: 5017 :return: DocumentFieldsInformation 5018 If the method is called asynchronously, 5019 returns the request thread. 5020 """ 5021 kwargs['_return_http_data_only'] = True 5022 if kwargs.get('callback'): 5023 return self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 5024 else: 5025 (data) = self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 5026 return data 5027 5028 def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs): 5029 """ 5030 Updates existing custom document fields in an existing template document. 5031 Updates existing custom document fields in an existing template document. 5032 This method makes a synchronous HTTP request by default. To make an 5033 asynchronous HTTP request, please define a `callback` function 5034 to be invoked when receiving the response. 5035 >>> def callback_function(response): 5036 >>> pprint(response) 5037 >>> 5038 >>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function) 5039 5040 :param callback function: The callback function 5041 for asynchronous request. (optional) 5042 :param str account_id: The external account number (int) or account ID Guid. (required) 5043 :param str document_id: The ID of the document being accessed. (required) 5044 :param str template_id: The ID of the template being accessed. (required) 5045 :param DocumentFieldsInformation document_fields_information: 5046 :return: DocumentFieldsInformation 5047 If the method is called asynchronously, 5048 returns the request thread. 5049 """ 5050 5051 all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information'] 5052 all_params.append('callback') 5053 all_params.append('_return_http_data_only') 5054 all_params.append('_preload_content') 5055 all_params.append('_request_timeout') 5056 5057 params = locals() 5058 for key, val in iteritems(params['kwargs']): 5059 if key not in all_params: 5060 raise TypeError( 5061 "Got an unexpected keyword argument '%s'" 5062 " to method update_document_fields" % key 5063 ) 5064 params[key] = val 5065 del params['kwargs'] 5066 # verify the required parameter 'account_id' is set 5067 if ('account_id' not in params) or (params['account_id'] is None): 5068 raise ValueError("Missing the required parameter `account_id` when calling `update_document_fields`") 5069 # verify the required parameter 'document_id' is set 5070 if ('document_id' not in params) or (params['document_id'] is None): 5071 raise ValueError("Missing the required parameter `document_id` when calling `update_document_fields`") 5072 # verify the required parameter 'template_id' is set 5073 if ('template_id' not in params) or (params['template_id'] is None): 5074 raise ValueError("Missing the required parameter `template_id` when calling `update_document_fields`") 5075 5076 5077 collection_formats = {} 5078 5079 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json') 5080 path_params = {} 5081 if 'account_id' in params: 5082 path_params['accountId'] = params['account_id'] 5083 if 'document_id' in params: 5084 path_params['documentId'] = params['document_id'] 5085 if 'template_id' in params: 5086 path_params['templateId'] = params['template_id'] 5087 5088 query_params = {} 5089 5090 header_params = {} 5091 5092 form_params = [] 5093 local_var_files = {} 5094 5095 body_params = None 5096 if 'document_fields_information' in params: 5097 body_params = params['document_fields_information'] 5098 # HTTP header `Accept` 5099 header_params['Accept'] = self.api_client.\ 5100 select_header_accept(['application/json']) 5101 5102 # Authentication setting 5103 auth_settings = [] 5104 5105 return self.api_client.call_api(resource_path, 'PUT', 5106 path_params, 5107 query_params, 5108 header_params, 5109 body=body_params, 5110 post_params=form_params, 5111 files=local_var_files, 5112 response_type='DocumentFieldsInformation', 5113 auth_settings=auth_settings, 5114 callback=params.get('callback'), 5115 _return_http_data_only=params.get('_return_http_data_only'), 5116 _preload_content=params.get('_preload_content', True), 5117 _request_timeout=params.get('_request_timeout'), 5118 collection_formats=collection_formats) 5119 5120 def update_documents(self, account_id, template_id, **kwargs): 5121 """ 5122 Adds documents to a template document. 5123 Adds one or more documents to an existing template document. 5124 This method makes a synchronous HTTP request by default. To make an 5125 asynchronous HTTP request, please define a `callback` function 5126 to be invoked when receiving the response. 5127 >>> def callback_function(response): 5128 >>> pprint(response) 5129 >>> 5130 >>> thread = api.update_documents(account_id, template_id, callback=callback_function) 5131 5132 :param callback function: The callback function 5133 for asynchronous request. (optional) 5134 :param str account_id: The external account number (int) or account ID Guid. (required) 5135 :param str template_id: The ID of the template being accessed. (required) 5136 :param EnvelopeDefinition envelope_definition: 5137 :return: TemplateDocumentsResult 5138 If the method is called asynchronously, 5139 returns the request thread. 5140 """ 5141 kwargs['_return_http_data_only'] = True 5142 if kwargs.get('callback'): 5143 return self.update_documents_with_http_info(account_id, template_id, **kwargs) 5144 else: 5145 (data) = self.update_documents_with_http_info(account_id, template_id, **kwargs) 5146 return data 5147 5148 def update_documents_with_http_info(self, account_id, template_id, **kwargs): 5149 """ 5150 Adds documents to a template document. 5151 Adds one or more documents to an existing template document. 5152 This method makes a synchronous HTTP request by default. To make an 5153 asynchronous HTTP request, please define a `callback` function 5154 to be invoked when receiving the response. 5155 >>> def callback_function(response): 5156 >>> pprint(response) 5157 >>> 5158 >>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function) 5159 5160 :param callback function: The callback function 5161 for asynchronous request. (optional) 5162 :param str account_id: The external account number (int) or account ID Guid. (required) 5163 :param str template_id: The ID of the template being accessed. (required) 5164 :param EnvelopeDefinition envelope_definition: 5165 :return: TemplateDocumentsResult 5166 If the method is called asynchronously, 5167 returns the request thread. 5168 """ 5169 5170 all_params = ['account_id', 'template_id', 'envelope_definition'] 5171 all_params.append('callback') 5172 all_params.append('_return_http_data_only') 5173 all_params.append('_preload_content') 5174 all_params.append('_request_timeout') 5175 5176 params = locals() 5177 for key, val in iteritems(params['kwargs']): 5178 if key not in all_params: 5179 raise TypeError( 5180 "Got an unexpected keyword argument '%s'" 5181 " to method update_documents" % key 5182 ) 5183 params[key] = val 5184 del params['kwargs'] 5185 # verify the required parameter 'account_id' is set 5186 if ('account_id' not in params) or (params['account_id'] is None): 5187 raise ValueError("Missing the required parameter `account_id` when calling `update_documents`") 5188 # verify the required parameter 'template_id' is set 5189 if ('template_id' not in params) or (params['template_id'] is None): 5190 raise ValueError("Missing the required parameter `template_id` when calling `update_documents`") 5191 5192 5193 collection_formats = {} 5194 5195 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json') 5196 path_params = {} 5197 if 'account_id' in params: 5198 path_params['accountId'] = params['account_id'] 5199 if 'template_id' in params: 5200 path_params['templateId'] = params['template_id'] 5201 5202 query_params = {} 5203 5204 header_params = {} 5205 5206 form_params = [] 5207 local_var_files = {} 5208 5209 body_params = None 5210 if 'envelope_definition' in params: 5211 body_params = params['envelope_definition'] 5212 # HTTP header `Accept` 5213 header_params['Accept'] = self.api_client.\ 5214 select_header_accept(['application/json']) 5215 5216 # Authentication setting 5217 auth_settings = [] 5218 5219 return self.api_client.call_api(resource_path, 'PUT', 5220 path_params, 5221 query_params, 5222 header_params, 5223 body=body_params, 5224 post_params=form_params, 5225 files=local_var_files, 5226 response_type='TemplateDocumentsResult', 5227 auth_settings=auth_settings, 5228 callback=params.get('callback'), 5229 _return_http_data_only=params.get('_return_http_data_only'), 5230 _preload_content=params.get('_preload_content', True), 5231 _request_timeout=params.get('_request_timeout'), 5232 collection_formats=collection_formats) 5233 5234 def update_group_share(self, account_id, template_id, template_part, **kwargs): 5235 """ 5236 Shares a template with a group 5237 Shares a template with the specified members group. 5238 This method makes a synchronous HTTP request by default. To make an 5239 asynchronous HTTP request, please define a `callback` function 5240 to be invoked when receiving the response. 5241 >>> def callback_function(response): 5242 >>> pprint(response) 5243 >>> 5244 >>> thread = api.update_group_share(account_id, template_id, template_part, callback=callback_function) 5245 5246 :param callback function: The callback function 5247 for asynchronous request. (optional) 5248 :param str account_id: The external account number (int) or account ID Guid. (required) 5249 :param str template_id: The ID of the template being accessed. (required) 5250 :param str template_part: Currently, the only defined part is **groups**. (required) 5251 :param GroupInformation group_information: 5252 :return: GroupInformation 5253 If the method is called asynchronously, 5254 returns the request thread. 5255 """ 5256 kwargs['_return_http_data_only'] = True 5257 if kwargs.get('callback'): 5258 return self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs) 5259 else: 5260 (data) = self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs) 5261 return data 5262 5263 def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs): 5264 """ 5265 Shares a template with a group 5266 Shares a template with the specified members group. 5267 This method makes a synchronous HTTP request by default. To make an 5268 asynchronous HTTP request, please define a `callback` function 5269 to be invoked when receiving the response. 5270 >>> def callback_function(response): 5271 >>> pprint(response) 5272 >>> 5273 >>> thread = api.update_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function) 5274 5275 :param callback function: The callback function 5276 for asynchronous request. (optional) 5277 :param str account_id: The external account number (int) or account ID Guid. (required) 5278 :param str template_id: The ID of the template being accessed. (required) 5279 :param str template_part: Currently, the only defined part is **groups**. (required) 5280 :param GroupInformation group_information: 5281 :return: GroupInformation 5282 If the method is called asynchronously, 5283 returns the request thread. 5284 """ 5285 5286 all_params = ['account_id', 'template_id', 'template_part', 'group_information'] 5287 all_params.append('callback') 5288 all_params.append('_return_http_data_only') 5289 all_params.append('_preload_content') 5290 all_params.append('_request_timeout') 5291 5292 params = locals() 5293 for key, val in iteritems(params['kwargs']): 5294 if key not in all_params: 5295 raise TypeError( 5296 "Got an unexpected keyword argument '%s'" 5297 " to method update_group_share" % key 5298 ) 5299 params[key] = val 5300 del params['kwargs'] 5301 # verify the required parameter 'account_id' is set 5302 if ('account_id' not in params) or (params['account_id'] is None): 5303 raise ValueError("Missing the required parameter `account_id` when calling `update_group_share`") 5304 # verify the required parameter 'template_id' is set 5305 if ('template_id' not in params) or (params['template_id'] is None): 5306 raise ValueError("Missing the required parameter `template_id` when calling `update_group_share`") 5307 # verify the required parameter 'template_part' is set 5308 if ('template_part' not in params) or (params['template_part'] is None): 5309 raise ValueError("Missing the required parameter `template_part` when calling `update_group_share`") 5310 5311 5312 collection_formats = {} 5313 5314 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json') 5315 path_params = {} 5316 if 'account_id' in params: 5317 path_params['accountId'] = params['account_id'] 5318 if 'template_id' in params: 5319 path_params['templateId'] = params['template_id'] 5320 if 'template_part' in params: 5321 path_params['templatePart'] = params['template_part'] 5322 5323 query_params = {} 5324 5325 header_params = {} 5326 5327 form_params = [] 5328 local_var_files = {} 5329 5330 body_params = None 5331 if 'group_information' in params: 5332 body_params = params['group_information'] 5333 # HTTP header `Accept` 5334 header_params['Accept'] = self.api_client.\ 5335 select_header_accept(['application/json']) 5336 5337 # Authentication setting 5338 auth_settings = [] 5339 5340 return self.api_client.call_api(resource_path, 'PUT', 5341 path_params, 5342 query_params, 5343 header_params, 5344 body=body_params, 5345 post_params=form_params, 5346 files=local_var_files, 5347 response_type='GroupInformation', 5348 auth_settings=auth_settings, 5349 callback=params.get('callback'), 5350 _return_http_data_only=params.get('_return_http_data_only'), 5351 _preload_content=params.get('_preload_content', True), 5352 _request_timeout=params.get('_request_timeout'), 5353 collection_formats=collection_formats) 5354 5355 def update_lock(self, account_id, template_id, **kwargs): 5356 """ 5357 Updates a template lock. 5358 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. 5359 This method makes a synchronous HTTP request by default. To make an 5360 asynchronous HTTP request, please define a `callback` function 5361 to be invoked when receiving the response. 5362 >>> def callback_function(response): 5363 >>> pprint(response) 5364 >>> 5365 >>> thread = api.update_lock(account_id, template_id, callback=callback_function) 5366 5367 :param callback function: The callback function 5368 for asynchronous request. (optional) 5369 :param str account_id: The external account number (int) or account ID Guid. (required) 5370 :param str template_id: The ID of the template being accessed. (required) 5371 :param LockRequest lock_request: 5372 :return: LockInformation 5373 If the method is called asynchronously, 5374 returns the request thread. 5375 """ 5376 kwargs['_return_http_data_only'] = True 5377 if kwargs.get('callback'): 5378 return self.update_lock_with_http_info(account_id, template_id, **kwargs) 5379 else: 5380 (data) = self.update_lock_with_http_info(account_id, template_id, **kwargs) 5381 return data 5382 5383 def update_lock_with_http_info(self, account_id, template_id, **kwargs): 5384 """ 5385 Updates a template lock. 5386 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. 5387 This method makes a synchronous HTTP request by default. To make an 5388 asynchronous HTTP request, please define a `callback` function 5389 to be invoked when receiving the response. 5390 >>> def callback_function(response): 5391 >>> pprint(response) 5392 >>> 5393 >>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function) 5394 5395 :param callback function: The callback function 5396 for asynchronous request. (optional) 5397 :param str account_id: The external account number (int) or account ID Guid. (required) 5398 :param str template_id: The ID of the template being accessed. (required) 5399 :param LockRequest lock_request: 5400 :return: LockInformation 5401 If the method is called asynchronously, 5402 returns the request thread. 5403 """ 5404 5405 all_params = ['account_id', 'template_id', 'lock_request'] 5406 all_params.append('callback') 5407 all_params.append('_return_http_data_only') 5408 all_params.append('_preload_content') 5409 all_params.append('_request_timeout') 5410 5411 params = locals() 5412 for key, val in iteritems(params['kwargs']): 5413 if key not in all_params: 5414 raise TypeError( 5415 "Got an unexpected keyword argument '%s'" 5416 " to method update_lock" % key 5417 ) 5418 params[key] = val 5419 del params['kwargs'] 5420 # verify the required parameter 'account_id' is set 5421 if ('account_id' not in params) or (params['account_id'] is None): 5422 raise ValueError("Missing the required parameter `account_id` when calling `update_lock`") 5423 # verify the required parameter 'template_id' is set 5424 if ('template_id' not in params) or (params['template_id'] is None): 5425 raise ValueError("Missing the required parameter `template_id` when calling `update_lock`") 5426 5427 5428 collection_formats = {} 5429 5430 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json') 5431 path_params = {} 5432 if 'account_id' in params: 5433 path_params['accountId'] = params['account_id'] 5434 if 'template_id' in params: 5435 path_params['templateId'] = params['template_id'] 5436 5437 query_params = {} 5438 5439 header_params = {} 5440 5441 form_params = [] 5442 local_var_files = {} 5443 5444 body_params = None 5445 if 'lock_request' in params: 5446 body_params = params['lock_request'] 5447 # HTTP header `Accept` 5448 header_params['Accept'] = self.api_client.\ 5449 select_header_accept(['application/json']) 5450 5451 # Authentication setting 5452 auth_settings = [] 5453 5454 return self.api_client.call_api(resource_path, 'PUT', 5455 path_params, 5456 query_params, 5457 header_params, 5458 body=body_params, 5459 post_params=form_params, 5460 files=local_var_files, 5461 response_type='LockInformation', 5462 auth_settings=auth_settings, 5463 callback=params.get('callback'), 5464 _return_http_data_only=params.get('_return_http_data_only'), 5465 _preload_content=params.get('_preload_content', True), 5466 _request_timeout=params.get('_request_timeout'), 5467 collection_formats=collection_formats) 5468 5469 def update_notification_settings(self, account_id, template_id, **kwargs): 5470 """ 5471 Updates the notification structure for an existing template. 5472 Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications. 5473 This method makes a synchronous HTTP request by default. To make an 5474 asynchronous HTTP request, please define a `callback` function 5475 to be invoked when receiving the response. 5476 >>> def callback_function(response): 5477 >>> pprint(response) 5478 >>> 5479 >>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function) 5480 5481 :param callback function: The callback function 5482 for asynchronous request. (optional) 5483 :param str account_id: The external account number (int) or account ID Guid. (required) 5484 :param str template_id: The ID of the template being accessed. (required) 5485 :param TemplateNotificationRequest template_notification_request: 5486 :return: Notification 5487 If the method is called asynchronously, 5488 returns the request thread. 5489 """ 5490 kwargs['_return_http_data_only'] = True 5491 if kwargs.get('callback'): 5492 return self.update_notification_settings_with_http_info(account_id, template_id, **kwargs) 5493 else: 5494 (data) = self.update_notification_settings_with_http_info(account_id, template_id, **kwargs) 5495 return data 5496 5497 def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs): 5498 """ 5499 Updates the notification structure for an existing template. 5500 Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications. 5501 This method makes a synchronous HTTP request by default. To make an 5502 asynchronous HTTP request, please define a `callback` function 5503 to be invoked when receiving the response. 5504 >>> def callback_function(response): 5505 >>> pprint(response) 5506 >>> 5507 >>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function) 5508 5509 :param callback function: The callback function 5510 for asynchronous request. (optional) 5511 :param str account_id: The external account number (int) or account ID Guid. (required) 5512 :param str template_id: The ID of the template being accessed. (required) 5513 :param TemplateNotificationRequest template_notification_request: 5514 :return: Notification 5515 If the method is called asynchronously, 5516 returns the request thread. 5517 """ 5518 5519 all_params = ['account_id', 'template_id', 'template_notification_request'] 5520 all_params.append('callback') 5521 all_params.append('_return_http_data_only') 5522 all_params.append('_preload_content') 5523 all_params.append('_request_timeout') 5524 5525 params = locals() 5526 for key, val in iteritems(params['kwargs']): 5527 if key not in all_params: 5528 raise TypeError( 5529 "Got an unexpected keyword argument '%s'" 5530 " to method update_notification_settings" % key 5531 ) 5532 params[key] = val 5533 del params['kwargs'] 5534 # verify the required parameter 'account_id' is set 5535 if ('account_id' not in params) or (params['account_id'] is None): 5536 raise ValueError("Missing the required parameter `account_id` when calling `update_notification_settings`") 5537 # verify the required parameter 'template_id' is set 5538 if ('template_id' not in params) or (params['template_id'] is None): 5539 raise ValueError("Missing the required parameter `template_id` when calling `update_notification_settings`") 5540 5541 5542 collection_formats = {} 5543 5544 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json') 5545 path_params = {} 5546 if 'account_id' in params: 5547 path_params['accountId'] = params['account_id'] 5548 if 'template_id' in params: 5549 path_params['templateId'] = params['template_id'] 5550 5551 query_params = {} 5552 5553 header_params = {} 5554 5555 form_params = [] 5556 local_var_files = {} 5557 5558 body_params = None 5559 if 'template_notification_request' in params: 5560 body_params = params['template_notification_request'] 5561 # HTTP header `Accept` 5562 header_params['Accept'] = self.api_client.\ 5563 select_header_accept(['application/json']) 5564 5565 # Authentication setting 5566 auth_settings = [] 5567 5568 return self.api_client.call_api(resource_path, 'PUT', 5569 path_params, 5570 query_params, 5571 header_params, 5572 body=body_params, 5573 post_params=form_params, 5574 files=local_var_files, 5575 response_type='Notification', 5576 auth_settings=auth_settings, 5577 callback=params.get('callback'), 5578 _return_http_data_only=params.get('_return_http_data_only'), 5579 _preload_content=params.get('_preload_content', True), 5580 _request_timeout=params.get('_request_timeout'), 5581 collection_formats=collection_formats) 5582 5583 def update_recipients(self, account_id, template_id, **kwargs): 5584 """ 5585 Updates recipients in a template. 5586 Updates recipients in a template. You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. 5587 This method makes a synchronous HTTP request by default. To make an 5588 asynchronous HTTP request, please define a `callback` function 5589 to be invoked when receiving the response. 5590 >>> def callback_function(response): 5591 >>> pprint(response) 5592 >>> 5593 >>> thread = api.update_recipients(account_id, template_id, callback=callback_function) 5594 5595 :param callback function: The callback function 5596 for asynchronous request. (optional) 5597 :param str account_id: The external account number (int) or account ID Guid. (required) 5598 :param str template_id: The ID of the template being accessed. (required) 5599 :param str resend_envelope: 5600 :param TemplateRecipients template_recipients: 5601 :return: RecipientsUpdateSummary 5602 If the method is called asynchronously, 5603 returns the request thread. 5604 """ 5605 kwargs['_return_http_data_only'] = True 5606 if kwargs.get('callback'): 5607 return self.update_recipients_with_http_info(account_id, template_id, **kwargs) 5608 else: 5609 (data) = self.update_recipients_with_http_info(account_id, template_id, **kwargs) 5610 return data 5611 5612 def update_recipients_with_http_info(self, account_id, template_id, **kwargs): 5613 """ 5614 Updates recipients in a template. 5615 Updates recipients in a template. You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. 5616 This method makes a synchronous HTTP request by default. To make an 5617 asynchronous HTTP request, please define a `callback` function 5618 to be invoked when receiving the response. 5619 >>> def callback_function(response): 5620 >>> pprint(response) 5621 >>> 5622 >>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function) 5623 5624 :param callback function: The callback function 5625 for asynchronous request. (optional) 5626 :param str account_id: The external account number (int) or account ID Guid. (required) 5627 :param str template_id: The ID of the template being accessed. (required) 5628 :param str resend_envelope: 5629 :param TemplateRecipients template_recipients: 5630 :return: RecipientsUpdateSummary 5631 If the method is called asynchronously, 5632 returns the request thread. 5633 """ 5634 5635 all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients'] 5636 all_params.append('callback') 5637 all_params.append('_return_http_data_only') 5638 all_params.append('_preload_content') 5639 all_params.append('_request_timeout') 5640 5641 params = locals() 5642 for key, val in iteritems(params['kwargs']): 5643 if key not in all_params: 5644 raise TypeError( 5645 "Got an unexpected keyword argument '%s'" 5646 " to method update_recipients" % key 5647 ) 5648 params[key] = val 5649 del params['kwargs'] 5650 # verify the required parameter 'account_id' is set 5651 if ('account_id' not in params) or (params['account_id'] is None): 5652 raise ValueError("Missing the required parameter `account_id` when calling `update_recipients`") 5653 # verify the required parameter 'template_id' is set 5654 if ('template_id' not in params) or (params['template_id'] is None): 5655 raise ValueError("Missing the required parameter `template_id` when calling `update_recipients`") 5656 5657 5658 collection_formats = {} 5659 5660 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json') 5661 path_params = {} 5662 if 'account_id' in params: 5663 path_params['accountId'] = params['account_id'] 5664 if 'template_id' in params: 5665 path_params['templateId'] = params['template_id'] 5666 5667 query_params = {} 5668 if 'resend_envelope' in params: 5669 query_params['resend_envelope'] = params['resend_envelope'] 5670 5671 header_params = {} 5672 5673 form_params = [] 5674 local_var_files = {} 5675 5676 body_params = None 5677 if 'template_recipients' in params: 5678 body_params = params['template_recipients'] 5679 # HTTP header `Accept` 5680 header_params['Accept'] = self.api_client.\ 5681 select_header_accept(['application/json']) 5682 5683 # Authentication setting 5684 auth_settings = [] 5685 5686 return self.api_client.call_api(resource_path, 'PUT', 5687 path_params, 5688 query_params, 5689 header_params, 5690 body=body_params, 5691 post_params=form_params, 5692 files=local_var_files, 5693 response_type='RecipientsUpdateSummary', 5694 auth_settings=auth_settings, 5695 callback=params.get('callback'), 5696 _return_http_data_only=params.get('_return_http_data_only'), 5697 _preload_content=params.get('_preload_content', True), 5698 _request_timeout=params.get('_request_timeout'), 5699 collection_formats=collection_formats) 5700 5701 def update_tabs(self, account_id, recipient_id, template_id, **kwargs): 5702 """ 5703 Updates the tabs for a recipient. 5704 Updates one or more tabs for a recipient in a template. 5705 This method makes a synchronous HTTP request by default. To make an 5706 asynchronous HTTP request, please define a `callback` function 5707 to be invoked when receiving the response. 5708 >>> def callback_function(response): 5709 >>> pprint(response) 5710 >>> 5711 >>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function) 5712 5713 :param callback function: The callback function 5714 for asynchronous request. (optional) 5715 :param str account_id: The external account number (int) or account ID Guid. (required) 5716 :param str recipient_id: The ID of the recipient being accessed. (required) 5717 :param str template_id: The ID of the template being accessed. (required) 5718 :param TemplateTabs template_tabs: 5719 :return: Tabs 5720 If the method is called asynchronously, 5721 returns the request thread. 5722 """ 5723 kwargs['_return_http_data_only'] = True 5724 if kwargs.get('callback'): 5725 return self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 5726 else: 5727 (data) = self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 5728 return data 5729 5730 def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs): 5731 """ 5732 Updates the tabs for a recipient. 5733 Updates one or more tabs for a recipient in a template. 5734 This method makes a synchronous HTTP request by default. To make an 5735 asynchronous HTTP request, please define a `callback` function 5736 to be invoked when receiving the response. 5737 >>> def callback_function(response): 5738 >>> pprint(response) 5739 >>> 5740 >>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function) 5741 5742 :param callback function: The callback function 5743 for asynchronous request. (optional) 5744 :param str account_id: The external account number (int) or account ID Guid. (required) 5745 :param str recipient_id: The ID of the recipient being accessed. (required) 5746 :param str template_id: The ID of the template being accessed. (required) 5747 :param TemplateTabs template_tabs: 5748 :return: Tabs 5749 If the method is called asynchronously, 5750 returns the request thread. 5751 """ 5752 5753 all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs'] 5754 all_params.append('callback') 5755 all_params.append('_return_http_data_only') 5756 all_params.append('_preload_content') 5757 all_params.append('_request_timeout') 5758 5759 params = locals() 5760 for key, val in iteritems(params['kwargs']): 5761 if key not in all_params: 5762 raise TypeError( 5763 "Got an unexpected keyword argument '%s'" 5764 " to method update_tabs" % key 5765 ) 5766 params[key] = val 5767 del params['kwargs'] 5768 # verify the required parameter 'account_id' is set 5769 if ('account_id' not in params) or (params['account_id'] is None): 5770 raise ValueError("Missing the required parameter `account_id` when calling `update_tabs`") 5771 # verify the required parameter 'recipient_id' is set 5772 if ('recipient_id' not in params) or (params['recipient_id'] is None): 5773 raise ValueError("Missing the required parameter `recipient_id` when calling `update_tabs`") 5774 # verify the required parameter 'template_id' is set 5775 if ('template_id' not in params) or (params['template_id'] is None): 5776 raise ValueError("Missing the required parameter `template_id` when calling `update_tabs`") 5777 5778 5779 collection_formats = {} 5780 5781 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json') 5782 path_params = {} 5783 if 'account_id' in params: 5784 path_params['accountId'] = params['account_id'] 5785 if 'recipient_id' in params: 5786 path_params['recipientId'] = params['recipient_id'] 5787 if 'template_id' in params: 5788 path_params['templateId'] = params['template_id'] 5789 5790 query_params = {} 5791 5792 header_params = {} 5793 5794 form_params = [] 5795 local_var_files = {} 5796 5797 body_params = None 5798 if 'template_tabs' in params: 5799 body_params = params['template_tabs'] 5800 # HTTP header `Accept` 5801 header_params['Accept'] = self.api_client.\ 5802 select_header_accept(['application/json']) 5803 5804 # Authentication setting 5805 auth_settings = [] 5806 5807 return self.api_client.call_api(resource_path, 'PUT', 5808 path_params, 5809 query_params, 5810 header_params, 5811 body=body_params, 5812 post_params=form_params, 5813 files=local_var_files, 5814 response_type='Tabs', 5815 auth_settings=auth_settings, 5816 callback=params.get('callback'), 5817 _return_http_data_only=params.get('_return_http_data_only'), 5818 _preload_content=params.get('_preload_content', True), 5819 _request_timeout=params.get('_request_timeout'), 5820 collection_formats=collection_formats) 5821 5822 def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs): 5823 """ 5824 Updates the tabs for a template 5825 Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 5826 This method makes a synchronous HTTP request by default. To make an 5827 asynchronous HTTP request, please define a `callback` function 5828 to be invoked when receiving the response. 5829 >>> def callback_function(response): 5830 >>> pprint(response) 5831 >>> 5832 >>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function) 5833 5834 :param callback function: The callback function 5835 for asynchronous request. (optional) 5836 :param str account_id: The external account number (int) or account ID Guid. (required) 5837 :param str document_id: The ID of the document being accessed. (required) 5838 :param str template_id: The ID of the template being accessed. (required) 5839 :param TemplateTabs template_tabs: 5840 :return: Tabs 5841 If the method is called asynchronously, 5842 returns the request thread. 5843 """ 5844 kwargs['_return_http_data_only'] = True 5845 if kwargs.get('callback'): 5846 return self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 5847 else: 5848 (data) = self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 5849 return data 5850 5851 def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs): 5852 """ 5853 Updates the tabs for a template 5854 Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 5855 This method makes a synchronous HTTP request by default. To make an 5856 asynchronous HTTP request, please define a `callback` function 5857 to be invoked when receiving the response. 5858 >>> def callback_function(response): 5859 >>> pprint(response) 5860 >>> 5861 >>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function) 5862 5863 :param callback function: The callback function 5864 for asynchronous request. (optional) 5865 :param str account_id: The external account number (int) or account ID Guid. (required) 5866 :param str document_id: The ID of the document being accessed. (required) 5867 :param str template_id: The ID of the template being accessed. (required) 5868 :param TemplateTabs template_tabs: 5869 :return: Tabs 5870 If the method is called asynchronously, 5871 returns the request thread. 5872 """ 5873 5874 all_params = ['account_id', 'document_id', 'template_id', 'template_tabs'] 5875 all_params.append('callback') 5876 all_params.append('_return_http_data_only') 5877 all_params.append('_preload_content') 5878 all_params.append('_request_timeout') 5879 5880 params = locals() 5881 for key, val in iteritems(params['kwargs']): 5882 if key not in all_params: 5883 raise TypeError( 5884 "Got an unexpected keyword argument '%s'" 5885 " to method update_template_document_tabs" % key 5886 ) 5887 params[key] = val 5888 del params['kwargs'] 5889 # verify the required parameter 'account_id' is set 5890 if ('account_id' not in params) or (params['account_id'] is None): 5891 raise ValueError("Missing the required parameter `account_id` when calling `update_template_document_tabs`") 5892 # verify the required parameter 'document_id' is set 5893 if ('document_id' not in params) or (params['document_id'] is None): 5894 raise ValueError("Missing the required parameter `document_id` when calling `update_template_document_tabs`") 5895 # verify the required parameter 'template_id' is set 5896 if ('template_id' not in params) or (params['template_id'] is None): 5897 raise ValueError("Missing the required parameter `template_id` when calling `update_template_document_tabs`") 5898 5899 5900 collection_formats = {} 5901 5902 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json') 5903 path_params = {} 5904 if 'account_id' in params: 5905 path_params['accountId'] = params['account_id'] 5906 if 'document_id' in params: 5907 path_params['documentId'] = params['document_id'] 5908 if 'template_id' in params: 5909 path_params['templateId'] = params['template_id'] 5910 5911 query_params = {} 5912 5913 header_params = {} 5914 5915 form_params = [] 5916 local_var_files = {} 5917 5918 body_params = None 5919 if 'template_tabs' in params: 5920 body_params = params['template_tabs'] 5921 # HTTP header `Accept` 5922 header_params['Accept'] = self.api_client.\ 5923 select_header_accept(['application/json']) 5924 5925 # Authentication setting 5926 auth_settings = [] 5927 5928 return self.api_client.call_api(resource_path, 'PUT', 5929 path_params, 5930 query_params, 5931 header_params, 5932 body=body_params, 5933 post_params=form_params, 5934 files=local_var_files, 5935 response_type='Tabs', 5936 auth_settings=auth_settings, 5937 callback=params.get('callback'), 5938 _return_http_data_only=params.get('_return_http_data_only'), 5939 _preload_content=params.get('_preload_content', True), 5940 _request_timeout=params.get('_request_timeout'), 5941 collection_formats=collection_formats) 5942 5943 def update_templates(self, account_id, **kwargs): 5944 """ 5945 Update template autoMatch setting. 5946 This method makes a synchronous HTTP request by default. To make an 5947 asynchronous HTTP request, please define a `callback` function 5948 to be invoked when receiving the response. 5949 >>> def callback_function(response): 5950 >>> pprint(response) 5951 >>> 5952 >>> thread = api.update_templates(account_id, callback=callback_function) 5953 5954 :param callback function: The callback function 5955 for asynchronous request. (optional) 5956 :param str account_id: The external account number (int) or account ID Guid. (required) 5957 :param TemplateAutoMatchList template_auto_match_list: 5958 :return: TemplateAutoMatchList 5959 If the method is called asynchronously, 5960 returns the request thread. 5961 """ 5962 kwargs['_return_http_data_only'] = True 5963 if kwargs.get('callback'): 5964 return self.update_templates_with_http_info(account_id, **kwargs) 5965 else: 5966 (data) = self.update_templates_with_http_info(account_id, **kwargs) 5967 return data 5968 5969 def update_templates_with_http_info(self, account_id, **kwargs): 5970 """ 5971 Update template autoMatch setting. 5972 This method makes a synchronous HTTP request by default. To make an 5973 asynchronous HTTP request, please define a `callback` function 5974 to be invoked when receiving the response. 5975 >>> def callback_function(response): 5976 >>> pprint(response) 5977 >>> 5978 >>> thread = api.update_templates_with_http_info(account_id, callback=callback_function) 5979 5980 :param callback function: The callback function 5981 for asynchronous request. (optional) 5982 :param str account_id: The external account number (int) or account ID Guid. (required) 5983 :param TemplateAutoMatchList template_auto_match_list: 5984 :return: TemplateAutoMatchList 5985 If the method is called asynchronously, 5986 returns the request thread. 5987 """ 5988 5989 all_params = ['account_id', 'template_auto_match_list'] 5990 all_params.append('callback') 5991 all_params.append('_return_http_data_only') 5992 all_params.append('_preload_content') 5993 all_params.append('_request_timeout') 5994 5995 params = locals() 5996 for key, val in iteritems(params['kwargs']): 5997 if key not in all_params: 5998 raise TypeError( 5999 "Got an unexpected keyword argument '%s'" 6000 " to method update_templates" % key 6001 ) 6002 params[key] = val 6003 del params['kwargs'] 6004 # verify the required parameter 'account_id' is set 6005 if ('account_id' not in params) or (params['account_id'] is None): 6006 raise ValueError("Missing the required parameter `account_id` when calling `update_templates`") 6007 6008 6009 collection_formats = {} 6010 6011 resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json') 6012 path_params = {} 6013 if 'account_id' in params: 6014 path_params['accountId'] = params['account_id'] 6015 6016 query_params = {} 6017 6018 header_params = {} 6019 6020 form_params = [] 6021 local_var_files = {} 6022 6023 body_params = None 6024 if 'template_auto_match_list' in params: 6025 body_params = params['template_auto_match_list'] 6026 # HTTP header `Accept` 6027 header_params['Accept'] = self.api_client.\ 6028 select_header_accept(['application/json']) 6029 6030 # Authentication setting 6031 auth_settings = [] 6032 6033 return self.api_client.call_api(resource_path, 'PUT', 6034 path_params, 6035 query_params, 6036 header_params, 6037 body=body_params, 6038 post_params=form_params, 6039 files=local_var_files, 6040 response_type='TemplateAutoMatchList', 6041 auth_settings=auth_settings, 6042 callback=params.get('callback'), 6043 _return_http_data_only=params.get('_return_http_data_only'), 6044 _preload_content=params.get('_preload_content', True), 6045 _request_timeout=params.get('_request_timeout'), 6046 collection_formats=collection_formats) 6047 6048 def update_templates_auto_match(self, account_id, **kwargs): 6049 """ 6050 Update template autoMatch setting. 6051 This method makes a synchronous HTTP request by default. To make an 6052 asynchronous HTTP request, please define a `callback` function 6053 to be invoked when receiving the response. 6054 >>> def callback_function(response): 6055 >>> pprint(response) 6056 >>> 6057 >>> thread = api.update_templates_auto_match(account_id, callback=callback_function) 6058 6059 :param callback function: The callback function 6060 for asynchronous request. (optional) 6061 :param str account_id: The external account number (int) or account ID Guid. (required) 6062 :param TemplateAutoMatchList template_auto_match_list: 6063 :return: TemplateAutoMatchList 6064 If the method is called asynchronously, 6065 returns the request thread. 6066 """ 6067 kwargs['_return_http_data_only'] = True 6068 if kwargs.get('callback'): 6069 return self.update_templates_auto_match_with_http_info(account_id, **kwargs) 6070 else: 6071 (data) = self.update_templates_auto_match_with_http_info(account_id, **kwargs) 6072 return data 6073 6074 def update_templates_auto_match_with_http_info(self, account_id, **kwargs): 6075 """ 6076 Update template autoMatch setting. 6077 This method makes a synchronous HTTP request by default. To make an 6078 asynchronous HTTP request, please define a `callback` function 6079 to be invoked when receiving the response. 6080 >>> def callback_function(response): 6081 >>> pprint(response) 6082 >>> 6083 >>> thread = api.update_templates_auto_match_with_http_info(account_id, callback=callback_function) 6084 6085 :param callback function: The callback function 6086 for asynchronous request. (optional) 6087 :param str account_id: The external account number (int) or account ID Guid. (required) 6088 :param TemplateAutoMatchList template_auto_match_list: 6089 :return: TemplateAutoMatchList 6090 If the method is called asynchronously, 6091 returns the request thread. 6092 """ 6093 6094 all_params = ['account_id', 'template_auto_match_list'] 6095 all_params.append('callback') 6096 all_params.append('_return_http_data_only') 6097 all_params.append('_preload_content') 6098 all_params.append('_request_timeout') 6099 6100 params = locals() 6101 for key, val in iteritems(params['kwargs']): 6102 if key not in all_params: 6103 raise TypeError( 6104 "Got an unexpected keyword argument '%s'" 6105 " to method update_templates_auto_match" % key 6106 ) 6107 params[key] = val 6108 del params['kwargs'] 6109 # verify the required parameter 'account_id' is set 6110 if ('account_id' not in params) or (params['account_id'] is None): 6111 raise ValueError("Missing the required parameter `account_id` when calling `update_templates_auto_match`") 6112 6113 6114 collection_formats = {} 6115 6116 resource_path = '/v2.1/accounts/{accountId}/templates/auto_match'.replace('{format}', 'json') 6117 path_params = {} 6118 if 'account_id' in params: 6119 path_params['accountId'] = params['account_id'] 6120 6121 query_params = {} 6122 6123 header_params = {} 6124 6125 form_params = [] 6126 local_var_files = {} 6127 6128 body_params = None 6129 if 'template_auto_match_list' in params: 6130 body_params = params['template_auto_match_list'] 6131 # HTTP header `Accept` 6132 header_params['Accept'] = self.api_client.\ 6133 select_header_accept(['application/json']) 6134 6135 # Authentication setting 6136 auth_settings = [] 6137 6138 return self.api_client.call_api(resource_path, 'PUT', 6139 path_params, 6140 query_params, 6141 header_params, 6142 body=body_params, 6143 post_params=form_params, 6144 files=local_var_files, 6145 response_type='TemplateAutoMatchList', 6146 auth_settings=auth_settings, 6147 callback=params.get('callback'), 6148 _return_http_data_only=params.get('_return_http_data_only'), 6149 _preload_content=params.get('_preload_content', True), 6150 _request_timeout=params.get('_request_timeout'), 6151 collection_formats=collection_formats)
28class TemplatesApi(object): 29 """ 30 NOTE: This class is auto generated by the swagger code generator program. 31 Do not edit the class manually. 32 Ref: https://github.com/swagger-api/swagger-codegen 33 """ 34 35 def __init__(self, api_client=None): 36 config = Configuration() 37 if api_client: 38 self.api_client = api_client 39 else: 40 if not config.api_client: 41 config.api_client = ApiClient() 42 self.api_client = config.api_client 43 44 def create_custom_fields(self, account_id, template_id, **kwargs): 45 """ 46 Creates custom document fields in an existing template document. 47 Creates custom document fields in an existing template document. 48 This method makes a synchronous HTTP request by default. To make an 49 asynchronous HTTP request, please define a `callback` function 50 to be invoked when receiving the response. 51 >>> def callback_function(response): 52 >>> pprint(response) 53 >>> 54 >>> thread = api.create_custom_fields(account_id, template_id, callback=callback_function) 55 56 :param callback function: The callback function 57 for asynchronous request. (optional) 58 :param str account_id: The external account number (int) or account ID Guid. (required) 59 :param str template_id: The ID of the template being accessed. (required) 60 :param TemplateCustomFields template_custom_fields: 61 :return: CustomFields 62 If the method is called asynchronously, 63 returns the request thread. 64 """ 65 kwargs['_return_http_data_only'] = True 66 if kwargs.get('callback'): 67 return self.create_custom_fields_with_http_info(account_id, template_id, **kwargs) 68 else: 69 (data) = self.create_custom_fields_with_http_info(account_id, template_id, **kwargs) 70 return data 71 72 def create_custom_fields_with_http_info(self, account_id, template_id, **kwargs): 73 """ 74 Creates custom document fields in an existing template document. 75 Creates custom document fields in an existing template document. 76 This method makes a synchronous HTTP request by default. To make an 77 asynchronous HTTP request, please define a `callback` function 78 to be invoked when receiving the response. 79 >>> def callback_function(response): 80 >>> pprint(response) 81 >>> 82 >>> thread = api.create_custom_fields_with_http_info(account_id, template_id, callback=callback_function) 83 84 :param callback function: The callback function 85 for asynchronous request. (optional) 86 :param str account_id: The external account number (int) or account ID Guid. (required) 87 :param str template_id: The ID of the template being accessed. (required) 88 :param TemplateCustomFields template_custom_fields: 89 :return: CustomFields 90 If the method is called asynchronously, 91 returns the request thread. 92 """ 93 94 all_params = ['account_id', 'template_id', 'template_custom_fields'] 95 all_params.append('callback') 96 all_params.append('_return_http_data_only') 97 all_params.append('_preload_content') 98 all_params.append('_request_timeout') 99 100 params = locals() 101 for key, val in iteritems(params['kwargs']): 102 if key not in all_params: 103 raise TypeError( 104 "Got an unexpected keyword argument '%s'" 105 " to method create_custom_fields" % key 106 ) 107 params[key] = val 108 del params['kwargs'] 109 # verify the required parameter 'account_id' is set 110 if ('account_id' not in params) or (params['account_id'] is None): 111 raise ValueError("Missing the required parameter `account_id` when calling `create_custom_fields`") 112 # verify the required parameter 'template_id' is set 113 if ('template_id' not in params) or (params['template_id'] is None): 114 raise ValueError("Missing the required parameter `template_id` when calling `create_custom_fields`") 115 116 117 collection_formats = {} 118 119 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json') 120 path_params = {} 121 if 'account_id' in params: 122 path_params['accountId'] = params['account_id'] 123 if 'template_id' in params: 124 path_params['templateId'] = params['template_id'] 125 126 query_params = {} 127 128 header_params = {} 129 130 form_params = [] 131 local_var_files = {} 132 133 body_params = None 134 if 'template_custom_fields' in params: 135 body_params = params['template_custom_fields'] 136 # HTTP header `Accept` 137 header_params['Accept'] = self.api_client.\ 138 select_header_accept(['application/json']) 139 140 # Authentication setting 141 auth_settings = [] 142 143 return self.api_client.call_api(resource_path, 'POST', 144 path_params, 145 query_params, 146 header_params, 147 body=body_params, 148 post_params=form_params, 149 files=local_var_files, 150 response_type='CustomFields', 151 auth_settings=auth_settings, 152 callback=params.get('callback'), 153 _return_http_data_only=params.get('_return_http_data_only'), 154 _preload_content=params.get('_preload_content', True), 155 _request_timeout=params.get('_request_timeout'), 156 collection_formats=collection_formats) 157 158 def create_document_fields(self, account_id, document_id, template_id, **kwargs): 159 """ 160 Creates custom document fields in an existing template document. 161 Creates custom document fields in an existing template document. 162 This method makes a synchronous HTTP request by default. To make an 163 asynchronous HTTP request, please define a `callback` function 164 to be invoked when receiving the response. 165 >>> def callback_function(response): 166 >>> pprint(response) 167 >>> 168 >>> thread = api.create_document_fields(account_id, document_id, template_id, callback=callback_function) 169 170 :param callback function: The callback function 171 for asynchronous request. (optional) 172 :param str account_id: The external account number (int) or account ID Guid. (required) 173 :param str document_id: The ID of the document being accessed. (required) 174 :param str template_id: The ID of the template being accessed. (required) 175 :param DocumentFieldsInformation document_fields_information: 176 :return: DocumentFieldsInformation 177 If the method is called asynchronously, 178 returns the request thread. 179 """ 180 kwargs['_return_http_data_only'] = True 181 if kwargs.get('callback'): 182 return self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 183 else: 184 (data) = self.create_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 185 return data 186 187 def create_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs): 188 """ 189 Creates custom document fields in an existing template document. 190 Creates custom document fields in an existing template document. 191 This method makes a synchronous HTTP request by default. To make an 192 asynchronous HTTP request, please define a `callback` function 193 to be invoked when receiving the response. 194 >>> def callback_function(response): 195 >>> pprint(response) 196 >>> 197 >>> thread = api.create_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function) 198 199 :param callback function: The callback function 200 for asynchronous request. (optional) 201 :param str account_id: The external account number (int) or account ID Guid. (required) 202 :param str document_id: The ID of the document being accessed. (required) 203 :param str template_id: The ID of the template being accessed. (required) 204 :param DocumentFieldsInformation document_fields_information: 205 :return: DocumentFieldsInformation 206 If the method is called asynchronously, 207 returns the request thread. 208 """ 209 210 all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information'] 211 all_params.append('callback') 212 all_params.append('_return_http_data_only') 213 all_params.append('_preload_content') 214 all_params.append('_request_timeout') 215 216 params = locals() 217 for key, val in iteritems(params['kwargs']): 218 if key not in all_params: 219 raise TypeError( 220 "Got an unexpected keyword argument '%s'" 221 " to method create_document_fields" % key 222 ) 223 params[key] = val 224 del params['kwargs'] 225 # verify the required parameter 'account_id' is set 226 if ('account_id' not in params) or (params['account_id'] is None): 227 raise ValueError("Missing the required parameter `account_id` when calling `create_document_fields`") 228 # verify the required parameter 'document_id' is set 229 if ('document_id' not in params) or (params['document_id'] is None): 230 raise ValueError("Missing the required parameter `document_id` when calling `create_document_fields`") 231 # verify the required parameter 'template_id' is set 232 if ('template_id' not in params) or (params['template_id'] is None): 233 raise ValueError("Missing the required parameter `template_id` when calling `create_document_fields`") 234 235 236 collection_formats = {} 237 238 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json') 239 path_params = {} 240 if 'account_id' in params: 241 path_params['accountId'] = params['account_id'] 242 if 'document_id' in params: 243 path_params['documentId'] = params['document_id'] 244 if 'template_id' in params: 245 path_params['templateId'] = params['template_id'] 246 247 query_params = {} 248 249 header_params = {} 250 251 form_params = [] 252 local_var_files = {} 253 254 body_params = None 255 if 'document_fields_information' in params: 256 body_params = params['document_fields_information'] 257 # HTTP header `Accept` 258 header_params['Accept'] = self.api_client.\ 259 select_header_accept(['application/json']) 260 261 # Authentication setting 262 auth_settings = [] 263 264 return self.api_client.call_api(resource_path, 'POST', 265 path_params, 266 query_params, 267 header_params, 268 body=body_params, 269 post_params=form_params, 270 files=local_var_files, 271 response_type='DocumentFieldsInformation', 272 auth_settings=auth_settings, 273 callback=params.get('callback'), 274 _return_http_data_only=params.get('_return_http_data_only'), 275 _preload_content=params.get('_preload_content', True), 276 _request_timeout=params.get('_request_timeout'), 277 collection_formats=collection_formats) 278 279 def create_edit_view(self, account_id, template_id, **kwargs): 280 """ 281 Provides a URL to start an edit view of the Template UI 282 This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI. 283 This method makes a synchronous HTTP request by default. To make an 284 asynchronous HTTP request, please define a `callback` function 285 to be invoked when receiving the response. 286 >>> def callback_function(response): 287 >>> pprint(response) 288 >>> 289 >>> thread = api.create_edit_view(account_id, template_id, callback=callback_function) 290 291 :param callback function: The callback function 292 for asynchronous request. (optional) 293 :param str account_id: The external account number (int) or account ID Guid. (required) 294 :param str template_id: The ID of the template being accessed. (required) 295 :param TemplateViewRequest template_view_request: 296 :return: ViewUrl 297 If the method is called asynchronously, 298 returns the request thread. 299 """ 300 kwargs['_return_http_data_only'] = True 301 if kwargs.get('callback'): 302 return self.create_edit_view_with_http_info(account_id, template_id, **kwargs) 303 else: 304 (data) = self.create_edit_view_with_http_info(account_id, template_id, **kwargs) 305 return data 306 307 def create_edit_view_with_http_info(self, account_id, template_id, **kwargs): 308 """ 309 Provides a URL to start an edit view of the Template UI 310 This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI. 311 This method makes a synchronous HTTP request by default. To make an 312 asynchronous HTTP request, please define a `callback` function 313 to be invoked when receiving the response. 314 >>> def callback_function(response): 315 >>> pprint(response) 316 >>> 317 >>> thread = api.create_edit_view_with_http_info(account_id, template_id, callback=callback_function) 318 319 :param callback function: The callback function 320 for asynchronous request. (optional) 321 :param str account_id: The external account number (int) or account ID Guid. (required) 322 :param str template_id: The ID of the template being accessed. (required) 323 :param TemplateViewRequest template_view_request: 324 :return: ViewUrl 325 If the method is called asynchronously, 326 returns the request thread. 327 """ 328 329 all_params = ['account_id', 'template_id', 'template_view_request'] 330 all_params.append('callback') 331 all_params.append('_return_http_data_only') 332 all_params.append('_preload_content') 333 all_params.append('_request_timeout') 334 335 params = locals() 336 for key, val in iteritems(params['kwargs']): 337 if key not in all_params: 338 raise TypeError( 339 "Got an unexpected keyword argument '%s'" 340 " to method create_edit_view" % key 341 ) 342 params[key] = val 343 del params['kwargs'] 344 # verify the required parameter 'account_id' is set 345 if ('account_id' not in params) or (params['account_id'] is None): 346 raise ValueError("Missing the required parameter `account_id` when calling `create_edit_view`") 347 # verify the required parameter 'template_id' is set 348 if ('template_id' not in params) or (params['template_id'] is None): 349 raise ValueError("Missing the required parameter `template_id` when calling `create_edit_view`") 350 351 352 collection_formats = {} 353 354 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/edit'.replace('{format}', 'json') 355 path_params = {} 356 if 'account_id' in params: 357 path_params['accountId'] = params['account_id'] 358 if 'template_id' in params: 359 path_params['templateId'] = params['template_id'] 360 361 query_params = {} 362 363 header_params = {} 364 365 form_params = [] 366 local_var_files = {} 367 368 body_params = None 369 if 'template_view_request' in params: 370 body_params = params['template_view_request'] 371 # HTTP header `Accept` 372 header_params['Accept'] = self.api_client.\ 373 select_header_accept(['application/json']) 374 375 # Authentication setting 376 auth_settings = [] 377 378 return self.api_client.call_api(resource_path, 'POST', 379 path_params, 380 query_params, 381 header_params, 382 body=body_params, 383 post_params=form_params, 384 files=local_var_files, 385 response_type='ViewUrl', 386 auth_settings=auth_settings, 387 callback=params.get('callback'), 388 _return_http_data_only=params.get('_return_http_data_only'), 389 _preload_content=params.get('_preload_content', True), 390 _request_timeout=params.get('_request_timeout'), 391 collection_formats=collection_formats) 392 393 def create_lock(self, account_id, template_id, **kwargs): 394 """ 395 Lock a template. 396 Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template. ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user). 397 This method makes a synchronous HTTP request by default. To make an 398 asynchronous HTTP request, please define a `callback` function 399 to be invoked when receiving the response. 400 >>> def callback_function(response): 401 >>> pprint(response) 402 >>> 403 >>> thread = api.create_lock(account_id, template_id, callback=callback_function) 404 405 :param callback function: The callback function 406 for asynchronous request. (optional) 407 :param str account_id: The external account number (int) or account ID Guid. (required) 408 :param str template_id: The ID of the template being accessed. (required) 409 :param LockRequest lock_request: 410 :return: LockInformation 411 If the method is called asynchronously, 412 returns the request thread. 413 """ 414 kwargs['_return_http_data_only'] = True 415 if kwargs.get('callback'): 416 return self.create_lock_with_http_info(account_id, template_id, **kwargs) 417 else: 418 (data) = self.create_lock_with_http_info(account_id, template_id, **kwargs) 419 return data 420 421 def create_lock_with_http_info(self, account_id, template_id, **kwargs): 422 """ 423 Lock a template. 424 Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template. ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user). 425 This method makes a synchronous HTTP request by default. To make an 426 asynchronous HTTP request, please define a `callback` function 427 to be invoked when receiving the response. 428 >>> def callback_function(response): 429 >>> pprint(response) 430 >>> 431 >>> thread = api.create_lock_with_http_info(account_id, template_id, callback=callback_function) 432 433 :param callback function: The callback function 434 for asynchronous request. (optional) 435 :param str account_id: The external account number (int) or account ID Guid. (required) 436 :param str template_id: The ID of the template being accessed. (required) 437 :param LockRequest lock_request: 438 :return: LockInformation 439 If the method is called asynchronously, 440 returns the request thread. 441 """ 442 443 all_params = ['account_id', 'template_id', 'lock_request'] 444 all_params.append('callback') 445 all_params.append('_return_http_data_only') 446 all_params.append('_preload_content') 447 all_params.append('_request_timeout') 448 449 params = locals() 450 for key, val in iteritems(params['kwargs']): 451 if key not in all_params: 452 raise TypeError( 453 "Got an unexpected keyword argument '%s'" 454 " to method create_lock" % key 455 ) 456 params[key] = val 457 del params['kwargs'] 458 # verify the required parameter 'account_id' is set 459 if ('account_id' not in params) or (params['account_id'] is None): 460 raise ValueError("Missing the required parameter `account_id` when calling `create_lock`") 461 # verify the required parameter 'template_id' is set 462 if ('template_id' not in params) or (params['template_id'] is None): 463 raise ValueError("Missing the required parameter `template_id` when calling `create_lock`") 464 465 466 collection_formats = {} 467 468 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json') 469 path_params = {} 470 if 'account_id' in params: 471 path_params['accountId'] = params['account_id'] 472 if 'template_id' in params: 473 path_params['templateId'] = params['template_id'] 474 475 query_params = {} 476 477 header_params = {} 478 479 form_params = [] 480 local_var_files = {} 481 482 body_params = None 483 if 'lock_request' in params: 484 body_params = params['lock_request'] 485 # HTTP header `Accept` 486 header_params['Accept'] = self.api_client.\ 487 select_header_accept(['application/json']) 488 489 # Authentication setting 490 auth_settings = [] 491 492 return self.api_client.call_api(resource_path, 'POST', 493 path_params, 494 query_params, 495 header_params, 496 body=body_params, 497 post_params=form_params, 498 files=local_var_files, 499 response_type='LockInformation', 500 auth_settings=auth_settings, 501 callback=params.get('callback'), 502 _return_http_data_only=params.get('_return_http_data_only'), 503 _preload_content=params.get('_preload_content', True), 504 _request_timeout=params.get('_request_timeout'), 505 collection_formats=collection_formats) 506 507 def create_recipients(self, account_id, template_id, **kwargs): 508 """ 509 Adds tabs for a recipient. 510 Adds one or more recipients to a template. 511 This method makes a synchronous HTTP request by default. To make an 512 asynchronous HTTP request, please define a `callback` function 513 to be invoked when receiving the response. 514 >>> def callback_function(response): 515 >>> pprint(response) 516 >>> 517 >>> thread = api.create_recipients(account_id, template_id, callback=callback_function) 518 519 :param callback function: The callback function 520 for asynchronous request. (optional) 521 :param str account_id: The external account number (int) or account ID Guid. (required) 522 :param str template_id: The ID of the template being accessed. (required) 523 :param str resend_envelope: 524 :param TemplateRecipients template_recipients: 525 :return: Recipients 526 If the method is called asynchronously, 527 returns the request thread. 528 """ 529 kwargs['_return_http_data_only'] = True 530 if kwargs.get('callback'): 531 return self.create_recipients_with_http_info(account_id, template_id, **kwargs) 532 else: 533 (data) = self.create_recipients_with_http_info(account_id, template_id, **kwargs) 534 return data 535 536 def create_recipients_with_http_info(self, account_id, template_id, **kwargs): 537 """ 538 Adds tabs for a recipient. 539 Adds one or more recipients to a template. 540 This method makes a synchronous HTTP request by default. To make an 541 asynchronous HTTP request, please define a `callback` function 542 to be invoked when receiving the response. 543 >>> def callback_function(response): 544 >>> pprint(response) 545 >>> 546 >>> thread = api.create_recipients_with_http_info(account_id, template_id, callback=callback_function) 547 548 :param callback function: The callback function 549 for asynchronous request. (optional) 550 :param str account_id: The external account number (int) or account ID Guid. (required) 551 :param str template_id: The ID of the template being accessed. (required) 552 :param str resend_envelope: 553 :param TemplateRecipients template_recipients: 554 :return: Recipients 555 If the method is called asynchronously, 556 returns the request thread. 557 """ 558 559 all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients'] 560 all_params.append('callback') 561 all_params.append('_return_http_data_only') 562 all_params.append('_preload_content') 563 all_params.append('_request_timeout') 564 565 params = locals() 566 for key, val in iteritems(params['kwargs']): 567 if key not in all_params: 568 raise TypeError( 569 "Got an unexpected keyword argument '%s'" 570 " to method create_recipients" % key 571 ) 572 params[key] = val 573 del params['kwargs'] 574 # verify the required parameter 'account_id' is set 575 if ('account_id' not in params) or (params['account_id'] is None): 576 raise ValueError("Missing the required parameter `account_id` when calling `create_recipients`") 577 # verify the required parameter 'template_id' is set 578 if ('template_id' not in params) or (params['template_id'] is None): 579 raise ValueError("Missing the required parameter `template_id` when calling `create_recipients`") 580 581 582 collection_formats = {} 583 584 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json') 585 path_params = {} 586 if 'account_id' in params: 587 path_params['accountId'] = params['account_id'] 588 if 'template_id' in params: 589 path_params['templateId'] = params['template_id'] 590 591 query_params = {} 592 if 'resend_envelope' in params: 593 query_params['resend_envelope'] = params['resend_envelope'] 594 595 header_params = {} 596 597 form_params = [] 598 local_var_files = {} 599 600 body_params = None 601 if 'template_recipients' in params: 602 body_params = params['template_recipients'] 603 # HTTP header `Accept` 604 header_params['Accept'] = self.api_client.\ 605 select_header_accept(['application/json']) 606 607 # Authentication setting 608 auth_settings = [] 609 610 return self.api_client.call_api(resource_path, 'POST', 611 path_params, 612 query_params, 613 header_params, 614 body=body_params, 615 post_params=form_params, 616 files=local_var_files, 617 response_type='Recipients', 618 auth_settings=auth_settings, 619 callback=params.get('callback'), 620 _return_http_data_only=params.get('_return_http_data_only'), 621 _preload_content=params.get('_preload_content', True), 622 _request_timeout=params.get('_request_timeout'), 623 collection_formats=collection_formats) 624 625 def create_tabs(self, account_id, recipient_id, template_id, **kwargs): 626 """ 627 Adds tabs for a recipient. 628 Adds one or more tabs for a recipient. 629 This method makes a synchronous HTTP request by default. To make an 630 asynchronous HTTP request, please define a `callback` function 631 to be invoked when receiving the response. 632 >>> def callback_function(response): 633 >>> pprint(response) 634 >>> 635 >>> thread = api.create_tabs(account_id, recipient_id, template_id, callback=callback_function) 636 637 :param callback function: The callback function 638 for asynchronous request. (optional) 639 :param str account_id: The external account number (int) or account ID Guid. (required) 640 :param str recipient_id: The ID of the recipient being accessed. (required) 641 :param str template_id: The ID of the template being accessed. (required) 642 :param TemplateTabs template_tabs: 643 :return: Tabs 644 If the method is called asynchronously, 645 returns the request thread. 646 """ 647 kwargs['_return_http_data_only'] = True 648 if kwargs.get('callback'): 649 return self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 650 else: 651 (data) = self.create_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 652 return data 653 654 def create_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs): 655 """ 656 Adds tabs for a recipient. 657 Adds one or more tabs for a recipient. 658 This method makes a synchronous HTTP request by default. To make an 659 asynchronous HTTP request, please define a `callback` function 660 to be invoked when receiving the response. 661 >>> def callback_function(response): 662 >>> pprint(response) 663 >>> 664 >>> thread = api.create_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function) 665 666 :param callback function: The callback function 667 for asynchronous request. (optional) 668 :param str account_id: The external account number (int) or account ID Guid. (required) 669 :param str recipient_id: The ID of the recipient being accessed. (required) 670 :param str template_id: The ID of the template being accessed. (required) 671 :param TemplateTabs template_tabs: 672 :return: Tabs 673 If the method is called asynchronously, 674 returns the request thread. 675 """ 676 677 all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs'] 678 all_params.append('callback') 679 all_params.append('_return_http_data_only') 680 all_params.append('_preload_content') 681 all_params.append('_request_timeout') 682 683 params = locals() 684 for key, val in iteritems(params['kwargs']): 685 if key not in all_params: 686 raise TypeError( 687 "Got an unexpected keyword argument '%s'" 688 " to method create_tabs" % key 689 ) 690 params[key] = val 691 del params['kwargs'] 692 # verify the required parameter 'account_id' is set 693 if ('account_id' not in params) or (params['account_id'] is None): 694 raise ValueError("Missing the required parameter `account_id` when calling `create_tabs`") 695 # verify the required parameter 'recipient_id' is set 696 if ('recipient_id' not in params) or (params['recipient_id'] is None): 697 raise ValueError("Missing the required parameter `recipient_id` when calling `create_tabs`") 698 # verify the required parameter 'template_id' is set 699 if ('template_id' not in params) or (params['template_id'] is None): 700 raise ValueError("Missing the required parameter `template_id` when calling `create_tabs`") 701 702 703 collection_formats = {} 704 705 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json') 706 path_params = {} 707 if 'account_id' in params: 708 path_params['accountId'] = params['account_id'] 709 if 'recipient_id' in params: 710 path_params['recipientId'] = params['recipient_id'] 711 if 'template_id' in params: 712 path_params['templateId'] = params['template_id'] 713 714 query_params = {} 715 716 header_params = {} 717 718 form_params = [] 719 local_var_files = {} 720 721 body_params = None 722 if 'template_tabs' in params: 723 body_params = params['template_tabs'] 724 # HTTP header `Accept` 725 header_params['Accept'] = self.api_client.\ 726 select_header_accept(['application/json']) 727 728 # Authentication setting 729 auth_settings = [] 730 731 return self.api_client.call_api(resource_path, 'POST', 732 path_params, 733 query_params, 734 header_params, 735 body=body_params, 736 post_params=form_params, 737 files=local_var_files, 738 response_type='Tabs', 739 auth_settings=auth_settings, 740 callback=params.get('callback'), 741 _return_http_data_only=params.get('_return_http_data_only'), 742 _preload_content=params.get('_preload_content', True), 743 _request_timeout=params.get('_request_timeout'), 744 collection_formats=collection_formats) 745 746 def create_template(self, account_id, **kwargs): 747 """ 748 Creates an envelope from a template. 749 Creates a template definition using a multipart request. ###Template Email Subject Merge Fields Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's contents of the `roleName` property in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. 750 This method makes a synchronous HTTP request by default. To make an 751 asynchronous HTTP request, please define a `callback` function 752 to be invoked when receiving the response. 753 >>> def callback_function(response): 754 >>> pprint(response) 755 >>> 756 >>> thread = api.create_template(account_id, callback=callback_function) 757 758 :param callback function: The callback function 759 for asynchronous request. (optional) 760 :param str account_id: The external account number (int) or account ID Guid. (required) 761 :param EnvelopeTemplate envelope_template: 762 :return: TemplateSummary 763 If the method is called asynchronously, 764 returns the request thread. 765 """ 766 kwargs['_return_http_data_only'] = True 767 if kwargs.get('callback'): 768 return self.create_template_with_http_info(account_id, **kwargs) 769 else: 770 (data) = self.create_template_with_http_info(account_id, **kwargs) 771 return data 772 773 def create_template_with_http_info(self, account_id, **kwargs): 774 """ 775 Creates an envelope from a template. 776 Creates a template definition using a multipart request. ###Template Email Subject Merge Fields Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's contents of the `roleName` property in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject. 777 This method makes a synchronous HTTP request by default. To make an 778 asynchronous HTTP request, please define a `callback` function 779 to be invoked when receiving the response. 780 >>> def callback_function(response): 781 >>> pprint(response) 782 >>> 783 >>> thread = api.create_template_with_http_info(account_id, callback=callback_function) 784 785 :param callback function: The callback function 786 for asynchronous request. (optional) 787 :param str account_id: The external account number (int) or account ID Guid. (required) 788 :param EnvelopeTemplate envelope_template: 789 :return: TemplateSummary 790 If the method is called asynchronously, 791 returns the request thread. 792 """ 793 794 all_params = ['account_id', 'envelope_template'] 795 all_params.append('callback') 796 all_params.append('_return_http_data_only') 797 all_params.append('_preload_content') 798 all_params.append('_request_timeout') 799 800 params = locals() 801 for key, val in iteritems(params['kwargs']): 802 if key not in all_params: 803 raise TypeError( 804 "Got an unexpected keyword argument '%s'" 805 " to method create_template" % key 806 ) 807 params[key] = val 808 del params['kwargs'] 809 # verify the required parameter 'account_id' is set 810 if ('account_id' not in params) or (params['account_id'] is None): 811 raise ValueError("Missing the required parameter `account_id` when calling `create_template`") 812 813 814 collection_formats = {} 815 816 resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json') 817 path_params = {} 818 if 'account_id' in params: 819 path_params['accountId'] = params['account_id'] 820 821 query_params = {} 822 823 header_params = {} 824 825 form_params = [] 826 local_var_files = {} 827 828 body_params = None 829 if 'envelope_template' in params: 830 body_params = params['envelope_template'] 831 # HTTP header `Accept` 832 header_params['Accept'] = self.api_client.\ 833 select_header_accept(['application/json']) 834 835 # Authentication setting 836 auth_settings = [] 837 838 return self.api_client.call_api(resource_path, 'POST', 839 path_params, 840 query_params, 841 header_params, 842 body=body_params, 843 post_params=form_params, 844 files=local_var_files, 845 response_type='TemplateSummary', 846 auth_settings=auth_settings, 847 callback=params.get('callback'), 848 _return_http_data_only=params.get('_return_http_data_only'), 849 _preload_content=params.get('_preload_content', True), 850 _request_timeout=params.get('_request_timeout'), 851 collection_formats=collection_formats) 852 853 def create_template_document_responsive_html_preview(self, account_id, document_id, template_id, **kwargs): 854 """ 855 Post Responsive HTML Preview for a document in a template. 856 Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. 857 This method makes a synchronous HTTP request by default. To make an 858 asynchronous HTTP request, please define a `callback` function 859 to be invoked when receiving the response. 860 >>> def callback_function(response): 861 >>> pprint(response) 862 >>> 863 >>> thread = api.create_template_document_responsive_html_preview(account_id, document_id, template_id, callback=callback_function) 864 865 :param callback function: The callback function 866 for asynchronous request. (optional) 867 :param str account_id: The external account number (int) or account ID Guid. (required) 868 :param str document_id: The ID of the document being accessed. (required) 869 :param str template_id: The ID of the template being accessed. (required) 870 :param DocumentHtmlDefinition document_html_definition: 871 :return: DocumentHtmlDefinitions 872 If the method is called asynchronously, 873 returns the request thread. 874 """ 875 kwargs['_return_http_data_only'] = True 876 if kwargs.get('callback'): 877 return self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs) 878 else: 879 (data) = self.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, **kwargs) 880 return data 881 882 def create_template_document_responsive_html_preview_with_http_info(self, account_id, document_id, template_id, **kwargs): 883 """ 884 Post Responsive HTML Preview for a document in a template. 885 Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML version of a specific template document. This method enables you to preview a PDF document conversion to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the signing document. 886 This method makes a synchronous HTTP request by default. To make an 887 asynchronous HTTP request, please define a `callback` function 888 to be invoked when receiving the response. 889 >>> def callback_function(response): 890 >>> pprint(response) 891 >>> 892 >>> thread = api.create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, callback=callback_function) 893 894 :param callback function: The callback function 895 for asynchronous request. (optional) 896 :param str account_id: The external account number (int) or account ID Guid. (required) 897 :param str document_id: The ID of the document being accessed. (required) 898 :param str template_id: The ID of the template being accessed. (required) 899 :param DocumentHtmlDefinition document_html_definition: 900 :return: DocumentHtmlDefinitions 901 If the method is called asynchronously, 902 returns the request thread. 903 """ 904 905 all_params = ['account_id', 'document_id', 'template_id', 'document_html_definition'] 906 all_params.append('callback') 907 all_params.append('_return_http_data_only') 908 all_params.append('_preload_content') 909 all_params.append('_request_timeout') 910 911 params = locals() 912 for key, val in iteritems(params['kwargs']): 913 if key not in all_params: 914 raise TypeError( 915 "Got an unexpected keyword argument '%s'" 916 " to method create_template_document_responsive_html_preview" % key 917 ) 918 params[key] = val 919 del params['kwargs'] 920 # verify the required parameter 'account_id' is set 921 if ('account_id' not in params) or (params['account_id'] is None): 922 raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_responsive_html_preview`") 923 # verify the required parameter 'document_id' is set 924 if ('document_id' not in params) or (params['document_id'] is None): 925 raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_responsive_html_preview`") 926 # verify the required parameter 'template_id' is set 927 if ('template_id' not in params) or (params['template_id'] is None): 928 raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_responsive_html_preview`") 929 930 931 collection_formats = {} 932 933 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/responsive_html_preview'.replace('{format}', 'json') 934 path_params = {} 935 if 'account_id' in params: 936 path_params['accountId'] = params['account_id'] 937 if 'document_id' in params: 938 path_params['documentId'] = params['document_id'] 939 if 'template_id' in params: 940 path_params['templateId'] = params['template_id'] 941 942 query_params = {} 943 944 header_params = {} 945 946 form_params = [] 947 local_var_files = {} 948 949 body_params = None 950 if 'document_html_definition' in params: 951 body_params = params['document_html_definition'] 952 # HTTP header `Accept` 953 header_params['Accept'] = self.api_client.\ 954 select_header_accept(['application/json']) 955 956 # Authentication setting 957 auth_settings = [] 958 959 return self.api_client.call_api(resource_path, 'POST', 960 path_params, 961 query_params, 962 header_params, 963 body=body_params, 964 post_params=form_params, 965 files=local_var_files, 966 response_type='DocumentHtmlDefinitions', 967 auth_settings=auth_settings, 968 callback=params.get('callback'), 969 _return_http_data_only=params.get('_return_http_data_only'), 970 _preload_content=params.get('_preload_content', True), 971 _request_timeout=params.get('_request_timeout'), 972 collection_formats=collection_formats) 973 974 def create_template_document_tabs(self, account_id, document_id, template_id, **kwargs): 975 """ 976 Adds the tabs to a tempate 977 Adds tabs to the document specified by `documentId` in the template specified by `templateId`. In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this: ``` { \"prefillTabs\": { \"textTabs\": [ { \"value\": \"a prefill text tab\", \"pageNumber\": \"1\", \"documentId\": \"1\", \"xPosition\": 316, \"yPosition\": 97 } ] } } ``` 978 This method makes a synchronous HTTP request by default. To make an 979 asynchronous HTTP request, please define a `callback` function 980 to be invoked when receiving the response. 981 >>> def callback_function(response): 982 >>> pprint(response) 983 >>> 984 >>> thread = api.create_template_document_tabs(account_id, document_id, template_id, callback=callback_function) 985 986 :param callback function: The callback function 987 for asynchronous request. (optional) 988 :param str account_id: The external account number (int) or account ID Guid. (required) 989 :param str document_id: The ID of the document being accessed. (required) 990 :param str template_id: The ID of the template being accessed. (required) 991 :param TemplateTabs template_tabs: 992 :return: Tabs 993 If the method is called asynchronously, 994 returns the request thread. 995 """ 996 kwargs['_return_http_data_only'] = True 997 if kwargs.get('callback'): 998 return self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 999 else: 1000 (data) = self.create_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 1001 return data 1002 1003 def create_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs): 1004 """ 1005 Adds the tabs to a tempate 1006 Adds tabs to the document specified by `documentId` in the template specified by `templateId`. In the request body, you only need to specify the tabs that your are adding. For example, to add a text [prefill tab](/docs/esign-rest-api/reference/templates/templatedocumenttabs/create/#definition__templatetabs_prefilltabs), your request body might look like this: ``` { \"prefillTabs\": { \"textTabs\": [ { \"value\": \"a prefill text tab\", \"pageNumber\": \"1\", \"documentId\": \"1\", \"xPosition\": 316, \"yPosition\": 97 } ] } } ``` 1007 This method makes a synchronous HTTP request by default. To make an 1008 asynchronous HTTP request, please define a `callback` function 1009 to be invoked when receiving the response. 1010 >>> def callback_function(response): 1011 >>> pprint(response) 1012 >>> 1013 >>> thread = api.create_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function) 1014 1015 :param callback function: The callback function 1016 for asynchronous request. (optional) 1017 :param str account_id: The external account number (int) or account ID Guid. (required) 1018 :param str document_id: The ID of the document being accessed. (required) 1019 :param str template_id: The ID of the template being accessed. (required) 1020 :param TemplateTabs template_tabs: 1021 :return: Tabs 1022 If the method is called asynchronously, 1023 returns the request thread. 1024 """ 1025 1026 all_params = ['account_id', 'document_id', 'template_id', 'template_tabs'] 1027 all_params.append('callback') 1028 all_params.append('_return_http_data_only') 1029 all_params.append('_preload_content') 1030 all_params.append('_request_timeout') 1031 1032 params = locals() 1033 for key, val in iteritems(params['kwargs']): 1034 if key not in all_params: 1035 raise TypeError( 1036 "Got an unexpected keyword argument '%s'" 1037 " to method create_template_document_tabs" % key 1038 ) 1039 params[key] = val 1040 del params['kwargs'] 1041 # verify the required parameter 'account_id' is set 1042 if ('account_id' not in params) or (params['account_id'] is None): 1043 raise ValueError("Missing the required parameter `account_id` when calling `create_template_document_tabs`") 1044 # verify the required parameter 'document_id' is set 1045 if ('document_id' not in params) or (params['document_id'] is None): 1046 raise ValueError("Missing the required parameter `document_id` when calling `create_template_document_tabs`") 1047 # verify the required parameter 'template_id' is set 1048 if ('template_id' not in params) or (params['template_id'] is None): 1049 raise ValueError("Missing the required parameter `template_id` when calling `create_template_document_tabs`") 1050 1051 1052 collection_formats = {} 1053 1054 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json') 1055 path_params = {} 1056 if 'account_id' in params: 1057 path_params['accountId'] = params['account_id'] 1058 if 'document_id' in params: 1059 path_params['documentId'] = params['document_id'] 1060 if 'template_id' in params: 1061 path_params['templateId'] = params['template_id'] 1062 1063 query_params = {} 1064 1065 header_params = {} 1066 1067 form_params = [] 1068 local_var_files = {} 1069 1070 body_params = None 1071 if 'template_tabs' in params: 1072 body_params = params['template_tabs'] 1073 # HTTP header `Accept` 1074 header_params['Accept'] = self.api_client.\ 1075 select_header_accept(['application/json']) 1076 1077 # Authentication setting 1078 auth_settings = [] 1079 1080 return self.api_client.call_api(resource_path, 'POST', 1081 path_params, 1082 query_params, 1083 header_params, 1084 body=body_params, 1085 post_params=form_params, 1086 files=local_var_files, 1087 response_type='Tabs', 1088 auth_settings=auth_settings, 1089 callback=params.get('callback'), 1090 _return_http_data_only=params.get('_return_http_data_only'), 1091 _preload_content=params.get('_preload_content', True), 1092 _request_timeout=params.get('_request_timeout'), 1093 collection_formats=collection_formats) 1094 1095 def create_template_recipient_preview(self, account_id, template_id, **kwargs): 1096 """ 1097 Provides a URL to start a recipient view of the Envelope UI 1098 This method returns a URL for a template recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents). 1099 This method makes a synchronous HTTP request by default. To make an 1100 asynchronous HTTP request, please define a `callback` function 1101 to be invoked when receiving the response. 1102 >>> def callback_function(response): 1103 >>> pprint(response) 1104 >>> 1105 >>> thread = api.create_template_recipient_preview(account_id, template_id, callback=callback_function) 1106 1107 :param callback function: The callback function 1108 for asynchronous request. (optional) 1109 :param str account_id: The external account number (int) or account ID Guid. (required) 1110 :param str template_id: The ID of the template being accessed. (required) 1111 :param RecipientPreviewRequest recipient_preview_request: 1112 :return: ViewUrl 1113 If the method is called asynchronously, 1114 returns the request thread. 1115 """ 1116 kwargs['_return_http_data_only'] = True 1117 if kwargs.get('callback'): 1118 return self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs) 1119 else: 1120 (data) = self.create_template_recipient_preview_with_http_info(account_id, template_id, **kwargs) 1121 return data 1122 1123 def create_template_recipient_preview_with_http_info(self, account_id, template_id, **kwargs): 1124 """ 1125 Provides a URL to start a recipient view of the Envelope UI 1126 This method returns a URL for a template recipient preview in the DocuSign UI that you can embed in your application. You use this method to enable the sender to preview the recipients' experience. For more information, see [Preview and Send](https://support.docusign.com/en/guides/ndse-user-guide-send-your-documents). 1127 This method makes a synchronous HTTP request by default. To make an 1128 asynchronous HTTP request, please define a `callback` function 1129 to be invoked when receiving the response. 1130 >>> def callback_function(response): 1131 >>> pprint(response) 1132 >>> 1133 >>> thread = api.create_template_recipient_preview_with_http_info(account_id, template_id, callback=callback_function) 1134 1135 :param callback function: The callback function 1136 for asynchronous request. (optional) 1137 :param str account_id: The external account number (int) or account ID Guid. (required) 1138 :param str template_id: The ID of the template being accessed. (required) 1139 :param RecipientPreviewRequest recipient_preview_request: 1140 :return: ViewUrl 1141 If the method is called asynchronously, 1142 returns the request thread. 1143 """ 1144 1145 all_params = ['account_id', 'template_id', 'recipient_preview_request'] 1146 all_params.append('callback') 1147 all_params.append('_return_http_data_only') 1148 all_params.append('_preload_content') 1149 all_params.append('_request_timeout') 1150 1151 params = locals() 1152 for key, val in iteritems(params['kwargs']): 1153 if key not in all_params: 1154 raise TypeError( 1155 "Got an unexpected keyword argument '%s'" 1156 " to method create_template_recipient_preview" % key 1157 ) 1158 params[key] = val 1159 del params['kwargs'] 1160 # verify the required parameter 'account_id' is set 1161 if ('account_id' not in params) or (params['account_id'] is None): 1162 raise ValueError("Missing the required parameter `account_id` when calling `create_template_recipient_preview`") 1163 # verify the required parameter 'template_id' is set 1164 if ('template_id' not in params) or (params['template_id'] is None): 1165 raise ValueError("Missing the required parameter `template_id` when calling `create_template_recipient_preview`") 1166 1167 1168 collection_formats = {} 1169 1170 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/recipient_preview'.replace('{format}', 'json') 1171 path_params = {} 1172 if 'account_id' in params: 1173 path_params['accountId'] = params['account_id'] 1174 if 'template_id' in params: 1175 path_params['templateId'] = params['template_id'] 1176 1177 query_params = {} 1178 1179 header_params = {} 1180 1181 form_params = [] 1182 local_var_files = {} 1183 1184 body_params = None 1185 if 'recipient_preview_request' in params: 1186 body_params = params['recipient_preview_request'] 1187 # HTTP header `Accept` 1188 header_params['Accept'] = self.api_client.\ 1189 select_header_accept(['application/json']) 1190 1191 # Authentication setting 1192 auth_settings = [] 1193 1194 return self.api_client.call_api(resource_path, 'POST', 1195 path_params, 1196 query_params, 1197 header_params, 1198 body=body_params, 1199 post_params=form_params, 1200 files=local_var_files, 1201 response_type='ViewUrl', 1202 auth_settings=auth_settings, 1203 callback=params.get('callback'), 1204 _return_http_data_only=params.get('_return_http_data_only'), 1205 _preload_content=params.get('_preload_content', True), 1206 _request_timeout=params.get('_request_timeout'), 1207 collection_formats=collection_formats) 1208 1209 def create_template_responsive_html_preview(self, account_id, template_id, **kwargs): 1210 """ 1211 Get Responsive HTML Preview for all documents in a template. 1212 Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. 1213 This method makes a synchronous HTTP request by default. To make an 1214 asynchronous HTTP request, please define a `callback` function 1215 to be invoked when receiving the response. 1216 >>> def callback_function(response): 1217 >>> pprint(response) 1218 >>> 1219 >>> thread = api.create_template_responsive_html_preview(account_id, template_id, callback=callback_function) 1220 1221 :param callback function: The callback function 1222 for asynchronous request. (optional) 1223 :param str account_id: The external account number (int) or account ID Guid. (required) 1224 :param str template_id: The ID of the template being accessed. (required) 1225 :param DocumentHtmlDefinition document_html_definition: 1226 :return: DocumentHtmlDefinitions 1227 If the method is called asynchronously, 1228 returns the request thread. 1229 """ 1230 kwargs['_return_http_data_only'] = True 1231 if kwargs.get('callback'): 1232 return self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs) 1233 else: 1234 (data) = self.create_template_responsive_html_preview_with_http_info(account_id, template_id, **kwargs) 1235 return data 1236 1237 def create_template_responsive_html_preview_with_http_info(self, account_id, template_id, **kwargs): 1238 """ 1239 Get Responsive HTML Preview for all documents in a template. 1240 Creates a preview of the [responsive](/docs/esign-rest-api/esign101/concepts/responsive/), HTML versions of all of the documents associated with a template. This method enables you to preview the PDF document conversions to responsive HTML across device types prior to sending. The request body is a `documentHtmlDefinition` object, which holds the responsive signing parameters that define how to generate the HTML version of the documents. 1241 This method makes a synchronous HTTP request by default. To make an 1242 asynchronous HTTP request, please define a `callback` function 1243 to be invoked when receiving the response. 1244 >>> def callback_function(response): 1245 >>> pprint(response) 1246 >>> 1247 >>> thread = api.create_template_responsive_html_preview_with_http_info(account_id, template_id, callback=callback_function) 1248 1249 :param callback function: The callback function 1250 for asynchronous request. (optional) 1251 :param str account_id: The external account number (int) or account ID Guid. (required) 1252 :param str template_id: The ID of the template being accessed. (required) 1253 :param DocumentHtmlDefinition document_html_definition: 1254 :return: DocumentHtmlDefinitions 1255 If the method is called asynchronously, 1256 returns the request thread. 1257 """ 1258 1259 all_params = ['account_id', 'template_id', 'document_html_definition'] 1260 all_params.append('callback') 1261 all_params.append('_return_http_data_only') 1262 all_params.append('_preload_content') 1263 all_params.append('_request_timeout') 1264 1265 params = locals() 1266 for key, val in iteritems(params['kwargs']): 1267 if key not in all_params: 1268 raise TypeError( 1269 "Got an unexpected keyword argument '%s'" 1270 " to method create_template_responsive_html_preview" % key 1271 ) 1272 params[key] = val 1273 del params['kwargs'] 1274 # verify the required parameter 'account_id' is set 1275 if ('account_id' not in params) or (params['account_id'] is None): 1276 raise ValueError("Missing the required parameter `account_id` when calling `create_template_responsive_html_preview`") 1277 # verify the required parameter 'template_id' is set 1278 if ('template_id' not in params) or (params['template_id'] is None): 1279 raise ValueError("Missing the required parameter `template_id` when calling `create_template_responsive_html_preview`") 1280 1281 1282 collection_formats = {} 1283 1284 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/responsive_html_preview'.replace('{format}', 'json') 1285 path_params = {} 1286 if 'account_id' in params: 1287 path_params['accountId'] = params['account_id'] 1288 if 'template_id' in params: 1289 path_params['templateId'] = params['template_id'] 1290 1291 query_params = {} 1292 1293 header_params = {} 1294 1295 form_params = [] 1296 local_var_files = {} 1297 1298 body_params = None 1299 if 'document_html_definition' in params: 1300 body_params = params['document_html_definition'] 1301 # HTTP header `Accept` 1302 header_params['Accept'] = self.api_client.\ 1303 select_header_accept(['application/json']) 1304 1305 # Authentication setting 1306 auth_settings = [] 1307 1308 return self.api_client.call_api(resource_path, 'POST', 1309 path_params, 1310 query_params, 1311 header_params, 1312 body=body_params, 1313 post_params=form_params, 1314 files=local_var_files, 1315 response_type='DocumentHtmlDefinitions', 1316 auth_settings=auth_settings, 1317 callback=params.get('callback'), 1318 _return_http_data_only=params.get('_return_http_data_only'), 1319 _preload_content=params.get('_preload_content', True), 1320 _request_timeout=params.get('_request_timeout'), 1321 collection_formats=collection_formats) 1322 1323 def delete_custom_fields(self, account_id, template_id, **kwargs): 1324 """ 1325 Deletes envelope custom fields in a template. 1326 Deletes envelope custom fields in a template. 1327 This method makes a synchronous HTTP request by default. To make an 1328 asynchronous HTTP request, please define a `callback` function 1329 to be invoked when receiving the response. 1330 >>> def callback_function(response): 1331 >>> pprint(response) 1332 >>> 1333 >>> thread = api.delete_custom_fields(account_id, template_id, callback=callback_function) 1334 1335 :param callback function: The callback function 1336 for asynchronous request. (optional) 1337 :param str account_id: The external account number (int) or account ID Guid. (required) 1338 :param str template_id: The ID of the template being accessed. (required) 1339 :param TemplateCustomFields template_custom_fields: 1340 :return: CustomFields 1341 If the method is called asynchronously, 1342 returns the request thread. 1343 """ 1344 kwargs['_return_http_data_only'] = True 1345 if kwargs.get('callback'): 1346 return self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs) 1347 else: 1348 (data) = self.delete_custom_fields_with_http_info(account_id, template_id, **kwargs) 1349 return data 1350 1351 def delete_custom_fields_with_http_info(self, account_id, template_id, **kwargs): 1352 """ 1353 Deletes envelope custom fields in a template. 1354 Deletes envelope custom fields in a template. 1355 This method makes a synchronous HTTP request by default. To make an 1356 asynchronous HTTP request, please define a `callback` function 1357 to be invoked when receiving the response. 1358 >>> def callback_function(response): 1359 >>> pprint(response) 1360 >>> 1361 >>> thread = api.delete_custom_fields_with_http_info(account_id, template_id, callback=callback_function) 1362 1363 :param callback function: The callback function 1364 for asynchronous request. (optional) 1365 :param str account_id: The external account number (int) or account ID Guid. (required) 1366 :param str template_id: The ID of the template being accessed. (required) 1367 :param TemplateCustomFields template_custom_fields: 1368 :return: CustomFields 1369 If the method is called asynchronously, 1370 returns the request thread. 1371 """ 1372 1373 all_params = ['account_id', 'template_id', 'template_custom_fields'] 1374 all_params.append('callback') 1375 all_params.append('_return_http_data_only') 1376 all_params.append('_preload_content') 1377 all_params.append('_request_timeout') 1378 1379 params = locals() 1380 for key, val in iteritems(params['kwargs']): 1381 if key not in all_params: 1382 raise TypeError( 1383 "Got an unexpected keyword argument '%s'" 1384 " to method delete_custom_fields" % key 1385 ) 1386 params[key] = val 1387 del params['kwargs'] 1388 # verify the required parameter 'account_id' is set 1389 if ('account_id' not in params) or (params['account_id'] is None): 1390 raise ValueError("Missing the required parameter `account_id` when calling `delete_custom_fields`") 1391 # verify the required parameter 'template_id' is set 1392 if ('template_id' not in params) or (params['template_id'] is None): 1393 raise ValueError("Missing the required parameter `template_id` when calling `delete_custom_fields`") 1394 1395 1396 collection_formats = {} 1397 1398 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json') 1399 path_params = {} 1400 if 'account_id' in params: 1401 path_params['accountId'] = params['account_id'] 1402 if 'template_id' in params: 1403 path_params['templateId'] = params['template_id'] 1404 1405 query_params = {} 1406 1407 header_params = {} 1408 1409 form_params = [] 1410 local_var_files = {} 1411 1412 body_params = None 1413 if 'template_custom_fields' in params: 1414 body_params = params['template_custom_fields'] 1415 # HTTP header `Accept` 1416 header_params['Accept'] = self.api_client.\ 1417 select_header_accept(['application/json']) 1418 1419 # Authentication setting 1420 auth_settings = [] 1421 1422 return self.api_client.call_api(resource_path, 'DELETE', 1423 path_params, 1424 query_params, 1425 header_params, 1426 body=body_params, 1427 post_params=form_params, 1428 files=local_var_files, 1429 response_type='CustomFields', 1430 auth_settings=auth_settings, 1431 callback=params.get('callback'), 1432 _return_http_data_only=params.get('_return_http_data_only'), 1433 _preload_content=params.get('_preload_content', True), 1434 _request_timeout=params.get('_request_timeout'), 1435 collection_formats=collection_formats) 1436 1437 def delete_document_fields(self, account_id, document_id, template_id, **kwargs): 1438 """ 1439 Deletes custom document fields from an existing template document. 1440 Deletes custom document fields from an existing template document. 1441 This method makes a synchronous HTTP request by default. To make an 1442 asynchronous HTTP request, please define a `callback` function 1443 to be invoked when receiving the response. 1444 >>> def callback_function(response): 1445 >>> pprint(response) 1446 >>> 1447 >>> thread = api.delete_document_fields(account_id, document_id, template_id, callback=callback_function) 1448 1449 :param callback function: The callback function 1450 for asynchronous request. (optional) 1451 :param str account_id: The external account number (int) or account ID Guid. (required) 1452 :param str document_id: The ID of the document being accessed. (required) 1453 :param str template_id: The ID of the template being accessed. (required) 1454 :param DocumentFieldsInformation document_fields_information: 1455 :return: DocumentFieldsInformation 1456 If the method is called asynchronously, 1457 returns the request thread. 1458 """ 1459 kwargs['_return_http_data_only'] = True 1460 if kwargs.get('callback'): 1461 return self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 1462 else: 1463 (data) = self.delete_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 1464 return data 1465 1466 def delete_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs): 1467 """ 1468 Deletes custom document fields from an existing template document. 1469 Deletes custom document fields from an existing template document. 1470 This method makes a synchronous HTTP request by default. To make an 1471 asynchronous HTTP request, please define a `callback` function 1472 to be invoked when receiving the response. 1473 >>> def callback_function(response): 1474 >>> pprint(response) 1475 >>> 1476 >>> thread = api.delete_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function) 1477 1478 :param callback function: The callback function 1479 for asynchronous request. (optional) 1480 :param str account_id: The external account number (int) or account ID Guid. (required) 1481 :param str document_id: The ID of the document being accessed. (required) 1482 :param str template_id: The ID of the template being accessed. (required) 1483 :param DocumentFieldsInformation document_fields_information: 1484 :return: DocumentFieldsInformation 1485 If the method is called asynchronously, 1486 returns the request thread. 1487 """ 1488 1489 all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information'] 1490 all_params.append('callback') 1491 all_params.append('_return_http_data_only') 1492 all_params.append('_preload_content') 1493 all_params.append('_request_timeout') 1494 1495 params = locals() 1496 for key, val in iteritems(params['kwargs']): 1497 if key not in all_params: 1498 raise TypeError( 1499 "Got an unexpected keyword argument '%s'" 1500 " to method delete_document_fields" % key 1501 ) 1502 params[key] = val 1503 del params['kwargs'] 1504 # verify the required parameter 'account_id' is set 1505 if ('account_id' not in params) or (params['account_id'] is None): 1506 raise ValueError("Missing the required parameter `account_id` when calling `delete_document_fields`") 1507 # verify the required parameter 'document_id' is set 1508 if ('document_id' not in params) or (params['document_id'] is None): 1509 raise ValueError("Missing the required parameter `document_id` when calling `delete_document_fields`") 1510 # verify the required parameter 'template_id' is set 1511 if ('template_id' not in params) or (params['template_id'] is None): 1512 raise ValueError("Missing the required parameter `template_id` when calling `delete_document_fields`") 1513 1514 1515 collection_formats = {} 1516 1517 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json') 1518 path_params = {} 1519 if 'account_id' in params: 1520 path_params['accountId'] = params['account_id'] 1521 if 'document_id' in params: 1522 path_params['documentId'] = params['document_id'] 1523 if 'template_id' in params: 1524 path_params['templateId'] = params['template_id'] 1525 1526 query_params = {} 1527 1528 header_params = {} 1529 1530 form_params = [] 1531 local_var_files = {} 1532 1533 body_params = None 1534 if 'document_fields_information' in params: 1535 body_params = params['document_fields_information'] 1536 # HTTP header `Accept` 1537 header_params['Accept'] = self.api_client.\ 1538 select_header_accept(['application/json']) 1539 1540 # Authentication setting 1541 auth_settings = [] 1542 1543 return self.api_client.call_api(resource_path, 'DELETE', 1544 path_params, 1545 query_params, 1546 header_params, 1547 body=body_params, 1548 post_params=form_params, 1549 files=local_var_files, 1550 response_type='DocumentFieldsInformation', 1551 auth_settings=auth_settings, 1552 callback=params.get('callback'), 1553 _return_http_data_only=params.get('_return_http_data_only'), 1554 _preload_content=params.get('_preload_content', True), 1555 _request_timeout=params.get('_request_timeout'), 1556 collection_formats=collection_formats) 1557 1558 def delete_document_page(self, account_id, document_id, page_number, template_id, **kwargs): 1559 """ 1560 Deletes a page from a document in an template. 1561 Deletes a page from a document in a template based on the page number. 1562 This method makes a synchronous HTTP request by default. To make an 1563 asynchronous HTTP request, please define a `callback` function 1564 to be invoked when receiving the response. 1565 >>> def callback_function(response): 1566 >>> pprint(response) 1567 >>> 1568 >>> thread = api.delete_document_page(account_id, document_id, page_number, template_id, callback=callback_function) 1569 1570 :param callback function: The callback function 1571 for asynchronous request. (optional) 1572 :param str account_id: The external account number (int) or account ID Guid. (required) 1573 :param str document_id: The ID of the document being accessed. (required) 1574 :param str page_number: The page number being accessed. (required) 1575 :param str template_id: The ID of the template being accessed. (required) 1576 :param PageRequest page_request: 1577 :return: None 1578 If the method is called asynchronously, 1579 returns the request thread. 1580 """ 1581 kwargs['_return_http_data_only'] = True 1582 if kwargs.get('callback'): 1583 return self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 1584 else: 1585 (data) = self.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 1586 return data 1587 1588 def delete_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs): 1589 """ 1590 Deletes a page from a document in an template. 1591 Deletes a page from a document in a template based on the page number. 1592 This method makes a synchronous HTTP request by default. To make an 1593 asynchronous HTTP request, please define a `callback` function 1594 to be invoked when receiving the response. 1595 >>> def callback_function(response): 1596 >>> pprint(response) 1597 >>> 1598 >>> thread = api.delete_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function) 1599 1600 :param callback function: The callback function 1601 for asynchronous request. (optional) 1602 :param str account_id: The external account number (int) or account ID Guid. (required) 1603 :param str document_id: The ID of the document being accessed. (required) 1604 :param str page_number: The page number being accessed. (required) 1605 :param str template_id: The ID of the template being accessed. (required) 1606 :param PageRequest page_request: 1607 :return: None 1608 If the method is called asynchronously, 1609 returns the request thread. 1610 """ 1611 1612 all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request'] 1613 all_params.append('callback') 1614 all_params.append('_return_http_data_only') 1615 all_params.append('_preload_content') 1616 all_params.append('_request_timeout') 1617 1618 params = locals() 1619 for key, val in iteritems(params['kwargs']): 1620 if key not in all_params: 1621 raise TypeError( 1622 "Got an unexpected keyword argument '%s'" 1623 " to method delete_document_page" % key 1624 ) 1625 params[key] = val 1626 del params['kwargs'] 1627 # verify the required parameter 'account_id' is set 1628 if ('account_id' not in params) or (params['account_id'] is None): 1629 raise ValueError("Missing the required parameter `account_id` when calling `delete_document_page`") 1630 # verify the required parameter 'document_id' is set 1631 if ('document_id' not in params) or (params['document_id'] is None): 1632 raise ValueError("Missing the required parameter `document_id` when calling `delete_document_page`") 1633 # verify the required parameter 'page_number' is set 1634 if ('page_number' not in params) or (params['page_number'] is None): 1635 raise ValueError("Missing the required parameter `page_number` when calling `delete_document_page`") 1636 # verify the required parameter 'template_id' is set 1637 if ('template_id' not in params) or (params['template_id'] is None): 1638 raise ValueError("Missing the required parameter `template_id` when calling `delete_document_page`") 1639 1640 1641 collection_formats = {} 1642 1643 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}'.replace('{format}', 'json') 1644 path_params = {} 1645 if 'account_id' in params: 1646 path_params['accountId'] = params['account_id'] 1647 if 'document_id' in params: 1648 path_params['documentId'] = params['document_id'] 1649 if 'page_number' in params: 1650 path_params['pageNumber'] = params['page_number'] 1651 if 'template_id' in params: 1652 path_params['templateId'] = params['template_id'] 1653 1654 query_params = {} 1655 1656 header_params = {} 1657 1658 form_params = [] 1659 local_var_files = {} 1660 1661 body_params = None 1662 if 'page_request' in params: 1663 body_params = params['page_request'] 1664 # HTTP header `Accept` 1665 header_params['Accept'] = self.api_client.\ 1666 select_header_accept(['application/json']) 1667 1668 # Authentication setting 1669 auth_settings = [] 1670 1671 return self.api_client.call_api(resource_path, 'DELETE', 1672 path_params, 1673 query_params, 1674 header_params, 1675 body=body_params, 1676 post_params=form_params, 1677 files=local_var_files, 1678 response_type=None, 1679 auth_settings=auth_settings, 1680 callback=params.get('callback'), 1681 _return_http_data_only=params.get('_return_http_data_only'), 1682 _preload_content=params.get('_preload_content', True), 1683 _request_timeout=params.get('_request_timeout'), 1684 collection_formats=collection_formats) 1685 1686 def delete_documents(self, account_id, template_id, **kwargs): 1687 """ 1688 Deletes documents from a template. 1689 Deletes one or more documents from an existing template. 1690 This method makes a synchronous HTTP request by default. To make an 1691 asynchronous HTTP request, please define a `callback` function 1692 to be invoked when receiving the response. 1693 >>> def callback_function(response): 1694 >>> pprint(response) 1695 >>> 1696 >>> thread = api.delete_documents(account_id, template_id, callback=callback_function) 1697 1698 :param callback function: The callback function 1699 for asynchronous request. (optional) 1700 :param str account_id: The external account number (int) or account ID Guid. (required) 1701 :param str template_id: The ID of the template being accessed. (required) 1702 :param EnvelopeDefinition envelope_definition: 1703 :return: TemplateDocumentsResult 1704 If the method is called asynchronously, 1705 returns the request thread. 1706 """ 1707 kwargs['_return_http_data_only'] = True 1708 if kwargs.get('callback'): 1709 return self.delete_documents_with_http_info(account_id, template_id, **kwargs) 1710 else: 1711 (data) = self.delete_documents_with_http_info(account_id, template_id, **kwargs) 1712 return data 1713 1714 def delete_documents_with_http_info(self, account_id, template_id, **kwargs): 1715 """ 1716 Deletes documents from a template. 1717 Deletes one or more documents from an existing template. 1718 This method makes a synchronous HTTP request by default. To make an 1719 asynchronous HTTP request, please define a `callback` function 1720 to be invoked when receiving the response. 1721 >>> def callback_function(response): 1722 >>> pprint(response) 1723 >>> 1724 >>> thread = api.delete_documents_with_http_info(account_id, template_id, callback=callback_function) 1725 1726 :param callback function: The callback function 1727 for asynchronous request. (optional) 1728 :param str account_id: The external account number (int) or account ID Guid. (required) 1729 :param str template_id: The ID of the template being accessed. (required) 1730 :param EnvelopeDefinition envelope_definition: 1731 :return: TemplateDocumentsResult 1732 If the method is called asynchronously, 1733 returns the request thread. 1734 """ 1735 1736 all_params = ['account_id', 'template_id', 'envelope_definition'] 1737 all_params.append('callback') 1738 all_params.append('_return_http_data_only') 1739 all_params.append('_preload_content') 1740 all_params.append('_request_timeout') 1741 1742 params = locals() 1743 for key, val in iteritems(params['kwargs']): 1744 if key not in all_params: 1745 raise TypeError( 1746 "Got an unexpected keyword argument '%s'" 1747 " to method delete_documents" % key 1748 ) 1749 params[key] = val 1750 del params['kwargs'] 1751 # verify the required parameter 'account_id' is set 1752 if ('account_id' not in params) or (params['account_id'] is None): 1753 raise ValueError("Missing the required parameter `account_id` when calling `delete_documents`") 1754 # verify the required parameter 'template_id' is set 1755 if ('template_id' not in params) or (params['template_id'] is None): 1756 raise ValueError("Missing the required parameter `template_id` when calling `delete_documents`") 1757 1758 1759 collection_formats = {} 1760 1761 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json') 1762 path_params = {} 1763 if 'account_id' in params: 1764 path_params['accountId'] = params['account_id'] 1765 if 'template_id' in params: 1766 path_params['templateId'] = params['template_id'] 1767 1768 query_params = {} 1769 1770 header_params = {} 1771 1772 form_params = [] 1773 local_var_files = {} 1774 1775 body_params = None 1776 if 'envelope_definition' in params: 1777 body_params = params['envelope_definition'] 1778 # HTTP header `Accept` 1779 header_params['Accept'] = self.api_client.\ 1780 select_header_accept(['application/json']) 1781 1782 # Authentication setting 1783 auth_settings = [] 1784 1785 return self.api_client.call_api(resource_path, 'DELETE', 1786 path_params, 1787 query_params, 1788 header_params, 1789 body=body_params, 1790 post_params=form_params, 1791 files=local_var_files, 1792 response_type='TemplateDocumentsResult', 1793 auth_settings=auth_settings, 1794 callback=params.get('callback'), 1795 _return_http_data_only=params.get('_return_http_data_only'), 1796 _preload_content=params.get('_preload_content', True), 1797 _request_timeout=params.get('_request_timeout'), 1798 collection_formats=collection_formats) 1799 1800 def delete_group_share(self, account_id, template_id, template_part, **kwargs): 1801 """ 1802 Removes a member group's sharing permissions for a template. 1803 Removes a member group's sharing permissions for a specified template. 1804 This method makes a synchronous HTTP request by default. To make an 1805 asynchronous HTTP request, please define a `callback` function 1806 to be invoked when receiving the response. 1807 >>> def callback_function(response): 1808 >>> pprint(response) 1809 >>> 1810 >>> thread = api.delete_group_share(account_id, template_id, template_part, callback=callback_function) 1811 1812 :param callback function: The callback function 1813 for asynchronous request. (optional) 1814 :param str account_id: The external account number (int) or account ID Guid. (required) 1815 :param str template_id: The ID of the template being accessed. (required) 1816 :param str template_part: Currently, the only defined part is **groups**. (required) 1817 :param GroupInformation group_information: 1818 :return: GroupInformation 1819 If the method is called asynchronously, 1820 returns the request thread. 1821 """ 1822 kwargs['_return_http_data_only'] = True 1823 if kwargs.get('callback'): 1824 return self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs) 1825 else: 1826 (data) = self.delete_group_share_with_http_info(account_id, template_id, template_part, **kwargs) 1827 return data 1828 1829 def delete_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs): 1830 """ 1831 Removes a member group's sharing permissions for a template. 1832 Removes a member group's sharing permissions for a specified template. 1833 This method makes a synchronous HTTP request by default. To make an 1834 asynchronous HTTP request, please define a `callback` function 1835 to be invoked when receiving the response. 1836 >>> def callback_function(response): 1837 >>> pprint(response) 1838 >>> 1839 >>> thread = api.delete_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function) 1840 1841 :param callback function: The callback function 1842 for asynchronous request. (optional) 1843 :param str account_id: The external account number (int) or account ID Guid. (required) 1844 :param str template_id: The ID of the template being accessed. (required) 1845 :param str template_part: Currently, the only defined part is **groups**. (required) 1846 :param GroupInformation group_information: 1847 :return: GroupInformation 1848 If the method is called asynchronously, 1849 returns the request thread. 1850 """ 1851 1852 all_params = ['account_id', 'template_id', 'template_part', 'group_information'] 1853 all_params.append('callback') 1854 all_params.append('_return_http_data_only') 1855 all_params.append('_preload_content') 1856 all_params.append('_request_timeout') 1857 1858 params = locals() 1859 for key, val in iteritems(params['kwargs']): 1860 if key not in all_params: 1861 raise TypeError( 1862 "Got an unexpected keyword argument '%s'" 1863 " to method delete_group_share" % key 1864 ) 1865 params[key] = val 1866 del params['kwargs'] 1867 # verify the required parameter 'account_id' is set 1868 if ('account_id' not in params) or (params['account_id'] is None): 1869 raise ValueError("Missing the required parameter `account_id` when calling `delete_group_share`") 1870 # verify the required parameter 'template_id' is set 1871 if ('template_id' not in params) or (params['template_id'] is None): 1872 raise ValueError("Missing the required parameter `template_id` when calling `delete_group_share`") 1873 # verify the required parameter 'template_part' is set 1874 if ('template_part' not in params) or (params['template_part'] is None): 1875 raise ValueError("Missing the required parameter `template_part` when calling `delete_group_share`") 1876 1877 1878 collection_formats = {} 1879 1880 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json') 1881 path_params = {} 1882 if 'account_id' in params: 1883 path_params['accountId'] = params['account_id'] 1884 if 'template_id' in params: 1885 path_params['templateId'] = params['template_id'] 1886 if 'template_part' in params: 1887 path_params['templatePart'] = params['template_part'] 1888 1889 query_params = {} 1890 1891 header_params = {} 1892 1893 form_params = [] 1894 local_var_files = {} 1895 1896 body_params = None 1897 if 'group_information' in params: 1898 body_params = params['group_information'] 1899 # HTTP header `Accept` 1900 header_params['Accept'] = self.api_client.\ 1901 select_header_accept(['application/json']) 1902 1903 # Authentication setting 1904 auth_settings = [] 1905 1906 return self.api_client.call_api(resource_path, 'DELETE', 1907 path_params, 1908 query_params, 1909 header_params, 1910 body=body_params, 1911 post_params=form_params, 1912 files=local_var_files, 1913 response_type='GroupInformation', 1914 auth_settings=auth_settings, 1915 callback=params.get('callback'), 1916 _return_http_data_only=params.get('_return_http_data_only'), 1917 _preload_content=params.get('_preload_content', True), 1918 _request_timeout=params.get('_request_timeout'), 1919 collection_formats=collection_formats) 1920 1921 def delete_lock(self, account_id, template_id, **kwargs): 1922 """ 1923 Deletes a template lock. 1924 Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request. 1925 This method makes a synchronous HTTP request by default. To make an 1926 asynchronous HTTP request, please define a `callback` function 1927 to be invoked when receiving the response. 1928 >>> def callback_function(response): 1929 >>> pprint(response) 1930 >>> 1931 >>> thread = api.delete_lock(account_id, template_id, callback=callback_function) 1932 1933 :param callback function: The callback function 1934 for asynchronous request. (optional) 1935 :param str account_id: The external account number (int) or account ID Guid. (required) 1936 :param str template_id: The ID of the template being accessed. (required) 1937 :param LockRequest lock_request: 1938 :return: LockInformation 1939 If the method is called asynchronously, 1940 returns the request thread. 1941 """ 1942 kwargs['_return_http_data_only'] = True 1943 if kwargs.get('callback'): 1944 return self.delete_lock_with_http_info(account_id, template_id, **kwargs) 1945 else: 1946 (data) = self.delete_lock_with_http_info(account_id, template_id, **kwargs) 1947 return data 1948 1949 def delete_lock_with_http_info(self, account_id, template_id, **kwargs): 1950 """ 1951 Deletes a template lock. 1952 Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request. 1953 This method makes a synchronous HTTP request by default. To make an 1954 asynchronous HTTP request, please define a `callback` function 1955 to be invoked when receiving the response. 1956 >>> def callback_function(response): 1957 >>> pprint(response) 1958 >>> 1959 >>> thread = api.delete_lock_with_http_info(account_id, template_id, callback=callback_function) 1960 1961 :param callback function: The callback function 1962 for asynchronous request. (optional) 1963 :param str account_id: The external account number (int) or account ID Guid. (required) 1964 :param str template_id: The ID of the template being accessed. (required) 1965 :param LockRequest lock_request: 1966 :return: LockInformation 1967 If the method is called asynchronously, 1968 returns the request thread. 1969 """ 1970 1971 all_params = ['account_id', 'template_id', 'lock_request'] 1972 all_params.append('callback') 1973 all_params.append('_return_http_data_only') 1974 all_params.append('_preload_content') 1975 all_params.append('_request_timeout') 1976 1977 params = locals() 1978 for key, val in iteritems(params['kwargs']): 1979 if key not in all_params: 1980 raise TypeError( 1981 "Got an unexpected keyword argument '%s'" 1982 " to method delete_lock" % key 1983 ) 1984 params[key] = val 1985 del params['kwargs'] 1986 # verify the required parameter 'account_id' is set 1987 if ('account_id' not in params) or (params['account_id'] is None): 1988 raise ValueError("Missing the required parameter `account_id` when calling `delete_lock`") 1989 # verify the required parameter 'template_id' is set 1990 if ('template_id' not in params) or (params['template_id'] is None): 1991 raise ValueError("Missing the required parameter `template_id` when calling `delete_lock`") 1992 1993 1994 collection_formats = {} 1995 1996 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json') 1997 path_params = {} 1998 if 'account_id' in params: 1999 path_params['accountId'] = params['account_id'] 2000 if 'template_id' in params: 2001 path_params['templateId'] = params['template_id'] 2002 2003 query_params = {} 2004 2005 header_params = {} 2006 2007 form_params = [] 2008 local_var_files = {} 2009 2010 body_params = None 2011 if 'lock_request' in params: 2012 body_params = params['lock_request'] 2013 # HTTP header `Accept` 2014 header_params['Accept'] = self.api_client.\ 2015 select_header_accept(['application/json']) 2016 2017 # Authentication setting 2018 auth_settings = [] 2019 2020 return self.api_client.call_api(resource_path, 'DELETE', 2021 path_params, 2022 query_params, 2023 header_params, 2024 body=body_params, 2025 post_params=form_params, 2026 files=local_var_files, 2027 response_type='LockInformation', 2028 auth_settings=auth_settings, 2029 callback=params.get('callback'), 2030 _return_http_data_only=params.get('_return_http_data_only'), 2031 _preload_content=params.get('_preload_content', True), 2032 _request_timeout=params.get('_request_timeout'), 2033 collection_formats=collection_formats) 2034 2035 def delete_recipient(self, account_id, recipient_id, template_id, **kwargs): 2036 """ 2037 Deletes the specified recipient file from a template. 2038 Deletes the specified recipient file from the specified template. 2039 This method makes a synchronous HTTP request by default. To make an 2040 asynchronous HTTP request, please define a `callback` function 2041 to be invoked when receiving the response. 2042 >>> def callback_function(response): 2043 >>> pprint(response) 2044 >>> 2045 >>> thread = api.delete_recipient(account_id, recipient_id, template_id, callback=callback_function) 2046 2047 :param callback function: The callback function 2048 for asynchronous request. (optional) 2049 :param str account_id: The external account number (int) or account ID Guid. (required) 2050 :param str recipient_id: The ID of the recipient being accessed. (required) 2051 :param str template_id: The ID of the template being accessed. (required) 2052 :param TemplateRecipients template_recipients: 2053 :return: Recipients 2054 If the method is called asynchronously, 2055 returns the request thread. 2056 """ 2057 kwargs['_return_http_data_only'] = True 2058 if kwargs.get('callback'): 2059 return self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs) 2060 else: 2061 (data) = self.delete_recipient_with_http_info(account_id, recipient_id, template_id, **kwargs) 2062 return data 2063 2064 def delete_recipient_with_http_info(self, account_id, recipient_id, template_id, **kwargs): 2065 """ 2066 Deletes the specified recipient file from a template. 2067 Deletes the specified recipient file from the specified template. 2068 This method makes a synchronous HTTP request by default. To make an 2069 asynchronous HTTP request, please define a `callback` function 2070 to be invoked when receiving the response. 2071 >>> def callback_function(response): 2072 >>> pprint(response) 2073 >>> 2074 >>> thread = api.delete_recipient_with_http_info(account_id, recipient_id, template_id, callback=callback_function) 2075 2076 :param callback function: The callback function 2077 for asynchronous request. (optional) 2078 :param str account_id: The external account number (int) or account ID Guid. (required) 2079 :param str recipient_id: The ID of the recipient being accessed. (required) 2080 :param str template_id: The ID of the template being accessed. (required) 2081 :param TemplateRecipients template_recipients: 2082 :return: Recipients 2083 If the method is called asynchronously, 2084 returns the request thread. 2085 """ 2086 2087 all_params = ['account_id', 'recipient_id', 'template_id', 'template_recipients'] 2088 all_params.append('callback') 2089 all_params.append('_return_http_data_only') 2090 all_params.append('_preload_content') 2091 all_params.append('_request_timeout') 2092 2093 params = locals() 2094 for key, val in iteritems(params['kwargs']): 2095 if key not in all_params: 2096 raise TypeError( 2097 "Got an unexpected keyword argument '%s'" 2098 " to method delete_recipient" % key 2099 ) 2100 params[key] = val 2101 del params['kwargs'] 2102 # verify the required parameter 'account_id' is set 2103 if ('account_id' not in params) or (params['account_id'] is None): 2104 raise ValueError("Missing the required parameter `account_id` when calling `delete_recipient`") 2105 # verify the required parameter 'recipient_id' is set 2106 if ('recipient_id' not in params) or (params['recipient_id'] is None): 2107 raise ValueError("Missing the required parameter `recipient_id` when calling `delete_recipient`") 2108 # verify the required parameter 'template_id' is set 2109 if ('template_id' not in params) or (params['template_id'] is None): 2110 raise ValueError("Missing the required parameter `template_id` when calling `delete_recipient`") 2111 2112 2113 collection_formats = {} 2114 2115 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}'.replace('{format}', 'json') 2116 path_params = {} 2117 if 'account_id' in params: 2118 path_params['accountId'] = params['account_id'] 2119 if 'recipient_id' in params: 2120 path_params['recipientId'] = params['recipient_id'] 2121 if 'template_id' in params: 2122 path_params['templateId'] = params['template_id'] 2123 2124 query_params = {} 2125 2126 header_params = {} 2127 2128 form_params = [] 2129 local_var_files = {} 2130 2131 body_params = None 2132 if 'template_recipients' in params: 2133 body_params = params['template_recipients'] 2134 # HTTP header `Accept` 2135 header_params['Accept'] = self.api_client.\ 2136 select_header_accept(['application/json']) 2137 2138 # Authentication setting 2139 auth_settings = [] 2140 2141 return self.api_client.call_api(resource_path, 'DELETE', 2142 path_params, 2143 query_params, 2144 header_params, 2145 body=body_params, 2146 post_params=form_params, 2147 files=local_var_files, 2148 response_type='Recipients', 2149 auth_settings=auth_settings, 2150 callback=params.get('callback'), 2151 _return_http_data_only=params.get('_return_http_data_only'), 2152 _preload_content=params.get('_preload_content', True), 2153 _request_timeout=params.get('_request_timeout'), 2154 collection_formats=collection_formats) 2155 2156 def delete_recipients(self, account_id, template_id, **kwargs): 2157 """ 2158 Deletes recipients from a template. 2159 Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients. 2160 This method makes a synchronous HTTP request by default. To make an 2161 asynchronous HTTP request, please define a `callback` function 2162 to be invoked when receiving the response. 2163 >>> def callback_function(response): 2164 >>> pprint(response) 2165 >>> 2166 >>> thread = api.delete_recipients(account_id, template_id, callback=callback_function) 2167 2168 :param callback function: The callback function 2169 for asynchronous request. (optional) 2170 :param str account_id: The external account number (int) or account ID Guid. (required) 2171 :param str template_id: The ID of the template being accessed. (required) 2172 :param TemplateRecipients template_recipients: 2173 :return: Recipients 2174 If the method is called asynchronously, 2175 returns the request thread. 2176 """ 2177 kwargs['_return_http_data_only'] = True 2178 if kwargs.get('callback'): 2179 return self.delete_recipients_with_http_info(account_id, template_id, **kwargs) 2180 else: 2181 (data) = self.delete_recipients_with_http_info(account_id, template_id, **kwargs) 2182 return data 2183 2184 def delete_recipients_with_http_info(self, account_id, template_id, **kwargs): 2185 """ 2186 Deletes recipients from a template. 2187 Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients. 2188 This method makes a synchronous HTTP request by default. To make an 2189 asynchronous HTTP request, please define a `callback` function 2190 to be invoked when receiving the response. 2191 >>> def callback_function(response): 2192 >>> pprint(response) 2193 >>> 2194 >>> thread = api.delete_recipients_with_http_info(account_id, template_id, callback=callback_function) 2195 2196 :param callback function: The callback function 2197 for asynchronous request. (optional) 2198 :param str account_id: The external account number (int) or account ID Guid. (required) 2199 :param str template_id: The ID of the template being accessed. (required) 2200 :param TemplateRecipients template_recipients: 2201 :return: Recipients 2202 If the method is called asynchronously, 2203 returns the request thread. 2204 """ 2205 2206 all_params = ['account_id', 'template_id', 'template_recipients'] 2207 all_params.append('callback') 2208 all_params.append('_return_http_data_only') 2209 all_params.append('_preload_content') 2210 all_params.append('_request_timeout') 2211 2212 params = locals() 2213 for key, val in iteritems(params['kwargs']): 2214 if key not in all_params: 2215 raise TypeError( 2216 "Got an unexpected keyword argument '%s'" 2217 " to method delete_recipients" % key 2218 ) 2219 params[key] = val 2220 del params['kwargs'] 2221 # verify the required parameter 'account_id' is set 2222 if ('account_id' not in params) or (params['account_id'] is None): 2223 raise ValueError("Missing the required parameter `account_id` when calling `delete_recipients`") 2224 # verify the required parameter 'template_id' is set 2225 if ('template_id' not in params) or (params['template_id'] is None): 2226 raise ValueError("Missing the required parameter `template_id` when calling `delete_recipients`") 2227 2228 2229 collection_formats = {} 2230 2231 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json') 2232 path_params = {} 2233 if 'account_id' in params: 2234 path_params['accountId'] = params['account_id'] 2235 if 'template_id' in params: 2236 path_params['templateId'] = params['template_id'] 2237 2238 query_params = {} 2239 2240 header_params = {} 2241 2242 form_params = [] 2243 local_var_files = {} 2244 2245 body_params = None 2246 if 'template_recipients' in params: 2247 body_params = params['template_recipients'] 2248 # HTTP header `Accept` 2249 header_params['Accept'] = self.api_client.\ 2250 select_header_accept(['application/json']) 2251 2252 # Authentication setting 2253 auth_settings = [] 2254 2255 return self.api_client.call_api(resource_path, 'DELETE', 2256 path_params, 2257 query_params, 2258 header_params, 2259 body=body_params, 2260 post_params=form_params, 2261 files=local_var_files, 2262 response_type='Recipients', 2263 auth_settings=auth_settings, 2264 callback=params.get('callback'), 2265 _return_http_data_only=params.get('_return_http_data_only'), 2266 _preload_content=params.get('_preload_content', True), 2267 _request_timeout=params.get('_request_timeout'), 2268 collection_formats=collection_formats) 2269 2270 def delete_tabs(self, account_id, recipient_id, template_id, **kwargs): 2271 """ 2272 Deletes the tabs associated with a recipient in a template. 2273 Deletes one or more tabs associated with a recipient in a template. 2274 This method makes a synchronous HTTP request by default. To make an 2275 asynchronous HTTP request, please define a `callback` function 2276 to be invoked when receiving the response. 2277 >>> def callback_function(response): 2278 >>> pprint(response) 2279 >>> 2280 >>> thread = api.delete_tabs(account_id, recipient_id, template_id, callback=callback_function) 2281 2282 :param callback function: The callback function 2283 for asynchronous request. (optional) 2284 :param str account_id: The external account number (int) or account ID Guid. (required) 2285 :param str recipient_id: The ID of the recipient being accessed. (required) 2286 :param str template_id: The ID of the template being accessed. (required) 2287 :param TemplateTabs template_tabs: 2288 :return: Tabs 2289 If the method is called asynchronously, 2290 returns the request thread. 2291 """ 2292 kwargs['_return_http_data_only'] = True 2293 if kwargs.get('callback'): 2294 return self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 2295 else: 2296 (data) = self.delete_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 2297 return data 2298 2299 def delete_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs): 2300 """ 2301 Deletes the tabs associated with a recipient in a template. 2302 Deletes one or more tabs associated with a recipient in a template. 2303 This method makes a synchronous HTTP request by default. To make an 2304 asynchronous HTTP request, please define a `callback` function 2305 to be invoked when receiving the response. 2306 >>> def callback_function(response): 2307 >>> pprint(response) 2308 >>> 2309 >>> thread = api.delete_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function) 2310 2311 :param callback function: The callback function 2312 for asynchronous request. (optional) 2313 :param str account_id: The external account number (int) or account ID Guid. (required) 2314 :param str recipient_id: The ID of the recipient being accessed. (required) 2315 :param str template_id: The ID of the template being accessed. (required) 2316 :param TemplateTabs template_tabs: 2317 :return: Tabs 2318 If the method is called asynchronously, 2319 returns the request thread. 2320 """ 2321 2322 all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs'] 2323 all_params.append('callback') 2324 all_params.append('_return_http_data_only') 2325 all_params.append('_preload_content') 2326 all_params.append('_request_timeout') 2327 2328 params = locals() 2329 for key, val in iteritems(params['kwargs']): 2330 if key not in all_params: 2331 raise TypeError( 2332 "Got an unexpected keyword argument '%s'" 2333 " to method delete_tabs" % key 2334 ) 2335 params[key] = val 2336 del params['kwargs'] 2337 # verify the required parameter 'account_id' is set 2338 if ('account_id' not in params) or (params['account_id'] is None): 2339 raise ValueError("Missing the required parameter `account_id` when calling `delete_tabs`") 2340 # verify the required parameter 'recipient_id' is set 2341 if ('recipient_id' not in params) or (params['recipient_id'] is None): 2342 raise ValueError("Missing the required parameter `recipient_id` when calling `delete_tabs`") 2343 # verify the required parameter 'template_id' is set 2344 if ('template_id' not in params) or (params['template_id'] is None): 2345 raise ValueError("Missing the required parameter `template_id` when calling `delete_tabs`") 2346 2347 2348 collection_formats = {} 2349 2350 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json') 2351 path_params = {} 2352 if 'account_id' in params: 2353 path_params['accountId'] = params['account_id'] 2354 if 'recipient_id' in params: 2355 path_params['recipientId'] = params['recipient_id'] 2356 if 'template_id' in params: 2357 path_params['templateId'] = params['template_id'] 2358 2359 query_params = {} 2360 2361 header_params = {} 2362 2363 form_params = [] 2364 local_var_files = {} 2365 2366 body_params = None 2367 if 'template_tabs' in params: 2368 body_params = params['template_tabs'] 2369 # HTTP header `Accept` 2370 header_params['Accept'] = self.api_client.\ 2371 select_header_accept(['application/json']) 2372 2373 # Authentication setting 2374 auth_settings = [] 2375 2376 return self.api_client.call_api(resource_path, 'DELETE', 2377 path_params, 2378 query_params, 2379 header_params, 2380 body=body_params, 2381 post_params=form_params, 2382 files=local_var_files, 2383 response_type='Tabs', 2384 auth_settings=auth_settings, 2385 callback=params.get('callback'), 2386 _return_http_data_only=params.get('_return_http_data_only'), 2387 _preload_content=params.get('_preload_content', True), 2388 _request_timeout=params.get('_request_timeout'), 2389 collection_formats=collection_formats) 2390 2391 def delete_template_document_tabs(self, account_id, document_id, template_id, **kwargs): 2392 """ 2393 Deletes tabs from an envelope document 2394 Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 2395 This method makes a synchronous HTTP request by default. To make an 2396 asynchronous HTTP request, please define a `callback` function 2397 to be invoked when receiving the response. 2398 >>> def callback_function(response): 2399 >>> pprint(response) 2400 >>> 2401 >>> thread = api.delete_template_document_tabs(account_id, document_id, template_id, callback=callback_function) 2402 2403 :param callback function: The callback function 2404 for asynchronous request. (optional) 2405 :param str account_id: The external account number (int) or account ID Guid. (required) 2406 :param str document_id: The ID of the document being accessed. (required) 2407 :param str template_id: The ID of the template being accessed. (required) 2408 :param TemplateTabs template_tabs: 2409 :return: Tabs 2410 If the method is called asynchronously, 2411 returns the request thread. 2412 """ 2413 kwargs['_return_http_data_only'] = True 2414 if kwargs.get('callback'): 2415 return self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 2416 else: 2417 (data) = self.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 2418 return data 2419 2420 def delete_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs): 2421 """ 2422 Deletes tabs from an envelope document 2423 Deletes tabs from the document specified by `documentId` in the template specified by `templateId`. 2424 This method makes a synchronous HTTP request by default. To make an 2425 asynchronous HTTP request, please define a `callback` function 2426 to be invoked when receiving the response. 2427 >>> def callback_function(response): 2428 >>> pprint(response) 2429 >>> 2430 >>> thread = api.delete_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function) 2431 2432 :param callback function: The callback function 2433 for asynchronous request. (optional) 2434 :param str account_id: The external account number (int) or account ID Guid. (required) 2435 :param str document_id: The ID of the document being accessed. (required) 2436 :param str template_id: The ID of the template being accessed. (required) 2437 :param TemplateTabs template_tabs: 2438 :return: Tabs 2439 If the method is called asynchronously, 2440 returns the request thread. 2441 """ 2442 2443 all_params = ['account_id', 'document_id', 'template_id', 'template_tabs'] 2444 all_params.append('callback') 2445 all_params.append('_return_http_data_only') 2446 all_params.append('_preload_content') 2447 all_params.append('_request_timeout') 2448 2449 params = locals() 2450 for key, val in iteritems(params['kwargs']): 2451 if key not in all_params: 2452 raise TypeError( 2453 "Got an unexpected keyword argument '%s'" 2454 " to method delete_template_document_tabs" % key 2455 ) 2456 params[key] = val 2457 del params['kwargs'] 2458 # verify the required parameter 'account_id' is set 2459 if ('account_id' not in params) or (params['account_id'] is None): 2460 raise ValueError("Missing the required parameter `account_id` when calling `delete_template_document_tabs`") 2461 # verify the required parameter 'document_id' is set 2462 if ('document_id' not in params) or (params['document_id'] is None): 2463 raise ValueError("Missing the required parameter `document_id` when calling `delete_template_document_tabs`") 2464 # verify the required parameter 'template_id' is set 2465 if ('template_id' not in params) or (params['template_id'] is None): 2466 raise ValueError("Missing the required parameter `template_id` when calling `delete_template_document_tabs`") 2467 2468 2469 collection_formats = {} 2470 2471 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json') 2472 path_params = {} 2473 if 'account_id' in params: 2474 path_params['accountId'] = params['account_id'] 2475 if 'document_id' in params: 2476 path_params['documentId'] = params['document_id'] 2477 if 'template_id' in params: 2478 path_params['templateId'] = params['template_id'] 2479 2480 query_params = {} 2481 2482 header_params = {} 2483 2484 form_params = [] 2485 local_var_files = {} 2486 2487 body_params = None 2488 if 'template_tabs' in params: 2489 body_params = params['template_tabs'] 2490 # HTTP header `Accept` 2491 header_params['Accept'] = self.api_client.\ 2492 select_header_accept(['application/json']) 2493 2494 # Authentication setting 2495 auth_settings = [] 2496 2497 return self.api_client.call_api(resource_path, 'DELETE', 2498 path_params, 2499 query_params, 2500 header_params, 2501 body=body_params, 2502 post_params=form_params, 2503 files=local_var_files, 2504 response_type='Tabs', 2505 auth_settings=auth_settings, 2506 callback=params.get('callback'), 2507 _return_http_data_only=params.get('_return_http_data_only'), 2508 _preload_content=params.get('_preload_content', True), 2509 _request_timeout=params.get('_request_timeout'), 2510 collection_formats=collection_formats) 2511 2512 def get(self, account_id, template_id, **kwargs): 2513 """ 2514 Gets a list of templates for a specified account. 2515 Retrieves the definition of the specified template. 2516 This method makes a synchronous HTTP request by default. To make an 2517 asynchronous HTTP request, please define a `callback` function 2518 to be invoked when receiving the response. 2519 >>> def callback_function(response): 2520 >>> pprint(response) 2521 >>> 2522 >>> thread = api.get(account_id, template_id, callback=callback_function) 2523 2524 :param callback function: The callback function 2525 for asynchronous request. (optional) 2526 :param str account_id: The external account number (int) or account ID Guid. (required) 2527 :param str template_id: The ID of the template being accessed. (required) 2528 :param str include: 2529 :return: EnvelopeTemplate 2530 If the method is called asynchronously, 2531 returns the request thread. 2532 """ 2533 kwargs['_return_http_data_only'] = True 2534 if kwargs.get('callback'): 2535 return self.get_with_http_info(account_id, template_id, **kwargs) 2536 else: 2537 (data) = self.get_with_http_info(account_id, template_id, **kwargs) 2538 return data 2539 2540 def get_with_http_info(self, account_id, template_id, **kwargs): 2541 """ 2542 Gets a list of templates for a specified account. 2543 Retrieves the definition of the specified template. 2544 This method makes a synchronous HTTP request by default. To make an 2545 asynchronous HTTP request, please define a `callback` function 2546 to be invoked when receiving the response. 2547 >>> def callback_function(response): 2548 >>> pprint(response) 2549 >>> 2550 >>> thread = api.get_with_http_info(account_id, template_id, callback=callback_function) 2551 2552 :param callback function: The callback function 2553 for asynchronous request. (optional) 2554 :param str account_id: The external account number (int) or account ID Guid. (required) 2555 :param str template_id: The ID of the template being accessed. (required) 2556 :param str include: 2557 :return: EnvelopeTemplate 2558 If the method is called asynchronously, 2559 returns the request thread. 2560 """ 2561 2562 all_params = ['account_id', 'template_id', 'include'] 2563 all_params.append('callback') 2564 all_params.append('_return_http_data_only') 2565 all_params.append('_preload_content') 2566 all_params.append('_request_timeout') 2567 2568 params = locals() 2569 for key, val in iteritems(params['kwargs']): 2570 if key not in all_params: 2571 raise TypeError( 2572 "Got an unexpected keyword argument '%s'" 2573 " to method get" % key 2574 ) 2575 params[key] = val 2576 del params['kwargs'] 2577 # verify the required parameter 'account_id' is set 2578 if ('account_id' not in params) or (params['account_id'] is None): 2579 raise ValueError("Missing the required parameter `account_id` when calling `get`") 2580 # verify the required parameter 'template_id' is set 2581 if ('template_id' not in params) or (params['template_id'] is None): 2582 raise ValueError("Missing the required parameter `template_id` when calling `get`") 2583 2584 2585 collection_formats = {} 2586 2587 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json') 2588 path_params = {} 2589 if 'account_id' in params: 2590 path_params['accountId'] = params['account_id'] 2591 if 'template_id' in params: 2592 path_params['templateId'] = params['template_id'] 2593 2594 query_params = {} 2595 if 'include' in params: 2596 query_params['include'] = params['include'] 2597 2598 header_params = {} 2599 2600 form_params = [] 2601 local_var_files = {} 2602 2603 body_params = None 2604 # HTTP header `Accept` 2605 header_params['Accept'] = self.api_client.\ 2606 select_header_accept(['application/json']) 2607 2608 # Authentication setting 2609 auth_settings = [] 2610 2611 return self.api_client.call_api(resource_path, 'GET', 2612 path_params, 2613 query_params, 2614 header_params, 2615 body=body_params, 2616 post_params=form_params, 2617 files=local_var_files, 2618 response_type='EnvelopeTemplate', 2619 auth_settings=auth_settings, 2620 callback=params.get('callback'), 2621 _return_http_data_only=params.get('_return_http_data_only'), 2622 _preload_content=params.get('_preload_content', True), 2623 _request_timeout=params.get('_request_timeout'), 2624 collection_formats=collection_formats) 2625 2626 def get_document(self, account_id, document_id, template_id, **kwargs): 2627 """ 2628 Gets PDF documents from a template. 2629 Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf. 2630 This method makes a synchronous HTTP request by default. To make an 2631 asynchronous HTTP request, please define a `callback` function 2632 to be invoked when receiving the response. 2633 >>> def callback_function(response): 2634 >>> pprint(response) 2635 >>> 2636 >>> thread = api.get_document(account_id, document_id, template_id, callback=callback_function) 2637 2638 :param callback function: The callback function 2639 for asynchronous request. (optional) 2640 :param str account_id: The external account number (int) or account ID Guid. (required) 2641 :param str document_id: The ID of the document being accessed. (required) 2642 :param str template_id: The ID of the template being accessed. (required) 2643 :param str encrypt: 2644 :param str file_type: 2645 :param str show_changes: 2646 :return: file 2647 If the method is called asynchronously, 2648 returns the request thread. 2649 """ 2650 kwargs['_return_http_data_only'] = True 2651 if kwargs.get('callback'): 2652 return self.get_document_with_http_info(account_id, document_id, template_id, **kwargs) 2653 else: 2654 (data) = self.get_document_with_http_info(account_id, document_id, template_id, **kwargs) 2655 return data 2656 2657 def get_document_with_http_info(self, account_id, document_id, template_id, **kwargs): 2658 """ 2659 Gets PDF documents from a template. 2660 Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf. 2661 This method makes a synchronous HTTP request by default. To make an 2662 asynchronous HTTP request, please define a `callback` function 2663 to be invoked when receiving the response. 2664 >>> def callback_function(response): 2665 >>> pprint(response) 2666 >>> 2667 >>> thread = api.get_document_with_http_info(account_id, document_id, template_id, callback=callback_function) 2668 2669 :param callback function: The callback function 2670 for asynchronous request. (optional) 2671 :param str account_id: The external account number (int) or account ID Guid. (required) 2672 :param str document_id: The ID of the document being accessed. (required) 2673 :param str template_id: The ID of the template being accessed. (required) 2674 :param str encrypt: 2675 :param str file_type: 2676 :param str show_changes: 2677 :return: file 2678 If the method is called asynchronously, 2679 returns the request thread. 2680 """ 2681 2682 all_params = ['account_id', 'document_id', 'template_id', 'encrypt', 'file_type', 'show_changes'] 2683 all_params.append('callback') 2684 all_params.append('_return_http_data_only') 2685 all_params.append('_preload_content') 2686 all_params.append('_request_timeout') 2687 2688 params = locals() 2689 for key, val in iteritems(params['kwargs']): 2690 if key not in all_params: 2691 raise TypeError( 2692 "Got an unexpected keyword argument '%s'" 2693 " to method get_document" % key 2694 ) 2695 params[key] = val 2696 del params['kwargs'] 2697 # verify the required parameter 'account_id' is set 2698 if ('account_id' not in params) or (params['account_id'] is None): 2699 raise ValueError("Missing the required parameter `account_id` when calling `get_document`") 2700 # verify the required parameter 'document_id' is set 2701 if ('document_id' not in params) or (params['document_id'] is None): 2702 raise ValueError("Missing the required parameter `document_id` when calling `get_document`") 2703 # verify the required parameter 'template_id' is set 2704 if ('template_id' not in params) or (params['template_id'] is None): 2705 raise ValueError("Missing the required parameter `template_id` when calling `get_document`") 2706 2707 2708 collection_formats = {} 2709 2710 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json') 2711 path_params = {} 2712 if 'account_id' in params: 2713 path_params['accountId'] = params['account_id'] 2714 if 'document_id' in params: 2715 path_params['documentId'] = params['document_id'] 2716 if 'template_id' in params: 2717 path_params['templateId'] = params['template_id'] 2718 2719 query_params = {} 2720 if 'encrypt' in params: 2721 query_params['encrypt'] = params['encrypt'] 2722 if 'file_type' in params: 2723 query_params['file_type'] = params['file_type'] 2724 if 'show_changes' in params: 2725 query_params['show_changes'] = params['show_changes'] 2726 2727 header_params = {} 2728 2729 form_params = [] 2730 local_var_files = {} 2731 2732 body_params = None 2733 # HTTP header `Accept` 2734 header_params['Accept'] = self.api_client.\ 2735 select_header_accept(['application/pdf']) 2736 2737 # Authentication setting 2738 auth_settings = [] 2739 2740 return self.api_client.call_api(resource_path, 'GET', 2741 path_params, 2742 query_params, 2743 header_params, 2744 body=body_params, 2745 post_params=form_params, 2746 files=local_var_files, 2747 response_type='file', 2748 auth_settings=auth_settings, 2749 callback=params.get('callback'), 2750 _return_http_data_only=params.get('_return_http_data_only'), 2751 _preload_content=params.get('_preload_content', True), 2752 _request_timeout=params.get('_request_timeout'), 2753 collection_formats=collection_formats) 2754 2755 def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs): 2756 """ 2757 Gets a page image from a template for display. 2758 Retrieves a page image for display from the specified template. 2759 This method makes a synchronous HTTP request by default. To make an 2760 asynchronous HTTP request, please define a `callback` function 2761 to be invoked when receiving the response. 2762 >>> def callback_function(response): 2763 >>> pprint(response) 2764 >>> 2765 >>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function) 2766 2767 :param callback function: The callback function 2768 for asynchronous request. (optional) 2769 :param str account_id: The external account number (int) or account ID Guid. (required) 2770 :param str document_id: The ID of the document being accessed. (required) 2771 :param str page_number: The page number being accessed. (required) 2772 :param str template_id: The ID of the template being accessed. (required) 2773 :param str dpi: 2774 :param str max_height: 2775 :param str max_width: 2776 :param str show_changes: 2777 :return: file 2778 If the method is called asynchronously, 2779 returns the request thread. 2780 """ 2781 kwargs['_return_http_data_only'] = True 2782 if kwargs.get('callback'): 2783 return self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 2784 else: 2785 (data) = self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 2786 return data 2787 2788 def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs): 2789 """ 2790 Gets a page image from a template for display. 2791 Retrieves a page image for display from the specified template. 2792 This method makes a synchronous HTTP request by default. To make an 2793 asynchronous HTTP request, please define a `callback` function 2794 to be invoked when receiving the response. 2795 >>> def callback_function(response): 2796 >>> pprint(response) 2797 >>> 2798 >>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function) 2799 2800 :param callback function: The callback function 2801 for asynchronous request. (optional) 2802 :param str account_id: The external account number (int) or account ID Guid. (required) 2803 :param str document_id: The ID of the document being accessed. (required) 2804 :param str page_number: The page number being accessed. (required) 2805 :param str template_id: The ID of the template being accessed. (required) 2806 :param str dpi: 2807 :param str max_height: 2808 :param str max_width: 2809 :param str show_changes: 2810 :return: file 2811 If the method is called asynchronously, 2812 returns the request thread. 2813 """ 2814 2815 all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'dpi', 'max_height', 'max_width', 'show_changes'] 2816 all_params.append('callback') 2817 all_params.append('_return_http_data_only') 2818 all_params.append('_preload_content') 2819 all_params.append('_request_timeout') 2820 2821 params = locals() 2822 for key, val in iteritems(params['kwargs']): 2823 if key not in all_params: 2824 raise TypeError( 2825 "Got an unexpected keyword argument '%s'" 2826 " to method get_document_page_image" % key 2827 ) 2828 params[key] = val 2829 del params['kwargs'] 2830 # verify the required parameter 'account_id' is set 2831 if ('account_id' not in params) or (params['account_id'] is None): 2832 raise ValueError("Missing the required parameter `account_id` when calling `get_document_page_image`") 2833 # verify the required parameter 'document_id' is set 2834 if ('document_id' not in params) or (params['document_id'] is None): 2835 raise ValueError("Missing the required parameter `document_id` when calling `get_document_page_image`") 2836 # verify the required parameter 'page_number' is set 2837 if ('page_number' not in params) or (params['page_number'] is None): 2838 raise ValueError("Missing the required parameter `page_number` when calling `get_document_page_image`") 2839 # verify the required parameter 'template_id' is set 2840 if ('template_id' not in params) or (params['template_id'] is None): 2841 raise ValueError("Missing the required parameter `template_id` when calling `get_document_page_image`") 2842 2843 2844 collection_formats = {} 2845 2846 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json') 2847 path_params = {} 2848 if 'account_id' in params: 2849 path_params['accountId'] = params['account_id'] 2850 if 'document_id' in params: 2851 path_params['documentId'] = params['document_id'] 2852 if 'page_number' in params: 2853 path_params['pageNumber'] = params['page_number'] 2854 if 'template_id' in params: 2855 path_params['templateId'] = params['template_id'] 2856 2857 query_params = {} 2858 if 'dpi' in params: 2859 query_params['dpi'] = params['dpi'] 2860 if 'max_height' in params: 2861 query_params['max_height'] = params['max_height'] 2862 if 'max_width' in params: 2863 query_params['max_width'] = params['max_width'] 2864 if 'show_changes' in params: 2865 query_params['show_changes'] = params['show_changes'] 2866 2867 header_params = {} 2868 2869 form_params = [] 2870 local_var_files = {} 2871 2872 body_params = None 2873 # HTTP header `Accept` 2874 header_params['Accept'] = self.api_client.\ 2875 select_header_accept(['image/png']) 2876 2877 # Authentication setting 2878 auth_settings = [] 2879 2880 return self.api_client.call_api(resource_path, 'GET', 2881 path_params, 2882 query_params, 2883 header_params, 2884 body=body_params, 2885 post_params=form_params, 2886 files=local_var_files, 2887 response_type='file', 2888 auth_settings=auth_settings, 2889 callback=params.get('callback'), 2890 _return_http_data_only=params.get('_return_http_data_only'), 2891 _preload_content=params.get('_preload_content', True), 2892 _request_timeout=params.get('_request_timeout'), 2893 collection_formats=collection_formats) 2894 2895 def get_document_tabs(self, account_id, document_id, template_id, **kwargs): 2896 """ 2897 Returns tabs on the document. 2898 Returns the tabs on the document specified by `documentId` in the template specified by `templateId`. 2899 This method makes a synchronous HTTP request by default. To make an 2900 asynchronous HTTP request, please define a `callback` function 2901 to be invoked when receiving the response. 2902 >>> def callback_function(response): 2903 >>> pprint(response) 2904 >>> 2905 >>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function) 2906 2907 :param callback function: The callback function 2908 for asynchronous request. (optional) 2909 :param str account_id: The external account number (int) or account ID Guid. (required) 2910 :param str document_id: The ID of the document being accessed. (required) 2911 :param str template_id: The ID of the template being accessed. (required) 2912 :param str page_numbers: 2913 :return: Tabs 2914 If the method is called asynchronously, 2915 returns the request thread. 2916 """ 2917 kwargs['_return_http_data_only'] = True 2918 if kwargs.get('callback'): 2919 return self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 2920 else: 2921 (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 2922 return data 2923 2924 def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs): 2925 """ 2926 Returns tabs on the document. 2927 Returns the tabs on the document specified by `documentId` in the template specified by `templateId`. 2928 This method makes a synchronous HTTP request by default. To make an 2929 asynchronous HTTP request, please define a `callback` function 2930 to be invoked when receiving the response. 2931 >>> def callback_function(response): 2932 >>> pprint(response) 2933 >>> 2934 >>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function) 2935 2936 :param callback function: The callback function 2937 for asynchronous request. (optional) 2938 :param str account_id: The external account number (int) or account ID Guid. (required) 2939 :param str document_id: The ID of the document being accessed. (required) 2940 :param str template_id: The ID of the template being accessed. (required) 2941 :param str page_numbers: 2942 :return: Tabs 2943 If the method is called asynchronously, 2944 returns the request thread. 2945 """ 2946 2947 all_params = ['account_id', 'document_id', 'template_id', 'page_numbers'] 2948 all_params.append('callback') 2949 all_params.append('_return_http_data_only') 2950 all_params.append('_preload_content') 2951 all_params.append('_request_timeout') 2952 2953 params = locals() 2954 for key, val in iteritems(params['kwargs']): 2955 if key not in all_params: 2956 raise TypeError( 2957 "Got an unexpected keyword argument '%s'" 2958 " to method get_document_tabs" % key 2959 ) 2960 params[key] = val 2961 del params['kwargs'] 2962 # verify the required parameter 'account_id' is set 2963 if ('account_id' not in params) or (params['account_id'] is None): 2964 raise ValueError("Missing the required parameter `account_id` when calling `get_document_tabs`") 2965 # verify the required parameter 'document_id' is set 2966 if ('document_id' not in params) or (params['document_id'] is None): 2967 raise ValueError("Missing the required parameter `document_id` when calling `get_document_tabs`") 2968 # verify the required parameter 'template_id' is set 2969 if ('template_id' not in params) or (params['template_id'] is None): 2970 raise ValueError("Missing the required parameter `template_id` when calling `get_document_tabs`") 2971 2972 2973 collection_formats = {} 2974 2975 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json') 2976 path_params = {} 2977 if 'account_id' in params: 2978 path_params['accountId'] = params['account_id'] 2979 if 'document_id' in params: 2980 path_params['documentId'] = params['document_id'] 2981 if 'template_id' in params: 2982 path_params['templateId'] = params['template_id'] 2983 2984 query_params = {} 2985 if 'page_numbers' in params: 2986 query_params['page_numbers'] = params['page_numbers'] 2987 2988 header_params = {} 2989 2990 form_params = [] 2991 local_var_files = {} 2992 2993 body_params = None 2994 # HTTP header `Accept` 2995 header_params['Accept'] = self.api_client.\ 2996 select_header_accept(['application/json']) 2997 2998 # Authentication setting 2999 auth_settings = [] 3000 3001 return self.api_client.call_api(resource_path, 'GET', 3002 path_params, 3003 query_params, 3004 header_params, 3005 body=body_params, 3006 post_params=form_params, 3007 files=local_var_files, 3008 response_type='Tabs', 3009 auth_settings=auth_settings, 3010 callback=params.get('callback'), 3011 _return_http_data_only=params.get('_return_http_data_only'), 3012 _preload_content=params.get('_preload_content', True), 3013 _request_timeout=params.get('_request_timeout'), 3014 collection_formats=collection_formats) 3015 3016 def get_lock(self, account_id, template_id, **kwargs): 3017 """ 3018 Gets template lock information. 3019 Retrieves general information about the template lock. If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. 3020 This method makes a synchronous HTTP request by default. To make an 3021 asynchronous HTTP request, please define a `callback` function 3022 to be invoked when receiving the response. 3023 >>> def callback_function(response): 3024 >>> pprint(response) 3025 >>> 3026 >>> thread = api.get_lock(account_id, template_id, callback=callback_function) 3027 3028 :param callback function: The callback function 3029 for asynchronous request. (optional) 3030 :param str account_id: The external account number (int) or account ID Guid. (required) 3031 :param str template_id: The ID of the template being accessed. (required) 3032 :return: LockInformation 3033 If the method is called asynchronously, 3034 returns the request thread. 3035 """ 3036 kwargs['_return_http_data_only'] = True 3037 if kwargs.get('callback'): 3038 return self.get_lock_with_http_info(account_id, template_id, **kwargs) 3039 else: 3040 (data) = self.get_lock_with_http_info(account_id, template_id, **kwargs) 3041 return data 3042 3043 def get_lock_with_http_info(self, account_id, template_id, **kwargs): 3044 """ 3045 Gets template lock information. 3046 Retrieves general information about the template lock. If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. 3047 This method makes a synchronous HTTP request by default. To make an 3048 asynchronous HTTP request, please define a `callback` function 3049 to be invoked when receiving the response. 3050 >>> def callback_function(response): 3051 >>> pprint(response) 3052 >>> 3053 >>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function) 3054 3055 :param callback function: The callback function 3056 for asynchronous request. (optional) 3057 :param str account_id: The external account number (int) or account ID Guid. (required) 3058 :param str template_id: The ID of the template being accessed. (required) 3059 :return: LockInformation 3060 If the method is called asynchronously, 3061 returns the request thread. 3062 """ 3063 3064 all_params = ['account_id', 'template_id'] 3065 all_params.append('callback') 3066 all_params.append('_return_http_data_only') 3067 all_params.append('_preload_content') 3068 all_params.append('_request_timeout') 3069 3070 params = locals() 3071 for key, val in iteritems(params['kwargs']): 3072 if key not in all_params: 3073 raise TypeError( 3074 "Got an unexpected keyword argument '%s'" 3075 " to method get_lock" % key 3076 ) 3077 params[key] = val 3078 del params['kwargs'] 3079 # verify the required parameter 'account_id' is set 3080 if ('account_id' not in params) or (params['account_id'] is None): 3081 raise ValueError("Missing the required parameter `account_id` when calling `get_lock`") 3082 # verify the required parameter 'template_id' is set 3083 if ('template_id' not in params) or (params['template_id'] is None): 3084 raise ValueError("Missing the required parameter `template_id` when calling `get_lock`") 3085 3086 3087 collection_formats = {} 3088 3089 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json') 3090 path_params = {} 3091 if 'account_id' in params: 3092 path_params['accountId'] = params['account_id'] 3093 if 'template_id' in params: 3094 path_params['templateId'] = params['template_id'] 3095 3096 query_params = {} 3097 3098 header_params = {} 3099 3100 form_params = [] 3101 local_var_files = {} 3102 3103 body_params = None 3104 # HTTP header `Accept` 3105 header_params['Accept'] = self.api_client.\ 3106 select_header_accept(['application/json']) 3107 3108 # Authentication setting 3109 auth_settings = [] 3110 3111 return self.api_client.call_api(resource_path, 'GET', 3112 path_params, 3113 query_params, 3114 header_params, 3115 body=body_params, 3116 post_params=form_params, 3117 files=local_var_files, 3118 response_type='LockInformation', 3119 auth_settings=auth_settings, 3120 callback=params.get('callback'), 3121 _return_http_data_only=params.get('_return_http_data_only'), 3122 _preload_content=params.get('_preload_content', True), 3123 _request_timeout=params.get('_request_timeout'), 3124 collection_formats=collection_formats) 3125 3126 def get_notification_settings(self, account_id, template_id, **kwargs): 3127 """ 3128 Gets template notification information. 3129 Retrieves the envelope notification, reminders and expirations, information for an existing template. 3130 This method makes a synchronous HTTP request by default. To make an 3131 asynchronous HTTP request, please define a `callback` function 3132 to be invoked when receiving the response. 3133 >>> def callback_function(response): 3134 >>> pprint(response) 3135 >>> 3136 >>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function) 3137 3138 :param callback function: The callback function 3139 for asynchronous request. (optional) 3140 :param str account_id: The external account number (int) or account ID Guid. (required) 3141 :param str template_id: The ID of the template being accessed. (required) 3142 :return: Notification 3143 If the method is called asynchronously, 3144 returns the request thread. 3145 """ 3146 kwargs['_return_http_data_only'] = True 3147 if kwargs.get('callback'): 3148 return self.get_notification_settings_with_http_info(account_id, template_id, **kwargs) 3149 else: 3150 (data) = self.get_notification_settings_with_http_info(account_id, template_id, **kwargs) 3151 return data 3152 3153 def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs): 3154 """ 3155 Gets template notification information. 3156 Retrieves the envelope notification, reminders and expirations, information for an existing template. 3157 This method makes a synchronous HTTP request by default. To make an 3158 asynchronous HTTP request, please define a `callback` function 3159 to be invoked when receiving the response. 3160 >>> def callback_function(response): 3161 >>> pprint(response) 3162 >>> 3163 >>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function) 3164 3165 :param callback function: The callback function 3166 for asynchronous request. (optional) 3167 :param str account_id: The external account number (int) or account ID Guid. (required) 3168 :param str template_id: The ID of the template being accessed. (required) 3169 :return: Notification 3170 If the method is called asynchronously, 3171 returns the request thread. 3172 """ 3173 3174 all_params = ['account_id', 'template_id'] 3175 all_params.append('callback') 3176 all_params.append('_return_http_data_only') 3177 all_params.append('_preload_content') 3178 all_params.append('_request_timeout') 3179 3180 params = locals() 3181 for key, val in iteritems(params['kwargs']): 3182 if key not in all_params: 3183 raise TypeError( 3184 "Got an unexpected keyword argument '%s'" 3185 " to method get_notification_settings" % key 3186 ) 3187 params[key] = val 3188 del params['kwargs'] 3189 # verify the required parameter 'account_id' is set 3190 if ('account_id' not in params) or (params['account_id'] is None): 3191 raise ValueError("Missing the required parameter `account_id` when calling `get_notification_settings`") 3192 # verify the required parameter 'template_id' is set 3193 if ('template_id' not in params) or (params['template_id'] is None): 3194 raise ValueError("Missing the required parameter `template_id` when calling `get_notification_settings`") 3195 3196 3197 collection_formats = {} 3198 3199 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json') 3200 path_params = {} 3201 if 'account_id' in params: 3202 path_params['accountId'] = params['account_id'] 3203 if 'template_id' in params: 3204 path_params['templateId'] = params['template_id'] 3205 3206 query_params = {} 3207 3208 header_params = {} 3209 3210 form_params = [] 3211 local_var_files = {} 3212 3213 body_params = None 3214 # HTTP header `Accept` 3215 header_params['Accept'] = self.api_client.\ 3216 select_header_accept(['application/json']) 3217 3218 # Authentication setting 3219 auth_settings = [] 3220 3221 return self.api_client.call_api(resource_path, 'GET', 3222 path_params, 3223 query_params, 3224 header_params, 3225 body=body_params, 3226 post_params=form_params, 3227 files=local_var_files, 3228 response_type='Notification', 3229 auth_settings=auth_settings, 3230 callback=params.get('callback'), 3231 _return_http_data_only=params.get('_return_http_data_only'), 3232 _preload_content=params.get('_preload_content', True), 3233 _request_timeout=params.get('_request_timeout'), 3234 collection_formats=collection_formats) 3235 3236 def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs): 3237 """ 3238 Returns tabs on the specified page. 3239 Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 3240 This method makes a synchronous HTTP request by default. To make an 3241 asynchronous HTTP request, please define a `callback` function 3242 to be invoked when receiving the response. 3243 >>> def callback_function(response): 3244 >>> pprint(response) 3245 >>> 3246 >>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function) 3247 3248 :param callback function: The callback function 3249 for asynchronous request. (optional) 3250 :param str account_id: The external account number (int) or account ID Guid. (required) 3251 :param str document_id: The ID of the document being accessed. (required) 3252 :param str page_number: The page number being accessed. (required) 3253 :param str template_id: The ID of the template being accessed. (required) 3254 :return: Tabs 3255 If the method is called asynchronously, 3256 returns the request thread. 3257 """ 3258 kwargs['_return_http_data_only'] = True 3259 if kwargs.get('callback'): 3260 return self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 3261 else: 3262 (data) = self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 3263 return data 3264 3265 def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs): 3266 """ 3267 Returns tabs on the specified page. 3268 Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 3269 This method makes a synchronous HTTP request by default. To make an 3270 asynchronous HTTP request, please define a `callback` function 3271 to be invoked when receiving the response. 3272 >>> def callback_function(response): 3273 >>> pprint(response) 3274 >>> 3275 >>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function) 3276 3277 :param callback function: The callback function 3278 for asynchronous request. (optional) 3279 :param str account_id: The external account number (int) or account ID Guid. (required) 3280 :param str document_id: The ID of the document being accessed. (required) 3281 :param str page_number: The page number being accessed. (required) 3282 :param str template_id: The ID of the template being accessed. (required) 3283 :return: Tabs 3284 If the method is called asynchronously, 3285 returns the request thread. 3286 """ 3287 3288 all_params = ['account_id', 'document_id', 'page_number', 'template_id'] 3289 all_params.append('callback') 3290 all_params.append('_return_http_data_only') 3291 all_params.append('_preload_content') 3292 all_params.append('_request_timeout') 3293 3294 params = locals() 3295 for key, val in iteritems(params['kwargs']): 3296 if key not in all_params: 3297 raise TypeError( 3298 "Got an unexpected keyword argument '%s'" 3299 " to method get_page_tabs" % key 3300 ) 3301 params[key] = val 3302 del params['kwargs'] 3303 # verify the required parameter 'account_id' is set 3304 if ('account_id' not in params) or (params['account_id'] is None): 3305 raise ValueError("Missing the required parameter `account_id` when calling `get_page_tabs`") 3306 # verify the required parameter 'document_id' is set 3307 if ('document_id' not in params) or (params['document_id'] is None): 3308 raise ValueError("Missing the required parameter `document_id` when calling `get_page_tabs`") 3309 # verify the required parameter 'page_number' is set 3310 if ('page_number' not in params) or (params['page_number'] is None): 3311 raise ValueError("Missing the required parameter `page_number` when calling `get_page_tabs`") 3312 # verify the required parameter 'template_id' is set 3313 if ('template_id' not in params) or (params['template_id'] is None): 3314 raise ValueError("Missing the required parameter `template_id` when calling `get_page_tabs`") 3315 3316 3317 collection_formats = {} 3318 3319 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs'.replace('{format}', 'json') 3320 path_params = {} 3321 if 'account_id' in params: 3322 path_params['accountId'] = params['account_id'] 3323 if 'document_id' in params: 3324 path_params['documentId'] = params['document_id'] 3325 if 'page_number' in params: 3326 path_params['pageNumber'] = params['page_number'] 3327 if 'template_id' in params: 3328 path_params['templateId'] = params['template_id'] 3329 3330 query_params = {} 3331 3332 header_params = {} 3333 3334 form_params = [] 3335 local_var_files = {} 3336 3337 body_params = None 3338 # HTTP header `Accept` 3339 header_params['Accept'] = self.api_client.\ 3340 select_header_accept(['application/json']) 3341 3342 # Authentication setting 3343 auth_settings = [] 3344 3345 return self.api_client.call_api(resource_path, 'GET', 3346 path_params, 3347 query_params, 3348 header_params, 3349 body=body_params, 3350 post_params=form_params, 3351 files=local_var_files, 3352 response_type='Tabs', 3353 auth_settings=auth_settings, 3354 callback=params.get('callback'), 3355 _return_http_data_only=params.get('_return_http_data_only'), 3356 _preload_content=params.get('_preload_content', True), 3357 _request_timeout=params.get('_request_timeout'), 3358 collection_formats=collection_formats) 3359 3360 def get_pages(self, account_id, document_id, template_id, **kwargs): 3361 """ 3362 Returns document page image(s) based on input. 3363 Returns images of the pages in a template document for display based on the parameters that you specify. 3364 This method makes a synchronous HTTP request by default. To make an 3365 asynchronous HTTP request, please define a `callback` function 3366 to be invoked when receiving the response. 3367 >>> def callback_function(response): 3368 >>> pprint(response) 3369 >>> 3370 >>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function) 3371 3372 :param callback function: The callback function 3373 for asynchronous request. (optional) 3374 :param str account_id: The external account number (int) or account ID Guid. (required) 3375 :param str document_id: The ID of the document being accessed. (required) 3376 :param str template_id: The ID of the template being accessed. (required) 3377 :param str count: 3378 :param str dpi: 3379 :param str max_height: 3380 :param str max_width: 3381 :param str nocache: 3382 :param str show_changes: 3383 :param str start_position: 3384 :return: PageImages 3385 If the method is called asynchronously, 3386 returns the request thread. 3387 """ 3388 kwargs['_return_http_data_only'] = True 3389 if kwargs.get('callback'): 3390 return self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs) 3391 else: 3392 (data) = self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs) 3393 return data 3394 3395 def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs): 3396 """ 3397 Returns document page image(s) based on input. 3398 Returns images of the pages in a template document for display based on the parameters that you specify. 3399 This method makes a synchronous HTTP request by default. To make an 3400 asynchronous HTTP request, please define a `callback` function 3401 to be invoked when receiving the response. 3402 >>> def callback_function(response): 3403 >>> pprint(response) 3404 >>> 3405 >>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function) 3406 3407 :param callback function: The callback function 3408 for asynchronous request. (optional) 3409 :param str account_id: The external account number (int) or account ID Guid. (required) 3410 :param str document_id: The ID of the document being accessed. (required) 3411 :param str template_id: The ID of the template being accessed. (required) 3412 :param str count: 3413 :param str dpi: 3414 :param str max_height: 3415 :param str max_width: 3416 :param str nocache: 3417 :param str show_changes: 3418 :param str start_position: 3419 :return: PageImages 3420 If the method is called asynchronously, 3421 returns the request thread. 3422 """ 3423 3424 all_params = ['account_id', 'document_id', 'template_id', 'count', 'dpi', 'max_height', 'max_width', 'nocache', 'show_changes', 'start_position'] 3425 all_params.append('callback') 3426 all_params.append('_return_http_data_only') 3427 all_params.append('_preload_content') 3428 all_params.append('_request_timeout') 3429 3430 params = locals() 3431 for key, val in iteritems(params['kwargs']): 3432 if key not in all_params: 3433 raise TypeError( 3434 "Got an unexpected keyword argument '%s'" 3435 " to method get_pages" % key 3436 ) 3437 params[key] = val 3438 del params['kwargs'] 3439 # verify the required parameter 'account_id' is set 3440 if ('account_id' not in params) or (params['account_id'] is None): 3441 raise ValueError("Missing the required parameter `account_id` when calling `get_pages`") 3442 # verify the required parameter 'document_id' is set 3443 if ('document_id' not in params) or (params['document_id'] is None): 3444 raise ValueError("Missing the required parameter `document_id` when calling `get_pages`") 3445 # verify the required parameter 'template_id' is set 3446 if ('template_id' not in params) or (params['template_id'] is None): 3447 raise ValueError("Missing the required parameter `template_id` when calling `get_pages`") 3448 3449 3450 collection_formats = {} 3451 3452 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages'.replace('{format}', 'json') 3453 path_params = {} 3454 if 'account_id' in params: 3455 path_params['accountId'] = params['account_id'] 3456 if 'document_id' in params: 3457 path_params['documentId'] = params['document_id'] 3458 if 'template_id' in params: 3459 path_params['templateId'] = params['template_id'] 3460 3461 query_params = {} 3462 if 'count' in params: 3463 query_params['count'] = params['count'] 3464 if 'dpi' in params: 3465 query_params['dpi'] = params['dpi'] 3466 if 'max_height' in params: 3467 query_params['max_height'] = params['max_height'] 3468 if 'max_width' in params: 3469 query_params['max_width'] = params['max_width'] 3470 if 'nocache' in params: 3471 query_params['nocache'] = params['nocache'] 3472 if 'show_changes' in params: 3473 query_params['show_changes'] = params['show_changes'] 3474 if 'start_position' in params: 3475 query_params['start_position'] = params['start_position'] 3476 3477 header_params = {} 3478 3479 form_params = [] 3480 local_var_files = {} 3481 3482 body_params = None 3483 # HTTP header `Accept` 3484 header_params['Accept'] = self.api_client.\ 3485 select_header_accept(['application/json']) 3486 3487 # Authentication setting 3488 auth_settings = [] 3489 3490 return self.api_client.call_api(resource_path, 'GET', 3491 path_params, 3492 query_params, 3493 header_params, 3494 body=body_params, 3495 post_params=form_params, 3496 files=local_var_files, 3497 response_type='PageImages', 3498 auth_settings=auth_settings, 3499 callback=params.get('callback'), 3500 _return_http_data_only=params.get('_return_http_data_only'), 3501 _preload_content=params.get('_preload_content', True), 3502 _request_timeout=params.get('_request_timeout'), 3503 collection_formats=collection_formats) 3504 3505 def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs): 3506 """ 3507 Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template. 3508 3509 This method makes a synchronous HTTP request by default. To make an 3510 asynchronous HTTP request, please define a `callback` function 3511 to be invoked when receiving the response. 3512 >>> def callback_function(response): 3513 >>> pprint(response) 3514 >>> 3515 >>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function) 3516 3517 :param callback function: The callback function 3518 for asynchronous request. (optional) 3519 :param str account_id: The external account number (int) or account ID Guid. (required) 3520 :param str document_id: The ID of the document being accessed. (required) 3521 :param str template_id: The ID of the template being accessed. (required) 3522 :return: DocumentHtmlDefinitionOriginals 3523 If the method is called asynchronously, 3524 returns the request thread. 3525 """ 3526 kwargs['_return_http_data_only'] = True 3527 if kwargs.get('callback'): 3528 return self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs) 3529 else: 3530 (data) = self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs) 3531 return data 3532 3533 def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs): 3534 """ 3535 Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template. 3536 3537 This method makes a synchronous HTTP request by default. To make an 3538 asynchronous HTTP request, please define a `callback` function 3539 to be invoked when receiving the response. 3540 >>> def callback_function(response): 3541 >>> pprint(response) 3542 >>> 3543 >>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function) 3544 3545 :param callback function: The callback function 3546 for asynchronous request. (optional) 3547 :param str account_id: The external account number (int) or account ID Guid. (required) 3548 :param str document_id: The ID of the document being accessed. (required) 3549 :param str template_id: The ID of the template being accessed. (required) 3550 :return: DocumentHtmlDefinitionOriginals 3551 If the method is called asynchronously, 3552 returns the request thread. 3553 """ 3554 3555 all_params = ['account_id', 'document_id', 'template_id'] 3556 all_params.append('callback') 3557 all_params.append('_return_http_data_only') 3558 all_params.append('_preload_content') 3559 all_params.append('_request_timeout') 3560 3561 params = locals() 3562 for key, val in iteritems(params['kwargs']): 3563 if key not in all_params: 3564 raise TypeError( 3565 "Got an unexpected keyword argument '%s'" 3566 " to method get_template_document_html_definitions" % key 3567 ) 3568 params[key] = val 3569 del params['kwargs'] 3570 # verify the required parameter 'account_id' is set 3571 if ('account_id' not in params) or (params['account_id'] is None): 3572 raise ValueError("Missing the required parameter `account_id` when calling `get_template_document_html_definitions`") 3573 # verify the required parameter 'document_id' is set 3574 if ('document_id' not in params) or (params['document_id'] is None): 3575 raise ValueError("Missing the required parameter `document_id` when calling `get_template_document_html_definitions`") 3576 # verify the required parameter 'template_id' is set 3577 if ('template_id' not in params) or (params['template_id'] is None): 3578 raise ValueError("Missing the required parameter `template_id` when calling `get_template_document_html_definitions`") 3579 3580 3581 collection_formats = {} 3582 3583 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions'.replace('{format}', 'json') 3584 path_params = {} 3585 if 'account_id' in params: 3586 path_params['accountId'] = params['account_id'] 3587 if 'document_id' in params: 3588 path_params['documentId'] = params['document_id'] 3589 if 'template_id' in params: 3590 path_params['templateId'] = params['template_id'] 3591 3592 query_params = {} 3593 3594 header_params = {} 3595 3596 form_params = [] 3597 local_var_files = {} 3598 3599 body_params = None 3600 # HTTP header `Accept` 3601 header_params['Accept'] = self.api_client.\ 3602 select_header_accept(['application/json']) 3603 3604 # Authentication setting 3605 auth_settings = [] 3606 3607 return self.api_client.call_api(resource_path, 'GET', 3608 path_params, 3609 query_params, 3610 header_params, 3611 body=body_params, 3612 post_params=form_params, 3613 files=local_var_files, 3614 response_type='DocumentHtmlDefinitionOriginals', 3615 auth_settings=auth_settings, 3616 callback=params.get('callback'), 3617 _return_http_data_only=params.get('_return_http_data_only'), 3618 _preload_content=params.get('_preload_content', True), 3619 _request_timeout=params.get('_request_timeout'), 3620 collection_formats=collection_formats) 3621 3622 def get_template_html_definitions(self, account_id, template_id, **kwargs): 3623 """ 3624 Get the Original HTML Definition used to generate the Responsive HTML for the template. 3625 3626 This method makes a synchronous HTTP request by default. To make an 3627 asynchronous HTTP request, please define a `callback` function 3628 to be invoked when receiving the response. 3629 >>> def callback_function(response): 3630 >>> pprint(response) 3631 >>> 3632 >>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function) 3633 3634 :param callback function: The callback function 3635 for asynchronous request. (optional) 3636 :param str account_id: The external account number (int) or account ID Guid. (required) 3637 :param str template_id: The ID of the template being accessed. (required) 3638 :return: DocumentHtmlDefinitionOriginals 3639 If the method is called asynchronously, 3640 returns the request thread. 3641 """ 3642 kwargs['_return_http_data_only'] = True 3643 if kwargs.get('callback'): 3644 return self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs) 3645 else: 3646 (data) = self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs) 3647 return data 3648 3649 def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs): 3650 """ 3651 Get the Original HTML Definition used to generate the Responsive HTML for the template. 3652 3653 This method makes a synchronous HTTP request by default. To make an 3654 asynchronous HTTP request, please define a `callback` function 3655 to be invoked when receiving the response. 3656 >>> def callback_function(response): 3657 >>> pprint(response) 3658 >>> 3659 >>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function) 3660 3661 :param callback function: The callback function 3662 for asynchronous request. (optional) 3663 :param str account_id: The external account number (int) or account ID Guid. (required) 3664 :param str template_id: The ID of the template being accessed. (required) 3665 :return: DocumentHtmlDefinitionOriginals 3666 If the method is called asynchronously, 3667 returns the request thread. 3668 """ 3669 3670 all_params = ['account_id', 'template_id'] 3671 all_params.append('callback') 3672 all_params.append('_return_http_data_only') 3673 all_params.append('_preload_content') 3674 all_params.append('_request_timeout') 3675 3676 params = locals() 3677 for key, val in iteritems(params['kwargs']): 3678 if key not in all_params: 3679 raise TypeError( 3680 "Got an unexpected keyword argument '%s'" 3681 " to method get_template_html_definitions" % key 3682 ) 3683 params[key] = val 3684 del params['kwargs'] 3685 # verify the required parameter 'account_id' is set 3686 if ('account_id' not in params) or (params['account_id'] is None): 3687 raise ValueError("Missing the required parameter `account_id` when calling `get_template_html_definitions`") 3688 # verify the required parameter 'template_id' is set 3689 if ('template_id' not in params) or (params['template_id'] is None): 3690 raise ValueError("Missing the required parameter `template_id` when calling `get_template_html_definitions`") 3691 3692 3693 collection_formats = {} 3694 3695 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions'.replace('{format}', 'json') 3696 path_params = {} 3697 if 'account_id' in params: 3698 path_params['accountId'] = params['account_id'] 3699 if 'template_id' in params: 3700 path_params['templateId'] = params['template_id'] 3701 3702 query_params = {} 3703 3704 header_params = {} 3705 3706 form_params = [] 3707 local_var_files = {} 3708 3709 body_params = None 3710 # HTTP header `Accept` 3711 header_params['Accept'] = self.api_client.\ 3712 select_header_accept(['application/json']) 3713 3714 # Authentication setting 3715 auth_settings = [] 3716 3717 return self.api_client.call_api(resource_path, 'GET', 3718 path_params, 3719 query_params, 3720 header_params, 3721 body=body_params, 3722 post_params=form_params, 3723 files=local_var_files, 3724 response_type='DocumentHtmlDefinitionOriginals', 3725 auth_settings=auth_settings, 3726 callback=params.get('callback'), 3727 _return_http_data_only=params.get('_return_http_data_only'), 3728 _preload_content=params.get('_preload_content', True), 3729 _request_timeout=params.get('_request_timeout'), 3730 collection_formats=collection_formats) 3731 3732 def list_custom_fields(self, account_id, template_id, **kwargs): 3733 """ 3734 Gets the custom document fields from a template. 3735 Retrieves the custom document field information from an existing template. 3736 This method makes a synchronous HTTP request by default. To make an 3737 asynchronous HTTP request, please define a `callback` function 3738 to be invoked when receiving the response. 3739 >>> def callback_function(response): 3740 >>> pprint(response) 3741 >>> 3742 >>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function) 3743 3744 :param callback function: The callback function 3745 for asynchronous request. (optional) 3746 :param str account_id: The external account number (int) or account ID Guid. (required) 3747 :param str template_id: The ID of the template being accessed. (required) 3748 :return: CustomFields 3749 If the method is called asynchronously, 3750 returns the request thread. 3751 """ 3752 kwargs['_return_http_data_only'] = True 3753 if kwargs.get('callback'): 3754 return self.list_custom_fields_with_http_info(account_id, template_id, **kwargs) 3755 else: 3756 (data) = self.list_custom_fields_with_http_info(account_id, template_id, **kwargs) 3757 return data 3758 3759 def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs): 3760 """ 3761 Gets the custom document fields from a template. 3762 Retrieves the custom document field information from an existing template. 3763 This method makes a synchronous HTTP request by default. To make an 3764 asynchronous HTTP request, please define a `callback` function 3765 to be invoked when receiving the response. 3766 >>> def callback_function(response): 3767 >>> pprint(response) 3768 >>> 3769 >>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function) 3770 3771 :param callback function: The callback function 3772 for asynchronous request. (optional) 3773 :param str account_id: The external account number (int) or account ID Guid. (required) 3774 :param str template_id: The ID of the template being accessed. (required) 3775 :return: CustomFields 3776 If the method is called asynchronously, 3777 returns the request thread. 3778 """ 3779 3780 all_params = ['account_id', 'template_id'] 3781 all_params.append('callback') 3782 all_params.append('_return_http_data_only') 3783 all_params.append('_preload_content') 3784 all_params.append('_request_timeout') 3785 3786 params = locals() 3787 for key, val in iteritems(params['kwargs']): 3788 if key not in all_params: 3789 raise TypeError( 3790 "Got an unexpected keyword argument '%s'" 3791 " to method list_custom_fields" % key 3792 ) 3793 params[key] = val 3794 del params['kwargs'] 3795 # verify the required parameter 'account_id' is set 3796 if ('account_id' not in params) or (params['account_id'] is None): 3797 raise ValueError("Missing the required parameter `account_id` when calling `list_custom_fields`") 3798 # verify the required parameter 'template_id' is set 3799 if ('template_id' not in params) or (params['template_id'] is None): 3800 raise ValueError("Missing the required parameter `template_id` when calling `list_custom_fields`") 3801 3802 3803 collection_formats = {} 3804 3805 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json') 3806 path_params = {} 3807 if 'account_id' in params: 3808 path_params['accountId'] = params['account_id'] 3809 if 'template_id' in params: 3810 path_params['templateId'] = params['template_id'] 3811 3812 query_params = {} 3813 3814 header_params = {} 3815 3816 form_params = [] 3817 local_var_files = {} 3818 3819 body_params = None 3820 # HTTP header `Accept` 3821 header_params['Accept'] = self.api_client.\ 3822 select_header_accept(['application/json']) 3823 3824 # Authentication setting 3825 auth_settings = [] 3826 3827 return self.api_client.call_api(resource_path, 'GET', 3828 path_params, 3829 query_params, 3830 header_params, 3831 body=body_params, 3832 post_params=form_params, 3833 files=local_var_files, 3834 response_type='CustomFields', 3835 auth_settings=auth_settings, 3836 callback=params.get('callback'), 3837 _return_http_data_only=params.get('_return_http_data_only'), 3838 _preload_content=params.get('_preload_content', True), 3839 _request_timeout=params.get('_request_timeout'), 3840 collection_formats=collection_formats) 3841 3842 def list_document_fields(self, account_id, document_id, template_id, **kwargs): 3843 """ 3844 Gets the custom document fields for a an existing template document. 3845 Retrieves the custom document fields for an existing template document. 3846 This method makes a synchronous HTTP request by default. To make an 3847 asynchronous HTTP request, please define a `callback` function 3848 to be invoked when receiving the response. 3849 >>> def callback_function(response): 3850 >>> pprint(response) 3851 >>> 3852 >>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function) 3853 3854 :param callback function: The callback function 3855 for asynchronous request. (optional) 3856 :param str account_id: The external account number (int) or account ID Guid. (required) 3857 :param str document_id: The ID of the document being accessed. (required) 3858 :param str template_id: The ID of the template being accessed. (required) 3859 :return: DocumentFieldsInformation 3860 If the method is called asynchronously, 3861 returns the request thread. 3862 """ 3863 kwargs['_return_http_data_only'] = True 3864 if kwargs.get('callback'): 3865 return self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 3866 else: 3867 (data) = self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 3868 return data 3869 3870 def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs): 3871 """ 3872 Gets the custom document fields for a an existing template document. 3873 Retrieves the custom document fields for an existing template document. 3874 This method makes a synchronous HTTP request by default. To make an 3875 asynchronous HTTP request, please define a `callback` function 3876 to be invoked when receiving the response. 3877 >>> def callback_function(response): 3878 >>> pprint(response) 3879 >>> 3880 >>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function) 3881 3882 :param callback function: The callback function 3883 for asynchronous request. (optional) 3884 :param str account_id: The external account number (int) or account ID Guid. (required) 3885 :param str document_id: The ID of the document being accessed. (required) 3886 :param str template_id: The ID of the template being accessed. (required) 3887 :return: DocumentFieldsInformation 3888 If the method is called asynchronously, 3889 returns the request thread. 3890 """ 3891 3892 all_params = ['account_id', 'document_id', 'template_id'] 3893 all_params.append('callback') 3894 all_params.append('_return_http_data_only') 3895 all_params.append('_preload_content') 3896 all_params.append('_request_timeout') 3897 3898 params = locals() 3899 for key, val in iteritems(params['kwargs']): 3900 if key not in all_params: 3901 raise TypeError( 3902 "Got an unexpected keyword argument '%s'" 3903 " to method list_document_fields" % key 3904 ) 3905 params[key] = val 3906 del params['kwargs'] 3907 # verify the required parameter 'account_id' is set 3908 if ('account_id' not in params) or (params['account_id'] is None): 3909 raise ValueError("Missing the required parameter `account_id` when calling `list_document_fields`") 3910 # verify the required parameter 'document_id' is set 3911 if ('document_id' not in params) or (params['document_id'] is None): 3912 raise ValueError("Missing the required parameter `document_id` when calling `list_document_fields`") 3913 # verify the required parameter 'template_id' is set 3914 if ('template_id' not in params) or (params['template_id'] is None): 3915 raise ValueError("Missing the required parameter `template_id` when calling `list_document_fields`") 3916 3917 3918 collection_formats = {} 3919 3920 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json') 3921 path_params = {} 3922 if 'account_id' in params: 3923 path_params['accountId'] = params['account_id'] 3924 if 'document_id' in params: 3925 path_params['documentId'] = params['document_id'] 3926 if 'template_id' in params: 3927 path_params['templateId'] = params['template_id'] 3928 3929 query_params = {} 3930 3931 header_params = {} 3932 3933 form_params = [] 3934 local_var_files = {} 3935 3936 body_params = None 3937 # HTTP header `Accept` 3938 header_params['Accept'] = self.api_client.\ 3939 select_header_accept(['application/json']) 3940 3941 # Authentication setting 3942 auth_settings = [] 3943 3944 return self.api_client.call_api(resource_path, 'GET', 3945 path_params, 3946 query_params, 3947 header_params, 3948 body=body_params, 3949 post_params=form_params, 3950 files=local_var_files, 3951 response_type='DocumentFieldsInformation', 3952 auth_settings=auth_settings, 3953 callback=params.get('callback'), 3954 _return_http_data_only=params.get('_return_http_data_only'), 3955 _preload_content=params.get('_preload_content', True), 3956 _request_timeout=params.get('_request_timeout'), 3957 collection_formats=collection_formats) 3958 3959 def list_documents(self, account_id, template_id, **kwargs): 3960 """ 3961 Gets a list of documents associated with a template. 3962 Retrieves a list of documents associated with the specified template. 3963 This method makes a synchronous HTTP request by default. To make an 3964 asynchronous HTTP request, please define a `callback` function 3965 to be invoked when receiving the response. 3966 >>> def callback_function(response): 3967 >>> pprint(response) 3968 >>> 3969 >>> thread = api.list_documents(account_id, template_id, callback=callback_function) 3970 3971 :param callback function: The callback function 3972 for asynchronous request. (optional) 3973 :param str account_id: The external account number (int) or account ID Guid. (required) 3974 :param str template_id: The ID of the template being accessed. (required) 3975 :param str include_agreement_type: 3976 :param str include_tabs: 3977 :return: TemplateDocumentsResult 3978 If the method is called asynchronously, 3979 returns the request thread. 3980 """ 3981 kwargs['_return_http_data_only'] = True 3982 if kwargs.get('callback'): 3983 return self.list_documents_with_http_info(account_id, template_id, **kwargs) 3984 else: 3985 (data) = self.list_documents_with_http_info(account_id, template_id, **kwargs) 3986 return data 3987 3988 def list_documents_with_http_info(self, account_id, template_id, **kwargs): 3989 """ 3990 Gets a list of documents associated with a template. 3991 Retrieves a list of documents associated with the specified template. 3992 This method makes a synchronous HTTP request by default. To make an 3993 asynchronous HTTP request, please define a `callback` function 3994 to be invoked when receiving the response. 3995 >>> def callback_function(response): 3996 >>> pprint(response) 3997 >>> 3998 >>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function) 3999 4000 :param callback function: The callback function 4001 for asynchronous request. (optional) 4002 :param str account_id: The external account number (int) or account ID Guid. (required) 4003 :param str template_id: The ID of the template being accessed. (required) 4004 :param str include_agreement_type: 4005 :param str include_tabs: 4006 :return: TemplateDocumentsResult 4007 If the method is called asynchronously, 4008 returns the request thread. 4009 """ 4010 4011 all_params = ['account_id', 'template_id', 'include_agreement_type', 'include_tabs'] 4012 all_params.append('callback') 4013 all_params.append('_return_http_data_only') 4014 all_params.append('_preload_content') 4015 all_params.append('_request_timeout') 4016 4017 params = locals() 4018 for key, val in iteritems(params['kwargs']): 4019 if key not in all_params: 4020 raise TypeError( 4021 "Got an unexpected keyword argument '%s'" 4022 " to method list_documents" % key 4023 ) 4024 params[key] = val 4025 del params['kwargs'] 4026 # verify the required parameter 'account_id' is set 4027 if ('account_id' not in params) or (params['account_id'] is None): 4028 raise ValueError("Missing the required parameter `account_id` when calling `list_documents`") 4029 # verify the required parameter 'template_id' is set 4030 if ('template_id' not in params) or (params['template_id'] is None): 4031 raise ValueError("Missing the required parameter `template_id` when calling `list_documents`") 4032 4033 4034 collection_formats = {} 4035 4036 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json') 4037 path_params = {} 4038 if 'account_id' in params: 4039 path_params['accountId'] = params['account_id'] 4040 if 'template_id' in params: 4041 path_params['templateId'] = params['template_id'] 4042 4043 query_params = {} 4044 if 'include_agreement_type' in params: 4045 query_params['include_agreement_type'] = params['include_agreement_type'] 4046 if 'include_tabs' in params: 4047 query_params['include_tabs'] = params['include_tabs'] 4048 4049 header_params = {} 4050 4051 form_params = [] 4052 local_var_files = {} 4053 4054 body_params = None 4055 # HTTP header `Accept` 4056 header_params['Accept'] = self.api_client.\ 4057 select_header_accept(['application/json']) 4058 4059 # Authentication setting 4060 auth_settings = [] 4061 4062 return self.api_client.call_api(resource_path, 'GET', 4063 path_params, 4064 query_params, 4065 header_params, 4066 body=body_params, 4067 post_params=form_params, 4068 files=local_var_files, 4069 response_type='TemplateDocumentsResult', 4070 auth_settings=auth_settings, 4071 callback=params.get('callback'), 4072 _return_http_data_only=params.get('_return_http_data_only'), 4073 _preload_content=params.get('_preload_content', True), 4074 _request_timeout=params.get('_request_timeout'), 4075 collection_formats=collection_formats) 4076 4077 def list_recipients(self, account_id, template_id, **kwargs): 4078 """ 4079 Gets recipient information from a template. 4080 Retrieves the information for all recipients in the specified template. 4081 This method makes a synchronous HTTP request by default. To make an 4082 asynchronous HTTP request, please define a `callback` function 4083 to be invoked when receiving the response. 4084 >>> def callback_function(response): 4085 >>> pprint(response) 4086 >>> 4087 >>> thread = api.list_recipients(account_id, template_id, callback=callback_function) 4088 4089 :param callback function: The callback function 4090 for asynchronous request. (optional) 4091 :param str account_id: The external account number (int) or account ID Guid. (required) 4092 :param str template_id: The ID of the template being accessed. (required) 4093 :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. 4094 :param str include_extended: When set to **true**, the extended properties are included in the response. 4095 :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response. 4096 :return: Recipients 4097 If the method is called asynchronously, 4098 returns the request thread. 4099 """ 4100 kwargs['_return_http_data_only'] = True 4101 if kwargs.get('callback'): 4102 return self.list_recipients_with_http_info(account_id, template_id, **kwargs) 4103 else: 4104 (data) = self.list_recipients_with_http_info(account_id, template_id, **kwargs) 4105 return data 4106 4107 def list_recipients_with_http_info(self, account_id, template_id, **kwargs): 4108 """ 4109 Gets recipient information from a template. 4110 Retrieves the information for all recipients in the specified template. 4111 This method makes a synchronous HTTP request by default. To make an 4112 asynchronous HTTP request, please define a `callback` function 4113 to be invoked when receiving the response. 4114 >>> def callback_function(response): 4115 >>> pprint(response) 4116 >>> 4117 >>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function) 4118 4119 :param callback function: The callback function 4120 for asynchronous request. (optional) 4121 :param str account_id: The external account number (int) or account ID Guid. (required) 4122 :param str template_id: The ID of the template being accessed. (required) 4123 :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. 4124 :param str include_extended: When set to **true**, the extended properties are included in the response. 4125 :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response. 4126 :return: Recipients 4127 If the method is called asynchronously, 4128 returns the request thread. 4129 """ 4130 4131 all_params = ['account_id', 'template_id', 'include_anchor_tab_locations', 'include_extended', 'include_tabs'] 4132 all_params.append('callback') 4133 all_params.append('_return_http_data_only') 4134 all_params.append('_preload_content') 4135 all_params.append('_request_timeout') 4136 4137 params = locals() 4138 for key, val in iteritems(params['kwargs']): 4139 if key not in all_params: 4140 raise TypeError( 4141 "Got an unexpected keyword argument '%s'" 4142 " to method list_recipients" % key 4143 ) 4144 params[key] = val 4145 del params['kwargs'] 4146 # verify the required parameter 'account_id' is set 4147 if ('account_id' not in params) or (params['account_id'] is None): 4148 raise ValueError("Missing the required parameter `account_id` when calling `list_recipients`") 4149 # verify the required parameter 'template_id' is set 4150 if ('template_id' not in params) or (params['template_id'] is None): 4151 raise ValueError("Missing the required parameter `template_id` when calling `list_recipients`") 4152 4153 4154 collection_formats = {} 4155 4156 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json') 4157 path_params = {} 4158 if 'account_id' in params: 4159 path_params['accountId'] = params['account_id'] 4160 if 'template_id' in params: 4161 path_params['templateId'] = params['template_id'] 4162 4163 query_params = {} 4164 if 'include_anchor_tab_locations' in params: 4165 query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations'] 4166 if 'include_extended' in params: 4167 query_params['include_extended'] = params['include_extended'] 4168 if 'include_tabs' in params: 4169 query_params['include_tabs'] = params['include_tabs'] 4170 4171 header_params = {} 4172 4173 form_params = [] 4174 local_var_files = {} 4175 4176 body_params = None 4177 # HTTP header `Accept` 4178 header_params['Accept'] = self.api_client.\ 4179 select_header_accept(['application/json']) 4180 4181 # Authentication setting 4182 auth_settings = [] 4183 4184 return self.api_client.call_api(resource_path, 'GET', 4185 path_params, 4186 query_params, 4187 header_params, 4188 body=body_params, 4189 post_params=form_params, 4190 files=local_var_files, 4191 response_type='Recipients', 4192 auth_settings=auth_settings, 4193 callback=params.get('callback'), 4194 _return_http_data_only=params.get('_return_http_data_only'), 4195 _preload_content=params.get('_preload_content', True), 4196 _request_timeout=params.get('_request_timeout'), 4197 collection_formats=collection_formats) 4198 4199 def list_tabs(self, account_id, recipient_id, template_id, **kwargs): 4200 """ 4201 Gets the tabs information for a signer or sign-in-person recipient in a template. 4202 Gets the tabs information for a signer or sign-in-person recipient in a template. 4203 This method makes a synchronous HTTP request by default. To make an 4204 asynchronous HTTP request, please define a `callback` function 4205 to be invoked when receiving the response. 4206 >>> def callback_function(response): 4207 >>> pprint(response) 4208 >>> 4209 >>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function) 4210 4211 :param callback function: The callback function 4212 for asynchronous request. (optional) 4213 :param str account_id: The external account number (int) or account ID Guid. (required) 4214 :param str recipient_id: The ID of the recipient being accessed. (required) 4215 :param str template_id: The ID of the template being accessed. (required) 4216 :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 4217 :param str include_metadata: 4218 :return: Tabs 4219 If the method is called asynchronously, 4220 returns the request thread. 4221 """ 4222 kwargs['_return_http_data_only'] = True 4223 if kwargs.get('callback'): 4224 return self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 4225 else: 4226 (data) = self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 4227 return data 4228 4229 def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs): 4230 """ 4231 Gets the tabs information for a signer or sign-in-person recipient in a template. 4232 Gets the tabs information for a signer or sign-in-person recipient in a template. 4233 This method makes a synchronous HTTP request by default. To make an 4234 asynchronous HTTP request, please define a `callback` function 4235 to be invoked when receiving the response. 4236 >>> def callback_function(response): 4237 >>> pprint(response) 4238 >>> 4239 >>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function) 4240 4241 :param callback function: The callback function 4242 for asynchronous request. (optional) 4243 :param str account_id: The external account number (int) or account ID Guid. (required) 4244 :param str recipient_id: The ID of the recipient being accessed. (required) 4245 :param str template_id: The ID of the template being accessed. (required) 4246 :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 4247 :param str include_metadata: 4248 :return: Tabs 4249 If the method is called asynchronously, 4250 returns the request thread. 4251 """ 4252 4253 all_params = ['account_id', 'recipient_id', 'template_id', 'include_anchor_tab_locations', 'include_metadata'] 4254 all_params.append('callback') 4255 all_params.append('_return_http_data_only') 4256 all_params.append('_preload_content') 4257 all_params.append('_request_timeout') 4258 4259 params = locals() 4260 for key, val in iteritems(params['kwargs']): 4261 if key not in all_params: 4262 raise TypeError( 4263 "Got an unexpected keyword argument '%s'" 4264 " to method list_tabs" % key 4265 ) 4266 params[key] = val 4267 del params['kwargs'] 4268 # verify the required parameter 'account_id' is set 4269 if ('account_id' not in params) or (params['account_id'] is None): 4270 raise ValueError("Missing the required parameter `account_id` when calling `list_tabs`") 4271 # verify the required parameter 'recipient_id' is set 4272 if ('recipient_id' not in params) or (params['recipient_id'] is None): 4273 raise ValueError("Missing the required parameter `recipient_id` when calling `list_tabs`") 4274 # verify the required parameter 'template_id' is set 4275 if ('template_id' not in params) or (params['template_id'] is None): 4276 raise ValueError("Missing the required parameter `template_id` when calling `list_tabs`") 4277 4278 4279 collection_formats = {} 4280 4281 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json') 4282 path_params = {} 4283 if 'account_id' in params: 4284 path_params['accountId'] = params['account_id'] 4285 if 'recipient_id' in params: 4286 path_params['recipientId'] = params['recipient_id'] 4287 if 'template_id' in params: 4288 path_params['templateId'] = params['template_id'] 4289 4290 query_params = {} 4291 if 'include_anchor_tab_locations' in params: 4292 query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations'] 4293 if 'include_metadata' in params: 4294 query_params['include_metadata'] = params['include_metadata'] 4295 4296 header_params = {} 4297 4298 form_params = [] 4299 local_var_files = {} 4300 4301 body_params = None 4302 # HTTP header `Accept` 4303 header_params['Accept'] = self.api_client.\ 4304 select_header_accept(['application/json']) 4305 4306 # Authentication setting 4307 auth_settings = [] 4308 4309 return self.api_client.call_api(resource_path, 'GET', 4310 path_params, 4311 query_params, 4312 header_params, 4313 body=body_params, 4314 post_params=form_params, 4315 files=local_var_files, 4316 response_type='Tabs', 4317 auth_settings=auth_settings, 4318 callback=params.get('callback'), 4319 _return_http_data_only=params.get('_return_http_data_only'), 4320 _preload_content=params.get('_preload_content', True), 4321 _request_timeout=params.get('_request_timeout'), 4322 collection_formats=collection_formats) 4323 4324 def list_templates(self, account_id, **kwargs): 4325 """ 4326 Gets the definition of a template. 4327 Retrieves the list of templates for the specified account. The request can be limited to a specific folder. 4328 This method makes a synchronous HTTP request by default. To make an 4329 asynchronous HTTP request, please define a `callback` function 4330 to be invoked when receiving the response. 4331 >>> def callback_function(response): 4332 >>> pprint(response) 4333 >>> 4334 >>> thread = api.list_templates(account_id, callback=callback_function) 4335 4336 :param callback function: The callback function 4337 for asynchronous request. (optional) 4338 :param str account_id: The external account number (int) or account ID Guid. (required) 4339 :param str count: Number of records to return in the cache. 4340 :param str created_from_date: 4341 :param str created_to_date: 4342 :param str folder_ids: A comma separated list of folder ID GUIDs. 4343 :param str folder_types: 4344 :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. 4345 :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. 4346 :param str is_deleted_template_only: 4347 :param str is_download: 4348 :param str modified_from_date: 4349 :param str modified_to_date: 4350 :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) 4351 :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. 4352 :param str search_fields: 4353 :param str search_text: The search text used to search the names of templates. 4354 :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. 4355 :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). 4356 :param str template_ids: 4357 :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. 4358 :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. 4359 :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. 4360 :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. 4361 :param str user_id: 4362 :return: EnvelopeTemplateResults 4363 If the method is called asynchronously, 4364 returns the request thread. 4365 """ 4366 kwargs['_return_http_data_only'] = True 4367 if kwargs.get('callback'): 4368 return self.list_templates_with_http_info(account_id, **kwargs) 4369 else: 4370 (data) = self.list_templates_with_http_info(account_id, **kwargs) 4371 return data 4372 4373 def list_templates_with_http_info(self, account_id, **kwargs): 4374 """ 4375 Gets the definition of a template. 4376 Retrieves the list of templates for the specified account. The request can be limited to a specific folder. 4377 This method makes a synchronous HTTP request by default. To make an 4378 asynchronous HTTP request, please define a `callback` function 4379 to be invoked when receiving the response. 4380 >>> def callback_function(response): 4381 >>> pprint(response) 4382 >>> 4383 >>> thread = api.list_templates_with_http_info(account_id, callback=callback_function) 4384 4385 :param callback function: The callback function 4386 for asynchronous request. (optional) 4387 :param str account_id: The external account number (int) or account ID Guid. (required) 4388 :param str count: Number of records to return in the cache. 4389 :param str created_from_date: 4390 :param str created_to_date: 4391 :param str folder_ids: A comma separated list of folder ID GUIDs. 4392 :param str folder_types: 4393 :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. 4394 :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. 4395 :param str is_deleted_template_only: 4396 :param str is_download: 4397 :param str modified_from_date: 4398 :param str modified_to_date: 4399 :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) 4400 :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. 4401 :param str search_fields: 4402 :param str search_text: The search text used to search the names of templates. 4403 :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. 4404 :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). 4405 :param str template_ids: 4406 :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. 4407 :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. 4408 :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. 4409 :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. 4410 :param str user_id: 4411 :return: EnvelopeTemplateResults 4412 If the method is called asynchronously, 4413 returns the request thread. 4414 """ 4415 4416 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'] 4417 all_params.append('callback') 4418 all_params.append('_return_http_data_only') 4419 all_params.append('_preload_content') 4420 all_params.append('_request_timeout') 4421 4422 params = locals() 4423 for key, val in iteritems(params['kwargs']): 4424 if key not in all_params: 4425 raise TypeError( 4426 "Got an unexpected keyword argument '%s'" 4427 " to method list_templates" % key 4428 ) 4429 params[key] = val 4430 del params['kwargs'] 4431 # verify the required parameter 'account_id' is set 4432 if ('account_id' not in params) or (params['account_id'] is None): 4433 raise ValueError("Missing the required parameter `account_id` when calling `list_templates`") 4434 4435 4436 collection_formats = {} 4437 4438 resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json') 4439 path_params = {} 4440 if 'account_id' in params: 4441 path_params['accountId'] = params['account_id'] 4442 4443 query_params = {} 4444 if 'count' in params: 4445 query_params['count'] = params['count'] 4446 if 'created_from_date' in params: 4447 query_params['created_from_date'] = params['created_from_date'] 4448 if 'created_to_date' in params: 4449 query_params['created_to_date'] = params['created_to_date'] 4450 if 'folder_ids' in params: 4451 query_params['folder_ids'] = params['folder_ids'] 4452 if 'folder_types' in params: 4453 query_params['folder_types'] = params['folder_types'] 4454 if 'from_date' in params: 4455 query_params['from_date'] = params['from_date'] 4456 if 'include' in params: 4457 query_params['include'] = params['include'] 4458 if 'is_deleted_template_only' in params: 4459 query_params['is_deleted_template_only'] = params['is_deleted_template_only'] 4460 if 'is_download' in params: 4461 query_params['is_download'] = params['is_download'] 4462 if 'modified_from_date' in params: 4463 query_params['modified_from_date'] = params['modified_from_date'] 4464 if 'modified_to_date' in params: 4465 query_params['modified_to_date'] = params['modified_to_date'] 4466 if 'order' in params: 4467 query_params['order'] = params['order'] 4468 if 'order_by' in params: 4469 query_params['order_by'] = params['order_by'] 4470 if 'search_fields' in params: 4471 query_params['search_fields'] = params['search_fields'] 4472 if 'search_text' in params: 4473 query_params['search_text'] = params['search_text'] 4474 if 'shared_by_me' in params: 4475 query_params['shared_by_me'] = params['shared_by_me'] 4476 if 'start_position' in params: 4477 query_params['start_position'] = params['start_position'] 4478 if 'template_ids' in params: 4479 query_params['template_ids'] = params['template_ids'] 4480 if 'to_date' in params: 4481 query_params['to_date'] = params['to_date'] 4482 if 'used_from_date' in params: 4483 query_params['used_from_date'] = params['used_from_date'] 4484 if 'used_to_date' in params: 4485 query_params['used_to_date'] = params['used_to_date'] 4486 if 'user_filter' in params: 4487 query_params['user_filter'] = params['user_filter'] 4488 if 'user_id' in params: 4489 query_params['user_id'] = params['user_id'] 4490 4491 header_params = {} 4492 4493 form_params = [] 4494 local_var_files = {} 4495 4496 body_params = None 4497 # HTTP header `Accept` 4498 header_params['Accept'] = self.api_client.\ 4499 select_header_accept(['application/json']) 4500 4501 # Authentication setting 4502 auth_settings = [] 4503 4504 return self.api_client.call_api(resource_path, 'GET', 4505 path_params, 4506 query_params, 4507 header_params, 4508 body=body_params, 4509 post_params=form_params, 4510 files=local_var_files, 4511 response_type='EnvelopeTemplateResults', 4512 auth_settings=auth_settings, 4513 callback=params.get('callback'), 4514 _return_http_data_only=params.get('_return_http_data_only'), 4515 _preload_content=params.get('_preload_content', True), 4516 _request_timeout=params.get('_request_timeout'), 4517 collection_formats=collection_formats) 4518 4519 def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs): 4520 """ 4521 Rotates page image from a template for display. 4522 Rotates page image from a template for display. The page image can be rotated to the left or right. 4523 This method makes a synchronous HTTP request by default. To make an 4524 asynchronous HTTP request, please define a `callback` function 4525 to be invoked when receiving the response. 4526 >>> def callback_function(response): 4527 >>> pprint(response) 4528 >>> 4529 >>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function) 4530 4531 :param callback function: The callback function 4532 for asynchronous request. (optional) 4533 :param str account_id: The external account number (int) or account ID Guid. (required) 4534 :param str document_id: The ID of the document being accessed. (required) 4535 :param str page_number: The page number being accessed. (required) 4536 :param str template_id: The ID of the template being accessed. (required) 4537 :param PageRequest page_request: 4538 :return: None 4539 If the method is called asynchronously, 4540 returns the request thread. 4541 """ 4542 kwargs['_return_http_data_only'] = True 4543 if kwargs.get('callback'): 4544 return self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 4545 else: 4546 (data) = self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 4547 return data 4548 4549 def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs): 4550 """ 4551 Rotates page image from a template for display. 4552 Rotates page image from a template for display. The page image can be rotated to the left or right. 4553 This method makes a synchronous HTTP request by default. To make an 4554 asynchronous HTTP request, please define a `callback` function 4555 to be invoked when receiving the response. 4556 >>> def callback_function(response): 4557 >>> pprint(response) 4558 >>> 4559 >>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function) 4560 4561 :param callback function: The callback function 4562 for asynchronous request. (optional) 4563 :param str account_id: The external account number (int) or account ID Guid. (required) 4564 :param str document_id: The ID of the document being accessed. (required) 4565 :param str page_number: The page number being accessed. (required) 4566 :param str template_id: The ID of the template being accessed. (required) 4567 :param PageRequest page_request: 4568 :return: None 4569 If the method is called asynchronously, 4570 returns the request thread. 4571 """ 4572 4573 all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request'] 4574 all_params.append('callback') 4575 all_params.append('_return_http_data_only') 4576 all_params.append('_preload_content') 4577 all_params.append('_request_timeout') 4578 4579 params = locals() 4580 for key, val in iteritems(params['kwargs']): 4581 if key not in all_params: 4582 raise TypeError( 4583 "Got an unexpected keyword argument '%s'" 4584 " to method rotate_document_page" % key 4585 ) 4586 params[key] = val 4587 del params['kwargs'] 4588 # verify the required parameter 'account_id' is set 4589 if ('account_id' not in params) or (params['account_id'] is None): 4590 raise ValueError("Missing the required parameter `account_id` when calling `rotate_document_page`") 4591 # verify the required parameter 'document_id' is set 4592 if ('document_id' not in params) or (params['document_id'] is None): 4593 raise ValueError("Missing the required parameter `document_id` when calling `rotate_document_page`") 4594 # verify the required parameter 'page_number' is set 4595 if ('page_number' not in params) or (params['page_number'] is None): 4596 raise ValueError("Missing the required parameter `page_number` when calling `rotate_document_page`") 4597 # verify the required parameter 'template_id' is set 4598 if ('template_id' not in params) or (params['template_id'] is None): 4599 raise ValueError("Missing the required parameter `template_id` when calling `rotate_document_page`") 4600 4601 4602 collection_formats = {} 4603 4604 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json') 4605 path_params = {} 4606 if 'account_id' in params: 4607 path_params['accountId'] = params['account_id'] 4608 if 'document_id' in params: 4609 path_params['documentId'] = params['document_id'] 4610 if 'page_number' in params: 4611 path_params['pageNumber'] = params['page_number'] 4612 if 'template_id' in params: 4613 path_params['templateId'] = params['template_id'] 4614 4615 query_params = {} 4616 4617 header_params = {} 4618 4619 form_params = [] 4620 local_var_files = {} 4621 4622 body_params = None 4623 if 'page_request' in params: 4624 body_params = params['page_request'] 4625 # HTTP header `Accept` 4626 header_params['Accept'] = self.api_client.\ 4627 select_header_accept(['application/json']) 4628 4629 # Authentication setting 4630 auth_settings = [] 4631 4632 return self.api_client.call_api(resource_path, 'PUT', 4633 path_params, 4634 query_params, 4635 header_params, 4636 body=body_params, 4637 post_params=form_params, 4638 files=local_var_files, 4639 response_type=None, 4640 auth_settings=auth_settings, 4641 callback=params.get('callback'), 4642 _return_http_data_only=params.get('_return_http_data_only'), 4643 _preload_content=params.get('_preload_content', True), 4644 _request_timeout=params.get('_request_timeout'), 4645 collection_formats=collection_formats) 4646 4647 def update(self, account_id, template_id, **kwargs): 4648 """ 4649 Updates an existing template. 4650 Updates an existing template. 4651 This method makes a synchronous HTTP request by default. To make an 4652 asynchronous HTTP request, please define a `callback` function 4653 to be invoked when receiving the response. 4654 >>> def callback_function(response): 4655 >>> pprint(response) 4656 >>> 4657 >>> thread = api.update(account_id, template_id, callback=callback_function) 4658 4659 :param callback function: The callback function 4660 for asynchronous request. (optional) 4661 :param str account_id: The external account number (int) or account ID Guid. (required) 4662 :param str template_id: The ID of the template being accessed. (required) 4663 :param EnvelopeTemplate envelope_template: 4664 :return: TemplateUpdateSummary 4665 If the method is called asynchronously, 4666 returns the request thread. 4667 """ 4668 kwargs['_return_http_data_only'] = True 4669 if kwargs.get('callback'): 4670 return self.update_with_http_info(account_id, template_id, **kwargs) 4671 else: 4672 (data) = self.update_with_http_info(account_id, template_id, **kwargs) 4673 return data 4674 4675 def update_with_http_info(self, account_id, template_id, **kwargs): 4676 """ 4677 Updates an existing template. 4678 Updates an existing template. 4679 This method makes a synchronous HTTP request by default. To make an 4680 asynchronous HTTP request, please define a `callback` function 4681 to be invoked when receiving the response. 4682 >>> def callback_function(response): 4683 >>> pprint(response) 4684 >>> 4685 >>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function) 4686 4687 :param callback function: The callback function 4688 for asynchronous request. (optional) 4689 :param str account_id: The external account number (int) or account ID Guid. (required) 4690 :param str template_id: The ID of the template being accessed. (required) 4691 :param EnvelopeTemplate envelope_template: 4692 :return: TemplateUpdateSummary 4693 If the method is called asynchronously, 4694 returns the request thread. 4695 """ 4696 4697 all_params = ['account_id', 'template_id', 'envelope_template'] 4698 all_params.append('callback') 4699 all_params.append('_return_http_data_only') 4700 all_params.append('_preload_content') 4701 all_params.append('_request_timeout') 4702 4703 params = locals() 4704 for key, val in iteritems(params['kwargs']): 4705 if key not in all_params: 4706 raise TypeError( 4707 "Got an unexpected keyword argument '%s'" 4708 " to method update" % key 4709 ) 4710 params[key] = val 4711 del params['kwargs'] 4712 # verify the required parameter 'account_id' is set 4713 if ('account_id' not in params) or (params['account_id'] is None): 4714 raise ValueError("Missing the required parameter `account_id` when calling `update`") 4715 # verify the required parameter 'template_id' is set 4716 if ('template_id' not in params) or (params['template_id'] is None): 4717 raise ValueError("Missing the required parameter `template_id` when calling `update`") 4718 4719 4720 collection_formats = {} 4721 4722 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json') 4723 path_params = {} 4724 if 'account_id' in params: 4725 path_params['accountId'] = params['account_id'] 4726 if 'template_id' in params: 4727 path_params['templateId'] = params['template_id'] 4728 4729 query_params = {} 4730 4731 header_params = {} 4732 4733 form_params = [] 4734 local_var_files = {} 4735 4736 body_params = None 4737 if 'envelope_template' in params: 4738 body_params = params['envelope_template'] 4739 # HTTP header `Accept` 4740 header_params['Accept'] = self.api_client.\ 4741 select_header_accept(['application/json']) 4742 4743 # Authentication setting 4744 auth_settings = [] 4745 4746 return self.api_client.call_api(resource_path, 'PUT', 4747 path_params, 4748 query_params, 4749 header_params, 4750 body=body_params, 4751 post_params=form_params, 4752 files=local_var_files, 4753 response_type='TemplateUpdateSummary', 4754 auth_settings=auth_settings, 4755 callback=params.get('callback'), 4756 _return_http_data_only=params.get('_return_http_data_only'), 4757 _preload_content=params.get('_preload_content', True), 4758 _request_timeout=params.get('_request_timeout'), 4759 collection_formats=collection_formats) 4760 4761 def update_custom_fields(self, account_id, template_id, **kwargs): 4762 """ 4763 Updates envelope custom fields in a template. 4764 Updates the custom fields in a template. Each custom field used in a template must have a unique name. 4765 This method makes a synchronous HTTP request by default. To make an 4766 asynchronous HTTP request, please define a `callback` function 4767 to be invoked when receiving the response. 4768 >>> def callback_function(response): 4769 >>> pprint(response) 4770 >>> 4771 >>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function) 4772 4773 :param callback function: The callback function 4774 for asynchronous request. (optional) 4775 :param str account_id: The external account number (int) or account ID Guid. (required) 4776 :param str template_id: The ID of the template being accessed. (required) 4777 :param TemplateCustomFields template_custom_fields: 4778 :return: CustomFields 4779 If the method is called asynchronously, 4780 returns the request thread. 4781 """ 4782 kwargs['_return_http_data_only'] = True 4783 if kwargs.get('callback'): 4784 return self.update_custom_fields_with_http_info(account_id, template_id, **kwargs) 4785 else: 4786 (data) = self.update_custom_fields_with_http_info(account_id, template_id, **kwargs) 4787 return data 4788 4789 def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs): 4790 """ 4791 Updates envelope custom fields in a template. 4792 Updates the custom fields in a template. Each custom field used in a template must have a unique name. 4793 This method makes a synchronous HTTP request by default. To make an 4794 asynchronous HTTP request, please define a `callback` function 4795 to be invoked when receiving the response. 4796 >>> def callback_function(response): 4797 >>> pprint(response) 4798 >>> 4799 >>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function) 4800 4801 :param callback function: The callback function 4802 for asynchronous request. (optional) 4803 :param str account_id: The external account number (int) or account ID Guid. (required) 4804 :param str template_id: The ID of the template being accessed. (required) 4805 :param TemplateCustomFields template_custom_fields: 4806 :return: CustomFields 4807 If the method is called asynchronously, 4808 returns the request thread. 4809 """ 4810 4811 all_params = ['account_id', 'template_id', 'template_custom_fields'] 4812 all_params.append('callback') 4813 all_params.append('_return_http_data_only') 4814 all_params.append('_preload_content') 4815 all_params.append('_request_timeout') 4816 4817 params = locals() 4818 for key, val in iteritems(params['kwargs']): 4819 if key not in all_params: 4820 raise TypeError( 4821 "Got an unexpected keyword argument '%s'" 4822 " to method update_custom_fields" % key 4823 ) 4824 params[key] = val 4825 del params['kwargs'] 4826 # verify the required parameter 'account_id' is set 4827 if ('account_id' not in params) or (params['account_id'] is None): 4828 raise ValueError("Missing the required parameter `account_id` when calling `update_custom_fields`") 4829 # verify the required parameter 'template_id' is set 4830 if ('template_id' not in params) or (params['template_id'] is None): 4831 raise ValueError("Missing the required parameter `template_id` when calling `update_custom_fields`") 4832 4833 4834 collection_formats = {} 4835 4836 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json') 4837 path_params = {} 4838 if 'account_id' in params: 4839 path_params['accountId'] = params['account_id'] 4840 if 'template_id' in params: 4841 path_params['templateId'] = params['template_id'] 4842 4843 query_params = {} 4844 4845 header_params = {} 4846 4847 form_params = [] 4848 local_var_files = {} 4849 4850 body_params = None 4851 if 'template_custom_fields' in params: 4852 body_params = params['template_custom_fields'] 4853 # HTTP header `Accept` 4854 header_params['Accept'] = self.api_client.\ 4855 select_header_accept(['application/json']) 4856 4857 # Authentication setting 4858 auth_settings = [] 4859 4860 return self.api_client.call_api(resource_path, 'PUT', 4861 path_params, 4862 query_params, 4863 header_params, 4864 body=body_params, 4865 post_params=form_params, 4866 files=local_var_files, 4867 response_type='CustomFields', 4868 auth_settings=auth_settings, 4869 callback=params.get('callback'), 4870 _return_http_data_only=params.get('_return_http_data_only'), 4871 _preload_content=params.get('_preload_content', True), 4872 _request_timeout=params.get('_request_timeout'), 4873 collection_formats=collection_formats) 4874 4875 def update_document(self, account_id, document_id, template_id, **kwargs): 4876 """ 4877 Adds a document to a template document. 4878 Adds the specified document to an existing template document. 4879 This method makes a synchronous HTTP request by default. To make an 4880 asynchronous HTTP request, please define a `callback` function 4881 to be invoked when receiving the response. 4882 >>> def callback_function(response): 4883 >>> pprint(response) 4884 >>> 4885 >>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function) 4886 4887 :param callback function: The callback function 4888 for asynchronous request. (optional) 4889 :param str account_id: The external account number (int) or account ID Guid. (required) 4890 :param str document_id: The ID of the document being accessed. (required) 4891 :param str template_id: The ID of the template being accessed. (required) 4892 :param str is_envelope_definition: 4893 :param EnvelopeDefinition envelope_definition: 4894 :return: EnvelopeDocument 4895 If the method is called asynchronously, 4896 returns the request thread. 4897 """ 4898 kwargs['_return_http_data_only'] = True 4899 if kwargs.get('callback'): 4900 return self.update_document_with_http_info(account_id, document_id, template_id, **kwargs) 4901 else: 4902 (data) = self.update_document_with_http_info(account_id, document_id, template_id, **kwargs) 4903 return data 4904 4905 def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs): 4906 """ 4907 Adds a document to a template document. 4908 Adds the specified document to an existing template document. 4909 This method makes a synchronous HTTP request by default. To make an 4910 asynchronous HTTP request, please define a `callback` function 4911 to be invoked when receiving the response. 4912 >>> def callback_function(response): 4913 >>> pprint(response) 4914 >>> 4915 >>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function) 4916 4917 :param callback function: The callback function 4918 for asynchronous request. (optional) 4919 :param str account_id: The external account number (int) or account ID Guid. (required) 4920 :param str document_id: The ID of the document being accessed. (required) 4921 :param str template_id: The ID of the template being accessed. (required) 4922 :param str is_envelope_definition: 4923 :param EnvelopeDefinition envelope_definition: 4924 :return: EnvelopeDocument 4925 If the method is called asynchronously, 4926 returns the request thread. 4927 """ 4928 4929 all_params = ['account_id', 'document_id', 'template_id', 'is_envelope_definition', 'envelope_definition'] 4930 all_params.append('callback') 4931 all_params.append('_return_http_data_only') 4932 all_params.append('_preload_content') 4933 all_params.append('_request_timeout') 4934 4935 params = locals() 4936 for key, val in iteritems(params['kwargs']): 4937 if key not in all_params: 4938 raise TypeError( 4939 "Got an unexpected keyword argument '%s'" 4940 " to method update_document" % key 4941 ) 4942 params[key] = val 4943 del params['kwargs'] 4944 # verify the required parameter 'account_id' is set 4945 if ('account_id' not in params) or (params['account_id'] is None): 4946 raise ValueError("Missing the required parameter `account_id` when calling `update_document`") 4947 # verify the required parameter 'document_id' is set 4948 if ('document_id' not in params) or (params['document_id'] is None): 4949 raise ValueError("Missing the required parameter `document_id` when calling `update_document`") 4950 # verify the required parameter 'template_id' is set 4951 if ('template_id' not in params) or (params['template_id'] is None): 4952 raise ValueError("Missing the required parameter `template_id` when calling `update_document`") 4953 4954 4955 collection_formats = {} 4956 4957 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json') 4958 path_params = {} 4959 if 'account_id' in params: 4960 path_params['accountId'] = params['account_id'] 4961 if 'document_id' in params: 4962 path_params['documentId'] = params['document_id'] 4963 if 'template_id' in params: 4964 path_params['templateId'] = params['template_id'] 4965 4966 query_params = {} 4967 if 'is_envelope_definition' in params: 4968 query_params['is_envelope_definition'] = params['is_envelope_definition'] 4969 4970 header_params = {} 4971 4972 form_params = [] 4973 local_var_files = {} 4974 4975 body_params = None 4976 if 'envelope_definition' in params: 4977 body_params = params['envelope_definition'] 4978 # HTTP header `Accept` 4979 header_params['Accept'] = self.api_client.\ 4980 select_header_accept(['application/json']) 4981 4982 # Authentication setting 4983 auth_settings = [] 4984 4985 return self.api_client.call_api(resource_path, 'PUT', 4986 path_params, 4987 query_params, 4988 header_params, 4989 body=body_params, 4990 post_params=form_params, 4991 files=local_var_files, 4992 response_type='EnvelopeDocument', 4993 auth_settings=auth_settings, 4994 callback=params.get('callback'), 4995 _return_http_data_only=params.get('_return_http_data_only'), 4996 _preload_content=params.get('_preload_content', True), 4997 _request_timeout=params.get('_request_timeout'), 4998 collection_formats=collection_formats) 4999 5000 def update_document_fields(self, account_id, document_id, template_id, **kwargs): 5001 """ 5002 Updates existing custom document fields in an existing template document. 5003 Updates existing custom document fields in an existing template document. 5004 This method makes a synchronous HTTP request by default. To make an 5005 asynchronous HTTP request, please define a `callback` function 5006 to be invoked when receiving the response. 5007 >>> def callback_function(response): 5008 >>> pprint(response) 5009 >>> 5010 >>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function) 5011 5012 :param callback function: The callback function 5013 for asynchronous request. (optional) 5014 :param str account_id: The external account number (int) or account ID Guid. (required) 5015 :param str document_id: The ID of the document being accessed. (required) 5016 :param str template_id: The ID of the template being accessed. (required) 5017 :param DocumentFieldsInformation document_fields_information: 5018 :return: DocumentFieldsInformation 5019 If the method is called asynchronously, 5020 returns the request thread. 5021 """ 5022 kwargs['_return_http_data_only'] = True 5023 if kwargs.get('callback'): 5024 return self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 5025 else: 5026 (data) = self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 5027 return data 5028 5029 def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs): 5030 """ 5031 Updates existing custom document fields in an existing template document. 5032 Updates existing custom document fields in an existing template document. 5033 This method makes a synchronous HTTP request by default. To make an 5034 asynchronous HTTP request, please define a `callback` function 5035 to be invoked when receiving the response. 5036 >>> def callback_function(response): 5037 >>> pprint(response) 5038 >>> 5039 >>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function) 5040 5041 :param callback function: The callback function 5042 for asynchronous request. (optional) 5043 :param str account_id: The external account number (int) or account ID Guid. (required) 5044 :param str document_id: The ID of the document being accessed. (required) 5045 :param str template_id: The ID of the template being accessed. (required) 5046 :param DocumentFieldsInformation document_fields_information: 5047 :return: DocumentFieldsInformation 5048 If the method is called asynchronously, 5049 returns the request thread. 5050 """ 5051 5052 all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information'] 5053 all_params.append('callback') 5054 all_params.append('_return_http_data_only') 5055 all_params.append('_preload_content') 5056 all_params.append('_request_timeout') 5057 5058 params = locals() 5059 for key, val in iteritems(params['kwargs']): 5060 if key not in all_params: 5061 raise TypeError( 5062 "Got an unexpected keyword argument '%s'" 5063 " to method update_document_fields" % key 5064 ) 5065 params[key] = val 5066 del params['kwargs'] 5067 # verify the required parameter 'account_id' is set 5068 if ('account_id' not in params) or (params['account_id'] is None): 5069 raise ValueError("Missing the required parameter `account_id` when calling `update_document_fields`") 5070 # verify the required parameter 'document_id' is set 5071 if ('document_id' not in params) or (params['document_id'] is None): 5072 raise ValueError("Missing the required parameter `document_id` when calling `update_document_fields`") 5073 # verify the required parameter 'template_id' is set 5074 if ('template_id' not in params) or (params['template_id'] is None): 5075 raise ValueError("Missing the required parameter `template_id` when calling `update_document_fields`") 5076 5077 5078 collection_formats = {} 5079 5080 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json') 5081 path_params = {} 5082 if 'account_id' in params: 5083 path_params['accountId'] = params['account_id'] 5084 if 'document_id' in params: 5085 path_params['documentId'] = params['document_id'] 5086 if 'template_id' in params: 5087 path_params['templateId'] = params['template_id'] 5088 5089 query_params = {} 5090 5091 header_params = {} 5092 5093 form_params = [] 5094 local_var_files = {} 5095 5096 body_params = None 5097 if 'document_fields_information' in params: 5098 body_params = params['document_fields_information'] 5099 # HTTP header `Accept` 5100 header_params['Accept'] = self.api_client.\ 5101 select_header_accept(['application/json']) 5102 5103 # Authentication setting 5104 auth_settings = [] 5105 5106 return self.api_client.call_api(resource_path, 'PUT', 5107 path_params, 5108 query_params, 5109 header_params, 5110 body=body_params, 5111 post_params=form_params, 5112 files=local_var_files, 5113 response_type='DocumentFieldsInformation', 5114 auth_settings=auth_settings, 5115 callback=params.get('callback'), 5116 _return_http_data_only=params.get('_return_http_data_only'), 5117 _preload_content=params.get('_preload_content', True), 5118 _request_timeout=params.get('_request_timeout'), 5119 collection_formats=collection_formats) 5120 5121 def update_documents(self, account_id, template_id, **kwargs): 5122 """ 5123 Adds documents to a template document. 5124 Adds one or more documents to an existing template document. 5125 This method makes a synchronous HTTP request by default. To make an 5126 asynchronous HTTP request, please define a `callback` function 5127 to be invoked when receiving the response. 5128 >>> def callback_function(response): 5129 >>> pprint(response) 5130 >>> 5131 >>> thread = api.update_documents(account_id, template_id, callback=callback_function) 5132 5133 :param callback function: The callback function 5134 for asynchronous request. (optional) 5135 :param str account_id: The external account number (int) or account ID Guid. (required) 5136 :param str template_id: The ID of the template being accessed. (required) 5137 :param EnvelopeDefinition envelope_definition: 5138 :return: TemplateDocumentsResult 5139 If the method is called asynchronously, 5140 returns the request thread. 5141 """ 5142 kwargs['_return_http_data_only'] = True 5143 if kwargs.get('callback'): 5144 return self.update_documents_with_http_info(account_id, template_id, **kwargs) 5145 else: 5146 (data) = self.update_documents_with_http_info(account_id, template_id, **kwargs) 5147 return data 5148 5149 def update_documents_with_http_info(self, account_id, template_id, **kwargs): 5150 """ 5151 Adds documents to a template document. 5152 Adds one or more documents to an existing template document. 5153 This method makes a synchronous HTTP request by default. To make an 5154 asynchronous HTTP request, please define a `callback` function 5155 to be invoked when receiving the response. 5156 >>> def callback_function(response): 5157 >>> pprint(response) 5158 >>> 5159 >>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function) 5160 5161 :param callback function: The callback function 5162 for asynchronous request. (optional) 5163 :param str account_id: The external account number (int) or account ID Guid. (required) 5164 :param str template_id: The ID of the template being accessed. (required) 5165 :param EnvelopeDefinition envelope_definition: 5166 :return: TemplateDocumentsResult 5167 If the method is called asynchronously, 5168 returns the request thread. 5169 """ 5170 5171 all_params = ['account_id', 'template_id', 'envelope_definition'] 5172 all_params.append('callback') 5173 all_params.append('_return_http_data_only') 5174 all_params.append('_preload_content') 5175 all_params.append('_request_timeout') 5176 5177 params = locals() 5178 for key, val in iteritems(params['kwargs']): 5179 if key not in all_params: 5180 raise TypeError( 5181 "Got an unexpected keyword argument '%s'" 5182 " to method update_documents" % key 5183 ) 5184 params[key] = val 5185 del params['kwargs'] 5186 # verify the required parameter 'account_id' is set 5187 if ('account_id' not in params) or (params['account_id'] is None): 5188 raise ValueError("Missing the required parameter `account_id` when calling `update_documents`") 5189 # verify the required parameter 'template_id' is set 5190 if ('template_id' not in params) or (params['template_id'] is None): 5191 raise ValueError("Missing the required parameter `template_id` when calling `update_documents`") 5192 5193 5194 collection_formats = {} 5195 5196 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json') 5197 path_params = {} 5198 if 'account_id' in params: 5199 path_params['accountId'] = params['account_id'] 5200 if 'template_id' in params: 5201 path_params['templateId'] = params['template_id'] 5202 5203 query_params = {} 5204 5205 header_params = {} 5206 5207 form_params = [] 5208 local_var_files = {} 5209 5210 body_params = None 5211 if 'envelope_definition' in params: 5212 body_params = params['envelope_definition'] 5213 # HTTP header `Accept` 5214 header_params['Accept'] = self.api_client.\ 5215 select_header_accept(['application/json']) 5216 5217 # Authentication setting 5218 auth_settings = [] 5219 5220 return self.api_client.call_api(resource_path, 'PUT', 5221 path_params, 5222 query_params, 5223 header_params, 5224 body=body_params, 5225 post_params=form_params, 5226 files=local_var_files, 5227 response_type='TemplateDocumentsResult', 5228 auth_settings=auth_settings, 5229 callback=params.get('callback'), 5230 _return_http_data_only=params.get('_return_http_data_only'), 5231 _preload_content=params.get('_preload_content', True), 5232 _request_timeout=params.get('_request_timeout'), 5233 collection_formats=collection_formats) 5234 5235 def update_group_share(self, account_id, template_id, template_part, **kwargs): 5236 """ 5237 Shares a template with a group 5238 Shares a template with the specified members group. 5239 This method makes a synchronous HTTP request by default. To make an 5240 asynchronous HTTP request, please define a `callback` function 5241 to be invoked when receiving the response. 5242 >>> def callback_function(response): 5243 >>> pprint(response) 5244 >>> 5245 >>> thread = api.update_group_share(account_id, template_id, template_part, callback=callback_function) 5246 5247 :param callback function: The callback function 5248 for asynchronous request. (optional) 5249 :param str account_id: The external account number (int) or account ID Guid. (required) 5250 :param str template_id: The ID of the template being accessed. (required) 5251 :param str template_part: Currently, the only defined part is **groups**. (required) 5252 :param GroupInformation group_information: 5253 :return: GroupInformation 5254 If the method is called asynchronously, 5255 returns the request thread. 5256 """ 5257 kwargs['_return_http_data_only'] = True 5258 if kwargs.get('callback'): 5259 return self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs) 5260 else: 5261 (data) = self.update_group_share_with_http_info(account_id, template_id, template_part, **kwargs) 5262 return data 5263 5264 def update_group_share_with_http_info(self, account_id, template_id, template_part, **kwargs): 5265 """ 5266 Shares a template with a group 5267 Shares a template with the specified members group. 5268 This method makes a synchronous HTTP request by default. To make an 5269 asynchronous HTTP request, please define a `callback` function 5270 to be invoked when receiving the response. 5271 >>> def callback_function(response): 5272 >>> pprint(response) 5273 >>> 5274 >>> thread = api.update_group_share_with_http_info(account_id, template_id, template_part, callback=callback_function) 5275 5276 :param callback function: The callback function 5277 for asynchronous request. (optional) 5278 :param str account_id: The external account number (int) or account ID Guid. (required) 5279 :param str template_id: The ID of the template being accessed. (required) 5280 :param str template_part: Currently, the only defined part is **groups**. (required) 5281 :param GroupInformation group_information: 5282 :return: GroupInformation 5283 If the method is called asynchronously, 5284 returns the request thread. 5285 """ 5286 5287 all_params = ['account_id', 'template_id', 'template_part', 'group_information'] 5288 all_params.append('callback') 5289 all_params.append('_return_http_data_only') 5290 all_params.append('_preload_content') 5291 all_params.append('_request_timeout') 5292 5293 params = locals() 5294 for key, val in iteritems(params['kwargs']): 5295 if key not in all_params: 5296 raise TypeError( 5297 "Got an unexpected keyword argument '%s'" 5298 " to method update_group_share" % key 5299 ) 5300 params[key] = val 5301 del params['kwargs'] 5302 # verify the required parameter 'account_id' is set 5303 if ('account_id' not in params) or (params['account_id'] is None): 5304 raise ValueError("Missing the required parameter `account_id` when calling `update_group_share`") 5305 # verify the required parameter 'template_id' is set 5306 if ('template_id' not in params) or (params['template_id'] is None): 5307 raise ValueError("Missing the required parameter `template_id` when calling `update_group_share`") 5308 # verify the required parameter 'template_part' is set 5309 if ('template_part' not in params) or (params['template_part'] is None): 5310 raise ValueError("Missing the required parameter `template_part` when calling `update_group_share`") 5311 5312 5313 collection_formats = {} 5314 5315 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}'.replace('{format}', 'json') 5316 path_params = {} 5317 if 'account_id' in params: 5318 path_params['accountId'] = params['account_id'] 5319 if 'template_id' in params: 5320 path_params['templateId'] = params['template_id'] 5321 if 'template_part' in params: 5322 path_params['templatePart'] = params['template_part'] 5323 5324 query_params = {} 5325 5326 header_params = {} 5327 5328 form_params = [] 5329 local_var_files = {} 5330 5331 body_params = None 5332 if 'group_information' in params: 5333 body_params = params['group_information'] 5334 # HTTP header `Accept` 5335 header_params['Accept'] = self.api_client.\ 5336 select_header_accept(['application/json']) 5337 5338 # Authentication setting 5339 auth_settings = [] 5340 5341 return self.api_client.call_api(resource_path, 'PUT', 5342 path_params, 5343 query_params, 5344 header_params, 5345 body=body_params, 5346 post_params=form_params, 5347 files=local_var_files, 5348 response_type='GroupInformation', 5349 auth_settings=auth_settings, 5350 callback=params.get('callback'), 5351 _return_http_data_only=params.get('_return_http_data_only'), 5352 _preload_content=params.get('_preload_content', True), 5353 _request_timeout=params.get('_request_timeout'), 5354 collection_formats=collection_formats) 5355 5356 def update_lock(self, account_id, template_id, **kwargs): 5357 """ 5358 Updates a template lock. 5359 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. 5360 This method makes a synchronous HTTP request by default. To make an 5361 asynchronous HTTP request, please define a `callback` function 5362 to be invoked when receiving the response. 5363 >>> def callback_function(response): 5364 >>> pprint(response) 5365 >>> 5366 >>> thread = api.update_lock(account_id, template_id, callback=callback_function) 5367 5368 :param callback function: The callback function 5369 for asynchronous request. (optional) 5370 :param str account_id: The external account number (int) or account ID Guid. (required) 5371 :param str template_id: The ID of the template being accessed. (required) 5372 :param LockRequest lock_request: 5373 :return: LockInformation 5374 If the method is called asynchronously, 5375 returns the request thread. 5376 """ 5377 kwargs['_return_http_data_only'] = True 5378 if kwargs.get('callback'): 5379 return self.update_lock_with_http_info(account_id, template_id, **kwargs) 5380 else: 5381 (data) = self.update_lock_with_http_info(account_id, template_id, **kwargs) 5382 return data 5383 5384 def update_lock_with_http_info(self, account_id, template_id, **kwargs): 5385 """ 5386 Updates a template lock. 5387 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. 5388 This method makes a synchronous HTTP request by default. To make an 5389 asynchronous HTTP request, please define a `callback` function 5390 to be invoked when receiving the response. 5391 >>> def callback_function(response): 5392 >>> pprint(response) 5393 >>> 5394 >>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function) 5395 5396 :param callback function: The callback function 5397 for asynchronous request. (optional) 5398 :param str account_id: The external account number (int) or account ID Guid. (required) 5399 :param str template_id: The ID of the template being accessed. (required) 5400 :param LockRequest lock_request: 5401 :return: LockInformation 5402 If the method is called asynchronously, 5403 returns the request thread. 5404 """ 5405 5406 all_params = ['account_id', 'template_id', 'lock_request'] 5407 all_params.append('callback') 5408 all_params.append('_return_http_data_only') 5409 all_params.append('_preload_content') 5410 all_params.append('_request_timeout') 5411 5412 params = locals() 5413 for key, val in iteritems(params['kwargs']): 5414 if key not in all_params: 5415 raise TypeError( 5416 "Got an unexpected keyword argument '%s'" 5417 " to method update_lock" % key 5418 ) 5419 params[key] = val 5420 del params['kwargs'] 5421 # verify the required parameter 'account_id' is set 5422 if ('account_id' not in params) or (params['account_id'] is None): 5423 raise ValueError("Missing the required parameter `account_id` when calling `update_lock`") 5424 # verify the required parameter 'template_id' is set 5425 if ('template_id' not in params) or (params['template_id'] is None): 5426 raise ValueError("Missing the required parameter `template_id` when calling `update_lock`") 5427 5428 5429 collection_formats = {} 5430 5431 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json') 5432 path_params = {} 5433 if 'account_id' in params: 5434 path_params['accountId'] = params['account_id'] 5435 if 'template_id' in params: 5436 path_params['templateId'] = params['template_id'] 5437 5438 query_params = {} 5439 5440 header_params = {} 5441 5442 form_params = [] 5443 local_var_files = {} 5444 5445 body_params = None 5446 if 'lock_request' in params: 5447 body_params = params['lock_request'] 5448 # HTTP header `Accept` 5449 header_params['Accept'] = self.api_client.\ 5450 select_header_accept(['application/json']) 5451 5452 # Authentication setting 5453 auth_settings = [] 5454 5455 return self.api_client.call_api(resource_path, 'PUT', 5456 path_params, 5457 query_params, 5458 header_params, 5459 body=body_params, 5460 post_params=form_params, 5461 files=local_var_files, 5462 response_type='LockInformation', 5463 auth_settings=auth_settings, 5464 callback=params.get('callback'), 5465 _return_http_data_only=params.get('_return_http_data_only'), 5466 _preload_content=params.get('_preload_content', True), 5467 _request_timeout=params.get('_request_timeout'), 5468 collection_formats=collection_formats) 5469 5470 def update_notification_settings(self, account_id, template_id, **kwargs): 5471 """ 5472 Updates the notification structure for an existing template. 5473 Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications. 5474 This method makes a synchronous HTTP request by default. To make an 5475 asynchronous HTTP request, please define a `callback` function 5476 to be invoked when receiving the response. 5477 >>> def callback_function(response): 5478 >>> pprint(response) 5479 >>> 5480 >>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function) 5481 5482 :param callback function: The callback function 5483 for asynchronous request. (optional) 5484 :param str account_id: The external account number (int) or account ID Guid. (required) 5485 :param str template_id: The ID of the template being accessed. (required) 5486 :param TemplateNotificationRequest template_notification_request: 5487 :return: Notification 5488 If the method is called asynchronously, 5489 returns the request thread. 5490 """ 5491 kwargs['_return_http_data_only'] = True 5492 if kwargs.get('callback'): 5493 return self.update_notification_settings_with_http_info(account_id, template_id, **kwargs) 5494 else: 5495 (data) = self.update_notification_settings_with_http_info(account_id, template_id, **kwargs) 5496 return data 5497 5498 def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs): 5499 """ 5500 Updates the notification structure for an existing template. 5501 Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications. 5502 This method makes a synchronous HTTP request by default. To make an 5503 asynchronous HTTP request, please define a `callback` function 5504 to be invoked when receiving the response. 5505 >>> def callback_function(response): 5506 >>> pprint(response) 5507 >>> 5508 >>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function) 5509 5510 :param callback function: The callback function 5511 for asynchronous request. (optional) 5512 :param str account_id: The external account number (int) or account ID Guid. (required) 5513 :param str template_id: The ID of the template being accessed. (required) 5514 :param TemplateNotificationRequest template_notification_request: 5515 :return: Notification 5516 If the method is called asynchronously, 5517 returns the request thread. 5518 """ 5519 5520 all_params = ['account_id', 'template_id', 'template_notification_request'] 5521 all_params.append('callback') 5522 all_params.append('_return_http_data_only') 5523 all_params.append('_preload_content') 5524 all_params.append('_request_timeout') 5525 5526 params = locals() 5527 for key, val in iteritems(params['kwargs']): 5528 if key not in all_params: 5529 raise TypeError( 5530 "Got an unexpected keyword argument '%s'" 5531 " to method update_notification_settings" % key 5532 ) 5533 params[key] = val 5534 del params['kwargs'] 5535 # verify the required parameter 'account_id' is set 5536 if ('account_id' not in params) or (params['account_id'] is None): 5537 raise ValueError("Missing the required parameter `account_id` when calling `update_notification_settings`") 5538 # verify the required parameter 'template_id' is set 5539 if ('template_id' not in params) or (params['template_id'] is None): 5540 raise ValueError("Missing the required parameter `template_id` when calling `update_notification_settings`") 5541 5542 5543 collection_formats = {} 5544 5545 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json') 5546 path_params = {} 5547 if 'account_id' in params: 5548 path_params['accountId'] = params['account_id'] 5549 if 'template_id' in params: 5550 path_params['templateId'] = params['template_id'] 5551 5552 query_params = {} 5553 5554 header_params = {} 5555 5556 form_params = [] 5557 local_var_files = {} 5558 5559 body_params = None 5560 if 'template_notification_request' in params: 5561 body_params = params['template_notification_request'] 5562 # HTTP header `Accept` 5563 header_params['Accept'] = self.api_client.\ 5564 select_header_accept(['application/json']) 5565 5566 # Authentication setting 5567 auth_settings = [] 5568 5569 return self.api_client.call_api(resource_path, 'PUT', 5570 path_params, 5571 query_params, 5572 header_params, 5573 body=body_params, 5574 post_params=form_params, 5575 files=local_var_files, 5576 response_type='Notification', 5577 auth_settings=auth_settings, 5578 callback=params.get('callback'), 5579 _return_http_data_only=params.get('_return_http_data_only'), 5580 _preload_content=params.get('_preload_content', True), 5581 _request_timeout=params.get('_request_timeout'), 5582 collection_formats=collection_formats) 5583 5584 def update_recipients(self, account_id, template_id, **kwargs): 5585 """ 5586 Updates recipients in a template. 5587 Updates recipients in a template. You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. 5588 This method makes a synchronous HTTP request by default. To make an 5589 asynchronous HTTP request, please define a `callback` function 5590 to be invoked when receiving the response. 5591 >>> def callback_function(response): 5592 >>> pprint(response) 5593 >>> 5594 >>> thread = api.update_recipients(account_id, template_id, callback=callback_function) 5595 5596 :param callback function: The callback function 5597 for asynchronous request. (optional) 5598 :param str account_id: The external account number (int) or account ID Guid. (required) 5599 :param str template_id: The ID of the template being accessed. (required) 5600 :param str resend_envelope: 5601 :param TemplateRecipients template_recipients: 5602 :return: RecipientsUpdateSummary 5603 If the method is called asynchronously, 5604 returns the request thread. 5605 """ 5606 kwargs['_return_http_data_only'] = True 5607 if kwargs.get('callback'): 5608 return self.update_recipients_with_http_info(account_id, template_id, **kwargs) 5609 else: 5610 (data) = self.update_recipients_with_http_info(account_id, template_id, **kwargs) 5611 return data 5612 5613 def update_recipients_with_http_info(self, account_id, template_id, **kwargs): 5614 """ 5615 Updates recipients in a template. 5616 Updates recipients in a template. You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. 5617 This method makes a synchronous HTTP request by default. To make an 5618 asynchronous HTTP request, please define a `callback` function 5619 to be invoked when receiving the response. 5620 >>> def callback_function(response): 5621 >>> pprint(response) 5622 >>> 5623 >>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function) 5624 5625 :param callback function: The callback function 5626 for asynchronous request. (optional) 5627 :param str account_id: The external account number (int) or account ID Guid. (required) 5628 :param str template_id: The ID of the template being accessed. (required) 5629 :param str resend_envelope: 5630 :param TemplateRecipients template_recipients: 5631 :return: RecipientsUpdateSummary 5632 If the method is called asynchronously, 5633 returns the request thread. 5634 """ 5635 5636 all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients'] 5637 all_params.append('callback') 5638 all_params.append('_return_http_data_only') 5639 all_params.append('_preload_content') 5640 all_params.append('_request_timeout') 5641 5642 params = locals() 5643 for key, val in iteritems(params['kwargs']): 5644 if key not in all_params: 5645 raise TypeError( 5646 "Got an unexpected keyword argument '%s'" 5647 " to method update_recipients" % key 5648 ) 5649 params[key] = val 5650 del params['kwargs'] 5651 # verify the required parameter 'account_id' is set 5652 if ('account_id' not in params) or (params['account_id'] is None): 5653 raise ValueError("Missing the required parameter `account_id` when calling `update_recipients`") 5654 # verify the required parameter 'template_id' is set 5655 if ('template_id' not in params) or (params['template_id'] is None): 5656 raise ValueError("Missing the required parameter `template_id` when calling `update_recipients`") 5657 5658 5659 collection_formats = {} 5660 5661 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json') 5662 path_params = {} 5663 if 'account_id' in params: 5664 path_params['accountId'] = params['account_id'] 5665 if 'template_id' in params: 5666 path_params['templateId'] = params['template_id'] 5667 5668 query_params = {} 5669 if 'resend_envelope' in params: 5670 query_params['resend_envelope'] = params['resend_envelope'] 5671 5672 header_params = {} 5673 5674 form_params = [] 5675 local_var_files = {} 5676 5677 body_params = None 5678 if 'template_recipients' in params: 5679 body_params = params['template_recipients'] 5680 # HTTP header `Accept` 5681 header_params['Accept'] = self.api_client.\ 5682 select_header_accept(['application/json']) 5683 5684 # Authentication setting 5685 auth_settings = [] 5686 5687 return self.api_client.call_api(resource_path, 'PUT', 5688 path_params, 5689 query_params, 5690 header_params, 5691 body=body_params, 5692 post_params=form_params, 5693 files=local_var_files, 5694 response_type='RecipientsUpdateSummary', 5695 auth_settings=auth_settings, 5696 callback=params.get('callback'), 5697 _return_http_data_only=params.get('_return_http_data_only'), 5698 _preload_content=params.get('_preload_content', True), 5699 _request_timeout=params.get('_request_timeout'), 5700 collection_formats=collection_formats) 5701 5702 def update_tabs(self, account_id, recipient_id, template_id, **kwargs): 5703 """ 5704 Updates the tabs for a recipient. 5705 Updates one or more tabs for a recipient in a template. 5706 This method makes a synchronous HTTP request by default. To make an 5707 asynchronous HTTP request, please define a `callback` function 5708 to be invoked when receiving the response. 5709 >>> def callback_function(response): 5710 >>> pprint(response) 5711 >>> 5712 >>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function) 5713 5714 :param callback function: The callback function 5715 for asynchronous request. (optional) 5716 :param str account_id: The external account number (int) or account ID Guid. (required) 5717 :param str recipient_id: The ID of the recipient being accessed. (required) 5718 :param str template_id: The ID of the template being accessed. (required) 5719 :param TemplateTabs template_tabs: 5720 :return: Tabs 5721 If the method is called asynchronously, 5722 returns the request thread. 5723 """ 5724 kwargs['_return_http_data_only'] = True 5725 if kwargs.get('callback'): 5726 return self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 5727 else: 5728 (data) = self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 5729 return data 5730 5731 def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs): 5732 """ 5733 Updates the tabs for a recipient. 5734 Updates one or more tabs for a recipient in a template. 5735 This method makes a synchronous HTTP request by default. To make an 5736 asynchronous HTTP request, please define a `callback` function 5737 to be invoked when receiving the response. 5738 >>> def callback_function(response): 5739 >>> pprint(response) 5740 >>> 5741 >>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function) 5742 5743 :param callback function: The callback function 5744 for asynchronous request. (optional) 5745 :param str account_id: The external account number (int) or account ID Guid. (required) 5746 :param str recipient_id: The ID of the recipient being accessed. (required) 5747 :param str template_id: The ID of the template being accessed. (required) 5748 :param TemplateTabs template_tabs: 5749 :return: Tabs 5750 If the method is called asynchronously, 5751 returns the request thread. 5752 """ 5753 5754 all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs'] 5755 all_params.append('callback') 5756 all_params.append('_return_http_data_only') 5757 all_params.append('_preload_content') 5758 all_params.append('_request_timeout') 5759 5760 params = locals() 5761 for key, val in iteritems(params['kwargs']): 5762 if key not in all_params: 5763 raise TypeError( 5764 "Got an unexpected keyword argument '%s'" 5765 " to method update_tabs" % key 5766 ) 5767 params[key] = val 5768 del params['kwargs'] 5769 # verify the required parameter 'account_id' is set 5770 if ('account_id' not in params) or (params['account_id'] is None): 5771 raise ValueError("Missing the required parameter `account_id` when calling `update_tabs`") 5772 # verify the required parameter 'recipient_id' is set 5773 if ('recipient_id' not in params) or (params['recipient_id'] is None): 5774 raise ValueError("Missing the required parameter `recipient_id` when calling `update_tabs`") 5775 # verify the required parameter 'template_id' is set 5776 if ('template_id' not in params) or (params['template_id'] is None): 5777 raise ValueError("Missing the required parameter `template_id` when calling `update_tabs`") 5778 5779 5780 collection_formats = {} 5781 5782 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json') 5783 path_params = {} 5784 if 'account_id' in params: 5785 path_params['accountId'] = params['account_id'] 5786 if 'recipient_id' in params: 5787 path_params['recipientId'] = params['recipient_id'] 5788 if 'template_id' in params: 5789 path_params['templateId'] = params['template_id'] 5790 5791 query_params = {} 5792 5793 header_params = {} 5794 5795 form_params = [] 5796 local_var_files = {} 5797 5798 body_params = None 5799 if 'template_tabs' in params: 5800 body_params = params['template_tabs'] 5801 # HTTP header `Accept` 5802 header_params['Accept'] = self.api_client.\ 5803 select_header_accept(['application/json']) 5804 5805 # Authentication setting 5806 auth_settings = [] 5807 5808 return self.api_client.call_api(resource_path, 'PUT', 5809 path_params, 5810 query_params, 5811 header_params, 5812 body=body_params, 5813 post_params=form_params, 5814 files=local_var_files, 5815 response_type='Tabs', 5816 auth_settings=auth_settings, 5817 callback=params.get('callback'), 5818 _return_http_data_only=params.get('_return_http_data_only'), 5819 _preload_content=params.get('_preload_content', True), 5820 _request_timeout=params.get('_request_timeout'), 5821 collection_formats=collection_formats) 5822 5823 def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs): 5824 """ 5825 Updates the tabs for a template 5826 Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 5827 This method makes a synchronous HTTP request by default. To make an 5828 asynchronous HTTP request, please define a `callback` function 5829 to be invoked when receiving the response. 5830 >>> def callback_function(response): 5831 >>> pprint(response) 5832 >>> 5833 >>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function) 5834 5835 :param callback function: The callback function 5836 for asynchronous request. (optional) 5837 :param str account_id: The external account number (int) or account ID Guid. (required) 5838 :param str document_id: The ID of the document being accessed. (required) 5839 :param str template_id: The ID of the template being accessed. (required) 5840 :param TemplateTabs template_tabs: 5841 :return: Tabs 5842 If the method is called asynchronously, 5843 returns the request thread. 5844 """ 5845 kwargs['_return_http_data_only'] = True 5846 if kwargs.get('callback'): 5847 return self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 5848 else: 5849 (data) = self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 5850 return data 5851 5852 def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs): 5853 """ 5854 Updates the tabs for a template 5855 Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 5856 This method makes a synchronous HTTP request by default. To make an 5857 asynchronous HTTP request, please define a `callback` function 5858 to be invoked when receiving the response. 5859 >>> def callback_function(response): 5860 >>> pprint(response) 5861 >>> 5862 >>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function) 5863 5864 :param callback function: The callback function 5865 for asynchronous request. (optional) 5866 :param str account_id: The external account number (int) or account ID Guid. (required) 5867 :param str document_id: The ID of the document being accessed. (required) 5868 :param str template_id: The ID of the template being accessed. (required) 5869 :param TemplateTabs template_tabs: 5870 :return: Tabs 5871 If the method is called asynchronously, 5872 returns the request thread. 5873 """ 5874 5875 all_params = ['account_id', 'document_id', 'template_id', 'template_tabs'] 5876 all_params.append('callback') 5877 all_params.append('_return_http_data_only') 5878 all_params.append('_preload_content') 5879 all_params.append('_request_timeout') 5880 5881 params = locals() 5882 for key, val in iteritems(params['kwargs']): 5883 if key not in all_params: 5884 raise TypeError( 5885 "Got an unexpected keyword argument '%s'" 5886 " to method update_template_document_tabs" % key 5887 ) 5888 params[key] = val 5889 del params['kwargs'] 5890 # verify the required parameter 'account_id' is set 5891 if ('account_id' not in params) or (params['account_id'] is None): 5892 raise ValueError("Missing the required parameter `account_id` when calling `update_template_document_tabs`") 5893 # verify the required parameter 'document_id' is set 5894 if ('document_id' not in params) or (params['document_id'] is None): 5895 raise ValueError("Missing the required parameter `document_id` when calling `update_template_document_tabs`") 5896 # verify the required parameter 'template_id' is set 5897 if ('template_id' not in params) or (params['template_id'] is None): 5898 raise ValueError("Missing the required parameter `template_id` when calling `update_template_document_tabs`") 5899 5900 5901 collection_formats = {} 5902 5903 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json') 5904 path_params = {} 5905 if 'account_id' in params: 5906 path_params['accountId'] = params['account_id'] 5907 if 'document_id' in params: 5908 path_params['documentId'] = params['document_id'] 5909 if 'template_id' in params: 5910 path_params['templateId'] = params['template_id'] 5911 5912 query_params = {} 5913 5914 header_params = {} 5915 5916 form_params = [] 5917 local_var_files = {} 5918 5919 body_params = None 5920 if 'template_tabs' in params: 5921 body_params = params['template_tabs'] 5922 # HTTP header `Accept` 5923 header_params['Accept'] = self.api_client.\ 5924 select_header_accept(['application/json']) 5925 5926 # Authentication setting 5927 auth_settings = [] 5928 5929 return self.api_client.call_api(resource_path, 'PUT', 5930 path_params, 5931 query_params, 5932 header_params, 5933 body=body_params, 5934 post_params=form_params, 5935 files=local_var_files, 5936 response_type='Tabs', 5937 auth_settings=auth_settings, 5938 callback=params.get('callback'), 5939 _return_http_data_only=params.get('_return_http_data_only'), 5940 _preload_content=params.get('_preload_content', True), 5941 _request_timeout=params.get('_request_timeout'), 5942 collection_formats=collection_formats) 5943 5944 def update_templates(self, account_id, **kwargs): 5945 """ 5946 Update template autoMatch setting. 5947 This method makes a synchronous HTTP request by default. To make an 5948 asynchronous HTTP request, please define a `callback` function 5949 to be invoked when receiving the response. 5950 >>> def callback_function(response): 5951 >>> pprint(response) 5952 >>> 5953 >>> thread = api.update_templates(account_id, callback=callback_function) 5954 5955 :param callback function: The callback function 5956 for asynchronous request. (optional) 5957 :param str account_id: The external account number (int) or account ID Guid. (required) 5958 :param TemplateAutoMatchList template_auto_match_list: 5959 :return: TemplateAutoMatchList 5960 If the method is called asynchronously, 5961 returns the request thread. 5962 """ 5963 kwargs['_return_http_data_only'] = True 5964 if kwargs.get('callback'): 5965 return self.update_templates_with_http_info(account_id, **kwargs) 5966 else: 5967 (data) = self.update_templates_with_http_info(account_id, **kwargs) 5968 return data 5969 5970 def update_templates_with_http_info(self, account_id, **kwargs): 5971 """ 5972 Update template autoMatch setting. 5973 This method makes a synchronous HTTP request by default. To make an 5974 asynchronous HTTP request, please define a `callback` function 5975 to be invoked when receiving the response. 5976 >>> def callback_function(response): 5977 >>> pprint(response) 5978 >>> 5979 >>> thread = api.update_templates_with_http_info(account_id, callback=callback_function) 5980 5981 :param callback function: The callback function 5982 for asynchronous request. (optional) 5983 :param str account_id: The external account number (int) or account ID Guid. (required) 5984 :param TemplateAutoMatchList template_auto_match_list: 5985 :return: TemplateAutoMatchList 5986 If the method is called asynchronously, 5987 returns the request thread. 5988 """ 5989 5990 all_params = ['account_id', 'template_auto_match_list'] 5991 all_params.append('callback') 5992 all_params.append('_return_http_data_only') 5993 all_params.append('_preload_content') 5994 all_params.append('_request_timeout') 5995 5996 params = locals() 5997 for key, val in iteritems(params['kwargs']): 5998 if key not in all_params: 5999 raise TypeError( 6000 "Got an unexpected keyword argument '%s'" 6001 " to method update_templates" % key 6002 ) 6003 params[key] = val 6004 del params['kwargs'] 6005 # verify the required parameter 'account_id' is set 6006 if ('account_id' not in params) or (params['account_id'] is None): 6007 raise ValueError("Missing the required parameter `account_id` when calling `update_templates`") 6008 6009 6010 collection_formats = {} 6011 6012 resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json') 6013 path_params = {} 6014 if 'account_id' in params: 6015 path_params['accountId'] = params['account_id'] 6016 6017 query_params = {} 6018 6019 header_params = {} 6020 6021 form_params = [] 6022 local_var_files = {} 6023 6024 body_params = None 6025 if 'template_auto_match_list' in params: 6026 body_params = params['template_auto_match_list'] 6027 # HTTP header `Accept` 6028 header_params['Accept'] = self.api_client.\ 6029 select_header_accept(['application/json']) 6030 6031 # Authentication setting 6032 auth_settings = [] 6033 6034 return self.api_client.call_api(resource_path, 'PUT', 6035 path_params, 6036 query_params, 6037 header_params, 6038 body=body_params, 6039 post_params=form_params, 6040 files=local_var_files, 6041 response_type='TemplateAutoMatchList', 6042 auth_settings=auth_settings, 6043 callback=params.get('callback'), 6044 _return_http_data_only=params.get('_return_http_data_only'), 6045 _preload_content=params.get('_preload_content', True), 6046 _request_timeout=params.get('_request_timeout'), 6047 collection_formats=collection_formats) 6048 6049 def update_templates_auto_match(self, account_id, **kwargs): 6050 """ 6051 Update template autoMatch setting. 6052 This method makes a synchronous HTTP request by default. To make an 6053 asynchronous HTTP request, please define a `callback` function 6054 to be invoked when receiving the response. 6055 >>> def callback_function(response): 6056 >>> pprint(response) 6057 >>> 6058 >>> thread = api.update_templates_auto_match(account_id, callback=callback_function) 6059 6060 :param callback function: The callback function 6061 for asynchronous request. (optional) 6062 :param str account_id: The external account number (int) or account ID Guid. (required) 6063 :param TemplateAutoMatchList template_auto_match_list: 6064 :return: TemplateAutoMatchList 6065 If the method is called asynchronously, 6066 returns the request thread. 6067 """ 6068 kwargs['_return_http_data_only'] = True 6069 if kwargs.get('callback'): 6070 return self.update_templates_auto_match_with_http_info(account_id, **kwargs) 6071 else: 6072 (data) = self.update_templates_auto_match_with_http_info(account_id, **kwargs) 6073 return data 6074 6075 def update_templates_auto_match_with_http_info(self, account_id, **kwargs): 6076 """ 6077 Update template autoMatch setting. 6078 This method makes a synchronous HTTP request by default. To make an 6079 asynchronous HTTP request, please define a `callback` function 6080 to be invoked when receiving the response. 6081 >>> def callback_function(response): 6082 >>> pprint(response) 6083 >>> 6084 >>> thread = api.update_templates_auto_match_with_http_info(account_id, callback=callback_function) 6085 6086 :param callback function: The callback function 6087 for asynchronous request. (optional) 6088 :param str account_id: The external account number (int) or account ID Guid. (required) 6089 :param TemplateAutoMatchList template_auto_match_list: 6090 :return: TemplateAutoMatchList 6091 If the method is called asynchronously, 6092 returns the request thread. 6093 """ 6094 6095 all_params = ['account_id', 'template_auto_match_list'] 6096 all_params.append('callback') 6097 all_params.append('_return_http_data_only') 6098 all_params.append('_preload_content') 6099 all_params.append('_request_timeout') 6100 6101 params = locals() 6102 for key, val in iteritems(params['kwargs']): 6103 if key not in all_params: 6104 raise TypeError( 6105 "Got an unexpected keyword argument '%s'" 6106 " to method update_templates_auto_match" % key 6107 ) 6108 params[key] = val 6109 del params['kwargs'] 6110 # verify the required parameter 'account_id' is set 6111 if ('account_id' not in params) or (params['account_id'] is None): 6112 raise ValueError("Missing the required parameter `account_id` when calling `update_templates_auto_match`") 6113 6114 6115 collection_formats = {} 6116 6117 resource_path = '/v2.1/accounts/{accountId}/templates/auto_match'.replace('{format}', 'json') 6118 path_params = {} 6119 if 'account_id' in params: 6120 path_params['accountId'] = params['account_id'] 6121 6122 query_params = {} 6123 6124 header_params = {} 6125 6126 form_params = [] 6127 local_var_files = {} 6128 6129 body_params = None 6130 if 'template_auto_match_list' in params: 6131 body_params = params['template_auto_match_list'] 6132 # HTTP header `Accept` 6133 header_params['Accept'] = self.api_client.\ 6134 select_header_accept(['application/json']) 6135 6136 # Authentication setting 6137 auth_settings = [] 6138 6139 return self.api_client.call_api(resource_path, 'PUT', 6140 path_params, 6141 query_params, 6142 header_params, 6143 body=body_params, 6144 post_params=form_params, 6145 files=local_var_files, 6146 response_type='TemplateAutoMatchList', 6147 auth_settings=auth_settings, 6148 callback=params.get('callback'), 6149 _return_http_data_only=params.get('_return_http_data_only'), 6150 _preload_content=params.get('_preload_content', True), 6151 _request_timeout=params.get('_request_timeout'), 6152 collection_formats=collection_formats)
NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen
44 def create_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.
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.
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.
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.
279 def create_edit_view(self, account_id, template_id, **kwargs): 280 """ 281 Provides a URL to start an edit view of the Template UI 282 This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI. 283 This method makes a synchronous HTTP request by default. To make an 284 asynchronous HTTP request, please define a `callback` function 285 to be invoked when receiving the response. 286 >>> def callback_function(response): 287 >>> pprint(response) 288 >>> 289 >>> thread = api.create_edit_view(account_id, template_id, callback=callback_function) 290 291 :param callback function: The callback function 292 for asynchronous request. (optional) 293 :param str account_id: The external account number (int) or account ID Guid. (required) 294 :param str template_id: The ID of the template being accessed. (required) 295 :param TemplateViewRequest template_view_request: 296 :return: ViewUrl 297 If the method is called asynchronously, 298 returns the request thread. 299 """ 300 kwargs['_return_http_data_only'] = True 301 if kwargs.get('callback'): 302 return self.create_edit_view_with_http_info(account_id, template_id, **kwargs) 303 else: 304 (data) = self.create_edit_view_with_http_info(account_id, template_id, **kwargs) 305 return data
Provides a URL to start an edit view of the Template UI
This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_edit_view(account_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str template_id: The ID of the template being accessed. (required)
- TemplateViewRequest template_view_request:
Returns
ViewUrl If the method is called asynchronously, returns the request thread.
307 def create_edit_view_with_http_info(self, account_id, template_id, **kwargs): 308 """ 309 Provides a URL to start an edit view of the Template UI 310 This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI. 311 This method makes a synchronous HTTP request by default. To make an 312 asynchronous HTTP request, please define a `callback` function 313 to be invoked when receiving the response. 314 >>> def callback_function(response): 315 >>> pprint(response) 316 >>> 317 >>> thread = api.create_edit_view_with_http_info(account_id, template_id, callback=callback_function) 318 319 :param callback function: The callback function 320 for asynchronous request. (optional) 321 :param str account_id: The external account number (int) or account ID Guid. (required) 322 :param str template_id: The ID of the template being accessed. (required) 323 :param TemplateViewRequest template_view_request: 324 :return: ViewUrl 325 If the method is called asynchronously, 326 returns the request thread. 327 """ 328 329 all_params = ['account_id', 'template_id', 'template_view_request'] 330 all_params.append('callback') 331 all_params.append('_return_http_data_only') 332 all_params.append('_preload_content') 333 all_params.append('_request_timeout') 334 335 params = locals() 336 for key, val in iteritems(params['kwargs']): 337 if key not in all_params: 338 raise TypeError( 339 "Got an unexpected keyword argument '%s'" 340 " to method create_edit_view" % key 341 ) 342 params[key] = val 343 del params['kwargs'] 344 # verify the required parameter 'account_id' is set 345 if ('account_id' not in params) or (params['account_id'] is None): 346 raise ValueError("Missing the required parameter `account_id` when calling `create_edit_view`") 347 # verify the required parameter 'template_id' is set 348 if ('template_id' not in params) or (params['template_id'] is None): 349 raise ValueError("Missing the required parameter `template_id` when calling `create_edit_view`") 350 351 352 collection_formats = {} 353 354 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/views/edit'.replace('{format}', 'json') 355 path_params = {} 356 if 'account_id' in params: 357 path_params['accountId'] = params['account_id'] 358 if 'template_id' in params: 359 path_params['templateId'] = params['template_id'] 360 361 query_params = {} 362 363 header_params = {} 364 365 form_params = [] 366 local_var_files = {} 367 368 body_params = None 369 if 'template_view_request' in params: 370 body_params = params['template_view_request'] 371 # HTTP header `Accept` 372 header_params['Accept'] = self.api_client.\ 373 select_header_accept(['application/json']) 374 375 # Authentication setting 376 auth_settings = [] 377 378 return self.api_client.call_api(resource_path, 'POST', 379 path_params, 380 query_params, 381 header_params, 382 body=body_params, 383 post_params=form_params, 384 files=local_var_files, 385 response_type='ViewUrl', 386 auth_settings=auth_settings, 387 callback=params.get('callback'), 388 _return_http_data_only=params.get('_return_http_data_only'), 389 _preload_content=params.get('_preload_content', True), 390 _request_timeout=params.get('_request_timeout'), 391 collection_formats=collection_formats)
Provides a URL to start an edit view of the Template UI
This method returns a URL for starting an edit view of a template that uses the DocuSign Template UI.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.create_edit_view_with_http_info(account_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str template_id: The ID of the template being accessed. (required)
- TemplateViewRequest template_view_request:
Returns
ViewUrl If the method is called asynchronously, returns the request thread.
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.
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.
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.
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.
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.
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.
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: [["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: [["emailSubject":"[[Signer 1_Email]], Please sign this NDA", In both cases 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 [[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.
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: [["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: [["emailSubject":"[[Signer 1_Email]], Please sign this NDA", In both cases 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 [[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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
2626 def get_document(self, account_id, document_id, template_id, **kwargs): 2627 """ 2628 Gets PDF documents from a template. 2629 Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf. 2630 This method makes a synchronous HTTP request by default. To make an 2631 asynchronous HTTP request, please define a `callback` function 2632 to be invoked when receiving the response. 2633 >>> def callback_function(response): 2634 >>> pprint(response) 2635 >>> 2636 >>> thread = api.get_document(account_id, document_id, template_id, callback=callback_function) 2637 2638 :param callback function: The callback function 2639 for asynchronous request. (optional) 2640 :param str account_id: The external account number (int) or account ID Guid. (required) 2641 :param str document_id: The ID of the document being accessed. (required) 2642 :param str template_id: The ID of the template being accessed. (required) 2643 :param str encrypt: 2644 :param str file_type: 2645 :param str show_changes: 2646 :return: file 2647 If the method is called asynchronously, 2648 returns the request thread. 2649 """ 2650 kwargs['_return_http_data_only'] = True 2651 if kwargs.get('callback'): 2652 return self.get_document_with_http_info(account_id, document_id, template_id, **kwargs) 2653 else: 2654 (data) = self.get_document_with_http_info(account_id, document_id, template_id, **kwargs) 2655 return data
Gets PDF documents from a template.
Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify combined to retrieve all documents in the template as one pdf.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_document(account_id, document_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
- str encrypt:
- str file_type:
- str show_changes:
Returns
file If the method is called asynchronously, returns the request thread.
2657 def get_document_with_http_info(self, account_id, document_id, template_id, **kwargs): 2658 """ 2659 Gets PDF documents from a template. 2660 Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf. 2661 This method makes a synchronous HTTP request by default. To make an 2662 asynchronous HTTP request, please define a `callback` function 2663 to be invoked when receiving the response. 2664 >>> def callback_function(response): 2665 >>> pprint(response) 2666 >>> 2667 >>> thread = api.get_document_with_http_info(account_id, document_id, template_id, callback=callback_function) 2668 2669 :param callback function: The callback function 2670 for asynchronous request. (optional) 2671 :param str account_id: The external account number (int) or account ID Guid. (required) 2672 :param str document_id: The ID of the document being accessed. (required) 2673 :param str template_id: The ID of the template being accessed. (required) 2674 :param str encrypt: 2675 :param str file_type: 2676 :param str show_changes: 2677 :return: file 2678 If the method is called asynchronously, 2679 returns the request thread. 2680 """ 2681 2682 all_params = ['account_id', 'document_id', 'template_id', 'encrypt', 'file_type', 'show_changes'] 2683 all_params.append('callback') 2684 all_params.append('_return_http_data_only') 2685 all_params.append('_preload_content') 2686 all_params.append('_request_timeout') 2687 2688 params = locals() 2689 for key, val in iteritems(params['kwargs']): 2690 if key not in all_params: 2691 raise TypeError( 2692 "Got an unexpected keyword argument '%s'" 2693 " to method get_document" % key 2694 ) 2695 params[key] = val 2696 del params['kwargs'] 2697 # verify the required parameter 'account_id' is set 2698 if ('account_id' not in params) or (params['account_id'] is None): 2699 raise ValueError("Missing the required parameter `account_id` when calling `get_document`") 2700 # verify the required parameter 'document_id' is set 2701 if ('document_id' not in params) or (params['document_id'] is None): 2702 raise ValueError("Missing the required parameter `document_id` when calling `get_document`") 2703 # verify the required parameter 'template_id' is set 2704 if ('template_id' not in params) or (params['template_id'] is None): 2705 raise ValueError("Missing the required parameter `template_id` when calling `get_document`") 2706 2707 2708 collection_formats = {} 2709 2710 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json') 2711 path_params = {} 2712 if 'account_id' in params: 2713 path_params['accountId'] = params['account_id'] 2714 if 'document_id' in params: 2715 path_params['documentId'] = params['document_id'] 2716 if 'template_id' in params: 2717 path_params['templateId'] = params['template_id'] 2718 2719 query_params = {} 2720 if 'encrypt' in params: 2721 query_params['encrypt'] = params['encrypt'] 2722 if 'file_type' in params: 2723 query_params['file_type'] = params['file_type'] 2724 if 'show_changes' in params: 2725 query_params['show_changes'] = params['show_changes'] 2726 2727 header_params = {} 2728 2729 form_params = [] 2730 local_var_files = {} 2731 2732 body_params = None 2733 # HTTP header `Accept` 2734 header_params['Accept'] = self.api_client.\ 2735 select_header_accept(['application/pdf']) 2736 2737 # Authentication setting 2738 auth_settings = [] 2739 2740 return self.api_client.call_api(resource_path, 'GET', 2741 path_params, 2742 query_params, 2743 header_params, 2744 body=body_params, 2745 post_params=form_params, 2746 files=local_var_files, 2747 response_type='file', 2748 auth_settings=auth_settings, 2749 callback=params.get('callback'), 2750 _return_http_data_only=params.get('_return_http_data_only'), 2751 _preload_content=params.get('_preload_content', True), 2752 _request_timeout=params.get('_request_timeout'), 2753 collection_formats=collection_formats)
Gets PDF documents from a template.
Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify combined to retrieve all documents in the template as one pdf.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_document_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
- str encrypt:
- str file_type:
- str show_changes:
Returns
file If the method is called asynchronously, returns the request thread.
2755 def get_document_page_image(self, account_id, document_id, page_number, template_id, **kwargs): 2756 """ 2757 Gets a page image from a template for display. 2758 Retrieves a page image for display from the specified template. 2759 This method makes a synchronous HTTP request by default. To make an 2760 asynchronous HTTP request, please define a `callback` function 2761 to be invoked when receiving the response. 2762 >>> def callback_function(response): 2763 >>> pprint(response) 2764 >>> 2765 >>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function) 2766 2767 :param callback function: The callback function 2768 for asynchronous request. (optional) 2769 :param str account_id: The external account number (int) or account ID Guid. (required) 2770 :param str document_id: The ID of the document being accessed. (required) 2771 :param str page_number: The page number being accessed. (required) 2772 :param str template_id: The ID of the template being accessed. (required) 2773 :param str dpi: 2774 :param str max_height: 2775 :param str max_width: 2776 :param str show_changes: 2777 :return: file 2778 If the method is called asynchronously, 2779 returns the request thread. 2780 """ 2781 kwargs['_return_http_data_only'] = True 2782 if kwargs.get('callback'): 2783 return self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 2784 else: 2785 (data) = self.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 2786 return data
Gets a page image from a template for display.
Retrieves a page image for display from the specified template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_document_page_image(account_id, document_id, page_number, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str page_number: The page number being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
- str dpi:
- str max_height:
- str max_width:
- str show_changes:
Returns
file If the method is called asynchronously, returns the request thread.
2788 def get_document_page_image_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs): 2789 """ 2790 Gets a page image from a template for display. 2791 Retrieves a page image for display from the specified template. 2792 This method makes a synchronous HTTP request by default. To make an 2793 asynchronous HTTP request, please define a `callback` function 2794 to be invoked when receiving the response. 2795 >>> def callback_function(response): 2796 >>> pprint(response) 2797 >>> 2798 >>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function) 2799 2800 :param callback function: The callback function 2801 for asynchronous request. (optional) 2802 :param str account_id: The external account number (int) or account ID Guid. (required) 2803 :param str document_id: The ID of the document being accessed. (required) 2804 :param str page_number: The page number being accessed. (required) 2805 :param str template_id: The ID of the template being accessed. (required) 2806 :param str dpi: 2807 :param str max_height: 2808 :param str max_width: 2809 :param str show_changes: 2810 :return: file 2811 If the method is called asynchronously, 2812 returns the request thread. 2813 """ 2814 2815 all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'dpi', 'max_height', 'max_width', 'show_changes'] 2816 all_params.append('callback') 2817 all_params.append('_return_http_data_only') 2818 all_params.append('_preload_content') 2819 all_params.append('_request_timeout') 2820 2821 params = locals() 2822 for key, val in iteritems(params['kwargs']): 2823 if key not in all_params: 2824 raise TypeError( 2825 "Got an unexpected keyword argument '%s'" 2826 " to method get_document_page_image" % key 2827 ) 2828 params[key] = val 2829 del params['kwargs'] 2830 # verify the required parameter 'account_id' is set 2831 if ('account_id' not in params) or (params['account_id'] is None): 2832 raise ValueError("Missing the required parameter `account_id` when calling `get_document_page_image`") 2833 # verify the required parameter 'document_id' is set 2834 if ('document_id' not in params) or (params['document_id'] is None): 2835 raise ValueError("Missing the required parameter `document_id` when calling `get_document_page_image`") 2836 # verify the required parameter 'page_number' is set 2837 if ('page_number' not in params) or (params['page_number'] is None): 2838 raise ValueError("Missing the required parameter `page_number` when calling `get_document_page_image`") 2839 # verify the required parameter 'template_id' is set 2840 if ('template_id' not in params) or (params['template_id'] is None): 2841 raise ValueError("Missing the required parameter `template_id` when calling `get_document_page_image`") 2842 2843 2844 collection_formats = {} 2845 2846 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json') 2847 path_params = {} 2848 if 'account_id' in params: 2849 path_params['accountId'] = params['account_id'] 2850 if 'document_id' in params: 2851 path_params['documentId'] = params['document_id'] 2852 if 'page_number' in params: 2853 path_params['pageNumber'] = params['page_number'] 2854 if 'template_id' in params: 2855 path_params['templateId'] = params['template_id'] 2856 2857 query_params = {} 2858 if 'dpi' in params: 2859 query_params['dpi'] = params['dpi'] 2860 if 'max_height' in params: 2861 query_params['max_height'] = params['max_height'] 2862 if 'max_width' in params: 2863 query_params['max_width'] = params['max_width'] 2864 if 'show_changes' in params: 2865 query_params['show_changes'] = params['show_changes'] 2866 2867 header_params = {} 2868 2869 form_params = [] 2870 local_var_files = {} 2871 2872 body_params = None 2873 # HTTP header `Accept` 2874 header_params['Accept'] = self.api_client.\ 2875 select_header_accept(['image/png']) 2876 2877 # Authentication setting 2878 auth_settings = [] 2879 2880 return self.api_client.call_api(resource_path, 'GET', 2881 path_params, 2882 query_params, 2883 header_params, 2884 body=body_params, 2885 post_params=form_params, 2886 files=local_var_files, 2887 response_type='file', 2888 auth_settings=auth_settings, 2889 callback=params.get('callback'), 2890 _return_http_data_only=params.get('_return_http_data_only'), 2891 _preload_content=params.get('_preload_content', True), 2892 _request_timeout=params.get('_request_timeout'), 2893 collection_formats=collection_formats)
Gets a page image from a template for display.
Retrieves a page image for display from the specified template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str page_number: The page number being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
- str dpi:
- str max_height:
- str max_width:
- str show_changes:
Returns
file If the method is called asynchronously, returns the request thread.
2895 def get_document_tabs(self, account_id, document_id, template_id, **kwargs): 2896 """ 2897 Returns tabs on the document. 2898 Returns the tabs on the document specified by `documentId` in the template specified by `templateId`. 2899 This method makes a synchronous HTTP request by default. To make an 2900 asynchronous HTTP request, please define a `callback` function 2901 to be invoked when receiving the response. 2902 >>> def callback_function(response): 2903 >>> pprint(response) 2904 >>> 2905 >>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function) 2906 2907 :param callback function: The callback function 2908 for asynchronous request. (optional) 2909 :param str account_id: The external account number (int) or account ID Guid. (required) 2910 :param str document_id: The ID of the document being accessed. (required) 2911 :param str template_id: The ID of the template being accessed. (required) 2912 :param str page_numbers: 2913 :return: Tabs 2914 If the method is called asynchronously, 2915 returns the request thread. 2916 """ 2917 kwargs['_return_http_data_only'] = True 2918 if kwargs.get('callback'): 2919 return self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 2920 else: 2921 (data) = self.get_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 2922 return data
Returns tabs on the document.
Returns the tabs on the document specified by documentId in the template specified by templateId.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_document_tabs(account_id, document_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
- str page_numbers:
Returns
Tabs If the method is called asynchronously, returns the request thread.
2924 def get_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs): 2925 """ 2926 Returns tabs on the document. 2927 Returns the tabs on the document specified by `documentId` in the template specified by `templateId`. 2928 This method makes a synchronous HTTP request by default. To make an 2929 asynchronous HTTP request, please define a `callback` function 2930 to be invoked when receiving the response. 2931 >>> def callback_function(response): 2932 >>> pprint(response) 2933 >>> 2934 >>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function) 2935 2936 :param callback function: The callback function 2937 for asynchronous request. (optional) 2938 :param str account_id: The external account number (int) or account ID Guid. (required) 2939 :param str document_id: The ID of the document being accessed. (required) 2940 :param str template_id: The ID of the template being accessed. (required) 2941 :param str page_numbers: 2942 :return: Tabs 2943 If the method is called asynchronously, 2944 returns the request thread. 2945 """ 2946 2947 all_params = ['account_id', 'document_id', 'template_id', 'page_numbers'] 2948 all_params.append('callback') 2949 all_params.append('_return_http_data_only') 2950 all_params.append('_preload_content') 2951 all_params.append('_request_timeout') 2952 2953 params = locals() 2954 for key, val in iteritems(params['kwargs']): 2955 if key not in all_params: 2956 raise TypeError( 2957 "Got an unexpected keyword argument '%s'" 2958 " to method get_document_tabs" % key 2959 ) 2960 params[key] = val 2961 del params['kwargs'] 2962 # verify the required parameter 'account_id' is set 2963 if ('account_id' not in params) or (params['account_id'] is None): 2964 raise ValueError("Missing the required parameter `account_id` when calling `get_document_tabs`") 2965 # verify the required parameter 'document_id' is set 2966 if ('document_id' not in params) or (params['document_id'] is None): 2967 raise ValueError("Missing the required parameter `document_id` when calling `get_document_tabs`") 2968 # verify the required parameter 'template_id' is set 2969 if ('template_id' not in params) or (params['template_id'] is None): 2970 raise ValueError("Missing the required parameter `template_id` when calling `get_document_tabs`") 2971 2972 2973 collection_formats = {} 2974 2975 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json') 2976 path_params = {} 2977 if 'account_id' in params: 2978 path_params['accountId'] = params['account_id'] 2979 if 'document_id' in params: 2980 path_params['documentId'] = params['document_id'] 2981 if 'template_id' in params: 2982 path_params['templateId'] = params['template_id'] 2983 2984 query_params = {} 2985 if 'page_numbers' in params: 2986 query_params['page_numbers'] = params['page_numbers'] 2987 2988 header_params = {} 2989 2990 form_params = [] 2991 local_var_files = {} 2992 2993 body_params = None 2994 # HTTP header `Accept` 2995 header_params['Accept'] = self.api_client.\ 2996 select_header_accept(['application/json']) 2997 2998 # Authentication setting 2999 auth_settings = [] 3000 3001 return self.api_client.call_api(resource_path, 'GET', 3002 path_params, 3003 query_params, 3004 header_params, 3005 body=body_params, 3006 post_params=form_params, 3007 files=local_var_files, 3008 response_type='Tabs', 3009 auth_settings=auth_settings, 3010 callback=params.get('callback'), 3011 _return_http_data_only=params.get('_return_http_data_only'), 3012 _preload_content=params.get('_preload_content', True), 3013 _request_timeout=params.get('_request_timeout'), 3014 collection_formats=collection_formats)
Returns tabs on the document.
Returns the tabs on the document specified by documentId in the template specified by templateId.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
- str page_numbers:
Returns
Tabs If the method is called asynchronously, returns the request thread.
3016 def get_lock(self, account_id, template_id, **kwargs): 3017 """ 3018 Gets template lock information. 3019 Retrieves general information about the template lock. If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. 3020 This method makes a synchronous HTTP request by default. To make an 3021 asynchronous HTTP request, please define a `callback` function 3022 to be invoked when receiving the response. 3023 >>> def callback_function(response): 3024 >>> pprint(response) 3025 >>> 3026 >>> thread = api.get_lock(account_id, template_id, callback=callback_function) 3027 3028 :param callback function: The callback function 3029 for asynchronous request. (optional) 3030 :param str account_id: The external account number (int) or account ID Guid. (required) 3031 :param str template_id: The ID of the template being accessed. (required) 3032 :return: LockInformation 3033 If the method is called asynchronously, 3034 returns the request thread. 3035 """ 3036 kwargs['_return_http_data_only'] = True 3037 if kwargs.get('callback'): 3038 return self.get_lock_with_http_info(account_id, template_id, **kwargs) 3039 else: 3040 (data) = self.get_lock_with_http_info(account_id, template_id, **kwargs) 3041 return data
Gets template lock information.
Retrieves general information about the template lock. If the call is made by the user who has the lock and the request has the same integrator key as original, then the X-DocuSign-Edit header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the X-DocuSign-Edit header.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_lock(account_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
LockInformation If the method is called asynchronously, returns the request thread.
3043 def get_lock_with_http_info(self, account_id, template_id, **kwargs): 3044 """ 3045 Gets template lock information. 3046 Retrieves general information about the template lock. If the call is made by the user who has the lock and the request has the same integrator key as original, then the `X-DocuSign-Edit` header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the `X-DocuSign-Edit` header. 3047 This method makes a synchronous HTTP request by default. To make an 3048 asynchronous HTTP request, please define a `callback` function 3049 to be invoked when receiving the response. 3050 >>> def callback_function(response): 3051 >>> pprint(response) 3052 >>> 3053 >>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function) 3054 3055 :param callback function: The callback function 3056 for asynchronous request. (optional) 3057 :param str account_id: The external account number (int) or account ID Guid. (required) 3058 :param str template_id: The ID of the template being accessed. (required) 3059 :return: LockInformation 3060 If the method is called asynchronously, 3061 returns the request thread. 3062 """ 3063 3064 all_params = ['account_id', 'template_id'] 3065 all_params.append('callback') 3066 all_params.append('_return_http_data_only') 3067 all_params.append('_preload_content') 3068 all_params.append('_request_timeout') 3069 3070 params = locals() 3071 for key, val in iteritems(params['kwargs']): 3072 if key not in all_params: 3073 raise TypeError( 3074 "Got an unexpected keyword argument '%s'" 3075 " to method get_lock" % key 3076 ) 3077 params[key] = val 3078 del params['kwargs'] 3079 # verify the required parameter 'account_id' is set 3080 if ('account_id' not in params) or (params['account_id'] is None): 3081 raise ValueError("Missing the required parameter `account_id` when calling `get_lock`") 3082 # verify the required parameter 'template_id' is set 3083 if ('template_id' not in params) or (params['template_id'] is None): 3084 raise ValueError("Missing the required parameter `template_id` when calling `get_lock`") 3085 3086 3087 collection_formats = {} 3088 3089 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json') 3090 path_params = {} 3091 if 'account_id' in params: 3092 path_params['accountId'] = params['account_id'] 3093 if 'template_id' in params: 3094 path_params['templateId'] = params['template_id'] 3095 3096 query_params = {} 3097 3098 header_params = {} 3099 3100 form_params = [] 3101 local_var_files = {} 3102 3103 body_params = None 3104 # HTTP header `Accept` 3105 header_params['Accept'] = self.api_client.\ 3106 select_header_accept(['application/json']) 3107 3108 # Authentication setting 3109 auth_settings = [] 3110 3111 return self.api_client.call_api(resource_path, 'GET', 3112 path_params, 3113 query_params, 3114 header_params, 3115 body=body_params, 3116 post_params=form_params, 3117 files=local_var_files, 3118 response_type='LockInformation', 3119 auth_settings=auth_settings, 3120 callback=params.get('callback'), 3121 _return_http_data_only=params.get('_return_http_data_only'), 3122 _preload_content=params.get('_preload_content', True), 3123 _request_timeout=params.get('_request_timeout'), 3124 collection_formats=collection_formats)
Gets template lock information.
Retrieves general information about the template lock. If the call is made by the user who has the lock and the request has the same integrator key as original, then the X-DocuSign-Edit header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the X-DocuSign-Edit header.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_lock_with_http_info(account_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
LockInformation If the method is called asynchronously, returns the request thread.
3126 def get_notification_settings(self, account_id, template_id, **kwargs): 3127 """ 3128 Gets template notification information. 3129 Retrieves the envelope notification, reminders and expirations, information for an existing template. 3130 This method makes a synchronous HTTP request by default. To make an 3131 asynchronous HTTP request, please define a `callback` function 3132 to be invoked when receiving the response. 3133 >>> def callback_function(response): 3134 >>> pprint(response) 3135 >>> 3136 >>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function) 3137 3138 :param callback function: The callback function 3139 for asynchronous request. (optional) 3140 :param str account_id: The external account number (int) or account ID Guid. (required) 3141 :param str template_id: The ID of the template being accessed. (required) 3142 :return: Notification 3143 If the method is called asynchronously, 3144 returns the request thread. 3145 """ 3146 kwargs['_return_http_data_only'] = True 3147 if kwargs.get('callback'): 3148 return self.get_notification_settings_with_http_info(account_id, template_id, **kwargs) 3149 else: 3150 (data) = self.get_notification_settings_with_http_info(account_id, template_id, **kwargs) 3151 return data
Gets template notification information.
Retrieves the envelope notification, reminders and expirations, information for an existing template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_notification_settings(account_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
Notification If the method is called asynchronously, returns the request thread.
3153 def get_notification_settings_with_http_info(self, account_id, template_id, **kwargs): 3154 """ 3155 Gets template notification information. 3156 Retrieves the envelope notification, reminders and expirations, information for an existing template. 3157 This method makes a synchronous HTTP request by default. To make an 3158 asynchronous HTTP request, please define a `callback` function 3159 to be invoked when receiving the response. 3160 >>> def callback_function(response): 3161 >>> pprint(response) 3162 >>> 3163 >>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function) 3164 3165 :param callback function: The callback function 3166 for asynchronous request. (optional) 3167 :param str account_id: The external account number (int) or account ID Guid. (required) 3168 :param str template_id: The ID of the template being accessed. (required) 3169 :return: Notification 3170 If the method is called asynchronously, 3171 returns the request thread. 3172 """ 3173 3174 all_params = ['account_id', 'template_id'] 3175 all_params.append('callback') 3176 all_params.append('_return_http_data_only') 3177 all_params.append('_preload_content') 3178 all_params.append('_request_timeout') 3179 3180 params = locals() 3181 for key, val in iteritems(params['kwargs']): 3182 if key not in all_params: 3183 raise TypeError( 3184 "Got an unexpected keyword argument '%s'" 3185 " to method get_notification_settings" % key 3186 ) 3187 params[key] = val 3188 del params['kwargs'] 3189 # verify the required parameter 'account_id' is set 3190 if ('account_id' not in params) or (params['account_id'] is None): 3191 raise ValueError("Missing the required parameter `account_id` when calling `get_notification_settings`") 3192 # verify the required parameter 'template_id' is set 3193 if ('template_id' not in params) or (params['template_id'] is None): 3194 raise ValueError("Missing the required parameter `template_id` when calling `get_notification_settings`") 3195 3196 3197 collection_formats = {} 3198 3199 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json') 3200 path_params = {} 3201 if 'account_id' in params: 3202 path_params['accountId'] = params['account_id'] 3203 if 'template_id' in params: 3204 path_params['templateId'] = params['template_id'] 3205 3206 query_params = {} 3207 3208 header_params = {} 3209 3210 form_params = [] 3211 local_var_files = {} 3212 3213 body_params = None 3214 # HTTP header `Accept` 3215 header_params['Accept'] = self.api_client.\ 3216 select_header_accept(['application/json']) 3217 3218 # Authentication setting 3219 auth_settings = [] 3220 3221 return self.api_client.call_api(resource_path, 'GET', 3222 path_params, 3223 query_params, 3224 header_params, 3225 body=body_params, 3226 post_params=form_params, 3227 files=local_var_files, 3228 response_type='Notification', 3229 auth_settings=auth_settings, 3230 callback=params.get('callback'), 3231 _return_http_data_only=params.get('_return_http_data_only'), 3232 _preload_content=params.get('_preload_content', True), 3233 _request_timeout=params.get('_request_timeout'), 3234 collection_formats=collection_formats)
Gets template notification information.
Retrieves the envelope notification, reminders and expirations, information for an existing template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_notification_settings_with_http_info(account_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
Notification If the method is called asynchronously, returns the request thread.
3236 def get_page_tabs(self, account_id, document_id, page_number, template_id, **kwargs): 3237 """ 3238 Returns tabs on the specified page. 3239 Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 3240 This method makes a synchronous HTTP request by default. To make an 3241 asynchronous HTTP request, please define a `callback` function 3242 to be invoked when receiving the response. 3243 >>> def callback_function(response): 3244 >>> pprint(response) 3245 >>> 3246 >>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function) 3247 3248 :param callback function: The callback function 3249 for asynchronous request. (optional) 3250 :param str account_id: The external account number (int) or account ID Guid. (required) 3251 :param str document_id: The ID of the document being accessed. (required) 3252 :param str page_number: The page number being accessed. (required) 3253 :param str template_id: The ID of the template being accessed. (required) 3254 :return: Tabs 3255 If the method is called asynchronously, 3256 returns the request thread. 3257 """ 3258 kwargs['_return_http_data_only'] = True 3259 if kwargs.get('callback'): 3260 return self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 3261 else: 3262 (data) = self.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 3263 return data
Returns tabs on the specified page.
Returns the tabs from the page specified by pageNumber of the document specified by documentId in the template specified by templateId.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_page_tabs(account_id, document_id, page_number, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str page_number: The page number being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
Tabs If the method is called asynchronously, returns the request thread.
3265 def get_page_tabs_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs): 3266 """ 3267 Returns tabs on the specified page. 3268 Returns the tabs from the page specified by `pageNumber` of the document specified by `documentId` in the template specified by `templateId`. 3269 This method makes a synchronous HTTP request by default. To make an 3270 asynchronous HTTP request, please define a `callback` function 3271 to be invoked when receiving the response. 3272 >>> def callback_function(response): 3273 >>> pprint(response) 3274 >>> 3275 >>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function) 3276 3277 :param callback function: The callback function 3278 for asynchronous request. (optional) 3279 :param str account_id: The external account number (int) or account ID Guid. (required) 3280 :param str document_id: The ID of the document being accessed. (required) 3281 :param str page_number: The page number being accessed. (required) 3282 :param str template_id: The ID of the template being accessed. (required) 3283 :return: Tabs 3284 If the method is called asynchronously, 3285 returns the request thread. 3286 """ 3287 3288 all_params = ['account_id', 'document_id', 'page_number', 'template_id'] 3289 all_params.append('callback') 3290 all_params.append('_return_http_data_only') 3291 all_params.append('_preload_content') 3292 all_params.append('_request_timeout') 3293 3294 params = locals() 3295 for key, val in iteritems(params['kwargs']): 3296 if key not in all_params: 3297 raise TypeError( 3298 "Got an unexpected keyword argument '%s'" 3299 " to method get_page_tabs" % key 3300 ) 3301 params[key] = val 3302 del params['kwargs'] 3303 # verify the required parameter 'account_id' is set 3304 if ('account_id' not in params) or (params['account_id'] is None): 3305 raise ValueError("Missing the required parameter `account_id` when calling `get_page_tabs`") 3306 # verify the required parameter 'document_id' is set 3307 if ('document_id' not in params) or (params['document_id'] is None): 3308 raise ValueError("Missing the required parameter `document_id` when calling `get_page_tabs`") 3309 # verify the required parameter 'page_number' is set 3310 if ('page_number' not in params) or (params['page_number'] is None): 3311 raise ValueError("Missing the required parameter `page_number` when calling `get_page_tabs`") 3312 # verify the required parameter 'template_id' is set 3313 if ('template_id' not in params) or (params['template_id'] is None): 3314 raise ValueError("Missing the required parameter `template_id` when calling `get_page_tabs`") 3315 3316 3317 collection_formats = {} 3318 3319 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs'.replace('{format}', 'json') 3320 path_params = {} 3321 if 'account_id' in params: 3322 path_params['accountId'] = params['account_id'] 3323 if 'document_id' in params: 3324 path_params['documentId'] = params['document_id'] 3325 if 'page_number' in params: 3326 path_params['pageNumber'] = params['page_number'] 3327 if 'template_id' in params: 3328 path_params['templateId'] = params['template_id'] 3329 3330 query_params = {} 3331 3332 header_params = {} 3333 3334 form_params = [] 3335 local_var_files = {} 3336 3337 body_params = None 3338 # HTTP header `Accept` 3339 header_params['Accept'] = self.api_client.\ 3340 select_header_accept(['application/json']) 3341 3342 # Authentication setting 3343 auth_settings = [] 3344 3345 return self.api_client.call_api(resource_path, 'GET', 3346 path_params, 3347 query_params, 3348 header_params, 3349 body=body_params, 3350 post_params=form_params, 3351 files=local_var_files, 3352 response_type='Tabs', 3353 auth_settings=auth_settings, 3354 callback=params.get('callback'), 3355 _return_http_data_only=params.get('_return_http_data_only'), 3356 _preload_content=params.get('_preload_content', True), 3357 _request_timeout=params.get('_request_timeout'), 3358 collection_formats=collection_formats)
Returns tabs on the specified page.
Returns the tabs from the page specified by pageNumber of the document specified by documentId in the template specified by templateId.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_page_tabs_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str page_number: The page number being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
Tabs If the method is called asynchronously, returns the request thread.
3360 def get_pages(self, account_id, document_id, template_id, **kwargs): 3361 """ 3362 Returns document page image(s) based on input. 3363 Returns images of the pages in a template document for display based on the parameters that you specify. 3364 This method makes a synchronous HTTP request by default. To make an 3365 asynchronous HTTP request, please define a `callback` function 3366 to be invoked when receiving the response. 3367 >>> def callback_function(response): 3368 >>> pprint(response) 3369 >>> 3370 >>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function) 3371 3372 :param callback function: The callback function 3373 for asynchronous request. (optional) 3374 :param str account_id: The external account number (int) or account ID Guid. (required) 3375 :param str document_id: The ID of the document being accessed. (required) 3376 :param str template_id: The ID of the template being accessed. (required) 3377 :param str count: 3378 :param str dpi: 3379 :param str max_height: 3380 :param str max_width: 3381 :param str nocache: 3382 :param str show_changes: 3383 :param str start_position: 3384 :return: PageImages 3385 If the method is called asynchronously, 3386 returns the request thread. 3387 """ 3388 kwargs['_return_http_data_only'] = True 3389 if kwargs.get('callback'): 3390 return self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs) 3391 else: 3392 (data) = self.get_pages_with_http_info(account_id, document_id, template_id, **kwargs) 3393 return data
Returns document page image(s) based on input.
Returns images of the pages in a template document for display based on the parameters that you specify.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_pages(account_id, document_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
- str count:
- str dpi:
- str max_height:
- str max_width:
- str nocache:
- str show_changes:
- str start_position:
Returns
PageImages If the method is called asynchronously, returns the request thread.
3395 def get_pages_with_http_info(self, account_id, document_id, template_id, **kwargs): 3396 """ 3397 Returns document page image(s) based on input. 3398 Returns images of the pages in a template document for display based on the parameters that you specify. 3399 This method makes a synchronous HTTP request by default. To make an 3400 asynchronous HTTP request, please define a `callback` function 3401 to be invoked when receiving the response. 3402 >>> def callback_function(response): 3403 >>> pprint(response) 3404 >>> 3405 >>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function) 3406 3407 :param callback function: The callback function 3408 for asynchronous request. (optional) 3409 :param str account_id: The external account number (int) or account ID Guid. (required) 3410 :param str document_id: The ID of the document being accessed. (required) 3411 :param str template_id: The ID of the template being accessed. (required) 3412 :param str count: 3413 :param str dpi: 3414 :param str max_height: 3415 :param str max_width: 3416 :param str nocache: 3417 :param str show_changes: 3418 :param str start_position: 3419 :return: PageImages 3420 If the method is called asynchronously, 3421 returns the request thread. 3422 """ 3423 3424 all_params = ['account_id', 'document_id', 'template_id', 'count', 'dpi', 'max_height', 'max_width', 'nocache', 'show_changes', 'start_position'] 3425 all_params.append('callback') 3426 all_params.append('_return_http_data_only') 3427 all_params.append('_preload_content') 3428 all_params.append('_request_timeout') 3429 3430 params = locals() 3431 for key, val in iteritems(params['kwargs']): 3432 if key not in all_params: 3433 raise TypeError( 3434 "Got an unexpected keyword argument '%s'" 3435 " to method get_pages" % key 3436 ) 3437 params[key] = val 3438 del params['kwargs'] 3439 # verify the required parameter 'account_id' is set 3440 if ('account_id' not in params) or (params['account_id'] is None): 3441 raise ValueError("Missing the required parameter `account_id` when calling `get_pages`") 3442 # verify the required parameter 'document_id' is set 3443 if ('document_id' not in params) or (params['document_id'] is None): 3444 raise ValueError("Missing the required parameter `document_id` when calling `get_pages`") 3445 # verify the required parameter 'template_id' is set 3446 if ('template_id' not in params) or (params['template_id'] is None): 3447 raise ValueError("Missing the required parameter `template_id` when calling `get_pages`") 3448 3449 3450 collection_formats = {} 3451 3452 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages'.replace('{format}', 'json') 3453 path_params = {} 3454 if 'account_id' in params: 3455 path_params['accountId'] = params['account_id'] 3456 if 'document_id' in params: 3457 path_params['documentId'] = params['document_id'] 3458 if 'template_id' in params: 3459 path_params['templateId'] = params['template_id'] 3460 3461 query_params = {} 3462 if 'count' in params: 3463 query_params['count'] = params['count'] 3464 if 'dpi' in params: 3465 query_params['dpi'] = params['dpi'] 3466 if 'max_height' in params: 3467 query_params['max_height'] = params['max_height'] 3468 if 'max_width' in params: 3469 query_params['max_width'] = params['max_width'] 3470 if 'nocache' in params: 3471 query_params['nocache'] = params['nocache'] 3472 if 'show_changes' in params: 3473 query_params['show_changes'] = params['show_changes'] 3474 if 'start_position' in params: 3475 query_params['start_position'] = params['start_position'] 3476 3477 header_params = {} 3478 3479 form_params = [] 3480 local_var_files = {} 3481 3482 body_params = None 3483 # HTTP header `Accept` 3484 header_params['Accept'] = self.api_client.\ 3485 select_header_accept(['application/json']) 3486 3487 # Authentication setting 3488 auth_settings = [] 3489 3490 return self.api_client.call_api(resource_path, 'GET', 3491 path_params, 3492 query_params, 3493 header_params, 3494 body=body_params, 3495 post_params=form_params, 3496 files=local_var_files, 3497 response_type='PageImages', 3498 auth_settings=auth_settings, 3499 callback=params.get('callback'), 3500 _return_http_data_only=params.get('_return_http_data_only'), 3501 _preload_content=params.get('_preload_content', True), 3502 _request_timeout=params.get('_request_timeout'), 3503 collection_formats=collection_formats)
Returns document page image(s) based on input.
Returns images of the pages in a template document for display based on the parameters that you specify.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_pages_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
- str count:
- str dpi:
- str max_height:
- str max_width:
- str nocache:
- str show_changes:
- str start_position:
Returns
PageImages If the method is called asynchronously, returns the request thread.
3505 def get_template_document_html_definitions(self, account_id, document_id, template_id, **kwargs): 3506 """ 3507 Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template. 3508 3509 This method makes a synchronous HTTP request by default. To make an 3510 asynchronous HTTP request, please define a `callback` function 3511 to be invoked when receiving the response. 3512 >>> def callback_function(response): 3513 >>> pprint(response) 3514 >>> 3515 >>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function) 3516 3517 :param callback function: The callback function 3518 for asynchronous request. (optional) 3519 :param str account_id: The external account number (int) or account ID Guid. (required) 3520 :param str document_id: The ID of the document being accessed. (required) 3521 :param str template_id: The ID of the template being accessed. (required) 3522 :return: DocumentHtmlDefinitionOriginals 3523 If the method is called asynchronously, 3524 returns the request thread. 3525 """ 3526 kwargs['_return_http_data_only'] = True 3527 if kwargs.get('callback'): 3528 return self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs) 3529 else: 3530 (data) = self.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, **kwargs) 3531 return data
Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_template_document_html_definitions(account_id, document_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
DocumentHtmlDefinitionOriginals If the method is called asynchronously, returns the request thread.
3533 def get_template_document_html_definitions_with_http_info(self, account_id, document_id, template_id, **kwargs): 3534 """ 3535 Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template. 3536 3537 This method makes a synchronous HTTP request by default. To make an 3538 asynchronous HTTP request, please define a `callback` function 3539 to be invoked when receiving the response. 3540 >>> def callback_function(response): 3541 >>> pprint(response) 3542 >>> 3543 >>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function) 3544 3545 :param callback function: The callback function 3546 for asynchronous request. (optional) 3547 :param str account_id: The external account number (int) or account ID Guid. (required) 3548 :param str document_id: The ID of the document being accessed. (required) 3549 :param str template_id: The ID of the template being accessed. (required) 3550 :return: DocumentHtmlDefinitionOriginals 3551 If the method is called asynchronously, 3552 returns the request thread. 3553 """ 3554 3555 all_params = ['account_id', 'document_id', 'template_id'] 3556 all_params.append('callback') 3557 all_params.append('_return_http_data_only') 3558 all_params.append('_preload_content') 3559 all_params.append('_request_timeout') 3560 3561 params = locals() 3562 for key, val in iteritems(params['kwargs']): 3563 if key not in all_params: 3564 raise TypeError( 3565 "Got an unexpected keyword argument '%s'" 3566 " to method get_template_document_html_definitions" % key 3567 ) 3568 params[key] = val 3569 del params['kwargs'] 3570 # verify the required parameter 'account_id' is set 3571 if ('account_id' not in params) or (params['account_id'] is None): 3572 raise ValueError("Missing the required parameter `account_id` when calling `get_template_document_html_definitions`") 3573 # verify the required parameter 'document_id' is set 3574 if ('document_id' not in params) or (params['document_id'] is None): 3575 raise ValueError("Missing the required parameter `document_id` when calling `get_template_document_html_definitions`") 3576 # verify the required parameter 'template_id' is set 3577 if ('template_id' not in params) or (params['template_id'] is None): 3578 raise ValueError("Missing the required parameter `template_id` when calling `get_template_document_html_definitions`") 3579 3580 3581 collection_formats = {} 3582 3583 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions'.replace('{format}', 'json') 3584 path_params = {} 3585 if 'account_id' in params: 3586 path_params['accountId'] = params['account_id'] 3587 if 'document_id' in params: 3588 path_params['documentId'] = params['document_id'] 3589 if 'template_id' in params: 3590 path_params['templateId'] = params['template_id'] 3591 3592 query_params = {} 3593 3594 header_params = {} 3595 3596 form_params = [] 3597 local_var_files = {} 3598 3599 body_params = None 3600 # HTTP header `Accept` 3601 header_params['Accept'] = self.api_client.\ 3602 select_header_accept(['application/json']) 3603 3604 # Authentication setting 3605 auth_settings = [] 3606 3607 return self.api_client.call_api(resource_path, 'GET', 3608 path_params, 3609 query_params, 3610 header_params, 3611 body=body_params, 3612 post_params=form_params, 3613 files=local_var_files, 3614 response_type='DocumentHtmlDefinitionOriginals', 3615 auth_settings=auth_settings, 3616 callback=params.get('callback'), 3617 _return_http_data_only=params.get('_return_http_data_only'), 3618 _preload_content=params.get('_preload_content', True), 3619 _request_timeout=params.get('_request_timeout'), 3620 collection_formats=collection_formats)
Get the Original HTML Definition used to generate the Responsive HTML for a given document in a template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_template_document_html_definitions_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
DocumentHtmlDefinitionOriginals If the method is called asynchronously, returns the request thread.
3622 def get_template_html_definitions(self, account_id, template_id, **kwargs): 3623 """ 3624 Get the Original HTML Definition used to generate the Responsive HTML for the template. 3625 3626 This method makes a synchronous HTTP request by default. To make an 3627 asynchronous HTTP request, please define a `callback` function 3628 to be invoked when receiving the response. 3629 >>> def callback_function(response): 3630 >>> pprint(response) 3631 >>> 3632 >>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function) 3633 3634 :param callback function: The callback function 3635 for asynchronous request. (optional) 3636 :param str account_id: The external account number (int) or account ID Guid. (required) 3637 :param str template_id: The ID of the template being accessed. (required) 3638 :return: DocumentHtmlDefinitionOriginals 3639 If the method is called asynchronously, 3640 returns the request thread. 3641 """ 3642 kwargs['_return_http_data_only'] = True 3643 if kwargs.get('callback'): 3644 return self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs) 3645 else: 3646 (data) = self.get_template_html_definitions_with_http_info(account_id, template_id, **kwargs) 3647 return data
Get the Original HTML Definition used to generate the Responsive HTML for the template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_template_html_definitions(account_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
DocumentHtmlDefinitionOriginals If the method is called asynchronously, returns the request thread.
3649 def get_template_html_definitions_with_http_info(self, account_id, template_id, **kwargs): 3650 """ 3651 Get the Original HTML Definition used to generate the Responsive HTML for the template. 3652 3653 This method makes a synchronous HTTP request by default. To make an 3654 asynchronous HTTP request, please define a `callback` function 3655 to be invoked when receiving the response. 3656 >>> def callback_function(response): 3657 >>> pprint(response) 3658 >>> 3659 >>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function) 3660 3661 :param callback function: The callback function 3662 for asynchronous request. (optional) 3663 :param str account_id: The external account number (int) or account ID Guid. (required) 3664 :param str template_id: The ID of the template being accessed. (required) 3665 :return: DocumentHtmlDefinitionOriginals 3666 If the method is called asynchronously, 3667 returns the request thread. 3668 """ 3669 3670 all_params = ['account_id', 'template_id'] 3671 all_params.append('callback') 3672 all_params.append('_return_http_data_only') 3673 all_params.append('_preload_content') 3674 all_params.append('_request_timeout') 3675 3676 params = locals() 3677 for key, val in iteritems(params['kwargs']): 3678 if key not in all_params: 3679 raise TypeError( 3680 "Got an unexpected keyword argument '%s'" 3681 " to method get_template_html_definitions" % key 3682 ) 3683 params[key] = val 3684 del params['kwargs'] 3685 # verify the required parameter 'account_id' is set 3686 if ('account_id' not in params) or (params['account_id'] is None): 3687 raise ValueError("Missing the required parameter `account_id` when calling `get_template_html_definitions`") 3688 # verify the required parameter 'template_id' is set 3689 if ('template_id' not in params) or (params['template_id'] is None): 3690 raise ValueError("Missing the required parameter `template_id` when calling `get_template_html_definitions`") 3691 3692 3693 collection_formats = {} 3694 3695 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions'.replace('{format}', 'json') 3696 path_params = {} 3697 if 'account_id' in params: 3698 path_params['accountId'] = params['account_id'] 3699 if 'template_id' in params: 3700 path_params['templateId'] = params['template_id'] 3701 3702 query_params = {} 3703 3704 header_params = {} 3705 3706 form_params = [] 3707 local_var_files = {} 3708 3709 body_params = None 3710 # HTTP header `Accept` 3711 header_params['Accept'] = self.api_client.\ 3712 select_header_accept(['application/json']) 3713 3714 # Authentication setting 3715 auth_settings = [] 3716 3717 return self.api_client.call_api(resource_path, 'GET', 3718 path_params, 3719 query_params, 3720 header_params, 3721 body=body_params, 3722 post_params=form_params, 3723 files=local_var_files, 3724 response_type='DocumentHtmlDefinitionOriginals', 3725 auth_settings=auth_settings, 3726 callback=params.get('callback'), 3727 _return_http_data_only=params.get('_return_http_data_only'), 3728 _preload_content=params.get('_preload_content', True), 3729 _request_timeout=params.get('_request_timeout'), 3730 collection_formats=collection_formats)
Get the Original HTML Definition used to generate the Responsive HTML for the template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.get_template_html_definitions_with_http_info(account_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
DocumentHtmlDefinitionOriginals If the method is called asynchronously, returns the request thread.
3732 def list_custom_fields(self, account_id, template_id, **kwargs): 3733 """ 3734 Gets the custom document fields from a template. 3735 Retrieves the custom document field information from an existing template. 3736 This method makes a synchronous HTTP request by default. To make an 3737 asynchronous HTTP request, please define a `callback` function 3738 to be invoked when receiving the response. 3739 >>> def callback_function(response): 3740 >>> pprint(response) 3741 >>> 3742 >>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function) 3743 3744 :param callback function: The callback function 3745 for asynchronous request. (optional) 3746 :param str account_id: The external account number (int) or account ID Guid. (required) 3747 :param str template_id: The ID of the template being accessed. (required) 3748 :return: CustomFields 3749 If the method is called asynchronously, 3750 returns the request thread. 3751 """ 3752 kwargs['_return_http_data_only'] = True 3753 if kwargs.get('callback'): 3754 return self.list_custom_fields_with_http_info(account_id, template_id, **kwargs) 3755 else: 3756 (data) = self.list_custom_fields_with_http_info(account_id, template_id, **kwargs) 3757 return data
Gets the custom document fields from a template.
Retrieves the custom document field information from an existing template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_custom_fields(account_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
CustomFields If the method is called asynchronously, returns the request thread.
3759 def list_custom_fields_with_http_info(self, account_id, template_id, **kwargs): 3760 """ 3761 Gets the custom document fields from a template. 3762 Retrieves the custom document field information from an existing template. 3763 This method makes a synchronous HTTP request by default. To make an 3764 asynchronous HTTP request, please define a `callback` function 3765 to be invoked when receiving the response. 3766 >>> def callback_function(response): 3767 >>> pprint(response) 3768 >>> 3769 >>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function) 3770 3771 :param callback function: The callback function 3772 for asynchronous request. (optional) 3773 :param str account_id: The external account number (int) or account ID Guid. (required) 3774 :param str template_id: The ID of the template being accessed. (required) 3775 :return: CustomFields 3776 If the method is called asynchronously, 3777 returns the request thread. 3778 """ 3779 3780 all_params = ['account_id', 'template_id'] 3781 all_params.append('callback') 3782 all_params.append('_return_http_data_only') 3783 all_params.append('_preload_content') 3784 all_params.append('_request_timeout') 3785 3786 params = locals() 3787 for key, val in iteritems(params['kwargs']): 3788 if key not in all_params: 3789 raise TypeError( 3790 "Got an unexpected keyword argument '%s'" 3791 " to method list_custom_fields" % key 3792 ) 3793 params[key] = val 3794 del params['kwargs'] 3795 # verify the required parameter 'account_id' is set 3796 if ('account_id' not in params) or (params['account_id'] is None): 3797 raise ValueError("Missing the required parameter `account_id` when calling `list_custom_fields`") 3798 # verify the required parameter 'template_id' is set 3799 if ('template_id' not in params) or (params['template_id'] is None): 3800 raise ValueError("Missing the required parameter `template_id` when calling `list_custom_fields`") 3801 3802 3803 collection_formats = {} 3804 3805 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json') 3806 path_params = {} 3807 if 'account_id' in params: 3808 path_params['accountId'] = params['account_id'] 3809 if 'template_id' in params: 3810 path_params['templateId'] = params['template_id'] 3811 3812 query_params = {} 3813 3814 header_params = {} 3815 3816 form_params = [] 3817 local_var_files = {} 3818 3819 body_params = None 3820 # HTTP header `Accept` 3821 header_params['Accept'] = self.api_client.\ 3822 select_header_accept(['application/json']) 3823 3824 # Authentication setting 3825 auth_settings = [] 3826 3827 return self.api_client.call_api(resource_path, 'GET', 3828 path_params, 3829 query_params, 3830 header_params, 3831 body=body_params, 3832 post_params=form_params, 3833 files=local_var_files, 3834 response_type='CustomFields', 3835 auth_settings=auth_settings, 3836 callback=params.get('callback'), 3837 _return_http_data_only=params.get('_return_http_data_only'), 3838 _preload_content=params.get('_preload_content', True), 3839 _request_timeout=params.get('_request_timeout'), 3840 collection_formats=collection_formats)
Gets the custom document fields from a template.
Retrieves the custom document field information from an existing template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_custom_fields_with_http_info(account_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
CustomFields If the method is called asynchronously, returns the request thread.
3842 def list_document_fields(self, account_id, document_id, template_id, **kwargs): 3843 """ 3844 Gets the custom document fields for a an existing template document. 3845 Retrieves the custom document fields for an existing template document. 3846 This method makes a synchronous HTTP request by default. To make an 3847 asynchronous HTTP request, please define a `callback` function 3848 to be invoked when receiving the response. 3849 >>> def callback_function(response): 3850 >>> pprint(response) 3851 >>> 3852 >>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function) 3853 3854 :param callback function: The callback function 3855 for asynchronous request. (optional) 3856 :param str account_id: The external account number (int) or account ID Guid. (required) 3857 :param str document_id: The ID of the document being accessed. (required) 3858 :param str template_id: The ID of the template being accessed. (required) 3859 :return: DocumentFieldsInformation 3860 If the method is called asynchronously, 3861 returns the request thread. 3862 """ 3863 kwargs['_return_http_data_only'] = True 3864 if kwargs.get('callback'): 3865 return self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 3866 else: 3867 (data) = self.list_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 3868 return data
Gets the custom document fields for a an existing template document.
Retrieves the custom document fields for an existing template document.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_document_fields(account_id, document_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
DocumentFieldsInformation If the method is called asynchronously, returns the request thread.
3870 def list_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs): 3871 """ 3872 Gets the custom document fields for a an existing template document. 3873 Retrieves the custom document fields for an existing template document. 3874 This method makes a synchronous HTTP request by default. To make an 3875 asynchronous HTTP request, please define a `callback` function 3876 to be invoked when receiving the response. 3877 >>> def callback_function(response): 3878 >>> pprint(response) 3879 >>> 3880 >>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function) 3881 3882 :param callback function: The callback function 3883 for asynchronous request. (optional) 3884 :param str account_id: The external account number (int) or account ID Guid. (required) 3885 :param str document_id: The ID of the document being accessed. (required) 3886 :param str template_id: The ID of the template being accessed. (required) 3887 :return: DocumentFieldsInformation 3888 If the method is called asynchronously, 3889 returns the request thread. 3890 """ 3891 3892 all_params = ['account_id', 'document_id', 'template_id'] 3893 all_params.append('callback') 3894 all_params.append('_return_http_data_only') 3895 all_params.append('_preload_content') 3896 all_params.append('_request_timeout') 3897 3898 params = locals() 3899 for key, val in iteritems(params['kwargs']): 3900 if key not in all_params: 3901 raise TypeError( 3902 "Got an unexpected keyword argument '%s'" 3903 " to method list_document_fields" % key 3904 ) 3905 params[key] = val 3906 del params['kwargs'] 3907 # verify the required parameter 'account_id' is set 3908 if ('account_id' not in params) or (params['account_id'] is None): 3909 raise ValueError("Missing the required parameter `account_id` when calling `list_document_fields`") 3910 # verify the required parameter 'document_id' is set 3911 if ('document_id' not in params) or (params['document_id'] is None): 3912 raise ValueError("Missing the required parameter `document_id` when calling `list_document_fields`") 3913 # verify the required parameter 'template_id' is set 3914 if ('template_id' not in params) or (params['template_id'] is None): 3915 raise ValueError("Missing the required parameter `template_id` when calling `list_document_fields`") 3916 3917 3918 collection_formats = {} 3919 3920 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json') 3921 path_params = {} 3922 if 'account_id' in params: 3923 path_params['accountId'] = params['account_id'] 3924 if 'document_id' in params: 3925 path_params['documentId'] = params['document_id'] 3926 if 'template_id' in params: 3927 path_params['templateId'] = params['template_id'] 3928 3929 query_params = {} 3930 3931 header_params = {} 3932 3933 form_params = [] 3934 local_var_files = {} 3935 3936 body_params = None 3937 # HTTP header `Accept` 3938 header_params['Accept'] = self.api_client.\ 3939 select_header_accept(['application/json']) 3940 3941 # Authentication setting 3942 auth_settings = [] 3943 3944 return self.api_client.call_api(resource_path, 'GET', 3945 path_params, 3946 query_params, 3947 header_params, 3948 body=body_params, 3949 post_params=form_params, 3950 files=local_var_files, 3951 response_type='DocumentFieldsInformation', 3952 auth_settings=auth_settings, 3953 callback=params.get('callback'), 3954 _return_http_data_only=params.get('_return_http_data_only'), 3955 _preload_content=params.get('_preload_content', True), 3956 _request_timeout=params.get('_request_timeout'), 3957 collection_formats=collection_formats)
Gets the custom document fields for a an existing template document.
Retrieves the custom document fields for an existing template document.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str document_id: The ID of the document being accessed. (required)
- str template_id: The ID of the template being accessed. (required)
Returns
DocumentFieldsInformation If the method is called asynchronously, returns the request thread.
3959 def list_documents(self, account_id, template_id, **kwargs): 3960 """ 3961 Gets a list of documents associated with a template. 3962 Retrieves a list of documents associated with the specified template. 3963 This method makes a synchronous HTTP request by default. To make an 3964 asynchronous HTTP request, please define a `callback` function 3965 to be invoked when receiving the response. 3966 >>> def callback_function(response): 3967 >>> pprint(response) 3968 >>> 3969 >>> thread = api.list_documents(account_id, template_id, callback=callback_function) 3970 3971 :param callback function: The callback function 3972 for asynchronous request. (optional) 3973 :param str account_id: The external account number (int) or account ID Guid. (required) 3974 :param str template_id: The ID of the template being accessed. (required) 3975 :param str include_agreement_type: 3976 :param str include_tabs: 3977 :return: TemplateDocumentsResult 3978 If the method is called asynchronously, 3979 returns the request thread. 3980 """ 3981 kwargs['_return_http_data_only'] = True 3982 if kwargs.get('callback'): 3983 return self.list_documents_with_http_info(account_id, template_id, **kwargs) 3984 else: 3985 (data) = self.list_documents_with_http_info(account_id, template_id, **kwargs) 3986 return data
Gets a list of documents associated with a template.
Retrieves a list of documents associated with the specified template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_documents(account_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str template_id: The ID of the template being accessed. (required)
- str include_agreement_type:
- str include_tabs:
Returns
TemplateDocumentsResult If the method is called asynchronously, returns the request thread.
3988 def list_documents_with_http_info(self, account_id, template_id, **kwargs): 3989 """ 3990 Gets a list of documents associated with a template. 3991 Retrieves a list of documents associated with the specified template. 3992 This method makes a synchronous HTTP request by default. To make an 3993 asynchronous HTTP request, please define a `callback` function 3994 to be invoked when receiving the response. 3995 >>> def callback_function(response): 3996 >>> pprint(response) 3997 >>> 3998 >>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function) 3999 4000 :param callback function: The callback function 4001 for asynchronous request. (optional) 4002 :param str account_id: The external account number (int) or account ID Guid. (required) 4003 :param str template_id: The ID of the template being accessed. (required) 4004 :param str include_agreement_type: 4005 :param str include_tabs: 4006 :return: TemplateDocumentsResult 4007 If the method is called asynchronously, 4008 returns the request thread. 4009 """ 4010 4011 all_params = ['account_id', 'template_id', 'include_agreement_type', 'include_tabs'] 4012 all_params.append('callback') 4013 all_params.append('_return_http_data_only') 4014 all_params.append('_preload_content') 4015 all_params.append('_request_timeout') 4016 4017 params = locals() 4018 for key, val in iteritems(params['kwargs']): 4019 if key not in all_params: 4020 raise TypeError( 4021 "Got an unexpected keyword argument '%s'" 4022 " to method list_documents" % key 4023 ) 4024 params[key] = val 4025 del params['kwargs'] 4026 # verify the required parameter 'account_id' is set 4027 if ('account_id' not in params) or (params['account_id'] is None): 4028 raise ValueError("Missing the required parameter `account_id` when calling `list_documents`") 4029 # verify the required parameter 'template_id' is set 4030 if ('template_id' not in params) or (params['template_id'] is None): 4031 raise ValueError("Missing the required parameter `template_id` when calling `list_documents`") 4032 4033 4034 collection_formats = {} 4035 4036 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json') 4037 path_params = {} 4038 if 'account_id' in params: 4039 path_params['accountId'] = params['account_id'] 4040 if 'template_id' in params: 4041 path_params['templateId'] = params['template_id'] 4042 4043 query_params = {} 4044 if 'include_agreement_type' in params: 4045 query_params['include_agreement_type'] = params['include_agreement_type'] 4046 if 'include_tabs' in params: 4047 query_params['include_tabs'] = params['include_tabs'] 4048 4049 header_params = {} 4050 4051 form_params = [] 4052 local_var_files = {} 4053 4054 body_params = None 4055 # HTTP header `Accept` 4056 header_params['Accept'] = self.api_client.\ 4057 select_header_accept(['application/json']) 4058 4059 # Authentication setting 4060 auth_settings = [] 4061 4062 return self.api_client.call_api(resource_path, 'GET', 4063 path_params, 4064 query_params, 4065 header_params, 4066 body=body_params, 4067 post_params=form_params, 4068 files=local_var_files, 4069 response_type='TemplateDocumentsResult', 4070 auth_settings=auth_settings, 4071 callback=params.get('callback'), 4072 _return_http_data_only=params.get('_return_http_data_only'), 4073 _preload_content=params.get('_preload_content', True), 4074 _request_timeout=params.get('_request_timeout'), 4075 collection_formats=collection_formats)
Gets a list of documents associated with a template.
Retrieves a list of documents associated with the specified template.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.list_documents_with_http_info(account_id, template_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- str template_id: The ID of the template being accessed. (required)
- str include_agreement_type:
- str include_tabs:
Returns
TemplateDocumentsResult If the method is called asynchronously, returns the request thread.
4077 def list_recipients(self, account_id, template_id, **kwargs): 4078 """ 4079 Gets recipient information from a template. 4080 Retrieves the information for all recipients in the specified template. 4081 This method makes a synchronous HTTP request by default. To make an 4082 asynchronous HTTP request, please define a `callback` function 4083 to be invoked when receiving the response. 4084 >>> def callback_function(response): 4085 >>> pprint(response) 4086 >>> 4087 >>> thread = api.list_recipients(account_id, template_id, callback=callback_function) 4088 4089 :param callback function: The callback function 4090 for asynchronous request. (optional) 4091 :param str account_id: The external account number (int) or account ID Guid. (required) 4092 :param str template_id: The ID of the template being accessed. (required) 4093 :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. 4094 :param str include_extended: When set to **true**, the extended properties are included in the response. 4095 :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response. 4096 :return: Recipients 4097 If the method is called asynchronously, 4098 returns the request thread. 4099 """ 4100 kwargs['_return_http_data_only'] = True 4101 if kwargs.get('callback'): 4102 return self.list_recipients_with_http_info(account_id, template_id, **kwargs) 4103 else: 4104 (data) = self.list_recipients_with_http_info(account_id, template_id, **kwargs) 4105 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_tabsis 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.
4107 def list_recipients_with_http_info(self, account_id, template_id, **kwargs): 4108 """ 4109 Gets recipient information from a template. 4110 Retrieves the information for all recipients in the specified template. 4111 This method makes a synchronous HTTP request by default. To make an 4112 asynchronous HTTP request, please define a `callback` function 4113 to be invoked when receiving the response. 4114 >>> def callback_function(response): 4115 >>> pprint(response) 4116 >>> 4117 >>> thread = api.list_recipients_with_http_info(account_id, template_id, callback=callback_function) 4118 4119 :param callback function: The callback function 4120 for asynchronous request. (optional) 4121 :param str account_id: The external account number (int) or account ID Guid. (required) 4122 :param str template_id: The ID of the template being accessed. (required) 4123 :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. 4124 :param str include_extended: When set to **true**, the extended properties are included in the response. 4125 :param str include_tabs: When set to **true**, the tab information associated with the recipient is included in the response. 4126 :return: Recipients 4127 If the method is called asynchronously, 4128 returns the request thread. 4129 """ 4130 4131 all_params = ['account_id', 'template_id', 'include_anchor_tab_locations', 'include_extended', 'include_tabs'] 4132 all_params.append('callback') 4133 all_params.append('_return_http_data_only') 4134 all_params.append('_preload_content') 4135 all_params.append('_request_timeout') 4136 4137 params = locals() 4138 for key, val in iteritems(params['kwargs']): 4139 if key not in all_params: 4140 raise TypeError( 4141 "Got an unexpected keyword argument '%s'" 4142 " to method list_recipients" % key 4143 ) 4144 params[key] = val 4145 del params['kwargs'] 4146 # verify the required parameter 'account_id' is set 4147 if ('account_id' not in params) or (params['account_id'] is None): 4148 raise ValueError("Missing the required parameter `account_id` when calling `list_recipients`") 4149 # verify the required parameter 'template_id' is set 4150 if ('template_id' not in params) or (params['template_id'] is None): 4151 raise ValueError("Missing the required parameter `template_id` when calling `list_recipients`") 4152 4153 4154 collection_formats = {} 4155 4156 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json') 4157 path_params = {} 4158 if 'account_id' in params: 4159 path_params['accountId'] = params['account_id'] 4160 if 'template_id' in params: 4161 path_params['templateId'] = params['template_id'] 4162 4163 query_params = {} 4164 if 'include_anchor_tab_locations' in params: 4165 query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations'] 4166 if 'include_extended' in params: 4167 query_params['include_extended'] = params['include_extended'] 4168 if 'include_tabs' in params: 4169 query_params['include_tabs'] = params['include_tabs'] 4170 4171 header_params = {} 4172 4173 form_params = [] 4174 local_var_files = {} 4175 4176 body_params = None 4177 # HTTP header `Accept` 4178 header_params['Accept'] = self.api_client.\ 4179 select_header_accept(['application/json']) 4180 4181 # Authentication setting 4182 auth_settings = [] 4183 4184 return self.api_client.call_api(resource_path, 'GET', 4185 path_params, 4186 query_params, 4187 header_params, 4188 body=body_params, 4189 post_params=form_params, 4190 files=local_var_files, 4191 response_type='Recipients', 4192 auth_settings=auth_settings, 4193 callback=params.get('callback'), 4194 _return_http_data_only=params.get('_return_http_data_only'), 4195 _preload_content=params.get('_preload_content', True), 4196 _request_timeout=params.get('_request_timeout'), 4197 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_tabsis 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.
4199 def list_tabs(self, account_id, recipient_id, template_id, **kwargs): 4200 """ 4201 Gets the tabs information for a signer or sign-in-person recipient in a template. 4202 Gets the tabs information for a signer or sign-in-person recipient in a template. 4203 This method makes a synchronous HTTP request by default. To make an 4204 asynchronous HTTP request, please define a `callback` function 4205 to be invoked when receiving the response. 4206 >>> def callback_function(response): 4207 >>> pprint(response) 4208 >>> 4209 >>> thread = api.list_tabs(account_id, recipient_id, template_id, callback=callback_function) 4210 4211 :param callback function: The callback function 4212 for asynchronous request. (optional) 4213 :param str account_id: The external account number (int) or account ID Guid. (required) 4214 :param str recipient_id: The ID of the recipient being accessed. (required) 4215 :param str template_id: The ID of the template being accessed. (required) 4216 :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 4217 :param str include_metadata: 4218 :return: Tabs 4219 If the method is called asynchronously, 4220 returns the request thread. 4221 """ 4222 kwargs['_return_http_data_only'] = True 4223 if kwargs.get('callback'): 4224 return self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 4225 else: 4226 (data) = self.list_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 4227 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.
4229 def list_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs): 4230 """ 4231 Gets the tabs information for a signer or sign-in-person recipient in a template. 4232 Gets the tabs information for a signer or sign-in-person recipient in a template. 4233 This method makes a synchronous HTTP request by default. To make an 4234 asynchronous HTTP request, please define a `callback` function 4235 to be invoked when receiving the response. 4236 >>> def callback_function(response): 4237 >>> pprint(response) 4238 >>> 4239 >>> thread = api.list_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function) 4240 4241 :param callback function: The callback function 4242 for asynchronous request. (optional) 4243 :param str account_id: The external account number (int) or account ID Guid. (required) 4244 :param str recipient_id: The ID of the recipient being accessed. (required) 4245 :param str template_id: The ID of the template being accessed. (required) 4246 :param str include_anchor_tab_locations: When set to **true**, all tabs with anchor tab properties are included in the response. 4247 :param str include_metadata: 4248 :return: Tabs 4249 If the method is called asynchronously, 4250 returns the request thread. 4251 """ 4252 4253 all_params = ['account_id', 'recipient_id', 'template_id', 'include_anchor_tab_locations', 'include_metadata'] 4254 all_params.append('callback') 4255 all_params.append('_return_http_data_only') 4256 all_params.append('_preload_content') 4257 all_params.append('_request_timeout') 4258 4259 params = locals() 4260 for key, val in iteritems(params['kwargs']): 4261 if key not in all_params: 4262 raise TypeError( 4263 "Got an unexpected keyword argument '%s'" 4264 " to method list_tabs" % key 4265 ) 4266 params[key] = val 4267 del params['kwargs'] 4268 # verify the required parameter 'account_id' is set 4269 if ('account_id' not in params) or (params['account_id'] is None): 4270 raise ValueError("Missing the required parameter `account_id` when calling `list_tabs`") 4271 # verify the required parameter 'recipient_id' is set 4272 if ('recipient_id' not in params) or (params['recipient_id'] is None): 4273 raise ValueError("Missing the required parameter `recipient_id` when calling `list_tabs`") 4274 # verify the required parameter 'template_id' is set 4275 if ('template_id' not in params) or (params['template_id'] is None): 4276 raise ValueError("Missing the required parameter `template_id` when calling `list_tabs`") 4277 4278 4279 collection_formats = {} 4280 4281 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json') 4282 path_params = {} 4283 if 'account_id' in params: 4284 path_params['accountId'] = params['account_id'] 4285 if 'recipient_id' in params: 4286 path_params['recipientId'] = params['recipient_id'] 4287 if 'template_id' in params: 4288 path_params['templateId'] = params['template_id'] 4289 4290 query_params = {} 4291 if 'include_anchor_tab_locations' in params: 4292 query_params['include_anchor_tab_locations'] = params['include_anchor_tab_locations'] 4293 if 'include_metadata' in params: 4294 query_params['include_metadata'] = params['include_metadata'] 4295 4296 header_params = {} 4297 4298 form_params = [] 4299 local_var_files = {} 4300 4301 body_params = None 4302 # HTTP header `Accept` 4303 header_params['Accept'] = self.api_client.\ 4304 select_header_accept(['application/json']) 4305 4306 # Authentication setting 4307 auth_settings = [] 4308 4309 return self.api_client.call_api(resource_path, 'GET', 4310 path_params, 4311 query_params, 4312 header_params, 4313 body=body_params, 4314 post_params=form_params, 4315 files=local_var_files, 4316 response_type='Tabs', 4317 auth_settings=auth_settings, 4318 callback=params.get('callback'), 4319 _return_http_data_only=params.get('_return_http_data_only'), 4320 _preload_content=params.get('_preload_content', True), 4321 _request_timeout=params.get('_request_timeout'), 4322 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.
4324 def list_templates(self, account_id, **kwargs): 4325 """ 4326 Gets the definition of a template. 4327 Retrieves the list of templates for the specified account. The request can be limited to a specific folder. 4328 This method makes a synchronous HTTP request by default. To make an 4329 asynchronous HTTP request, please define a `callback` function 4330 to be invoked when receiving the response. 4331 >>> def callback_function(response): 4332 >>> pprint(response) 4333 >>> 4334 >>> thread = api.list_templates(account_id, callback=callback_function) 4335 4336 :param callback function: The callback function 4337 for asynchronous request. (optional) 4338 :param str account_id: The external account number (int) or account ID Guid. (required) 4339 :param str count: Number of records to return in the cache. 4340 :param str created_from_date: 4341 :param str created_to_date: 4342 :param str folder_ids: A comma separated list of folder ID GUIDs. 4343 :param str folder_types: 4344 :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. 4345 :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. 4346 :param str is_deleted_template_only: 4347 :param str is_download: 4348 :param str modified_from_date: 4349 :param str modified_to_date: 4350 :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) 4351 :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. 4352 :param str search_fields: 4353 :param str search_text: The search text used to search the names of templates. 4354 :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. 4355 :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). 4356 :param str template_ids: 4357 :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. 4358 :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. 4359 :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. 4360 :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. 4361 :param str user_id: 4362 :return: EnvelopeTemplateResults 4363 If the method is called asynchronously, 4364 returns the request thread. 4365 """ 4366 kwargs['_return_http_data_only'] = True 4367 if kwargs.get('callback'): 4368 return self.list_templates_with_http_info(account_id, **kwargs) 4369 else: 4370 (data) = self.list_templates_with_http_info(account_id, **kwargs) 4371 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.
4373 def list_templates_with_http_info(self, account_id, **kwargs): 4374 """ 4375 Gets the definition of a template. 4376 Retrieves the list of templates for the specified account. The request can be limited to a specific folder. 4377 This method makes a synchronous HTTP request by default. To make an 4378 asynchronous HTTP request, please define a `callback` function 4379 to be invoked when receiving the response. 4380 >>> def callback_function(response): 4381 >>> pprint(response) 4382 >>> 4383 >>> thread = api.list_templates_with_http_info(account_id, callback=callback_function) 4384 4385 :param callback function: The callback function 4386 for asynchronous request. (optional) 4387 :param str account_id: The external account number (int) or account ID Guid. (required) 4388 :param str count: Number of records to return in the cache. 4389 :param str created_from_date: 4390 :param str created_to_date: 4391 :param str folder_ids: A comma separated list of folder ID GUIDs. 4392 :param str folder_types: 4393 :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. 4394 :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. 4395 :param str is_deleted_template_only: 4396 :param str is_download: 4397 :param str modified_from_date: 4398 :param str modified_to_date: 4399 :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) 4400 :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. 4401 :param str search_fields: 4402 :param str search_text: The search text used to search the names of templates. 4403 :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. 4404 :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). 4405 :param str template_ids: 4406 :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. 4407 :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. 4408 :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. 4409 :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. 4410 :param str user_id: 4411 :return: EnvelopeTemplateResults 4412 If the method is called asynchronously, 4413 returns the request thread. 4414 """ 4415 4416 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'] 4417 all_params.append('callback') 4418 all_params.append('_return_http_data_only') 4419 all_params.append('_preload_content') 4420 all_params.append('_request_timeout') 4421 4422 params = locals() 4423 for key, val in iteritems(params['kwargs']): 4424 if key not in all_params: 4425 raise TypeError( 4426 "Got an unexpected keyword argument '%s'" 4427 " to method list_templates" % key 4428 ) 4429 params[key] = val 4430 del params['kwargs'] 4431 # verify the required parameter 'account_id' is set 4432 if ('account_id' not in params) or (params['account_id'] is None): 4433 raise ValueError("Missing the required parameter `account_id` when calling `list_templates`") 4434 4435 4436 collection_formats = {} 4437 4438 resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json') 4439 path_params = {} 4440 if 'account_id' in params: 4441 path_params['accountId'] = params['account_id'] 4442 4443 query_params = {} 4444 if 'count' in params: 4445 query_params['count'] = params['count'] 4446 if 'created_from_date' in params: 4447 query_params['created_from_date'] = params['created_from_date'] 4448 if 'created_to_date' in params: 4449 query_params['created_to_date'] = params['created_to_date'] 4450 if 'folder_ids' in params: 4451 query_params['folder_ids'] = params['folder_ids'] 4452 if 'folder_types' in params: 4453 query_params['folder_types'] = params['folder_types'] 4454 if 'from_date' in params: 4455 query_params['from_date'] = params['from_date'] 4456 if 'include' in params: 4457 query_params['include'] = params['include'] 4458 if 'is_deleted_template_only' in params: 4459 query_params['is_deleted_template_only'] = params['is_deleted_template_only'] 4460 if 'is_download' in params: 4461 query_params['is_download'] = params['is_download'] 4462 if 'modified_from_date' in params: 4463 query_params['modified_from_date'] = params['modified_from_date'] 4464 if 'modified_to_date' in params: 4465 query_params['modified_to_date'] = params['modified_to_date'] 4466 if 'order' in params: 4467 query_params['order'] = params['order'] 4468 if 'order_by' in params: 4469 query_params['order_by'] = params['order_by'] 4470 if 'search_fields' in params: 4471 query_params['search_fields'] = params['search_fields'] 4472 if 'search_text' in params: 4473 query_params['search_text'] = params['search_text'] 4474 if 'shared_by_me' in params: 4475 query_params['shared_by_me'] = params['shared_by_me'] 4476 if 'start_position' in params: 4477 query_params['start_position'] = params['start_position'] 4478 if 'template_ids' in params: 4479 query_params['template_ids'] = params['template_ids'] 4480 if 'to_date' in params: 4481 query_params['to_date'] = params['to_date'] 4482 if 'used_from_date' in params: 4483 query_params['used_from_date'] = params['used_from_date'] 4484 if 'used_to_date' in params: 4485 query_params['used_to_date'] = params['used_to_date'] 4486 if 'user_filter' in params: 4487 query_params['user_filter'] = params['user_filter'] 4488 if 'user_id' in params: 4489 query_params['user_id'] = params['user_id'] 4490 4491 header_params = {} 4492 4493 form_params = [] 4494 local_var_files = {} 4495 4496 body_params = None 4497 # HTTP header `Accept` 4498 header_params['Accept'] = self.api_client.\ 4499 select_header_accept(['application/json']) 4500 4501 # Authentication setting 4502 auth_settings = [] 4503 4504 return self.api_client.call_api(resource_path, 'GET', 4505 path_params, 4506 query_params, 4507 header_params, 4508 body=body_params, 4509 post_params=form_params, 4510 files=local_var_files, 4511 response_type='EnvelopeTemplateResults', 4512 auth_settings=auth_settings, 4513 callback=params.get('callback'), 4514 _return_http_data_only=params.get('_return_http_data_only'), 4515 _preload_content=params.get('_preload_content', True), 4516 _request_timeout=params.get('_request_timeout'), 4517 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.
4519 def rotate_document_page(self, account_id, document_id, page_number, template_id, **kwargs): 4520 """ 4521 Rotates page image from a template for display. 4522 Rotates page image from a template for display. The page image can be rotated to the left or right. 4523 This method makes a synchronous HTTP request by default. To make an 4524 asynchronous HTTP request, please define a `callback` function 4525 to be invoked when receiving the response. 4526 >>> def callback_function(response): 4527 >>> pprint(response) 4528 >>> 4529 >>> thread = api.rotate_document_page(account_id, document_id, page_number, template_id, callback=callback_function) 4530 4531 :param callback function: The callback function 4532 for asynchronous request. (optional) 4533 :param str account_id: The external account number (int) or account ID Guid. (required) 4534 :param str document_id: The ID of the document being accessed. (required) 4535 :param str page_number: The page number being accessed. (required) 4536 :param str template_id: The ID of the template being accessed. (required) 4537 :param PageRequest page_request: 4538 :return: None 4539 If the method is called asynchronously, 4540 returns the request thread. 4541 """ 4542 kwargs['_return_http_data_only'] = True 4543 if kwargs.get('callback'): 4544 return self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 4545 else: 4546 (data) = self.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, **kwargs) 4547 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.
4549 def rotate_document_page_with_http_info(self, account_id, document_id, page_number, template_id, **kwargs): 4550 """ 4551 Rotates page image from a template for display. 4552 Rotates page image from a template for display. The page image can be rotated to the left or right. 4553 This method makes a synchronous HTTP request by default. To make an 4554 asynchronous HTTP request, please define a `callback` function 4555 to be invoked when receiving the response. 4556 >>> def callback_function(response): 4557 >>> pprint(response) 4558 >>> 4559 >>> thread = api.rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, callback=callback_function) 4560 4561 :param callback function: The callback function 4562 for asynchronous request. (optional) 4563 :param str account_id: The external account number (int) or account ID Guid. (required) 4564 :param str document_id: The ID of the document being accessed. (required) 4565 :param str page_number: The page number being accessed. (required) 4566 :param str template_id: The ID of the template being accessed. (required) 4567 :param PageRequest page_request: 4568 :return: None 4569 If the method is called asynchronously, 4570 returns the request thread. 4571 """ 4572 4573 all_params = ['account_id', 'document_id', 'page_number', 'template_id', 'page_request'] 4574 all_params.append('callback') 4575 all_params.append('_return_http_data_only') 4576 all_params.append('_preload_content') 4577 all_params.append('_request_timeout') 4578 4579 params = locals() 4580 for key, val in iteritems(params['kwargs']): 4581 if key not in all_params: 4582 raise TypeError( 4583 "Got an unexpected keyword argument '%s'" 4584 " to method rotate_document_page" % key 4585 ) 4586 params[key] = val 4587 del params['kwargs'] 4588 # verify the required parameter 'account_id' is set 4589 if ('account_id' not in params) or (params['account_id'] is None): 4590 raise ValueError("Missing the required parameter `account_id` when calling `rotate_document_page`") 4591 # verify the required parameter 'document_id' is set 4592 if ('document_id' not in params) or (params['document_id'] is None): 4593 raise ValueError("Missing the required parameter `document_id` when calling `rotate_document_page`") 4594 # verify the required parameter 'page_number' is set 4595 if ('page_number' not in params) or (params['page_number'] is None): 4596 raise ValueError("Missing the required parameter `page_number` when calling `rotate_document_page`") 4597 # verify the required parameter 'template_id' is set 4598 if ('template_id' not in params) or (params['template_id'] is None): 4599 raise ValueError("Missing the required parameter `template_id` when calling `rotate_document_page`") 4600 4601 4602 collection_formats = {} 4603 4604 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image'.replace('{format}', 'json') 4605 path_params = {} 4606 if 'account_id' in params: 4607 path_params['accountId'] = params['account_id'] 4608 if 'document_id' in params: 4609 path_params['documentId'] = params['document_id'] 4610 if 'page_number' in params: 4611 path_params['pageNumber'] = params['page_number'] 4612 if 'template_id' in params: 4613 path_params['templateId'] = params['template_id'] 4614 4615 query_params = {} 4616 4617 header_params = {} 4618 4619 form_params = [] 4620 local_var_files = {} 4621 4622 body_params = None 4623 if 'page_request' in params: 4624 body_params = params['page_request'] 4625 # HTTP header `Accept` 4626 header_params['Accept'] = self.api_client.\ 4627 select_header_accept(['application/json']) 4628 4629 # Authentication setting 4630 auth_settings = [] 4631 4632 return self.api_client.call_api(resource_path, 'PUT', 4633 path_params, 4634 query_params, 4635 header_params, 4636 body=body_params, 4637 post_params=form_params, 4638 files=local_var_files, 4639 response_type=None, 4640 auth_settings=auth_settings, 4641 callback=params.get('callback'), 4642 _return_http_data_only=params.get('_return_http_data_only'), 4643 _preload_content=params.get('_preload_content', True), 4644 _request_timeout=params.get('_request_timeout'), 4645 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.
4647 def update(self, account_id, template_id, **kwargs): 4648 """ 4649 Updates an existing template. 4650 Updates an existing template. 4651 This method makes a synchronous HTTP request by default. To make an 4652 asynchronous HTTP request, please define a `callback` function 4653 to be invoked when receiving the response. 4654 >>> def callback_function(response): 4655 >>> pprint(response) 4656 >>> 4657 >>> thread = api.update(account_id, template_id, callback=callback_function) 4658 4659 :param callback function: The callback function 4660 for asynchronous request. (optional) 4661 :param str account_id: The external account number (int) or account ID Guid. (required) 4662 :param str template_id: The ID of the template being accessed. (required) 4663 :param EnvelopeTemplate envelope_template: 4664 :return: TemplateUpdateSummary 4665 If the method is called asynchronously, 4666 returns the request thread. 4667 """ 4668 kwargs['_return_http_data_only'] = True 4669 if kwargs.get('callback'): 4670 return self.update_with_http_info(account_id, template_id, **kwargs) 4671 else: 4672 (data) = self.update_with_http_info(account_id, template_id, **kwargs) 4673 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.
4675 def update_with_http_info(self, account_id, template_id, **kwargs): 4676 """ 4677 Updates an existing template. 4678 Updates an existing template. 4679 This method makes a synchronous HTTP request by default. To make an 4680 asynchronous HTTP request, please define a `callback` function 4681 to be invoked when receiving the response. 4682 >>> def callback_function(response): 4683 >>> pprint(response) 4684 >>> 4685 >>> thread = api.update_with_http_info(account_id, template_id, callback=callback_function) 4686 4687 :param callback function: The callback function 4688 for asynchronous request. (optional) 4689 :param str account_id: The external account number (int) or account ID Guid. (required) 4690 :param str template_id: The ID of the template being accessed. (required) 4691 :param EnvelopeTemplate envelope_template: 4692 :return: TemplateUpdateSummary 4693 If the method is called asynchronously, 4694 returns the request thread. 4695 """ 4696 4697 all_params = ['account_id', 'template_id', 'envelope_template'] 4698 all_params.append('callback') 4699 all_params.append('_return_http_data_only') 4700 all_params.append('_preload_content') 4701 all_params.append('_request_timeout') 4702 4703 params = locals() 4704 for key, val in iteritems(params['kwargs']): 4705 if key not in all_params: 4706 raise TypeError( 4707 "Got an unexpected keyword argument '%s'" 4708 " to method update" % key 4709 ) 4710 params[key] = val 4711 del params['kwargs'] 4712 # verify the required parameter 'account_id' is set 4713 if ('account_id' not in params) or (params['account_id'] is None): 4714 raise ValueError("Missing the required parameter `account_id` when calling `update`") 4715 # verify the required parameter 'template_id' is set 4716 if ('template_id' not in params) or (params['template_id'] is None): 4717 raise ValueError("Missing the required parameter `template_id` when calling `update`") 4718 4719 4720 collection_formats = {} 4721 4722 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}'.replace('{format}', 'json') 4723 path_params = {} 4724 if 'account_id' in params: 4725 path_params['accountId'] = params['account_id'] 4726 if 'template_id' in params: 4727 path_params['templateId'] = params['template_id'] 4728 4729 query_params = {} 4730 4731 header_params = {} 4732 4733 form_params = [] 4734 local_var_files = {} 4735 4736 body_params = None 4737 if 'envelope_template' in params: 4738 body_params = params['envelope_template'] 4739 # HTTP header `Accept` 4740 header_params['Accept'] = self.api_client.\ 4741 select_header_accept(['application/json']) 4742 4743 # Authentication setting 4744 auth_settings = [] 4745 4746 return self.api_client.call_api(resource_path, 'PUT', 4747 path_params, 4748 query_params, 4749 header_params, 4750 body=body_params, 4751 post_params=form_params, 4752 files=local_var_files, 4753 response_type='TemplateUpdateSummary', 4754 auth_settings=auth_settings, 4755 callback=params.get('callback'), 4756 _return_http_data_only=params.get('_return_http_data_only'), 4757 _preload_content=params.get('_preload_content', True), 4758 _request_timeout=params.get('_request_timeout'), 4759 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.
4761 def update_custom_fields(self, account_id, template_id, **kwargs): 4762 """ 4763 Updates envelope custom fields in a template. 4764 Updates the custom fields in a template. Each custom field used in a template must have a unique name. 4765 This method makes a synchronous HTTP request by default. To make an 4766 asynchronous HTTP request, please define a `callback` function 4767 to be invoked when receiving the response. 4768 >>> def callback_function(response): 4769 >>> pprint(response) 4770 >>> 4771 >>> thread = api.update_custom_fields(account_id, template_id, callback=callback_function) 4772 4773 :param callback function: The callback function 4774 for asynchronous request. (optional) 4775 :param str account_id: The external account number (int) or account ID Guid. (required) 4776 :param str template_id: The ID of the template being accessed. (required) 4777 :param TemplateCustomFields template_custom_fields: 4778 :return: CustomFields 4779 If the method is called asynchronously, 4780 returns the request thread. 4781 """ 4782 kwargs['_return_http_data_only'] = True 4783 if kwargs.get('callback'): 4784 return self.update_custom_fields_with_http_info(account_id, template_id, **kwargs) 4785 else: 4786 (data) = self.update_custom_fields_with_http_info(account_id, template_id, **kwargs) 4787 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.
4789 def update_custom_fields_with_http_info(self, account_id, template_id, **kwargs): 4790 """ 4791 Updates envelope custom fields in a template. 4792 Updates the custom fields in a template. Each custom field used in a template must have a unique name. 4793 This method makes a synchronous HTTP request by default. To make an 4794 asynchronous HTTP request, please define a `callback` function 4795 to be invoked when receiving the response. 4796 >>> def callback_function(response): 4797 >>> pprint(response) 4798 >>> 4799 >>> thread = api.update_custom_fields_with_http_info(account_id, template_id, callback=callback_function) 4800 4801 :param callback function: The callback function 4802 for asynchronous request. (optional) 4803 :param str account_id: The external account number (int) or account ID Guid. (required) 4804 :param str template_id: The ID of the template being accessed. (required) 4805 :param TemplateCustomFields template_custom_fields: 4806 :return: CustomFields 4807 If the method is called asynchronously, 4808 returns the request thread. 4809 """ 4810 4811 all_params = ['account_id', 'template_id', 'template_custom_fields'] 4812 all_params.append('callback') 4813 all_params.append('_return_http_data_only') 4814 all_params.append('_preload_content') 4815 all_params.append('_request_timeout') 4816 4817 params = locals() 4818 for key, val in iteritems(params['kwargs']): 4819 if key not in all_params: 4820 raise TypeError( 4821 "Got an unexpected keyword argument '%s'" 4822 " to method update_custom_fields" % key 4823 ) 4824 params[key] = val 4825 del params['kwargs'] 4826 # verify the required parameter 'account_id' is set 4827 if ('account_id' not in params) or (params['account_id'] is None): 4828 raise ValueError("Missing the required parameter `account_id` when calling `update_custom_fields`") 4829 # verify the required parameter 'template_id' is set 4830 if ('template_id' not in params) or (params['template_id'] is None): 4831 raise ValueError("Missing the required parameter `template_id` when calling `update_custom_fields`") 4832 4833 4834 collection_formats = {} 4835 4836 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields'.replace('{format}', 'json') 4837 path_params = {} 4838 if 'account_id' in params: 4839 path_params['accountId'] = params['account_id'] 4840 if 'template_id' in params: 4841 path_params['templateId'] = params['template_id'] 4842 4843 query_params = {} 4844 4845 header_params = {} 4846 4847 form_params = [] 4848 local_var_files = {} 4849 4850 body_params = None 4851 if 'template_custom_fields' in params: 4852 body_params = params['template_custom_fields'] 4853 # HTTP header `Accept` 4854 header_params['Accept'] = self.api_client.\ 4855 select_header_accept(['application/json']) 4856 4857 # Authentication setting 4858 auth_settings = [] 4859 4860 return self.api_client.call_api(resource_path, 'PUT', 4861 path_params, 4862 query_params, 4863 header_params, 4864 body=body_params, 4865 post_params=form_params, 4866 files=local_var_files, 4867 response_type='CustomFields', 4868 auth_settings=auth_settings, 4869 callback=params.get('callback'), 4870 _return_http_data_only=params.get('_return_http_data_only'), 4871 _preload_content=params.get('_preload_content', True), 4872 _request_timeout=params.get('_request_timeout'), 4873 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.
4875 def update_document(self, account_id, document_id, template_id, **kwargs): 4876 """ 4877 Adds a document to a template document. 4878 Adds the specified document to an existing template document. 4879 This method makes a synchronous HTTP request by default. To make an 4880 asynchronous HTTP request, please define a `callback` function 4881 to be invoked when receiving the response. 4882 >>> def callback_function(response): 4883 >>> pprint(response) 4884 >>> 4885 >>> thread = api.update_document(account_id, document_id, template_id, callback=callback_function) 4886 4887 :param callback function: The callback function 4888 for asynchronous request. (optional) 4889 :param str account_id: The external account number (int) or account ID Guid. (required) 4890 :param str document_id: The ID of the document being accessed. (required) 4891 :param str template_id: The ID of the template being accessed. (required) 4892 :param str is_envelope_definition: 4893 :param EnvelopeDefinition envelope_definition: 4894 :return: EnvelopeDocument 4895 If the method is called asynchronously, 4896 returns the request thread. 4897 """ 4898 kwargs['_return_http_data_only'] = True 4899 if kwargs.get('callback'): 4900 return self.update_document_with_http_info(account_id, document_id, template_id, **kwargs) 4901 else: 4902 (data) = self.update_document_with_http_info(account_id, document_id, template_id, **kwargs) 4903 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.
4905 def update_document_with_http_info(self, account_id, document_id, template_id, **kwargs): 4906 """ 4907 Adds a document to a template document. 4908 Adds the specified document to an existing template document. 4909 This method makes a synchronous HTTP request by default. To make an 4910 asynchronous HTTP request, please define a `callback` function 4911 to be invoked when receiving the response. 4912 >>> def callback_function(response): 4913 >>> pprint(response) 4914 >>> 4915 >>> thread = api.update_document_with_http_info(account_id, document_id, template_id, callback=callback_function) 4916 4917 :param callback function: The callback function 4918 for asynchronous request. (optional) 4919 :param str account_id: The external account number (int) or account ID Guid. (required) 4920 :param str document_id: The ID of the document being accessed. (required) 4921 :param str template_id: The ID of the template being accessed. (required) 4922 :param str is_envelope_definition: 4923 :param EnvelopeDefinition envelope_definition: 4924 :return: EnvelopeDocument 4925 If the method is called asynchronously, 4926 returns the request thread. 4927 """ 4928 4929 all_params = ['account_id', 'document_id', 'template_id', 'is_envelope_definition', 'envelope_definition'] 4930 all_params.append('callback') 4931 all_params.append('_return_http_data_only') 4932 all_params.append('_preload_content') 4933 all_params.append('_request_timeout') 4934 4935 params = locals() 4936 for key, val in iteritems(params['kwargs']): 4937 if key not in all_params: 4938 raise TypeError( 4939 "Got an unexpected keyword argument '%s'" 4940 " to method update_document" % key 4941 ) 4942 params[key] = val 4943 del params['kwargs'] 4944 # verify the required parameter 'account_id' is set 4945 if ('account_id' not in params) or (params['account_id'] is None): 4946 raise ValueError("Missing the required parameter `account_id` when calling `update_document`") 4947 # verify the required parameter 'document_id' is set 4948 if ('document_id' not in params) or (params['document_id'] is None): 4949 raise ValueError("Missing the required parameter `document_id` when calling `update_document`") 4950 # verify the required parameter 'template_id' is set 4951 if ('template_id' not in params) or (params['template_id'] is None): 4952 raise ValueError("Missing the required parameter `template_id` when calling `update_document`") 4953 4954 4955 collection_formats = {} 4956 4957 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}'.replace('{format}', 'json') 4958 path_params = {} 4959 if 'account_id' in params: 4960 path_params['accountId'] = params['account_id'] 4961 if 'document_id' in params: 4962 path_params['documentId'] = params['document_id'] 4963 if 'template_id' in params: 4964 path_params['templateId'] = params['template_id'] 4965 4966 query_params = {} 4967 if 'is_envelope_definition' in params: 4968 query_params['is_envelope_definition'] = params['is_envelope_definition'] 4969 4970 header_params = {} 4971 4972 form_params = [] 4973 local_var_files = {} 4974 4975 body_params = None 4976 if 'envelope_definition' in params: 4977 body_params = params['envelope_definition'] 4978 # HTTP header `Accept` 4979 header_params['Accept'] = self.api_client.\ 4980 select_header_accept(['application/json']) 4981 4982 # Authentication setting 4983 auth_settings = [] 4984 4985 return self.api_client.call_api(resource_path, 'PUT', 4986 path_params, 4987 query_params, 4988 header_params, 4989 body=body_params, 4990 post_params=form_params, 4991 files=local_var_files, 4992 response_type='EnvelopeDocument', 4993 auth_settings=auth_settings, 4994 callback=params.get('callback'), 4995 _return_http_data_only=params.get('_return_http_data_only'), 4996 _preload_content=params.get('_preload_content', True), 4997 _request_timeout=params.get('_request_timeout'), 4998 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.
5000 def update_document_fields(self, account_id, document_id, template_id, **kwargs): 5001 """ 5002 Updates existing custom document fields in an existing template document. 5003 Updates existing custom document fields in an existing template document. 5004 This method makes a synchronous HTTP request by default. To make an 5005 asynchronous HTTP request, please define a `callback` function 5006 to be invoked when receiving the response. 5007 >>> def callback_function(response): 5008 >>> pprint(response) 5009 >>> 5010 >>> thread = api.update_document_fields(account_id, document_id, template_id, callback=callback_function) 5011 5012 :param callback function: The callback function 5013 for asynchronous request. (optional) 5014 :param str account_id: The external account number (int) or account ID Guid. (required) 5015 :param str document_id: The ID of the document being accessed. (required) 5016 :param str template_id: The ID of the template being accessed. (required) 5017 :param DocumentFieldsInformation document_fields_information: 5018 :return: DocumentFieldsInformation 5019 If the method is called asynchronously, 5020 returns the request thread. 5021 """ 5022 kwargs['_return_http_data_only'] = True 5023 if kwargs.get('callback'): 5024 return self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 5025 else: 5026 (data) = self.update_document_fields_with_http_info(account_id, document_id, template_id, **kwargs) 5027 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.
5029 def update_document_fields_with_http_info(self, account_id, document_id, template_id, **kwargs): 5030 """ 5031 Updates existing custom document fields in an existing template document. 5032 Updates existing custom document fields in an existing template document. 5033 This method makes a synchronous HTTP request by default. To make an 5034 asynchronous HTTP request, please define a `callback` function 5035 to be invoked when receiving the response. 5036 >>> def callback_function(response): 5037 >>> pprint(response) 5038 >>> 5039 >>> thread = api.update_document_fields_with_http_info(account_id, document_id, template_id, callback=callback_function) 5040 5041 :param callback function: The callback function 5042 for asynchronous request. (optional) 5043 :param str account_id: The external account number (int) or account ID Guid. (required) 5044 :param str document_id: The ID of the document being accessed. (required) 5045 :param str template_id: The ID of the template being accessed. (required) 5046 :param DocumentFieldsInformation document_fields_information: 5047 :return: DocumentFieldsInformation 5048 If the method is called asynchronously, 5049 returns the request thread. 5050 """ 5051 5052 all_params = ['account_id', 'document_id', 'template_id', 'document_fields_information'] 5053 all_params.append('callback') 5054 all_params.append('_return_http_data_only') 5055 all_params.append('_preload_content') 5056 all_params.append('_request_timeout') 5057 5058 params = locals() 5059 for key, val in iteritems(params['kwargs']): 5060 if key not in all_params: 5061 raise TypeError( 5062 "Got an unexpected keyword argument '%s'" 5063 " to method update_document_fields" % key 5064 ) 5065 params[key] = val 5066 del params['kwargs'] 5067 # verify the required parameter 'account_id' is set 5068 if ('account_id' not in params) or (params['account_id'] is None): 5069 raise ValueError("Missing the required parameter `account_id` when calling `update_document_fields`") 5070 # verify the required parameter 'document_id' is set 5071 if ('document_id' not in params) or (params['document_id'] is None): 5072 raise ValueError("Missing the required parameter `document_id` when calling `update_document_fields`") 5073 # verify the required parameter 'template_id' is set 5074 if ('template_id' not in params) or (params['template_id'] is None): 5075 raise ValueError("Missing the required parameter `template_id` when calling `update_document_fields`") 5076 5077 5078 collection_formats = {} 5079 5080 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields'.replace('{format}', 'json') 5081 path_params = {} 5082 if 'account_id' in params: 5083 path_params['accountId'] = params['account_id'] 5084 if 'document_id' in params: 5085 path_params['documentId'] = params['document_id'] 5086 if 'template_id' in params: 5087 path_params['templateId'] = params['template_id'] 5088 5089 query_params = {} 5090 5091 header_params = {} 5092 5093 form_params = [] 5094 local_var_files = {} 5095 5096 body_params = None 5097 if 'document_fields_information' in params: 5098 body_params = params['document_fields_information'] 5099 # HTTP header `Accept` 5100 header_params['Accept'] = self.api_client.\ 5101 select_header_accept(['application/json']) 5102 5103 # Authentication setting 5104 auth_settings = [] 5105 5106 return self.api_client.call_api(resource_path, 'PUT', 5107 path_params, 5108 query_params, 5109 header_params, 5110 body=body_params, 5111 post_params=form_params, 5112 files=local_var_files, 5113 response_type='DocumentFieldsInformation', 5114 auth_settings=auth_settings, 5115 callback=params.get('callback'), 5116 _return_http_data_only=params.get('_return_http_data_only'), 5117 _preload_content=params.get('_preload_content', True), 5118 _request_timeout=params.get('_request_timeout'), 5119 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.
5121 def update_documents(self, account_id, template_id, **kwargs): 5122 """ 5123 Adds documents to a template document. 5124 Adds one or more documents to an existing template document. 5125 This method makes a synchronous HTTP request by default. To make an 5126 asynchronous HTTP request, please define a `callback` function 5127 to be invoked when receiving the response. 5128 >>> def callback_function(response): 5129 >>> pprint(response) 5130 >>> 5131 >>> thread = api.update_documents(account_id, template_id, callback=callback_function) 5132 5133 :param callback function: The callback function 5134 for asynchronous request. (optional) 5135 :param str account_id: The external account number (int) or account ID Guid. (required) 5136 :param str template_id: The ID of the template being accessed. (required) 5137 :param EnvelopeDefinition envelope_definition: 5138 :return: TemplateDocumentsResult 5139 If the method is called asynchronously, 5140 returns the request thread. 5141 """ 5142 kwargs['_return_http_data_only'] = True 5143 if kwargs.get('callback'): 5144 return self.update_documents_with_http_info(account_id, template_id, **kwargs) 5145 else: 5146 (data) = self.update_documents_with_http_info(account_id, template_id, **kwargs) 5147 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.
5149 def update_documents_with_http_info(self, account_id, template_id, **kwargs): 5150 """ 5151 Adds documents to a template document. 5152 Adds one or more documents to an existing template document. 5153 This method makes a synchronous HTTP request by default. To make an 5154 asynchronous HTTP request, please define a `callback` function 5155 to be invoked when receiving the response. 5156 >>> def callback_function(response): 5157 >>> pprint(response) 5158 >>> 5159 >>> thread = api.update_documents_with_http_info(account_id, template_id, callback=callback_function) 5160 5161 :param callback function: The callback function 5162 for asynchronous request. (optional) 5163 :param str account_id: The external account number (int) or account ID Guid. (required) 5164 :param str template_id: The ID of the template being accessed. (required) 5165 :param EnvelopeDefinition envelope_definition: 5166 :return: TemplateDocumentsResult 5167 If the method is called asynchronously, 5168 returns the request thread. 5169 """ 5170 5171 all_params = ['account_id', 'template_id', 'envelope_definition'] 5172 all_params.append('callback') 5173 all_params.append('_return_http_data_only') 5174 all_params.append('_preload_content') 5175 all_params.append('_request_timeout') 5176 5177 params = locals() 5178 for key, val in iteritems(params['kwargs']): 5179 if key not in all_params: 5180 raise TypeError( 5181 "Got an unexpected keyword argument '%s'" 5182 " to method update_documents" % key 5183 ) 5184 params[key] = val 5185 del params['kwargs'] 5186 # verify the required parameter 'account_id' is set 5187 if ('account_id' not in params) or (params['account_id'] is None): 5188 raise ValueError("Missing the required parameter `account_id` when calling `update_documents`") 5189 # verify the required parameter 'template_id' is set 5190 if ('template_id' not in params) or (params['template_id'] is None): 5191 raise ValueError("Missing the required parameter `template_id` when calling `update_documents`") 5192 5193 5194 collection_formats = {} 5195 5196 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents'.replace('{format}', 'json') 5197 path_params = {} 5198 if 'account_id' in params: 5199 path_params['accountId'] = params['account_id'] 5200 if 'template_id' in params: 5201 path_params['templateId'] = params['template_id'] 5202 5203 query_params = {} 5204 5205 header_params = {} 5206 5207 form_params = [] 5208 local_var_files = {} 5209 5210 body_params = None 5211 if 'envelope_definition' in params: 5212 body_params = params['envelope_definition'] 5213 # HTTP header `Accept` 5214 header_params['Accept'] = self.api_client.\ 5215 select_header_accept(['application/json']) 5216 5217 # Authentication setting 5218 auth_settings = [] 5219 5220 return self.api_client.call_api(resource_path, 'PUT', 5221 path_params, 5222 query_params, 5223 header_params, 5224 body=body_params, 5225 post_params=form_params, 5226 files=local_var_files, 5227 response_type='TemplateDocumentsResult', 5228 auth_settings=auth_settings, 5229 callback=params.get('callback'), 5230 _return_http_data_only=params.get('_return_http_data_only'), 5231 _preload_content=params.get('_preload_content', True), 5232 _request_timeout=params.get('_request_timeout'), 5233 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.
5356 def update_lock(self, account_id, template_id, **kwargs): 5357 """ 5358 Updates a template lock. 5359 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. 5360 This method makes a synchronous HTTP request by default. To make an 5361 asynchronous HTTP request, please define a `callback` function 5362 to be invoked when receiving the response. 5363 >>> def callback_function(response): 5364 >>> pprint(response) 5365 >>> 5366 >>> thread = api.update_lock(account_id, template_id, callback=callback_function) 5367 5368 :param callback function: The callback function 5369 for asynchronous request. (optional) 5370 :param str account_id: The external account number (int) or account ID Guid. (required) 5371 :param str template_id: The ID of the template being accessed. (required) 5372 :param LockRequest lock_request: 5373 :return: LockInformation 5374 If the method is called asynchronously, 5375 returns the request thread. 5376 """ 5377 kwargs['_return_http_data_only'] = True 5378 if kwargs.get('callback'): 5379 return self.update_lock_with_http_info(account_id, template_id, **kwargs) 5380 else: 5381 (data) = self.update_lock_with_http_info(account_id, template_id, **kwargs) 5382 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.
5384 def update_lock_with_http_info(self, account_id, template_id, **kwargs): 5385 """ 5386 Updates a template lock. 5387 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. 5388 This method makes a synchronous HTTP request by default. To make an 5389 asynchronous HTTP request, please define a `callback` function 5390 to be invoked when receiving the response. 5391 >>> def callback_function(response): 5392 >>> pprint(response) 5393 >>> 5394 >>> thread = api.update_lock_with_http_info(account_id, template_id, callback=callback_function) 5395 5396 :param callback function: The callback function 5397 for asynchronous request. (optional) 5398 :param str account_id: The external account number (int) or account ID Guid. (required) 5399 :param str template_id: The ID of the template being accessed. (required) 5400 :param LockRequest lock_request: 5401 :return: LockInformation 5402 If the method is called asynchronously, 5403 returns the request thread. 5404 """ 5405 5406 all_params = ['account_id', 'template_id', 'lock_request'] 5407 all_params.append('callback') 5408 all_params.append('_return_http_data_only') 5409 all_params.append('_preload_content') 5410 all_params.append('_request_timeout') 5411 5412 params = locals() 5413 for key, val in iteritems(params['kwargs']): 5414 if key not in all_params: 5415 raise TypeError( 5416 "Got an unexpected keyword argument '%s'" 5417 " to method update_lock" % key 5418 ) 5419 params[key] = val 5420 del params['kwargs'] 5421 # verify the required parameter 'account_id' is set 5422 if ('account_id' not in params) or (params['account_id'] is None): 5423 raise ValueError("Missing the required parameter `account_id` when calling `update_lock`") 5424 # verify the required parameter 'template_id' is set 5425 if ('template_id' not in params) or (params['template_id'] is None): 5426 raise ValueError("Missing the required parameter `template_id` when calling `update_lock`") 5427 5428 5429 collection_formats = {} 5430 5431 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/lock'.replace('{format}', 'json') 5432 path_params = {} 5433 if 'account_id' in params: 5434 path_params['accountId'] = params['account_id'] 5435 if 'template_id' in params: 5436 path_params['templateId'] = params['template_id'] 5437 5438 query_params = {} 5439 5440 header_params = {} 5441 5442 form_params = [] 5443 local_var_files = {} 5444 5445 body_params = None 5446 if 'lock_request' in params: 5447 body_params = params['lock_request'] 5448 # HTTP header `Accept` 5449 header_params['Accept'] = self.api_client.\ 5450 select_header_accept(['application/json']) 5451 5452 # Authentication setting 5453 auth_settings = [] 5454 5455 return self.api_client.call_api(resource_path, 'PUT', 5456 path_params, 5457 query_params, 5458 header_params, 5459 body=body_params, 5460 post_params=form_params, 5461 files=local_var_files, 5462 response_type='LockInformation', 5463 auth_settings=auth_settings, 5464 callback=params.get('callback'), 5465 _return_http_data_only=params.get('_return_http_data_only'), 5466 _preload_content=params.get('_preload_content', True), 5467 _request_timeout=params.get('_request_timeout'), 5468 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.
5470 def update_notification_settings(self, account_id, template_id, **kwargs): 5471 """ 5472 Updates the notification structure for an existing template. 5473 Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications. 5474 This method makes a synchronous HTTP request by default. To make an 5475 asynchronous HTTP request, please define a `callback` function 5476 to be invoked when receiving the response. 5477 >>> def callback_function(response): 5478 >>> pprint(response) 5479 >>> 5480 >>> thread = api.update_notification_settings(account_id, template_id, callback=callback_function) 5481 5482 :param callback function: The callback function 5483 for asynchronous request. (optional) 5484 :param str account_id: The external account number (int) or account ID Guid. (required) 5485 :param str template_id: The ID of the template being accessed. (required) 5486 :param TemplateNotificationRequest template_notification_request: 5487 :return: Notification 5488 If the method is called asynchronously, 5489 returns the request thread. 5490 """ 5491 kwargs['_return_http_data_only'] = True 5492 if kwargs.get('callback'): 5493 return self.update_notification_settings_with_http_info(account_id, template_id, **kwargs) 5494 else: 5495 (data) = self.update_notification_settings_with_http_info(account_id, template_id, **kwargs) 5496 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.
5498 def update_notification_settings_with_http_info(self, account_id, template_id, **kwargs): 5499 """ 5500 Updates the notification structure for an existing template. 5501 Updates the notification structure for an existing template. Use this endpoint to set reminder and expiration notifications. 5502 This method makes a synchronous HTTP request by default. To make an 5503 asynchronous HTTP request, please define a `callback` function 5504 to be invoked when receiving the response. 5505 >>> def callback_function(response): 5506 >>> pprint(response) 5507 >>> 5508 >>> thread = api.update_notification_settings_with_http_info(account_id, template_id, callback=callback_function) 5509 5510 :param callback function: The callback function 5511 for asynchronous request. (optional) 5512 :param str account_id: The external account number (int) or account ID Guid. (required) 5513 :param str template_id: The ID of the template being accessed. (required) 5514 :param TemplateNotificationRequest template_notification_request: 5515 :return: Notification 5516 If the method is called asynchronously, 5517 returns the request thread. 5518 """ 5519 5520 all_params = ['account_id', 'template_id', 'template_notification_request'] 5521 all_params.append('callback') 5522 all_params.append('_return_http_data_only') 5523 all_params.append('_preload_content') 5524 all_params.append('_request_timeout') 5525 5526 params = locals() 5527 for key, val in iteritems(params['kwargs']): 5528 if key not in all_params: 5529 raise TypeError( 5530 "Got an unexpected keyword argument '%s'" 5531 " to method update_notification_settings" % key 5532 ) 5533 params[key] = val 5534 del params['kwargs'] 5535 # verify the required parameter 'account_id' is set 5536 if ('account_id' not in params) or (params['account_id'] is None): 5537 raise ValueError("Missing the required parameter `account_id` when calling `update_notification_settings`") 5538 # verify the required parameter 'template_id' is set 5539 if ('template_id' not in params) or (params['template_id'] is None): 5540 raise ValueError("Missing the required parameter `template_id` when calling `update_notification_settings`") 5541 5542 5543 collection_formats = {} 5544 5545 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/notification'.replace('{format}', 'json') 5546 path_params = {} 5547 if 'account_id' in params: 5548 path_params['accountId'] = params['account_id'] 5549 if 'template_id' in params: 5550 path_params['templateId'] = params['template_id'] 5551 5552 query_params = {} 5553 5554 header_params = {} 5555 5556 form_params = [] 5557 local_var_files = {} 5558 5559 body_params = None 5560 if 'template_notification_request' in params: 5561 body_params = params['template_notification_request'] 5562 # HTTP header `Accept` 5563 header_params['Accept'] = self.api_client.\ 5564 select_header_accept(['application/json']) 5565 5566 # Authentication setting 5567 auth_settings = [] 5568 5569 return self.api_client.call_api(resource_path, 'PUT', 5570 path_params, 5571 query_params, 5572 header_params, 5573 body=body_params, 5574 post_params=form_params, 5575 files=local_var_files, 5576 response_type='Notification', 5577 auth_settings=auth_settings, 5578 callback=params.get('callback'), 5579 _return_http_data_only=params.get('_return_http_data_only'), 5580 _preload_content=params.get('_preload_content', True), 5581 _request_timeout=params.get('_request_timeout'), 5582 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.
5584 def update_recipients(self, account_id, template_id, **kwargs): 5585 """ 5586 Updates recipients in a template. 5587 Updates recipients in a template. You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. 5588 This method makes a synchronous HTTP request by default. To make an 5589 asynchronous HTTP request, please define a `callback` function 5590 to be invoked when receiving the response. 5591 >>> def callback_function(response): 5592 >>> pprint(response) 5593 >>> 5594 >>> thread = api.update_recipients(account_id, template_id, callback=callback_function) 5595 5596 :param callback function: The callback function 5597 for asynchronous request. (optional) 5598 :param str account_id: The external account number (int) or account ID Guid. (required) 5599 :param str template_id: The ID of the template being accessed. (required) 5600 :param str resend_envelope: 5601 :param TemplateRecipients template_recipients: 5602 :return: RecipientsUpdateSummary 5603 If the method is called asynchronously, 5604 returns the request thread. 5605 """ 5606 kwargs['_return_http_data_only'] = True 5607 if kwargs.get('callback'): 5608 return self.update_recipients_with_http_info(account_id, template_id, **kwargs) 5609 else: 5610 (data) = self.update_recipients_with_http_info(account_id, template_id, **kwargs) 5611 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.
5613 def update_recipients_with_http_info(self, account_id, template_id, **kwargs): 5614 """ 5615 Updates recipients in a template. 5616 Updates recipients in a template. You can edit the following properties: `email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. 5617 This method makes a synchronous HTTP request by default. To make an 5618 asynchronous HTTP request, please define a `callback` function 5619 to be invoked when receiving the response. 5620 >>> def callback_function(response): 5621 >>> pprint(response) 5622 >>> 5623 >>> thread = api.update_recipients_with_http_info(account_id, template_id, callback=callback_function) 5624 5625 :param callback function: The callback function 5626 for asynchronous request. (optional) 5627 :param str account_id: The external account number (int) or account ID Guid. (required) 5628 :param str template_id: The ID of the template being accessed. (required) 5629 :param str resend_envelope: 5630 :param TemplateRecipients template_recipients: 5631 :return: RecipientsUpdateSummary 5632 If the method is called asynchronously, 5633 returns the request thread. 5634 """ 5635 5636 all_params = ['account_id', 'template_id', 'resend_envelope', 'template_recipients'] 5637 all_params.append('callback') 5638 all_params.append('_return_http_data_only') 5639 all_params.append('_preload_content') 5640 all_params.append('_request_timeout') 5641 5642 params = locals() 5643 for key, val in iteritems(params['kwargs']): 5644 if key not in all_params: 5645 raise TypeError( 5646 "Got an unexpected keyword argument '%s'" 5647 " to method update_recipients" % key 5648 ) 5649 params[key] = val 5650 del params['kwargs'] 5651 # verify the required parameter 'account_id' is set 5652 if ('account_id' not in params) or (params['account_id'] is None): 5653 raise ValueError("Missing the required parameter `account_id` when calling `update_recipients`") 5654 # verify the required parameter 'template_id' is set 5655 if ('template_id' not in params) or (params['template_id'] is None): 5656 raise ValueError("Missing the required parameter `template_id` when calling `update_recipients`") 5657 5658 5659 collection_formats = {} 5660 5661 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients'.replace('{format}', 'json') 5662 path_params = {} 5663 if 'account_id' in params: 5664 path_params['accountId'] = params['account_id'] 5665 if 'template_id' in params: 5666 path_params['templateId'] = params['template_id'] 5667 5668 query_params = {} 5669 if 'resend_envelope' in params: 5670 query_params['resend_envelope'] = params['resend_envelope'] 5671 5672 header_params = {} 5673 5674 form_params = [] 5675 local_var_files = {} 5676 5677 body_params = None 5678 if 'template_recipients' in params: 5679 body_params = params['template_recipients'] 5680 # HTTP header `Accept` 5681 header_params['Accept'] = self.api_client.\ 5682 select_header_accept(['application/json']) 5683 5684 # Authentication setting 5685 auth_settings = [] 5686 5687 return self.api_client.call_api(resource_path, 'PUT', 5688 path_params, 5689 query_params, 5690 header_params, 5691 body=body_params, 5692 post_params=form_params, 5693 files=local_var_files, 5694 response_type='RecipientsUpdateSummary', 5695 auth_settings=auth_settings, 5696 callback=params.get('callback'), 5697 _return_http_data_only=params.get('_return_http_data_only'), 5698 _preload_content=params.get('_preload_content', True), 5699 _request_timeout=params.get('_request_timeout'), 5700 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.
5702 def update_tabs(self, account_id, recipient_id, template_id, **kwargs): 5703 """ 5704 Updates the tabs for a recipient. 5705 Updates one or more tabs for a recipient in a template. 5706 This method makes a synchronous HTTP request by default. To make an 5707 asynchronous HTTP request, please define a `callback` function 5708 to be invoked when receiving the response. 5709 >>> def callback_function(response): 5710 >>> pprint(response) 5711 >>> 5712 >>> thread = api.update_tabs(account_id, recipient_id, template_id, callback=callback_function) 5713 5714 :param callback function: The callback function 5715 for asynchronous request. (optional) 5716 :param str account_id: The external account number (int) or account ID Guid. (required) 5717 :param str recipient_id: The ID of the recipient being accessed. (required) 5718 :param str template_id: The ID of the template being accessed. (required) 5719 :param TemplateTabs template_tabs: 5720 :return: Tabs 5721 If the method is called asynchronously, 5722 returns the request thread. 5723 """ 5724 kwargs['_return_http_data_only'] = True 5725 if kwargs.get('callback'): 5726 return self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 5727 else: 5728 (data) = self.update_tabs_with_http_info(account_id, recipient_id, template_id, **kwargs) 5729 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.
5731 def update_tabs_with_http_info(self, account_id, recipient_id, template_id, **kwargs): 5732 """ 5733 Updates the tabs for a recipient. 5734 Updates one or more tabs for a recipient in a template. 5735 This method makes a synchronous HTTP request by default. To make an 5736 asynchronous HTTP request, please define a `callback` function 5737 to be invoked when receiving the response. 5738 >>> def callback_function(response): 5739 >>> pprint(response) 5740 >>> 5741 >>> thread = api.update_tabs_with_http_info(account_id, recipient_id, template_id, callback=callback_function) 5742 5743 :param callback function: The callback function 5744 for asynchronous request. (optional) 5745 :param str account_id: The external account number (int) or account ID Guid. (required) 5746 :param str recipient_id: The ID of the recipient being accessed. (required) 5747 :param str template_id: The ID of the template being accessed. (required) 5748 :param TemplateTabs template_tabs: 5749 :return: Tabs 5750 If the method is called asynchronously, 5751 returns the request thread. 5752 """ 5753 5754 all_params = ['account_id', 'recipient_id', 'template_id', 'template_tabs'] 5755 all_params.append('callback') 5756 all_params.append('_return_http_data_only') 5757 all_params.append('_preload_content') 5758 all_params.append('_request_timeout') 5759 5760 params = locals() 5761 for key, val in iteritems(params['kwargs']): 5762 if key not in all_params: 5763 raise TypeError( 5764 "Got an unexpected keyword argument '%s'" 5765 " to method update_tabs" % key 5766 ) 5767 params[key] = val 5768 del params['kwargs'] 5769 # verify the required parameter 'account_id' is set 5770 if ('account_id' not in params) or (params['account_id'] is None): 5771 raise ValueError("Missing the required parameter `account_id` when calling `update_tabs`") 5772 # verify the required parameter 'recipient_id' is set 5773 if ('recipient_id' not in params) or (params['recipient_id'] is None): 5774 raise ValueError("Missing the required parameter `recipient_id` when calling `update_tabs`") 5775 # verify the required parameter 'template_id' is set 5776 if ('template_id' not in params) or (params['template_id'] is None): 5777 raise ValueError("Missing the required parameter `template_id` when calling `update_tabs`") 5778 5779 5780 collection_formats = {} 5781 5782 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs'.replace('{format}', 'json') 5783 path_params = {} 5784 if 'account_id' in params: 5785 path_params['accountId'] = params['account_id'] 5786 if 'recipient_id' in params: 5787 path_params['recipientId'] = params['recipient_id'] 5788 if 'template_id' in params: 5789 path_params['templateId'] = params['template_id'] 5790 5791 query_params = {} 5792 5793 header_params = {} 5794 5795 form_params = [] 5796 local_var_files = {} 5797 5798 body_params = None 5799 if 'template_tabs' in params: 5800 body_params = params['template_tabs'] 5801 # HTTP header `Accept` 5802 header_params['Accept'] = self.api_client.\ 5803 select_header_accept(['application/json']) 5804 5805 # Authentication setting 5806 auth_settings = [] 5807 5808 return self.api_client.call_api(resource_path, 'PUT', 5809 path_params, 5810 query_params, 5811 header_params, 5812 body=body_params, 5813 post_params=form_params, 5814 files=local_var_files, 5815 response_type='Tabs', 5816 auth_settings=auth_settings, 5817 callback=params.get('callback'), 5818 _return_http_data_only=params.get('_return_http_data_only'), 5819 _preload_content=params.get('_preload_content', True), 5820 _request_timeout=params.get('_request_timeout'), 5821 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.
5823 def update_template_document_tabs(self, account_id, document_id, template_id, **kwargs): 5824 """ 5825 Updates the tabs for a template 5826 Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 5827 This method makes a synchronous HTTP request by default. To make an 5828 asynchronous HTTP request, please define a `callback` function 5829 to be invoked when receiving the response. 5830 >>> def callback_function(response): 5831 >>> pprint(response) 5832 >>> 5833 >>> thread = api.update_template_document_tabs(account_id, document_id, template_id, callback=callback_function) 5834 5835 :param callback function: The callback function 5836 for asynchronous request. (optional) 5837 :param str account_id: The external account number (int) or account ID Guid. (required) 5838 :param str document_id: The ID of the document being accessed. (required) 5839 :param str template_id: The ID of the template being accessed. (required) 5840 :param TemplateTabs template_tabs: 5841 :return: Tabs 5842 If the method is called asynchronously, 5843 returns the request thread. 5844 """ 5845 kwargs['_return_http_data_only'] = True 5846 if kwargs.get('callback'): 5847 return self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 5848 else: 5849 (data) = self.update_template_document_tabs_with_http_info(account_id, document_id, template_id, **kwargs) 5850 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.
5852 def update_template_document_tabs_with_http_info(self, account_id, document_id, template_id, **kwargs): 5853 """ 5854 Updates the tabs for a template 5855 Updates tabs in the document specified by `documentId` in the template specified by `templateId`. 5856 This method makes a synchronous HTTP request by default. To make an 5857 asynchronous HTTP request, please define a `callback` function 5858 to be invoked when receiving the response. 5859 >>> def callback_function(response): 5860 >>> pprint(response) 5861 >>> 5862 >>> thread = api.update_template_document_tabs_with_http_info(account_id, document_id, template_id, callback=callback_function) 5863 5864 :param callback function: The callback function 5865 for asynchronous request. (optional) 5866 :param str account_id: The external account number (int) or account ID Guid. (required) 5867 :param str document_id: The ID of the document being accessed. (required) 5868 :param str template_id: The ID of the template being accessed. (required) 5869 :param TemplateTabs template_tabs: 5870 :return: Tabs 5871 If the method is called asynchronously, 5872 returns the request thread. 5873 """ 5874 5875 all_params = ['account_id', 'document_id', 'template_id', 'template_tabs'] 5876 all_params.append('callback') 5877 all_params.append('_return_http_data_only') 5878 all_params.append('_preload_content') 5879 all_params.append('_request_timeout') 5880 5881 params = locals() 5882 for key, val in iteritems(params['kwargs']): 5883 if key not in all_params: 5884 raise TypeError( 5885 "Got an unexpected keyword argument '%s'" 5886 " to method update_template_document_tabs" % key 5887 ) 5888 params[key] = val 5889 del params['kwargs'] 5890 # verify the required parameter 'account_id' is set 5891 if ('account_id' not in params) or (params['account_id'] is None): 5892 raise ValueError("Missing the required parameter `account_id` when calling `update_template_document_tabs`") 5893 # verify the required parameter 'document_id' is set 5894 if ('document_id' not in params) or (params['document_id'] is None): 5895 raise ValueError("Missing the required parameter `document_id` when calling `update_template_document_tabs`") 5896 # verify the required parameter 'template_id' is set 5897 if ('template_id' not in params) or (params['template_id'] is None): 5898 raise ValueError("Missing the required parameter `template_id` when calling `update_template_document_tabs`") 5899 5900 5901 collection_formats = {} 5902 5903 resource_path = '/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs'.replace('{format}', 'json') 5904 path_params = {} 5905 if 'account_id' in params: 5906 path_params['accountId'] = params['account_id'] 5907 if 'document_id' in params: 5908 path_params['documentId'] = params['document_id'] 5909 if 'template_id' in params: 5910 path_params['templateId'] = params['template_id'] 5911 5912 query_params = {} 5913 5914 header_params = {} 5915 5916 form_params = [] 5917 local_var_files = {} 5918 5919 body_params = None 5920 if 'template_tabs' in params: 5921 body_params = params['template_tabs'] 5922 # HTTP header `Accept` 5923 header_params['Accept'] = self.api_client.\ 5924 select_header_accept(['application/json']) 5925 5926 # Authentication setting 5927 auth_settings = [] 5928 5929 return self.api_client.call_api(resource_path, 'PUT', 5930 path_params, 5931 query_params, 5932 header_params, 5933 body=body_params, 5934 post_params=form_params, 5935 files=local_var_files, 5936 response_type='Tabs', 5937 auth_settings=auth_settings, 5938 callback=params.get('callback'), 5939 _return_http_data_only=params.get('_return_http_data_only'), 5940 _preload_content=params.get('_preload_content', True), 5941 _request_timeout=params.get('_request_timeout'), 5942 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.
5944 def update_templates(self, account_id, **kwargs): 5945 """ 5946 Update template autoMatch setting. 5947 This method makes a synchronous HTTP request by default. To make an 5948 asynchronous HTTP request, please define a `callback` function 5949 to be invoked when receiving the response. 5950 >>> def callback_function(response): 5951 >>> pprint(response) 5952 >>> 5953 >>> thread = api.update_templates(account_id, callback=callback_function) 5954 5955 :param callback function: The callback function 5956 for asynchronous request. (optional) 5957 :param str account_id: The external account number (int) or account ID Guid. (required) 5958 :param TemplateAutoMatchList template_auto_match_list: 5959 :return: TemplateAutoMatchList 5960 If the method is called asynchronously, 5961 returns the request thread. 5962 """ 5963 kwargs['_return_http_data_only'] = True 5964 if kwargs.get('callback'): 5965 return self.update_templates_with_http_info(account_id, **kwargs) 5966 else: 5967 (data) = self.update_templates_with_http_info(account_id, **kwargs) 5968 return data
Update template autoMatch setting.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_templates(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- TemplateAutoMatchList template_auto_match_list:
Returns
TemplateAutoMatchList If the method is called asynchronously, returns the request thread.
5970 def update_templates_with_http_info(self, account_id, **kwargs): 5971 """ 5972 Update template autoMatch setting. 5973 This method makes a synchronous HTTP request by default. To make an 5974 asynchronous HTTP request, please define a `callback` function 5975 to be invoked when receiving the response. 5976 >>> def callback_function(response): 5977 >>> pprint(response) 5978 >>> 5979 >>> thread = api.update_templates_with_http_info(account_id, callback=callback_function) 5980 5981 :param callback function: The callback function 5982 for asynchronous request. (optional) 5983 :param str account_id: The external account number (int) or account ID Guid. (required) 5984 :param TemplateAutoMatchList template_auto_match_list: 5985 :return: TemplateAutoMatchList 5986 If the method is called asynchronously, 5987 returns the request thread. 5988 """ 5989 5990 all_params = ['account_id', 'template_auto_match_list'] 5991 all_params.append('callback') 5992 all_params.append('_return_http_data_only') 5993 all_params.append('_preload_content') 5994 all_params.append('_request_timeout') 5995 5996 params = locals() 5997 for key, val in iteritems(params['kwargs']): 5998 if key not in all_params: 5999 raise TypeError( 6000 "Got an unexpected keyword argument '%s'" 6001 " to method update_templates" % key 6002 ) 6003 params[key] = val 6004 del params['kwargs'] 6005 # verify the required parameter 'account_id' is set 6006 if ('account_id' not in params) or (params['account_id'] is None): 6007 raise ValueError("Missing the required parameter `account_id` when calling `update_templates`") 6008 6009 6010 collection_formats = {} 6011 6012 resource_path = '/v2.1/accounts/{accountId}/templates'.replace('{format}', 'json') 6013 path_params = {} 6014 if 'account_id' in params: 6015 path_params['accountId'] = params['account_id'] 6016 6017 query_params = {} 6018 6019 header_params = {} 6020 6021 form_params = [] 6022 local_var_files = {} 6023 6024 body_params = None 6025 if 'template_auto_match_list' in params: 6026 body_params = params['template_auto_match_list'] 6027 # HTTP header `Accept` 6028 header_params['Accept'] = self.api_client.\ 6029 select_header_accept(['application/json']) 6030 6031 # Authentication setting 6032 auth_settings = [] 6033 6034 return self.api_client.call_api(resource_path, 'PUT', 6035 path_params, 6036 query_params, 6037 header_params, 6038 body=body_params, 6039 post_params=form_params, 6040 files=local_var_files, 6041 response_type='TemplateAutoMatchList', 6042 auth_settings=auth_settings, 6043 callback=params.get('callback'), 6044 _return_http_data_only=params.get('_return_http_data_only'), 6045 _preload_content=params.get('_preload_content', True), 6046 _request_timeout=params.get('_request_timeout'), 6047 collection_formats=collection_formats)
Update template autoMatch setting.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_templates_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- TemplateAutoMatchList template_auto_match_list:
Returns
TemplateAutoMatchList If the method is called asynchronously, returns the request thread.
6049 def update_templates_auto_match(self, account_id, **kwargs): 6050 """ 6051 Update template autoMatch setting. 6052 This method makes a synchronous HTTP request by default. To make an 6053 asynchronous HTTP request, please define a `callback` function 6054 to be invoked when receiving the response. 6055 >>> def callback_function(response): 6056 >>> pprint(response) 6057 >>> 6058 >>> thread = api.update_templates_auto_match(account_id, callback=callback_function) 6059 6060 :param callback function: The callback function 6061 for asynchronous request. (optional) 6062 :param str account_id: The external account number (int) or account ID Guid. (required) 6063 :param TemplateAutoMatchList template_auto_match_list: 6064 :return: TemplateAutoMatchList 6065 If the method is called asynchronously, 6066 returns the request thread. 6067 """ 6068 kwargs['_return_http_data_only'] = True 6069 if kwargs.get('callback'): 6070 return self.update_templates_auto_match_with_http_info(account_id, **kwargs) 6071 else: 6072 (data) = self.update_templates_auto_match_with_http_info(account_id, **kwargs) 6073 return data
Update template autoMatch setting.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_templates_auto_match(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- TemplateAutoMatchList template_auto_match_list:
Returns
TemplateAutoMatchList If the method is called asynchronously, returns the request thread.
6075 def update_templates_auto_match_with_http_info(self, account_id, **kwargs): 6076 """ 6077 Update template autoMatch setting. 6078 This method makes a synchronous HTTP request by default. To make an 6079 asynchronous HTTP request, please define a `callback` function 6080 to be invoked when receiving the response. 6081 >>> def callback_function(response): 6082 >>> pprint(response) 6083 >>> 6084 >>> thread = api.update_templates_auto_match_with_http_info(account_id, callback=callback_function) 6085 6086 :param callback function: The callback function 6087 for asynchronous request. (optional) 6088 :param str account_id: The external account number (int) or account ID Guid. (required) 6089 :param TemplateAutoMatchList template_auto_match_list: 6090 :return: TemplateAutoMatchList 6091 If the method is called asynchronously, 6092 returns the request thread. 6093 """ 6094 6095 all_params = ['account_id', 'template_auto_match_list'] 6096 all_params.append('callback') 6097 all_params.append('_return_http_data_only') 6098 all_params.append('_preload_content') 6099 all_params.append('_request_timeout') 6100 6101 params = locals() 6102 for key, val in iteritems(params['kwargs']): 6103 if key not in all_params: 6104 raise TypeError( 6105 "Got an unexpected keyword argument '%s'" 6106 " to method update_templates_auto_match" % key 6107 ) 6108 params[key] = val 6109 del params['kwargs'] 6110 # verify the required parameter 'account_id' is set 6111 if ('account_id' not in params) or (params['account_id'] is None): 6112 raise ValueError("Missing the required parameter `account_id` when calling `update_templates_auto_match`") 6113 6114 6115 collection_formats = {} 6116 6117 resource_path = '/v2.1/accounts/{accountId}/templates/auto_match'.replace('{format}', 'json') 6118 path_params = {} 6119 if 'account_id' in params: 6120 path_params['accountId'] = params['account_id'] 6121 6122 query_params = {} 6123 6124 header_params = {} 6125 6126 form_params = [] 6127 local_var_files = {} 6128 6129 body_params = None 6130 if 'template_auto_match_list' in params: 6131 body_params = params['template_auto_match_list'] 6132 # HTTP header `Accept` 6133 header_params['Accept'] = self.api_client.\ 6134 select_header_accept(['application/json']) 6135 6136 # Authentication setting 6137 auth_settings = [] 6138 6139 return self.api_client.call_api(resource_path, 'PUT', 6140 path_params, 6141 query_params, 6142 header_params, 6143 body=body_params, 6144 post_params=form_params, 6145 files=local_var_files, 6146 response_type='TemplateAutoMatchList', 6147 auth_settings=auth_settings, 6148 callback=params.get('callback'), 6149 _return_http_data_only=params.get('_return_http_data_only'), 6150 _preload_content=params.get('_preload_content', True), 6151 _request_timeout=params.get('_request_timeout'), 6152 collection_formats=collection_formats)
Update template autoMatch setting.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a callback function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.update_templates_auto_match_with_http_info(account_id, callback=callback_function)
Parameters
- callback function: The callback function for asynchronous request. (optional)
- str account_id: The external account number (int) or account ID Guid. (required)
- TemplateAutoMatchList template_auto_match_list:
Returns
TemplateAutoMatchList If the method is called asynchronously, returns the request thread.