Class: BrickFTP::RESTfulAPI::CreateGroup

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

Overview

Create a group

Params

PARAMETER TYPE DESCRIPTION
name string Name of the group. This is how the group will be displayed on the site. Maximum of 50 characters.
notes text You may use this property to store any additional information you require. There are no restrictions on its formatting.
user_ids comma-separated integers IDs of the users that are in this group.

See Also:

Defined Under Namespace

Classes: Params

Instance Method Summary collapse

Methods included from Command

included, #initialize

Instance Method Details

#call(params) ⇒ BrickFTP::Types::Group

Creates a new group on the current site.

Parameters:

Returns:



35
36
37
38
39
# File 'lib/brick_ftp/restful_api/create_group.rb', line 35

def call(params)
  res = client.post('/api/rest/v1/groups.json', params.to_h.compact)

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