Class: Invoicetronic_Sdk::LogApi
- Inherits:
-
Object
- Object
- Invoicetronic_Sdk::LogApi
- Defined in:
- lib/invoicetronic_sdk/api/log_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ LogApi
constructor
A new instance of LogApi.
-
#log_get(opts = {}) ⇒ Array<Event>
List events Retrieve a paginated list of log events.
-
#log_get_with_http_info(opts = {}) ⇒ Array<(Array<Event>, Integer, Hash)>
List events Retrieve a paginated list of log events.
-
#log_id_get(id, opts = {}) ⇒ Event
Get an event by id Retrieve a log event by its internal id.
-
#log_id_get_with_http_info(id, opts = {}) ⇒ Array<(Event, Integer, Hash)>
Get an event by id Retrieve a log event by its internal id.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/invoicetronic_sdk/api/log_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#log_get(opts = {}) ⇒ Array<Event>
List events Retrieve a paginated list of log events. Results can be filtered by various criteria such as endpoint, method, status code, and date ranges. Logs record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](dashboard.invoicetronic.com).
41 42 43 44 |
# File 'lib/invoicetronic_sdk/api/log_api.rb', line 41 def log_get(opts = {}) data, _status_code, _headers = log_get_with_http_info(opts) data end |
#log_get_with_http_info(opts = {}) ⇒ Array<(Array<Event>, Integer, Hash)>
List events Retrieve a paginated list of log events. Results can be filtered by various criteria such as endpoint, method, status code, and date ranges. Logs record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](dashboard.invoicetronic.com).
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/invoicetronic_sdk/api/log_api.rb', line 65 def log_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LogApi.log_get ...' end # resource path local_var_path = '/log' # query parameters query_params = opts[:query_params] || {} query_params[:'company_id'] = opts[:'company_id'] if !opts[:'company_id'].nil? query_params[:'endpoint'] = opts[:'endpoint'] if !opts[:'endpoint'].nil? query_params[:'method'] = opts[:'method'] if !opts[:'method'].nil? query_params[:'api_verion'] = opts[:'api_verion'] if !opts[:'api_verion'].nil? query_params[:'status_code'] = opts[:'status_code'] if !opts[:'status_code'].nil? query_params[:'date_created_from'] = opts[:'date_created_from'] if !opts[:'date_created_from'].nil? query_params[:'date_created_to'] = opts[:'date_created_to'] if !opts[:'date_created_to'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? query_params[:'success'] = opts[:'success'] if !opts[:'success'].nil? query_params[:'date_time_from'] = opts[:'date_time_from'] if !opts[:'date_time_from'].nil? query_params[:'date_time_to'] = opts[:'date_time_to'] if !opts[:'date_time_to'].nil? query_params[:'user_agent'] = opts[:'user_agent'] if !opts[:'user_agent'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Event>' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"LogApi.log_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LogApi#log_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#log_id_get(id, opts = {}) ⇒ Event
Get an event by id Retrieve a log event by its internal id. Logs record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](dashboard.invoicetronic.com).
129 130 131 132 |
# File 'lib/invoicetronic_sdk/api/log_api.rb', line 129 def log_id_get(id, opts = {}) data, _status_code, _headers = log_id_get_with_http_info(id, opts) data end |
#log_id_get_with_http_info(id, opts = {}) ⇒ Array<(Event, Integer, Hash)>
Get an event by id Retrieve a log event by its internal id. Logs record every API request. They are preserved for 15 days. You can also view logs in the Events section of the [Dashboard](dashboard.invoicetronic.com).
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/invoicetronic_sdk/api/log_api.rb', line 139 def log_id_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LogApi.log_id_get ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling LogApi.log_id_get" end # resource path local_var_path = '/log/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Event' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"LogApi.log_id_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LogApi#log_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |