Manual Reference Source Test

src/models/consent/AvailableStrategy.js

/**
 * Model representing a consent available strategy.
 */
class AvailableStrategyModel {
  /**
           * @param {Object}  response                       - JSON formatted response of a consent available strategy.
           * @param {Number}  response.id                    - The consent available strategy ID value
           */
  constructor(response = {}) {
    const _response = response.data || response; // if json api is passed in directly
    // const attributes = _response.attributes || _response; // if json api is passed in directly

    if (_response.id) {
      /** @type {Number} */
      this.id = parseInt(_response.id, 10);
    }
  }
}

export default AvailableStrategyModel;