lib/braintree/credit_card_gateway.rb in braintree-2.16.0 vs lib/braintree/credit_card_gateway.rb in braintree-2.17.0

- old
+ new

@@ -39,10 +39,10 @@ response = @config.http.post("/payment_methods/all/expiring_ids?start=#{formatted_start_date}&end=#{formatted_end_date}") ResourceCollection.new(response) { |ids| _fetch_expiring_between(formatted_start_date, formatted_end_date, ids) } end def find(token) - raise ArgumentError if token.nil? || token.strip.to_s == "" + raise ArgumentError if token.nil? || token.to_s.strip == "" response = @config.http.get "/payment_methods/#{token}" CreditCard._new(@gateway, response[:credit_card]) rescue NotFoundError raise NotFoundError, "payment method with token #{token.inspect} not found" end