Module: Zavudev::Models::MessageType

Extended by:
Internal::Type::Enum
Defined in:
lib/zavudev/models/message_type.rb,
sig/zavudev/models/message_type.rbs

Overview

Type of message. Non-text types are supported by WhatsApp and Telegram (varies by type).

location_request asks the recipient to share their location and is WhatsApp-only. It takes no content object — the prompt goes in text (max 1024 characters) and the button label is fixed by WhatsApp. The recipient's answer arrives as an inbound location message whose content.replyToMessageId is the ID of the request.

request_contact_info asks the recipient to share their phone number and is WhatsApp-only. Like location_request it takes no content object — the prompt goes in text (max 1024 characters) and WhatsApp renders a fixed Share Contact Info button. The answer arrives as an inbound contact message. Use it to recover the phone number of a contact who adopted a WhatsApp username and is only known by their business-scoped user ID (BSUID); when they share it, Zavu automatically links the phone number to that contact.

Constant Summary collapse

TEXT =

Returns:

  • (:text)
:text
IMAGE =

Returns:

  • (:image)
:image
VIDEO =

Returns:

  • (:video)
:video
AUDIO =

Returns:

  • (:audio)
:audio
DOCUMENT =

Returns:

  • (:document)
:document
STICKER =

Returns:

  • (:sticker)
:sticker
LOCATION =

Returns:

  • (:location)
:location
CONTACT =

Returns:

  • (:contact)
:contact
BUTTONS =

Returns:

  • (:buttons)
:buttons
LIST =

Returns:

  • (:list)
:list
CTA_URL =

Returns:

  • (:cta_url)
:cta_url
REQUEST_CONTACT_INFO =

Returns:

  • (:request_contact_info)
:request_contact_info
LOCATION_REQUEST =

Returns:

  • (:location_request)
:location_request
REACTION =

Returns:

  • (:reaction)
:reaction
TEMPLATE =

Returns:

  • (:template)
:template

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Enum

==, ===, coerce, dump, hash, inspect, to_sorbet_type, values

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/zavudev/models/message_type.rb', line 40

Instance Method Details

#self?.values::Array[Zavudev::Models::message_type]

Returns:

  • (::Array[Zavudev::Models::message_type])


39
# File 'sig/zavudev/models/message_type.rbs', line 39

def self?.values: -> ::Array[Zavudev::Models::message_type]