Class: CommandTower::Workflows::Messaging::Inbox::ArchiveWorkflow
- Inherits:
-
BaseWorkflow
- Object
- ApplicationWorkflow
- BaseWorkflow
- CommandTower::Workflows::Messaging::Inbox::ArchiveWorkflow
- Defined in:
- app/workflows/command_tower/workflows/messaging/inbox.rb
Constant Summary
Constants inherited from ApplicationWorkflow
ApplicationWorkflow::ALLOWED_RETRY_STRATEGIES, ApplicationWorkflow::InvalidTransactionResult, ApplicationWorkflow::TransactionFailure
Instance Method Summary collapse
Methods inherited from BaseWorkflow
Methods inherited from ApplicationWorkflow
call, call_from_job, continuation_max_attempts, declared_retry_strategy, mark_impersonation_activity!, retry_strategy, validate_retry_strategy!
Methods included from Impersonation::ActivityDeclaration
Methods included from Logging::LifecycleDeclaration
Methods included from Execution::ContextAccess
#audit, #execution_context, #log_debug, #log_error, #log_info, #log_warn, #publish_event
Methods included from Transactional
#fail_transaction!, #transaction
Instance Method Details
#call(user:, inbox_item_id:) ⇒ Object
54 55 56 57 58 59 |
# File 'app/workflows/command_tower/workflows/messaging/inbox.rb', line 54 def call(user:, inbox_item_id:) result = CommandTower::Services::Messaging::Inbox::Archive.call(user:, inbox_item_id:) return result_or_failure(result) unless result.success? success(payload: CommandTower::Serializers::Messaging::Inbox::ItemSerializer.serialize(result.data[:item]), http_status: :ok) end |