示例#1
0
        public CustomerAddResponse Add(Customer customer)
        {
            XElement message =
                new XElement("customer",
                             new XElement("add",
                                          new XElement("gen_info",
                                                       customer.ToXml(ModelXmlDataType.CustomerAdd)
                                                       )
                                          )
                             );

            return(CustomerAddResponse.Parse(ApiHttpClient.SendPacket(message)));
        }
示例#2
0
        public CustomerAddResponse CustomerAdd(string email, string password)//, string domain = null, string plan = null)
        {
            XElement message = new XElement("packet",
                                            new XAttribute("version", "1.6.7.0"),
                                            new XElement("customer",
                                                         new XElement("add",
                                                                      new XElement("gen_info",
                                                                                   new XElement("pname", email),
                                                                                   new XElement("login", email),
                                                                                   new XElement("passwd", password),
                                                                                   new XElement("email", email)
                                                                                   )
                                                                      )
                                                         )
                                            );
            HttpWebRequest request = ApiHttpClient.Request(message);
            XElement       resp    = ApiHttpClient.GetResponse(request);

            return(CustomerAddResponse.Parse(resp));
        }