mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-17 00:03:02 -04:00
Follows the path established in 2d75c8f by porting the rest of stripe-ruby's tests over to OpenAPI. There are a few other changes here where I've removed some tests that are duplicated or don't make much sense, or reorganized how we test certain things, but this commit is largely the same migration operation applied in bulk a few dozen test suites.
21 lines
558 B
Ruby
21 lines
558 B
Ruby
module Stripe
|
|
class BitcoinReceiver < APIResource
|
|
extend Stripe::APIOperations::Create
|
|
include Stripe::APIOperations::Save
|
|
include Stripe::APIOperations::Delete
|
|
extend Stripe::APIOperations::List
|
|
|
|
def self.resource_url
|
|
"/v1/bitcoin/receivers"
|
|
end
|
|
|
|
def resource_url
|
|
if respond_to?(:customer) && !self.customer.nil? && self.customer != ""
|
|
"#{Customer.resource_url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}"
|
|
else
|
|
"#{self.class.resource_url}/#{CGI.escape(id)}"
|
|
end
|
|
end
|
|
end
|
|
end
|