diff --git a/CHANGELOG.md b/CHANGELOG.md index 4890e2e5..2db8c0dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +# Change Log +## [4.65.0](https://github.com/plivo/plivo-php/tree/v4.65.0)(2024-07-11) +**Feature - Adding support for Locale param in Create, Get and List Session** +- Added new request param `locale` in create Session API +- Added support for `locale` param in get and list Session response + ## [4.64.0](https://github.com/plivo/plivo-php/tree/v4.64.0) (2024-05-17) **Feature - Adding support for location whatsapp messages** - Added new param `location` to [send message API](https://www.plivo.com/docs/sms/api/message#send-a-message) to support location `whatsapp` messages diff --git a/src/Plivo/Resources/Verify/VerifySession.php b/src/Plivo/Resources/Verify/VerifySession.php index 15241f44..aea1b534 100644 --- a/src/Plivo/Resources/Verify/VerifySession.php +++ b/src/Plivo/Resources/Verify/VerifySession.php @@ -15,6 +15,7 @@ * @property string $alias * @property string $recipient * @property string $channel + * @property string $locale * @property string $status * @property int $count * @property ?string $requestor_ip @@ -44,6 +45,7 @@ public function __construct( 'alias' => $response['alias'], 'recipient' => $response['recipient'], 'channel' => $response['channel'], + 'locale' => $response['locale'], 'status' => $response['status'], 'count' => $response['count'], 'createdAt' => $response['created_at'], diff --git a/src/Plivo/Resources/Verify/VerifySessionInterface.php b/src/Plivo/Resources/Verify/VerifySessionInterface.php index 7b6daa5c..6020a413 100644 --- a/src/Plivo/Resources/Verify/VerifySessionInterface.php +++ b/src/Plivo/Resources/Verify/VerifySessionInterface.php @@ -143,6 +143,8 @@ public function list( $optionalArgs = []) *
ChannelErrorCode - Error code received from the channel if any error occurred. *
AttemptSequence - The attempt number for which the session status is received. For e.g. is two attempted are made within a session, 1st via SMS and 2nd via Voice, then callbacks received for SMS would have AttemptSequence value as 1 and for Voice it would be 2. *
SessionStatus - The status of the session(in-progress/validated/expired). + *
Locale - The template text to be selected while sending sms. + * * + [string] :method - The method used to call the url. Defaults to POST. * @return VerifySessionCreateResponse output * @throws PlivoValidationException,PlivoResponseException diff --git a/src/Plivo/Version.php b/src/Plivo/Version.php index b7ce2d28..805287e7 100644 --- a/src/Plivo/Version.php +++ b/src/Plivo/Version.php @@ -20,7 +20,7 @@ class Version /** * @const int PHP helper library minor version number */ - const MINOR = 64; + const MINOR = 65; /** * @const int PHP helper library patch number diff --git a/tests/Mocks/verifySessionGetResponse.json b/tests/Mocks/verifySessionGetResponse.json index 66f57fed..c6cdbd55 100644 --- a/tests/Mocks/verifySessionGetResponse.json +++ b/tests/Mocks/verifySessionGetResponse.json @@ -7,6 +7,7 @@ "channel": "sms", "status": "expired", "count": 0, + "locale":"en", "requestor_ip": "172.167.8.2", "destination_country_iso2": "IN", "destination_network": "AirTel", diff --git a/tests/Mocks/verifySessionListResponse.json b/tests/Mocks/verifySessionListResponse.json index f6468baa..bfb3aca5 100644 --- a/tests/Mocks/verifySessionListResponse.json +++ b/tests/Mocks/verifySessionListResponse.json @@ -14,6 +14,7 @@ "recipient": "918097480999", "channel": "sms", "status": "verified", + "locale":"en", "count": 1, "requestor_ip": "110.226.182.196", "destination_country_iso2": "IN", @@ -47,6 +48,7 @@ "recipient": "918097480999", "channel": "sms", "status": "verified", + "locale":"en", "count": 2, "requestor_ip": "110.226.182.196", "destination_country_iso2": "IN", @@ -91,6 +93,7 @@ "recipient": "918097480999", "channel": "voice", "status": "expired", + "locale":"en", "count": 1, "requestor_ip": "110.226.182.196", "destination_country_iso2": "IN", @@ -124,6 +127,7 @@ "recipient": "918097480999", "channel": "sms", "status": "expired", + "locale":"en", "count": 2, "requestor_ip": "110.226.182.196", "destination_country_iso2": "IN",