Class: StreamChat::Webhook::UnknownEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/getstream_ruby/generated/webhook.rb

Overview

Returned by parse_event when the type discriminator is well-formed but unknown to this SDK version.

Stable forward-compat surface: backend may add new event types before this SDK is regenerated. Switch on the returned object’s class and include UnknownEvent as a fallback case.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, created_at: nil, raw: {}) ⇒ UnknownEvent

Returns a new instance of UnknownEvent.



204
205
206
207
208
# File 'lib/getstream_ruby/generated/webhook.rb', line 204

def initialize(type:, created_at: nil, raw: {})
  @type = type
  @created_at = created_at
  @raw = raw
end

Instance Attribute Details

#created_atTime? (readonly)

Returns parsed timestamp from the envelope, or nil if missing/unparseable.

Returns:

  • (Time, nil)

    parsed timestamp from the envelope, or nil if missing/unparseable



201
202
203
204
205
206
207
208
209
# File 'lib/getstream_ruby/generated/webhook.rb', line 201

class UnknownEvent
  attr_reader :type, :created_at, :raw

  def initialize(type:, created_at: nil, raw: {})
    @type = type
    @created_at = created_at
    @raw = raw
  end
end

#rawHash (readonly)

Returns the full parsed JSON hash for inspection.

Returns:

  • (Hash)

    the full parsed JSON hash for inspection



201
202
203
204
205
206
207
208
209
# File 'lib/getstream_ruby/generated/webhook.rb', line 201

class UnknownEvent
  attr_reader :type, :created_at, :raw

  def initialize(type:, created_at: nil, raw: {})
    @type = type
    @created_at = created_at
    @raw = raw
  end
end

#typeString (readonly)

Returns the unrecognized discriminator value.

Returns:

  • (String)

    the unrecognized discriminator value



201
202
203
204
205
206
207
208
209
# File 'lib/getstream_ruby/generated/webhook.rb', line 201

class UnknownEvent
  attr_reader :type, :created_at, :raw

  def initialize(type:, created_at: nil, raw: {})
    @type = type
    @created_at = created_at
    @raw = raw
  end
end