ListObject extends ApiOperations::Create

- Addresses a bit of duplication.
This commit is contained in:
Ryan T. Hosford 2016-01-05 22:31:39 -06:00
parent c78b1b8337
commit 0acf314e30

View File

@ -3,6 +3,7 @@ module Stripe
include Enumerable
include Stripe::APIOperations::List
include Stripe::APIOperations::Request
include Stripe::APIOperations::Create
# This accessor allows a `ListObject` to inherit various filters that were
# given to a predecessor. This allows for things like consistent limits,
@ -67,11 +68,6 @@ module Stripe
Util.convert_to_stripe_object(response, opts)
end
def create(params={}, opts={})
response, opts = request(:post, url, params, opts)
Util.convert_to_stripe_object(response, opts)
end
# Fetches the next page in the resource list (if there is one).
#
# This method will try to respect the limit of the current page. If none