File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Source/FikaAmazonAPI/ConstructFeed/Messages Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 1
- using System . Collections . Generic ;
1
+ using System ;
2
+ using System . Collections . Generic ;
2
3
using System . Xml . Serialization ;
3
4
4
5
namespace FikaAmazonAPI . ConstructFeed . Messages
@@ -9,7 +10,11 @@ public class CartonContentsRequest
9
10
[ XmlElement ( ElementName = "ShipmentId" ) ]
10
11
public string ShipmentId { get ; set ; }
11
12
[ XmlElement ( ElementName = "NumCartons" ) ]
12
- public int NumCartons { get { return Carton . Count ; } }
13
+ public int NumCartons
14
+ {
15
+ get { return Carton . Count ; }
16
+ set { /* required for xml serialization */ }
17
+ }
13
18
[ XmlElement ( ElementName = "Carton" ) ]
14
19
public List < Carton > Carton { get ; set ; } = new List < Carton > ( ) ;
15
20
}
@@ -32,5 +37,18 @@ public class CartonItem
32
37
public int QuantityShipped { get ; set ; }
33
38
[ XmlElement ( ElementName = "QuantityInCase" ) ]
34
39
public int QuantityInCase { get ; set ; }
40
+
41
+ [ XmlIgnore ]
42
+ public Nullable < DateTime > ExpirationDate { get ; set ; }
43
+
44
+ [ XmlElement ( ElementName = "ExpirationDate" ) ]
45
+ public string ExpirationDateFormatted
46
+ {
47
+ get { return this . ExpirationDate . Value . ToString ( "yyyy-MM-dd" ) ; }
48
+ set { this . ExpirationDate = DateTime . Parse ( value ) ; }
49
+ }
50
+
51
+ [ XmlIgnore ]
52
+ public bool ExpirationDateSpecified { get { return ExpirationDate != null ; } }
35
53
}
36
54
}
You can’t perform that action at this time.
0 commit comments