src/OrderVisitor.php
private function loadOrderCollection(): OrderVisitor
    {
        $logger = $this->getLogger();

        /** @var PagedQueryResponse $response */
        $response = $this->getClient()->execute($this->getOrderQuery());

        if ($response instanceof ErrorResponse) {
            $logger->error('Got error response loading the orders.', ['response' => $response]);

            throw new RuntimeException($response->getMessage());
        } else {
            $logger->debug('Found some orders.', ['response' => $response]);
        }

        $this->setLastResponse($response);

        $this->setOrderCollection($this->getLastResponse()->toObject());

        return $this;
    }
private function loadOrderCollection(): OrderVisitor
    {
        $logger = $this->getLogger();

        /** @var PagedQueryResponse $response */
        $response = $this->getClient()->execute($this->getOrderQuery());

        if ($response instanceof ErrorResponse) {
            $logger->error('Got error response loading the orders.', ['response' => $response]);

            throw new RuntimeException($response->getMessage());
        } else {
            $logger->debug('Found some orders.', ['response' => $response]);
        }

        $this->setLastResponse($response);

        $this->setOrderCollection($this->getLastResponse()->toObject());

        return $this;
    }
private function loadOrderCollection ( ) : OrderVisitor { $ logger = $ this -> getLogger ( ) ; /** @var PagedQueryResponse $response */ $ response = $ this -> getClient ( ) -> execute ( $ this -> getOrderQuery ( ) ) ; if ( $ response instanceof ErrorResponse ) { $ logger -> error ( 'Got error response loading the orders.' , [ 'response' => $ response ] ) ; throw new RuntimeException ( $ response -> getMessage ( ) ) ; } else { $ logger -> debug ( 'Found some orders.' , [ 'response' => $ response ] ) ; } $ this -> setLastResponse ( $ response ) ; $ this -> setOrderCollection ( $ this -> getLastResponse ( ) -> toObject ( ) ) ; return $ this ; }
Loads the order collection.
@return OrderVisitor
Loads the order collection .