Class: TransferZero::APILogsApi
- Inherits:
-
Object
- Object
- TransferZero::APILogsApi
- Defined in:
- lib/transferzero-sdk/api/api_logs_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_api_log(api_log_id, opts = {}) ⇒ ApiLogResponse
Fetch an individual API log Returns a single API log based on the API log ID.
-
#get_api_log_with_http_info(api_log_id, opts = {}) ⇒ Array<(ApiLogResponse, Fixnum, Hash)>
Fetch an individual API log Returns a single API log based on the API log ID.
-
#get_api_logs(opts = {}) ⇒ ApiLogListResponse
Fetch a list of API logs Returns a list of API logs.
-
#get_api_logs_with_http_info(opts = {}) ⇒ Array<(ApiLogListResponse, Fixnum, Hash)>
Fetch a list of API logs Returns a list of API logs.
-
#initialize(api_client = ApiClient.default) ⇒ APILogsApi
constructor
A new instance of APILogsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ APILogsApi
Returns a new instance of APILogsApi.
19 20 21 |
# File 'lib/transferzero-sdk/api/api_logs_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/transferzero-sdk/api/api_logs_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_api_log(api_log_id, opts = {}) ⇒ ApiLogResponse
Fetch an individual API log Returns a single API log based on the API log ID.
29 30 31 32 |
# 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 |
#get_api_log_with_http_info(api_log_id, opts = {}) ⇒ Array<(ApiLogResponse, Fixnum, Hash)>
Fetch an individual API log Returns a single API log based on the API log ID.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# 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 |
#get_api_logs(opts = {}) ⇒ ApiLogListResponse
Fetch a list of API logs Returns a list of API logs. Also includes information relating to the original request.
86 87 88 89 |
# 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 |
#get_api_logs_with_http_info(opts = {}) ⇒ Array<(ApiLogListResponse, Fixnum, Hash)>
Fetch a list of API logs Returns a list of API logs. Also includes information relating to the original request.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# 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 |