public function getStatementOfAccount(SEPAAccount $account, \DateTime $from, \DateTime $to)
    {
        $responses = array();

        $this->logger->info('Start fetching statement of account results');
        $this->logger->info('Start date: ' . $from->format('Y-m-d'));
        $this->logger->info('End date  : ' . $to->format('Y-m-d'));

        $dialog = $this->getDialog();
        $dialog->syncDialog();
        $dialog->initDialog();

        $message = $this->createStateOfAccountMessage($dialog, $account, $from, $to, null);
        $response = $dialog->sendMessage($message);
        $touchdowns = $response->getTouchdowns($message);
        $soaResponse = new GetStatementOfAccount($response->rawResponse);
        $responses[] = $soaResponse->getRawMt940();

        $touchdownCounter = 1;
        while (isset($touchdowns[HKKAZ::NAME])) {
            $this->logger->info('Fetching more statement of account results (' . $touchdownCounter++ . ') ...');
            $message = $this->createStateOfAccountMessage(
                $dialog,
                $account,
                $from,
                $to,
                $touchdowns[HKKAZ::NAME]
            );

            $r = $dialog->sendMessage($message);
            $touchdowns = $r->getTouchDowns($message);
            $soaResponse = new GetStatementOfAccount($r->rawResponse);
            $responses[] = $soaResponse->getRawMt940();
        }

        $this->logger->info('Fetching of ' . $touchdownCounter . ' pages done.');
        $this->logger->debug('HKKAZ response:');

        $dialog->endDialog();

        return GetStatementOfAccount::createModelFromRawMt940(implode('', $responses));
    }
public function getStatementOfAccount(SEPAAccount $account, \DateTime $from, \DateTime $to)
    {
        $responses = array();

        $this->logger->info('Start fetching statement of account results');
        $this->logger->info('Start date: ' . $from->format('Y-m-d'));
        $this->logger->info('End date  : ' . $to->format('Y-m-d'));

        $dialog = $this->getDialog();
        $dialog->syncDialog();
        $dialog->initDialog();

        $message = $this->createStateOfAccountMessage($dialog, $account, $from, $to, null);
        $response = $dialog->sendMessage($message);
        $touchdowns = $response->getTouchdowns($message);
        $soaResponse = new GetStatementOfAccount($response->rawResponse);
        $responses[] = $soaResponse->getRawMt940();

        $touchdownCounter = 1;
        while (isset($touchdowns[HKKAZ::NAME])) {
            $this->logger->info('Fetching more statement of account results (' . $touchdownCounter++ . ') ...');
            $message = $this->createStateOfAccountMessage(
                $dialog,
                $account,
                $from,
                $to,
                $touchdowns[HKKAZ::NAME]
            );

            $r = $dialog->sendMessage($message);
            $touchdowns = $r->getTouchDowns($message);
            $soaResponse = new GetStatementOfAccount($r->rawResponse);
            $responses[] = $soaResponse->getRawMt940();
        }

        $this->logger->info('Fetching of ' . $touchdownCounter . ' pages done.');
        $this->logger->debug('HKKAZ response:');

        $dialog->endDialog();

        return GetStatementOfAccount::createModelFromRawMt940(implode('', $responses));
    }
public function getStatementOfAccount ( SEPAAccount $ account , \ DateTime $ from , \ DateTime $ to ) { $ responses = array ( ) ; $ this -> logger -> info ( 'Start fetching statement of account results' ) ; $ this -> logger -> info ( 'Start date: ' . $ from -> format ( 'Y-m-d' ) ) ; $ this -> logger -> info ( 'End date  : ' . $ to -> format ( 'Y-m-d' ) ) ; $ dialog = $ this -> getDialog ( ) ; $ dialog -> syncDialog ( ) ; $ dialog -> initDialog ( ) ; $ message = $ this -> createStateOfAccountMessage ( $ dialog , $ account , $ from , $ to , null ) ; $ response = $ dialog -> sendMessage ( $ message ) ; $ touchdowns = $ response -> getTouchdowns ( $ message ) ; $ soaResponse = new GetStatementOfAccount ( $ response -> rawResponse ) ; $ responses [ ] = $ soaResponse -> getRawMt940 ( ) ; $ touchdownCounter = 1 ; while ( isset ( $ touchdowns [ HKKAZ :: NAME ] ) ) { $ this -> logger -> info ( 'Fetching more statement of account results (' . $ touchdownCounter ++ . ') ...' ) ; $ message = $ this -> createStateOfAccountMessage ( $ dialog , $ account , $ from , $ to , $ touchdowns [ HKKAZ :: NAME ] ) ; $ r = $ dialog -> sendMessage ( $ message ) ; $ touchdowns = $ r -> getTouchDowns ( $ message ) ; $ soaResponse = new GetStatementOfAccount ( $ r -> rawResponse ) ; $ responses [ ] = $ soaResponse -> getRawMt940 ( ) ; } $ this -> logger -> info ( 'Fetching of ' . $ touchdownCounter . ' pages done.' ) ; $ this -> logger -> debug ( 'HKKAZ response:' ) ; $ dialog -> endDialog ( ) ; return GetStatementOfAccount :: createModelFromRawMt940 ( implode ( '' , $ responses ) ) ; }
Gets statement of account.

@param SEPAAccount $account
@param \DateTime $from
@param \DateTime $to
@return Model\StatementOfAccount\StatementOfAccount|null
@throws \Exception
Gets statement of account .