class SignRequestClient::DocumentAttachmentsApi
Attributes
Public Class Methods
# File lib/signrequest_client/api/document_attachments_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Create a Document
Attachment
@param data @param [Hash] opts the optional parameters @return [DocumentAttachment]
# File lib/signrequest_client/api/document_attachments_api.rb, line 27 def document_attachments_create(data, opts = {}) data, _status_code, _headers = document_attachments_create_with_http_info(data, opts) data end
Create a Document
Attachment
@param data @param [Hash] opts the optional parameters @return [Array<(DocumentAttachment
, Fixnum, Hash)>] DocumentAttachment
data, response status code and response headers
# File lib/signrequest_client/api/document_attachments_api.rb, line 37 def document_attachments_create_with_http_info(data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentAttachmentsApi.document_attachments_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 DocumentAttachmentsApi.document_attachments_create" end # resource path local_var_path = '/document-attachments/' # 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 => 'DocumentAttachment') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentAttachmentsApi#document_attachments_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieve a list of Document
Attachments
@param [Hash] opts the optional parameters @option opts [String] :document__uuid @option opts [String] :document__external_id @option opts [String] :created @option opts [Integer] :page A page number within the paginated result set. @option opts [Integer] :limit Number of results to return per page. @return [InlineResponse2001]
# File lib/signrequest_client/api/document_attachments_api.rb, line 85 def document_attachments_list(opts = {}) data, _status_code, _headers = document_attachments_list_with_http_info(opts) data end
Retrieve a list of Document
Attachments
@param [Hash] opts the optional parameters @option opts [String] :document__uuid @option opts [String] :document__external_id @option opts [String] :created @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<(InlineResponse2001
, Fixnum, Hash)>] InlineResponse2001
data, response status code and response headers
# File lib/signrequest_client/api/document_attachments_api.rb, line 99 def document_attachments_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentAttachmentsApi.document_attachments_list ...' end # resource path local_var_path = '/document-attachments/' # query parameters query_params = {} query_params[:'document__uuid'] = opts[:'document__uuid'] if !opts[:'document__uuid'].nil? query_params[:'document__external_id'] = opts[:'document__external_id'] if !opts[:'document__external_id'].nil? query_params[:'created'] = opts[:'created'] if !opts[:'created'].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 => 'InlineResponse2001') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentAttachmentsApi#document_attachments_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieve a Document
Attachment
@param uuid @param [Hash] opts the optional parameters @return [DocumentAttachment]
# File lib/signrequest_client/api/document_attachments_api.rb, line 144 def document_attachments_read(uuid, opts = {}) data, _status_code, _headers = document_attachments_read_with_http_info(uuid, opts) data end
Retrieve a Document
Attachment
@param uuid @param [Hash] opts the optional parameters @return [Array<(DocumentAttachment
, Fixnum, Hash)>] DocumentAttachment
data, response status code and response headers
# File lib/signrequest_client/api/document_attachments_api.rb, line 154 def document_attachments_read_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentAttachmentsApi.document_attachments_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 DocumentAttachmentsApi.document_attachments_read" end # resource path local_var_path = '/document-attachments/{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 => 'DocumentAttachment') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentAttachmentsApi#document_attachments_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end