def update(customer_or_customer_id, address_id, attributes)
Util.verify_keys(AddressGateway._update_signature, attributes)
customer_id = _determine_customer_id(customer_or_customer_id)
response = @config.http.put "/customers/#{customer_id}/addresses/#{address_id}", :address => attributes
if response[:address]
SuccessfulResult.new(:address => Address._new(@gateway, response[:address]))
elsif response[:api_error_response]
ErrorResult.new(@gateway, response[:api_error_response])
else
raise UnexpectedError, "expected :address or :api_error_response"
end
end