Class: Telnyx::Models::WhatsappMessageContent::Text

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

Overview

See Also:

  • Telnyx::Models::WhatsappMessageContent#text

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

#initializeText

Returns a new instance of Text.

Parameters:

  • body: (String)
  • preview_url: (Boolean)


295
# File 'sig/telnyx/models/whatsapp_message_content.rbs', line 295

def initialize: (body: String, ?preview_url: bool) -> void

Instance Attribute Details

#bodyString

The text message body.

Parameters:

  • value (String)

Returns:

  • (String)


263
# File 'lib/telnyx/models/whatsapp_message_content.rb', line 263

required :body, String

#preview_urlBoolean?

Whether to show a URL preview in the message.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


269
# File 'lib/telnyx/models/whatsapp_message_content.rb', line 269

optional :preview_url, Telnyx::Internal::Type::Boolean

Instance Method Details

#to_hash{ body: String, preview_url: bool }

Returns:

  • ({ body: String, preview_url: bool })


297
# File 'sig/telnyx/models/whatsapp_message_content.rbs', line 297

def to_hash: -> { body: String, preview_url: bool }