[Fix] Entitlements starts_at is nullable (#3034)
* i wonder if it was just as simple as that * nope * nope x2 * nope x3
This commit is contained in:
@@ -27,7 +27,7 @@ internal class Entitlement
|
||||
public Optional<bool> IsConsumed { get; set; }
|
||||
|
||||
[JsonProperty("starts_at")]
|
||||
public Optional<DateTimeOffset> StartsAt { get; set; }
|
||||
public DateTimeOffset? StartsAt { get; set; }
|
||||
|
||||
[JsonProperty("ends_at")]
|
||||
public Optional<DateTimeOffset?> EndsAt { get; set; }
|
||||
|
||||
@@ -56,9 +56,7 @@ public class RestEntitlement : RestEntity<ulong>, IEntitlement
|
||||
ApplicationId = model.ApplicationId;
|
||||
Type = model.Type;
|
||||
IsConsumed = model.IsConsumed.GetValueOrDefault(false);
|
||||
StartsAt = model.StartsAt.IsSpecified
|
||||
? model.StartsAt.Value
|
||||
: null;
|
||||
StartsAt = model.StartsAt;
|
||||
EndsAt = model.EndsAt.IsSpecified
|
||||
? model.EndsAt.Value
|
||||
: null;
|
||||
|
||||
@@ -68,9 +68,7 @@ public class SocketEntitlement : SocketEntity<ulong>, IEntitlement
|
||||
ApplicationId = model.ApplicationId;
|
||||
Type = model.Type;
|
||||
IsConsumed = model.IsConsumed.GetValueOrDefault(false);
|
||||
StartsAt = model.StartsAt.IsSpecified
|
||||
? model.StartsAt.Value
|
||||
: null;
|
||||
StartsAt = model.StartsAt;
|
||||
EndsAt = model.EndsAt.IsSpecified
|
||||
? model.EndsAt.Value
|
||||
: null;
|
||||
|
||||
Reference in New Issue
Block a user