private CustomerDocument GetCustomerDetails(string customerName) { var receiver = new CustomerCommand(customerName, $"{GetResourceServerAddress()}"); var document = receiver.Execute(); return(document.Data.Message); }
protected static CustomerDocument GetCustomerFromErpNext(string name, ILogger logger = null) { var receiver = new CustomerCommand(name, $"{GetCustomerResourceServerAddress()}"); var customerDocument = receiver.Execute(); if (customerDocument.StatusCode != System.Net.HttpStatusCode.OK && logger != null) { logger.Debug("Server did not return customer information"); logger.Error(customerDocument.Content); return(null); } return(customerDocument.Data.Message); }