lib/stats/Stats.php
public function getSum(
        $sortByMetric = 'delivered',
        $sortByDirection = 'desc',
        $limit = 5, $offset = 0
    ) {
        $this->validateOptions(
            'sortByDirection',
            $sortByDirection,
            self::OPTIONS_SORT_DIRECTION
        );
        $this->validateInteger('limit', $limit);
        $this->validateInteger('offset', $offset);
        $stats = $this->getGlobal();
        $stats['sort_by_metric'] = $sortByMetric;
        $stats['sort_by_direction'] = $sortByDirection;
        $stats['limit'] = $limit;
        $stats['offset'] = $offset;
        return $stats;
    }
public function getSum(
        $sortByMetric = 'delivered',
        $sortByDirection = 'desc',
        $limit = 5, $offset = 0
    ) {
        $this->validateOptions(
            'sortByDirection',
            $sortByDirection,
            self::OPTIONS_SORT_DIRECTION
        );
        $this->validateInteger('limit', $limit);
        $this->validateInteger('offset', $offset);
        $stats = $this->getGlobal();
        $stats['sort_by_metric'] = $sortByMetric;
        $stats['sort_by_direction'] = $sortByDirection;
        $stats['limit'] = $limit;
        $stats['offset'] = $offset;
        return $stats;
    }
public function getSum ( $ sortByMetric = 'delivered' , $ sortByDirection = 'desc' , $ limit = 5 , $ offset = 0 ) { $ this -> validateOptions ( 'sortByDirection' , $ sortByDirection , self :: OPTIONS_SORT_DIRECTION ) ; $ this -> validateInteger ( 'limit' , $ limit ) ; $ this -> validateInteger ( 'offset' , $ offset ) ; $ stats = $ this -> getGlobal ( ) ; $ stats [ 'sort_by_metric' ] = $ sortByMetric ; $ stats [ 'sort_by_direction' ] = $ sortByDirection ; $ stats [ 'limit' ] = $ limit ; $ stats [ 'offset' ] = $ offset ; return $ stats ; }
Retrieve global stats parameters, start date, end date,
aggregated by, sort by metric, sort by direction, limit
and offset

@param string  $sortByMetric    blocks|bounce_drops|bounces|
clicks|deferred|delivered|
invalid_emails|opens|processed|
requests|spam_report_drops|
spam_reports|unique_clicks|
unique_opens|unsubscribe_drops|
unsubsribes
@param string  $sortByDirection asc|desc
@param integer $limit           The number of results to return
@param integer $offset          The point in the list to begin
retrieving results

@return array
@throws \Exception
Retrieve global stats parameters start date end date aggregated by sort by metric sort by direction limit and offset