Class: Operto::Tasks::Update
- Inherits:
-
Object
- Object
- Operto::Tasks::Update
- Defined in:
- lib/operto/tasks/update.rb,
sig/operto.rbs
Instance Method Summary collapse
Methods included from Operation
Instance Method Details
#call(task_id:, attributes:) ⇒ ::Dry::Monads::Result[::Hash[::Symbol, untyped]]
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/operto/tasks/update.rb', line 8 def call(task_id:, attributes:) validate_arguments!(task_id, attributes) request_attributes = prepare_attributes(attributes).compact_blank response = Operto::Client.connection.put("tasks/#{task_id}", request_attributes) handle_task_response(response) rescue StandardError => e Failure(e) end |