From be5b9b9fe3d7b245161dbf462f77ef34c3eb3f66 Mon Sep 17 00:00:00 2001 From: Rajneesh Katkam Date: Thu, 20 Jun 2024 19:28:35 +0530 Subject: [PATCH 1/6] Locale param for verify --- CHANGELOG.md | 5 +++++ src/Plivo/Resources/Verify/VerifySessionInterface.php | 2 ++ src/Plivo/Version.php | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4890e2e5..f7cf1e38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +# Change Log +## [4.65.0](https://github.com/plivo/plivo-dotnet/tree/v4.65.0) (2024-06-22) +**Feature - Adding support for Locale param in Create Session** +- Added new request param `locale` in create Session API + ## [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/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 From 5bb86e35d64df0538ef9e4b042ceac6a9e8df10c Mon Sep 17 00:00:00 2001 From: Rajneesh Katkam Date: Thu, 20 Jun 2024 20:22:20 +0530 Subject: [PATCH 2/6] Updated changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7cf1e38..6553e596 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Change Log # Change Log -## [4.65.0](https://github.com/plivo/plivo-dotnet/tree/v4.65.0) (2024-06-22) +## [4.65.0](https://github.com/plivo/plivo-php/tree/v4.65.0)(2024-06-22) **Feature - Adding support for Locale param in Create Session** - Added new request param `locale` in create Session API From 2d41711b839ab3d34fee0a6f2a0d75f52aa41437 Mon Sep 17 00:00:00 2001 From: Rajneesh Katkam Date: Tue, 9 Jul 2024 12:27:04 +0530 Subject: [PATCH 3/6] Added support for locale in get and list session --- CHANGELOG.md | 4 ++-- src/Plivo/Resources/Verify/VerifySession.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6553e596..a23096b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ # Change Log ## [4.65.0](https://github.com/plivo/plivo-php/tree/v4.65.0)(2024-06-22) -**Feature - Adding support for Locale param in Create Session** -- Added new request param `locale` in create Session API +**Feature - Adding support for Locale param in Create, Get and List Session** +- Added new request param `locale` in create, get and List Session API ## [4.64.0](https://github.com/plivo/plivo-php/tree/v4.64.0) (2024-05-17) **Feature - Adding support for 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'], From ba255ac4d5d790e82821b01d2af1003a9b33e8c8 Mon Sep 17 00:00:00 2001 From: Rajneesh Katkam Date: Tue, 9 Jul 2024 12:37:58 +0530 Subject: [PATCH 4/6] Updated changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a23096b4..84241f12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ # Change Log ## [4.65.0](https://github.com/plivo/plivo-php/tree/v4.65.0)(2024-06-22) **Feature - Adding support for Locale param in Create, Get and List Session** -- Added new request param `locale` in create, get and List Session API +- 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** From 2440c771f5018c86b75125132ac8550701674e00 Mon Sep 17 00:00:00 2001 From: Rajneesh Katkam Date: Thu, 11 Jul 2024 11:14:42 +0530 Subject: [PATCH 5/6] Date updated --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84241f12..2db8c0dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Change Log # Change Log -## [4.65.0](https://github.com/plivo/plivo-php/tree/v4.65.0)(2024-06-22) +## [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 From 4aa758e09b27a02c5e4bcf534f49126155ba91b3 Mon Sep 17 00:00:00 2001 From: Rajneesh Katkam Date: Thu, 11 Jul 2024 13:04:27 +0530 Subject: [PATCH 6/6] Updated testcases --- tests/Mocks/verifySessionGetResponse.json | 1 + tests/Mocks/verifySessionListResponse.json | 4 ++++ 2 files changed, 5 insertions(+) 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",