class DocuSign_eSign::TemplatesApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = TemplatesApi.default) click to toggle source
# File lib/docusign_esign/api/templates_api.rb, line 245
def initialize(api_client = TemplatesApi.default)
  @api_client = api_client
end

Public Instance Methods

create_custom_fields(account_id, template_id, template_custom_fields) click to toggle source

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_custom_fields (optional parameter) @return [CustomFields]

# File lib/docusign_esign/api/templates_api.rb, line 255
def create_custom_fields(account_id, template_id, template_custom_fields)
  data, _status_code, _headers = create_custom_fields_with_http_info(account_id, template_id,  template_custom_fields)
  return data
end
create_custom_fields_with_http_info(account_id, template_id, template_custom_fields) click to toggle source

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_custom_fields (optional parameter) @return [Array<(CustomFields, Fixnum, Hash)>] CustomFields data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 266
def create_custom_fields_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/custom_fields".sub('{format}','json').sub('{' + 'accountId' + '}', account_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_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) click to toggle source

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param document_fields_information (optional parameter) @return [DocumentFieldsInformation]

# File lib/docusign_esign/api/templates_api.rb, line 311
def create_document_fields(account_id, document_id, template_id, document_fields_information)
  data, _status_code, _headers = create_document_fields_with_http_info(account_id, 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) click to toggle source

Creates custom document fields in an existing template document. Creates custom document fields in an existing template document. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param document_fields_information (optional parameter) @return [Array<(DocumentFieldsInformation, Fixnum, Hash)>] DocumentFieldsInformation data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 323
def create_document_fields_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

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

@param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param return_url_request (optional parameter) @return [ViewUrl]

# File lib/docusign_esign/api/templates_api.rb, line 369
def create_edit_view(account_id, template_id, return_url_request)
  data, _status_code, _headers = create_edit_view_with_http_info(account_id, template_id,  return_url_request)
  return data
end
create_edit_view_with_http_info(account_id, template_id, return_url_request) click to toggle source

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

@param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param return_url_request (optional parameter) @return [Array<(ViewUrl, Fixnum, Hash)>] ViewUrl data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 380
def create_edit_view_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/views/edit".sub('{format}','json').sub('{' + 'accountId' + '}', account_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(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) click to toggle source

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). @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param lock_request (optional parameter) @return [LockInformation]

# File lib/docusign_esign/api/templates_api.rb, line 424
def create_lock(account_id, template_id, lock_request)
  data, _status_code, _headers = create_lock_with_http_info(account_id, template_id,  lock_request)
  return data
end
create_lock_with_http_info(account_id, template_id, lock_request) click to toggle source

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). @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param lock_request (optional parameter) @return [Array<(LockInformation, Fixnum, Hash)>] LockInformation data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 435
def create_lock_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/lock".sub('{format}','json').sub('{' + 'accountId' + '}', account_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(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) click to toggle source

Adds tabs for a recipient. Adds one or more recipients to a template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_recipients (optional parameter) @param DocuSign_eSign::CreateRecipientsOptions Options for modifying the behavior of the function. @return [Recipients]

# File lib/docusign_esign/api/templates_api.rb, line 480
def create_recipients(account_id, template_id, template_recipients, options = DocuSign_eSign::CreateRecipientsOptions.default)
  data, _status_code, _headers = create_recipients_with_http_info(account_id, template_id,  template_recipients, options)
  return data
end
create_recipients_with_http_info(account_id, template_id, template_recipients, options = DocuSign_eSign::CreateRecipientsOptions.default) click to toggle source

Adds tabs for a recipient. Adds one or more recipients to a template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_recipients (optional parameter) @param DocuSign_eSign::CreateRecipientsOptions Options for modifying the behavior of the function. @return [Array<(Recipients, Fixnum, Hash)>] Recipients data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 492
def create_recipients_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/recipients".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

Adds tabs for a recipient. Adds one or more tabs for a recipient. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @param template_tabs (optional parameter) @return [Tabs]

# File lib/docusign_esign/api/templates_api.rb, line 538
def create_tabs(account_id, recipient_id, template_id, template_tabs)
  data, _status_code, _headers = create_tabs_with_http_info(account_id, recipient_id, template_id,  template_tabs)
  return data
end
create_tabs_with_http_info(account_id, recipient_id, template_id, template_tabs) click to toggle source

Adds tabs for a recipient. Adds one or more tabs for a recipient. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @param template_tabs (optional parameter) @return [Array<(Tabs, Fixnum, Hash)>] Tabs data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 550
def create_tabs_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param envelope_template (optional parameter) @return [TemplateSummary]

# File lib/docusign_esign/api/templates_api.rb, line 595
def create_template(account_id, envelope_template)
  data, _status_code, _headers = create_template_with_http_info(account_id,  envelope_template)
  return data
end
create_template_document_responsive_html_preview(account_id, document_id, template_id, document_html_definition) click to toggle source

Post Responsive HTML Preview for a document in a template.

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param document_html_definition (optional parameter) @return [DocumentHtmlDefinitions]

# File lib/docusign_esign/api/templates_api.rb, line 648
def create_template_document_responsive_html_preview(account_id, document_id, template_id, document_html_definition)
  data, _status_code, _headers = create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id,  document_html_definition)
  return data
end
create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, document_html_definition) click to toggle source

Post Responsive HTML Preview for a document in a template.

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param document_html_definition (optional parameter) @return [Array<(DocumentHtmlDefinitions, Fixnum, Hash)>] DocumentHtmlDefinitions data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 660
def create_template_document_responsive_html_preview_with_http_info(account_id, document_id, template_id, document_html_definition)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.create_template_document_responsive_html_preview ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.create_template_document_responsive_html_preview" if account_id.nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.create_template_document_responsive_html_preview" if document_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.create_template_document_responsive_html_preview" if template_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/responsive_html_preview".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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_html_definition)
  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 => 'DocumentHtmlDefinitions')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#create_template_document_responsive_html_preview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_template_document_tabs(account_id, document_id, template_id, template_tabs) click to toggle source

Adds the tabs to a tempate

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param template_tabs (optional parameter) @return [Tabs]

# File lib/docusign_esign/api/templates_api.rb, line 707
def create_template_document_tabs(account_id, document_id, template_id, template_tabs)
  data, _status_code, _headers = create_template_document_tabs_with_http_info(account_id, document_id, template_id,  template_tabs)
  return data
end
create_template_document_tabs_with_http_info(account_id, document_id, template_id, template_tabs) click to toggle source

Adds the tabs to a tempate

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param template_tabs (optional parameter) @return [Array<(Tabs, Fixnum, Hash)>] Tabs data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 719
def create_template_document_tabs_with_http_info(account_id, document_id, template_id, template_tabs)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.create_template_document_tabs ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.create_template_document_tabs" if account_id.nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.create_template_document_tabs" if document_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.create_template_document_tabs" if template_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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(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_template_document_tabs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_template_recipient_preview(account_id, template_id, recipient_preview_request) click to toggle source

Provides a URL to start a recipient view of the Envelope UI

@param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param recipient_preview_request (optional parameter) @return [ViewUrl]

# File lib/docusign_esign/api/templates_api.rb, line 765
def create_template_recipient_preview(account_id, template_id, recipient_preview_request)
  data, _status_code, _headers = create_template_recipient_preview_with_http_info(account_id, template_id,  recipient_preview_request)
  return data
end
create_template_recipient_preview_with_http_info(account_id, template_id, recipient_preview_request) click to toggle source

Provides a URL to start a recipient view of the Envelope UI

@param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param recipient_preview_request (optional parameter) @return [Array<(ViewUrl, Fixnum, Hash)>] ViewUrl data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 776
def create_template_recipient_preview_with_http_info(account_id, template_id, recipient_preview_request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.create_template_recipient_preview ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.create_template_recipient_preview" if account_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.create_template_recipient_preview" if template_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates/{templateId}/views/recipient_preview".sub('{format}','json').sub('{' + 'accountId' + '}', account_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(recipient_preview_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_template_recipient_preview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_template_responsive_html_preview(account_id, template_id, document_html_definition) click to toggle source

Get Responsive HTML Preview for all documents in a template.

@param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param document_html_definition (optional parameter) @return [DocumentHtmlDefinitions]

# File lib/docusign_esign/api/templates_api.rb, line 820
def create_template_responsive_html_preview(account_id, template_id, document_html_definition)
  data, _status_code, _headers = create_template_responsive_html_preview_with_http_info(account_id, template_id,  document_html_definition)
  return data
end
create_template_responsive_html_preview_with_http_info(account_id, template_id, document_html_definition) click to toggle source

Get Responsive HTML Preview for all documents in a template.

@param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param document_html_definition (optional parameter) @return [Array<(DocumentHtmlDefinitions, Fixnum, Hash)>] DocumentHtmlDefinitions data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 831
def create_template_responsive_html_preview_with_http_info(account_id, template_id, document_html_definition)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.create_template_responsive_html_preview ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.create_template_responsive_html_preview" if account_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.create_template_responsive_html_preview" if template_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates/{templateId}/responsive_html_preview".sub('{format}','json').sub('{' + 'accountId' + '}', account_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_html_definition)
  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 => 'DocumentHtmlDefinitions')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#create_template_responsive_html_preview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
create_template_with_http_info(account_id, envelope_template) click to toggle source

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&#39;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&#39;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&#39;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. @param account_id The external account number (int) or account ID Guid. @param envelope_template (optional parameter) @return [Array<(TemplateSummary, Fixnum, Hash)>] TemplateSummary data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 605
def create_template_with_http_info(account_id, 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 account_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates".sub('{format}','json').sub('{' + 'accountId' + '}', account_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(: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) click to toggle source

Deletes the bulk recipient list on a template. Deletes the bulk recipient list on a template. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @return [BulkRecipientsUpdateResponse]

# File lib/docusign_esign/api/templates_api.rb, line 875
def delete_bulk_recipients(account_id, recipient_id, template_id)
  data, _status_code, _headers = delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id)
  return data
end
delete_bulk_recipients_with_http_info(account_id, recipient_id, template_id) click to toggle source

Deletes the bulk recipient list on a template. Deletes the bulk recipient list on a template. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @return [Array<(BulkRecipientsUpdateResponse, Fixnum, Hash)>] BulkRecipientsUpdateResponse data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 886
def delete_bulk_recipients_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/bulk_recipients".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

Deletes envelope custom fields in a template. Deletes envelope custom fields in a template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_custom_fields (optional parameter) @return [CustomFields]

# File lib/docusign_esign/api/templates_api.rb, line 932
def delete_custom_fields(account_id, template_id, template_custom_fields)
  data, _status_code, _headers = delete_custom_fields_with_http_info(account_id, template_id,  template_custom_fields)
  return data
end
delete_custom_fields_with_http_info(account_id, template_id, template_custom_fields) click to toggle source

Deletes envelope custom fields in a template. Deletes envelope custom fields in a template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_custom_fields (optional parameter) @return [Array<(CustomFields, Fixnum, Hash)>] CustomFields data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 943
def delete_custom_fields_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/custom_fields".sub('{format}','json').sub('{' + 'accountId' + '}', account_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_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) click to toggle source

Deletes custom document fields from an existing template document. Deletes custom document fields from an existing template document. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param document_fields_information (optional parameter) @return [DocumentFieldsInformation]

# File lib/docusign_esign/api/templates_api.rb, line 988
def delete_document_fields(account_id, document_id, template_id, document_fields_information)
  data, _status_code, _headers = delete_document_fields_with_http_info(account_id, 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) click to toggle source

Deletes custom document fields from an existing template document. Deletes custom document fields from an existing template document. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param document_fields_information (optional parameter) @return [Array<(DocumentFieldsInformation, Fixnum, Hash)>] DocumentFieldsInformation data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1000
def delete_document_fields_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

Deletes a page from a document in an template. Deletes a page from a document in a template based on the page number. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param page_number The page number being accessed. @param template_id The ID of the template being accessed. @param page_request (optional parameter) @return [nil]

# File lib/docusign_esign/api/templates_api.rb, line 1048
def delete_document_page(account_id, document_id, page_number, template_id, page_request)
  delete_document_page_with_http_info(account_id, 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) click to toggle source

Deletes a page from a document in an template. Deletes a page from a document in a template based on the page number. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param page_number The page number being accessed. @param template_id The ID of the template being accessed. @param page_request (optional parameter) @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1061
def delete_document_page_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

Deletes documents from a template. Deletes one or more documents from an existing template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param envelope_definition (optional parameter) @return [TemplateDocumentsResult]

# File lib/docusign_esign/api/templates_api.rb, line 1108
def delete_documents(account_id, template_id, envelope_definition)
  data, _status_code, _headers = delete_documents_with_http_info(account_id, template_id,  envelope_definition)
  return data
end
delete_documents_with_http_info(account_id, template_id, envelope_definition) click to toggle source

Deletes documents from a template. Deletes one or more documents from an existing template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param envelope_definition (optional parameter) @return [Array<(TemplateDocumentsResult, Fixnum, Hash)>] TemplateDocumentsResult data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1119
def delete_documents_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/documents".sub('{format}','json').sub('{' + 'accountId' + '}', account_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(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) click to toggle source

Removes a member group’s sharing permissions for a template. Removes a member group’s sharing permissions for a specified template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_part Currently, the only defined part is groups. @param group_information (optional parameter) @return [GroupInformation]

# File lib/docusign_esign/api/templates_api.rb, line 1164
def delete_group_share(account_id, template_id, template_part, group_information)
  data, _status_code, _headers = delete_group_share_with_http_info(account_id, template_id, template_part,  group_information)
  return data
end
delete_group_share_with_http_info(account_id, template_id, template_part, group_information) click to toggle source

Removes a member group&#39;s sharing permissions for a template. Removes a member group&#39;s sharing permissions for a specified template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_part Currently, the only defined part is groups. @param group_information (optional parameter) @return [Array<(GroupInformation, Fixnum, Hash)>] GroupInformation data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1176
def delete_group_share_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/{templatePart}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

Deletes a template lock. Deletes the lock from the specified template. The ‘X-DocuSign-Edit` header must be included in the request. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param lock_request (optional parameter) @return [LockInformation]

# File lib/docusign_esign/api/templates_api.rb, line 1222
def delete_lock(account_id, template_id, lock_request)
  data, _status_code, _headers = delete_lock_with_http_info(account_id, template_id,  lock_request)
  return data
end
delete_lock_with_http_info(account_id, template_id, lock_request) click to toggle source

Deletes a template lock. Deletes the lock from the specified template. The &#x60;X-DocuSign-Edit&#x60; header must be included in the request. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param lock_request (optional parameter) @return [Array<(LockInformation, Fixnum, Hash)>] LockInformation data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1233
def delete_lock_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/lock".sub('{format}','json').sub('{' + 'accountId' + '}', account_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(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) click to toggle source

Deletes the specified recipient file from a template. Deletes the specified recipient file from the specified template. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @param template_recipients (optional parameter) @return [Recipients]

# File lib/docusign_esign/api/templates_api.rb, line 1278
def delete_recipient(account_id, recipient_id, template_id, template_recipients)
  data, _status_code, _headers = delete_recipient_with_http_info(account_id, recipient_id, template_id,  template_recipients)
  return data
end
delete_recipient_with_http_info(account_id, recipient_id, template_id, template_recipients) click to toggle source

Deletes the specified recipient file from a template. Deletes the specified recipient file from the specified template. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @param template_recipients (optional parameter) @return [Array<(Recipients, Fixnum, Hash)>] Recipients data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1290
def delete_recipient_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_recipients (optional parameter) @return [Recipients]

# File lib/docusign_esign/api/templates_api.rb, line 1336
def delete_recipients(account_id, template_id, template_recipients)
  data, _status_code, _headers = delete_recipients_with_http_info(account_id, template_id,  template_recipients)
  return data
end
delete_recipients_with_http_info(account_id, template_id, template_recipients) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_recipients (optional parameter) @return [Array<(Recipients, Fixnum, Hash)>] Recipients data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1347
def delete_recipients_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/recipients".sub('{format}','json').sub('{' + 'accountId' + '}', account_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_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) click to toggle source

Deletes the tabs associated with a recipient in a template. Deletes one or more tabs associated with a recipient in a template. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @param template_tabs (optional parameter) @return [Tabs]

# File lib/docusign_esign/api/templates_api.rb, line 1392
def delete_tabs(account_id, recipient_id, template_id, template_tabs)
  data, _status_code, _headers = delete_tabs_with_http_info(account_id, recipient_id, template_id,  template_tabs)
  return data
end
delete_tabs_with_http_info(account_id, recipient_id, template_id, template_tabs) click to toggle source

Deletes the tabs associated with a recipient in a template. Deletes one or more tabs associated with a recipient in a template. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @param template_tabs (optional parameter) @return [Array<(Tabs, Fixnum, Hash)>] Tabs data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1404
def delete_tabs_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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
delete_template_document_tabs(account_id, document_id, template_id, template_tabs) click to toggle source

Deletes tabs from an envelope document

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param template_tabs (optional parameter) @return [Tabs]

# File lib/docusign_esign/api/templates_api.rb, line 1451
def delete_template_document_tabs(account_id, document_id, template_id, template_tabs)
  data, _status_code, _headers = delete_template_document_tabs_with_http_info(account_id, document_id, template_id,  template_tabs)
  return data
end
delete_template_document_tabs_with_http_info(account_id, document_id, template_id, template_tabs) click to toggle source

Deletes tabs from an envelope document

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param template_tabs (optional parameter) @return [Array<(Tabs, Fixnum, Hash)>] Tabs data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1463
def delete_template_document_tabs_with_http_info(account_id, document_id, template_id, template_tabs)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.delete_template_document_tabs ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.delete_template_document_tabs" if account_id.nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.delete_template_document_tabs" if document_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.delete_template_document_tabs" if template_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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(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_template_document_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) click to toggle source

Gets a list of templates for a specified account. Retrieves the definition of the specified template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param DocuSign_eSign::GetOptions Options for modifying the behavior of the function. @return [EnvelopeTemplate]

# File lib/docusign_esign/api/templates_api.rb, line 1509
def get(account_id, template_id, options = DocuSign_eSign::GetOptions.default)
  data, _status_code, _headers = get_with_http_info(account_id, template_id, options)
  return data
end
get_document(account_id, document_id, template_id, options = DocuSign_eSign::GetDocumentOptions.default) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param DocuSign_eSign::GetDocumentOptions Options for modifying the behavior of the function. @return [File]

# File lib/docusign_esign/api/templates_api.rb, line 1566
def get_document(account_id, document_id, template_id, options = DocuSign_eSign::GetDocumentOptions.default)
  data, _status_code, _headers = get_document_with_http_info(account_id, 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) click to toggle source

Gets a page image from a template for display. Retrieves a page image for display from the specified template. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param page_number The page number being accessed. @param template_id The ID of the template being accessed. @param DocuSign_eSign::GetDocumentPageImageOptions Options for modifying the behavior of the function. @return [File]

# File lib/docusign_esign/api/templates_api.rb, line 1628
def get_document_page_image(account_id, document_id, page_number, template_id, options = DocuSign_eSign::GetDocumentPageImageOptions.default)
  data, _status_code, _headers = get_document_page_image_with_http_info(account_id, 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) click to toggle source

Gets a page image from a template for display. Retrieves a page image for display from the specified template. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param page_number The page number being accessed. @param template_id The ID of the template being accessed. @param DocuSign_eSign::GetDocumentPageImageOptions Options for modifying the behavior of the function. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1641
def get_document_page_image_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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_tabs(account_id, document_id, template_id, options = DocuSign_eSign::GetDocumentTabsOptions.default) click to toggle source

Returns tabs on the document.

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param DocuSign_eSign::GetDocumentTabsOptions Options for modifying the behavior of the function. @return [Tabs]

# File lib/docusign_esign/api/templates_api.rb, line 1694
def get_document_tabs(account_id, document_id, template_id, options = DocuSign_eSign::GetDocumentTabsOptions.default)
  data, _status_code, _headers = get_document_tabs_with_http_info(account_id, document_id, template_id, options)
  return data
end
get_document_tabs_with_http_info(account_id, document_id, template_id, options = DocuSign_eSign::GetDocumentTabsOptions.default) click to toggle source

Returns tabs on the document.

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param DocuSign_eSign::GetDocumentTabsOptions Options for modifying the behavior of the function. @return [Array<(Tabs, Fixnum, Hash)>] Tabs data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1706
def get_document_tabs_with_http_info(account_id, document_id, template_id, options = DocuSign_eSign::GetDocumentTabsOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.get_document_tabs ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.get_document_tabs" if account_id.nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.get_document_tabs" 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_tabs" if template_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'documentId' + '}', document_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'page_numbers'] = options.page_numbers if !options.page_numbers.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#get_document_tabs\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) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param DocuSign_eSign::GetDocumentOptions Options for modifying the behavior of the function. @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1578
def get_document_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @return [LockInformation]

# File lib/docusign_esign/api/templates_api.rb, line 1752
def get_lock(account_id, template_id)
  data, _status_code, _headers = get_lock_with_http_info(account_id, template_id)
  return data
end
get_lock_with_http_info(account_id, template_id) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @return [Array<(LockInformation, Fixnum, Hash)>] LockInformation data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1762
def get_lock_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/lock".sub('{format}','json').sub('{' + 'accountId' + '}', account_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 => '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) click to toggle source

Gets template notification information. Retrieves the envelope notification, reminders and expirations, information for an existing template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @return [Notification]

# File lib/docusign_esign/api/templates_api.rb, line 1805
def get_notification_settings(account_id, template_id)
  data, _status_code, _headers = get_notification_settings_with_http_info(account_id, template_id)
  return data
end
get_notification_settings_with_http_info(account_id, template_id) click to toggle source

Gets template notification information. Retrieves the envelope notification, reminders and expirations, information for an existing template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @return [Array<(Notification, Fixnum, Hash)>] Notification data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1815
def get_notification_settings_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/notification".sub('{format}','json').sub('{' + 'accountId' + '}', account_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 => '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_page_tabs(account_id, document_id, page_number, template_id) click to toggle source

Returns tabs on the specified page.

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param page_number The page number being accessed. @param template_id The ID of the template being accessed. @return [Tabs]

# File lib/docusign_esign/api/templates_api.rb, line 1860
def get_page_tabs(account_id, document_id, page_number, template_id)
  data, _status_code, _headers = get_page_tabs_with_http_info(account_id, document_id, page_number, template_id)
  return data
end
get_page_tabs_with_http_info(account_id, document_id, page_number, template_id) click to toggle source

Returns tabs on the specified page.

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param page_number The page number being accessed. @param template_id The ID of the template being accessed. @return [Array<(Tabs, Fixnum, Hash)>] Tabs data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1872
def get_page_tabs_with_http_info(account_id, document_id, page_number, template_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.get_page_tabs ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.get_page_tabs" if account_id.nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.get_page_tabs" if document_id.nil?
  # verify the required parameter 'page_number' is set
  fail ArgumentError, "Missing the required parameter 'page_number' when calling TemplatesApi.get_page_tabs" if page_number.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get_page_tabs" if template_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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 = 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#get_page_tabs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_pages(account_id, document_id, template_id, options = DocuSign_eSign::GetPagesOptions.default) click to toggle source

Returns document page image(s) based on input.

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param DocuSign_eSign::GetPagesOptions Options for modifying the behavior of the function. @return [PageImages]

# File lib/docusign_esign/api/templates_api.rb, line 1921
def get_pages(account_id, document_id, template_id, options = DocuSign_eSign::GetPagesOptions.default)
  data, _status_code, _headers = get_pages_with_http_info(account_id, document_id, template_id, options)
  return data
end
get_pages_with_http_info(account_id, document_id, template_id, options = DocuSign_eSign::GetPagesOptions.default) click to toggle source

Returns document page image(s) based on input.

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param DocuSign_eSign::GetPagesOptions Options for modifying the behavior of the function. @return [Array<(PageImages, Fixnum, Hash)>] PageImages data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1933
def get_pages_with_http_info(account_id, document_id, template_id, options = DocuSign_eSign::GetPagesOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.get_pages ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.get_pages" if account_id.nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.get_pages" if document_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get_pages" if template_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'documentId' + '}', document_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'count'] = options.count if !options.count.nil?
  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[:'nocache'] = options.nocache if !options.nocache.nil?
  query_params[:'show_changes'] = options.show_changes if !options.show_changes.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 => 'PageImages')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#get_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_template_document_html_definitions(account_id, document_id, template_id) click to toggle source

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

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @return [DocumentHtmlDefinitionOriginals]

# File lib/docusign_esign/api/templates_api.rb, line 1986
def get_template_document_html_definitions(account_id, document_id, template_id)
  data, _status_code, _headers = get_template_document_html_definitions_with_http_info(account_id, document_id, template_id)
  return data
end
get_template_document_html_definitions_with_http_info(account_id, document_id, template_id) click to toggle source

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

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @return [Array<(DocumentHtmlDefinitionOriginals, Fixnum, Hash)>] DocumentHtmlDefinitionOriginals data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1997
def get_template_document_html_definitions_with_http_info(account_id, document_id, template_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.get_template_document_html_definitions ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.get_template_document_html_definitions" if account_id.nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.get_template_document_html_definitions" if document_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get_template_document_html_definitions" if template_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/html_definitions".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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 => 'DocumentHtmlDefinitionOriginals')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#get_template_document_html_definitions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_template_html_definitions(account_id, template_id) click to toggle source

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

@param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @return [DocumentHtmlDefinitionOriginals]

# File lib/docusign_esign/api/templates_api.rb, line 2042
def get_template_html_definitions(account_id, template_id)
  data, _status_code, _headers = get_template_html_definitions_with_http_info(account_id, template_id)
  return data
end
get_template_html_definitions_with_http_info(account_id, template_id) click to toggle source

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

@param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @return [Array<(DocumentHtmlDefinitionOriginals, Fixnum, Hash)>] DocumentHtmlDefinitionOriginals data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2052
def get_template_html_definitions_with_http_info(account_id, template_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.get_template_html_definitions ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.get_template_html_definitions" if account_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get_template_html_definitions" if template_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates/{templateId}/html_definitions".sub('{format}','json').sub('{' + 'accountId' + '}', account_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 => 'DocumentHtmlDefinitionOriginals')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TemplatesApi#get_template_html_definitions\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) click to toggle source

Gets a list of templates for a specified account. Retrieves the definition of the specified template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param DocuSign_eSign::GetOptions Options for modifying the behavior of the function. @return [Array<(EnvelopeTemplate, Fixnum, Hash)>] EnvelopeTemplate data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 1520
def get_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

Gets the bulk recipient file from a template. Retrieves the bulk recipient file information from a template that has a bulk recipient. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @param DocuSign_eSign::ListBulkRecipientsOptions Options for modifying the behavior of the function. @return [BulkRecipientsResponse]

# File lib/docusign_esign/api/templates_api.rb, line 2097
def list_bulk_recipients(account_id, recipient_id, template_id, options = DocuSign_eSign::ListBulkRecipientsOptions.default)
  data, _status_code, _headers = list_bulk_recipients_with_http_info(account_id, 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) click to toggle source

Gets the bulk recipient file from a template. Retrieves the bulk recipient file information from a template that has a bulk recipient. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @param DocuSign_eSign::ListBulkRecipientsOptions Options for modifying the behavior of the function. @return [Array<(BulkRecipientsResponse, Fixnum, Hash)>] BulkRecipientsResponse data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2109
def list_bulk_recipients_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/bulk_recipients".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

Gets the custom document fields from a template. Retrieves the custom document field information from an existing template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @return [CustomFields]

# File lib/docusign_esign/api/templates_api.rb, line 2156
def list_custom_fields(account_id, template_id)
  data, _status_code, _headers = list_custom_fields_with_http_info(account_id, template_id)
  return data
end
list_custom_fields_with_http_info(account_id, template_id) click to toggle source

Gets the custom document fields from a template. Retrieves the custom document field information from an existing template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @return [Array<(CustomFields, Fixnum, Hash)>] CustomFields data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2166
def list_custom_fields_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/custom_fields".sub('{format}','json').sub('{' + 'accountId' + '}', account_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 => '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) click to toggle source

Gets the custom document fields for a an existing template document. Retrieves the custom document fields for an existing template document. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @return [DocumentFieldsInformation]

# File lib/docusign_esign/api/templates_api.rb, line 2210
def list_document_fields(account_id, document_id, template_id)
  data, _status_code, _headers = list_document_fields_with_http_info(account_id, document_id, template_id)
  return data
end
list_document_fields_with_http_info(account_id, document_id, template_id) click to toggle source

Gets the custom document fields for a an existing template document. Retrieves the custom document fields for an existing template document. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @return [Array<(DocumentFieldsInformation, Fixnum, Hash)>] DocumentFieldsInformation data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2221
def list_document_fields_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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, options = DocuSign_eSign::ListDocumentsOptions.default) click to toggle source

Gets a list of documents associated with a template. Retrieves a list of documents associated with the specified template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param DocuSign_eSign::ListDocumentsOptions Options for modifying the behavior of the function. @return [TemplateDocumentsResult]

# File lib/docusign_esign/api/templates_api.rb, line 2267
def list_documents(account_id, template_id, options = DocuSign_eSign::ListDocumentsOptions.default)
  data, _status_code, _headers = list_documents_with_http_info(account_id, template_id, options)
  return data
end
list_documents_with_http_info(account_id, template_id, options = DocuSign_eSign::ListDocumentsOptions.default) click to toggle source

Gets a list of documents associated with a template. Retrieves a list of documents associated with the specified template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param DocuSign_eSign::ListDocumentsOptions Options for modifying the behavior of the function. @return [Array<(TemplateDocumentsResult, Fixnum, Hash)>] TemplateDocumentsResult data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2278
def list_documents_with_http_info(account_id, template_id, options = DocuSign_eSign::ListDocumentsOptions.default)
  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 account_id.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.1/accounts/{accountId}/templates/{templateId}/documents".sub('{format}','json').sub('{' + 'accountId' + '}', account_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?

  # 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) click to toggle source

Gets recipient information from a template. Retrieves the information for all recipients in the specified template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param DocuSign_eSign::ListRecipientsOptions Options for modifying the behavior of the function. @return [Recipients]

# File lib/docusign_esign/api/templates_api.rb, line 2323
def list_recipients(account_id, template_id, options = DocuSign_eSign::ListRecipientsOptions.default)
  data, _status_code, _headers = list_recipients_with_http_info(account_id, template_id, options)
  return data
end
list_recipients_with_http_info(account_id, template_id, options = DocuSign_eSign::ListRecipientsOptions.default) click to toggle source

Gets recipient information from a template. Retrieves the information for all recipients in the specified template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param DocuSign_eSign::ListRecipientsOptions Options for modifying the behavior of the function. @return [Array<(Recipients, Fixnum, Hash)>] Recipients data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2334
def list_recipients_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/recipients".sub('{format}','json').sub('{' + 'accountId' + '}', account_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_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) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @param DocuSign_eSign::ListTabsOptions Options for modifying the behavior of the function. @return [Tabs]

# File lib/docusign_esign/api/templates_api.rb, line 2382
def list_tabs(account_id, recipient_id, template_id, options = DocuSign_eSign::ListTabsOptions.default)
  data, _status_code, _headers = list_tabs_with_http_info(account_id, recipient_id, template_id, options)
  return data
end
list_tabs_with_http_info(account_id, recipient_id, template_id, options = DocuSign_eSign::ListTabsOptions.default) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @param DocuSign_eSign::ListTabsOptions Options for modifying the behavior of the function. @return [Array<(Tabs, Fixnum, Hash)>] Tabs data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2394
def list_tabs_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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.include_metadata if !options.include_metadata.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) click to toggle source

Gets the definition of a template. Retrieves the list of templates for the specified account. The request can be limited to a specific folder. @param account_id The external account number (int) or account ID Guid. @param DocuSign_eSign::ListTemplatesOptions Options for modifying the behavior of the function. @return [EnvelopeTemplateResults]

# File lib/docusign_esign/api/templates_api.rb, line 2441
def list_templates(account_id, options = DocuSign_eSign::ListTemplatesOptions.default)
  data, _status_code, _headers = list_templates_with_http_info(account_id, options)
  return data
end
list_templates_with_http_info(account_id, options = DocuSign_eSign::ListTemplatesOptions.default) click to toggle source

Gets the definition of a template. Retrieves the list of templates for the specified account. The request can be limited to a specific folder. @param account_id The external account number (int) or account ID Guid. @param DocuSign_eSign::ListTemplatesOptions Options for modifying the behavior of the function. @return [Array<(EnvelopeTemplateResults, Fixnum, Hash)>] EnvelopeTemplateResults data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2451
def list_templates_with_http_info(account_id, 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 account_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'count'] = options.count if !options.count.nil?
  query_params[:'created_from_date'] = options.created_from_date if !options.created_from_date.nil?
  query_params[:'created_to_date'] = options.created_to_date if !options.created_to_date.nil?
  query_params[:'folder_ids'] = options.folder_ids if !options.folder_ids.nil?
  query_params[:'folder_types'] = options.folder_types if !options.folder_types.nil?
  query_params[:'from_date'] = options.from_date if !options.from_date.nil?
  query_params[:'include'] = options.include if !options.include.nil?
  query_params[:'is_deleted_template_only'] = options.is_deleted_template_only if !options.is_deleted_template_only.nil?
  query_params[:'is_download'] = options.is_download if !options.is_download.nil?
  query_params[:'modified_from_date'] = options.modified_from_date if !options.modified_from_date.nil?
  query_params[:'modified_to_date'] = options.modified_to_date if !options.modified_to_date.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_fields'] = options.search_fields if !options.search_fields.nil?
  query_params[:'search_text'] = options.search_text if !options.search_text.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[:'template_ids'] = options.template_ids if !options.template_ids.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?
  query_params[:'user_id'] = options.user_id if !options.user_id.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) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param page_number The page number being accessed. @param template_id The ID of the template being accessed. @param page_request (optional parameter) @return [nil]

# File lib/docusign_esign/api/templates_api.rb, line 2518
def rotate_document_page(account_id, document_id, page_number, template_id, page_request)
  rotate_document_page_with_http_info(account_id, 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) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param page_number The page number being accessed. @param template_id The ID of the template being accessed. @param page_request (optional parameter) @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2531
def rotate_document_page_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

Updates an existing template. Updates an existing template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param envelope_template (optional parameter) @return [TemplateUpdateSummary]

# File lib/docusign_esign/api/templates_api.rb, line 2578
def update(account_id, template_id, envelope_template)
  data, _status_code, _headers = update_with_http_info(account_id, template_id,  envelope_template)
  return data
end
update_custom_fields(account_id, template_id, template_custom_fields) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_custom_fields (optional parameter) @return [CustomFields]

# File lib/docusign_esign/api/templates_api.rb, line 2633
def update_custom_fields(account_id, template_id, template_custom_fields)
  data, _status_code, _headers = update_custom_fields_with_http_info(account_id, template_id,  template_custom_fields)
  return data
end
update_custom_fields_with_http_info(account_id, template_id, template_custom_fields) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_custom_fields (optional parameter) @return [Array<(CustomFields, Fixnum, Hash)>] CustomFields data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2644
def update_custom_fields_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/custom_fields".sub('{format}','json').sub('{' + 'accountId' + '}', account_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_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) click to toggle source

Adds a document to a template document. Adds the specified document to an existing template document. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param envelope_definition (optional parameter) @param DocuSign_eSign::UpdateDocumentOptions Options for modifying the behavior of the function. @return [EnvelopeDocument]

# File lib/docusign_esign/api/templates_api.rb, line 2690
def update_document(account_id, document_id, template_id, envelope_definition, options = DocuSign_eSign::UpdateDocumentOptions.default)
  data, _status_code, _headers = update_document_with_http_info(account_id, document_id, template_id,  envelope_definition, options)
  return data
end
update_document_fields(account_id, document_id, template_id, document_fields_information) click to toggle source

Updates existing custom document fields in an existing template document. Updates existing custom document fields in an existing template document. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param document_fields_information (optional parameter) @return [DocumentFieldsInformation]

# File lib/docusign_esign/api/templates_api.rb, line 2751
def update_document_fields(account_id, document_id, template_id, document_fields_information)
  data, _status_code, _headers = update_document_fields_with_http_info(account_id, 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) click to toggle source

Updates existing custom document fields in an existing template document. Updates existing custom document fields in an existing template document. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param document_fields_information (optional parameter) @return [Array<(DocumentFieldsInformation, Fixnum, Hash)>] DocumentFieldsInformation data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2763
def update_document_fields_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

Adds a document to a template document. Adds the specified document to an existing template document. @param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param envelope_definition (optional parameter) @param DocuSign_eSign::UpdateDocumentOptions Options for modifying the behavior of the function. @return [Array<(EnvelopeDocument, Fixnum, Hash)>] EnvelopeDocument data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2703
def update_document_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'documentId' + '}', document_id.to_s).sub('{' + 'templateId' + '}', template_id.to_s)

  # query parameters
  query_params = {}
  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) click to toggle source

Adds documents to a template document. Adds one or more documents to an existing template document. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param envelope_definition (optional parameter) @return [TemplateDocumentsResult]

# File lib/docusign_esign/api/templates_api.rb, line 2809
def update_documents(account_id, template_id, envelope_definition)
  data, _status_code, _headers = update_documents_with_http_info(account_id, template_id,  envelope_definition)
  return data
end
update_documents_with_http_info(account_id, template_id, envelope_definition) click to toggle source

Adds documents to a template document. Adds one or more documents to an existing template document. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param envelope_definition (optional parameter) @return [Array<(TemplateDocumentsResult, Fixnum, Hash)>] TemplateDocumentsResult data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2820
def update_documents_with_http_info(account_id, template_id, envelope_definition)
  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 account_id.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.1/accounts/{accountId}/templates/{templateId}/documents".sub('{format}','json').sub('{' + 'accountId' + '}', account_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(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) click to toggle source

Shares a template with a group Shares a template with the specified members group. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_part Currently, the only defined part is groups. @param group_information (optional parameter) @return [GroupInformation]

# File lib/docusign_esign/api/templates_api.rb, line 2865
def update_group_share(account_id, template_id, template_part, group_information)
  data, _status_code, _headers = update_group_share_with_http_info(account_id, template_id, template_part,  group_information)
  return data
end
update_group_share_with_http_info(account_id, template_id, template_part, group_information) click to toggle source

Shares a template with a group Shares a template with the specified members group. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_part Currently, the only defined part is groups. @param group_information (optional parameter) @return [Array<(GroupInformation, Fixnum, Hash)>] GroupInformation data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2877
def update_group_share_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/{templatePart}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param lock_request (optional parameter) @return [LockInformation]

# File lib/docusign_esign/api/templates_api.rb, line 2923
def update_lock(account_id, template_id, lock_request)
  data, _status_code, _headers = update_lock_with_http_info(account_id, template_id,  lock_request)
  return data
end
update_lock_with_http_info(account_id, template_id, lock_request) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param lock_request (optional parameter) @return [Array<(LockInformation, Fixnum, Hash)>] LockInformation data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2934
def update_lock_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/lock".sub('{format}','json').sub('{' + 'accountId' + '}', account_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(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) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_notification_request (optional parameter) @return [Notification]

# File lib/docusign_esign/api/templates_api.rb, line 2978
def update_notification_settings(account_id, template_id, template_notification_request)
  data, _status_code, _headers = update_notification_settings_with_http_info(account_id, template_id,  template_notification_request)
  return data
end
update_notification_settings_with_http_info(account_id, template_id, template_notification_request) click to toggle source

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. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_notification_request (optional parameter) @return [Array<(Notification, Fixnum, Hash)>] Notification data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2989
def update_notification_settings_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/notification".sub('{format}','json').sub('{' + 'accountId' + '}', account_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_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) click to toggle source

Updates recipients in a template. Updates recipients in a template. You can edit the following properties: ‘email`, `userName`, `routingOrder`, `faxNumber`, `deliveryMethod`, `accessCode`, and `requireIdLookup`. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_recipients (optional parameter) @param DocuSign_eSign::UpdateRecipientsOptions Options for modifying the behavior of the function. @return [RecipientsUpdateSummary]

# File lib/docusign_esign/api/templates_api.rb, line 3034
def update_recipients(account_id, template_id, template_recipients, options = DocuSign_eSign::UpdateRecipientsOptions.default)
  data, _status_code, _headers = update_recipients_with_http_info(account_id, template_id,  template_recipients, options)
  return data
end
update_recipients_with_http_info(account_id, template_id, template_recipients, options = DocuSign_eSign::UpdateRecipientsOptions.default) click to toggle source

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;. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param template_recipients (optional parameter) @param DocuSign_eSign::UpdateRecipientsOptions Options for modifying the behavior of the function. @return [Array<(RecipientsUpdateSummary, Fixnum, Hash)>] RecipientsUpdateSummary data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 3046
def update_recipients_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/recipients".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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) click to toggle source

Updates the tabs for a recipient. Updates one or more tabs for a recipient in a template. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @param template_tabs (optional parameter) @return [Tabs]

# File lib/docusign_esign/api/templates_api.rb, line 3092
def update_tabs(account_id, recipient_id, template_id, template_tabs)
  data, _status_code, _headers = update_tabs_with_http_info(account_id, recipient_id, template_id,  template_tabs)
  return data
end
update_tabs_with_http_info(account_id, recipient_id, template_id, template_tabs) click to toggle source

Updates the tabs for a recipient. Updates one or more tabs for a recipient in a template. @param account_id The external account number (int) or account ID Guid. @param recipient_id The ID of the recipient being accessed. @param template_id The ID of the template being accessed. @param template_tabs (optional parameter) @return [Array<(Tabs, Fixnum, Hash)>] Tabs data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 3104
def update_tabs_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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_template_document_tabs(account_id, document_id, template_id, template_tabs) click to toggle source

Updates the tabs for a template

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param template_tabs (optional parameter) @return [Tabs]

# File lib/docusign_esign/api/templates_api.rb, line 3151
def update_template_document_tabs(account_id, document_id, template_id, template_tabs)
  data, _status_code, _headers = update_template_document_tabs_with_http_info(account_id, document_id, template_id,  template_tabs)
  return data
end
update_template_document_tabs_with_http_info(account_id, document_id, template_id, template_tabs) click to toggle source

Updates the tabs for a template

@param account_id The external account number (int) or account ID Guid. @param document_id The ID of the document being accessed. @param template_id The ID of the template being accessed. @param template_tabs (optional parameter) @return [Array<(Tabs, Fixnum, Hash)>] Tabs data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 3163
def update_template_document_tabs_with_http_info(account_id, document_id, template_id, template_tabs)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: TemplatesApi.update_template_document_tabs ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling TemplatesApi.update_template_document_tabs" if account_id.nil?
  # verify the required parameter 'document_id' is set
  fail ArgumentError, "Missing the required parameter 'document_id' when calling TemplatesApi.update_template_document_tabs" if document_id.nil?
  # verify the required parameter 'template_id' is set
  fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.update_template_document_tabs" if template_id.nil?
  # resource path
  local_var_path = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.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(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_template_document_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) click to toggle source

Updates an existing template. Updates an existing template. @param account_id The external account number (int) or account ID Guid. @param template_id The ID of the template being accessed. @param envelope_template (optional parameter) @return [Array<(TemplateUpdateSummary, Fixnum, Hash)>] TemplateUpdateSummary data, response status code and response headers

# File lib/docusign_esign/api/templates_api.rb, line 2589
def update_with_http_info(account_id, 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 account_id.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.1/accounts/{accountId}/templates/{templateId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_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(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