<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */

namespace Kufer\Web\KuferTools\Dozent\KursUebersicht\KursDetails\CheckSepa;

class CheckSepaUseCase extends \Kufer\Web\KuferTools\Basis\UseCase\ToolUseCase
{
  public function __construct($request)
  {
    parent::__construct($request, new CheckSepaResponse());
  }

  public function action()
  {
    $resultAry = \ValidationAPI::validateSepa($this->request->iban, $this->request->bic, \SessionOperations::getCurrentWebToolsUser()->tnr);

    return $this->getResponse($resultAry);
  }

  public static function getToolId()
  {
    return \ToolsAPI::TOOL_KURSUEBERSICHT_DOZ;
  }

  public static function getToolSectionId()
  {
    return 334;
  }

  protected function getResponse($resultAry)
  {
    $this->response->result = $resultAry;

    return $this->response;
  }
}

class CheckSepaResponse extends \Kufer\Web\KuferTools\Basis\UseCase\ToolResponse
{
}