File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Source/FikaAmazonAPI/Services Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,16 @@ public List<InventorySummaries> GetInventorySummaries(ParameterGetInventorySumma
22
22
23
23
CreateAuthorizedRequest ( FbaInventoriesApiUrls . GetInventorySummaries , RestSharp . Method . GET , param ) ;
24
24
var response = ExecuteRequest < GetInventorySummariesResponse > ( ) ;
25
- var nextToken = response . Pagination ? . NextToken ;
26
25
list . Add ( response . Payload . InventorySummaries ) ;
27
- while ( ! string . IsNullOrEmpty ( nextToken ) )
26
+ if ( response . Pagination != null && ! string . IsNullOrEmpty ( response . Pagination . NextToken ) )
28
27
{
29
- var nextresponse = GetInventorySummariesByNextToken ( nextToken , ParameterGetInventorySummaries ) ;
30
- list . Add ( nextresponse . Payload . InventorySummaries ) ;
31
- nextToken = nextresponse . Pagination ? . NextToken ;
28
+ var nextToken = response . Pagination . NextToken ;
29
+ while ( ! string . IsNullOrEmpty ( nextToken ) )
30
+ {
31
+ var getInventorySummaries = GetInventorySummariesByNextToken ( nextToken ) ;
32
+ list . Add ( getInventorySummaries . Payload . InventorySummaries ) ;
33
+ nextToken = getInventorySummaries . Pagination ? . NextToken ;
34
+ }
32
35
}
33
36
return list ;
34
37
}
You can’t perform that action at this time.
0 commit comments