"""Charges Resource."""

from typing import Any, Dict, List

from netorca_sdk.v2.base import BaseResource
from netorca_sdk.v2.models.charge import Charge


class ChargesResource(BaseResource):
    """Charges resource."""

    endpoint = "charges"
    model_class = Charge

    def get_accumulated(self, **filters: Any) -> List[Dict[str, Any]]:
        """
        Get accumulated charges.

        Args:
            **filters: Filter parameters

        Returns:
            List of accumulated charge data
        """
        results = []
        for item in self.client.get(self.endpoint, params=filters, custom_path="charges/accumulated"):
            results.append(item)
        return results

    def delete(self, id: int) -> bool:
        """
        Charges cannot be deleted.

        Raises:
            NotImplementedError: Deleting charges is not supported
        """
        raise NotImplementedError("Charges cannot be deleted")
