diff --git a/CHANGELOG.md b/CHANGELOG.md index 8531466..4221d02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [4.56.0](https://github.com/plivo/plivo-ruby/tree/v4.56.0) (2023-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 + ## [4.55.2](https://github.com/plivo/plivo-ruby/tree/v4.55.2) (2024-02-28) **Feature - Log Redaction Enhancement** - Added log attribute in GET and List MDR response diff --git a/README.md b/README.md index 4acb3d4..31a4278 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Plivo Ruby SDK makes it simpler to integrate communications into your Ruby a Add this line to your application's Gemfile: ```ruby -gem 'plivo', '>= 4.55.2' +gem 'plivo', '>= 4.56.0' ``` And then execute: diff --git a/lib/plivo/template.rb b/lib/plivo/template.rb index 4f62d35..c7dcdf9 100644 --- a/lib/plivo/template.rb +++ b/lib/plivo/template.rb @@ -41,12 +41,13 @@ def to_hash end class Parameter - attr_accessor :type, :text, :media, :currency, :date_time + attr_accessor :type, :text, :media, :payload, :currency, :date_time - def initialize(type: nil, text: nil, media: nil, currency: nil, date_time: nil) + def initialize(type: nil, text: nil, media: nil, payload: nil, currency: nil, date_time: nil) @type = type @text = text @media = media + @payload = payload @currency = currency @date_time = date_time end @@ -56,6 +57,7 @@ def to_hash type: @type, text: @text, media: @media, + payload: @payload, currency: @currency&.to_hash, date_time: @date_time&.to_hash }.reject { |_, v| v.nil? } diff --git a/lib/plivo/version.rb b/lib/plivo/version.rb index 134e6a7..2231af6 100644 --- a/lib/plivo/version.rb +++ b/lib/plivo/version.rb @@ -1,3 +1,3 @@ module Plivo - VERSION = "4.55.2".freeze + VERSION = "4.56.0".freeze end