Exemplo n.º 1
0
        public async Task <string> PostCustomers(HttpContext httpContext, Customer customer)
        {
            var token = await httpContext.GetTokenAsync("access_token");

            var client = new Unit4Client();

            await client.PostRentMagicCustomerAsync("", token, customer);

            return("");
        }
Exemplo n.º 2
0
        public async Task <List <Customer> > GetCustomers(HttpContext httpcontext)
        {
            var token = await httpcontext.GetTokenAsync("access_token");

            var client = new Unit4Client();

            var customers = await client.GetUnit4CustomerAsync("", token);

            //await RefreshAccessToken(httpcontext, refreshTokenClient);

            return(customers);
        }