Example #1
0
        public static dynamic CreateE911Address(FlowrouteNumbersAndMessagingClient client)
        {
            E911Controller e911s = client.E911s;
            E911           body  = new E911();

            body.StreetName        = "3rd Ave";
            body.StreetNumber      = "1111";
            body.AddressType       = "Suite";
            body.AddressTypeNumber = "200";
            body.City      = "Seattle";
            body.State     = "WA";
            body.Country   = "US";
            body.FirstName = "John";
            body.LastName  = "Doe";
            body.Label     = "Potbelly";
            body.Zip       = "98101";

            try
            {
                dynamic result = e911s.CreateE911Address(body);
                Console.WriteLine(result);
                return(result);
            } catch (FlowrouteNumbersAndMessaging.Standard.Exceptions.ErrorException e) {
                Console.WriteLine(e);
                return(null);
            }
        }
Example #2
0
        public static dynamic ValidateE911(FlowrouteNumbersAndMessagingClient client)
        {
            E911Controller e911s = client.E911s;
            E911           body  = new E911();

            body.StreetName        = "N Vassault";
            body.StreetNumber      = "3901";
            body.AddressType       = null;
            body.AddressTypeNumber = null;
            body.City      = "Tacoma";
            body.State     = "WA";
            body.Country   = "US";
            body.FirstName = "John";
            body.LastName  = "Doe";
            body.Label     = "Home";
            body.Zip       = "98407";

            dynamic result = e911s.ValidateE911(body);

            Console.WriteLine(result);
            return(result);
        }
Example #3
0
        public static dynamic UpdateE911Address(FlowrouteNumbersAndMessagingClient client, string e911_id, string new_label)
        {
            E911Controller e911s  = client.E911s;
            dynamic        result = e911s.E911Details(e911_id);

            string jsonstring = result.ToString();

            Newtonsoft.Json.Linq.JObject j = Newtonsoft.Json.Linq.JObject.Parse(jsonstring);
            string old_label = (string)j["data"]["attributes"]["label"];
            E911   body      = new E911();

            body.AddressType       = (string)j["data"]["attributes"]["address_type"];
            body.AddressTypeNumber = (string)j["data"]["attributes"]["address_type_number"];
            body.AdressNumber      = (string)j["data"]["attributes"]["street_number"];
            body.City         = (string)j["data"]["attributes"]["city"];
            body.Country      = (string)j["data"]["attributes"]["country"];
            body.FirstName    = (string)j["data"]["attributes"]["first_name"];
            body.Id           = (string)j["data"]["id"];
            body.LastName     = (string)j["data"]["attributes"]["last_name"];
            body.State        = (string)j["data"]["attributes"]["state"];
            body.StreetName   = (string)j["data"]["attributes"]["street_name"];
            body.StreetNumber = (string)j["data"]["attributes"]["street_number"];
            body.Zip          = (string)j["data"]["attributes"]["zip"];
            body.Label        = (string)new_label;

            try
            {
                dynamic submissin_result = e911s.UpdateE911Address(body);
                Console.WriteLine(result);
                return(result);
            }
            catch (FlowrouteNumbersAndMessaging.Standard.Exceptions.ErrorException e)
            {
                Console.WriteLine(e);
                return(null);
            }
        }