Ejemplo n.º 1
0
        public IActionResult FindCustomer()
        {
            CustomerFindModel customer = epayco.FindCustomer("LXYzynsEiqss98RBr");


            return(Ok(customer));
        }
Ejemplo n.º 2
0
        public override Task <CustomerDataModel> GetCustomerInfo(CustomerFindModel request, ServerCallContext context)
        {
            var model = new CustomerDataModel();

            if (request.UserId == 1)
            {
                model.FirstName = "Ivan";
                model.LastName  = "Zhang";
            }
            else if (request.UserId == 2)
            {
                model.FirstName = "Eva";
                model.LastName  = "Zhang";
            }
            else if (request.UserId == 3)
            {
                model.FirstName = "Guopin";
                model.LastName  = "Zhao";
            }
            else
            {
                model.FirstName = "Yina";
                model.LastName  = "Zhang";
            }

            return(Task.FromResult(model));
        }
Ejemplo n.º 3
0
        public CustomerFindModel FindCustomer(string id_customer)
        {
            ENDPOINT = body.getQueryFindCustomer(_PUBLIC_KEY, id_customer);
            string content = _request.Execute(
                ENDPOINT,
                "GET",
                _auxiliars.ConvertToBase64(_PUBLIC_KEY));
            CustomerFindModel customer = JsonConvert.DeserializeObject <CustomerFindModel>(content);

            return(customer);
        }