query = $query; } public function getOneLatestByType(string $documentType) { // @TODO : à écrire } // findLastInvoice public function getOneLastInvoice() { $query = $this->query->create(); $query ->filterByMerchant($this->merchant) ->orderBy('.createdAt', 'DESC'); return $query->findOne(); } public function getByBuyerAddress(Address $buyerAddress) { $query = $this->query->create(); $query ->filterByBuyerAddress($buyerAddress); return $query->find(); } }