Beispiel #1
0
        public ResponseResult CreateCustomer(string username, string password, string email, string fullName, string company, string address, string phone, string fax, string city, string state, string postalCode, string country)
        {
            var add = new CustomerAddPacket();

            add.customer.add.info.status       = "0";
            add.customer.add.info.LoginName    = username;
            add.customer.add.info.Password     = password;
            add.customer.add.info.Email        = email;
            add.customer.add.info.PersonalName = fullName;
            add.customer.add.info.CompanyName  = company;
            add.customer.add.info.Address      = address;
            add.customer.add.info.Phone        = phone;
            add.customer.add.info.PostalCoe    = postalCode;
            add.customer.add.info.State        = state;
            add.customer.add.info.Country      = country;
            add.customer.add.info.Fax          = fax;
            add.customer.add.info.City         = city;

            return(ExecuteWebRequest <CustomerAddPacket, CustomerAddResult>(add).ToResult());
        }
Beispiel #2
0
        public void Customer_Add_Test()
        {
            var add = new CustomerAddPacket();

            add.customer.add.info.status       = "0";
            add.customer.add.info.LoginName    = "usernamer";
            add.customer.add.info.Password     = "******";
            add.customer.add.info.Email        = "email";
            add.customer.add.info.PersonalName = "fullName";
            add.customer.add.info.CompanyName  = "company";
            add.customer.add.info.Address      = "address";
            add.customer.add.info.Phone        = "phone";
            add.customer.add.info.PostalCoe    = "postalCode";
            add.customer.add.info.State        = "state";
            add.customer.add.info.Country      = "country";
            //add.customer.add.packageId = 1;
            add.customer.add.info.Fax  = "fax";
            add.customer.add.info.City = "city";

            var result = client.SerializeObjectToXmlString <CustomerAddPacket>(add);

            Assert.IsNotNull(result);
        }