Class: LockstepSdk::WebhookHistoryTableStorageModel
- Inherits:
-
Object
- Object
- LockstepSdk::WebhookHistoryTableStorageModel
- Defined in:
- lib/lockstep_sdk/models/webhook_history_table_storage_model.rb
Overview
Represents the Webhook Trigger History
Instance Attribute Summary collapse
-
#event_type ⇒ String
Event type which fired webhook [entity]..
-
#failure_count ⇒ Int32
Number of times message failed to be sent over to callback url before succeeding or failing out.
-
#group_key ⇒ Uuid
The GroupKey uniquely identifies a single Lockstep Platform account.
-
#is_successful ⇒ Boolean
Flag whether webhook notification was successful overall (if webhook disabled should always return true otherwise depends on the response from the callback url).
-
#process_result_message ⇒ String
Message containing information about the webhook callback results.
-
#records ⇒ String
The records sent with the webhook.
-
#request_message ⇒ String
The request message sent with the webhook.
-
#request_sent ⇒ Boolean
Flag whether request was sent to callback url successfully or blocked by failing or because it was disabled.
-
#response_message ⇒ String
The response received back from the webhook.
-
#response_status_code ⇒ String
Response status code that is returned when calling a callback url.
-
#timestamp ⇒ Date-time
Timestamp of when a request is sent to a webhook callback.
-
#webhook_history_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#webhook_id ⇒ Uuid
The WebhookId uniquely identifies the webhook used to send notification that an event action has taken place.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ WebhookHistoryTableStorageModel
constructor
Initialize the WebhookHistoryTableStorageModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ WebhookHistoryTableStorageModel
Initialize the WebhookHistoryTableStorageModel using the provided prototype
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 25 def initialize(params = {}) @group_key = params.dig(:group_key) @webhook_id = params.dig(:webhook_id) @webhook_history_id = params.dig(:webhook_history_id) @event_type = params.dig(:event_type) @request_sent = params.dig(:request_sent) @is_successful = params.dig(:is_successful) @response_status_code = params.dig(:response_status_code) @process_result_message = params.dig(:process_result_message) @failure_count = params.dig(:failure_count) @timestamp = params.dig(:timestamp) @records = params.dig(:records) @request_message = params.dig(:request_message) @response_message = params.dig(:response_message) end |
Instance Attribute Details
#event_type ⇒ String
Returns Event type which fired webhook [entity]..
55 56 57 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 55 def event_type @event_type end |
#failure_count ⇒ Int32
Returns Number of times message failed to be sent over to callback url before succeeding or failing out. The maximum value should is based on webhook.
75 76 77 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 75 def failure_count @failure_count end |
#group_key ⇒ Uuid
Returns The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).
43 44 45 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 43 def group_key @group_key end |
#is_successful ⇒ Boolean
Returns Flag whether webhook notification was successful overall (if webhook disabled should always return true otherwise depends on the response from the callback url).
63 64 65 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 63 def is_successful @is_successful end |
#process_result_message ⇒ String
Returns Message containing information about the webhook callback results.
71 72 73 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 71 def @process_result_message end |
#records ⇒ String
Returns The records sent with the webhook.
83 84 85 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 83 def records @records end |
#request_message ⇒ String
Returns The request message sent with the webhook.
87 88 89 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 87 def @request_message end |
#request_sent ⇒ Boolean
Returns Flag whether request was sent to callback url successfully or blocked by failing or because it was disabled.
59 60 61 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 59 def request_sent @request_sent end |
#response_message ⇒ String
Returns The response received back from the webhook.
91 92 93 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 91 def @response_message end |
#response_status_code ⇒ String
Returns Response status code that is returned when calling a callback url.
67 68 69 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 67 def response_status_code @response_status_code end |
#timestamp ⇒ Date-time
Returns Timestamp of when a request is sent to a webhook callback. Contains the last time message is sent if failures occur.
79 80 81 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 79 def @timestamp end |
#webhook_history_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
51 52 53 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 51 def webhook_history_id @webhook_history_id end |
#webhook_id ⇒ Uuid
Returns The WebhookId uniquely identifies the webhook used to send notification that an event action has taken place.
47 48 49 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 47 def webhook_id @webhook_id end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 95 def as_json(={}) { 'groupKey' => @group_key, 'webhookId' => @webhook_id, 'webhookHistoryId' => @webhook_history_id, 'eventType' => @event_type, 'requestSent' => @request_sent, 'isSuccessful' => @is_successful, 'responseStatusCode' => @response_status_code, 'processResultMessage' => @process_result_message, 'failureCount' => @failure_count, 'timestamp' => @timestamp, 'records' => @records, 'requestMessage' => @request_message, 'responseMessage' => @response_message, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
115 116 117 |
# File 'lib/lockstep_sdk/models/webhook_history_table_storage_model.rb', line 115 def to_json(*) "[#{as_json(*).to_json(*)}]" end |