Class: Knockapi::Models::Message
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Knockapi::Models::Message
- Defined in:
- lib/knockapi/models/message.rb
Overview
Defined Under Namespace
Modules: EngagementStatus, Status Classes: Channel, Source
Instance Attribute Summary collapse
-
#_typename ⇒ String
The typename of the schema.
-
#actors ⇒ Array<String, Knockapi::Models::RecipientReference::ObjectReference>?
One or more actors that are associated with this message.
-
#archived_at ⇒ Time?
Timestamp when the message was archived.
-
#channel ⇒ Knockapi::Models::Message::Channel?
A configured channel, which is a way to route messages to a provider.
- #channel_id ⇒ String deprecated Deprecated.
-
#clicked_at ⇒ Time?
Timestamp when the message was clicked.
-
#data ⇒ Hash{Symbol=>Object}?
Data associated with the message’s workflow run.
-
#engagement_statuses ⇒ Array<Symbol, Knockapi::Models::Message::EngagementStatus>
A list of engagement statuses.
-
#id ⇒ String
The unique identifier for the message.
-
#inserted_at ⇒ Time
Timestamp when the resource was created.
-
#interacted_at ⇒ Time?
Timestamp when the message was interacted with.
-
#link_clicked_at ⇒ Time?
Timestamp when a link in the message was clicked.
-
#metadata ⇒ Hash{Symbol=>Object}?
The metadata associated with the message.
-
#read_at ⇒ Time?
Timestamp when the message was read.
-
#recipient ⇒ String, Knockapi::Models::RecipientReference::ObjectReference
A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).
-
#scheduled_at ⇒ Time?
Timestamp when the message was scheduled to be sent.
-
#seen_at ⇒ Time?
Timestamp when the message was seen.
-
#source ⇒ Knockapi::Models::Message::Source
The workflow or guide that triggered the message.
-
#status ⇒ Symbol, Knockapi::Models::Message::Status
The message delivery status.
-
#tenant ⇒ String?
The ID of the ‘tenant` associated with the message.
-
#updated_at ⇒ Time
The timestamp when the resource was last updated.
- #workflow ⇒ String? deprecated Deprecated.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, _typename:, channel_id:, engagement_statuses:, inserted_at:, recipient:, source:, status:, updated_at:, actors: nil, archived_at: nil, channel: nil, clicked_at: nil, data: nil, interacted_at: nil, link_clicked_at: nil, metadata: nil, read_at: nil, scheduled_at: nil, seen_at: nil, tenant: nil, workflow: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Message for more details.
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:, _typename:, channel_id:, engagement_statuses:, inserted_at:, recipient:, source:, status:, updated_at:, actors: nil, archived_at: nil, channel: nil, clicked_at: nil, data: nil, interacted_at: nil, link_clicked_at: nil, metadata: nil, read_at: nil, scheduled_at: nil, seen_at: nil, tenant: nil, workflow: nil) ⇒ Object
Some parameter documentations has been truncated, see Knockapi::Models::Message for more details.
Represents a single message that was generated by a workflow for a given channel.
|
|
# File 'lib/knockapi/models/message.rb', line 152
|
Instance Attribute Details
#_typename ⇒ String
The typename of the schema.
17 |
# File 'lib/knockapi/models/message.rb', line 17 required :_typename, String, api_name: :__typename |
#actors ⇒ Array<String, Knockapi::Models::RecipientReference::ObjectReference>?
One or more actors that are associated with this message. Note: this is a list that can contain up to 10 actors if the message is produced from a [batch](/designing-workflows/batch-function).
71 |
# File 'lib/knockapi/models/message.rb', line 71 optional :actors, -> { Knockapi::Internal::Type::ArrayOf[union: Knockapi::RecipientReference] } |
#archived_at ⇒ Time?
Timestamp when the message was archived.
77 |
# File 'lib/knockapi/models/message.rb', line 77 optional :archived_at, Time, nil?: true |
#channel ⇒ Knockapi::Models::Message::Channel?
A configured channel, which is a way to route messages to a provider.
83 |
# File 'lib/knockapi/models/message.rb', line 83 optional :channel, -> { Knockapi::Message::Channel } |
#channel_id ⇒ String
Deprecated, use channel.id instead.
25 |
# File 'lib/knockapi/models/message.rb', line 25 required :channel_id, String |
#clicked_at ⇒ Time?
Timestamp when the message was clicked.
89 |
# File 'lib/knockapi/models/message.rb', line 89 optional :clicked_at, Time, nil?: true |
#data ⇒ Hash{Symbol=>Object}?
Data associated with the message’s workflow run. Includes the workflow trigger request’s ‘data` payload merged with any additional data returned by a [fetch function](/designing-workflows/fetch-function). For messages produced after a [batch step](/designing-workflows/batch-function), includes the payload `data` from the most-recent trigger request (the final `activity` in the batch).
99 |
# File 'lib/knockapi/models/message.rb', line 99 optional :data, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown], nil?: true |
#engagement_statuses ⇒ Array<Symbol, Knockapi::Models::Message::EngagementStatus>
A list of engagement statuses.
31 32 |
# File 'lib/knockapi/models/message.rb', line 31 required :engagement_statuses, -> { Knockapi::Internal::Type::ArrayOf[enum: Knockapi::Message::EngagementStatus] } |
#id ⇒ String
The unique identifier for the message.
11 |
# File 'lib/knockapi/models/message.rb', line 11 required :id, String |
#inserted_at ⇒ Time
Timestamp when the resource was created.
38 |
# File 'lib/knockapi/models/message.rb', line 38 required :inserted_at, Time |
#interacted_at ⇒ Time?
Timestamp when the message was interacted with.
105 |
# File 'lib/knockapi/models/message.rb', line 105 optional :interacted_at, Time, nil?: true |
#link_clicked_at ⇒ Time?
Timestamp when a link in the message was clicked.
111 |
# File 'lib/knockapi/models/message.rb', line 111 optional :link_clicked_at, Time, nil?: true |
#metadata ⇒ Hash{Symbol=>Object}?
The metadata associated with the message.
117 |
# File 'lib/knockapi/models/message.rb', line 117 optional :metadata, Knockapi::Internal::Type::HashOf[Knockapi::Internal::Type::Unknown], nil?: true |
#read_at ⇒ Time?
Timestamp when the message was read.
123 |
# File 'lib/knockapi/models/message.rb', line 123 optional :read_at, Time, nil?: true |
#recipient ⇒ String, Knockapi::Models::RecipientReference::ObjectReference
A reference to a recipient, either a user identifier (string) or an object reference (ID, collection).
45 |
# File 'lib/knockapi/models/message.rb', line 45 required :recipient, union: -> { Knockapi::RecipientReference } |
#scheduled_at ⇒ Time?
Timestamp when the message was scheduled to be sent.
129 |
# File 'lib/knockapi/models/message.rb', line 129 optional :scheduled_at, Time, nil?: true |
#seen_at ⇒ Time?
Timestamp when the message was seen.
135 |
# File 'lib/knockapi/models/message.rb', line 135 optional :seen_at, Time, nil?: true |
#source ⇒ Knockapi::Models::Message::Source
The workflow or guide that triggered the message.
51 |
# File 'lib/knockapi/models/message.rb', line 51 required :source, -> { Knockapi::Message::Source } |
#status ⇒ Symbol, Knockapi::Models::Message::Status
The message delivery status.
57 |
# File 'lib/knockapi/models/message.rb', line 57 required :status, enum: -> { Knockapi::Message::Status } |
#tenant ⇒ String?
The ID of the ‘tenant` associated with the message. Only present when a `tenant` is provided on a workflow trigger request.
142 |
# File 'lib/knockapi/models/message.rb', line 142 optional :tenant, String, nil?: true |
#updated_at ⇒ Time
The timestamp when the resource was last updated.
63 |
# File 'lib/knockapi/models/message.rb', line 63 required :updated_at, Time |
#workflow ⇒ String?
The key of the workflow that generated the message.
150 |
# File 'lib/knockapi/models/message.rb', line 150 optional :workflow, String, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/knockapi/models/message.rb', line 214
|