public async Task <IEnumerable <Result> > CreateUpdateAsync(IEnumerable <Owner> owners)
        {
            if (owners == null)
            {
                throw new ArgumentException("owner body list cannot be null.");
            }

            if (owners.Count() == 0 || owners.Count() > BatchMaxSize)
            {
                throw new ArgumentException(string.Format("Owner body list cannot be empty or biger that {0}.", BatchMaxSize));
            }

            foreach (Owner owner in owners)
            {
                if (string.IsNullOrEmpty(owner.Username))
                {
                    throw new ArgumentException("username cannot be blank.");
                }
            }

            var asynResult = await client.sendAsyncRequestWithResult(
                HttpMethod.Put,
                "owners",
                OwnerSerializer.SerializeOwners(owners));

            return(JsonConvert.DeserializeObject <IEnumerable <Result> >(asynResult));
        }
        public async Task UpdateAsync(Owner owner, string username)
        {
            if (owner == null)
            {
                throw new ArgumentException("owner body cannot be null.");
            }

            if (string.IsNullOrEmpty(username))
            {
                throw new ArgumentException("username cannot be blank.");
            }

            await client.sendAsyncRequest(HttpMethod.Put,
                                          string.Format("owners/{0}", username),
                                          OwnerSerializer.SerializeOwner(owner));
        }
        public async Task CreateAsync(Owner owner)
        {
            if (owner == null)
            {
                throw new ArgumentException("owner body cannot be null.");
            }

            if (string.IsNullOrEmpty(owner.Username))
            {
                throw new ArgumentException("username cannot be blank.");
            }

            if (string.IsNullOrEmpty(owner.Password))
            {
                throw new ArgumentException("password cannot be blank.");
            }

            await client.sendAsyncRequest(
                HttpMethod.Post,
                "owners",
                OwnerSerializer.SerializeOwner(owner));
        }
        public async Task UpdatePasswordAsync(string username, string password)
        {
            if (string.IsNullOrEmpty(username))
            {
                throw new ArgumentException("username cannot be blank.");
            }

            if (string.IsNullOrEmpty(password))
            {
                throw new ArgumentException("password cannot be blank.");
            }

            Owner owner = new Owner.Builder()
            {
                Username = username,
                Password = password
            };

            await client.sendAsyncRequest(HttpMethod.Put,
                                          string.Format("owners/{0}/password", username),
                                          OwnerSerializer.SerializeOwner(owner));
        }