Class: BrickFTP::RESTfulAPI::UpdateBehavior

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

Overview

Update a behavior

Params

PARAMETER TYPE DESCRIPTION
value array Array of values associated with the behavior.

See Also:

Defined Under Namespace

Classes: Params

Instance Method Summary collapse

Methods included from Command

included, #initialize

Instance Method Details

#call(id, params) ⇒ BrickFTP::Types::Behavior

Updates an existing behavior.

Parameters:

Returns:



32
33
34
35
36
# File 'lib/brick_ftp/restful_api/update_behavior.rb', line 32

def call(id, params)
  res = client.patch("/api/rest/v1/behaviors/#{id}.json", params.to_h.compact)

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