Class: TransferZero::LogsApi
- Inherits:
-
Object
- Object
- TransferZero::LogsApi
- Defined in:
- lib/transferzero-sdk/api/logs_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_webhook_log(webhook_log_id, opts = {}) ⇒ WebhookLogResponse
Fetch an individual webhook log Returns a single webhook log based on the webhook log ID.
-
#get_webhook_log_with_http_info(webhook_log_id, opts = {}) ⇒ Array<(WebhookLogResponse, Fixnum, Hash)>
Fetch an individual webhook log Returns a single webhook log based on the webhook log ID.
-
#get_webhook_logs(opts = {}) ⇒ WebhookLogListResponse
Fetch a list of webhook logs Returns a list of webhook logs.
-
#get_webhook_logs_with_http_info(opts = {}) ⇒ Array<(WebhookLogListResponse, Fixnum, Hash)>
Fetch a list of webhook logs Returns a list of webhook logs.
-
#initialize(api_client = ApiClient.default) ⇒ LogsApi
constructor
A new instance of LogsApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/transferzero-sdk/api/logs_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_webhook_log(webhook_log_id, opts = {}) ⇒ WebhookLogResponse
Fetch an individual webhook log Returns a single webhook log based on the webhook log ID.
29 30 31 32 |
# File 'lib/transferzero-sdk/api/logs_api.rb', line 29 def get_webhook_log(webhook_log_id, opts = {}) data, _status_code, _headers = get_webhook_log_with_http_info(webhook_log_id, opts) data end |
#get_webhook_log_with_http_info(webhook_log_id, opts = {}) ⇒ Array<(WebhookLogResponse, Fixnum, Hash)>
Fetch an individual webhook log Returns a single webhook log based on the webhook 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/logs_api.rb', line 39 def get_webhook_log_with_http_info(webhook_log_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LogsApi.get_webhook_log ...' end # verify the required parameter 'webhook_log_id' is set if @api_client.config.client_side_validation && webhook_log_id.nil? fail ArgumentError, "Missing the required parameter 'webhook_log_id' when calling LogsApi.get_webhook_log" end # resource path local_var_path = '/logs/{Webhook Log ID}'.sub('{' + 'Webhook Log ID' + '}', webhook_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 => 'WebhookLogResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LogsApi#get_webhook_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_webhook_logs(opts = {}) ⇒ WebhookLogListResponse
Fetch a list of webhook logs Returns a list of webhook logs. Response includes pagination.
86 87 88 89 |
# File 'lib/transferzero-sdk/api/logs_api.rb', line 86 def get_webhook_logs(opts = {}) data, _status_code, _headers = get_webhook_logs_with_http_info(opts) data end |
#get_webhook_logs_with_http_info(opts = {}) ⇒ Array<(WebhookLogListResponse, Fixnum, Hash)>
Fetch a list of webhook logs Returns a list of webhook logs. Response includes pagination.
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/logs_api.rb', line 99 def get_webhook_logs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LogsApi.get_webhook_logs ...' end # resource path local_var_path = '/logs/webhooks' # 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 => 'WebhookLogListResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LogsApi#get_webhook_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |