Skip to content

Commit dacbfe6

Browse files
committed
First changes to allow full implementation of B2B_OFFER_CHANGE notification without too much code duplication
1 parent 5c5b6b8 commit dacbfe6

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

Source/FikaAmazonAPI/NotificationMessages/AnyOfferChangedNotification.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ public partial class AnyOfferChangedNotification
1919
/// Required. The event that caused the notification to be sent.
2020
/// </summary>
2121
[JsonProperty("OfferChangeTrigger")]
22-
public OfferChangeTriggerBase OfferChangeTrigger { get; set; }
22+
public OfferChangeTriggerB2C OfferChangeTrigger { get; set; }
2323

2424
/// <summary>
2525
/// Required. Information about the product that had the offer change. The information in this summary applies to all conditions of the product.
2626
/// </summary>
2727
[JsonProperty("Summary")]
28-
public SummaryBase Summary { get; set; }
28+
public SummaryB2C Summary { get; set; }
2929

3030
/// <summary>
3131
/// Required. The top 20 competitive offers for the item and condition that triggered the notification.

Source/FikaAmazonAPI/NotificationMessages/B2BAnyOfferChangedNotification.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ public partial class B2BAnyOfferChangedNotification
1515
/// Required. The event that caused the notification to be sent.
1616
/// </summary>
1717
[JsonProperty("OfferChangeTrigger")]
18-
public OfferChangeTriggerBase OfferChangeTrigger { get; set; }
18+
public OfferChangeTriggerB2B OfferChangeTrigger { get; set; }
1919

2020
/// <summary>
2121
/// Required. Information about the product that had the offer change. The information in this summary applies to all conditions of the product.
2222
/// </summary>
2323
[JsonProperty("Summary")]
24-
public SummaryBase Summary { get; set; }
24+
public SummaryB2B Summary { get; set; }
2525

2626
/// <summary>
2727
/// Required. The top 20 competitive B2B offers for the item and condition that triggered the notification.

Source/FikaAmazonAPI/NotificationMessages/SummaryB2B.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
namespace FikaAmazonAPI.NotificationMessages
55
{
6-
public class SummaryB2B
6+
public class SummaryB2B : SummaryBase
77
{
88
/// <summary>
99
/// Required. A list that contains the total number of offers that are eligible for the Buy Box for the given conditions and fulfillment channels.
1010
/// </summary>
1111
[JsonProperty("BuyBoxEligibleOffers")]
12-
public List<OfferCountElement> BuyBoxEligibleOffers { get; set; }
12+
public override List<OfferCountElement> BuyBoxEligibleOffers { get; set; }
1313
}
1414
}

Source/FikaAmazonAPI/NotificationMessages/SummaryB2C.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class SummaryB2C : SummaryBase
2727
/// Required. A list that contains the total number of offers that are eligible for the Buy Box for the given conditions and fulfillment channels.
2828
/// </summary>
2929
[JsonProperty("NumberOfBuyBoxEligibleOffers")]
30-
public List<OfferCountElement> NumberOfBuyBoxEligibleOffers { get; set; }
30+
public override List<OfferCountElement> BuyBoxEligibleOffers { get; set; }
3131

3232
/// <summary>
3333
/// Optional. This price is based on competitive prices from other retailers (excluding other Amazon sellers). Your offer may be ineligible for the Buy Box if your price + shipping is greater than this competitive price.

Source/FikaAmazonAPI/NotificationMessages/SummaryBase.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,10 @@ public abstract class SummaryBase
2525
/// </summary>
2626
[JsonProperty("BuyBoxPrices")]
2727
public List<BuyBoxPrice> BuyBoxPrices { get; set; }
28+
29+
/// <summary>
30+
/// Required. A list that contains the total number of offers that are eligible for the Buy Box for the given conditions and fulfillment channels.
31+
/// </summary>
32+
public abstract List<OfferCountElement> BuyBoxEligibleOffers { get; set; }
2833
}
2934
}

0 commit comments

Comments
 (0)