[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; }
|
public Optional<bool> IsConsumed { get; set; }
|
||||||
|
|
||||||
[JsonProperty("starts_at")]
|
[JsonProperty("starts_at")]
|
||||||
public Optional<DateTimeOffset> StartsAt { get; set; }
|
public DateTimeOffset? StartsAt { get; set; }
|
||||||
|
|
||||||
[JsonProperty("ends_at")]
|
[JsonProperty("ends_at")]
|
||||||
public Optional<DateTimeOffset?> EndsAt { get; set; }
|
public Optional<DateTimeOffset?> EndsAt { get; set; }
|
||||||
|
|||||||
@@ -56,9 +56,7 @@ public class RestEntitlement : RestEntity<ulong>, IEntitlement
|
|||||||
ApplicationId = model.ApplicationId;
|
ApplicationId = model.ApplicationId;
|
||||||
Type = model.Type;
|
Type = model.Type;
|
||||||
IsConsumed = model.IsConsumed.GetValueOrDefault(false);
|
IsConsumed = model.IsConsumed.GetValueOrDefault(false);
|
||||||
StartsAt = model.StartsAt.IsSpecified
|
StartsAt = model.StartsAt;
|
||||||
? model.StartsAt.Value
|
|
||||||
: null;
|
|
||||||
EndsAt = model.EndsAt.IsSpecified
|
EndsAt = model.EndsAt.IsSpecified
|
||||||
? model.EndsAt.Value
|
? model.EndsAt.Value
|
||||||
: null;
|
: null;
|
||||||
|
|||||||
@@ -68,9 +68,7 @@ public class SocketEntitlement : SocketEntity<ulong>, IEntitlement
|
|||||||
ApplicationId = model.ApplicationId;
|
ApplicationId = model.ApplicationId;
|
||||||
Type = model.Type;
|
Type = model.Type;
|
||||||
IsConsumed = model.IsConsumed.GetValueOrDefault(false);
|
IsConsumed = model.IsConsumed.GetValueOrDefault(false);
|
||||||
StartsAt = model.StartsAt.IsSpecified
|
StartsAt = model.StartsAt;
|
||||||
? model.StartsAt.Value
|
|
||||||
: null;
|
|
||||||
EndsAt = model.EndsAt.IsSpecified
|
EndsAt = model.EndsAt.IsSpecified
|
||||||
? model.EndsAt.Value
|
? model.EndsAt.Value
|
||||||
: null;
|
: null;
|
||||||
|
|||||||
Reference in New Issue
Block a user