integration

package
v0.0.0-...-421306c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2024 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WhatsAppTemplateCategoryTransactional WhatsAppTemplateCategory = "TRANSACTIONAL"
	WhatsAppTemplateCategoryMarketing     WhatsAppTemplateCategory = "MARKETING"
	WhatsAppTemplateTypeOTP               WhatsAppComponentType    = "OTP"

	WhatsAppComponentBody    WhatsAppComponentType = "BODY"
	WhatsAppComponentHeader  WhatsAppComponentType = "HEADER"
	WhatsAppComponentFooter  WhatsAppComponentType = "FOOTER"
	WhatsAppComponentButtons WhatsAppComponentType = "BUTTONS"

	WhatsAppButtonQuickReply  WhatsAppButtonType = "QUICK_REPLY"
	WhatsAppButtonPhoneNumber WhatsAppButtonType = "PHONE_NUMBER"
	WhatsAppButtonUrl         WhatsAppButtonType = "URL"

	WhatsAppTemplateStatusNew             WhatsAppTemplateStatus = "NEW"
	WhatsAppTemplateStatusPending         WhatsAppTemplateStatus = "PENDING"
	WhatsAppTemplateStatusApproved        WhatsAppTemplateStatus = "APPROVED"
	WhatsAppTemplateStatusRejected        WhatsAppTemplateStatus = "REJECTED"
	WhatsAppTemplateStatusPendingDeletion WhatsAppTemplateStatus = "PENDING_DELETION"
	WhatsAppTemplateStatusDeleted         WhatsAppTemplateStatus = "DELETED"

	WhatsAppHeaderFormatText     WhatsAppHeaderFormat = "TEXT"
	WhatsAppHeaderFormatImage    WhatsAppHeaderFormat = "IMAGE"
	WhatsAppHeaderFormatDocument WhatsAppHeaderFormat = "DOCUMENT"
	WhatsAppHeaderFormatVideo    WhatsAppHeaderFormat = "VIDEO"
)

Variables

This section is empty.

Functions

func DeleteWhatsAppTemplate

func DeleteWhatsAppTemplate(c messagebird.Client, request *DeleteWhatsAppTemplateRequest) error

Types

type CreateWhatsAppTemplateRequest

type CreateWhatsAppTemplateRequest struct {
	Name       string                       `json:"name"`
	Language   string                       `json:"language"`
	Components []*WhatsAppTemplateComponent `json:"components"`
	Category   WhatsAppTemplateCategory     `json:"category"`
	WabaId     string                       `json:"wabaId,omitempty"`
}

type CreateWhatsAppTemplateResponse

type CreateWhatsAppTemplateResponse struct {
	Name       string                       `json:"name"`
	Language   string                       `json:"language"`
	Category   WhatsAppTemplateCategory     `json:"category"`
	Components []*WhatsAppTemplateComponent `json:"components"`
	Status     WhatsAppTemplateStatus       `json:"status"`
	WabaId     string                       `json:"wabaId"`
	Namespace  string                       `json:"namespace"`
}

func CreateWhatsAppTemplate

func CreateWhatsAppTemplate(c messagebird.Client, request *CreateWhatsAppTemplateRequest) (*CreateWhatsAppTemplateResponse, error)

type DeleteWhatsAppTemplateRequest

type DeleteWhatsAppTemplateRequest struct {
	Name     string
	Language string
}

type ListWhatsAppTemplatesRequest

type ListWhatsAppTemplatesRequest struct {
	Limit     int    `url:"limit,omitempty"`
	Offset    int    `url:"offset,omitempty"`
	WabaId    string `url:"wabaId,omitempty"`
	ChannelId string `url:"channelId,omitempty"`
}

type ListWhatsAppTemplatesResponse

type ListWhatsAppTemplatesResponse struct {
	Offset     int                 `json:"offset"`
	Limit      int                 `json:"limit"`
	Count      int                 `json:"count"`
	TotalCount int                 `json:"totalCount"`
	Items      []*WhatsAppTemplate `json:"items"`
}

func ListWhatsAppTemplates

func ListWhatsAppTemplates(c messagebird.Client, request *ListWhatsAppTemplatesRequest) (*ListWhatsAppTemplatesResponse, error)

type WhatsAppButtonType

type WhatsAppButtonType string

type WhatsAppComponentType

type WhatsAppComponentType string

type WhatsAppHeaderFormat

type WhatsAppHeaderFormat string

type WhatsAppTemplate

type WhatsAppTemplate struct {
	Id             string                       `json:"id"`
	Name           string                       `json:"name"`
	Language       string                       `json:"language"`
	Category       WhatsAppTemplateCategory     `json:"category"`
	Components     []*WhatsAppTemplateComponent `json:"components"`
	Status         WhatsAppTemplateStatus       `json:"status"`
	RejectedReason string                       `json:"rejectedReason,omitempty"`
	WabaId         string                       `json:"wabaId"`
	Namespace      string                       `json:"namespace"`
	CreatedAt      time.Time                    `json:"createdAt"`
	UpdatedAt      time.Time                    `json:"updatedAt"`
}

type WhatsAppTemplateCategory

type WhatsAppTemplateCategory string

type WhatsAppTemplateComponent

type WhatsAppTemplateComponent struct {
	Type    WhatsAppComponentType              `json:"type"`
	Format  WhatsAppHeaderFormat               `json:"format,omitempty"`
	Text    string                             `json:"text,omitempty"`
	Buttons []*WhatsAppTemplateComponentButton `json:"buttons,omitempty"`
	Example *WhatsAppTemplateExample           `json:"example,omitempty"`
}

type WhatsAppTemplateComponentButton

type WhatsAppTemplateComponentButton struct {
	Type        string   `json:"type"`
	Text        string   `json:"text"`
	Url         string   `json:"url,omitempty"`
	PhoneNumber string   `json:"phone_number,omitempty"`
	Example     []string `json:"example,omitempty"`
}

type WhatsAppTemplateExample

type WhatsAppTemplateExample struct {
	HeaderText []string   `json:"header_text,omitempty"`
	BodyText   [][]string `json:"body_text,omitempty"`
	HeaderUrl  []string   `json:"header_url,omitempty"`
}

type WhatsAppTemplateStatus

type WhatsAppTemplateStatus string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL