@@ -69,28 +69,28 @@ private async Task<string> GetReimbursementsOrderAsync(AmazonConnection amazonCo
69
69
#endregion
70
70
71
71
#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 )
75
75
{
76
76
DateTime fromDate = DateTime . UtcNow . AddDays ( - 1 * days ) ;
77
77
DateTime toDate = DateTime . UtcNow ;
78
- return await GetReturnFBAOrderAsync ( fromDate , toDate , cancellationToken ) ;
78
+ return await GetReturnFBAOrderAsync ( fromDate , toDate , marketplaces , cancellationToken ) ;
79
79
}
80
80
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 )
84
84
{
85
- var path = await GetReturnFBAOrderAsync ( _amazonConnection , fromDate , toDate , cancellationToken ) ;
85
+ var path = await GetReturnFBAOrderAsync ( _amazonConnection , fromDate , toDate , marketplaces , cancellationToken ) ;
86
86
ReturnFBAOrderReport report = new ReturnFBAOrderReport ( path , _amazonConnection . RefNumber ) ;
87
87
88
88
return report . Data ;
89
89
}
90
90
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 )
92
92
{
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 ) ;
94
94
}
95
95
96
96
0 commit comments