Class: Sentdm::Models::InboundMessageEventPayload

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/sentdm/models/inbound_message_event_payload.rb,
sig/sentdm/models/inbound_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, channel: nil, inbound_number: nil, message_id: nil, outbound_number: nil, received_at: nil, text: nil, updated_at: nil) ⇒ Object

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

Body of a message.received event. Delivered when a contact messages one of your numbers.

Parameters:

  • account_id (String) (defaults to: nil)

    The account the message belongs to.

  • channel (String) (defaults to: nil)

    The channel the message arrived on, for example sms or whatsapp.

  • inbound_number (String) (defaults to: nil)

    The contact's number in E.164 format, meaning the number the message came from.

  • message_id (String) (defaults to: nil)

    The inbound message.

  • outbound_number (String) (defaults to: nil)

    Your number in E.164 format, meaning the number the message was addressed to.

  • received_at (String) (defaults to: nil)

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

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

    The message body. Sent as null when the inbound message carried no text, for

  • updated_at (String) (defaults to: nil)

    When the message was received, in UTC (yyyy-MM-ddTHH:mm:ssZ). Same value as



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

Instance Attribute Details

#account_idString?

The account the message belongs to.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :account_id, String

#channelString?

The channel the message arrived on, for example sms or whatsapp.

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :channel, String

#inbound_numberString?

The contact's number in E.164 format, meaning the number the message came from.

Parameters:

  • (String)

Returns:

  • (String, nil)


22
# File 'lib/sentdm/models/inbound_message_event_payload.rb', line 22

optional :inbound_number, String

#message_idString?

The inbound message.

Parameters:

  • (String)

Returns:

  • (String, nil)


28
# File 'lib/sentdm/models/inbound_message_event_payload.rb', line 28

optional :message_id, String

#outbound_numberString?

Your number in E.164 format, meaning the number the message was addressed to.

Parameters:

  • (String)

Returns:

  • (String, nil)


34
# File 'lib/sentdm/models/inbound_message_event_payload.rb', line 34

optional :outbound_number, String

#received_atString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


40
# File 'lib/sentdm/models/inbound_message_event_payload.rb', line 40

optional :received_at, String

#textString?

The message body. Sent as null when the inbound message carried no text, for example a media-only message. The field is always present, so read it and check for null rather than checking whether the key exists.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


48
# File 'lib/sentdm/models/inbound_message_event_payload.rb', line 48

optional :text, String, nil?: true

#updated_atString?

When the message was received, in UTC (yyyy-MM-ddTHH:mm:ssZ). Same value as ReceivedAt, kept for envelope consistency with outbound events.

Parameters:

  • (String)

Returns:

  • (String, nil)


55
# File 'lib/sentdm/models/inbound_message_event_payload.rb', line 55

optional :updated_at, String

Instance Method Details

#to_hash{

Returns:

  • ({)


57
# File 'sig/sentdm/models/inbound_message_event_payload.rbs', line 57

def to_hash: -> {