Skip to content

Commit

Permalink
Merge pull request #544 from dansharpe83/main
Browse files Browse the repository at this point in the history
  • Loading branch information
abuzuhri authored Apr 14, 2023
2 parents 1bc9079 + 0c375b4 commit 12a127e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public OrderList() : base()
}

public string NextToken { get; set; }
public DateTime? LastUpdatedBefore { get; set; }

/// <summary>
/// Returns the string presentation of the object
Expand Down
6 changes: 5 additions & 1 deletion Source/FikaAmazonAPI/Services/OrderService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using FikaAmazonAPI.AmazonSpApiSDK.Models.Orders;
using System;
using FikaAmazonAPI.AmazonSpApiSDK.Models.Orders;
using FikaAmazonAPI.AmazonSpApiSDK.Models.Token;
using FikaAmazonAPI.Parameter.Order;
using FikaAmazonAPI.Search;
Expand Down Expand Up @@ -51,6 +52,9 @@ public async Task<OrderList> GetOrdersAsync(ParameterOrderList searchOrderList,
var response = await ExecuteRequestAsync<GetOrdersResponse>(Utils.RateLimitType.Order_GetOrders, cancellationToken);
var nextToken = response.Payload.NextToken;
orderList = response.Payload.Orders;
if (!string.IsNullOrWhiteSpace(response.Payload.LastUpdatedBefore))
orderList.LastUpdatedBefore = DateTime.Parse(response.Payload.LastUpdatedBefore);

int PageCount = 1;
if (searchOrderList.MaxNumberOfPages.HasValue && searchOrderList.MaxNumberOfPages.Value == 1)
{
Expand Down

0 comments on commit 12a127e

Please sign in to comment.