Skip to content

Commit 5374b68

Browse files
authored
Merge pull request #217 from aivisol/voice-maxduration-support
Voice call flow optional maxDuration
2 parents d7f3b5a + 4e41c0c commit 5374b68

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

api/src/main/java/com/messagebird/objects/voicecalls/VoiceCallFlow.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public class VoiceCallFlow implements Serializable {
2323
@JsonProperty("default")
2424
private boolean defaultCall;
2525

26+
@JsonProperty("maxDuration")
27+
private Integer maxDuration;
28+
2629
private Date createdAt;
2730
private Date updatedAt;
2831

@@ -71,6 +74,10 @@ public void setDefaultCall(boolean defaultCall) {
7174
this.defaultCall = defaultCall;
7275
}
7376

77+
public Integer getMaxDuration() { return maxDuration; }
78+
79+
public void setMaxDuration(Integer maxDuration) { this.maxDuration = maxDuration; }
80+
7481
public Date getCreatedAt() {
7582
return createdAt;
7683
}
@@ -103,6 +110,7 @@ public String toString() {
103110
", record=" + record +
104111
", steps=" + steps +
105112
", default=" + defaultCall +
113+
", maxDuration=" + maxDuration +
106114
", createdAt=" + createdAt +
107115
", updatedAt=" + updatedAt +
108116
'}';

api/src/test/java/com/messagebird/TestUtil.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ static VoiceCall createVoiceCall(String destination) {
3030
final VoiceCallFlow voiceCallFlow = new VoiceCallFlow();
3131
VoiceStep voiceStep = new VoiceStep();
3232
voiceStep.setAction("say");
33+
voiceCallFlow.setMaxDuration(28800);
3334

3435
final VoiceStepOption voiceStepOption = new VoiceStepOption();
3536
voiceStepOption.setPayload("This is a journey into sound. Good bye!");

examples/src/main/java/ExampleSendVoiceCall.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static void main(String[] args) {
4646
voiceStep.setOptions(voiceStepOption);
4747

4848
voiceCallFlow.setSteps(Collections.singletonList(voiceStep));
49+
voiceCallFlow.setMaxDuration(28800);
4950
voiceCall.setCallFlow(voiceCallFlow);
5051
//Sending request to client
5152
final VoiceCallResponse response = messageBirdClient.sendVoiceCall(voiceCall);

0 commit comments

Comments
 (0)