Skip to content

Commit a59c610

Browse files
committed
Add an example CallFlow
1 parent 96f6f40 commit a59c610

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

callflow_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,26 @@ import (
88
"time"
99
)
1010

11+
func ExampleCallFlow() {
12+
callflow := CallFlow{
13+
Title: "My CallFlow",
14+
Steps: []CallFlowStep{
15+
&CallFlowSayStep{
16+
Payload: "Hello",
17+
Voice: "male",
18+
Language: "en-US",
19+
},
20+
&CallFlowPauseStep{
21+
Length: time.Second * 4,
22+
},
23+
&CallFlowTransferStep{
24+
Destination: "31600000000",
25+
},
26+
},
27+
}
28+
_ = callflow
29+
}
30+
1131
func TestCallFlowJSONMarshal(t *testing.T) {
1232
refCreatedAt, _ := time.Parse(time.RFC3339, "2018-01-29T13:46:06Z")
1333
refUpdatedAt, _ := time.Parse(time.RFC3339, "2018-01-30T16:00:34Z")

0 commit comments

Comments
 (0)