class SignRequestClient::TemplatesApi
Attributes
Public Class Methods
# File lib/signrequest_client/api/templates_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Retrieve a list of Templates
@param [Hash] opts the optional parameters @option opts [Integer] :page A page number within the paginated result set. @option opts [Integer] :limit Number of results to return per page. @return [InlineResponse2008]
# File lib/signrequest_client/api/templates_api.rb, line 28 def templates_list(opts = {}) data, _status_code, _headers = templates_list_with_http_info(opts) data end
Retrieve a list of Templates
@param [Hash] opts the optional parameters @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<(InlineResponse2008
, Fixnum, Hash)>] InlineResponse2008
data, response status code and response headers
# File lib/signrequest_client/api/templates_api.rb, line 39 def templates_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TemplatesApi.templates_list ...' end # resource path local_var_path = '/templates/' # query parameters query_params = {} 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 => 'InlineResponse2008') if @api_client.config.debugging @api_client.config.logger.debug "API called: TemplatesApi#templates_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieve a Template
@param uuid @param [Hash] opts the optional parameters @return [Template]
# File lib/signrequest_client/api/templates_api.rb, line 81 def templates_read(uuid, opts = {}) data, _status_code, _headers = templates_read_with_http_info(uuid, opts) data end
Retrieve a Template
@param uuid @param [Hash] opts the optional parameters @return [Array<(Template
, Fixnum, Hash)>] Template
data, response status code and response headers
# File lib/signrequest_client/api/templates_api.rb, line 91 def templates_read_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TemplatesApi.templates_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 TemplatesApi.templates_read" end # resource path local_var_path = '/templates/{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 => 'Template') if @api_client.config.debugging @api_client.config.logger.debug "API called: TemplatesApi#templates_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end