Skip to content

Commit 6348fdc

Browse files
committed
fix message
1 parent 411393c commit 6348fdc

File tree

3 files changed

+39
-73
lines changed

3 files changed

+39
-73
lines changed

Source/FikaAmazonAPI.SampleCode/FeedsSample.cs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -76,31 +76,31 @@ public void SubmitFeedInventory()
7676
/// <summary>
7777
/// UnderTest
7878
/// </summary>
79-
//public void SubmitFeedMaxOrderQuantity()
80-
//{
81-
// ConstructFeedService createDocument = new ConstructFeedService("A3J37AJU4O9RHK", "1.02");
82-
83-
// var list = new List<ProductMessage>();
84-
// list.Add(new ProductMessage()
85-
// {
86-
// SKU = "8201031206122...",
87-
// StandardProductID = new ConstructFeed.Messages.StandardProductID()
88-
// {
89-
// Type = "ASIN",
90-
// Value= "B08CDYB2DC"
91-
// },
92-
// DescriptionData = new DescriptionData()
93-
// {
94-
// MaxOrderQuantity=2,
95-
// Title= "REBUNE RE-2061-1Hot Air Styler Hair Styler 1000 Watts 3 In 1"
96-
// }
97-
// });
98-
// createDocument.AddProductMessage(list,OperationType.Update);
99-
// var xml = createDocument.GetXML();
100-
101-
// var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_PRODUCT_DATA);
102-
103-
//}
79+
public void SubmitFeedAddProductMessage()
80+
{
81+
ConstructFeedService createDocument = new ConstructFeedService("A3J37AJU4O9RHK", "1.02");
82+
83+
var list = new List<ProductMessage>();
84+
list.Add(new ProductMessage()
85+
{
86+
SKU = "8201031206122...",
87+
StandardProductID = new ConstructFeed.Messages.StandardProductID()
88+
{
89+
Type = "ASIN",
90+
Value = "B08CDYB2DC"
91+
},
92+
//DescriptionData = new DescriptionData()
93+
//{
94+
// MaxOrderQuantity = 2,
95+
// Title = "REBUNE RE-2061-1Hot Air Styler Hair Styler 1000 Watts 3 In 1"
96+
//}
97+
});
98+
createDocument.AddProductMessage(list, OperationType.Update);
99+
var xml = createDocument.GetXML();
100+
101+
var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_PRODUCT_DATA);
102+
103+
}
104104
public async void SubmitFeedPRICING(double PRICE, string SKU)
105105
{
106106

Source/FikaAmazonAPI.SampleCode/Program.cs

Lines changed: 13 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
using FikaAmazonAPI.ConstructFeed;
1+
using FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInbound;
2+
using FikaAmazonAPI.ConstructFeed;
23
using FikaAmazonAPI.ConstructFeed.Messages;
34
using FikaAmazonAPI.Parameter.Finance;
45
using FikaAmazonAPI.Parameter.ListingItem;
56
using FikaAmazonAPI.Parameter.ListingsItems;
67
using FikaAmazonAPI.ReportGeneration;
78
using FikaAmazonAPI.Utils;
89
using Microsoft.Extensions.Configuration;
10+
using Newtonsoft.Json;
911
using static FikaAmazonAPI.AmazonSpApiSDK.Models.ListingsItems.ListingsItemPutRequest;
1012
using static FikaAmazonAPI.Utils.Constants;
1113

@@ -38,59 +40,23 @@ static async Task Main(string[] args)
3840
MarketPlace = MarketPlace.GetMarketPlaceByID(config.GetSection("FikaAmazonAPI:MarketPlaceID").Value),
3941
});
4042

43+
ReportManager reportManageree = new ReportManager(amazonConnection);
44+
var allll = reportManageree.GetInventoryAging();
4145

42-
ConstructFeedService createDocument2 = new ConstructFeedService("{SellerID}", "1.02");
43-
44-
var list22 = new List<CartonContentsRequest>();
45-
list22.Add(new CartonContentsRequest()
46-
{
47-
ShipmentId = "FBA123456",
48-
Carton = new List<Carton> {
49-
new Carton() {
50-
CartonId="1",
51-
Item=new List<CartonItem>(){
52-
new CartonItem() {
53-
QuantityInCase=1,
54-
QuantityShipped=1,
55-
SKU="7004"
56-
}
57-
}
58-
},
59-
new Carton() {
60-
CartonId="2",
61-
Item=new List<CartonItem>(){
62-
new CartonItem() {
63-
QuantityInCase=12,
64-
QuantityShipped=12,
65-
SKU="4051"
66-
}
67-
}
68-
}
69-
}
70-
});
71-
72-
createDocument2.AddCartonContentsRequest(list22);
46+
Console.WriteLine(JsonConvert.SerializeObject(new InboundShipmentPlanRequestItem() { Condition = AmazonSpApiSDK.Models.FulfillmentInbound.Condition.NewItem }));
47+
Console.WriteLine(JsonConvert.SerializeObject(new InboundShipmentPlanRequestItem() { Condition = AmazonSpApiSDK.Models.FulfillmentInbound.Condition.CollectibleLikeNew }));
48+
Console.WriteLine(JsonConvert.SerializeObject(new InboundShipmentPlanRequestItem() { Condition = AmazonSpApiSDK.Models.FulfillmentInbound.Condition.NewItem }));
49+
Console.WriteLine(JsonConvert.SerializeObject(new InboundShipmentPlanRequestItem() { Condition = AmazonSpApiSDK.Models.FulfillmentInbound.Condition.UsedGood }));
7350

74-
var xml222 = createDocument2.GetXML();
7551

76-
var data22 = await amazonConnection.CatalogItem.SearchCatalogItems202204Async(
77-
new Parameter.CatalogItems.ParameterSearchCatalogItems202204
78-
{
79-
keywords = new[] { "vitamin c" },
8052

81-
includedData = new[] { IncludedData.attributes,
82-
IncludedData.salesRanks,
83-
IncludedData.summaries,
84-
IncludedData.productTypes,
85-
IncludedData.relationships,
86-
IncludedData.dimensions,
87-
IncludedData.identifiers,
88-
IncludedData.images }
89-
});
53+
var offfers = amazonConnection.ProductPricing.GetItemOffers(new Parameter.ProductPricing.ParameterGetItemOffers
54+
{
55+
Asin = "B000GGFYZE"
56+
});
9057

9158

9259

93-
ReportManager reportManageree = new ReportManager(amazonConnection);
9460
var productsttt = reportManageree.GetProducts(); //GET_MERCHANT_LISTINGS_ALL_DATA
9561

9662
Thread.Sleep(1000 * 60 * 15);

Source/FikaAmazonAPI/ConstructFeed/Messages/ProductMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public partial class ProductMessage
55
public string SKU { get; set; }
66

77
public StandardProductID StandardProductID { get; set; }
8-
public DescriptionData DescriptionData { get; set; }
8+
//public DescriptionData DescriptionData { get; set; }
99

1010
public Condition Condition { get; set; }
1111
}

0 commit comments

Comments
 (0)