def update_channels!(integration, params)
      integration.channels.clear if params[:clear_channels]
      if params[:delete_channel]
        integration.delete_channels!(params[:delete_channel])
      end
      return unless params[:add_channel]

      integration.add_channels!(params[:add_channel],
                                networks: @config.networks)
    end
def update_channels!(integration, params)
      integration.channels.clear if params[:clear_channels]
      if params[:delete_channel]
        integration.delete_channels!(params[:delete_channel])
      end
      return unless params[:add_channel]

      integration.add_channels!(params[:add_channel],
                                networks: @config.networks)
    end
Updates the channels associated with an integration from the specified
 parameters.

 @param integration [Integration] the integration
 @param params [Hash] the parameters to update the integration with. Valid
                      keys are +:clear_channels+ to clear the channel list
                      before proceeding, +:add_channel+ to add the given
                      channels, and +:delete_channel+ to delete the given
                      channels from the integration. All keys are optional.
                      The value of +:clear_channels+ should be a boolean.
                      The value of +:add_channel+ should be a hash of the
                      form +identifier => params+, and +:remove_channel+
                      should be an array of channel identifiers to remove.