lib/braintree/customer_gateway.rb in braintree-2.16.0 vs lib/braintree/customer_gateway.rb in braintree-2.17.0
- old
+ new
@@ -31,10 +31,10 @@
SuccessfulResult.new
end
def find(customer_id)
raise ArgumentError, "customer_id contains invalid characters" unless customer_id.to_s =~ /\A[\w-]+\z/
- raise ArgumentError, "customer_id cannot be blank" if customer_id.nil?|| customer_id.strip.to_s == ""
+ raise ArgumentError, "customer_id cannot be blank" if customer_id.nil?|| customer_id.to_s.strip == ""
response = @config.http.get("/customers/#{customer_id}")
Customer._new(@gateway, response[:customer])
rescue NotFoundError
raise NotFoundError, "customer with id #{customer_id.inspect} not found"
end