Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from abuzuhri:main #197

Merged
merged 5 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 8 additions & 55 deletions Source/FikaAmazonAPI.SampleCode/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using FikaAmazonAPI.ReportGeneration;
using FikaAmazonAPI.Utils;
using Microsoft.Extensions.Configuration;
using static FikaAmazonAPI.Utils.Constants;
using Microsoft.Extensions.Configuration;

namespace FikaAmazonAPI.SampleCode
{
Expand Down Expand Up @@ -30,58 +27,14 @@ static async Task Main(string[] args)
});


ReportManager reportManager = new ReportManager(amazonConnection);
//var datadddd = reportManager.GetFbaEstimateFeeData(DateTime.UtcNow.AddDays(-30), DateTime.UtcNow);
var dataddd222d = reportManager.GetReferralFeeReportData(DateTime.UtcNow.AddDays(-30), DateTime.UtcNow);
ReportManagerSample reportManagerSample = new ReportManagerSample(amazonConnection);
reportManagerSample.CallReport();
//var error = amazonConnection.Reports.CreateReportAndDownloadFile(Utils.Constants.ReportTypes.GET_STRANDED_INVENTORY_UI_DATA);
//var dddd = amazonConnection.Reports.CreateReportAndDownloadFile(Utils.Constants.ReportTypes.GET_FBA_MYI_ALL_INVENTORY_DATA);
//var dddd = amazonConnection.Reports.CreateReportAndDownloadFile(Utils.Constants.ReportTypes.GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA);
//ReportManager reportManager = new ReportManager(amazonConnection);



var file22227 = amazonConnection.Reports.CreateReportAndDownloadFile(ReportTypes.GET_REFERRAL_FEE_PREVIEW_REPORT, DateTime.UtcNow.AddDays(-3), DateTime.UtcNow);


var file3337 = amazonConnection.Reports.GetReports(new Parameter.Report.ParameterReportList()
{
reportTypes = new ReportTypes[] { ReportTypes.GET_REFERRAL_FEE_PREVIEW_REPORT },
});

var sss = amazonConnection.Reports.GetReport("784871019793");


var file = amazonConnection.Reports.CreateReportAndDownloadFile(ReportTypes.GET_FBA_ESTIMATED_FBA_FEES_TXT_DATA, DateTime.UtcNow.AddDays(-30), DateTime.UtcNow);






//var feedTypes = new ParameterGetFeed { feedTypes = { FeedType.POST_PRODUCT_PRICING_DATA }, processingStatuses = ProcessingStatuses.IN_PROGRESS };

//var feeds = amazonConnection.Feed.GetFeeds(feedTypes);


//FeedsSample feedsSample = new FeedsSample(amazonConnection);
//feedsSample.SubmitFeedPRICING(69.3F, "8809606851663");

var feeds = amazonConnection.Feed.GetFeeds(new Parameter.Feed.ParameterGetFeed()
{
processingStatuses = ProcessingStatuses.IN_PROGRESS,//ProcessingStatuses.IN_QUEUE,
pageSize = 100,
feedTypes = new List<FeedType> { FeedType.POST_PRODUCT_PRICING_DATA },
marketplaceIds = new List<string> { MarketPlace.UnitedArabEmirates.ID }
});

var feeds2 = amazonConnection.Feed.GetFeeds(new Parameter.Feed.ParameterGetFeed()
{
processingStatuses = ProcessingStatuses.IN_PROGRESS,//ProcessingStatuses.IN_PROGRESS,
pageSize = 100,
feedTypes = new List<FeedType> { FeedType.POST_INVENTORY_AVAILABILITY_DATA },
marketplaceIds = new List<string> { MarketPlace.UnitedArabEmirates.ID }
});
foreach (var feed in feeds)
{
Console.WriteLine("FeedId " + feed.FeedId);
//var result = amazonConnection.Feed.CancelFeed(feed.FeedId);
}
//var dddddd = reportManager.GetAFNInventoryQtyAsync().ConfigureAwait(false).GetAwaiter().GetResult();



Expand Down
4 changes: 2 additions & 2 deletions Source/FikaAmazonAPI.SampleCode/ReportManagerSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public void CallReport()
var ordersByLastUpdate = reportManager.GetOrdersByLastUpdate(90); //GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL
var settlementOrder = reportManager.GetSettlementOrder(90); //GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE_V2
var returnMFNOrder = reportManager.GetReturnMFNOrder(90); //GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE
var returnFBAOrder = reportManager.GetReturnFBAOrder(90); //GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA
var reimbursementsOrder = reportManager.GetReimbursementsOrder(180); //GET_FBA_REIMBURSEMENTS_DATA
var returnFBAOrder = reportManager.GetReturnFBAOrder(50); //GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA
var reimbursementsOrder = reportManager.GetReimbursementsOrder(1000); //GET_FBA_REIMBURSEMENTS_DATA
var feedbacks = reportManager.GetFeedbackFromDays(180); //GET_SELLER_FEEDBACK_DATA
var UnsuppressedInventory = reportManager.GetUnsuppressedInventoryDataAsync().ConfigureAwait(false).GetAwaiter().GetResult(); //GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA
}
Expand Down
6 changes: 3 additions & 3 deletions Source/FikaAmazonAPI/FikaAmazonAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<Product>CSharp Amazon Sp API</Product>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<LangVersion>8.0</LangVersion>
<Version>1.7.18</Version>
<AssemblyVersion>1.7.18</AssemblyVersion>
<FileVersion>1.7.18</FileVersion>
<Version>1.7.19</Version>
<AssemblyVersion>1.7.19</AssemblyVersion>
<FileVersion>1.7.19</FileVersion>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://github.com/abuzuhri/Amazon-SP-API-CSharp</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class InventoryPlanningDataRow
public string ASIN { get; set; }
public string ProductName { get; set; }
public string Condition { get; set; }
public int? Avaliable { get; set; }
public int? Available { get; set; }
public int? PendingRemovalQuantity { get; set; }
public int? InvAge181To330Days { get; set; }
public int? InvAge331To365Days { get; set; }
Expand Down Expand Up @@ -99,7 +99,7 @@ public static InventoryPlanningDataRow FromRow(TableRow rowData, string refNumbe
row.ASIN = rowData.GetString("asin");
row.ProductName = rowData.GetString("product-name");
row.Condition = rowData.GetString("condition");
row.Avaliable= DataConverter.GetInt(rowData.GetString("avaliable"));
row.Available = DataConverter.GetInt(rowData.GetString("available"));
row.PendingRemovalQuantity = DataConverter.GetInt(rowData.GetString("pending-removal-quantity"));
row.InvAge0To90Days = DataConverter.GetInt(rowData.GetString("inv-age-0-to-90-days"));
row.InvAge91To180Days = DataConverter.GetInt(rowData.GetString("inv-age-91-to-180-days"));
Expand Down
Loading