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

namespace Kufer\Web\KuferTools\Teilnehmer\BayerischerApothekertag\CheckKonto;

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

  public function action()
  {
    $resultAry = \ValidationAPI::validateDta($this->request->konto, $this->request->blz);

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

  public static function getToolSectionId()
  {
    return 550;
  }

  public static function getToolId()
  {
    return 45;
  }

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

    return $this->response;
  }
}

class CheckKontoRequest
{
  public $konto;
  public $blz;
}

class CheckKontoResponse extends \Kufer\Web\KuferTools\Basis\UseCase\ToolResponse
{
  public $result;
}