From 3670310bc77610d742b0b608b0276b09525fc69a Mon Sep 17 00:00:00 2001 From: jsaxdev Date: Wed, 30 Oct 2024 13:54:01 +0200 Subject: [PATCH] Added fallback property for FulfillmentChannel property when json property name does not match --- .../ListingsItems/FulfillmentAvailability.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ListingsItems/FulfillmentAvailability.cs b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ListingsItems/FulfillmentAvailability.cs index 9e0e87a1..70e61166 100644 --- a/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ListingsItems/FulfillmentAvailability.cs +++ b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/ListingsItems/FulfillmentAvailability.cs @@ -55,6 +55,22 @@ protected FulfillmentAvailability() { } [DataMember(Name="fulfillment_channel_code", EmitDefaultValue=false)] public string FulfillmentChannelCode { get; set; } + /// + /// This property is used like fallback property when property 'FulfillmentChannelCode' is not deserialized by data member name + /// + private string apiFulfillmentChannelCode; + [DataMember(Name = "fulfillmentChannelCode", EmitDefaultValue = false, IsRequired = false)] + private string ApiFullfilmentChannelCode + { + get => apiFulfillmentChannelCode; + set + { + apiFulfillmentChannelCode = value; + if (string.IsNullOrEmpty(FulfillmentChannelCode)) + FulfillmentChannelCode = value; + } + } + /// /// The quantity of the item you are making available for sale. ///