mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-11 00:01:46 -04:00
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.
18 lines
433 B
Ruby
18 lines
433 B
Ruby
module Stripe
|
|
module APIOperations
|
|
module Create
|
|
module ClassMethods
|
|
def create(params={}, opts={})
|
|
api_key, headers = Util.parse_opts(opts)
|
|
response, api_key = Stripe.request(:post, self.url, api_key, params, headers)
|
|
Util.convert_to_stripe_object(response, api_key)
|
|
end
|
|
end
|
|
|
|
def self.included(base)
|
|
base.extend(ClassMethods)
|
|
end
|
|
end
|
|
end
|
|
end
|