Skip to content

Commit 49577ed

Browse files
authored
Merge pull request #11 from FreeClimbAPI/VCSWP-12562
VCSWP-12562: Add callConnectUrl option to MakeCall Request
2 parents 2077284 + 9b5989e commit 49577ed

File tree

5 files changed

+40
-3
lines changed

5 files changed

+40
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
77
## [Unreleased]
88
None
99

10+
<a name="4.1.1"></a>
11+
## [4.1.1] - 2021-05-11
12+
### Added
13+
- Add `callConnectUrl` option to MakeCall Request
14+
1015
<a name="4.1.0"></a>
1116
## [4.1.0] - 2021-05-10
1217
### Changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ group = 'com.github.FreeClimbAPI'
99

1010
sourceCompatibility = 1.7 // java 7
1111
targetCompatibility = 1.7
12-
version = '4.1.0'
12+
version = '4.1.1'
1313

1414
repositories {
1515
mavenCentral()

src/main/java/com/vailsys/freeclimb/api/call/CallOptions.java

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,17 @@ public class CallOptions {
3030
* The callId of the call that created this call (if one exists).
3131
*/
3232
private String parentCallId;
33-
3433
/**
3534
* Parameter privacyMode will not log the text as required by PCI compliance.
3635
*/
3736
private Boolean privacyMode;
37+
/**
38+
* The URL that FreeClimb should use to handle this phone call.
39+
* If an applicationId or parentCallId have already been provided,
40+
* this callConnectUrl attribute will be used as a replacement of the
41+
* callConnectUrl originally assigned in the application or parent call.
42+
*/
43+
private String callConnectUrl;
3844

3945
/**
4046
* Create an empty {@code CallOptions} object. Set only values that are desired
@@ -46,6 +52,7 @@ public CallOptions() {
4652
timeout = null;
4753
parentCallId = null;
4854
privacyMode = null;
55+
callConnectUrl = null;
4956
}
5057

5158
/**
@@ -92,6 +99,15 @@ public void setParentCallId(String parentCallId) {
9299
public void setPrivacyMode(Boolean privacyMode) {
93100
this.privacyMode = privacyMode;
94101
}
102+
103+
/**
104+
* Sets the callConnectUrl field.
105+
*
106+
* @param callConnectUrl Value to set callConnectUrl.
107+
*/
108+
public void setCallConnectUrl(String callConnectUrl) {
109+
this.callConnectUrl = callConnectUrl;
110+
}
95111

96112
/**
97113
* Retrieve the sendDigits value.
@@ -140,4 +156,13 @@ public Boolean getPrivacyMode() {
140156
return this.privacyMode;
141157
}
142158

159+
/**
160+
* Retrieve the callConnectUrl value.
161+
*
162+
* @return The callConnectUrl value of the object.
163+
*/
164+
public String getCallConnectUrl() {
165+
return this.callConnectUrl;
166+
}
167+
143168
}

src/test/java/com/vailsys/freeclimb/api/call/CallOptionsTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public void checkFieldsAreNull() {
3636
assertThat(this.options.getIfMachine(), nullValue());
3737
assertThat(this.options.getTimeout(), nullValue());
3838
assertThat(this.options.getPrivacyMode(), nullValue());
39+
assertThat(this.options.getCallConnectUrl(), nullValue());
3940
}
4041

4142
@Then("^check that setSendDigits\\(\\) and getSendDigits\\(\\) are setting and retrieving the correct value.$")
@@ -71,4 +72,11 @@ public void checkSetGetPrivacyMode() {
7172
this.options.setPrivacyMode(true);
7273
assertThat(this.options.getPrivacyMode(), is(true));
7374
}
75+
76+
@Then("^check that setCallConnectUrl and getCallConnectUrl are setting and retrieving the correct value.$")
77+
public void checkSetGetCallConnectUrl() {
78+
String callConnectUrl = "http://www.example.com/callConnectUrl";
79+
this.options.setCallConnectUrl(callConnectUrl);
80+
assertThat(this.options.getCallConnectUrl(), is(callConnectUrl));
81+
}
7482
}

src/test/java/com/vailsys/freeclimb/api/call/CreateCallRequestTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ public class CreateCallRequestTest {
1414

1515
String applicationId = null;
1616

17-
1817
CallOptions options = null;
1918
String sendDigits = null;
2019
IfMachine ifMachine = null;

0 commit comments

Comments
 (0)