Class: BrickFTP::RESTfulAPI::CreateBehavior
- Inherits:
-
Object
- Object
- BrickFTP::RESTfulAPI::CreateBehavior
- Includes:
- Command
- Defined in:
- lib/brick_ftp/restful_api/create_behavior.rb
Overview
Create a behavior
Params
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
path | string | Folder path for behaviors. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. |
behavior | string | The behavior type. Can be one of the following: webhook, file_expiration, auto_encrypt, lock_subfolders. |
value | array | Array of values associated with the behavior. |
Defined Under Namespace
Classes: Params
Instance Method Summary collapse
-
#call(params) ⇒ BrickFTP::Types::Behavior
Creates a new behavior.
Methods included from Command
Instance Method Details
#call(params) ⇒ BrickFTP::Types::Behavior
Creates a new behavior.
35 36 37 38 39 |
# File 'lib/brick_ftp/restful_api/create_behavior.rb', line 35 def call(params) res = client.post('/api/rest/v1/behaviors.json', params.to_h.compact) BrickFTP::Types::Behavior.new(**res.symbolize_keys) end |