callApiService = $callApiService; $this->dormantAccountEmailNotifier = $dormantAccountEmailNotifier; $this->memberToDormantAccountMigrator = $memberToDormantAccountMigrator; $this->dormantAccountDeletionReminder = $dormantAccountDeletionReminder; $this->dormantDataRemover = $dormantDataRemover; } public function execute($gateToken) { $setup = $this->getSetup($gateToken); $this->dormantAccountEmailNotifier->sendNotificationEmail($gateToken, $setup); $this->memberToDormantAccountMigrator->migrateMemberToDormantAccount($gateToken); $this->dormantAccountDeletionReminder->sendNotificationEmail($gateToken, $setup); $this->dormantDataRemover->removeDormantData($gateToken); } public function getSetup($gateToken) { return $this->callApiService->callApi([ 'url' => 'setup-get', 'data' => [ 'SetupCode' => 'dormant-default', ], 'headers' => [ 'GateToken' => $gateToken ] ]); } }