Skip to content

Commit

Permalink
Remove all alias for list methods (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe committed Aug 9, 2019
1 parent 88086ec commit 34a603a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
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

0 comments on commit 34a603a

Please sign in to comment.