public Task<Customer> CreateCustomer(Customer customer)
 {
     return customer.PostToService(_token, _baseAddress, "api/v1/customers");
 }
예제 #2
0
        private static void CreateANewCustomer(string baseAddress, string token)
        {
            var custRepo = new CustomerRepository(baseAddress, token);
            "Create a customer".ConsoleBlue();
            var customer = custRepo.CreateCustomer(new Customer
            {
                CustomerRef = "MyTest101",
                BusinessName = "My Test Customer",
                ContactName = "Test",
                SendReportEmail = "*****@*****.**",
                BusinessWebsite = "http://www.mytestcustomer.com",
                IndustryName = "Testing",
                Market = "United Kingdom"
            });

            customer.Result?.PrintObjectToConsole();
            _customer = customer.Result;
        }