src/Communibase/Connector.php
public function finalize($entityType, $id)
    {
        if ($entityType !== 'Invoice') {
            throw new Exception('Cannot call finalize on ' . $entityType);
        }

        return $this->doPost($entityType . '.json/finalize/' . $id);
    }
public function finalize($entityType, $id)
    {
        if ($entityType !== 'Invoice') {
            throw new Exception('Cannot call finalize on ' . $entityType);
        }

        return $this->doPost($entityType . '.json/finalize/' . $id);
    }
public function finalize ( $ entityType , $ id ) { if ( $ entityType !== 'Invoice' ) { throw new Exception ( 'Cannot call finalize on ' . $ entityType ) ; } return $ this -> doPost ( $ entityType . '.json/finalize/' . $ id ) ; }
Finalize an invoice by adding an invoiceNumber to it.
Besides, invoice items will receive a 'generalLedgerAccountNumber'.
This number will be unique and sequential within the 'daybook' of the invoice.

NOTE: this is Invoice specific

@param string $entityType
@param string $id

@return array

@throws Exception
Finalize an invoice by adding an invoiceNumber to it . Besides invoice items will receive a generalLedgerAccountNumber . This number will be unique and sequential within the daybook of the invoice .