Class: BrickFTP::RESTfulAPI::UnlockUser

Inherits:
Object
  • Object
show all
Includes:
Command
Defined in:
lib/brick_ftp/restful_api/unlock_user.rb

Overview

Unlock a user

See Also:

Instance Method Summary collapse

Methods included from Command

included, #initialize

Instance Method Details

#call(id) ⇒ BrickFTP::Types::User?

Unlocks a user that has been locked out by Brute Force Login Protection.

Parameters:

  • id (Integer)

    Globally unique identifier of each user. Each user is given an ID automatically upon creation.

Returns:



19
20
21
22
23
# File 'lib/brick_ftp/restful_api/unlock_user.rb', line 19

def call(id)
  res = client.post("/api/rest/v1/users/#{id}/unlock.json")

  BrickFTP::Types::User.new(**res.symbolize_keys)
end