code: private function buildResult(array $data): Result
      {
          $token = $this->getTokenFromResponse($data);
          $done = isset($data['nextSyncUrl']);
  
          $items = \array_map(function (array $item): ResourceInterface {
              return $this->builder->build($item);
          }, $data['items']);
  
          return new Result($items, $token, $done);
      }
docs: Build a Result from the API response.
  
  @param array $data
  
  @return Result