Skip to content

Commit

Permalink
Merge pull request #343 from plivo/SMS-6930
Browse files Browse the repository at this point in the history
Locale param for verify
  • Loading branch information
rachana-plivo authored Jul 11, 2024
2 parents 9978623 + 4aa758e commit 1cc0af8
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Plivo/Resources/Verify/VerifySession.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'],
Expand Down
2 changes: 2 additions & 0 deletions src/Plivo/Resources/Verify/VerifySessionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ public function list( $optionalArgs = [])
* <br /> ChannelErrorCode - Error code received from the channel if any error occurred.
* <br /> 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.
* <br /> SessionStatus - The status of the session(in-progress/validated/expired).
* <br /> 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
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/Mocks/verifySessionGetResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions tests/Mocks/verifySessionListResponse.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"recipient": "918097480999",
"channel": "sms",
"status": "verified",
"locale":"en",
"count": 1,
"requestor_ip": "110.226.182.196",
"destination_country_iso2": "IN",
Expand Down Expand Up @@ -47,6 +48,7 @@
"recipient": "918097480999",
"channel": "sms",
"status": "verified",
"locale":"en",
"count": 2,
"requestor_ip": "110.226.182.196",
"destination_country_iso2": "IN",
Expand Down Expand Up @@ -91,6 +93,7 @@
"recipient": "918097480999",
"channel": "voice",
"status": "expired",
"locale":"en",
"count": 1,
"requestor_ip": "110.226.182.196",
"destination_country_iso2": "IN",
Expand Down Expand Up @@ -124,6 +127,7 @@
"recipient": "918097480999",
"channel": "sms",
"status": "expired",
"locale":"en",
"count": 2,
"requestor_ip": "110.226.182.196",
"destination_country_iso2": "IN",
Expand Down

0 comments on commit 1cc0af8

Please sign in to comment.