lib/braintree/address_gateway.rb in braintree-2.12.0 vs lib/braintree/address_gateway.rb in braintree-2.13.0
- old
+ new
@@ -29,9 +29,10 @@
SuccessfulResult.new
end
def find(customer_or_customer_id, address_id)
customer_id = _determine_customer_id(customer_or_customer_id)
+ raise ArgumentError if address_id.nil? || address_id.strip.to_s == ""
response = @config.http.get("/customers/#{customer_id}/addresses/#{address_id}")
Address._new(@gateway, response[:address])
rescue NotFoundError
raise NotFoundError, "address for customer #{customer_id.inspect} with id #{address_id.inspect} not found"
end