Last active
May 12, 2020 23:19
-
-
Save einarwh/3adcb5a2408572b0d7e381a5496722fb to your computer and use it in GitHub Desktop.
A third variation of the shopping cart DTO - everything at once!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ShoppingCart | |
{ | |
[JsonProperty("_state")] | |
public string State { get; set; } | |
[JsonProperty("unpaidItems", NullValueHandling = NullValueHandling.Ignore)] | |
public Item[] UnpaidItems { get; set; } | |
[JsonProperty("paidItems", NullValueHandling = NullValueHandling.Ignore)] | |
public Item[] PaidItems { get; set; } | |
[JsonProperty("payment", NullValueHandling = NullValueHandling.Ignore)] | |
public Money Payment { get; set; } | |
[JsonProperty("timestamp", NullValueHandling = NullValueHandling.Ignore)] | |
public string Timestamp { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment