Skip to content

Commit

Permalink
theopenconversationkit#1682 whatsAppCloudTextParameterTemplate - use …
Browse files Browse the repository at this point in the history
…ParameterType in parameter instead of charSequence + add deprecated method
  • Loading branch information
charles_moulhaud committed Aug 20, 2024
1 parent ae115a5 commit 419b3a3
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,15 @@ fun <T : Bus<T>> T.whatsAppCloudBodyTemplate(
parameters = parameters
)

@Deprecated("use whatsAppCloudTextParameterTemplate(typeParameter: ParameterType,textButton: CharSequence?) instead")
fun <T : Bus<T>> T.whatsAppCloudTextParameterTemplate(
typeParameter: CharSequence?,
textButton: CharSequence?
): TextParameter = TextParameter(
type = ParameterType.valueOf((typeParameter).toString()),
text = translate(textButton).toString(),
)

fun <T : Bus<T>> T.whatsAppCloudTextParameterTemplate(
typeParameter: ParameterType,
textButton: CharSequence?
Expand Down

0 comments on commit 419b3a3

Please sign in to comment.