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