mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-05-31 00:00:37 -04:00
Usage on a top-level collection: ``` Stripe::Customer.list.auto_paging_each do |customer| puts customer end ``` Usage on a subcollection: ``` ruby customer.invoices.auto_paging_each do |invoice| puts invoice end ``` We've also renamed `#all` to `#list` to prevent confusion ("all" implies that all resources are being returned, and in Stripe's paginated API this was not the case). An alias has been provided for backward API compatibility. Fixes #167. Replaces #211 and #248.
21 lines
479 B
Ruby
21 lines
479 B
Ruby
module Stripe
|
|
class BitcoinReceiver < APIResource
|
|
include Stripe::APIOperations::Create
|
|
include Stripe::APIOperations::Update
|
|
include Stripe::APIOperations::Delete
|
|
extend Stripe::APIOperations::List
|
|
|
|
def self.url
|
|
"/v1/bitcoin/receivers"
|
|
end
|
|
|
|
def url
|
|
if respond_to?(:customer)
|
|
"#{Customer.url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}"
|
|
else
|
|
"#{self.class.url}/#{CGI.escape(id)}"
|
|
end
|
|
end
|
|
end
|
|
end
|