public function setPaymentStatus($token, $paymentStatus, $paymentDate = '')
    {
        if (empty($paymentDate)) {
            $paymentDate = date(API::DateFormat_Iso);
        }
        $message = array(
            'token' => (string) $token,
            'paymentstatus' => (int) $paymentStatus,
            'paymentdate' => (string) $paymentDate,
        );
        return $this->communicator->callApiFunction('invoices/invoice_paymentstatus_set', $message)->setMainResponseKey('invoice');
    }