Skip to content

Instantly share code, notes, and snippets.

@adamjstevenson
Created May 19, 2016 18:23
Show Gist options
  • Save adamjstevenson/547f6288157e687790ef310b5dbf2189 to your computer and use it in GitHub Desktop.
Save adamjstevenson/547f6288157e687790ef310b5dbf2189 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|
# do a thing with the customer
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