public static Task <PurchaseResult> GetPurchaseAsync(int invoiceId, string token)
        {
            var parameters = new Dictionary <string, object> {
                ["token"] = token
            };

            return(RestHelper.CallGetMethodAsync <PurchaseResult>(ApiProvider, $"{GetPurchaseMethod}{invoiceId}", parameters));
        }
        public static Task <ProductResult> GetProductsInfoAsync(int productId)
        {
            var parameters = new Dictionary <string, object>
            {
                ["format"]     = "json",
                ["transp"]     = "cors",
                ["product_id"] = productId
            };

            return(RestHelper.CallGetMethodAsync <ProductResult>(ApiProvider, ProductsInfoMethod, parameters));
        }
        public static Task <ListPaymentsFilterResult> GetPaymentsAsync(string login, string password, string accountId,
                                                                       string siteAlias, string periodFrom, string periodTo, string invoiceId, string state)
        {
            string nounce = GenerateNounce();
            string hash   =
                Hash($"{login};{password};{nounce};{accountId};{siteAlias};{periodFrom};{periodTo};{invoiceId};{state}");

            var parameters = new Dictionary <string, object>
            {
                ["login"]      = login,
                ["nonce"]      = nounce,
                ["hash"]       = hash,
                ["siteAlias"]  = siteAlias,
                ["periodFrom"] = periodFrom,
                ["periodTo"]   = periodTo,
                ["state"]      = state
            };

            return(RestHelper.CallGetMethodAsync <ListPaymentsFilterResult>(ApiProvider, GetPaymentsMethod, parameters));
        }
 public static Task <ListTunnelsResult> ListTunnels()
 {
     return(RestHelper.CallGetMethodAsync <ListTunnelsResult>(ApiProvider, Method, settings: Settings));
 }