Class: MailSlurpClient::ApiAuditLogControllerApi
- Inherits:
-
Object
- Object
- MailSlurpClient::ApiAuditLogControllerApi
- Defined in:
- lib/mailslurp_client/api/api_audit_log_controller_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
- #get_audit_log_by_event_id(event_id, opts = {}) ⇒ AuditLogEventDto
-
#get_audit_log_by_event_id_with_http_info(event_id, opts = {}) ⇒ Array<(AuditLogEventDto, Integer, Hash)>
AuditLogEventDto data, response status code and response headers.
- #get_audit_logs(opts = {}) ⇒ AuditLogPageDto
-
#get_audit_logs_with_http_info(opts = {}) ⇒ Array<(AuditLogPageDto, Integer, Hash)>
AuditLogPageDto data, response status code and response headers.
-
#initialize(api_client = ApiClient.default) ⇒ ApiAuditLogControllerApi
constructor
A new instance of ApiAuditLogControllerApi.
- #search_audit_logs(audit_log_search_options, opts = {}) ⇒ AuditLogPageDto
-
#search_audit_logs_with_http_info(audit_log_search_options, opts = {}) ⇒ Array<(AuditLogPageDto, Integer, Hash)>
AuditLogPageDto data, response status code and response headers.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ApiAuditLogControllerApi
Returns a new instance of ApiAuditLogControllerApi.
19 20 21 |
# File 'lib/mailslurp_client/api/api_audit_log_controller_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/mailslurp_client/api/api_audit_log_controller_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_audit_log_by_event_id(event_id, opts = {}) ⇒ AuditLogEventDto
27 28 29 30 |
# File 'lib/mailslurp_client/api/api_audit_log_controller_api.rb', line 27 def get_audit_log_by_event_id(event_id, opts = {}) data, _status_code, _headers = get_audit_log_by_event_id_with_http_info(event_id, opts) data end |
#get_audit_log_by_event_id_with_http_info(event_id, opts = {}) ⇒ Array<(AuditLogEventDto, Integer, Hash)>
Returns AuditLogEventDto data, response status code and response headers.
37 38 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 76 77 78 79 80 81 82 83 84 |
# File 'lib/mailslurp_client/api/api_audit_log_controller_api.rb', line 37 def get_audit_log_by_event_id_with_http_info(event_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApiAuditLogControllerApi.get_audit_log_by_event_id ...' end # verify the required parameter 'event_id' is set if @api_client.config.client_side_validation && event_id.nil? fail ArgumentError, "Missing the required parameter 'event_id' when calling ApiAuditLogControllerApi.get_audit_log_by_event_id" end # resource path local_var_path = '/audit-logs/{eventId}'.sub('{' + 'eventId' + '}', CGI.escape(event_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'AuditLogEventDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :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: ApiAuditLogControllerApi#get_audit_log_by_event_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_audit_logs(opts = {}) ⇒ AuditLogPageDto
101 102 103 104 |
# File 'lib/mailslurp_client/api/api_audit_log_controller_api.rb', line 101 def get_audit_logs(opts = {}) data, _status_code, _headers = get_audit_logs_with_http_info(opts) data end |
#get_audit_logs_with_http_info(opts = {}) ⇒ Array<(AuditLogPageDto, Integer, Hash)>
Returns AuditLogPageDto data, response status code and response headers.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 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 |
# File 'lib/mailslurp_client/api/api_audit_log_controller_api.rb', line 121 def get_audit_logs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApiAuditLogControllerApi.get_audit_logs ...' end # resource path local_var_path = '/audit-logs' # query parameters query_params = opts[:query_params] || {} query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'action'] = opts[:'action'] if !opts[:'action'].nil? query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? query_params[:'actorUserId'] = opts[:'actor_user_id'] if !opts[:'actor_user_id'].nil? query_params[:'targetUserId'] = opts[:'target_user_id'] if !opts[:'target_user_id'].nil? query_params[:'resourceType'] = opts[:'resource_type'] if !opts[:'resource_type'].nil? query_params[:'resourceId'] = opts[:'resource_id'] if !opts[:'resource_id'].nil? query_params[:'outcome'] = opts[:'outcome'] if !opts[:'outcome'].nil? query_params[:'requestId'] = opts[:'request_id'] if !opts[:'request_id'].nil? query_params[:'ipAddress'] = opts[:'ip_address'] if !opts[:'ip_address'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'AuditLogPageDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :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: ApiAuditLogControllerApi#get_audit_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_audit_logs(audit_log_search_options, opts = {}) ⇒ AuditLogPageDto
180 181 182 183 |
# File 'lib/mailslurp_client/api/api_audit_log_controller_api.rb', line 180 def search_audit_logs(, opts = {}) data, _status_code, _headers = search_audit_logs_with_http_info(, opts) data end |
#search_audit_logs_with_http_info(audit_log_search_options, opts = {}) ⇒ Array<(AuditLogPageDto, Integer, Hash)>
Returns AuditLogPageDto data, response status code and response headers.
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/mailslurp_client/api/api_audit_log_controller_api.rb', line 188 def search_audit_logs_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ApiAuditLogControllerApi.search_audit_logs ...' end # verify the required parameter 'audit_log_search_options' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'audit_log_search_options' when calling ApiAuditLogControllerApi.search_audit_logs" end # resource path local_var_path = '/audit-logs/search' # 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(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body() # return_type return_type = opts[:return_type] || 'AuditLogPageDto' # auth_names auth_names = opts[:auth_names] || ['API_KEY'] = opts.merge( :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ApiAuditLogControllerApi#search_audit_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |