Manual Reference Source Test

src/helpers/agreement/Agreement.js

import AgreementModel from '../../models/agreement/Agreement';
import Helper from '../Helper';
import { aggregate } from '../../utilities/ClassUtility';

/**
 * Helper class representing Agreement.  Typically use {@link AgreementService#get}
 *
 * @extends {AgreementModel}
 * @extends {Helper}
 */

// class Agreement extends AgreementModel {}
class Agreement extends aggregate(AgreementModel, Helper) {
  /**
   * Constructor for helper class representing an Agreement
   *
   * @param {Object} json - json api response from server
   */
  constructor(json = {}) {
    super(json);
    this.deserializeRelationshipStubs(json);
    this.syncRelationships(json);
  }

  /** @type {String}  - The type */
  static get type() {
    return 'agreement__agreements';
  }

  /** @type {AgreementTemplate} */
  get agreementTemplate() {
    return this._relationships.agreement_template;
  }

  /** @type {AgreementTemplate} */
  set agreementTemplate(template) {
    /** @type {AgreementTemplate} */
    this._relationships.agreement_template = template;
  }

  /** @type {User} */
  get mobileUser() {
    return this._relationships.mobile_user;
  }

  /** @type {User} */
  set mobileUser(user) {
    /** @type {User} */
    this._relationships.mobile_user = user;
  }

  /** @type {AgreementSignature[]} */
  get agreementSignatures() {
    return this._relationships.signatures;
  }

  /** @type {AgreementSignature[]} */
  set agreementSignatures(signatures) {
    /** @type {AgreementSignature[]} */
    this._relationships.signatures = signatures;
  }
}

export default Agreement;