Skip to content

Commit 754545e

Browse files
authored
Merge pull request #597 from RakshaChoudhary/Issue-596/AddMarketPlaceIdInGetReturnFBAOrderAsync
2 parents 43192c2 + 40b1b28 commit 754545e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Source/FikaAmazonAPI/ReportGeneration/ReportManager.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,28 +69,28 @@ private async Task<string> GetReimbursementsOrderAsync(AmazonConnection amazonCo
6969
#endregion
7070

7171
#region ReturnFBAOrder
72-
public List<ReturnFBAOrderRow> GetReturnFBAOrder(int days) =>
73-
Task.Run(() => GetReturnFBAOrderAsync(days)).ConfigureAwait(false).GetAwaiter().GetResult();
74-
public async Task<List<ReturnFBAOrderRow>> GetReturnFBAOrderAsync(int days, CancellationToken cancellationToken = default)
72+
public List<ReturnFBAOrderRow> GetReturnFBAOrder(int days, List<MarketPlace> marketplaces = null) =>
73+
Task.Run(() => GetReturnFBAOrderAsync(days, marketplaces)).ConfigureAwait(false).GetAwaiter().GetResult();
74+
public async Task<List<ReturnFBAOrderRow>> GetReturnFBAOrderAsync(int days, List<MarketPlace> marketplaces = null, CancellationToken cancellationToken = default)
7575
{
7676
DateTime fromDate = DateTime.UtcNow.AddDays(-1 * days);
7777
DateTime toDate = DateTime.UtcNow;
78-
return await GetReturnFBAOrderAsync(fromDate, toDate, cancellationToken);
78+
return await GetReturnFBAOrderAsync(fromDate, toDate, marketplaces, cancellationToken);
7979
}
8080

81-
public List<ReturnFBAOrderRow> GetReturnFBAOrder(DateTime fromDate, DateTime toDate) =>
82-
Task.Run(() => GetReturnFBAOrderAsync(fromDate, toDate)).ConfigureAwait(false).GetAwaiter().GetResult();
83-
public async Task<List<ReturnFBAOrderRow>> GetReturnFBAOrderAsync(DateTime fromDate, DateTime toDate, CancellationToken cancellationToken = default)
81+
public List<ReturnFBAOrderRow> GetReturnFBAOrder(DateTime fromDate, DateTime toDate, List<MarketPlace> marketplaces = null) =>
82+
Task.Run(() => GetReturnFBAOrderAsync(fromDate, toDate, marketplaces)).ConfigureAwait(false).GetAwaiter().GetResult();
83+
public async Task<List<ReturnFBAOrderRow>> GetReturnFBAOrderAsync(DateTime fromDate, DateTime toDate, List<MarketPlace> marketplaces = null, CancellationToken cancellationToken = default)
8484
{
85-
var path = await GetReturnFBAOrderAsync(_amazonConnection, fromDate, toDate, cancellationToken);
85+
var path = await GetReturnFBAOrderAsync(_amazonConnection, fromDate, toDate, marketplaces, cancellationToken);
8686
ReturnFBAOrderReport report = new ReturnFBAOrderReport(path, _amazonConnection.RefNumber);
8787

8888
return report.Data;
8989
}
9090

91-
private async Task<string> GetReturnFBAOrderAsync(AmazonConnection amazonConnection, DateTime fromDate, DateTime toDate, CancellationToken cancellationToken = default)
91+
private async Task<string> GetReturnFBAOrderAsync(AmazonConnection amazonConnection, DateTime fromDate, DateTime toDate, List<MarketPlace> marketplaces = null, CancellationToken cancellationToken = default)
9292
{
93-
return await amazonConnection.Reports.CreateReportAndDownloadFileAsync(ReportTypes.GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA, fromDate, toDate, cancellationToken: cancellationToken);
93+
return await amazonConnection.Reports.CreateReportAndDownloadFileAsync(ReportTypes.GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA, fromDate, toDate, marketplaces: marketplaces, cancellationToken: cancellationToken);
9494
}
9595

9696

0 commit comments

Comments
 (0)