public void Populate(IRestRequest request)
 {
     if (_target.AddressId != null)
     {
         request.AddParameter(_type, _target.AddressId);
     }
     else
     {
         var addressPopulator = new AddressPopulator(_target.Address, _type);
         addressPopulator.Populate(request);
     }
 }
        public void Populate(IRestRequest request)
        {
            var addressPopulator = new AddressPopulator(_address);
            addressPopulator.Populate(request);
            if (_addressInfo.Description != null) request.AddParameter("description", _addressInfo.Description);
            if (_addressInfo.MetaData != null)
            {
                var populator = new MetaDataPopulator(_addressInfo.MetaData);
                populator.Populate(request);
            }

            if (_addressInfo.Name != null) request.AddParameter("name", _addressInfo.Name);
            if (_addressInfo.Phone != null) request.AddParameter("phone", _addressInfo.Phone);
            if (_addressInfo.Email != null) request.AddParameter("email", _addressInfo.Email);
            if (_addressInfo.Company != null) request.AddParameter("company", _addressInfo.Company);
        }
Example #3
0
 public Task<VerifyAddressResponse> VerifyAddressAsync(Address address)
 {
     var populator = new AddressPopulator(address);
     return ExecuteAsync<VerifyAddressResponse>(Router.VERIFY, "POST", populator);
 }
Example #4
0
 public VerifyAddressResponse VerifyAddress(Address address)
 {
     var populator = new AddressPopulator(address);
     return Execute<VerifyAddressResponse>(Router.VERIFY, "POST", populator);
 }