fix: default nullable properties to actually datetimeoffset min value when new'd up
This commit is contained in:
@@ -27,13 +27,13 @@ public class MessageBatchResponse
|
||||
/// Gets the counts of requests in the batch.
|
||||
/// </summary>
|
||||
[JsonPropertyName("request_counts")]
|
||||
public MessageBatchRequestCounts RequestCounts { get; init; } = new MessageBatchRequestCounts();
|
||||
public MessageBatchRequestCounts RequestCounts { get; init; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the date and time when the batch ended.
|
||||
/// </summary>
|
||||
[JsonPropertyName("ended_at")]
|
||||
public DateTimeOffset? EndedAt { get; init; }
|
||||
public DateTimeOffset? EndedAt { get; init; } = DateTimeOffset.MinValue;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the date and time when the batch was created.
|
||||
@@ -51,13 +51,13 @@ public class MessageBatchResponse
|
||||
/// Gets the date and time when the batch was archived.
|
||||
/// </summary>
|
||||
[JsonPropertyName("archived_at")]
|
||||
public DateTimeOffset? ArchivedAt { get; init; }
|
||||
public DateTimeOffset? ArchivedAt { get; init; } = DateTimeOffset.MinValue;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the date and time when the batch cancellation was initiated.
|
||||
/// </summary>
|
||||
[JsonPropertyName("cancel_initiated_at")]
|
||||
public DateTimeOffset? CancelInitiatedAt { get; init; }
|
||||
public DateTimeOffset? CancelInitiatedAt { get; init; } = DateTimeOffset.MinValue;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the URL to the results of the batch.
|
||||
|
||||
@@ -50,7 +50,7 @@ public class MessageBatchResponseTests : SerializationTest
|
||||
Id = "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",
|
||||
Type = "message_batch",
|
||||
ProcessingStatus = "in_progress",
|
||||
RequestCounts = new MessageBatchRequestCounts
|
||||
RequestCounts = new()
|
||||
{
|
||||
Processing = 100,
|
||||
Succeeded = 50,
|
||||
@@ -94,7 +94,7 @@ public class MessageBatchResponseTests : SerializationTest
|
||||
Id = "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",
|
||||
Type = "message_batch",
|
||||
ProcessingStatus = "in_progress",
|
||||
RequestCounts = new MessageBatchRequestCounts
|
||||
RequestCounts = new()
|
||||
{
|
||||
Processing = 100,
|
||||
Succeeded = 50,
|
||||
|
||||
Reference in New Issue
Block a user