Class: Moov::Models::Components::WebhookEvent

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/moov/models/components/webhookevent.rb

Overview

Webhook events are sent to your webhook URL when certain actions occur in the Moov API. You can subscribe to these events to receive real-time notifications.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(event_id:, type:, data:, created_on:) ⇒ WebhookEvent

Returns a new instance of WebhookEvent.



26
27
28
29
30
31
# File 'lib/moov/models/components/webhookevent.rb', line 26

def initialize(event_id:, type:, data:, created_on:)
  @event_id = event_id
  @type = type
  @data = data
  @created_on = created_on
end

Instance Method Details

#==(other) ⇒ Object



34
35
36
37
38
39
40
41
# File 'lib/moov/models/components/webhookevent.rb', line 34

def ==(other)
  return false unless other.is_a? self.class
  return false unless @event_id == other.event_id
  return false unless @type == other.type
  return false unless @data == other.data
  return false unless @created_on == other.created_on
  true
end