Skip to content

Commit 205a85a

Browse files
authored
Merge branch 'main' into fix-carton-content-request-feed
2 parents b4c7204 + 5cf03da commit 205a85a

File tree

7 files changed

+56
-52
lines changed

7 files changed

+56
-52
lines changed

Source/FikaAmazonAPI.SampleCode/FeedsSample.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,8 @@ public void CartonContentsRequestFeed()
318318
new CartonItem() {
319319
QuantityInCase=12,
320320
QuantityShipped=12,
321-
SKU="4051"
321+
SKU="4051",
322+
ExpirationDate=DateTime.Now,
322323
}
323324
}
324325
}

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/FulfillmentInbound/PrepInstruction.cs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,24 @@ public enum PrepInstruction
5858
/// Enum HangGarment for value: HangGarment
5959
/// </summary>
6060
[EnumMember(Value = "HangGarment")]
61-
HangGarment = 6
62-
}
61+
HangGarment = 6,
62+
63+
/// <summary>
64+
/// Enum Boxing for value: Boxing
65+
/// </summary>
66+
[EnumMember(Value = "Boxing")]
67+
Boxing = 7,
68+
69+
/// <summary>
70+
/// Enum SuffocationStickering for value: SuffocationStickering
71+
/// </summary>
72+
[EnumMember(Value = "SuffocationStickering")]
73+
SuffocationStickering = 8,
6374

75+
/// <summary>
76+
/// Enum SetCreation for value: SetCreation
77+
/// </summary>
78+
[EnumMember(Value = "SetCreation")]
79+
SetCreation = 9
80+
}
6481
}

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/FulfillmentInbound/UnitOfMeasurement.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ public enum UnitOfMeasurement
3030
[EnumMember(Value = "inches")]
3131
Inches = 1,
3232

33+
/// <summary>
34+
/// Enum Inches for value: inches
35+
/// </summary>
36+
[EnumMember(Value = "IN")]
37+
IN = 1,
38+
3339
/// <summary>
3440
/// Enum Centimeters for value: centimeters
3541
/// </summary>

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/DocumentFormat.cs

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,21 @@
44
using System.Collections.Generic;
55
using System.Runtime.Serialization;
66
using Newtonsoft.Json;
7+
using Newtonsoft.Json.Converters;
78

89
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ShippingV2 {
910

10-
/// <summary>
11-
/// The file format of the document.
12-
/// </summary>
13-
[DataContract]
14-
public class DocumentFormat {
15-
1611
/// <summary>
17-
/// Get the string presentation of the object
12+
/// The file format of the document.
1813
/// </summary>
19-
/// <returns>String presentation of the object</returns>
20-
public override string ToString() {
21-
var sb = new StringBuilder();
22-
sb.Append("class DocumentFormat {\n");
23-
sb.Append("}\n");
24-
return sb.ToString();
25-
}
14+
[JsonConverter(typeof(StringEnumConverter))]
15+
public enum DocumentFormat {
2616

27-
/// <summary>
28-
/// Get the JSON string presentation of the object
29-
/// </summary>
30-
/// <returns>JSON string presentation of the object</returns>
31-
public string ToJson() {
32-
return JsonConvert.SerializeObject(this, Formatting.Indented);
17+
[EnumMember(Value = "PDF")]
18+
PDF ,
19+
[EnumMember(Value = "PNG")]
20+
PNG ,
21+
[EnumMember(Value = "ZPL")]
22+
ZPL
3323
}
34-
35-
}
3624
}

Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ShippingV2/DocumentType.cs

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,23 @@
44
using System.Collections.Generic;
55
using System.Runtime.Serialization;
66
using Newtonsoft.Json;
7+
using Newtonsoft.Json.Converters;
78

89
namespace FikaAmazonAPI.AmazonSpApiSDK.Models.ShippingV2 {
910

10-
/// <summary>
11-
/// The type of shipping document.
12-
/// </summary>
13-
[DataContract]
14-
public class DocumentType {
15-
1611
/// <summary>
17-
/// Get the string presentation of the object
12+
/// The type of shipping document.
1813
/// </summary>
19-
/// <returns>String presentation of the object</returns>
20-
public override string ToString() {
21-
var sb = new StringBuilder();
22-
sb.Append("class DocumentType {\n");
23-
sb.Append("}\n");
24-
return sb.ToString();
14+
[JsonConverter(typeof(StringEnumConverter))]
15+
public enum DocumentType
16+
{
17+
[EnumMember(Value = "PACKSLIP")]
18+
PACKSLIP,
19+
[EnumMember(Value = "LABEL")]
20+
LABEL,
21+
[EnumMember(Value = "RECEIPT")]
22+
RECEIPT,
23+
[EnumMember(Value = "CUSTOM_FORM")]
24+
CUSTOM_FORM
2525
}
26-
27-
/// <summary>
28-
/// Get the JSON string presentation of the object
29-
/// </summary>
30-
/// <returns>JSON string presentation of the object</returns>
31-
public string ToJson() {
32-
return JsonConvert.SerializeObject(this, Formatting.Indented);
33-
}
34-
35-
}
3626
}

Source/FikaAmazonAPI/ConstructFeed/Messages/CartonContentsRequest.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ public class CartonContentsRequest
99
{
1010
[XmlElement(ElementName = "ShipmentId")]
1111
public string ShipmentId { get; set; }
12+
1213
[XmlElement(ElementName = "NumCartons")]
1314
public int NumCartons
1415
{
1516
get { return Carton.Count; }
16-
set { /* required for xml serialization */ }
17+
[Obsolete("Only used for xml serialization", error: true)]
18+
set { throw new NotSupportedException(); }
1719
}
1820
[XmlElement(ElementName = "Carton")]
1921
public List<Carton> Carton { get; set; } = new List<Carton>();

Source/FikaAmazonAPI/FikaAmazonAPI.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<Product>CSharp Amazon Sp API</Product>
88
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
99
<LangVersion>8.0</LangVersion>
10-
<Version>1.5.3</Version>
11-
<AssemblyVersion>1.5.3</AssemblyVersion>
12-
<FileVersion>1.5.3</FileVersion>
10+
<Version>1.5.5</Version>
11+
<AssemblyVersion>1.5.5</AssemblyVersion>
12+
<FileVersion>1.5.5</FileVersion>
1313
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
1414
<PackageProjectUrl>https://github.com/abuzuhri/Amazon-SP-API-CSharp</PackageProjectUrl>
1515
<PackageLicenseExpression>MIT</PackageLicenseExpression>

0 commit comments

Comments
 (0)