Skip to content

Commit 4f950e0

Browse files
authored
Merge pull request #16 from FreeClimbAPI/VCSWP-14864
Updates for new getspeech webhook properties
2 parents 49577ed + 5d01691 commit 4f950e0

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
66

77
## [Unreleased]
88
None
9-
9+
<a name="4.1.2"</a>
10+
## [3.0.2] 2021-8-3
11+
### Added
12+
- 4 new properties for GetSpeechActionCallback
1013
<a name="4.1.1"></a>
1114
## [4.1.1] - 2021-05-11
1215
### Added

src/main/java/com/vailsys/freeclimb/webhooks/percl/GetSpeechActionCallback.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ public class GetSpeechActionCallback extends VoiceRequest {
1313
private SpeechReason reason;
1414
private String recognitionResult;
1515
private Integer confidence;
16+
private String completionReason;
17+
private String completionCause;
18+
private Integer mrcpCode;
19+
private String mrcpDiagnostic;
1620

1721
private GetSpeechActionCallback() {
1822
}
@@ -36,4 +40,20 @@ public String getRecognitionResult() {
3640
public Integer getConfidence() {
3741
return confidence;
3842
}
43+
44+
public String getCompletionReason() {
45+
return completionReason;
46+
}
47+
48+
public String getCompletionCause() {
49+
return completionCause;
50+
}
51+
52+
public Integer getMrcpCode() {
53+
return mrcpCode;
54+
}
55+
56+
public String getMrcpDiagnostic() {
57+
return mrcpDiagnostic;
58+
}
3959
}

src/test/java/com/vailsys/freeclimb/webhooks/percl/GetSpeechActionCallbackTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
public class GetSpeechActionCallbackTest {
1010
private GetSpeechActionCallback gsac;
11-
private static final String GSAC_JSON= " { \"requestId\":\"RA1766ca5ee92fc6c528b72aff5e8b48f4e056e8\", \"requestType\":\"getSpeech\", \"callId\":\"CAbde0362aef3d228b3a39baafa9e4f0204e724966\", \"accountId\":\"ACae05391ecca1352e9108d545482a1e6f384e7a49\", \"from\":\"+17083168669\", \"to\":\"+12248806211\",\"callStatus\":\"completed\", \"direction\":\"inbound\", \"conferenceId\":null, \"queueId\":null, \"callerInfo\":null, \"reason\":\"recognition\", \"recognitionResult\":\"yellow\", \"confidence\":55 }";
11+
private static final String GSAC_JSON= " { \"requestId\":\"RA1766ca5ee92fc6c528b72aff5e8b48f4e056e8\", \"requestType\":\"getSpeech\", \"callId\":\"CAbde0362aef3d228b3a39baafa9e4f0204e724966\", \"accountId\":\"ACae05391ecca1352e9108d545482a1e6f384e7a49\", \"from\":\"+17083168669\", \"to\":\"+12248806211\",\"callStatus\":\"completed\", \"direction\":\"inbound\", \"conferenceId\":null, \"queueId\":null, \"callerInfo\":null, \"reason\":\"recognition\", \"recognitionResult\":\"yellow\", \"confidence\":55, \"completionReason\":\"test\", \"completionCause\":\"test\", \"mrcpCode\":55, \"mrcpDiagnostic\":\"test\" }";
1212

1313
@Given("^A GetSpeechActionCallback object$")
1414
public void newGSAC() throws Throwable{
@@ -20,6 +20,10 @@ public void verifyContents() throws Throwable{
2020
assertThat(this.gsac.getReason(), is(SpeechReason.RECOGNITION));
2121
assertThat(this.gsac.getRecognitionResult(), is("yellow"));
2222
assertThat(this.gsac.getConfidence(), is(55));
23+
assertThat(this.gsac.getCompletionReason(), is("test"));
24+
assertThat(this.gsac.getCompletionCause(), is("test"));
25+
assertThat(this.gsac.getMrcpCode(), is(55));
26+
assertThat(this.gsac.getMrcpDiagnostic(), is("test"));
2327
}
2428

2529
}

0 commit comments

Comments
 (0)