async Task <PaginatedResult <User> > IUserComUsersClient.FindByDateAsync(DateSearchType searchType, DateTime min, DateTime max) { var builder = new HttpQueryStringBuilder(); builder.Add("search", searchType.ToString().ToSnakeCase()); builder.Add("min", new DateTimeOffset(min.ToUniversalTime()).ToUnixTimeSeconds()); builder.Add("max", new DateTimeOffset(max.ToUniversalTime()).ToUnixTimeSeconds()); var result = await SendAsync <dynamic>(HttpMethod.Get, $"{USER_RESOURCE}/search/", builder.BuildQuery()); var paginatedResult = CreatePaginatedResult <User>(result); return(paginatedResult); }
/// <summary> /// Initializes a new instance of the <see cref="OrderListRequest" /> class. /// </summary> /// <param name="MarketplaceTechnicalCodes">MarketplaceTechnicalCodes.</param> /// <param name="MarketplaceBusinessCodes">MarketplaceBusinessCodes.</param> /// <param name="AccountIds">Account id list.</param> /// <param name="BeezUPOrderStatuses">BeezUPOrderStatuses.</param> /// <param name="DateSearchType">DateSearchType (required).</param> /// <param name="BeginPeriodUtcDate">The begin period you want to make the search. \\ The period MUST not be greater than 30 days. The begin period MUST be lower than the end period. (required).</param> /// <param name="EndPeriodUtcDate">The end period of you search. \\ The period MUST not be greater than 30 days. \\ The end period MUST be greater than the begin period. The end period MUST be lower to the current date. (required).</param> /// <param name="OrderBuyerName">OrderBuyerName.</param> /// <param name="MarketplaceOrderIds">MarketplaceOrderIds.</param> /// <param name="OrderMerchantOrderIds">Merchant order id list.</param> /// <param name="PageSize">PageSize (required).</param> /// <param name="PageNumber">PageNumber (required).</param> public OrderListRequest(List <BeezUPCommonMarketplaceTechnicalCode> MarketplaceTechnicalCodes = default(List <BeezUPCommonMarketplaceTechnicalCode>), List <BeezUPCommonMarketplaceBusinessCode> MarketplaceBusinessCodes = default(List <BeezUPCommonMarketplaceBusinessCode>), List <AccountId> AccountIds = default(List <AccountId>), List <BeezUPOrderStatus> BeezUPOrderStatuses = default(List <BeezUPOrderStatus>), DateSearchType DateSearchType = default(DateSearchType), DateTime?BeginPeriodUtcDate = default(DateTime?), DateTime?EndPeriodUtcDate = default(DateTime?), OrderBuyerName OrderBuyerName = default(OrderBuyerName), List <MarketplaceOrderId> MarketplaceOrderIds = default(List <MarketplaceOrderId>), List <OrderMerchantOrderId> OrderMerchantOrderIds = default(List <OrderMerchantOrderId>), PageSize PageSize = default(PageSize), PageNumber PageNumber = default(PageNumber)) { // to ensure "DateSearchType" is required (not null) if (DateSearchType == null) { throw new InvalidDataException("DateSearchType is a required property for OrderListRequest and cannot be null"); } else { this.DateSearchType = DateSearchType; } // to ensure "BeginPeriodUtcDate" is required (not null) if (BeginPeriodUtcDate == null) { throw new InvalidDataException("BeginPeriodUtcDate is a required property for OrderListRequest and cannot be null"); } else { this.BeginPeriodUtcDate = BeginPeriodUtcDate; } // to ensure "EndPeriodUtcDate" is required (not null) if (EndPeriodUtcDate == null) { throw new InvalidDataException("EndPeriodUtcDate is a required property for OrderListRequest and cannot be null"); } else { this.EndPeriodUtcDate = EndPeriodUtcDate; } // to ensure "PageSize" is required (not null) if (PageSize == null) { throw new InvalidDataException("PageSize is a required property for OrderListRequest and cannot be null"); } else { this.PageSize = PageSize; } // to ensure "PageNumber" is required (not null) if (PageNumber == null) { throw new InvalidDataException("PageNumber is a required property for OrderListRequest and cannot be null"); } else { this.PageNumber = PageNumber; } this.MarketplaceTechnicalCodes = MarketplaceTechnicalCodes; this.MarketplaceBusinessCodes = MarketplaceBusinessCodes; this.AccountIds = AccountIds; this.BeezUPOrderStatuses = BeezUPOrderStatuses; this.OrderBuyerName = OrderBuyerName; this.MarketplaceOrderIds = MarketplaceOrderIds; this.OrderMerchantOrderIds = OrderMerchantOrderIds; }
public DateSearchPattern(DateTime i_DateTime2Search, DateSearchType i_searchType) { m_DateTime2Search = i_DateTime2Search; m_DateSearchType = i_searchType; }