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