Manual Reference Source Test

src/helpers/Timezone.js

import TimezoneModel from '../models/Timezone';
import Helper from './Helper';
import { aggregate } from '../utilities/ClassUtility';


/**
 * Helper class representing a user Timezone.
 *
 * @extends {TimezoneModel}
 * @extends {Helper}
 *
 * // timezoneService.get()
 * timezoneService.get().then(timezones => console.log(timezones));
 *
 * const timezone = new Timezone({
      "id": "us/samoa__-11.0",
      "type": "timezones",
      "attributes": {
        "name": "US/Samoa",
        "offset": -11.0,
        "region": "US"
      }
    });
 */
class Timezone extends aggregate(TimezoneModel, Helper) {
  /**
   * Constructor for helper class representing a Timezone
   *
   * @param {Object} json - json api response from server
   */
  constructor(json = {}) {
    super(json);

    if (json.relationships) {
      /** @type {Object} */
      this._relationships = json.relationships;
      this.syncRelationships();
    }
  }

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

export default Timezone;