class SignRequestClient::DocumentsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/signrequest_client/api/documents_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

documents_create(data, opts = {}) click to toggle source

Create a Document

@param data @param [Hash] opts the optional parameters @return [Document]

# File lib/signrequest_client/api/documents_api.rb, line 27
def documents_create(data, opts = {})
  data, _status_code, _headers = documents_create_with_http_info(data, opts)
  data
end
documents_create_with_http_info(data, opts = {}) click to toggle source

Create a Document

@param data @param [Hash] opts the optional parameters @return [Array<(Document, Fixnum, Hash)>] Document data, response status code and response headers

# File lib/signrequest_client/api/documents_api.rb, line 37
def documents_create_with_http_info(data, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DocumentsApi.documents_create ...'
  end
  # verify the required parameter 'data' is set
  if @api_client.config.client_side_validation && data.nil?
    fail ArgumentError, "Missing the required parameter 'data' when calling DocumentsApi.documents_create"
  end
  # resource path
  local_var_path = '/documents/'

  # 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(data)
  auth_names = ['Token']
  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 => 'Document')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DocumentsApi#documents_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
documents_delete(uuid, opts = {}) click to toggle source

Delete a Document

@param uuid @param [Hash] opts the optional parameters @return [nil]

# File lib/signrequest_client/api/documents_api.rb, line 81
def documents_delete(uuid, opts = {})
  documents_delete_with_http_info(uuid, opts)
  nil
end
documents_delete_with_http_info(uuid, opts = {}) click to toggle source

Delete a Document

@param uuid @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/signrequest_client/api/documents_api.rb, line 91
def documents_delete_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DocumentsApi.documents_delete ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling DocumentsApi.documents_delete"
  end
  # resource path
  local_var_path = '/documents/{uuid}/'.sub('{' + 'uuid' + '}', uuid.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 = ['Token']
  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: DocumentsApi#documents_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
documents_list(opts = {}) click to toggle source

Retrieve a list of Documents

@param [Hash] opts the optional parameters @option opts [String] :external_id @option opts [String] :signrequest__who @option opts [String] :signrequest__from_email @option opts [String] :status @option opts [String] :user__email @option opts [String] :user__first_name @option opts [String] :user__last_name @option opts [String] :created @option opts [String] :modified @option opts [Integer] :page A page number within the paginated result set. @option opts [Integer] :limit Number of results to return per page. @return [InlineResponse2003]

# File lib/signrequest_client/api/documents_api.rb, line 144
def documents_list(opts = {})
  data, _status_code, _headers = documents_list_with_http_info(opts)
  data
end
documents_list_with_http_info(opts = {}) click to toggle source

Retrieve a list of Documents

@param [Hash] opts the optional parameters @option opts [String] :external_id @option opts [String] :signrequest__who @option opts [String] :signrequest__from_email @option opts [String] :status @option opts [String] :user__email @option opts [String] :user__first_name @option opts [String] :user__last_name @option opts [String] :created @option opts [String] :modified @option opts [Integer] :page A page number within the paginated result set. @option opts [Integer] :limit Number of results to return per page. @return [Array<(InlineResponse2003, Fixnum, Hash)>] InlineResponse2003 data, response status code and response headers

# File lib/signrequest_client/api/documents_api.rb, line 164
def documents_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DocumentsApi.documents_list ...'
  end
  # resource path
  local_var_path = '/documents/'

  # query parameters
  query_params = {}
  query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_id'].nil?
  query_params[:'signrequest__who'] = opts[:'signrequest__who'] if !opts[:'signrequest__who'].nil?
  query_params[:'signrequest__from_email'] = opts[:'signrequest__from_email'] if !opts[:'signrequest__from_email'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'user__email'] = opts[:'user__email'] if !opts[:'user__email'].nil?
  query_params[:'user__first_name'] = opts[:'user__first_name'] if !opts[:'user__first_name'].nil?
  query_params[:'user__last_name'] = opts[:'user__last_name'] if !opts[:'user__last_name'].nil?
  query_params[:'created'] = opts[:'created'] if !opts[:'created'].nil?
  query_params[:'modified'] = opts[:'modified'] if !opts[:'modified'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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 = ['Token']
  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 => 'InlineResponse2003')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DocumentsApi#documents_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
documents_read(uuid, opts = {}) click to toggle source

Retrieve a Document

@param uuid @param [Hash] opts the optional parameters @return [Document]

# File lib/signrequest_client/api/documents_api.rb, line 215
def documents_read(uuid, opts = {})
  data, _status_code, _headers = documents_read_with_http_info(uuid, opts)
  data
end
documents_read_with_http_info(uuid, opts = {}) click to toggle source

Retrieve a Document

@param uuid @param [Hash] opts the optional parameters @return [Array<(Document, Fixnum, Hash)>] Document data, response status code and response headers

# File lib/signrequest_client/api/documents_api.rb, line 225
def documents_read_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DocumentsApi.documents_read ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling DocumentsApi.documents_read"
  end
  # resource path
  local_var_path = '/documents/{uuid}/'.sub('{' + 'uuid' + '}', uuid.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 = ['Token']
  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 => 'Document')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: DocumentsApi#documents_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end