Class: Notiflows::Models::Delivery

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/notiflows/models/delivery.rb

Overview

Defined Under Namespace

Modules: ChannelType, Status

Instance Attribute Summary collapse

Class Method 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:, channel_type:, created_at:, notification_id:, notiflow_id:, recipient_id:, status:, updated_at:, actor_id: nil, archived_at: nil, channel_id: nil, clicked_at: nil, data: nil, read_at: nil, seen_at: nil, sent_at: nil, topic: nil) ⇒ Object

Some parameter documentations has been truncated, see Notiflows::Models::Delivery for more details.

A single delivery attempt through a specific channel

Parameters:

  • id (String) —

    Delivery ID

  • channel_type (Symbol, Notiflows::Models::Delivery::ChannelType) —

    Type of channel used for this delivery

  • created_at (Time) —

    When the delivery was created

  • notification_id (String) —

    ID of the parent notification

  • notiflow_id (String) —

    ID of the notiflow

  • recipient_id (String) —

    Internal ID of the recipient

  • status (Symbol, Notiflows::Models::Delivery::Status) —

    Delivery status:

  • updated_at (Time) —

    When the delivery was last updated

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

    Internal ID of the actor

  • archived_at (Time, nil) (defaults to: nil) —

    When the recipient archived it

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

    ID of the channel used for delivery

  • clicked_at (Time, nil) (defaults to: nil) —

    When the recipient clicked/interacted

  • data (Object) (defaults to: nil) —

    Rendered notification content (varies by channel type)

  • read_at (Time, nil) (defaults to: nil) —

    When the recipient marked it as read

  • seen_at (Time, nil) (defaults to: nil) —

    When the recipient saw the notification

  • sent_at (Time, nil) (defaults to: nil) —

    When the delivery was sent to the provider

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

    Topic name if triggered via topic



# File 'lib/notiflows/models/delivery.rb', line 113

Instance Attribute Details

#actor_id ⇒ String?

Internal ID of the actor

Returns:

  • (String, nil)


63
# File 'lib/notiflows/models/delivery.rb', line 63

optional :actor_id, String, nil?: true

#archived_at ⇒ Time?

When the recipient archived it

Returns:

  • (Time, nil)


69
# File 'lib/notiflows/models/delivery.rb', line 69

optional :archived_at, Time, nil?: true

#channel_id ⇒ String?

ID of the channel used for delivery

Returns:

  • (String, nil)


75
# File 'lib/notiflows/models/delivery.rb', line 75

optional :channel_id, String, nil?: true

#channel_type ⇒ Symbol, Notiflows::Models::Delivery::ChannelType

Type of channel used for this delivery



17
# File 'lib/notiflows/models/delivery.rb', line 17

required :channel_type, enum: -> { Notiflows::Delivery::ChannelType }

#clicked_at ⇒ Time?

When the recipient clicked/interacted

Returns:

  • (Time, nil)


81
# File 'lib/notiflows/models/delivery.rb', line 81

optional :clicked_at, Time, nil?: true

#created_at ⇒ Time

When the delivery was created

Returns:

  • (Time)


23
# File 'lib/notiflows/models/delivery.rb', line 23

required :created_at, Time

#data ⇒ Object?

Rendered notification content (varies by channel type)

Returns:

  • (Object, nil)


87
# File 'lib/notiflows/models/delivery.rb', line 87

optional :data, Notiflows::Internal::Type::Unknown

#id ⇒ String

Delivery ID

Returns:

  • (String)


11
# File 'lib/notiflows/models/delivery.rb', line 11

required :id, String

#notification_id ⇒ String

ID of the parent notification

Returns:

  • (String)


29
# File 'lib/notiflows/models/delivery.rb', line 29

required :notification_id, String

#notiflow_id ⇒ String

ID of the notiflow

Returns:

  • (String)


35
# File 'lib/notiflows/models/delivery.rb', line 35

required :notiflow_id, String

#read_at ⇒ Time?

When the recipient marked it as read

Returns:

  • (Time, nil)


93
# File 'lib/notiflows/models/delivery.rb', line 93

optional :read_at, Time, nil?: true

#recipient_id ⇒ String

Internal ID of the recipient

Returns:

  • (String)


41
# File 'lib/notiflows/models/delivery.rb', line 41

required :recipient_id, String

#seen_at ⇒ Time?

When the recipient saw the notification

Returns:

  • (Time, nil)


99
# File 'lib/notiflows/models/delivery.rb', line 99

optional :seen_at, Time, nil?: true

#sent_at ⇒ Time?

When the delivery was sent to the provider

Returns:

  • (Time, nil)


105
# File 'lib/notiflows/models/delivery.rb', line 105

optional :sent_at, Time, nil?: true

#status ⇒ Symbol, Notiflows::Models::Delivery::Status

Delivery status:

  • pending: Queued for sending
  • sent: Successfully sent to the provider
  • failed: Delivery failed


51
# File 'lib/notiflows/models/delivery.rb', line 51

required :status, enum: -> { Notiflows::Delivery::Status }

#topic ⇒ String?

Topic name if triggered via topic

Returns:

  • (String, nil)


111
# File 'lib/notiflows/models/delivery.rb', line 111

optional :topic, String, nil?: true

#updated_at ⇒ Time

When the delivery was last updated

Returns:

  • (Time)


57
# File 'lib/notiflows/models/delivery.rb', line 57

required :updated_at, Time

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/notiflows/models/delivery.rb', line 166