function VASTClient(cappingFreeLunch, cappingMinimumTimeInterval, customStorage) {
    _classCallCheck(this, VASTClient);

    this.cappingFreeLunch = cappingFreeLunch || 0;
    this.cappingMinimumTimeInterval = cappingMinimumTimeInterval || 0;
    this.defaultOptions = {
      withCredentials: false,
      timeout: 0
    };
    this.vastParser = new VASTParser();
    this.storage = customStorage || new Storage(); // Init values if not already set

    if (this.lastSuccessfulAd === undefined) {
      this.lastSuccessfulAd = 0;
    }

    if (this.totalCalls === undefined) {
      this.totalCalls = 0;
    }

    if (this.totalCallsTimeout === undefined) {
      this.totalCallsTimeout = 0;
    }
  }
/**
   * Creates an instance of VASTClient.
   * @param  {Number} cappingFreeLunch - The number of first calls to skip.
   * @param  {Number} cappingMinimumTimeInterval - The minimum time interval between two consecutive calls.
   * @param  {Storage} customStorage - A custom storage to use instead of the default one.
   * @constructor
   */
Creates an instance of VASTClient.
@param  {Number} cappingFreeLunch - The number of first calls to skip.
@param  {Number} cappingMinimumTimeInterval - The minimum time interval between two consecutive calls.
@param  {Storage} customStorage - A custom storage to use instead of the default one.
@constructor
Creates an instance of VASTClient . @param { Number } cappingFreeLunch - The number of first calls to skip . @param { Number } cappingMinimumTimeInterval - The minimum time interval between two consecutive calls . @param { Storage } customStorage - A custom storage to use instead of the default one . @constructor
function VASTClient(cappingFreeLunch, cappingMinimumTimeInterval, customStorage) {
    _classCallCheck(this, VASTClient);
    this.cappingFreeLunch = cappingFreeLunch || 0;
    this.cappingMinimumTimeInterval = cappingMinimumTimeInterval || 0;
    this.defaultOptions = {
      withCredentials: false,
      timeout: 0
    };
    this.vastParser = new VASTParser();
    this.storage = customStorage || new Storage(); 
    if (this.lastSuccessfulAd === undefined) {
      this.lastSuccessfulAd = 0;
    }
    if (this.totalCalls === undefined) {
      this.totalCalls = 0;
    }
    if (this.totalCallsTimeout === undefined) {
      this.totalCallsTimeout = 0;
    }
  }
function VASTClient ( cappingFreeLunch , cappingMinimumTimeInterval , customStorage ) { _classCallCheck ( this , VASTClient ) ; this . cappingFreeLunch = cappingFreeLunch || 0 ; this . cappingMinimumTimeInterval = cappingMinimumTimeInterval || 0 ; this . defaultOptions = { withCredentials : false , timeout : 0 } ; this . vastParser = new VASTParser ( ) ; this . storage = customStorage || new Storage ( ) ; if ( this . lastSuccessfulAd === undefined ) { this . lastSuccessfulAd = 0 ; } if ( this . totalCalls === undefined ) { this . totalCalls = 0 ; } if ( this . totalCallsTimeout === undefined ) { this . totalCallsTimeout = 0 ; } }
Creates an instance of VASTClient.
Creates an instance of VASTClient .
// Init values if not already set