class TransferZero::APILogsApi
Attributes
Public Class Methods
# File lib/transferzero-sdk/api/api_logs_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Fetch an individual API log Returns a single API log based on the API log ID. @param api_log_id ID of the API log to retrieve Example: `/v1/api_logs/00485ce9-532b-45e7-8518-7e5582242407` @param [Hash] opts the optional parameters @return [ApiLogResponse]
# File lib/transferzero-sdk/api/api_logs_api.rb, line 29 def get_api_log(api_log_id, opts = {}) data, _status_code, _headers = get_api_log_with_http_info(api_log_id, opts) data end
Fetch an individual API log Returns a single API log based on the API log ID. @param api_log_id ID of the API log to retrieve Example: `/v1/api_logs/00485ce9-532b-45e7-8518-7e5582242407` @param [Hash] opts the optional parameters @return [Array<(ApiLogResponse
, Fixnum, Hash)>] ApiLogResponse
data, response status code and response headers
# File lib/transferzero-sdk/api/api_logs_api.rb, line 39 def get_api_log_with_http_info(api_log_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: APILogsApi.get_api_log ...' end # verify the required parameter 'api_log_id' is set if @api_client.config.client_side_validation && api_log_id.nil? fail ArgumentError, "Missing the required parameter 'api_log_id' when calling APILogsApi.get_api_log" end # resource path local_var_path = '/api_logs/{API Log ID}'.sub('{' + 'API Log ID' + '}', api_log_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 = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature'] 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 => 'ApiLogResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: APILogsApi#get_api_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Fetch a list of API logs Returns a list of API logs. Also includes information relating to the original request. @param [Hash] opts the optional parameters @option opts [Integer] :page The page number to request (defaults to 1) @option opts [Integer] :per The number of results to load per page (defaults to 10) @option opts [String] :created_at_from Start date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08` @option opts [String] :created_at_to End date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08` @return [ApiLogListResponse]
# File lib/transferzero-sdk/api/api_logs_api.rb, line 86 def get_api_logs(opts = {}) data, _status_code, _headers = get_api_logs_with_http_info(opts) data end
Fetch a list of API logs Returns a list of API logs. Also includes information relating to the original request. @param [Hash] opts the optional parameters @option opts [Integer] :page The page number to request (defaults to 1) @option opts [Integer] :per The number of results to load per page (defaults to 10) @option opts [String] :created_at_from Start date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08` @option opts [String] :created_at_to End date to filter recipients by created_at range Allows filtering results by the specified `created_at` timeframe. Example: `/v1/recipients?created_at_from=2018-06-06&created_at_to=2018-06-08` @return [Array<(ApiLogListResponse
, Fixnum, Hash)>] ApiLogListResponse
data, response status code and response headers
# File lib/transferzero-sdk/api/api_logs_api.rb, line 99 def get_api_logs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: APILogsApi.get_api_logs ...' end # resource path local_var_path = '/api_logs' # query parameters query_params = {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'per'] = opts[:'per'] if !opts[:'per'].nil? query_params[:'created_at_from'] = opts[:'created_at_from'] if !opts[:'created_at_from'].nil? query_params[:'created_at_to'] = opts[:'created_at_to'] if !opts[:'created_at_to'].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 = ['AuthorizationKey', 'AuthorizationNonce', 'AuthorizationSecret', 'AuthorizationSignature'] 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 => 'ApiLogListResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: APILogsApi#get_api_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end