Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all alias for list methods #823

Merged
merged 1 commit into from
Aug 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions lib/stripe/api_operations/list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ def list(filters = {}, opts = {})

obj
end

# The original version of #list was given the somewhat unfortunate name of
# #all, and this alias allows us to maintain backward compatibility (the
# choice was somewhat misleading in the way that it only returned a single
# page rather than all objects).
alias all list
end
end
end
16 changes: 0 additions & 16 deletions test/stripe/list_object_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,22 +132,6 @@ class ListObjectTest < Test::Unit::TestCase
next_list = list.previous_page
assert_equal({ expand: ["data.source"], limit: 3 }, next_list.filters)
end

#
# backward compatibility
#

# note that the name #all is deprecated, as is using it fetch the next page
# in a list
should "be able to retrieve full lists given a listobject" do
c = Stripe::Charge.all
assert c.is_a?(Stripe::ListObject)
assert_equal("/v1/charges", c.resource_url)
all = c.all
assert all.is_a?(Stripe::ListObject)
assert_equal("/v1/charges", all.resource_url)
assert all.data.is_a?(Array)
end
end
end

Expand Down