Skip to content

Commit 34078af

Browse files
committed
DX-2639 Add Call Queueing Support
Remove `startTime` - breaking change
1 parent 52967e2 commit 34078af

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Bandwidth.Standard/Voice/Models/CreateCallResponse.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public CreateCallResponse()
6060
/// <param name="callUrl">callUrl.</param>
6161
/// <param name="answerUrl">answerUrl.</param>
6262
/// <param name="answerMethod">answerMethod.</param>
63-
/// <param name="startTime">startTime.</param>
63+
/// <param name="enqueuedTime">enqueuedTime.</param>
6464
/// <param name="callTimeout">callTimeout.</param>
6565
/// <param name="callbackTimeout">callbackTimeout.</param>
6666
/// <param name="answerFallbackUrl">answerFallbackUrl.</param>
@@ -82,7 +82,7 @@ public CreateCallResponse(
8282
string callUrl,
8383
string answerUrl,
8484
Models.AnswerMethodEnum answerMethod,
85-
DateTime? startTime = null,
85+
DateTime? enqueuedTime = null,
8686
double? callTimeout = null,
8787
double? callbackTimeout = null,
8888
string answerFallbackUrl = null,
@@ -101,7 +101,7 @@ public CreateCallResponse(
101101
this.ApplicationId = applicationId;
102102
this.To = to;
103103
this.From = from;
104-
this.StartTime = startTime;
104+
this.EnqueuedTime = enqueuedTime;
105105
this.CallUrl = callUrl;
106106
this.CallTimeout = callTimeout;
107107
this.CallbackTimeout = callbackTimeout;
@@ -186,11 +186,11 @@ public CreateCallResponse(
186186
public string From { get; set; }
187187

188188
/// <summary>
189-
/// Gets or sets StartTime.
189+
/// Gets or sets EnqueuedTime.
190190
/// </summary>
191191
[JsonConverter(typeof(IsoDateTimeConverter))]
192-
[JsonProperty("startTime", NullValueHandling = NullValueHandling.Ignore)]
193-
public DateTime? StartTime { get; set; }
192+
[JsonProperty("enqueuedTime", NullValueHandling = NullValueHandling.Ignore)]
193+
public DateTime? EnqueuedTime { get; set; }
194194

195195
/// <summary>
196196
/// Gets or sets CallUrl.
@@ -572,7 +572,7 @@ public override bool Equals(object obj)
572572
((this.ApplicationId == null && other.ApplicationId == null) || (this.ApplicationId?.Equals(other.ApplicationId) == true)) &&
573573
((this.To == null && other.To == null) || (this.To?.Equals(other.To) == true)) &&
574574
((this.From == null && other.From == null) || (this.From?.Equals(other.From) == true)) &&
575-
((this.StartTime == null && other.StartTime == null) || (this.StartTime?.Equals(other.StartTime) == true)) &&
575+
((this.EnqueuedTime == null && other.EnqueuedTime == null) || (this.EnqueuedTime?.Equals(other.EnqueuedTime) == true)) &&
576576
((this.CallUrl == null && other.CallUrl == null) || (this.CallUrl?.Equals(other.CallUrl) == true)) &&
577577
((this.CallTimeout == null && other.CallTimeout == null) || (this.CallTimeout?.Equals(other.CallTimeout) == true)) &&
578578
((this.CallbackTimeout == null && other.CallbackTimeout == null) || (this.CallbackTimeout?.Equals(other.CallbackTimeout) == true)) &&
@@ -620,9 +620,9 @@ public override int GetHashCode()
620620
hashCode += this.From.GetHashCode();
621621
}
622622

623-
if (this.StartTime != null)
623+
if (this.EnqueuedTime != null)
624624
{
625-
hashCode += this.StartTime.GetHashCode();
625+
hashCode += this.EnqueuedTime.GetHashCode();
626626
}
627627

628628
if (this.CallUrl != null)
@@ -711,7 +711,7 @@ protected void ToString(List<string> toStringOutput)
711711
toStringOutput.Add($"this.ApplicationId = {(this.ApplicationId == null ? "null" : this.ApplicationId == string.Empty ? "" : this.ApplicationId)}");
712712
toStringOutput.Add($"this.To = {(this.To == null ? "null" : this.To == string.Empty ? "" : this.To)}");
713713
toStringOutput.Add($"this.From = {(this.From == null ? "null" : this.From == string.Empty ? "" : this.From)}");
714-
toStringOutput.Add($"this.StartTime = {(this.StartTime == null ? "null" : this.StartTime.ToString())}");
714+
toStringOutput.Add($"this.EnqueuedTime = {(this.EnqueuedTime == null ? "null" : this.EnqueuedTime.ToString())}");
715715
toStringOutput.Add($"this.CallUrl = {(this.CallUrl == null ? "null" : this.CallUrl == string.Empty ? "" : this.CallUrl)}");
716716
toStringOutput.Add($"this.CallTimeout = {(this.CallTimeout == null ? "null" : this.CallTimeout.ToString())}");
717717
toStringOutput.Add($"this.CallbackTimeout = {(this.CallbackTimeout == null ? "null" : this.CallbackTimeout.ToString())}");

Bandwidth.StandardTests/Voice/CreateCallTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public async Task CreateCallReturnsCreated()
4343
Assert.Equal(applicationId, createCallResponse.Data.ApplicationId);
4444
Assert.Equal(to, createCallResponse.Data.To);
4545
Assert.Equal(from, createCallResponse.Data.From);
46+
Assert.IsType<DateTime>(createCallResponse.Data.EnqueuedTime);
4647
}
4748

4849
[Fact]

0 commit comments

Comments
 (0)