lib/membership/update.js
function Update(subject, source) {
    if (!(this instanceof Update)) {
        return new Update(subject, source);
    }
    this.id = uuid.v4();
    this.timestamp = Date.now();

    // Populate subject
    subject = subject || {};
    this.address = subject.address;
    this.incarnationNumber = subject.incarnationNumber;
    this.status = subject.status;

    // Populate source
    source = source || {};
    this.source = source.address;
    this.sourceIncarnationNumber = source.incarnationNumber;
}
function Update(subject, source) {
    if (!(this instanceof Update)) {
        return new Update(subject, source);
    }
    this.id = uuid.v4();
    this.timestamp = Date.now();

    // Populate subject
    subject = subject || {};
    this.address = subject.address;
    this.incarnationNumber = subject.incarnationNumber;
    this.status = subject.status;

    // Populate source
    source = source || {};
    this.source = source.address;
    this.sourceIncarnationNumber = source.incarnationNumber;
}
function Update ( subject , source ) { if ( ! ( this instanceof Update ) ) { return new Update ( subject , source ) ; } this . id = uuid . v4 ( ) ; this . timestamp = Date . now ( ) ; // Populate subject subject = subject || { } ; this . address = subject . address ; this . incarnationNumber = subject . incarnationNumber ; this . status = subject . status ; // Populate source source = source || { } ; this . source = source . address ; this . sourceIncarnationNumber = source . incarnationNumber ; }
Create a new Update
@param {IMember} subject the subject of the update.
@param {IMember} [source] the source of the update.
@constructor
Create a new Update