I think is late for your work. But this how to it:
Example
@orders = ShopifyAPI::Order.find(:all, :params => {:status => "any", :limit => 3, :order => "created_at DESC" })
@orders.each do |order|
id = order.id
name = order.name
end
while @orders.next_page?
@orders = @orders.fetch_next_page
@orders.each do |order|
id = order.id
name = order.name
end
end
So you can create paginable array based on what you receive in each loop. The first call defines the limit for all subsequents call to fetch_next_page. In my case each page contain 3 element, you can go up to 250.
Another way is to navigate using shopify "next_page_info" parameter, so you only need to fetch the first query and include all filters, then just navigate back/fwd with page infos(previous_page_info or next_page_info).
Example 2
first_batch_products = ShopifyAPI::Product.find(:all, params: { limit: 50 })
second_batch_products = ShopifyAPI::Product.find(:all, params: { limit: 50, page_info: first_batch_products.next_page_info })
next_page_info = @orders.next_page_info
prev_page_info = @orders.previous_page_info
More info here: https://github.com/Shopify/shopify_api#pagination
Regards.