code: private function getBonusTotals($dsBegin, $dsEnd)
      {
          $query = $this->qbGetBonusTotals->build();
          $conn = $query->getConnection();
          $bind = [
              QBGetTotals::BND_PERIOD_BEGIN => $dsBegin,
              QBGetTotals::BND_PERIOD_END => $dsEnd
          ];
          $rs = $conn->fetchAll($query, $bind);
          $result = [];
          foreach ($rs as $one) {
              $accId = $one[QBGetTotals::A_ACC_ID];
              $custId = $one[QBGetTotals::A_CUST_ID];
              $total = $one[QBGetTotals::A_TOTAL];
              if ($custId) {
                  $item = new DTotal();
                  $item->accountId = $accId;
                  $item->customerId = $custId;
                  $item->total = $total;
                  $result[$custId] = $item;
              }
          }
          return $result;
      }
docs: Get summary for all bonus credits for all operation for period.
  
  @param $dsBegin
  @param $dsEnd
  @return DTotal[]