From da8edd9409631e5c5f81456ce5e14fd5216980c8 Mon Sep 17 00:00:00 2001 From: Saurabh Newatiya <107537111+saurabhnewatiya-plivo@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:00:42 +0530 Subject: [PATCH] Adding payload parameter in whatsapp templates (#201) --- CHANGELOG.md | 4 ++++ baseclient.go | 2 +- messages.go | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95c3434..87ba507 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [7.46.0](https://github.com/plivo/plivo-go/tree/v7.46.0) (2024-04-18) +**Feature - Support for dynamic button components when sending a templated WhatsApp message** +- Added new param `payload` in templates to support dynamic payload in templates + ## [7.45.6](https://github.com/plivo/plivo-go/tree/v7.45.6) (2024-04-04) **Feature - New params for GET and LIST Brand API** - Added new param 'declined_reasons' for GET and LIST Brand API diff --git a/baseclient.go b/baseclient.go index a8c21b1..3696460 100644 --- a/baseclient.go +++ b/baseclient.go @@ -13,7 +13,7 @@ import ( "github.com/google/go-querystring/query" ) -const sdkVersion = "7.45.6" +const sdkVersion = "7.46.0" const lookupBaseUrl = "lookup.plivo.com" diff --git a/messages.go b/messages.go index a38e506..71a4fe7 100644 --- a/messages.go +++ b/messages.go @@ -136,6 +136,7 @@ type Parameter struct { Type string `mapstructure:"type" json:"type" validate:"required"` Text string `mapstructure:"text" json:"text,omitempty"` Media string `mapstructure:"media" json:"media,omitempty"` + Payload string `mapstructure:"payload" json:"payload,omitempty"` Currency *Currency `mapstructure:"currency" json:"currency,omitempty"` DateTime *DateTime `mapstructure:"date_time" json:"date_time,omitempty"` }