def set_response(item_class_name)
      if @api_response.success?
        @total_count = @api_response["totalCount"]
        @total_pages = @api_response["totalPages"]
        @count = @api_response["count"]
        @timestamp = @api_response["timestamp"]
        @items = []
        unless @api_response["collection"].nil?
          @api_response["collection"].each do |attr_item|
            item = item_class_name.new
            item.set_item(attr_item)
            @items << item
          end
        end
      else
        @error = @api_response.parsed_response
      end
    end
def set_response(item_class_name)
      if @api_response.success?
        @total_count = @api_response["totalCount"]
        @total_pages = @api_response["totalPages"]
        @count = @api_response["count"]
        @timestamp = @api_response["timestamp"]
        @items = []
        unless @api_response["collection"].nil?
          @api_response["collection"].each do |attr_item|
            item = item_class_name.new
            item.set_item(attr_item)
            @items << item
          end
        end
      else
        @error = @api_response.parsed_response
      end
    end
Assuming type is json