class DocuSign_WebForms::FormInstanceManagementApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = FormInstanceManagementApi.default) click to toggle source
# File lib/docusign_webforms/api/form_instance_management_api.rb, line 29
def initialize(api_client = FormInstanceManagementApi.default)
  @api_client = api_client
end

Public Instance Methods

create_instance(account_id, form_id, create_instance_body) click to toggle source

Creates an instance of the web form Creates an instance of the web form. @param account_id Account identifier in which the web form resides @param form_id Unique identifier for a web form entity that is consistent for it's lifetime @param create_instance_body Request body containing properties that will be used to create instance. @return [WebFormInstance]

# File lib/docusign_webforms/api/form_instance_management_api.rb, line 39
def create_instance(account_id, form_id, create_instance_body)
  data, _status_code, _headers = create_instance_with_http_info(account_id, form_id,  create_instance_body)
  return data
end
create_instance_with_http_info(account_id, form_id, create_instance_body) click to toggle source

Creates an instance of the web form Creates an instance of the web form. @param account_id Account identifier in which the web form resides @param form_id Unique identifier for a web form entity that is consistent for it's lifetime @param create_instance_body Request body containing properties that will be used to create instance. @return [Array<(WebFormInstance, Fixnum, Hash)>] WebFormInstance data, response status code and response headers

# File lib/docusign_webforms/api/form_instance_management_api.rb, line 50
def create_instance_with_http_info(account_id, form_id, create_instance_body)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: FormInstanceManagementApi.create_instance ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling FormInstanceManagementApi.create_instance" if account_id.nil?
  # verify the required parameter 'form_id' is set
  fail ArgumentError, "Missing the required parameter 'form_id' when calling FormInstanceManagementApi.create_instance" if form_id.nil?
  # verify the required parameter 'create_instance_body' is set
  fail ArgumentError, "Missing the required parameter 'create_instance_body' when calling FormInstanceManagementApi.create_instance" if create_instance_body.nil?
  # resource path
  local_var_path = "/v1.1/accounts/{accountId}/forms/{formId}/instances".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'formId' + '}', form_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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(create_instance_body)
  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 => 'WebFormInstance')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FormInstanceManagementApi#create_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_instance(account_id, form_id, instance_id) click to toggle source

Get form instance Retrieves instance information filter by instance id @param account_id Account identifier in which the web form resides @param form_id Unique identifier for a web form entity that is consistent for it's lifetime @param instance_id Unique identifier for a Web Form Instance that is consistent until its expiration @return [WebFormInstance]

# File lib/docusign_webforms/api/form_instance_management_api.rb, line 98
def get_instance(account_id, form_id, instance_id)
  data, _status_code, _headers = get_instance_with_http_info(account_id, form_id, instance_id)
  return data
end
get_instance_with_http_info(account_id, form_id, instance_id) click to toggle source

Get form instance Retrieves instance information filter by instance id @param account_id Account identifier in which the web form resides @param form_id Unique identifier for a web form entity that is consistent for it's lifetime @param instance_id Unique identifier for a Web Form Instance that is consistent until its expiration @return [Array<(WebFormInstance, Fixnum, Hash)>] WebFormInstance data, response status code and response headers

# File lib/docusign_webforms/api/form_instance_management_api.rb, line 109
def get_instance_with_http_info(account_id, form_id, instance_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: FormInstanceManagementApi.get_instance ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling FormInstanceManagementApi.get_instance" if account_id.nil?
  # verify the required parameter 'form_id' is set
  fail ArgumentError, "Missing the required parameter 'form_id' when calling FormInstanceManagementApi.get_instance" if form_id.nil?
  # verify the required parameter 'instance_id' is set
  fail ArgumentError, "Missing the required parameter 'instance_id' when calling FormInstanceManagementApi.get_instance" if instance_id.nil?
  # resource path
  local_var_path = "/v1.1/accounts/{accountId}/forms/{formId}/instances/{instanceId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'formId' + '}', form_id.to_s).sub('{' + 'instanceId' + '}', instance_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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['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 => 'WebFormInstance')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FormInstanceManagementApi#get_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
list_instances(account_id, form_id, options = DocuSign_WebForms::ListInstancesOptions.default) click to toggle source

List instances List all the instances of a web form in an account. When filtered by clientUserId, it will return instances having same clientUserId @param account_id Account identifier in which the web form resides @param form_id Unique identifier for a web form that is consistent for it's lifetime @param DocuSign_WebForms::ListInstancesOptions Options for modifying the behavior of the function. @return [WebFormInstanceList]

# File lib/docusign_webforms/api/form_instance_management_api.rb, line 157
def list_instances(account_id, form_id, options = DocuSign_WebForms::ListInstancesOptions.default)
  data, _status_code, _headers = list_instances_with_http_info(account_id, form_id, options)
  return data
end
list_instances_with_http_info(account_id, form_id, options = DocuSign_WebForms::ListInstancesOptions.default) click to toggle source

List instances List all the instances of a web form in an account. When filtered by clientUserId, it will return instances having same clientUserId @param account_id Account identifier in which the web form resides @param form_id Unique identifier for a web form that is consistent for it's lifetime @param DocuSign_WebForms::ListInstancesOptions Options for modifying the behavior of the function. @return [Array<(WebFormInstanceList, Fixnum, Hash)>] WebFormInstanceList data, response status code and response headers

# File lib/docusign_webforms/api/form_instance_management_api.rb, line 168
def list_instances_with_http_info(account_id, form_id, options = DocuSign_WebForms::ListInstancesOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: FormInstanceManagementApi.list_instances ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling FormInstanceManagementApi.list_instances" if account_id.nil?
  # verify the required parameter 'form_id' is set
  fail ArgumentError, "Missing the required parameter 'form_id' when calling FormInstanceManagementApi.list_instances" if form_id.nil?
  if !options.client_user_id.nil? && options.client_user_id.to_s.length > 100
    fail ArgumentError, 'invalid value for "options[:"client_user_id"]" when calling FormInstanceManagementApi.list_instances, the character length must be smaller than or equal to 100.'
  end

  # resource path
  local_var_path = "/v1.1/accounts/{accountId}/forms/{formId}/instances".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'formId' + '}', form_id.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['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 => 'WebFormInstanceList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FormInstanceManagementApi#list_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
refresh_token(account_id, form_id, instance_id) click to toggle source

Refreshes the instance token Generates new instance token for the existing Web Form Instance. @param account_id Account identifier in which the web form resides @param form_id Unique identifier for a web form entity that is consistent for it's lifetime @param instance_id Unique identifier for a Web Form Instance that is consistent until its expiration @return [WebFormInstance]

# File lib/docusign_webforms/api/form_instance_management_api.rb, line 219
def refresh_token(account_id, form_id, instance_id)
  data, _status_code, _headers = refresh_token_with_http_info(account_id, form_id, instance_id)
  return data
end
refresh_token_with_http_info(account_id, form_id, instance_id) click to toggle source

Refreshes the instance token Generates new instance token for the existing Web Form Instance. @param account_id Account identifier in which the web form resides @param form_id Unique identifier for a web form entity that is consistent for it's lifetime @param instance_id Unique identifier for a Web Form Instance that is consistent until its expiration @return [Array<(WebFormInstance, Fixnum, Hash)>] WebFormInstance data, response status code and response headers

# File lib/docusign_webforms/api/form_instance_management_api.rb, line 230
def refresh_token_with_http_info(account_id, form_id, instance_id)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: FormInstanceManagementApi.refresh_token ..."
  end
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling FormInstanceManagementApi.refresh_token" if account_id.nil?
  # verify the required parameter 'form_id' is set
  fail ArgumentError, "Missing the required parameter 'form_id' when calling FormInstanceManagementApi.refresh_token" if form_id.nil?
  # verify the required parameter 'instance_id' is set
  fail ArgumentError, "Missing the required parameter 'instance_id' when calling FormInstanceManagementApi.refresh_token" if instance_id.nil?
  # resource path
  local_var_path = "/v1.1/accounts/{accountId}/forms/{formId}/instances/{instanceId}/refresh".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'formId' + '}', form_id.to_s).sub('{' + 'instanceId' + '}', instance_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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  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 => 'WebFormInstance')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: FormInstanceManagementApi#refresh_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end