public static Task <TokenResult> GetTokenAsync(string login, string password, string sellerSecret) { long timestamp = DateTime.Now.ToFileTime(); string sign = Hash($"{password}{sellerSecret}{timestamp}"); var dto = new TokenRequest { Login = login, Timestamp = timestamp, Sign = sign }; return(RestHelper.CallPostMethodAsync <TokenResult>(ApiProvider, GetTokenMethod, dto, Settings)); }
public static Task <SellsResult> GetSellsAsync(int sellerId, List <int> productIds, string start, string end, int page, string sellerSecret) { string sign = Hash($"{sellerId}{string.Join("", productIds)}{start}{end}{Returned}{page}{RowsPerPage}{sellerSecret}"); var dto = new SellsRequest { SellerId = sellerId, ProductIds = productIds, DateStart = start, DateFinish = end, Returned = Returned, Rows = RowsPerPage, Page = page, Sign = sign }; return(RestHelper.CallPostMethodAsync <SellsResult>(ApiProvider, GetSellsMethod, dto, Settings)); }