from rights_filter.integrations.external_policy import ExternalApiPolicy


class UsageLimit:
    def __init__(self, policy: ExternalApiPolicy) -> None:
        self.policy = policy

    def available(self) -> bool:
        allowed, _reason = self.policy.can_call()
        return allowed


__all__ = ["UsageLimit"]
