sign(id) {

        return new Promise((resolve, reject) => {
            function onResult(err, resultset) {
                if (err) {
                    return reject(
                        new FastbillInvalidRequestError({
                            message: 'Invalid Request to Fastbill.',
                            detail: err
                        })
                    );
                }
                resolve(resultset.REMAINING_CREDITS);
            }

            typeOf(id).mustBe('number');

            this.$request({
                service: this.$scope + 'sign',
                data: {INVOICE_ID: id}
            }, onResult);
        });
    }
/**
     * Invoice#sign
     *
     * Adds a qualified electronic signature to an invoice.
     * Requires paid credits on your fastbill account.
     *
     * Returns the number of credits left to sign invoices.
     *
     *
     * See: http://www.fastbill-automatic.com/api/automatic/en/invoice.html#invoice.sign
     *
     * Usage example:
     *
     *     fastbill.Invoice.sign(1).then(...).catch(...)
     *
     * @param {number} id The id of the Invoice that should be canceled.
     *
     */
Invoice#sign
Adds a qualified electronic signature to an invoice.
Requires paid credits on your fastbill account.

Returns the number of credits left to sign invoices.



Usage example.



@param {number} id The id of the Invoice that should be canceled.
Invoice#sign Adds a qualified electronic signature to an invoice . Requires paid credits on your fastbill account . Returns the number of credits left to sign invoices . Usage example . @param { number } id The id of the Invoice that should be canceled .
sign(id) {
        return new Promise((resolve, reject) => {
            function onResult(err, resultset) {
                if (err) {
                    return reject(
                        new FastbillInvalidRequestError({
                            message: 'Invalid Request to Fastbill.',
                            detail: err
                        })
                    );
                }
                resolve(resultset.REMAINING_CREDITS);
            }
            typeOf(id).mustBe('number');
            this.$request({
                service: this.$scope + 'sign',
                data: {INVOICE_ID: id}
            }, onResult);
        });
    }
sign ( id ) { return new Promise ( ( resolve , reject ) => { function onResult ( err , resultset ) { if ( err ) { return reject ( new FastbillInvalidRequestError ( { message : 'Invalid Request to Fastbill.' , detail : err } ) ) ; } resolve ( resultset . REMAINING_CREDITS ) ; } typeOf ( id ) . mustBe ( 'number' ) ; this . $request ( { service : this . $scope + 'sign' , data : { INVOICE_ID : id } } , onResult ) ; } ) ; }
Invoice#sign
 Adds a qualified electronic signature to an invoice.
Invoice#sign Adds a qualified electronic signature to an invoice .