From ad89fca7c9ccfafe85ed2f2ae54d9f66dda1e364 Mon Sep 17 00:00:00 2001 From: Abinaya-plivo <92303844+Abinaya-Shunmugavel@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:57:54 +0530 Subject: [PATCH] added waitTime for MPC XML (#199) * added waitTime for MPC XML * added versioning * added versioning --- CHANGELOG.md | 4 ++++ baseclient.go | 2 +- xml/plivoxml.go | 5 +++++ xml/plivoxml_test.go | 4 ++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eda853..632f840 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [7.45.4](https://github.com/plivo/plivo-go/tree/v7.45.4) (2024-02-26) +**Feature - Added new param 'waitTime' for MPC XML** +- Added new param 'waitTime' for MPC XML + ## [7.45.3](https://github.com/plivo/plivo-go/tree/v7.45.3) (2024-02-12) **Feature - Added few new PIN related params for Create Masking Session API of Number Masking.** - Added few new PIN related params for Create Masking Session API of Number Masking diff --git a/baseclient.go b/baseclient.go index b54b2f6..c5dffa1 100644 --- a/baseclient.go +++ b/baseclient.go @@ -13,7 +13,7 @@ import ( "github.com/google/go-querystring/query" ) -const sdkVersion = "7.45.3" +const sdkVersion = "7.45.4" const lookupBaseUrl = "lookup.plivo.com" diff --git a/xml/plivoxml.go b/xml/plivoxml.go index 37ca1f8..a9c2c43 100644 --- a/xml/plivoxml.go +++ b/xml/plivoxml.go @@ -1167,6 +1167,7 @@ type MultiPartyCallElement struct { RecordMinMemberCount *int64 `xml:"recordMinMemberCount,attr"` WaitMusicUrl *string `xml:"waitMusicUrl,attr"` WaitMusicMethod *string `xml:"waitMusicMethod,attr"` + WaitTime *int64 `xml:"waitTime,attr"` AgentHoldMusicUrl *string `xml:"agentHoldMusicUrl,attr"` AgentHoldMusicMethod *string `xml:"agentHoldMusicMethod,attr"` CustomerHoldMusicUrl *string `xml:"customerHoldMusicUrl,attr"` @@ -1222,6 +1223,10 @@ func (e MultiPartyCallElement) SetWaitMusicMethod(value string) MultiPartyCallEl e.WaitMusicMethod = &value return e } +func (e MultiPartyCallElement) SetWaitTime(value int64) MultiPartyCallElement { + e.WaitTime = &value + return e +} func (e MultiPartyCallElement) SetAgentHoldMusicUrl(value string) MultiPartyCallElement { e.AgentHoldMusicUrl = &value return e diff --git a/xml/plivoxml_test.go b/xml/plivoxml_test.go index b1597c8..965f2cd 100644 --- a/xml/plivoxml_test.go +++ b/xml/plivoxml_test.go @@ -61,9 +61,9 @@ func TestComplexXML(t *testing.T) { } func TestMPCXML(t *testing.T) { - assert.Equal(t, "Nairobi", ResponseElement{ + assert.Equal(t, "Nairobi", ResponseElement{ Contents: []interface{}{ - new(MultiPartyCallElement).SetAgentHoldMusicMethod("GET").SetCoachMode(true).SetCustomerHoldMusicMethod("GET").SetEndMpcOnExit(false).SetEnterSound("beep:1").SetEnterSoundMethod("GET").SetExitSound("beep:2").SetExitSoundMethod("GET").SetHold(false).SetMaxDuration(14400).SetMaxParticipants(10).SetRecordMinMemberCount(1).SetMute(false).SetOnExitActionMethod("POST").SetRecord(false).SetRecordFileFormat("mp3").SetRecordingCallbackMethod("POST").SetRelayDtmfInputs(false).SetRole("agent").SetStartMpcOnEnter(true).SetStatusCallbackEvents("mpc-state-changes,participant-state-changes").SetStatusCallbackMethod("POST").SetStayAlone(false).SetWaitMusicMethod("GET").SetContents("Nairobi").SetStartRecordingAudio("https://s3.amazonaws.com/plivocloud/music.mp3").SetStartRecordingAudioMethod("GET").SetStopRecordingAudio("https://s3.amazonaws.com/plivocloud/music.mp3").SetStopRecordingAudioMethod("GET"), + new(MultiPartyCallElement).SetAgentHoldMusicMethod("GET").SetCoachMode(true).SetCustomerHoldMusicMethod("GET").SetEndMpcOnExit(false).SetEnterSound("beep:1").SetEnterSoundMethod("GET").SetExitSound("beep:2").SetExitSoundMethod("GET").SetHold(false).SetMaxDuration(14400).SetMaxParticipants(10).SetRecordMinMemberCount(1).SetMute(false).SetOnExitActionMethod("POST").SetRecord(false).SetRecordFileFormat("mp3").SetRecordingCallbackMethod("POST").SetRelayDtmfInputs(false).SetRole("agent").SetStartMpcOnEnter(true).SetStatusCallbackEvents("mpc-state-changes,participant-state-changes").SetStatusCallbackMethod("POST").SetStayAlone(false).SetWaitMusicMethod("GET").SetWaitTime(5).SetContents("Nairobi").SetStartRecordingAudio("https://s3.amazonaws.com/plivocloud/music.mp3").SetStartRecordingAudioMethod("GET").SetStopRecordingAudio("https://s3.amazonaws.com/plivocloud/music.mp3").SetStopRecordingAudioMethod("GET"), }, }.String()) }