def paginated_response(objects, container)
      pagination = container.delete("pagination")
      WillPaginate::Collection.create(pagination["current"], pagination["per_page"]) do |collection|
        collection.replace objects
        collection.total_entries = pagination["count"]
      end
    end
def paginated_response(objects, container)
      pagination = container.delete("pagination")
      WillPaginate::Collection.create(pagination["current"], pagination["per_page"]) do |collection|
        collection.replace objects
        collection.total_entries = pagination["count"]
      end
    end
Returns an API response wrapped in a will_paginate collection
 using the pagination key in the response container to set up
 the current number of total entries and page details.
 @param [Array<Object>] objects the actual response contents
 @param [Hash{String => Object}] The response container
 @option container [Hash] "pagination" the pagination data to use.