public IActionResult FindCustomer() { CustomerFindModel customer = epayco.FindCustomer("LXYzynsEiqss98RBr"); return(Ok(customer)); }
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)); }
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); }