Kyle Conroy e3a68bb3b9 Replace api_key with an options hash
For now, only two options are supported: `api_key` and
`idempotency_key`. In the future, we'll be adding support for additional
headers as needed.
2014-12-17 23:23:46 -08:00

18 lines
424 B
Ruby

module Stripe
module APIOperations
module List
module ClassMethods
def all(filters={}, opts={})
api_key, headers = Util.parse_opts(opts)
response, api_key = Stripe.request(:get, url, api_key, filters, headers)
Util.convert_to_stripe_object(response, api_key)
end
end
def self.included(base)
base.extend(ClassMethods)
end
end
end
end