src/Model/Invoice.php
protected function getInvoiceForEvent(int $iInvoiceId): Resource
    {
        $oInvoice = $this->getById($iInvoiceId, ['expand' => ['customer', 'items']]);
        if (empty($oInvoice)) {
            throw new ModelException('Invalid invoice ID');
        }
        return $oInvoice;
    }
protected function getInvoiceForEvent(int $iInvoiceId): Resource
    {
        $oInvoice = $this->getById($iInvoiceId, ['expand' => ['customer', 'items']]);
        if (empty($oInvoice)) {
            throw new ModelException('Invalid invoice ID');
        }
        return $oInvoice;
    }
protected function getInvoiceForEvent ( int $ iInvoiceId ) : Resource { $ oInvoice = $ this -> getById ( $ iInvoiceId , [ 'expand' => [ 'customer' , 'items' ] ] ) ; if ( empty ( $ oInvoice ) ) { throw new ModelException ( 'Invalid invoice ID' ) ; } return $ oInvoice ; }
Get an invoice in a suitable format for the event triggers

@param int $iInvoiceId The invoice ID

@return Resource
@throws ModelException
Get an invoice in a suitable format for the event triggers