File tree 3 files changed +10
-0
lines changed
main/java/com/messagebird/objects/voicecalls
test/java/com/messagebird
3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ public class VoiceCallFlow implements Serializable {
23
23
@ JsonProperty ("default" )
24
24
private boolean defaultCall ;
25
25
26
+ @ JsonProperty ("maxDuration" )
27
+ private Integer maxDuration ;
28
+
26
29
private Date createdAt ;
27
30
private Date updatedAt ;
28
31
@@ -71,6 +74,10 @@ public void setDefaultCall(boolean defaultCall) {
71
74
this .defaultCall = defaultCall ;
72
75
}
73
76
77
+ public Integer getMaxDuration () { return maxDuration ; }
78
+
79
+ public void setMaxDuration (Integer maxDuration ) { this .maxDuration = maxDuration ; }
80
+
74
81
public Date getCreatedAt () {
75
82
return createdAt ;
76
83
}
@@ -103,6 +110,7 @@ public String toString() {
103
110
", record=" + record +
104
111
", steps=" + steps +
105
112
", default=" + defaultCall +
113
+ ", maxDuration=" + maxDuration +
106
114
", createdAt=" + createdAt +
107
115
", updatedAt=" + updatedAt +
108
116
'}' ;
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ static VoiceCall createVoiceCall(String destination) {
30
30
final VoiceCallFlow voiceCallFlow = new VoiceCallFlow ();
31
31
VoiceStep voiceStep = new VoiceStep ();
32
32
voiceStep .setAction ("say" );
33
+ voiceCallFlow .setMaxDuration (28800 );
33
34
34
35
final VoiceStepOption voiceStepOption = new VoiceStepOption ();
35
36
voiceStepOption .setPayload ("This is a journey into sound. Good bye!" );
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ public static void main(String[] args) {
46
46
voiceStep .setOptions (voiceStepOption );
47
47
48
48
voiceCallFlow .setSteps (Collections .singletonList (voiceStep ));
49
+ voiceCallFlow .setMaxDuration (28800 );
49
50
voiceCall .setCallFlow (voiceCallFlow );
50
51
//Sending request to client
51
52
final VoiceCallResponse response = messageBirdClient .sendVoiceCall (voiceCall );
You can’t perform that action at this time.
0 commit comments