Skip to content

Instantly share code, notes, and snippets.

@adamjstevenson
Last active December 15, 2017 13:07
Show Gist options
  • Save adamjstevenson/e402494a87ed99a0163d to your computer and use it in GitHub Desktop.
Save adamjstevenson/e402494a87ed99a0163d to your computer and use it in GitHub Desktop.
require 'stripe'
Stripe.api_key = "sk_your_API_key"
customers = Stripe::Customer.all(:limit => 100)
customers.each do |customer|
puts customer.id
end
while customers.has_more do
customers = Stripe::Customer.all(:limit => 100, :starting_after => customers.data.last.id)
customers.each do |customer|
puts customer.id
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment