src/chartmogul/chartmogul-feeder.js
/**
   * The middleware in charge of fetching the MRR.
   *
   * @param {Object} config - The config require for the fetch
   * @return {Promise} - The promisified geckoFormatted result of the fetch
   *
   */
The middleware in charge of fetching the MRR.
@param {Object} config - The config require for the fetch
@return {Promise} - The promisified geckoFormatted result of the fetch
The middleware in charge of fetching the MRR . @param { Object } config - The config require for the fetch @return { Promise } - The promisified geckoFormatted result of the fetch
async fetchMrr(config) {
    const req = await this.requestChartMogulFor('/metrics/mrr', config);
    const {
      entries: [previous, current],
    } = req;
    return GeckoFormatter.toNumberAndSecondStat({
      'value': Math.round(current.mrr / 100),
      'prefix': '€',
    }, { 
      'value': Math.round(previous.mrr / 100),
    });
  }
async fetchMrr ( config ) { const req = await this . requestChartMogulFor ( '/metrics/mrr' , config ) ; const { entries : [ previous , current ] , } = req ; return GeckoFormatter . toNumberAndSecondStat ( { 'value' : Math . round ( current . mrr / 100 ) , 'prefix' : '€', } , { 'value' : Math . round ( previous . mrr / 100 ) , } ) ; }
The middleware in charge of fetching the MRR.
The middleware in charge of fetching the MRR .
// Take the first one because it'll be for the end of month