From cdde3bf565b7e7bd428766858153cec1bcf80b2d Mon Sep 17 00:00:00 2001 From: Narayana Shanbhog Plivo Date: Thu, 10 Oct 2024 13:19:15 +0530 Subject: [PATCH] support dtmf param on verify request (#217) --- CHANGELOG.md | 5 +++++ baseclient.go | 2 +- fixtures/verifySessionListResponse.json | 5 +++-- verify.go | 2 ++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ef5f2b..113e7ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Change Log +## [7.53.0](https://github.com/plivo/plivo-go/tree/v7.53.0) (2024-10-10) +**Feature - Dtmf param in Create, Get and List Session** +- Support for the `dtmf` parameter in voice verify session request +- Added support for `dtmf` in GET and LIST verify session. + ## [7.52.0](https://github.com/plivo/plivo-go/tree/v7.52.0) (2024-09-30) **Feature - Adding new param support for Number Masking session with single party ** - Added `create_session_with_single_party`, `virtual_number_cooloff_period` and `force_pin_authentication` attributes in Masking Session diff --git a/baseclient.go b/baseclient.go index b513ae4..87b3ee3 100644 --- a/baseclient.go +++ b/baseclient.go @@ -13,7 +13,7 @@ import ( "github.com/google/go-querystring/query" ) -const sdkVersion = "7.52.0" +const sdkVersion = "7.53.0" const lookupBaseUrl = "lookup.plivo.com" diff --git a/fixtures/verifySessionListResponse.json b/fixtures/verifySessionListResponse.json index 62687e6..7a2da00 100644 --- a/fixtures/verifySessionListResponse.json +++ b/fixtures/verifySessionListResponse.json @@ -11,7 +11,7 @@ "session_uuid": "7b28af5c-3e25-45e2-be1e-9235e00dc87a", "app_uuid": "3cdec449-a367-435e-b4f9-40d777a7cfcc", "recipient": "918707046409", - "channel": "sms", + "channel": "voice", "status": "expired", "count": 1, "attempt_details": [ @@ -19,7 +19,8 @@ "channel": "sms", "attempt_uuid": "f26731c0-d076-42d3-b678-264b0a610b87", "status": "failed", - "time": "2023-07-20T08:02:18.981765Z" + "time": "2023-07-20T08:02:18.981765Z", + "dtmf": 9 } ], "charges": { diff --git a/verify.go b/verify.go index e75fbe4..221603f 100644 --- a/verify.go +++ b/verify.go @@ -47,6 +47,7 @@ type AttemptDetails struct { AppHash string `json:"app_hash,omitempty"` CodeLength int `json:"code_length,omitempty"` Time time.Time `json:"time,omitempty"` + Dtmf *int `json:"dtmf,omitempty"` } type Charges struct { @@ -73,6 +74,7 @@ type SessionCreateParams struct { BrandName string `json:"brand_name,omitempty"` AppHash string `json:"app_hash,omitempty"` CodeLength int `json:"code_length,omitempty"` + Dtmf *int `json:"dtmf,omitempty"` } type SessionCreateResponseBody struct {