File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
Bandwidth.StandardTests/Voice
Bandwidth.Standard/Voice/Models Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -434,7 +434,7 @@ public string Tag
434434 /// <summary>
435435 /// Gets or sets Priority.
436436 /// </summary>
437- [ JsonProperty ( "tag " ) ]
437+ [ JsonProperty ( "priority " ) ]
438438 public int ? Priority
439439 {
440440 get
Original file line number Diff line number Diff line change @@ -81,6 +81,35 @@ public async Task CreateCallWithMachineDetectionReturnsCreated()
8181 Assert . Equal ( DisconnectMethodEnum . POST , createCallResponse . Data . DisconnectMethod ) ;
8282 }
8383
84+ [ Fact ]
85+ public async Task CreateCallWithPriorityReturnsCreated ( )
86+ {
87+ var accountId = TestConstants . AccountId ;
88+ var to = TestConstants . To ;
89+ var from = TestConstants . From ;
90+ var applicationId = TestConstants . VoiceApplicationId ;
91+ var answerUrl = string . Concat ( TestConstants . BaseCallbackUrl , "/callbacks/answer" ) ;
92+ var priority = 4 ;
93+
94+ var request = new CreateCallRequest ( )
95+ {
96+ ApplicationId = applicationId ,
97+ To = to ,
98+ From = from ,
99+ AnswerUrl = answerUrl ,
100+ Priority = priority
101+ } ;
102+
103+ var createCallResponse = await _client . Voice . APIController . CreateCallAsync ( accountId , request ) ;
104+
105+ Assert . Equal ( 201 , createCallResponse . StatusCode ) ;
106+
107+ Assert . Equal ( applicationId , createCallResponse . Data . ApplicationId ) ;
108+ Assert . Equal ( to , createCallResponse . Data . To ) ;
109+ Assert . Equal ( from , createCallResponse . Data . From ) ;
110+ Assert . Equal ( priority , createCallResponse . Data . Priority ) ;
111+ }
112+
84113 [ Fact ]
85114 public async Task CreateCallInvalidToPhoneNumberThrows ( )
86115 {
You can’t perform that action at this time.
0 commit comments