Class: DocuSign_eSign::TemplatesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_esign/api/templates_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = TemplatesApi.default) ⇒ TemplatesApi

Returns a new instance of TemplatesApi.



188
189
190
# File 'lib/docusign_esign/api/templates_api.rb', line 188

def initialize(api_client = TemplatesApi.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



186
187
188
# File 'lib/docusign_esign/api/templates_api.rb', line 186

def api_client
  @api_client
end

Instance Method Details

#create_custom_fields(account_id, template_id, template_custom_fields) ⇒ CustomFields

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_custom_fields (optional parameter)

Returns:



198
199
200
201
# File 'lib/docusign_esign/api/templates_api.rb', line 198

def create_custom_fields(, template_id, template_custom_fields)
  data, _status_code, _headers = create_custom_fields_with_http_info(, template_id,  template_custom_fields)
  return data
end

#create_custom_fields_with_http_info(account_id, template_id, template_custom_fields) ⇒ Array<(CustomFields, Fixnum, Hash)>

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_custom_fields (optional parameter)

Returns:

  • (Array<(CustomFields, Fixnum, Hash)>)

    CustomFields data, response status code and response headers



209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/docusign_esign/api/templates_api.rb', line 209

def create_custom_fields_with_http_info(, template_id, template_custom_fields)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.create_custom_fields ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.create_custom_fields" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.create_custom_fields" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/custom_fields".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(template_custom_fields)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CustomFields')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#create_custom_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_document_fields(account_id, document_id, template_id, document_fields_information) ⇒ DocumentFieldsInformation

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • template_id

    The ID of the template being accessed.

  • document_fields_information (optional parameter)

Returns:



254
255
256
257
# File 'lib/docusign_esign/api/templates_api.rb', line 254

def create_document_fields(, document_id, template_id, document_fields_information)
  data, _status_code, _headers = create_document_fields_with_http_info(, document_id, template_id,  document_fields_information)
  return data
end

#create_document_fields_with_http_info(account_id, document_id, template_id, document_fields_information) ⇒ Array<(DocumentFieldsInformation, Fixnum, Hash)>

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • template_id

    The ID of the template being accessed.

  • document_fields_information (optional parameter)

Returns:

  • (Array<(DocumentFieldsInformation, Fixnum, Hash)>)

    DocumentFieldsInformation data, response status code and response headers



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/docusign_esign/api/templates_api.rb', line 266

def create_document_fields_with_http_info(, document_id, template_id, document_fields_information)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.create_document_fields ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.create_document_fields" if .nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.create_document_fields" if document_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.create_document_fields" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'documentId' + '}', document_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(document_fields_information)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentFieldsInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#create_document_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_edit_view(account_id, template_id, return_url_request) ⇒ ViewUrl

Provides a URL to start an edit view of the Template UI

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • return_url_request (optional parameter)

Returns:



312
313
314
315
# File 'lib/docusign_esign/api/templates_api.rb', line 312

def create_edit_view(, template_id, return_url_request)
  data, _status_code, _headers = create_edit_view_with_http_info(, template_id,  return_url_request)
  return data
end

#create_edit_view_with_http_info(account_id, template_id, return_url_request) ⇒ Array<(ViewUrl, Fixnum, Hash)>

Provides a URL to start an edit view of the Template UI

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • return_url_request (optional parameter)

Returns:

  • (Array<(ViewUrl, Fixnum, Hash)>)

    ViewUrl data, response status code and response headers



323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'lib/docusign_esign/api/templates_api.rb', line 323

def create_edit_view_with_http_info(, template_id, return_url_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.create_edit_view ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.create_edit_view" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.create_edit_view" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/views/edit".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(return_url_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ViewUrl')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#create_edit_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_lock(account_id, template_id, lock_request) ⇒ LockInformation

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).

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • lock_request (optional parameter)

Returns:



367
368
369
370
# File 'lib/docusign_esign/api/templates_api.rb', line 367

def create_lock(, template_id, lock_request)
  data, _status_code, _headers = create_lock_with_http_info(, template_id,  lock_request)
  return data
end

#create_lock_with_http_info(account_id, template_id, lock_request) ⇒ Array<(LockInformation, Fixnum, Hash)>

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 &#x60;canLockEnvelopes&#x60; must be set to true for the user).

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • lock_request (optional parameter)

Returns:

  • (Array<(LockInformation, Fixnum, Hash)>)

    LockInformation data, response status code and response headers



378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# File 'lib/docusign_esign/api/templates_api.rb', line 378

def create_lock_with_http_info(, template_id, lock_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.create_lock ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.create_lock" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.create_lock" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/lock".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(lock_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LockInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#create_lock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_recipients(account_id, template_id, template_recipients, options = DocuSign_eSign::CreateRecipientsOptions.default) ⇒ Recipients

Adds tabs for a recipient. Adds one or more recipients to a template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_recipients (optional parameter)
  • DocuSign_eSign::CreateRecipientsOptions

    Options for modifying the behavior of the function.

Returns:



423
424
425
426
# File 'lib/docusign_esign/api/templates_api.rb', line 423

def create_recipients(, template_id, template_recipients, options = DocuSign_eSign::CreateRecipientsOptions.default)
  data, _status_code, _headers = create_recipients_with_http_info(, template_id,  template_recipients, options)
  return data
end

#create_recipients_with_http_info(account_id, template_id, template_recipients, options = DocuSign_eSign::CreateRecipientsOptions.default) ⇒ Array<(Recipients, Fixnum, Hash)>

Adds tabs for a recipient. Adds one or more recipients to a template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_recipients (optional parameter)
  • DocuSign_eSign::CreateRecipientsOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(Recipients, Fixnum, Hash)>)

    Recipients data, response status code and response headers



435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
# File 'lib/docusign_esign/api/templates_api.rb', line 435

def create_recipients_with_http_info(, template_id, template_recipients, options = DocuSign_eSign::CreateRecipientsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.create_recipients ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.create_recipients" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.create_recipients" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/recipients".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'resend_envelope'] = options.resend_envelope if !options.resend_envelope.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(template_recipients)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Recipients')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#create_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_tabs(account_id, recipient_id, template_id, template_tabs) ⇒ Tabs

Adds tabs for a recipient. Adds one or more tabs for a recipient.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • template_tabs (optional parameter)

Returns:



481
482
483
484
# File 'lib/docusign_esign/api/templates_api.rb', line 481

def create_tabs(, recipient_id, template_id, template_tabs)
  data, _status_code, _headers = create_tabs_with_http_info(, recipient_id, template_id,  template_tabs)
  return data
end

#create_tabs_with_http_info(account_id, recipient_id, template_id, template_tabs) ⇒ Array<(Tabs, Fixnum, Hash)>

Adds tabs for a recipient. Adds one or more tabs for a recipient.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • template_tabs (optional parameter)

Returns:

  • (Array<(Tabs, Fixnum, Hash)>)

    Tabs data, response status code and response headers



493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
# File 'lib/docusign_esign/api/templates_api.rb', line 493

def create_tabs_with_http_info(, recipient_id, template_id, template_tabs)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.create_tabs ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.create_tabs" if .nil?
  # verify the required parameter 'recipient_id' is set
  fail ArgumentError, "Missing the required parameter 'recipient_id' when calling TemplatesApi.create_tabs" if recipient_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.create_tabs" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(template_tabs)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Tabs')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#create_tabs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_template(account_id, envelope_template) ⇒ TemplateSummary

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: [[<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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • envelope_template (optional parameter)

Returns:



538
539
540
541
# File 'lib/docusign_esign/api/templates_api.rb', line 538

def create_template(, envelope_template)
  data, _status_code, _headers = create_template_with_http_info(,  envelope_template)
  return data
end

#create_template_with_http_info(account_id, envelope_template) ⇒ Array<(TemplateSummary, Fixnum, Hash)>

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 &#x60;emailSubject&#x60; 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 &#x60;emailSubject&#x60; property when creating the template or when sending an envelope from a template: [[&lt;roleName&gt;_UserName]] Example: &#x60;&quot;emailSubject&quot;:&quot;[[Signer 1_UserName]], Please sign this NDA&quot;,&#x60; To add a recipient’s email address in the subject line add the following text in the &#x60;emailSubject&#x60; property when creating the template or when sending an envelope from a template: [[&lt;roleName&gt;_Email]] Example: &#x60;&quot;emailSubject&quot;:&quot;[[Signer 1_Email]], Please sign this NDA&quot;,&#x60; In both cases the &lt;roleName&gt; is the recipient&#39;s contents of the &#x60;roleName&#x60; 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 [[&lt;roleName&gt;_UserName]] or [[&lt;roleName&gt;_Email]] is shown in the email subject.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • envelope_template (optional parameter)

Returns:

  • (Array<(TemplateSummary, Fixnum, Hash)>)

    TemplateSummary data, response status code and response headers



548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
# File 'lib/docusign_esign/api/templates_api.rb', line 548

def create_template_with_http_info(, envelope_template)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.create_template ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.create_template" if .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(envelope_template)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TemplateSummary')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#create_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_bulk_recipients(account_id, recipient_id, template_id) ⇒ BulkRecipientsUpdateResponse

Deletes the bulk recipient list on a template. Deletes the bulk recipient list on a template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

Returns:



590
591
592
593
# File 'lib/docusign_esign/api/templates_api.rb', line 590

def delete_bulk_recipients(, recipient_id, template_id)
  data, _status_code, _headers = delete_bulk_recipients_with_http_info(, recipient_id, template_id)
  return data
end

#delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id) ⇒ Array<(BulkRecipientsUpdateResponse, Fixnum, Hash)>

Deletes the bulk recipient list on a template. Deletes the bulk recipient list on a template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

Returns:



601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
# File 'lib/docusign_esign/api/templates_api.rb', line 601

def delete_bulk_recipients_with_http_info(, recipient_id, template_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.delete_bulk_recipients ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.delete_bulk_recipients" if .nil?
  # verify the required parameter 'recipient_id' is set
  fail ArgumentError, "Missing the required parameter 'recipient_id' when calling TemplatesApi.delete_bulk_recipients" if recipient_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.delete_bulk_recipients" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/bulk_recipients".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BulkRecipientsUpdateResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#delete_bulk_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_custom_fields(account_id, template_id, template_custom_fields) ⇒ CustomFields

Deletes envelope custom fields in a template. Deletes envelope custom fields in a template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_custom_fields (optional parameter)

Returns:



647
648
649
650
# File 'lib/docusign_esign/api/templates_api.rb', line 647

def delete_custom_fields(, template_id, template_custom_fields)
  data, _status_code, _headers = delete_custom_fields_with_http_info(, template_id,  template_custom_fields)
  return data
end

#delete_custom_fields_with_http_info(account_id, template_id, template_custom_fields) ⇒ Array<(CustomFields, Fixnum, Hash)>

Deletes envelope custom fields in a template. Deletes envelope custom fields in a template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_custom_fields (optional parameter)

Returns:

  • (Array<(CustomFields, Fixnum, Hash)>)

    CustomFields data, response status code and response headers



658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
# File 'lib/docusign_esign/api/templates_api.rb', line 658

def delete_custom_fields_with_http_info(, template_id, template_custom_fields)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.delete_custom_fields ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.delete_custom_fields" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.delete_custom_fields" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/custom_fields".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(template_custom_fields)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CustomFields')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#delete_custom_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_document_fields(account_id, document_id, template_id, document_fields_information) ⇒ DocumentFieldsInformation

Deletes custom document fields from an existing template document. Deletes custom document fields from an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • template_id

    The ID of the template being accessed.

  • document_fields_information (optional parameter)

Returns:



703
704
705
706
# File 'lib/docusign_esign/api/templates_api.rb', line 703

def delete_document_fields(, document_id, template_id, document_fields_information)
  data, _status_code, _headers = delete_document_fields_with_http_info(, document_id, template_id,  document_fields_information)
  return data
end

#delete_document_fields_with_http_info(account_id, document_id, template_id, document_fields_information) ⇒ Array<(DocumentFieldsInformation, Fixnum, Hash)>

Deletes custom document fields from an existing template document. Deletes custom document fields from an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • template_id

    The ID of the template being accessed.

  • document_fields_information (optional parameter)

Returns:

  • (Array<(DocumentFieldsInformation, Fixnum, Hash)>)

    DocumentFieldsInformation data, response status code and response headers



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
# File 'lib/docusign_esign/api/templates_api.rb', line 715

def delete_document_fields_with_http_info(, document_id, template_id, document_fields_information)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.delete_document_fields ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.delete_document_fields" if .nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.delete_document_fields" if document_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.delete_document_fields" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'documentId' + '}', document_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(document_fields_information)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentFieldsInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#delete_document_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_document_page(account_id, document_id, page_number, template_id, page_request) ⇒ nil

Deletes a page from a document in an template. Deletes a page from a document in a template based on the page number.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • page_number

    The page number being accessed.

  • template_id

    The ID of the template being accessed.

  • page_request (optional parameter)

Returns:

  • (nil)


763
764
765
766
# File 'lib/docusign_esign/api/templates_api.rb', line 763

def delete_document_page(, document_id, page_number, template_id, page_request)
  delete_document_page_with_http_info(, document_id, page_number, template_id,  page_request)
  return nil
end

#delete_document_page_with_http_info(account_id, document_id, page_number, template_id, page_request) ⇒ Array<(nil, Fixnum, Hash)>

Deletes a page from a document in an template. Deletes a page from a document in a template based on the page number.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • page_number

    The page number being accessed.

  • template_id

    The ID of the template being accessed.

  • page_request (optional parameter)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
# File 'lib/docusign_esign/api/templates_api.rb', line 776

def delete_document_page_with_http_info(, document_id, page_number, template_id, page_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.delete_document_page ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.delete_document_page" if .nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.delete_document_page" if document_id.nil?
  # verify the required parameter 'page_number' is set
  fail ArgumentError, "Missing the required parameter 'page_number' when calling TemplatesApi.delete_document_page" if page_number.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.delete_document_page" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'documentId' + '}', document_id.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(page_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#delete_document_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_documents(account_id, template_id, envelope_definition) ⇒ TemplateDocumentsResult

Deletes documents from a template. Deletes one or more documents from an existing template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • envelope_definition (optional parameter)

Returns:



823
824
825
826
# File 'lib/docusign_esign/api/templates_api.rb', line 823

def delete_documents(, template_id, envelope_definition)
  data, _status_code, _headers = delete_documents_with_http_info(, template_id,  envelope_definition)
  return data
end

#delete_documents_with_http_info(account_id, template_id, envelope_definition) ⇒ Array<(TemplateDocumentsResult, Fixnum, Hash)>

Deletes documents from a template. Deletes one or more documents from an existing template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • envelope_definition (optional parameter)

Returns:

  • (Array<(TemplateDocumentsResult, Fixnum, Hash)>)

    TemplateDocumentsResult data, response status code and response headers



834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
# File 'lib/docusign_esign/api/templates_api.rb', line 834

def delete_documents_with_http_info(, template_id, envelope_definition)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.delete_documents ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.delete_documents" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.delete_documents" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/documents".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(envelope_definition)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TemplateDocumentsResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#delete_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_group_share(account_id, template_id, template_part, group_information) ⇒ GroupInformation

Removes a member group’s sharing permissions for a template. Removes a member group’s sharing permissions for a specified template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_part

    Currently, the only defined part is groups.

  • group_information (optional parameter)

Returns:



879
880
881
882
# File 'lib/docusign_esign/api/templates_api.rb', line 879

def delete_group_share(, template_id, template_part, group_information)
  data, _status_code, _headers = delete_group_share_with_http_info(, template_id, template_part,  group_information)
  return data
end

#delete_group_share_with_http_info(account_id, template_id, template_part, group_information) ⇒ Array<(GroupInformation, Fixnum, Hash)>

Removes a member group&#39;s sharing permissions for a template. Removes a member group&#39;s sharing permissions for a specified template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_part

    Currently, the only defined part is groups.

  • group_information (optional parameter)

Returns:

  • (Array<(GroupInformation, Fixnum, Hash)>)

    GroupInformation data, response status code and response headers



891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
# File 'lib/docusign_esign/api/templates_api.rb', line 891

def delete_group_share_with_http_info(, template_id, template_part, group_information)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.delete_group_share ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.delete_group_share" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.delete_group_share" if template_id.nil?
  # verify the required parameter 'template_part' is set
  fail ArgumentError, "Missing the required parameter 'template_part' when calling TemplatesApi.delete_group_share" if template_part.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/{templatePart}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s).sub('{' + 'templatePart' + '}', template_part.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(group_information)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GroupInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#delete_group_share\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_lock(account_id, template_id, lock_request) ⇒ LockInformation

Deletes a template lock. Deletes the lock from the specified template. The ‘X-DocuSign-Edit` header must be included in the request.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • lock_request (optional parameter)

Returns:



937
938
939
940
# File 'lib/docusign_esign/api/templates_api.rb', line 937

def delete_lock(, template_id, lock_request)
  data, _status_code, _headers = delete_lock_with_http_info(, template_id,  lock_request)
  return data
end

#delete_lock_with_http_info(account_id, template_id, lock_request) ⇒ Array<(LockInformation, Fixnum, Hash)>

Deletes a template lock. Deletes the lock from the specified template. The &#x60;X-DocuSign-Edit&#x60; header must be included in the request.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • lock_request (optional parameter)

Returns:

  • (Array<(LockInformation, Fixnum, Hash)>)

    LockInformation data, response status code and response headers



948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
# File 'lib/docusign_esign/api/templates_api.rb', line 948

def delete_lock_with_http_info(, template_id, lock_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.delete_lock ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.delete_lock" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.delete_lock" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/lock".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(lock_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LockInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#delete_lock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_recipient(account_id, recipient_id, template_id, template_recipients) ⇒ Recipients

Deletes the specified recipient file from a template. Deletes the specified recipient file from the specified template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • template_recipients (optional parameter)

Returns:



993
994
995
996
# File 'lib/docusign_esign/api/templates_api.rb', line 993

def delete_recipient(, recipient_id, template_id, template_recipients)
  data, _status_code, _headers = delete_recipient_with_http_info(, recipient_id, template_id,  template_recipients)
  return data
end

#delete_recipient_with_http_info(account_id, recipient_id, template_id, template_recipients) ⇒ Array<(Recipients, Fixnum, Hash)>

Deletes the specified recipient file from a template. Deletes the specified recipient file from the specified template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • template_recipients (optional parameter)

Returns:

  • (Array<(Recipients, Fixnum, Hash)>)

    Recipients data, response status code and response headers



1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
# File 'lib/docusign_esign/api/templates_api.rb', line 1005

def delete_recipient_with_http_info(, recipient_id, template_id, template_recipients)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.delete_recipient ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.delete_recipient" if .nil?
  # verify the required parameter 'recipient_id' is set
  fail ArgumentError, "Missing the required parameter 'recipient_id' when calling TemplatesApi.delete_recipient" if recipient_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.delete_recipient" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(template_recipients)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Recipients')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#delete_recipient\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_recipients(account_id, template_id, template_recipients) ⇒ Recipients

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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_recipients (optional parameter)

Returns:



1051
1052
1053
1054
# File 'lib/docusign_esign/api/templates_api.rb', line 1051

def delete_recipients(, template_id, template_recipients)
  data, _status_code, _headers = delete_recipients_with_http_info(, template_id,  template_recipients)
  return data
end

#delete_recipients_with_http_info(account_id, template_id, template_recipients) ⇒ Array<(Recipients, Fixnum, Hash)>

Deletes recipients from a template. Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the &#x60;recipientId&#x60; being used as the key for deleting recipients.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_recipients (optional parameter)

Returns:

  • (Array<(Recipients, Fixnum, Hash)>)

    Recipients data, response status code and response headers



1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
# File 'lib/docusign_esign/api/templates_api.rb', line 1062

def delete_recipients_with_http_info(, template_id, template_recipients)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.delete_recipients ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.delete_recipients" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.delete_recipients" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/recipients".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(template_recipients)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Recipients')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#delete_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_tabs(account_id, recipient_id, template_id, template_tabs) ⇒ Tabs

Deletes the tabs associated with a recipient in a template. Deletes one or more tabs associated with a recipient in a template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • template_tabs (optional parameter)

Returns:



1107
1108
1109
1110
# File 'lib/docusign_esign/api/templates_api.rb', line 1107

def delete_tabs(, recipient_id, template_id, template_tabs)
  data, _status_code, _headers = delete_tabs_with_http_info(, recipient_id, template_id,  template_tabs)
  return data
end

#delete_tabs_with_http_info(account_id, recipient_id, template_id, template_tabs) ⇒ Array<(Tabs, Fixnum, Hash)>

Deletes the tabs associated with a recipient in a template. Deletes one or more tabs associated with a recipient in a template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • template_tabs (optional parameter)

Returns:

  • (Array<(Tabs, Fixnum, Hash)>)

    Tabs data, response status code and response headers



1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/docusign_esign/api/templates_api.rb', line 1119

def delete_tabs_with_http_info(, recipient_id, template_id, template_tabs)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.delete_tabs ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.delete_tabs" if .nil?
  # verify the required parameter 'recipient_id' is set
  fail ArgumentError, "Missing the required parameter 'recipient_id' when calling TemplatesApi.delete_tabs" if recipient_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.delete_tabs" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(template_tabs)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Tabs')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#delete_tabs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get(account_id, template_id, options = DocuSign_eSign::GetOptions.default) ⇒ EnvelopeTemplate

Gets a list of templates for a specified account. Retrieves the definition of the specified template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • DocuSign_eSign::GetOptions

    Options for modifying the behavior of the function.

Returns:



1165
1166
1167
1168
# File 'lib/docusign_esign/api/templates_api.rb', line 1165

def get(, template_id, options = DocuSign_eSign::GetOptions.default)
  data, _status_code, _headers = get_with_http_info(, template_id, options)
  return data
end

#get_document(account_id, document_id, template_id, options = DocuSign_eSign::GetDocumentOptions.default) ⇒ File

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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • template_id

    The ID of the template being accessed.

  • DocuSign_eSign::GetDocumentOptions

    Options for modifying the behavior of the function.

Returns:

  • (File)


1222
1223
1224
1225
# File 'lib/docusign_esign/api/templates_api.rb', line 1222

def get_document(, document_id, template_id, options = DocuSign_eSign::GetDocumentOptions.default)
  data, _status_code, _headers = get_document_with_http_info(, document_id, template_id, options)
  return data
end

#get_document_page_image(account_id, document_id, page_number, template_id, options = DocuSign_eSign::GetDocumentPageImageOptions.default) ⇒ File

Gets a page image from a template for display. Retrieves a page image for display from the specified template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • page_number

    The page number being accessed.

  • template_id

    The ID of the template being accessed.

  • DocuSign_eSign::GetDocumentPageImageOptions

    Options for modifying the behavior of the function.

Returns:

  • (File)


1284
1285
1286
1287
# File 'lib/docusign_esign/api/templates_api.rb', line 1284

def get_document_page_image(, document_id, page_number, template_id, options = DocuSign_eSign::GetDocumentPageImageOptions.default)
  data, _status_code, _headers = get_document_page_image_with_http_info(, document_id, page_number, template_id, options)
  return data
end

#get_document_page_image_with_http_info(account_id, document_id, page_number, template_id, options = DocuSign_eSign::GetDocumentPageImageOptions.default) ⇒ Array<(File, Fixnum, Hash)>

Gets a page image from a template for display. Retrieves a page image for display from the specified template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • page_number

    The page number being accessed.

  • template_id

    The ID of the template being accessed.

  • DocuSign_eSign::GetDocumentPageImageOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(File, Fixnum, Hash)>)

    File data, response status code and response headers



1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
# File 'lib/docusign_esign/api/templates_api.rb', line 1297

def get_document_page_image_with_http_info(, document_id, page_number, template_id, options = DocuSign_eSign::GetDocumentPageImageOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.get_document_page_image ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.get_document_page_image" if .nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.get_document_page_image" if document_id.nil?
  # verify the required parameter 'page_number' is set
  fail ArgumentError, "Missing the required parameter 'page_number' when calling TemplatesApi.get_document_page_image" if page_number.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get_document_page_image" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'documentId' + '}', document_id.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'dpi'] = options.dpi if !options.dpi.nil?
  query_params[:'max_height'] = options.max_height if !options.max_height.nil?
  query_params[:'max_width'] = options.max_width if !options.max_width.nil?
  query_params[:'show_changes'] = options.show_changes if !options.show_changes.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['image/png'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#get_document_page_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_document_with_http_info(account_id, document_id, template_id, options = DocuSign_eSign::GetDocumentOptions.default) ⇒ Array<(File, Fixnum, Hash)>

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 &#x60;combined&#x60; to retrieve all documents in the template as one pdf.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • template_id

    The ID of the template being accessed.

  • DocuSign_eSign::GetDocumentOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(File, Fixnum, Hash)>)

    File data, response status code and response headers



1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
# File 'lib/docusign_esign/api/templates_api.rb', line 1234

def get_document_with_http_info(, document_id, template_id, options = DocuSign_eSign::GetDocumentOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.get_document ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.get_document" if .nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.get_document" if document_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get_document" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'documentId' + '}', document_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'encrypt'] = options.encrypt if !options.encrypt.nil?
  query_params[:'show_changes'] = options.show_changes if !options.show_changes.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/pdf'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'File')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#get_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_lock(account_id, template_id) ⇒ LockInformation

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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

Returns:



1348
1349
1350
1351
# File 'lib/docusign_esign/api/templates_api.rb', line 1348

def get_lock(, template_id)
  data, _status_code, _headers = get_lock_with_http_info(, template_id)
  return data
end

#get_lock_with_http_info(account_id, template_id) ⇒ Array<(LockInformation, Fixnum, Hash)>

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 &#x60;X-DocuSign-Edit&#x60; header field and additional lock information is included in the response. This allows users to recover a lost editing session token and the &#x60;X-DocuSign-Edit&#x60; header.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

Returns:

  • (Array<(LockInformation, Fixnum, Hash)>)

    LockInformation data, response status code and response headers



1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
# File 'lib/docusign_esign/api/templates_api.rb', line 1358

def get_lock_with_http_info(, template_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.get_lock ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.get_lock" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get_lock" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/lock".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LockInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#get_lock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_notification_settings(account_id, template_id) ⇒ Notification

Gets template notification information. Retrieves the envelope notification, reminders and expirations, information for an existing template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

Returns:



1401
1402
1403
1404
# File 'lib/docusign_esign/api/templates_api.rb', line 1401

def get_notification_settings(, template_id)
  data, _status_code, _headers = get_notification_settings_with_http_info(, template_id)
  return data
end

#get_notification_settings_with_http_info(account_id, template_id) ⇒ Array<(Notification, Fixnum, Hash)>

Gets template notification information. Retrieves the envelope notification, reminders and expirations, information for an existing template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

Returns:

  • (Array<(Notification, Fixnum, Hash)>)

    Notification data, response status code and response headers



1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
# File 'lib/docusign_esign/api/templates_api.rb', line 1411

def get_notification_settings_with_http_info(, template_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.get_notification_settings ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.get_notification_settings" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get_notification_settings" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/notification".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Notification')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#get_notification_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_with_http_info(account_id, template_id, options = DocuSign_eSign::GetOptions.default) ⇒ Array<(EnvelopeTemplate, Fixnum, Hash)>

Gets a list of templates for a specified account. Retrieves the definition of the specified template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • DocuSign_eSign::GetOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(EnvelopeTemplate, Fixnum, Hash)>)

    EnvelopeTemplate data, response status code and response headers



1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
# File 'lib/docusign_esign/api/templates_api.rb', line 1176

def get_with_http_info(, template_id, options = DocuSign_eSign::GetOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.get ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.get" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'include'] = options.include if !options.include.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EnvelopeTemplate')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_bulk_recipients(account_id, recipient_id, template_id, options = DocuSign_eSign::ListBulkRecipientsOptions.default) ⇒ BulkRecipientsResponse

Gets the bulk recipient file from a template. Retrieves the bulk recipient file information from a template that has a bulk recipient.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • DocuSign_eSign::ListBulkRecipientsOptions

    Options for modifying the behavior of the function.

Returns:



1456
1457
1458
1459
# File 'lib/docusign_esign/api/templates_api.rb', line 1456

def list_bulk_recipients(, recipient_id, template_id, options = DocuSign_eSign::ListBulkRecipientsOptions.default)
  data, _status_code, _headers = list_bulk_recipients_with_http_info(, recipient_id, template_id, options)
  return data
end

#list_bulk_recipients_with_http_info(account_id, recipient_id, template_id, options = DocuSign_eSign::ListBulkRecipientsOptions.default) ⇒ Array<(BulkRecipientsResponse, Fixnum, Hash)>

Gets the bulk recipient file from a template. Retrieves the bulk recipient file information from a template that has a bulk recipient.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • DocuSign_eSign::ListBulkRecipientsOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(BulkRecipientsResponse, Fixnum, Hash)>)

    BulkRecipientsResponse data, response status code and response headers



1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
# File 'lib/docusign_esign/api/templates_api.rb', line 1468

def list_bulk_recipients_with_http_info(, recipient_id, template_id, options = DocuSign_eSign::ListBulkRecipientsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.list_bulk_recipients ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.list_bulk_recipients" if .nil?
  # verify the required parameter 'recipient_id' is set
  fail ArgumentError, "Missing the required parameter 'recipient_id' when calling TemplatesApi.list_bulk_recipients" if recipient_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.list_bulk_recipients" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/bulk_recipients".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'include_tabs'] = options.include_tabs if !options.include_tabs.nil?
  query_params[:'start_position'] = options.start_position if !options.start_position.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BulkRecipientsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#list_bulk_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_custom_fields(account_id, template_id) ⇒ CustomFields

Gets the custom document fields from a template. Retrieves the custom document field information from an existing template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

Returns:



1515
1516
1517
1518
# File 'lib/docusign_esign/api/templates_api.rb', line 1515

def list_custom_fields(, template_id)
  data, _status_code, _headers = list_custom_fields_with_http_info(, template_id)
  return data
end

#list_custom_fields_with_http_info(account_id, template_id) ⇒ Array<(CustomFields, Fixnum, Hash)>

Gets the custom document fields from a template. Retrieves the custom document field information from an existing template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

Returns:

  • (Array<(CustomFields, Fixnum, Hash)>)

    CustomFields data, response status code and response headers



1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
# File 'lib/docusign_esign/api/templates_api.rb', line 1525

def list_custom_fields_with_http_info(, template_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.list_custom_fields ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.list_custom_fields" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.list_custom_fields" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/custom_fields".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CustomFields')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#list_custom_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_document_fields(account_id, document_id, template_id) ⇒ DocumentFieldsInformation

Gets the custom document fields for a an existing template document. Retrieves the custom document fields for an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • template_id

    The ID of the template being accessed.

Returns:



1569
1570
1571
1572
# File 'lib/docusign_esign/api/templates_api.rb', line 1569

def list_document_fields(, document_id, template_id)
  data, _status_code, _headers = list_document_fields_with_http_info(, document_id, template_id)
  return data
end

#list_document_fields_with_http_info(account_id, document_id, template_id) ⇒ Array<(DocumentFieldsInformation, Fixnum, Hash)>

Gets the custom document fields for a an existing template document. Retrieves the custom document fields for an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • template_id

    The ID of the template being accessed.

Returns:

  • (Array<(DocumentFieldsInformation, Fixnum, Hash)>)

    DocumentFieldsInformation data, response status code and response headers



1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
# File 'lib/docusign_esign/api/templates_api.rb', line 1580

def list_document_fields_with_http_info(, document_id, template_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.list_document_fields ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.list_document_fields" if .nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.list_document_fields" if document_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.list_document_fields" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'documentId' + '}', document_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentFieldsInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#list_document_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_documents(account_id, template_id) ⇒ TemplateDocumentsResult

Gets a list of documents associated with a template. Retrieves a list of documents associated with the specified template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

Returns:



1625
1626
1627
1628
# File 'lib/docusign_esign/api/templates_api.rb', line 1625

def list_documents(, template_id)
  data, _status_code, _headers = list_documents_with_http_info(, template_id)
  return data
end

#list_documents_with_http_info(account_id, template_id) ⇒ Array<(TemplateDocumentsResult, Fixnum, Hash)>

Gets a list of documents associated with a template. Retrieves a list of documents associated with the specified template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

Returns:

  • (Array<(TemplateDocumentsResult, Fixnum, Hash)>)

    TemplateDocumentsResult data, response status code and response headers



1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
# File 'lib/docusign_esign/api/templates_api.rb', line 1635

def list_documents_with_http_info(, template_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.list_documents ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.list_documents" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.list_documents" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/documents".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TemplateDocumentsResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#list_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_recipients(account_id, template_id, options = DocuSign_eSign::ListRecipientsOptions.default) ⇒ Recipients

Gets recipient information from a template. Retrieves the information for all recipients in the specified template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • DocuSign_eSign::ListRecipientsOptions

    Options for modifying the behavior of the function.

Returns:



1679
1680
1681
1682
# File 'lib/docusign_esign/api/templates_api.rb', line 1679

def list_recipients(, template_id, options = DocuSign_eSign::ListRecipientsOptions.default)
  data, _status_code, _headers = list_recipients_with_http_info(, template_id, options)
  return data
end

#list_recipients_with_http_info(account_id, template_id, options = DocuSign_eSign::ListRecipientsOptions.default) ⇒ Array<(Recipients, Fixnum, Hash)>

Gets recipient information from a template. Retrieves the information for all recipients in the specified template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • DocuSign_eSign::ListRecipientsOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(Recipients, Fixnum, Hash)>)

    Recipients data, response status code and response headers



1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
# File 'lib/docusign_esign/api/templates_api.rb', line 1690

def list_recipients_with_http_info(, template_id, options = DocuSign_eSign::ListRecipientsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.list_recipients ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.list_recipients" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.list_recipients" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/recipients".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'include_anchor_tab_locations'] = options.include_anchor_tab_locations if !options.include_anchor_tab_locations.nil?
  query_params[:'include_extended'] = options.include_extended if !options.include_extended.nil?
  query_params[:'include_tabs'] = options.include_tabs if !options.include_tabs.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Recipients')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#list_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_tabs(account_id, recipient_id, template_id, options = DocuSign_eSign::ListTabsOptions.default) ⇒ Tabs

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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • DocuSign_eSign::ListTabsOptions

    Options for modifying the behavior of the function.

Returns:



1738
1739
1740
1741
# File 'lib/docusign_esign/api/templates_api.rb', line 1738

def list_tabs(, recipient_id, template_id, options = DocuSign_eSign::ListTabsOptions.default)
  data, _status_code, _headers = list_tabs_with_http_info(, recipient_id, template_id, options)
  return data
end

#list_tabs_with_http_info(account_id, recipient_id, template_id, options = DocuSign_eSign::ListTabsOptions.default) ⇒ Array<(Tabs, Fixnum, Hash)>

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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • DocuSign_eSign::ListTabsOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(Tabs, Fixnum, Hash)>)

    Tabs data, response status code and response headers



1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
# File 'lib/docusign_esign/api/templates_api.rb', line 1750

def list_tabs_with_http_info(, recipient_id, template_id, options = DocuSign_eSign::ListTabsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.list_tabs ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.list_tabs" if .nil?
  # verify the required parameter 'recipient_id' is set
  fail ArgumentError, "Missing the required parameter 'recipient_id' when calling TemplatesApi.list_tabs" if recipient_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.list_tabs" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'include_anchor_tab_locations'] = options.include_anchor_tab_locations if !options.include_anchor_tab_locations.nil?
  query_params[:'include_metadata'] = options. if !options..nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Tabs')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#list_tabs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_templates(account_id, options = DocuSign_eSign::ListTemplatesOptions.default) ⇒ EnvelopeTemplateResults

Gets the definition of a template. Retrieves the list of templates for the specified account. The request can be limited to a specific folder.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::ListTemplatesOptions

    Options for modifying the behavior of the function.

Returns:



1797
1798
1799
1800
# File 'lib/docusign_esign/api/templates_api.rb', line 1797

def list_templates(, options = DocuSign_eSign::ListTemplatesOptions.default)
  data, _status_code, _headers = list_templates_with_http_info(, options)
  return data
end

#list_templates_with_http_info(account_id, options = DocuSign_eSign::ListTemplatesOptions.default) ⇒ Array<(EnvelopeTemplateResults, Fixnum, Hash)>

Gets the definition of a template. Retrieves the list of templates for the specified account. The request can be limited to a specific folder.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • DocuSign_eSign::ListTemplatesOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(EnvelopeTemplateResults, Fixnum, Hash)>)

    EnvelopeTemplateResults data, response status code and response headers



1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
# File 'lib/docusign_esign/api/templates_api.rb', line 1807

def list_templates_with_http_info(, options = DocuSign_eSign::ListTemplatesOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.list_templates ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.list_templates" if .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}
  query_params[:'count'] = options.count if !options.count.nil?
  query_params[:'folder'] = options.folder if !options.folder.nil?
  query_params[:'folder_ids'] = options.folder_ids if !options.folder_ids.nil?
  query_params[:'from_date'] = options.from_date if !options.from_date.nil?
  query_params[:'include'] = options.include if !options.include.nil?
  query_params[:'order'] = options.order if !options.order.nil?
  query_params[:'order_by'] = options.order_by if !options.order_by.nil?
  query_params[:'search_text'] = options.search_text if !options.search_text.nil?
  query_params[:'shared'] = options.shared if !options.shared.nil?
  query_params[:'shared_by_me'] = options.shared_by_me if !options.shared_by_me.nil?
  query_params[:'start_position'] = options.start_position if !options.start_position.nil?
  query_params[:'to_date'] = options.to_date if !options.to_date.nil?
  query_params[:'used_from_date'] = options.used_from_date if !options.used_from_date.nil?
  query_params[:'used_to_date'] = options.used_to_date if !options.used_to_date.nil?
  query_params[:'user_filter'] = options.user_filter if !options.user_filter.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EnvelopeTemplateResults')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#list_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#rotate_document_page(account_id, document_id, page_number, template_id, page_request) ⇒ nil

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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • page_number

    The page number being accessed.

  • template_id

    The ID of the template being accessed.

  • page_request (optional parameter)

Returns:

  • (nil)


1866
1867
1868
1869
# File 'lib/docusign_esign/api/templates_api.rb', line 1866

def rotate_document_page(, document_id, page_number, template_id, page_request)
  rotate_document_page_with_http_info(, document_id, page_number, template_id,  page_request)
  return nil
end

#rotate_document_page_with_http_info(account_id, document_id, page_number, template_id, page_request) ⇒ Array<(nil, Fixnum, Hash)>

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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • page_number

    The page number being accessed.

  • template_id

    The ID of the template being accessed.

  • page_request (optional parameter)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
# File 'lib/docusign_esign/api/templates_api.rb', line 1879

def rotate_document_page_with_http_info(, document_id, page_number, template_id, page_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.rotate_document_page ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.rotate_document_page" if .nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.rotate_document_page" if document_id.nil?
  # verify the required parameter 'page_number' is set
  fail ArgumentError, "Missing the required parameter 'page_number' when calling TemplatesApi.rotate_document_page" if page_number.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.rotate_document_page" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'documentId' + '}', document_id.to_s).sub('{' + 'pageNumber' + '}', page_number.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(page_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#rotate_document_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update(account_id, template_id, envelope_template) ⇒ TemplateUpdateSummary

Updates an existing template. Updates an existing template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • envelope_template (optional parameter)

Returns:



1926
1927
1928
1929
# File 'lib/docusign_esign/api/templates_api.rb', line 1926

def update(, template_id, envelope_template)
  data, _status_code, _headers = update_with_http_info(, template_id,  envelope_template)
  return data
end

#update_bulk_recipients(account_id, recipient_id, template_id, bulk_recipients_request) ⇒ BulkRecipientsSummaryResponse

Adds or replaces the bulk recipients list in a template. Updates the bulk recipients in a template using a file upload. The Content-Type supported for uploading a bulk recipient file is CSV (text/csv). The REST API does not support modifying individual rows or values in the bulk recipients file. It only allows the entire file to be added or replaced with a new file.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • bulk_recipients_request (optional parameter)

Returns:



1982
1983
1984
1985
# File 'lib/docusign_esign/api/templates_api.rb', line 1982

def update_bulk_recipients(, recipient_id, template_id, bulk_recipients_request)
  data, _status_code, _headers = update_bulk_recipients_with_http_info(, recipient_id, template_id,  bulk_recipients_request)
  return data
end

#update_bulk_recipients_with_http_info(account_id, recipient_id, template_id, bulk_recipients_request) ⇒ Array<(BulkRecipientsSummaryResponse, Fixnum, Hash)>

Adds or replaces the bulk recipients list in a template. Updates the bulk recipients in a template using a file upload. The Content-Type supported for uploading a bulk recipient file is CSV (text/csv). The REST API does not support modifying individual rows or values in the bulk recipients file. It only allows the entire file to be added or replaced with a new file.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • bulk_recipients_request (optional parameter)

Returns:



1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
# File 'lib/docusign_esign/api/templates_api.rb', line 1994

def update_bulk_recipients_with_http_info(, recipient_id, template_id, bulk_recipients_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.update_bulk_recipients ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.update_bulk_recipients" if .nil?
  # verify the required parameter 'recipient_id' is set
  fail ArgumentError, "Missing the required parameter 'recipient_id' when calling TemplatesApi.update_bulk_recipients" if recipient_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update_bulk_recipients" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/bulk_recipients".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(bulk_recipients_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'BulkRecipientsSummaryResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#update_bulk_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_custom_fields(account_id, template_id, template_custom_fields) ⇒ CustomFields

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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_custom_fields (optional parameter)

Returns:



2040
2041
2042
2043
# File 'lib/docusign_esign/api/templates_api.rb', line 2040

def update_custom_fields(, template_id, template_custom_fields)
  data, _status_code, _headers = update_custom_fields_with_http_info(, template_id,  template_custom_fields)
  return data
end

#update_custom_fields_with_http_info(account_id, template_id, template_custom_fields) ⇒ Array<(CustomFields, Fixnum, Hash)>

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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_custom_fields (optional parameter)

Returns:

  • (Array<(CustomFields, Fixnum, Hash)>)

    CustomFields data, response status code and response headers



2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
# File 'lib/docusign_esign/api/templates_api.rb', line 2051

def update_custom_fields_with_http_info(, template_id, template_custom_fields)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.update_custom_fields ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.update_custom_fields" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update_custom_fields" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/custom_fields".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(template_custom_fields)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CustomFields')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#update_custom_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_document(account_id, document_id, template_id, envelope_definition, options = DocuSign_eSign::UpdateDocumentOptions.default) ⇒ EnvelopeDocument

Adds a document to a template document. Adds the specified document to an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • template_id

    The ID of the template being accessed.

  • envelope_definition (optional parameter)
  • DocuSign_eSign::UpdateDocumentOptions

    Options for modifying the behavior of the function.

Returns:



2097
2098
2099
2100
# File 'lib/docusign_esign/api/templates_api.rb', line 2097

def update_document(, document_id, template_id, envelope_definition, options = DocuSign_eSign::UpdateDocumentOptions.default)
  data, _status_code, _headers = update_document_with_http_info(, document_id, template_id,  envelope_definition, options)
  return data
end

#update_document_fields(account_id, document_id, template_id, document_fields_information) ⇒ DocumentFieldsInformation

Updates existing custom document fields in an existing template document. Updates existing custom document fields in an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • template_id

    The ID of the template being accessed.

  • document_fields_information (optional parameter)

Returns:



2159
2160
2161
2162
# File 'lib/docusign_esign/api/templates_api.rb', line 2159

def update_document_fields(, document_id, template_id, document_fields_information)
  data, _status_code, _headers = update_document_fields_with_http_info(, document_id, template_id,  document_fields_information)
  return data
end

#update_document_fields_with_http_info(account_id, document_id, template_id, document_fields_information) ⇒ Array<(DocumentFieldsInformation, Fixnum, Hash)>

Updates existing custom document fields in an existing template document. Updates existing custom document fields in an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • template_id

    The ID of the template being accessed.

  • document_fields_information (optional parameter)

Returns:

  • (Array<(DocumentFieldsInformation, Fixnum, Hash)>)

    DocumentFieldsInformation data, response status code and response headers



2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
# File 'lib/docusign_esign/api/templates_api.rb', line 2171

def update_document_fields_with_http_info(, document_id, template_id, document_fields_information)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.update_document_fields ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.update_document_fields" if .nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.update_document_fields" if document_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update_document_fields" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'documentId' + '}', document_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(document_fields_information)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocumentFieldsInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#update_document_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_document_with_http_info(account_id, document_id, template_id, envelope_definition, options = DocuSign_eSign::UpdateDocumentOptions.default) ⇒ Array<(EnvelopeDocument, Fixnum, Hash)>

Adds a document to a template document. Adds the specified document to an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • document_id

    The ID of the document being accessed.

  • template_id

    The ID of the template being accessed.

  • envelope_definition (optional parameter)
  • DocuSign_eSign::UpdateDocumentOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(EnvelopeDocument, Fixnum, Hash)>)

    EnvelopeDocument data, response status code and response headers



2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
# File 'lib/docusign_esign/api/templates_api.rb', line 2110

def update_document_with_http_info(, document_id, template_id, envelope_definition, options = DocuSign_eSign::UpdateDocumentOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.update_document ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.update_document" if .nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.update_document" if document_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update_document" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/documents/{documentId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'documentId' + '}', document_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'apply_document_fields'] = options.apply_document_fields if !options.apply_document_fields.nil?
  query_params[:'is_envelope_definition'] = options.is_envelope_definition if !options.is_envelope_definition.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(envelope_definition)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EnvelopeDocument')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#update_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_documents(account_id, template_id, envelope_definition, options = DocuSign_eSign::UpdateDocumentsOptions.default) ⇒ TemplateDocumentsResult

Adds documents to a template document. Adds one or more documents to an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • envelope_definition (optional parameter)
  • DocuSign_eSign::UpdateDocumentsOptions

    Options for modifying the behavior of the function.

Returns:



2218
2219
2220
2221
# File 'lib/docusign_esign/api/templates_api.rb', line 2218

def update_documents(, template_id, envelope_definition, options = DocuSign_eSign::UpdateDocumentsOptions.default)
  data, _status_code, _headers = update_documents_with_http_info(, template_id,  envelope_definition, options)
  return data
end

#update_documents_with_http_info(account_id, template_id, envelope_definition, options = DocuSign_eSign::UpdateDocumentsOptions.default) ⇒ Array<(TemplateDocumentsResult, Fixnum, Hash)>

Adds documents to a template document. Adds one or more documents to an existing template document.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • envelope_definition (optional parameter)
  • DocuSign_eSign::UpdateDocumentsOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(TemplateDocumentsResult, Fixnum, Hash)>)

    TemplateDocumentsResult data, response status code and response headers



2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
# File 'lib/docusign_esign/api/templates_api.rb', line 2230

def update_documents_with_http_info(, template_id, envelope_definition, options = DocuSign_eSign::UpdateDocumentsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.update_documents ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.update_documents" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update_documents" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/documents".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'apply_document_fields'] = options.apply_document_fields if !options.apply_document_fields.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(envelope_definition)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TemplateDocumentsResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#update_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_group_share(account_id, template_id, template_part, group_information) ⇒ GroupInformation

Shares a template with a group Shares a template with the specified members group.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_part

    Currently, the only defined part is groups.

  • group_information (optional parameter)

Returns:



2276
2277
2278
2279
# File 'lib/docusign_esign/api/templates_api.rb', line 2276

def update_group_share(, template_id, template_part, group_information)
  data, _status_code, _headers = update_group_share_with_http_info(, template_id, template_part,  group_information)
  return data
end

#update_group_share_with_http_info(account_id, template_id, template_part, group_information) ⇒ Array<(GroupInformation, Fixnum, Hash)>

Shares a template with a group Shares a template with the specified members group.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_part

    Currently, the only defined part is groups.

  • group_information (optional parameter)

Returns:

  • (Array<(GroupInformation, Fixnum, Hash)>)

    GroupInformation data, response status code and response headers



2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
# File 'lib/docusign_esign/api/templates_api.rb', line 2288

def update_group_share_with_http_info(, template_id, template_part, group_information)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.update_group_share ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.update_group_share" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update_group_share" if template_id.nil?
  # verify the required parameter 'template_part' is set
  fail ArgumentError, "Missing the required parameter 'template_part' when calling TemplatesApi.update_group_share" if template_part.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/{templatePart}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s).sub('{' + 'templatePart' + '}', template_part.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(group_information)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GroupInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#update_group_share\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_lock(account_id, template_id, lock_request) ⇒ LockInformation

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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • lock_request (optional parameter)

Returns:



2334
2335
2336
2337
# File 'lib/docusign_esign/api/templates_api.rb', line 2334

def update_lock(, template_id, lock_request)
  data, _status_code, _headers = update_lock_with_http_info(, template_id,  lock_request)
  return data
end

#update_lock_with_http_info(account_id, template_id, lock_request) ⇒ Array<(LockInformation, Fixnum, Hash)>

Updates a template lock. Updates the lock duration time or update the &#x60;lockedByApp&#x60; property information for the specified template. The user and integrator key must match the user specified by the &#x60;lockByUser&#x60; property and integrator key information and the &#x60;X-DocuSign-Edit&#x60; header must be included or an error will be generated.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • lock_request (optional parameter)

Returns:

  • (Array<(LockInformation, Fixnum, Hash)>)

    LockInformation data, response status code and response headers



2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
# File 'lib/docusign_esign/api/templates_api.rb', line 2345

def update_lock_with_http_info(, template_id, lock_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.update_lock ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.update_lock" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update_lock" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/lock".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(lock_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LockInformation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#update_lock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_notification_settings(account_id, template_id, template_notification_request) ⇒ Notification

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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_notification_request (optional parameter)

Returns:



2389
2390
2391
2392
# File 'lib/docusign_esign/api/templates_api.rb', line 2389

def update_notification_settings(, template_id, template_notification_request)
  data, _status_code, _headers = update_notification_settings_with_http_info(, template_id,  template_notification_request)
  return data
end

#update_notification_settings_with_http_info(account_id, template_id, template_notification_request) ⇒ Array<(Notification, Fixnum, Hash)>

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.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_notification_request (optional parameter)

Returns:

  • (Array<(Notification, Fixnum, Hash)>)

    Notification data, response status code and response headers



2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
# File 'lib/docusign_esign/api/templates_api.rb', line 2400

def update_notification_settings_with_http_info(, template_id, template_notification_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.update_notification_settings ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.update_notification_settings" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update_notification_settings" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/notification".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(template_notification_request)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Notification')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#update_notification_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_recipients(account_id, template_id, template_recipients, options = DocuSign_eSign::UpdateRecipientsOptions.default) ⇒ RecipientsUpdateSummary

Updates recipients in a template. Updates recipients in a template. You can edit the following properties: ‘email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_recipients (optional parameter)
  • DocuSign_eSign::UpdateRecipientsOptions

    Options for modifying the behavior of the function.

Returns:



2445
2446
2447
2448
# File 'lib/docusign_esign/api/templates_api.rb', line 2445

def update_recipients(, template_id, template_recipients, options = DocuSign_eSign::UpdateRecipientsOptions.default)
  data, _status_code, _headers = update_recipients_with_http_info(, template_id,  template_recipients, options)
  return data
end

#update_recipients_with_http_info(account_id, template_id, template_recipients, options = DocuSign_eSign::UpdateRecipientsOptions.default) ⇒ Array<(RecipientsUpdateSummary, Fixnum, Hash)>

Updates recipients in a template. Updates recipients in a template. You can edit the following properties: &#x60;email&#x60;, &#x60;userName&#x60;, &#x60;routingOrder&#x60;, &#x60;faxNumber&#x60;, &#x60;deliveryMethod&#x60;, &#x60;accessCode&#x60;, and &#x60;requireIdLookup&#x60;.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • template_recipients (optional parameter)
  • DocuSign_eSign::UpdateRecipientsOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(RecipientsUpdateSummary, Fixnum, Hash)>)

    RecipientsUpdateSummary data, response status code and response headers



2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
# File 'lib/docusign_esign/api/templates_api.rb', line 2457

def update_recipients_with_http_info(, template_id, template_recipients, options = DocuSign_eSign::UpdateRecipientsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.update_recipients ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.update_recipients" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update_recipients" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/recipients".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'resend_envelope'] = options.resend_envelope if !options.resend_envelope.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(template_recipients)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RecipientsUpdateSummary')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#update_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_tabs(account_id, recipient_id, template_id, template_tabs) ⇒ Tabs

Updates the tabs for a recipient. Updates one or more tabs for a recipient in a template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • template_tabs (optional parameter)

Returns:



2503
2504
2505
2506
# File 'lib/docusign_esign/api/templates_api.rb', line 2503

def update_tabs(, recipient_id, template_id, template_tabs)
  data, _status_code, _headers = update_tabs_with_http_info(, recipient_id, template_id,  template_tabs)
  return data
end

#update_tabs_with_http_info(account_id, recipient_id, template_id, template_tabs) ⇒ Array<(Tabs, Fixnum, Hash)>

Updates the tabs for a recipient. Updates one or more tabs for a recipient in a template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • recipient_id

    The ID of the recipient being accessed.

  • template_id

    The ID of the template being accessed.

  • template_tabs (optional parameter)

Returns:

  • (Array<(Tabs, Fixnum, Hash)>)

    Tabs data, response status code and response headers



2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
# File 'lib/docusign_esign/api/templates_api.rb', line 2515

def update_tabs_with_http_info(, recipient_id, template_id, template_tabs)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.update_tabs ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.update_tabs" if .nil?
  # verify the required parameter 'recipient_id' is set
  fail ArgumentError, "Missing the required parameter 'recipient_id' when calling TemplatesApi.update_tabs" if recipient_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update_tabs" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'recipientId' + '}', recipient_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(template_tabs)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Tabs')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#update_tabs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_with_http_info(account_id, template_id, envelope_template) ⇒ Array<(TemplateUpdateSummary, Fixnum, Hash)>

Updates an existing template. Updates an existing template.

Parameters:

  • account_id

    The external account number (int) or account ID Guid.

  • template_id

    The ID of the template being accessed.

  • envelope_template (optional parameter)

Returns:

  • (Array<(TemplateUpdateSummary, Fixnum, Hash)>)

    TemplateUpdateSummary data, response status code and response headers



1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
# File 'lib/docusign_esign/api/templates_api.rb', line 1937

def update_with_http_info(, template_id, envelope_template)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.update ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.update" if .nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update" if template_id.nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/templates/{templateId}".sub('{format}','json').sub('{' + 'accountId' + '}', .to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(envelope_template)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TemplateUpdateSummary')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end