Skip to main content

type AddressType

type ApiCompatibleJsonConverterConfigs

ApiCompatibleJsonConverterConfigs represents the configuration for converting to JSON.

type AudioMessage

AudioMessage represents an audio message.

func NewAudioMessage

NewAudioMessage creates a new AudioMessage object.

func (*AudioMessage) ToJson

ToJson converts the AudioMessage object to JSON.

type AudioMessageApiPayload

AudioMessageApiPayload represents the payload for an audio message API request.

type AudioMessageConfigs

AudioMessageConfigs is an alias for AudioMessage.

type BaseMessage

BaseMessage is an interface for sending messages.

type BaseMessagePayload

BaseMessagePayload represents the base payload to send messages.

func NewBaseMessagePayload

NewBaseMessagePayload creates a new instance of BaseMessagePayload.

type CatalogMessage

ProductMessage represents a product message.

func NewCatalogMessage

func (*CatalogMessage) SetBody

func (*CatalogMessage) SetFooter

func (*CatalogMessage) SetHeader

func (*CatalogMessage) ToJson

ToJson converts the product message to JSON with the given configurations.

type CatalogMessageAction

type CatalogMessageActionParameter

type CatalogMessageApiPayload

ProductMessageApiPayload represents the API payload for a product message.

type CatalogMessageBody

type CatalogMessageFooter

type CatalogMessageHeader

type Contact

func NewContact

func (*Contact) AddEmail

func (*Contact) AddPhone

func (*Contact) AddUrl

func (*Contact) SetBirthday

! TODO: add regex check here in the params

func (*Contact) SetFirstName

func (*Contact) SetLastName

func (*Contact) SetMiddleName

func (*Contact) SetOrg

type ContactAddress

type ContactEmail

type ContactMessage

func NewContactMessage

func (*ContactMessage) AddContact

func (*ContactMessage) ToJson

type ContactMessageApiPayload

type ContactMessageConfigs

type ContactName

type ContactOrg

type ContactPhone

type ContactUrl

type Context

Context represents the context of the message.

type DocumentMessage

DocumentMessage represents a document message.

func NewDocumentMessage

NewDocumentMessage creates a new DocumentMessage instance.

func (*DocumentMessage) ToJson

ToJson converts the DocumentMessage instance to JSON.

type DocumentMessageApiPayload

DocumentMessageApiPayload represents the API payload for a document message.

type DocumentMessageConfigs

DocumentMessageConfigs represents the configurations for a document message.

type EmailType

type ImageMessage

ImageMessage represents a message with an image.

func NewImageMessage

NewImageMessage creates a new ImageMessage instance.

func (*ImageMessage) SetCaption

SetCaption sets the caption for the image message.

func (*ImageMessage) ToJson

ToJson converts the ImageMessage to JSON.

type ImageMessageApiPayload

ImageMessageApiPayload represents the API payload for an image message.

type ImageMessageConfigs

ImageMessageConfigs is an alias for ImageMessage.

type InteractiveMessageType

type ListMessageApiPayload

ListMessageApiPayload represents the API payload for the list message.

type ListMessageBody

ListMessageBody represents the body of the list message.

type ListMessageFooter

ListMessageFooter represents the footer of the list message.

type ListMessageHeader

type ListMessageParams

ListMessageParams represents the parameters for creating a list message.

type ListSection

ListSection represents a section in the list message.

func NewListSection

NewListSection creates a new list section with the given title.

func (*ListSection) AddRow

AddRow adds a new row to the list section.

func (*ListSection) SetTitle

SetTitle sets the title of the list section.

type LocationMessage

LocationMessage represents a location message with latitude, longitude, address, and name.

func NewLocationMessage

NewLocationMessage creates a new LocationMessage with the given latitude and longitude.

func (*LocationMessage) SetAddress

SetAddress sets the address of the location.

func (*LocationMessage) SetName

SetName sets the name of the location.

func (*LocationMessage) ToJson

ToJson converts the LocationMessage to JSON with the given configurations.

type LocationMessageApiPayload

LocationMessageApiPayload represents the API payload for a location message.

type LocationRequestMessage

func NewLocationRequestMessage

func (*LocationRequestMessage) SetBodyText

SetBodyText sets the body text of the list message.

func (*LocationRequestMessage) ToJson

ToJson converts the list message to JSON.

type LocationRequestMessageApiPayload

type LocationRequestMessageBody

type LocationRequestMessageParams

type MessageType

MessageType represents the type of message.
Constants for different message types.

type Order

Order represents an order in the system.

type PhoneType

type Product

func (*Product) SetRetailerId

type ProductItem

ProductItem represents a product item in an order.

type ProductListMessage

ProductListMessage represents a product list message.

func NewProductListMessage

NewProductListMessage creates a new product list message.

func (*ProductListMessage) AddSection

func (*ProductListMessage) SetBody

func (*ProductListMessage) SetCatalogId

func (*ProductListMessage) SetFooter

func (*ProductListMessage) SetHeader

func (*ProductListMessage) SetProductRetailerId

func (*ProductListMessage) ToJson

ToJson converts the product list message to JSON.

type ProductListMessageAction

func (*ProductListMessageAction) AddSection

type ProductListMessageApiPayload

ProductListMessageApiPayload represents the API payload for a product list message.

type ProductListMessageBody

type ProductListMessageFooter

type ProductListMessageHeader

! TODO: support more header types

type ProductListMessageHeaderType

type ProductListMessageParams

ProductListMessageParams represents the parameters for creating a product list message.

type ProductMessage

ProductMessage represents a product message.

func NewProductMessage

NewProductMessage creates a new product message with the given parameters.

func (*ProductMessage) SetBody

func (*ProductMessage) SetCatalogId

func (*ProductMessage) SetFooter

func (*ProductMessage) SetHeader

func (*ProductMessage) SetProductRetailerId

func (*ProductMessage) ToJson

ToJson converts the product message to JSON with the given configurations.

type ProductMessageApiPayload

ProductMessageApiPayload represents the API payload for a product message.

type ProductMessageBody

type ProductMessageFooter

type ProductMessageHeader

type ProductMessageParams

ProductMessageParams represents the parameters for creating a product message.

type ProductSection

func (*ProductSection) AddProduct

func (*ProductSection) SetTitle

type QuickReplyButtonMessage

QuickReplyButtonMessage represents a quick reply button message.

func NewQuickReplyButtonMessage

NewQuickReplyButtonMessage creates a new quick reply button message with the given body text.

func (*QuickReplyButtonMessage) AddButton

func (*QuickReplyButtonMessage) SetFooter

func (*QuickReplyButtonMessage) SetHeader

func (*QuickReplyButtonMessage) ToJson

ToJson converts the quick reply button message to JSON.

type QuickReplyButtonMessageAction

QuickReplyButtonMessageAction represents the action of a quick reply button message.

type QuickReplyButtonMessageApiPayload

QuickReplyButtonMessageApiPayload represents the API payload for a quick reply button message.

type QuickReplyButtonMessageBody

QuickReplyButtonMessageBody represents the body of a quick reply button message.

type QuickReplyButtonMessageFooter

QuickReplyButtonMessageFooter represents the footer of a quick reply button message.

type QuickReplyButtonMessageHeader

type ReactionMessage

ReactionMessage represents a reaction to a message.

func NewReactionMessage

NewReactionMessage creates a new ReactionMessage instance.

func (*ReactionMessage) ToJson

ToJson converts the ReactionMessage to JSON.

type ReactionMessageApiPayload

ReactionMessageApiPayload represents the API payload for a reaction message.

type ReactionMessageParams

ReactionMessageParams is an alias for ReactionMessage.

type StickerMessage

StickerMessage represents a sticker message.

func NewStickerMessage

NewStickerMessage creates a new sticker message based on the provided configurations.

func (*StickerMessage) ToJson

ToJson converts the sticker message to JSON based on the provided configurations.

type StickerMessageApiPayload

StickerMessageApiPayload represents the API payload for a sticker message.

type StickerMessageConfigs

StickerMessageConfigs represents the configurations for a sticker message.

type TemplateMessage

TemplateMessage represents a template message.

func NewTemplateMessage

NewTemplateMessage creates a new TemplateMessage instance.

func (*TemplateMessage) AddBody

AddBody adds (or overrides) a body component in the template message. Only one body component is allowed.

func (*TemplateMessage) AddButton

AddButton adds a button component to the template message. A maximum of 10 buttons is allowed.

func (*TemplateMessage) AddHeader

AddHeader adds (or overrides) a header component in the template message. Only one header is allowed.

func (*TemplateMessage) ToJson

ToJson converts the template message into a JSON payload compatible with the API.

type TemplateMessageApiPayload

TemplateMessageApiPayload represents the API payload for sending a template message.

type TemplateMessageBodyAndHeaderParameter

TemplateMessageBodyAndHeaderParameter represents parameters for body and header components.

func (TemplateMessageBodyAndHeaderParameter) GetParameterType

GetParameterType returns the parameter type as a string.

type TemplateMessageButtonComponentType

TemplateMessageButtonComponentType represents the subtype of a button component.

type TemplateMessageButtonParameter

TemplateMessageButtonParameter represents a parameter for a button component.

func (TemplateMessageButtonParameter) GetParameterType

GetParameterType returns the button parameter type as a string.

type TemplateMessageButtonParameterAction

type TemplateMessageButtonParameterType

TemplateMessageButtonParameterType represents the type for button parameters.

type TemplateMessageCaraouselCard

type TemplateMessageComponent

TemplateMessageComponent is an interface for all template message components.

type TemplateMessageComponentBodyType

TemplateMessageComponentBodyType represents a body component.

func (TemplateMessageComponentBodyType) GetComponentType

GetComponentType returns the component type.

type TemplateMessageComponentButtonType

TemplateMessageComponentButtonType represents a button component.

func (TemplateMessageComponentButtonType) GetComponentType

type TemplateMessageComponentCarouselType

type TemplateMessageComponentHeaderType

TemplateMessageComponentHeaderType represents a header component.

func (TemplateMessageComponentHeaderType) GetComponentType

GetComponentType returns the component type.

type TemplateMessageComponentLimitedTimeOfferType

func (TemplateMessageComponentLimitedTimeOfferType) GetComponentType

type TemplateMessageComponentType

TemplateMessageComponentType represents the type of a template message component.

type TemplateMessageConfigs

TemplateMessageConfigs represents basic configurations for a template message.

type TemplateMessageLanguage

TemplateMessageLanguage represents the language configuration.

type TemplateMessageLimitedTimeOfferParameter

type TemplateMessageMultiProductButtonActionParameterProductItem

type TemplateMessageMultiProductButtonActionParameterSection

type TemplateMessageParameter

TemplateMessageParameter is an interface for all parameter types.

type TemplateMessageParameterCurrency

TemplateMessageParameterCurrency represents a currency parameter.

type TemplateMessageParameterDateTime

TemplateMessageParameterDateTime represents a date-time parameter.

type TemplateMessageParameterLocation

TemplateMessageParameterLocation represents a location parameter.

type TemplateMessageParameterMedia

TemplateMessageParameterMedia represents a media parameter (for document, image, video).

type TemplateMessageParameterProduct

type TemplateMessageParameterType

TemplateMessageParameterType represents the type of a parameter.

type TextMessageApiPayload

TextMessageApiPayload represents the payload for the WhatsApp API.

type TextMessageApiPayloadText

TextMessageApiPayloadText represents the text payload for the WhatsApp API.

type TextMessageConfigs

TextMessageConfigs represents the configuration options for a text message.

type UrlType

type VideoMessage

VideoMessage represents a video message.

func NewVideoMessage

NewVideoMessage creates a new VideoMessage instance.

func (*VideoMessage) SetCaption

SetCaption sets the caption for the video message.

func (*VideoMessage) ToJson

ToJson converts the video message to JSON.

type VideoMessageApiPayload

VideoMessageApiPayload represents the API payload for a video message.

type VideoMessageConfigs

VideoMessageConfigs is an alias for VideoMessage.

type listMessage

listMessage represents an interactive list message.

func NewListMessage

NewListMessage creates a new list message with the given parameters.

func (*listMessage) AddSection

AddSection adds a new section to the list message.

func (*listMessage) SetBodyText

SetBodyText sets the body text of the list message.

func (*listMessage) SetFooterText

func (*listMessage) SetHeaderText

func (*listMessage) ToJson

ToJson converts the list message to JSON.

type listMessageAction

listMessageAction represents the action of the list message.

type listSectionRow

listSectionRow represents a row in the list section.

func NewListSectionRow

NewListSectionRow creates a new list section row with the given ID, title, and description.

func (*listSectionRow) SetDescription

SetDescription sets the description of the list section row.

func (*listSectionRow) SetId

SetId sets the ID of the list section row.

func (*listSectionRow) SetTitle

SetTitle sets the title of the list section row.

type locationMessageAction

type productMessageAction

type quickReplyButtonMessageButton

quickReplyButtonMessageButton represents a quick reply button.

func NewQuickReplyButton

NewQuickReplyButton creates a new quick reply button with the given ID and title.

type quickReplyButtonMessageButtonReply

quickReplyButtonMessageButtonReply represents the reply structure of a quick reply button.

type textMessage

textMessage represents a text message.

func NewTextMessage

NewTextMessage creates a new text message with the given configurations.

func (*textMessage) SetText

SetText sets the text content of the message.

func (*textMessage) ToJson

ToJson converts the text message struct to WhatsApp API compatible JSON.