public function emailInvoiceAsPdf($token, $invoiceType, array $emailAsPdf, $invoiceNotes = '')
    {
        $message = array(
            'token' => (string) $token,
            'invoicetype' => (int) $invoiceType,
            'emailaspdf' => $emailAsPdf,
        );
        if (!empty($invoiceNotes)) {
            $message['invoicenotes'] = (string) $invoiceNotes;
        }
        return $this->communicator->callApiFunction('invoices/invoice_mail', $message)->setMainResponseKey('invoice');
    }