Class: Sentdm::Models::MessageEventPayload

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

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(account_id: nil, agent_id: nil, channel: nil, message_id: nil, message_status: nil, outbound_number: nil, template_id: nil, template_name: nil, updated_at: nil) ⇒ Object

Some parameter documentations has been truncated, see Sentdm::Models::MessageEventPayload for more details.

Body of an outbound message lifecycle event. Delivered once per status change, so a single message produces several of these as it moves toward a terminal status.

Parameters:

  • account_id (String) (defaults to: nil)

    The account the message belongs to.

  • agent_id (String, nil) (defaults to: nil)

    The agent attributed to the send, when the send was attributed to one.

  • channel (String) (defaults to: nil)

    The channel the message went out on, for example sms or whatsapp. A message

  • message_id (String) (defaults to: nil)

    The message this event describes. Stable across every event in the message's lif

  • message_status (String) (defaults to: nil)

    The status the message just reached, for example SENT, DELIVERED, or

  • outbound_number (String) (defaults to: nil)

    The recipient's number in E.164 format.

  • template_id (String, nil) (defaults to: nil)

    The template the message was sent from, when it was sent from one.

  • template_name (String, nil) (defaults to: nil)

    Name of the template the message was sent from. Omitted when the message wasn't

  • updated_at (String) (defaults to: nil)

    When the message reached MessageStatus, in UTC



# File 'lib/sentdm/models/message_event_payload.rb', line 65

Instance Attribute Details

#account_idString?

The account the message belongs to.

Parameters:

  • (String)

Returns:

  • (String, nil)


10
# File 'lib/sentdm/models/message_event_payload.rb', line 10

optional :account_id, String

#agent_idString?

The agent attributed to the send, when the send was attributed to one.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


16
# File 'lib/sentdm/models/message_event_payload.rb', line 16

optional :agent_id, String, nil?: true

#channelString?

The channel the message went out on, for example sms or whatsapp. A message that falls back to another channel reports the channel actually used.

Parameters:

  • (String)

Returns:

  • (String, nil)


23
# File 'lib/sentdm/models/message_event_payload.rb', line 23

optional :channel, String

#message_idString?

The message this event describes. Stable across every event in the message's lifecycle, so use it to correlate them.

Parameters:

  • (String)

Returns:

  • (String, nil)


30
# File 'lib/sentdm/models/message_event_payload.rb', line 30

optional :message_id, String

#message_statusString?

The status the message just reached, for example SENT, DELIVERED, or FAILED. Sent means dispatched and delivered means confirmed, so treat them as distinct outcomes.

Parameters:

  • (String)

Returns:

  • (String, nil)


38
# File 'lib/sentdm/models/message_event_payload.rb', line 38

optional :message_status, String

#outbound_numberString?

The recipient's number in E.164 format.

Parameters:

  • (String)

Returns:

  • (String, nil)


44
# File 'lib/sentdm/models/message_event_payload.rb', line 44

optional :outbound_number, String

#template_idString?

The template the message was sent from, when it was sent from one.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


50
# File 'lib/sentdm/models/message_event_payload.rb', line 50

optional :template_id, String, nil?: true

#template_nameString?

Name of the template the message was sent from. Omitted when the message wasn't template-based.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


57
# File 'lib/sentdm/models/message_event_payload.rb', line 57

optional :template_name, String, nil?: true

#updated_atString?

When the message reached MessageStatus, in UTC (yyyy-MM-ddTHH:mm:ssZ).

Parameters:

  • (String)

Returns:

  • (String, nil)


63
# File 'lib/sentdm/models/message_event_payload.rb', line 63

optional :updated_at, String

Instance Method Details

#to_hash{

Returns:

  • ({)


59
# File 'sig/sentdm/models/message_event_payload.rbs', line 59

def to_hash: -> {