Class: Knockapi::Models::Message::Channel

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/knockapi/models/message.rb,
sig/knockapi/models/message.rbs

Overview

See Also:

  • Knockapi::Models::Message#channel

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, created_at:, provider:, type:, updated_at:, key: nil, name: nil) ⇒ Object

A configured channel, which is a way to route messages to a provider.

Parameters:

  • id (String) —

    The unique identifier for the channel.

  • created_at (Time) —

    The timestamp of when the channel was created.

  • provider (String) —

    The ID of the provider that this channel uses to deliver messages.

  • type (Symbol, Knockapi::Models::Message::Channel::Type) —

    The type of channel, determining what kind of messages it can send.

  • updated_at (Time) —

    The timestamp of when the channel was last updated.

  • key (String, nil) (defaults to: nil) —

    Unique identifier for the channel within a project (immutable once created).

  • name (String, nil) (defaults to: nil) —

    The human-readable name of the channel.



# File 'lib/knockapi/models/message.rb', line 378

Instance Attribute Details

#created_at ⇒ Time

The timestamp of when the channel was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


346
# File 'lib/knockapi/models/message.rb', line 346

required :created_at, Time

#id ⇒ String

The unique identifier for the channel.

Parameters:

  • value (String)

Returns:

  • (String)


340
# File 'lib/knockapi/models/message.rb', line 340

required :id, String

#key ⇒ String?

Unique identifier for the channel within a project (immutable once created).

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


370
# File 'lib/knockapi/models/message.rb', line 370

optional :key, String, nil?: true

#name ⇒ String?

The human-readable name of the channel.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


376
# File 'lib/knockapi/models/message.rb', line 376

optional :name, String, nil?: true

#provider ⇒ String

The ID of the provider that this channel uses to deliver messages.

Parameters:

  • value (String)

Returns:

  • (String)


352
# File 'lib/knockapi/models/message.rb', line 352

required :provider, String

#type ⇒ Symbol, Knockapi::Models::Message::Channel::Type

The type of channel, determining what kind of messages it can send.

Parameters:

  • value (Knockapi::Models::Message::Channel::type_)

Returns:



358
# File 'lib/knockapi/models/message.rb', line 358

required :type, enum: -> { Knockapi::Message::Channel::Type }

#updated_at ⇒ Time

The timestamp of when the channel was last updated.

Parameters:

  • value (Time)

Returns:

  • (Time)


364
# File 'lib/knockapi/models/message.rb', line 364

required :updated_at, Time

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


277
# File 'sig/knockapi/models/message.rbs', line 277

def to_hash: -> {