Skip to content

Commit

Permalink
Re #53 and #52. Mark all CreatedAt/UpdatedAt as nullable to prevent d…
Browse files Browse the repository at this point in the history
…eser exceptions.
  • Loading branch information
bchavez committed Feb 28, 2019
1 parent cf9aa0e commit 6a02f03
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions HISTORY.md
@@ -1,3 +1,6 @@
## v5.0.8
* PR #53: Ensure all `.CreatedAt` and `.UpdatedAt` fields are nullable to prevent deserialization exception errors.

## v5.0.7
* Issue #52: `Coinbase.Models.Account.CreatedAt`/`.UpdatedAt` now nullable to avoid JSON deserialization error when JSON response contains null for these fields.

Expand Down
20 changes: 10 additions & 10 deletions Source/Coinbase/Models/Objects.cs
Expand Up @@ -140,10 +140,10 @@ public partial class Transaction : Entity
public string Description { get; set; }

[JsonProperty("created_at")]
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset? CreatedAt { get; set; }

[JsonProperty("updated_at")]
public DateTimeOffset UpdatedAt { get; set; }
public DateTimeOffset? UpdatedAt { get; set; }

[JsonProperty("network")]
public Network Network { get; set; }
Expand Down Expand Up @@ -249,10 +249,10 @@ public partial class PaymentMethod : Entity
public bool InstantSell { get; set; }

[JsonProperty("created_at")]
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset? CreatedAt { get; set; }

[JsonProperty("updated_at")]
public DateTimeOffset UpdatedAt { get; set; }
public DateTimeOffset? UpdatedAt { get; set; }

[JsonProperty("limits")]
public JToken Limits { get; set; }
Expand Down Expand Up @@ -319,10 +319,10 @@ public partial class Deposit : Entity
public Money Subtotal { get; set; }

[JsonProperty("created_at")]
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset? CreatedAt { get; set; }

[JsonProperty("updated_at")]
public DateTimeOffset UpdatedAt { get; set; }
public DateTimeOffset? UpdatedAt { get; set; }

[JsonProperty("committed")]
public bool Committed { get; set; }
Expand Down Expand Up @@ -354,10 +354,10 @@ public partial class Withdrawal : Entity
public Money Subtotal { get; set; }

[JsonProperty("created_at")]
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset? CreatedAt { get; set; }

[JsonProperty("updated_at")]
public DateTimeOffset UpdatedAt { get; set; }
public DateTimeOffset? UpdatedAt { get; set; }

[JsonProperty("committed")]
public bool Committed { get; set; }
Expand Down Expand Up @@ -663,10 +663,10 @@ public partial class Notification : Entity
public JObject DeliveryResponse { get; set; }

[JsonProperty("created_at")]
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset? CreatedAt { get; set; }

[JsonProperty("updated_at")]
public DateTimeOffset UpdatedAt { get; set; }
public DateTimeOffset? UpdatedAt { get; set; }

[JsonProperty("additional_data")]
public JObject AdditionalData { get; set; }
Expand Down

0 comments on commit 6a02f03

Please sign in to comment.