Class: Telnyx::Models::WhatsappMessageContent::Template::Component::Parameter

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

Defined Under Namespace

Modules: Type

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(text: nil, type: nil) ⇒ Object

Parameters:



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
# File 'lib/telnyx/models/whatsapp_message_content.rb', line 180

class Parameter < Telnyx::Internal::Type::BaseModel
  # @!attribute text
  #
  #   @return [String, nil]
  optional :text, String

  # @!attribute type
  #
  #   @return [Symbol, Telnyx::Models::WhatsappMessageContent::Template::Component::Parameter::Type, nil]
  optional :type, enum: -> { Telnyx::WhatsappMessageContent::Template::Component::Parameter::Type }

  # @!method initialize(text: nil, type: nil)
  #   @param text [String]
  #   @param type [Symbol, Telnyx::Models::WhatsappMessageContent::Template::Component::Parameter::Type]

  # @see Telnyx::Models::WhatsappMessageContent::Template::Component::Parameter#type
  module Type
    extend Telnyx::Internal::Type::Enum

    TEXT = :text
    IMAGE = :image
    VIDEO = :video
    DOCUMENT = :document
    CURRENCY = :currency
    DATE_TIME = :date_time

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#textString?

Returns:

  • (String, nil)


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

optional :text, String

#typeSymbol, ...



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

optional :type, enum: -> { Telnyx::WhatsappMessageContent::Template::Component::Parameter::Type }