Class: Zavudev::Models::ConversationRetrieveResponse::Conversation
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Zavudev::Models::ConversationRetrieveResponse::Conversation
- Defined in:
- lib/zavudev/models/conversation_retrieve_response.rb,
sig/zavudev/models/conversation_retrieve_response.rbs
Overview
Defined Under Namespace
Classes: Group, LastMessage, Whatsapp
Instance Attribute Summary collapse
-
#channels ⇒ Array<String>
Every channel this thread has carried messages on.
-
#contact_id ⇒ String?
ID of the contact this thread belongs to.
-
#contact_identifier ⇒ String
The key this thread is filed under: a phone number in E.164, a WhatsApp business-scoped user ID (BSUID), a numeric chat ID (Telegram/Instagram/Messenger), or a group JID.
- #created_at ⇒ Time
-
#email ⇒ String?
Email address of the thread, when the contact was reached by email.
-
#group ⇒ Zavudev::Models::ConversationRetrieveResponse::Conversation::Group?
Present when the thread is a group chat rather than a one-to-one conversation.
- #id ⇒ String
-
#last_message ⇒ Zavudev::Models::ConversationRetrieveResponse::Conversation::LastMessage
Denormalized preview of the most recent message, so a thread list needs no extra fetch.
- #message_count ⇒ Integer
-
#sender_id ⇒ String?
Sender that last handled this thread.
-
#unread_count ⇒ Integer
Inbound messages not yet marked read.
- #updated_at ⇒ Time
-
#whatsapp ⇒ Zavudev::Models::ConversationRetrieveResponse::Conversation::Whatsapp?
WhatsApp identity, present when the contact adopted a username.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, participant_count: nil, subject: nil) ⇒ Object
constructor
Present when the thread is a group chat rather than a one-to-one conversation.
- #to_hash ⇒ {
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:, participant_count: nil, subject: nil) ⇒ Object
Present when the thread is a group chat rather than a one-to-one conversation.
|
|
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 106
|
Instance Attribute Details
#channels ⇒ Array<String>
Every channel this thread has carried messages on.
32 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 32 required :channels, Zavudev::Internal::Type::ArrayOf[String] |
#contact_id ⇒ String?
ID of the contact this thread belongs to. Absent on group threads and on threads whose contact has not been resolved yet.
79 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 79 optional :contact_id, String, api_name: :contactId |
#contact_identifier ⇒ String
The key this thread is filed under: a phone number in E.164, a WhatsApp business-scoped user ID (BSUID), a numeric chat ID (Telegram/Instagram/Messenger), or a group JID. It is not always a phone number, so do not parse it as one.
41 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 41 required :contact_identifier, String, api_name: :contactIdentifier |
#created_at ⇒ Time
46 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 46 required :created_at, Time, api_name: :createdAt |
#email ⇒ String?
Email address of the thread, when the contact was reached by email.
85 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 85 optional :email, String |
#group ⇒ Zavudev::Models::ConversationRetrieveResponse::Conversation::Group?
Present when the thread is a group chat rather than a one-to-one conversation.
91 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 91 optional :group, -> { Zavudev::Models::ConversationRetrieveResponse::Conversation::Group } |
#id ⇒ String
26 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 26 required :id, String |
#last_message ⇒ Zavudev::Models::ConversationRetrieveResponse::Conversation::LastMessage
Denormalized preview of the most recent message, so a thread list needs no extra fetch.
53 54 55 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 53 required :last_message, -> { Zavudev::Models::ConversationRetrieveResponse::Conversation::LastMessage }, api_name: :lastMessage |
#message_count ⇒ Integer
60 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 60 required :message_count, Integer, api_name: :messageCount |
#sender_id ⇒ String?
Sender that last handled this thread. Use it as the Zavu-Sender header when
replying so the answer leaves from the same number the contact knows.
98 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 98 optional :sender_id, String, api_name: :senderId |
#unread_count ⇒ Integer
Inbound messages not yet marked read. Reset with POST /v1/conversations/conversationId/read.
67 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 67 required :unread_count, Integer, api_name: :unreadCount |
#updated_at ⇒ Time
72 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 72 required :updated_at, Time, api_name: :updatedAt |
#whatsapp ⇒ Zavudev::Models::ConversationRetrieveResponse::Conversation::Whatsapp?
WhatsApp identity, present when the contact adopted a username.
104 |
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 104 optional :whatsapp, -> { Zavudev::Models::ConversationRetrieveResponse::Conversation::Whatsapp } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/zavudev/models/conversation_retrieve_response.rb', line 191
|
Instance Method Details
#to_hash ⇒ {
93 |
# File 'sig/zavudev/models/conversation_retrieve_response.rbs', line 93
def to_hash: -> {
|