From 419b3a3d6f6b56f00f9cb35076844c4c81b37074 Mon Sep 17 00:00:00 2001 From: charles_moulhaud Date: Tue, 20 Aug 2024 14:35:49 +0200 Subject: [PATCH] #1682 whatsAppCloudTextParameterTemplate - use ParameterType in parameter instead of charSequence + add deprecated method --- .../src/main/kotlin/WhatsAppCloudBuilder.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bot/connector-whatsapp-cloud/src/main/kotlin/WhatsAppCloudBuilder.kt b/bot/connector-whatsapp-cloud/src/main/kotlin/WhatsAppCloudBuilder.kt index 42d08be472..a6365c73bf 100644 --- a/bot/connector-whatsapp-cloud/src/main/kotlin/WhatsAppCloudBuilder.kt +++ b/bot/connector-whatsapp-cloud/src/main/kotlin/WhatsAppCloudBuilder.kt @@ -324,6 +324,15 @@ fun > T.whatsAppCloudBodyTemplate( parameters = parameters ) +@Deprecated("use whatsAppCloudTextParameterTemplate(typeParameter: ParameterType,textButton: CharSequence?) instead") +fun > T.whatsAppCloudTextParameterTemplate( + typeParameter: CharSequence?, + textButton: CharSequence? +): TextParameter = TextParameter( + type = ParameterType.valueOf((typeParameter).toString()), + text = translate(textButton).toString(), +) + fun > T.whatsAppCloudTextParameterTemplate( typeParameter: ParameterType, textButton: CharSequence?