Skip to content

Commit 3867762

Browse files
committed
fix add message
1 parent 65dea2d commit 3867762

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

Source/FikaAmazonAPI/ConstructFeed/ConstructJSONFeedService.cs

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,54 @@ public void AddPriceMessage(IList<PriceMessage> messages)
3030
currency = itm.StandardPrice.currency,
3131
our_price = new List<PriceData>()
3232
{
33-
new PriceData(){ schedule = new List<SchedulePriceData>(){ new SchedulePriceData() { value_with_tax= itm.StandardPrice.Value } } }
33+
new PriceData()
34+
{
35+
schedule = new List<SchedulePriceData>()
36+
{
37+
new SchedulePriceData()
38+
{
39+
value_with_tax= itm.StandardPrice.Value
40+
}
41+
}
42+
}
3443
},
3544
};
3645

3746
if (itm.MinimumSellerAllowedPrice != null)
3847
{
39-
patcheValueData.minimum_seller_allowed_price = new List<PriceData>()
48+
patcheValueData.minimum_seller_allowed_price = new List<PriceData>
4049
{
41-
new PriceData(){ schedule = new List<SchedulePriceData>(){ new SchedulePriceData() { value_with_tax= itm.MinimumSellerAllowedPrice.Value } } }
50+
new PriceData
51+
{
52+
schedule = new List<SchedulePriceData>
53+
{
54+
new SchedulePriceData
55+
{
56+
value_with_tax = itm.MinimumSellerAllowedPrice.Value,
57+
start_at = itm.StandardPrice.start_at,
58+
end_at = itm.StandardPrice.end_at
59+
}
60+
}
61+
}
4262
};
4363
}
4464

4565
if (itm.MaximumSellerAllowedPrice != null)
4666
{
47-
patcheValueData.maximum_seller_allowed_price = new List<PriceData>()
67+
patcheValueData.maximum_seller_allowed_price = new List<PriceData>
4868
{
49-
new PriceData(){ schedule = new List<SchedulePriceData>(){ new SchedulePriceData() { value_with_tax= itm.MaximumSellerAllowedPrice.Value } } }
69+
new PriceData
70+
{
71+
schedule = new List<SchedulePriceData>
72+
{
73+
new SchedulePriceData
74+
{
75+
value_with_tax = itm.MaximumSellerAllowedPrice.Value,
76+
start_at = itm.StandardPrice.start_at,
77+
end_at = itm.StandardPrice.end_at
78+
}
79+
}
80+
}
5081
};
5182
}
5283

Source/FikaAmazonAPI/ConstructFeed/Messages/StandardPrice.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ public class StandardPrice
88
public decimal Value { get; set; }
99
[XmlAttribute]
1010
public string currency { get; set; }
11+
public string start_at { get; set; }
12+
public string end_at { get; set; }
1113
}
1214
}

0 commit comments

Comments
 (0)