Ejemplo n.º 1
0
        public static async Task <TransactionDetails> Get_Transaction_By_Id(string id)
        {
            string content = string.Empty;

            using (var client = GetHttpClient())
            {
                HttpResponseMessage response = await client.GetAsync(string.Format("transaction/{0}", id));

                if (response.IsSuccessStatusCode)
                {
                    content = await response.Content.ReadAsStringAsync();
                }
            }
            return(Xml_Helper.Get_Transaction(content));
        }
Ejemplo n.º 2
0
        public static async Task <IList <TransactionDetails> > Get_Recent_Transactions()
        {
            string content = string.Empty;

            using (var client = GetHttpClient())
            {
                HttpResponseMessage response = await client.GetAsync("transaction");

                if (response.IsSuccessStatusCode)
                {
                    content = await response.Content.ReadAsStringAsync();
                }
            }
            return(Xml_Helper.Get_Transactions(content));
        }