Skip to content

Commit 6a2786a

Browse files
committed
2 parents e2a5f72 + 15d91a2 commit 6a2786a

File tree

16 files changed

+363
-391
lines changed

16 files changed

+363
-391
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ var returnMFNOrder = reportManager.GetReturnMFNOrder(90); //GET_FLAT_FILE_RETURN
248248
var returnFBAOrder = reportManager.GetReturnFBAOrder(90); //GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA
249249
var reimbursementsOrder = reportManager.GetReimbursementsOrder(180); //GET_FBA_REIMBURSEMENTS_DATA
250250
var feedbacks = reportManager.GetFeedbackFromDays(180); //GET_SELLER_FEEDBACK_DATA
251+
var LedgerDetails = reportManager.GetLedgerDetailAsync(10); //GET_LEDGER_DETAIL_VIEW_DATA
251252
```
252253

253254

Source/FikaAmazonAPI.SampleCode/FeedsSample.cs

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,77 @@ public async void SubmitFeedPRICING(double PRICE, string SKU)
146146

147147
}
148148

149+
public async void SubmitFeedPricingWithSalePrice(string sku, decimal price, decimal salePrice, DateTime startDate, DateTime endDate)
150+
{
151+
var currencyCode = amazonConnection.GetCurrentMarketplace.CurrencyCode.ToString();
152+
153+
var createDocument = new ConstructFeedService("A3J37AJU4O9RHK", "1.02");
154+
155+
var list = new List<PriceMessage>();
156+
list.Add(new PriceMessage
157+
{
158+
SKU = sku,
159+
StandardPrice = new StandardPrice
160+
{
161+
currency = currencyCode,
162+
Value = price.ToString("0.00")
163+
},
164+
Sale = new Sale
165+
{
166+
SalePrice = new StandardPrice
167+
{
168+
currency = currencyCode,
169+
Value = salePrice.ToString("0.00")
170+
},
171+
StartDate = startDate.ToUniversalTime().ToString("yyyy-MM-dd'T'HH:mm:ss.fffK"),
172+
EndDate = endDate.ToUniversalTime().ToString("yyyy-MM-dd'T'HH:mm:ss.fffK")
173+
}
174+
});
175+
createDocument.AddPriceMessage(list);
176+
177+
var xml = createDocument.GetXML();
178+
179+
var feedId = await amazonConnection.Feed.SubmitFeedAsync(xml, FeedType.POST_PRODUCT_PRICING_DATA);
180+
181+
GetFeedDetails(feedId);
182+
}
183+
184+
185+
public void SubmitFeedSale(double PRICE, string SKU)
186+
{
187+
188+
ConstructFeedService createDocument = new ConstructFeedService("A3J37AJU4O9RHK", "1.02");
189+
190+
var list = new List<PriceMessage>();
191+
list.Add(new PriceMessage()
192+
{
193+
SKU = SKU,
194+
StandardPrice = new StandardPrice()
195+
{
196+
currency = amazonConnection.GetCurrentMarketplace.CurrencyCode.ToString(),
197+
Value = (PRICE).ToString("0.00")
198+
},
199+
Sale =new Sale()
200+
{
201+
StartDate=DateTime.UtcNow.AddDays(+1).ToString("yyyy-MM-dd'T'HH:mm:ss.fffK"),
202+
EndDate=DateTime.UtcNow.AddDays(+2).ToString("yyyy-MM-dd'T'HH:mm:ss.fffK"),
203+
SalePrice = new StandardPrice()
204+
{
205+
currency = amazonConnection.GetCurrentMarketplace.CurrencyCode.ToString(),
206+
Value = (PRICE-10).ToString("0.00")
207+
}
208+
}
209+
});
210+
createDocument.AddPriceMessage(list);
211+
212+
var xml = createDocument.GetXML();
213+
214+
var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_PRODUCT_PRICING_DATA);
215+
216+
GetFeedDetails(feedID);
217+
218+
}
219+
149220
public void FeebPostOrderFullfillment()
150221
{
151222
ConstructFeedService createDocument = new ConstructFeedService("{sellerId}", "1.02");
@@ -311,7 +382,7 @@ private void DisplayProcessingReportMessage(ProcessingReportMessage processingRe
311382
{
312383
foreach (var itm in processingReport.Result)
313384
{
314-
Console.WriteLine("ResultDescription=" + itm.AdditionalInfo?.SKU ?? string.Empty + " > " + itm.ResultDescription);
385+
Console.WriteLine("ResultDescription=" + (itm.AdditionalInfo?.SKU ?? string.Empty) + " > " + itm.ResultDescription);
315386
}
316387
}
317388
}

Source/FikaAmazonAPI.SampleCode/FulFillmentInboundSample.cs

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
using FikaAmazonAPI.Utils;
1+
using FikaAmazonAPI.AmazonSpApiSDK.Models.FbaSmallandLight;
2+
using FikaAmazonAPI.AmazonSpApiSDK.Models.MerchantFulfillment;
3+
using FikaAmazonAPI.AmazonSpApiSDK.Models.Sellers;
4+
using FikaAmazonAPI.AmazonSpApiSDK.Models.Shipping;
5+
using FikaAmazonAPI.Parameter.FulFillmentInbound;
6+
using FikaAmazonAPI.Utils;
27
using System;
38
using System.Collections.Generic;
49
using System.Linq;
510
using System.Text;
611
using System.Threading.Tasks;
12+
using static FikaAmazonAPI.Utils.Constants;
713

814
namespace FikaAmazonAPI.SampleCode
915
{
@@ -34,5 +40,49 @@ public void GetPrepInstructions()
3440
amazonConnection.FulFillmentInbound.GetPrepInstructions(parm);
3541
}
3642

43+
public void CreateShipmentPlan()
44+
{
45+
FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInbound.CreateInboundShipmentPlanRequest oCreateInboundShipmentPlanRequest = new FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInbound.CreateInboundShipmentPlanRequest();
46+
47+
oCreateInboundShipmentPlanRequest.ShipToCountryCode = "AE";
48+
oCreateInboundShipmentPlanRequest.LabelPrepPreference = FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInbound.LabelPrepPreference.SELLERLABEL;
49+
50+
51+
oCreateInboundShipmentPlanRequest.ShipFromAddress = new FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInbound.Address();
52+
oCreateInboundShipmentPlanRequest.ShipFromAddress.AddressLine1 = "Add";
53+
oCreateInboundShipmentPlanRequest.ShipFromAddress.AddressLine2 = "ADD2";
54+
oCreateInboundShipmentPlanRequest.ShipFromAddress.City = "City";
55+
oCreateInboundShipmentPlanRequest.ShipFromAddress.CountryCode = "AE";
56+
oCreateInboundShipmentPlanRequest.ShipFromAddress.PostalCode = "0000";
57+
oCreateInboundShipmentPlanRequest.ShipFromAddress.Name = "Name";
58+
59+
60+
61+
oCreateInboundShipmentPlanRequest.InboundShipmentPlanRequestItems = new FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInbound.InboundShipmentPlanRequestItemList();
62+
FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInbound.InboundShipmentPlanRequestItem oInboundShipmentPlanRequestItem = new FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInbound.InboundShipmentPlanRequestItem();
63+
oInboundShipmentPlanRequestItem.SellerSKU = "16118";
64+
oInboundShipmentPlanRequestItem.ASIN = "B08BXH6234";
65+
oInboundShipmentPlanRequestItem.Quantity = 1;
66+
oInboundShipmentPlanRequestItem.Condition = FikaAmazonAPI.AmazonSpApiSDK.Models.FulfillmentInbound.Condition.NewItem;
67+
68+
oCreateInboundShipmentPlanRequest.InboundShipmentPlanRequestItems.Add(oInboundShipmentPlanRequestItem);
69+
var oResult = amazonConnection.FulFillmentInbound.CreateInboundShipmentPlan(oCreateInboundShipmentPlanRequest);
70+
71+
}
72+
73+
public void GetFulFillmentInboundLabelsFromWebCreationSample(string shipmentId,int boxCount)
74+
{
75+
var labelParams = new ParameterGetLabels()
76+
{
77+
PageType = PageType.PackageLabel_Letter_6,
78+
shipmentId = shipmentId,
79+
LabelType = LabelType.SELLER_LABEL,
80+
PageSize = boxCount
81+
};
82+
83+
var labels = amazonConnection.FulFillmentInbound.GetLabels(labelParams);
84+
85+
}
86+
3787
}
3888
}

0 commit comments

Comments
 (0)