Class: BrickFTP::RESTfulAPI::CreateGroup
- Inherits:
-
Object
- Object
- BrickFTP::RESTfulAPI::CreateGroup
- 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. |
Defined Under Namespace
Classes: Params
Instance Method Summary collapse
-
#call(params) ⇒ BrickFTP::Types::Group
Creates a new group on the current site.
Methods included from Command
Instance Method Details
#call(params) ⇒ BrickFTP::Types::Group
Creates a new group on the current site.
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 |