mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-11-27 00:03:06 -05:00
Check for nil customer value when determining bitcoin receiver URL
Stripe API responses include `customer: nil`, which causes `refresh` to throw an exception
This commit is contained in:
parent
121a8bfee4
commit
c259547dd7
@ -10,7 +10,7 @@ module Stripe
|
||||
end
|
||||
|
||||
def url
|
||||
if respond_to?(:customer)
|
||||
if respond_to?(:customer) && !self.customer.nil?
|
||||
"#{Customer.url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}"
|
||||
else
|
||||
"#{self.class.url}/#{CGI.escape(id)}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user