Skip to content

Commit

Permalink
added waitTime for MPC XML (#199)
Browse files Browse the repository at this point in the history
* added waitTime for MPC XML

* added versioning

* added versioning
  • Loading branch information
Abinaya-Shunmugavel authored Feb 26, 2024
1 parent 32553a4 commit ad89fca
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion baseclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
5 changes: 5 additions & 0 deletions xml/plivoxml.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions xml/plivoxml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ func TestComplexXML(t *testing.T) {
}

func TestMPCXML(t *testing.T) {
assert.Equal(t, "<Response><MultiPartyCall role=\"agent\" maxDuration=\"14400\" maxParticipants=\"10\" recordMinMemberCount=\"1\" waitMusicMethod=\"GET\" agentHoldMusicMethod=\"GET\" customerHoldMusicMethod=\"GET\" record=\"false\" recordFileFormat=\"mp3\" recordingCallbackMethod=\"POST\" statusCallbackEvents=\"mpc-state-changes,participant-state-changes\" statusCallbackMethod=\"POST\" stayAlone=\"false\" coachMode=\"true\" mute=\"false\" hold=\"false\" startMpcOnEnter=\"true\" endMpcOnExit=\"false\" enterSound=\"beep:1\" enterSoundMethod=\"GET\" exitSound=\"beep:2\" exitSoundMethod=\"GET\" onExitActionMethod=\"POST\" relayDtmfInputs=\"false\" StartRecordingAudio=\"https://s3.amazonaws.com/plivocloud/music.mp3\" StartRecordingAudioMethod=\"GET\" StopRecordingAudio=\"https://s3.amazonaws.com/plivocloud/music.mp3\" StopRecordingAudioMethod=\"GET\">Nairobi</MultiPartyCall></Response>", ResponseElement{
assert.Equal(t, "<Response><MultiPartyCall role=\"agent\" maxDuration=\"14400\" maxParticipants=\"10\" recordMinMemberCount=\"1\" waitMusicMethod=\"GET\" waitTime=\"5\" agentHoldMusicMethod=\"GET\" customerHoldMusicMethod=\"GET\" record=\"false\" recordFileFormat=\"mp3\" recordingCallbackMethod=\"POST\" statusCallbackEvents=\"mpc-state-changes,participant-state-changes\" statusCallbackMethod=\"POST\" stayAlone=\"false\" coachMode=\"true\" mute=\"false\" hold=\"false\" startMpcOnEnter=\"true\" endMpcOnExit=\"false\" enterSound=\"beep:1\" enterSoundMethod=\"GET\" exitSound=\"beep:2\" exitSoundMethod=\"GET\" onExitActionMethod=\"POST\" relayDtmfInputs=\"false\" StartRecordingAudio=\"https://s3.amazonaws.com/plivocloud/music.mp3\" StartRecordingAudioMethod=\"GET\" StopRecordingAudio=\"https://s3.amazonaws.com/plivocloud/music.mp3\" StopRecordingAudioMethod=\"GET\">Nairobi</MultiPartyCall></Response>", 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())
}
Expand Down

0 comments on commit ad89fca

Please sign in to comment.