def add_package(identifier, **opts)
      id = validate_package_opts(identifier, opts)

      return nil if @packages.map { |p| p[:id] }.include? id

      name = JSS::Package.map_all_ids_to(:name, api: @api)[id]

      pkg_data = {
        id: id,
        name: name,
        action: PACKAGE_ACTIONS[opts[:action]],
        feu: opts[:feu],
        fut: opts[:feu],
        update_autorun: opts[:update_autorun]
      }

      @packages.insert opts[:position], pkg_data

      @need_to_update = true
      @packages
    end
def add_package(identifier, **opts)
      id = validate_package_opts(identifier, opts)

      return nil if @packages.map { |p| p[:id] }.include? id

      name = JSS::Package.map_all_ids_to(:name, api: @api)[id]

      pkg_data = {
        id: id,
        name: name,
        action: PACKAGE_ACTIONS[opts[:action]],
        feu: opts[:feu],
        fut: opts[:feu],
        update_autorun: opts[:update_autorun]
      }

      @packages.insert opts[:position], pkg_data

      @need_to_update = true
      @packages
    end
Add a package to the list of pkgs handled by this policy.
 If the pkg already exists in the policy, nil is returned and
 no changes are made.

 @param [String,Integer] identifier the name or id of the package to add to this policy

 @param position [Symbol, Integer] where to add this pkg among the list of
   pkgs. Zero-based, :start and 0 are the same, as are :end and -1.
   Defaults to :end

 @param action [String] One of the values of PACKAGE_ACTIONS

 @param feu [Boolean]  Overrides the setting for the pkg itself Defaults to false

 @param fut [Boolean] Overrides the setting for the pkg itself Defaults to false

 @param update_autorun [Boolean] Defaults to false

 @return [Array, nil]  the new @packages array, nil if pkg was already in the policy