Skip to content

Commit 38b3526

Browse files
authored
Merge pull request #134 from TechyChap/main
Fixed ListingItemPutRequest serilization
2 parents 9d43687 + 68f714d commit 38b3526

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Source/FikaAmazonAPI/Parameter/ListingsItems/ParameterPutListingItem.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
using FikaAmazonAPI.Search;
1+
using FikaAmazonAPI.Search;
22
using FikaAmazonAPI.Utils;
3+
using Newtonsoft.Json;
4+
using Newtonsoft.Json.Converters;
35
using System;
46
using System.Collections.Generic;
57
using System.IO;
@@ -29,11 +31,11 @@ public bool Check()
2931
{
3032
throw new InvalidDataException("ListingsItemPutRequest is a required property for ParameterPutListingItem and cannot be null");
3133
}
32-
if (string.IsNullOrWhiteSpace(this.listingsItemPutRequest.ProductType))
34+
if (string.IsNullOrWhiteSpace(this.listingsItemPutRequest.productType))
3335
{
3436
throw new InvalidDataException("ProductType is a required property for ListingsItemPutRequest and cannot be null");
3537
}
36-
if (this.listingsItemPutRequest.Attributes==null)
38+
if (this.listingsItemPutRequest.attributes==null)
3739
{
3840
throw new InvalidDataException("Attributes is a required property for ListingsItemPutRequest and cannot be null");
3941
}
@@ -53,13 +55,14 @@ public bool Check()
5355

5456
public class ListingsItemPutRequest
5557
{
56-
public string ProductType { get; set; }
58+
public string productType { get; set; }
5759

58-
public Requirements Requirements { get; set; }
60+
public Requirements requirements { get; set; }
5961

60-
public Object Attributes { get; set; }
62+
public Object attributes { get; set; }
6163
}
6264

65+
[JsonConverter(typeof(StringEnumConverter))]
6366
public enum Requirements
6467
{
6568
LISTING,

0 commit comments

Comments
 (0)