Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
helenye-stripe committed Dec 3, 2024
1 parent 1a893c4 commit 893914b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/stripe/resources/bank_account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@ def self.verify(customer, id, params = {}, opts = {})
end

def resource_url
if respond_to?(:customer)
if !customer.nil?
"#{Customer.resource_url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}"
elsif respond_to?(:account)
elsif !account.nil?
"#{Account.resource_url}/#{CGI.escape(account)}/external_accounts/#{CGI.escape(id)}"
else
raise InvalidRequestError, "Could not determine which URL to request: [account, customer] fields are all null"
end
end

Expand Down

0 comments on commit 893914b

Please sign in to comment.