From c7d3cda0d3a833721707985a2187402479383547 Mon Sep 17 00:00:00 2001 From: Nico Pizzo Date: Sat, 25 Oct 2025 16:34:32 -0400 Subject: [PATCH 1/3] Added FulfillmentInventorybyMarketplace notification payload --- ...lmentInventorybyMarketplaceNotification.cs | 41 +++++++++++++++++++ .../NotificationPayload.cs | 3 ++ 2 files changed, 44 insertions(+) create mode 100644 Source/FikaAmazonAPI/NotificationMessages/FulfillmentInventorybyMarketplaceNotification.cs diff --git a/Source/FikaAmazonAPI/NotificationMessages/FulfillmentInventorybyMarketplaceNotification.cs b/Source/FikaAmazonAPI/NotificationMessages/FulfillmentInventorybyMarketplaceNotification.cs new file mode 100644 index 00000000..bbf5ff11 --- /dev/null +++ b/Source/FikaAmazonAPI/NotificationMessages/FulfillmentInventorybyMarketplaceNotification.cs @@ -0,0 +1,41 @@ +using System.Collections.Generic; + +namespace FikaAmazonAPI.NotificationMessages +{ + public class FulfillmentInventorybyMarketplaceNotification : List + { + } + + public class FulfillmentInventorybyMarketplace + { + public string MarketplaceId { get; set; } + public string ItemName { get; set; } + public FulfillmentInventory FulfillmentInventory { get; set; } + public List Stores { get; set; } + } + + public class FulfillmentInventory + { + public InboundQuantityBreakdown InboundQuantityBreakdown { get; set; } + public int Fulfillable { get; set; } + public int Unfulfillable { get; set; } + public int Researching { get; set; } + public ReservedQuantityBreakdown ReservedQuantityBreakdown { get; set; } + public int FutureSupplyBuyable { get; set; } + public int PendingCustomerOrderInTransit { get; set; } + } + + public class InboundQuantityBreakdown + { + public int Working { get; set; } + public int Shipped { get; set; } + public int Receiving { get; set; } + } + + public class ReservedQuantityBreakdown + { + public int WarehouseProcessing { get; set; } + public int WarehouseTransfer { get; set; } + public int PendingCustomerOrder { get; set; } + } +} diff --git a/Source/FikaAmazonAPI/NotificationMessages/NotificationPayload.cs b/Source/FikaAmazonAPI/NotificationMessages/NotificationPayload.cs index a85056f6..32989ad7 100644 --- a/Source/FikaAmazonAPI/NotificationMessages/NotificationPayload.cs +++ b/Source/FikaAmazonAPI/NotificationMessages/NotificationPayload.cs @@ -50,6 +50,9 @@ public class NotificationPayload [JsonProperty("applicationOAuthClientSecretExpiry")] public ApplicationOAuthClientSecretExpiryNotification ApplicationOAuthClientSecretExpiry { get; set; } + [JsonProperty("FulfillmentInventoryByMarketplace")] + public FulfillmentInventorybyMarketplaceNotification FulfillmentInventoryByMarketplace { get; set; } + /// /// An explanation about the purpose of this instance. /// From 72eac4b59a592d785af24adf8443a7b3845fc3ed Mon Sep 17 00:00:00 2001 From: Nico Pizzo Date: Sat, 25 Oct 2025 22:50:30 -0400 Subject: [PATCH 2/3] Revert "Added FulfillmentInventorybyMarketplace notification payload" This reverts commit c7d3cda0d3a833721707985a2187402479383547. --- ...lmentInventorybyMarketplaceNotification.cs | 41 ------------------- .../NotificationPayload.cs | 3 -- 2 files changed, 44 deletions(-) delete mode 100644 Source/FikaAmazonAPI/NotificationMessages/FulfillmentInventorybyMarketplaceNotification.cs diff --git a/Source/FikaAmazonAPI/NotificationMessages/FulfillmentInventorybyMarketplaceNotification.cs b/Source/FikaAmazonAPI/NotificationMessages/FulfillmentInventorybyMarketplaceNotification.cs deleted file mode 100644 index bbf5ff11..00000000 --- a/Source/FikaAmazonAPI/NotificationMessages/FulfillmentInventorybyMarketplaceNotification.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Collections.Generic; - -namespace FikaAmazonAPI.NotificationMessages -{ - public class FulfillmentInventorybyMarketplaceNotification : List - { - } - - public class FulfillmentInventorybyMarketplace - { - public string MarketplaceId { get; set; } - public string ItemName { get; set; } - public FulfillmentInventory FulfillmentInventory { get; set; } - public List Stores { get; set; } - } - - public class FulfillmentInventory - { - public InboundQuantityBreakdown InboundQuantityBreakdown { get; set; } - public int Fulfillable { get; set; } - public int Unfulfillable { get; set; } - public int Researching { get; set; } - public ReservedQuantityBreakdown ReservedQuantityBreakdown { get; set; } - public int FutureSupplyBuyable { get; set; } - public int PendingCustomerOrderInTransit { get; set; } - } - - public class InboundQuantityBreakdown - { - public int Working { get; set; } - public int Shipped { get; set; } - public int Receiving { get; set; } - } - - public class ReservedQuantityBreakdown - { - public int WarehouseProcessing { get; set; } - public int WarehouseTransfer { get; set; } - public int PendingCustomerOrder { get; set; } - } -} diff --git a/Source/FikaAmazonAPI/NotificationMessages/NotificationPayload.cs b/Source/FikaAmazonAPI/NotificationMessages/NotificationPayload.cs index 32989ad7..a85056f6 100644 --- a/Source/FikaAmazonAPI/NotificationMessages/NotificationPayload.cs +++ b/Source/FikaAmazonAPI/NotificationMessages/NotificationPayload.cs @@ -50,9 +50,6 @@ public class NotificationPayload [JsonProperty("applicationOAuthClientSecretExpiry")] public ApplicationOAuthClientSecretExpiryNotification ApplicationOAuthClientSecretExpiry { get; set; } - [JsonProperty("FulfillmentInventoryByMarketplace")] - public FulfillmentInventorybyMarketplaceNotification FulfillmentInventoryByMarketplace { get; set; } - /// /// An explanation about the purpose of this instance. /// From cb8054a9564f9fc9125efc95f4898748a062afbe Mon Sep 17 00:00:00 2001 From: Nico Pizzo Date: Sat, 25 Oct 2025 22:51:19 -0400 Subject: [PATCH 3/3] Ignore null properties on event filter --- .../Models/Notifications/AggregationFilter.cs | 2 +- .../AmazonSpApiSDK/Models/Notifications/EventFilter.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/Notifications/AggregationFilter.cs b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/Notifications/AggregationFilter.cs index 1d05a794..68420607 100644 --- a/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/Notifications/AggregationFilter.cs +++ b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/Notifications/AggregationFilter.cs @@ -14,7 +14,7 @@ public class AggregationFilter /// Gets or Sets AggregationSettings /// [DataMember(Name = "aggregationSettings", EmitDefaultValue = false)] - [JsonProperty(PropertyName = "aggregationSettings")] + [JsonProperty(PropertyName = "aggregationSettings", NullValueHandling = NullValueHandling.Ignore)] public AggregationSettings AggregationSettings { get; set; } diff --git a/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/Notifications/EventFilter.cs b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/Notifications/EventFilter.cs index 8b083174..77f033ea 100644 --- a/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/Notifications/EventFilter.cs +++ b/Source/FikaAmazonAPI/AmazonSpApiSDK/Models/Notifications/EventFilter.cs @@ -15,7 +15,7 @@ public class EventFilter : AggregationFilter /// Gets or Sets MarketplaceIds /// [DataMember(Name = "marketplaceIds", EmitDefaultValue = false)] - [JsonProperty(PropertyName = "marketplaceIds")] + [JsonProperty(PropertyName = "marketplaceIds", NullValueHandling = NullValueHandling.Ignore)] public IList MarketplaceIds { get; set; } /// @@ -23,14 +23,14 @@ public class EventFilter : AggregationFilter /// /// An eventFilterType value that is supported by the specific notificationType. This is used by the subscription service to determine the type of event filter. Refer to the section of the [Notifications Use Case Guide](doc:notifications-api-v1-use-case-guide) that describes the specific notificationType to determine if an eventFilterType is supported. [DataMember(Name = "eventFilterType", EmitDefaultValue = false)] - [JsonProperty(PropertyName = "eventFilterType")] + [JsonProperty(PropertyName = "eventFilterType", NullValueHandling = NullValueHandling.Ignore)] public string EventFilterType { get; set; } /// /// Gets or Sets OrderChangeTypes /// [DataMember(Name = "orderChangeTypes", EmitDefaultValue = false)] - [JsonProperty(PropertyName = "orderChangeTypes")] + [JsonProperty(PropertyName = "orderChangeTypes", NullValueHandling = NullValueHandling.Ignore)] public IList OrderChangeTypes { get; set; }