/// <summary> /// Constructs this client and sets initial values. /// </summary> /// <param name="account">A Kyrio account associated with his client.</param> public KyrioRestClient(KyrioAccount account) { if (account == null) { throw new ArgumentNullException("account"); } _account = account; }
public void TestDetermineBusinessServiceabilityMock() { var account = new KyrioAccount(); account.ClientId = "999999"; account.EnableTestLocal = true; var client = account.CreateServiceabilityClient(); var results = client.DetermineBusinessServiceabilityAsync( "858 Coal Creek Circle", null, "Louisville", "CO", "80027", "US" ).Result; Assert.NotNull(results); }
static async Task MainAsync() { var account = new KyrioAccount(); account.ClientId = "999999"; var client = account.CreateServiceabilityClient(); try { var result = await client.DetermineBusinessServiceabilityAsync( "858 Coal Creek Circle", null, "Louisville", "CO", "80027", "US"); var json = JsonConvert.SerializeObject(result); Console.WriteLine(json); } catch (Exception ex) { // If you use Wait() or Result() rather than await, // The Exception will found in the InnerException of ex Console.WriteLine("Failed to call serviceability API"); Console.WriteLine(ex.Message); } }
/// <summary> /// Creates cliemt instance /// </summary> /// <param name="account">A Kyrio account this client is related to</param> public ServiceabilityClient(KyrioAccount account) : base(account) { }