Class: Sentdm::Models::ConversationMessagesList::Message
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Sentdm::Models::ConversationMessagesList::Message
- Defined in:
- lib/sentdm/models/conversation_messages_list.rb,
sig/sentdm/models/conversation_messages_list.rbs
Defined Under Namespace
Classes: Event, MessageBody
Instance Attribute Summary collapse
- #active_contact_price ⇒ Float?
- #channel ⇒ String?
- #contact_id ⇒ String?
- #created_at ⇒ Time?
- #customer_id ⇒ String?
- #direction ⇒ String?
- #events ⇒ Array<Sentdm::Models::ConversationMessagesList::Message::Event>?
- #id ⇒ String?
-
#message_body ⇒ Sentdm::Models::ConversationMessagesList::Message::MessageBody?
Structured message body format for database storage.
- #phone ⇒ String?
- #phone_international ⇒ String?
- #price ⇒ Float?
- #region_code ⇒ String?
- #status ⇒ String?
- #template_category ⇒ String?
- #template_id ⇒ String?
- #template_name ⇒ String?
Instance Method Summary collapse
-
#initialize(status:, timestamp:, description: nil) ⇒ Object
constructor
Represents a status change event in a message's lifecycle (v3).
- #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(status:, timestamp:, description: nil) ⇒ Object
Represents a status change event in a message's lifecycle (v3)
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 25 class Message < Sentdm::Internal::Type::BaseModel # @!attribute id # # @return [String, nil] optional :id, String # @!attribute active_contact_price # # @return [Float, nil] optional :active_contact_price, Float, nil?: true # @!attribute channel # # @return [String, nil] optional :channel, String # @!attribute contact_id # # @return [String, nil] optional :contact_id, String # @!attribute created_at # # @return [Time, nil] optional :created_at, Time # @!attribute customer_id # # @return [String, nil] optional :customer_id, String # @!attribute direction # # @return [String, nil] optional :direction, String # @!attribute events # # @return [Array<Sentdm::Models::ConversationMessagesList::Message::Event>, nil] optional :events, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::ConversationMessagesList::Message::Event] }, nil?: true # @!attribute message_body # Structured message body format for database storage. Preserves channel-specific # components (header, body, footer, buttons). # # @return [Sentdm::Models::ConversationMessagesList::Message::MessageBody, nil] optional :message_body, -> { Sentdm::ConversationMessagesList::Message::MessageBody }, nil?: true # @!attribute phone # # @return [String, nil] optional :phone, String # @!attribute phone_international # # @return [String, nil] optional :phone_international, String # @!attribute price # # @return [Float, nil] optional :price, Float, nil?: true # @!attribute region_code # # @return [String, nil] optional :region_code, String # @!attribute status # # @return [String, nil] optional :status, String # @!attribute template_category # # @return [String, nil] optional :template_category, String, nil?: true # @!attribute template_id # # @return [String, nil] optional :template_id, String, nil?: true # @!attribute template_name # # @return [String, nil] optional :template_name, String, nil?: true # @!method initialize(id: nil, active_contact_price: nil, channel: nil, contact_id: nil, created_at: nil, customer_id: nil, direction: nil, events: nil, message_body: nil, phone: nil, phone_international: nil, price: nil, region_code: nil, status: nil, template_category: nil, template_id: nil, template_name: nil) # Some parameter documentations has been truncated, see # {Sentdm::Models::ConversationMessagesList::Message} for more details. # # Message response for v3 API — same shape as v2 with snake_case JSON conventions # # @param id [String] # # @param active_contact_price [Float, nil] # # @param channel [String] # # @param contact_id [String] # # @param created_at [Time] # # @param customer_id [String] # # @param direction [String] # # @param events [Array<Sentdm::Models::ConversationMessagesList::Message::Event>, nil] # # @param message_body [Sentdm::Models::ConversationMessagesList::Message::MessageBody, nil] Structured message body format for database storage. # # @param phone [String] # # @param phone_international [String] # # @param price [Float, nil] # # @param region_code [String] # # @param status [String] # # @param template_category [String, nil] # # @param template_id [String, nil] # # @param template_name [String, nil] class Event < Sentdm::Internal::Type::BaseModel # @!attribute status # # @return [String] required :status, String # @!attribute timestamp # # @return [Time] required :timestamp, Time # @!attribute description # # @return [String, nil] optional :description, String, nil?: true # @!method initialize(status:, timestamp:, description: nil) # Represents a status change event in a message's lifecycle (v3) # # @param status [String] # @param timestamp [Time] # @param description [String, nil] end # @see Sentdm::Models::ConversationMessagesList::Message#message_body class MessageBody < Sentdm::Internal::Type::BaseModel # @!attribute buttons # # @return [Array<Sentdm::Models::ConversationMessagesList::Message::MessageBody::Button>, nil] optional :buttons, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::ConversationMessagesList::Message::MessageBody::Button] }, nil?: true # @!attribute content # # @return [String, nil] optional :content, String # @!attribute footer # # @return [String, nil] optional :footer, String, nil?: true # @!attribute header # # @return [String, nil] optional :header, String, nil?: true # @!method initialize(buttons: nil, content: nil, footer: nil, header: nil) # Structured message body format for database storage. Preserves channel-specific # components (header, body, footer, buttons). # # @param buttons [Array<Sentdm::Models::ConversationMessagesList::Message::MessageBody::Button>, nil] # @param content [String] # @param footer [String, nil] # @param header [String, nil] class Button < Sentdm::Internal::Type::BaseModel # @!attribute postback_data # # @return [String, nil] optional :postback_data, String, api_name: :postbackData, nil?: true # @!attribute text # # @return [String, nil] optional :text, String, nil?: true # @!attribute type # # @return [String, nil] optional :type, String # @!attribute value # # @return [String, nil] optional :value, String # @!method initialize(postback_data: nil, text: nil, type: nil, value: nil) # @param postback_data [String, nil] # @param text [String, nil] # @param type [String] # @param value [String] end end end |
Instance Attribute Details
#active_contact_price ⇒ Float?
34 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 34 optional :active_contact_price, Float, nil?: true |
#channel ⇒ String?
39 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 39 optional :channel, String |
#contact_id ⇒ String?
44 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 44 optional :contact_id, String |
#created_at ⇒ Time?
49 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 49 optional :created_at, Time |
#customer_id ⇒ String?
54 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 54 optional :customer_id, String |
#direction ⇒ String?
59 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 59 optional :direction, String |
#events ⇒ Array<Sentdm::Models::ConversationMessagesList::Message::Event>?
64 65 66 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 64 optional :events, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::ConversationMessagesList::Message::Event] }, nil?: true |
#id ⇒ String?
29 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 29 optional :id, String |
#message_body ⇒ Sentdm::Models::ConversationMessagesList::Message::MessageBody?
Structured message body format for database storage. Preserves channel-specific components (header, body, footer, buttons).
73 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 73 optional :message_body, -> { Sentdm::ConversationMessagesList::Message::MessageBody }, nil?: true |
#phone ⇒ String?
78 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 78 optional :phone, String |
#phone_international ⇒ String?
83 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 83 optional :phone_international, String |
#price ⇒ Float?
88 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 88 optional :price, Float, nil?: true |
#region_code ⇒ String?
93 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 93 optional :region_code, String |
#status ⇒ String?
98 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 98 optional :status, String |
#template_category ⇒ String?
103 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 103 optional :template_category, String, nil?: true |
#template_id ⇒ String?
108 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 108 optional :template_id, String, nil?: true |
#template_name ⇒ String?
113 |
# File 'lib/sentdm/models/conversation_messages_list.rb', line 113 optional :template_name, String, nil?: true |
Instance Method Details
#to_hash ⇒ {
126 |
# File 'sig/sentdm/models/conversation_messages_list.rbs', line 126
def to_hash: -> {
|