Class: Telnyx::Models::MessageSendWhatsappResponse::Data::Body::Interactive::Action::Button

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

Defined Under Namespace

Modules: Type Classes: Reply

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(id: nil, title: nil) ⇒ Object

Parameters:

  • id (String) (defaults to: nil)

    unique identifier for each button, 256 character maximum

  • title (String) (defaults to: nil)

    button label, 20 character maximum



448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'lib/telnyx/models/message_send_whatsapp_response.rb', line 448

class Button < Telnyx::Internal::Type::BaseModel
  # @!attribute reply
  #
  #   @return [Telnyx::Models::MessageSendWhatsappResponse::Data::Body::Interactive::Action::Button::Reply, nil]
  optional :reply,
           -> { Telnyx::Models::MessageSendWhatsappResponse::Data::Body::Interactive::Action::Button::Reply }

  # @!attribute type
  #
  #   @return [Symbol, Telnyx::Models::MessageSendWhatsappResponse::Data::Body::Interactive::Action::Button::Type, nil]
  optional :type,
           enum: -> { Telnyx::Models::MessageSendWhatsappResponse::Data::Body::Interactive::Action::Button::Type }

  # @!method initialize(reply: nil, type: nil)
  #   @param reply [Telnyx::Models::MessageSendWhatsappResponse::Data::Body::Interactive::Action::Button::Reply]
  #   @param type [Symbol, Telnyx::Models::MessageSendWhatsappResponse::Data::Body::Interactive::Action::Button::Type]

  # @see Telnyx::Models::MessageSendWhatsappResponse::Data::Body::Interactive::Action::Button#reply
  class Reply < Telnyx::Internal::Type::BaseModel
    # @!attribute id
    #   unique identifier for each button, 256 character maximum
    #
    #   @return [String, nil]
    optional :id, String

    # @!attribute title
    #   button label, 20 character maximum
    #
    #   @return [String, nil]
    optional :title, String

    # @!method initialize(id: nil, title: nil)
    #   @param id [String] unique identifier for each button, 256 character maximum
    #
    #   @param title [String] button label, 20 character maximum
  end

  # @see Telnyx::Models::MessageSendWhatsappResponse::Data::Body::Interactive::Action::Button#type
  module Type
    extend Telnyx::Internal::Type::Enum

    REPLY = :reply

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

Instance Attribute Details

#typeSymbol, ...



458
459
# File 'lib/telnyx/models/message_send_whatsapp_response.rb', line 458

optional :type,
enum: -> { Telnyx::Models::MessageSendWhatsappResponse::Data::Body::Interactive::Action::Button::Type }