Example #1
0
        /// <summary>
        /// Get products by seller id
        /// </summary>
        /// <param name="sellerId">Seller Id</param>
        /// <param name="pageNumber">Page number (pagination)</param>
        /// <param name="rowsCount">Count of products per page</param>
        /// <param name="currency">Currency for prices</param>
        /// <param name="orderColumn">Sorting column</param>
        /// <param name="orderDir">Sorting by</param>
        /// <param name="language">Language information</param>
        /// <returns></returns>
        public async Task <Interfaces.SellerProducts.ISellerProducts> GetSellerProducts(int sellerId, int pageNumber = 1, int rowsCount = 20, Currency currency = Currency.RUR,
                                                                                        OrderColumn orderColumn      = OrderColumn.Name, OrderDir orderDir = OrderDir.Asc,
                                                                                        Language language            = Language.Russian)
        {
            var request = new DigisellerSellerProductsRequest(sellerId, orderColumn.ToString().ToLower(), orderDir.ToString().ToLower(), rowsCount, pageNumber,
                                                              currency.ToString(), _languages[language]);

            var response =
                await GetDigisellerDataAsync(request, new XmlSerializer <DigisellerSellerProductsRequest, DigisellerSellerProductsResponseXml>(),
                                             UrlGetSellerGoods);

            return(response != null ? new SellerProducts(response) : null);
        }
Example #2
0
 public static string ToSqlString(this OrderDir value)
 {
     return(value.ToString().ToUpper());
 }