Class: SurgeAPI::Models::MessageReceivedWebhookEvent::Data

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

Overview

See Also:

  • SurgeAPI::Models::MessageReceivedWebhookEvent#data

Defined Under Namespace

Modules: Status Classes: Attachment, Conversation

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:, contact:, phone_number:) ⇒ Object

The conversation this message belongs to

Parameters:

  • The unique identifier for the conversation

  • A contact who has consented to receive messages

  • A phone number that can be used to send and receive messages and calls



# File 'lib/surge_api/models/message_received_webhook_event.rb', line 91

Instance Attribute Details

#attachmentsArray<SurgeAPI::Models::MessageReceivedWebhookEvent::Data::Attachment>?

Attachments included with the message

Returns:



81
82
# File 'lib/surge_api/models/message_received_webhook_event.rb', line 81

optional :attachments,
-> { SurgeAPI::Internal::Type::ArrayOf[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment] }

#blast_idString?

The ID of the blast this message belongs to, if any. This can be used to attribute messages back to a specific blast.

Parameters:

Returns:



89
# File 'lib/surge_api/models/message_received_webhook_event.rb', line 89

optional :blast_id, String

#bodyString?

The content of the message

Parameters:

Returns:



51
# File 'lib/surge_api/models/message_received_webhook_event.rb', line 51

required :body, String, nil?: true

#conversationSurgeAPI::Models::MessageReceivedWebhookEvent::Data::Conversation

The conversation this message belongs to

Parameters:

Returns:



57
# File 'lib/surge_api/models/message_received_webhook_event.rb', line 57

required :conversation, -> { SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation }

#idString

The unique identifier for the message

Parameters:

Returns:



45
# File 'lib/surge_api/models/message_received_webhook_event.rb', line 45

required :id, String

#metadataHash{Symbol=>String}

Set of key-value pairs that will be stored with the object.

Parameters:

Returns:



63
# File 'lib/surge_api/models/message_received_webhook_event.rb', line 63

required :metadata, SurgeAPI::Internal::Type::HashOf[String]

#received_atTime

When the message was received

Parameters:

Returns:



69
# File 'lib/surge_api/models/message_received_webhook_event.rb', line 69

required :received_at, Time

#statusSymbol, SurgeAPI::Models::MessageReceivedWebhookEvent::Data::Status

The message status represented by this event

Parameters:

Returns:



75
# File 'lib/surge_api/models/message_received_webhook_event.rb', line 75

required :status, enum: -> { SurgeAPI::MessageReceivedWebhookEvent::Data::Status }

Class Method Details

.valuesArray<Symbol>

Returns:



# File 'lib/surge_api/models/message_received_webhook_event.rb', line 151

Instance Method Details

#to_hash{

Returns:



80
# File 'sig/surge_api/models/message_received_webhook_event.rbs', line 80

def to_hash: -> {