/// <summary> /// Fetches all orders created in the given time period and processes them locally. /// <param name="startTime">The starting time period of orders to fetch.</param> /// <param name="endTime">The ending time period of orders to fetch.</param> public void FetchOrders(DateTime time, OrderDateType type) { ListOrdersRequest request = new ListOrdersRequest(); if(type == OrderDateType.New) request.CreatedAfter = time; else request.LastUpdatedAfter = time; request.SellerId = mwsSellerId; request.MarketplaceId = new MarketplaceIdList(); request.MarketplaceId.Id = new List<string>(); foreach (string marketplaceId in mwsMarketplaceIdList) { request.MarketplaceId.Id.Add(marketplaceId); } List<Order> orderList = new List<Order>(); ListOrdersResponse response = null; OrderFetcher.InvokeRetriable(LIST_ORDERS_DEFAULT_THROTTLE_LIMIT, delegate() { response = mwsService.ListOrders(request); ProcessOrders(response.ListOrdersResult.Orders.Order); }); while (!string.IsNullOrEmpty(response.ListOrdersResult.NextToken)) { // If NextToken is set, continue looping through the orders. ListOrdersByNextTokenRequest nextRequest = new ListOrdersByNextTokenRequest(); nextRequest.NextToken = response.ListOrdersResult.NextToken; nextRequest.SellerId = mwsSellerId; ListOrdersByNextTokenResponse nextResponse = null; OrderFetcher.InvokeRetriable(LIST_ORDERS_DEFAULT_THROTTLE_LIMIT, delegate() { nextResponse = mwsService.ListOrdersByNextToken(nextRequest); ProcessOrders(nextResponse.ListOrdersByNextTokenResult.Orders.Order); }); } }
public void Test1() { DateTime c = DateTime.Now; OrderDateType dt1 = new OrderDateType(c); OrderDateType dt2 = new OrderDateType(c); Assert.Equal(dt1, dt2); }
// This method is to get allow packages with either a placed, recieved or delivered date // between the start and end dates. With the PackageDateType specifing whether to search // on the placed, recived or deliverd date. public List <Package> SearchPackage(DateTime start, DateTime end, OrderDateType type) { throw new NotImplementedException(); }
// This method is to get allow orders with either a placed, recieved or delivered date // between the start and end dates. With the OrderDateType specifing whether to search // on the placed, recived or deliverd date. public List<Order> SearchOrder(DateTime start, DateTime end, OrderDateType type) { throw new NotImplementedException(); }
// This method is to get allow orders with either a placed, recieved or delivered date // between the start and end dates. With the OrderDateType specifing whether to search // on the placed, recived or deliverd date. public List <Order> SearchOrder(DateTime start, DateTime end, OrderDateType type) { throw new NotImplementedException(); }
// This method is to get allow packages with either a placed, recieved or delivered date // between the start and end dates. With the PackageDateType specifing whether to search // on the placed, recived or deliverd date. public List<Package> SearchPackage(DateTime start, DateTime end, OrderDateType type) { throw new NotImplementedException(); }