@@ -75,7 +75,7 @@ type WhatsAppBusinessTemplatesFetchResponseEdge struct {
7575
7676// TemplateMessageComponentCard represents a card component in a message template.
7777type TemplateMessageComponentCard struct {
78- // Add card-specific fields if needed.
78+ CardIndex int `json:"card_index,omitempty"`
7979 Components []WhatsAppBusinessHSMWhatsAppHSMComponent `json:"components,omitempty"`
8080}
8181
@@ -141,6 +141,7 @@ const (
141141 MessageTemplateComponentFormatText MessageTemplateComponentFormat = "TEXT"
142142 MessageTemplateComponentFormatImage MessageTemplateComponentFormat = "IMAGE"
143143 MessageTemplateComponentFormatDocument MessageTemplateComponentFormat = "DOCUMENT"
144+ MessageTemplateComponentFormatProduct MessageTemplateComponentFormat = "PRODUCT"
144145 MessageTemplateComponentFormatVideo MessageTemplateComponentFormat = "VIDEO"
145146 MessageTemplateComponentFormatLocation MessageTemplateComponentFormat = "LOCATION"
146147)
@@ -183,6 +184,7 @@ type WhatsappMessageTemplateButtonCreateRequestBodyAlias = WhatsappMessageTempla
183184// WhatsappMessageTemplateComponentCreateOrUpdateRequestBody represents the request body for creating/updating a component.
184185type WhatsappMessageTemplateComponentCreateOrUpdateRequestBody struct {
185186 Type MessageTemplateComponentType `json:"type,omitempty"`
187+ Cards []TemplateMessageComponentCard `json:"cards,omitempty"`
186188 Format MessageTemplateComponentFormat `json:"format,omitempty"`
187189 Text string `json:"text,omitempty"`
188190 Buttons []WhatsappMessageTemplateButtonCreateRequestBody `json:"buttons,omitempty"`
@@ -296,8 +298,8 @@ type TemplateMigrationResponse struct {
296298// MigrateFromOtherBusinessAccount migrates templates from another business account.
297299func (manager * TemplateManager ) MigrateFromOtherBusinessAccount (sourcePageNumber int , sourceWabaId int ) (* TemplateMigrationResponse , error ) {
298300 apiRequest := manager .requester .NewApiRequest (strings .Join ([]string {manager .businessAccountId , "migrate_message_templates" }, "/" ), http .MethodGet )
299- apiRequest .AddQueryParam ("page_number" , string (sourcePageNumber ))
300- apiRequest .AddQueryParam ("source_waba_id" , string (sourceWabaId ))
301+ apiRequest .AddQueryParam ("page_number" , strconv . Itoa (sourcePageNumber ))
302+ apiRequest .AddQueryParam ("source_waba_id" , strconv . Itoa (sourceWabaId ))
301303 response , err := apiRequest .Execute ()
302304 if err != nil {
303305 return nil , err
0 commit comments