Download core/billing/external/interfaces.py from Kyrlos11/nniback: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/spaces/Kyrlos11/nniback/resolve/main/core/billing/external/interfaces.py
- Command line
-
hf download hf://spaces/Kyrlos11/nniback/core/billing/external/interfaces.py
-
curl -L -o interfaces.py https://huggingface.co/spaces/Kyrlos11/nniback/resolve/main/core/billing/external/interfaces.py
1.13 kB
| from abc import ABC, abstractmethod | |
| from typing import Dict, Optional, Any, Tuple | |
| from decimal import Decimal | |
| from fastapi import Request | |
| class PaymentProviderInterface(ABC): | |
| async def create_customer(self, account_id: str, email: str) -> str: | |
| pass | |
| async def create_checkout_session(self, customer_id: str, price_id: str, **kwargs) -> Dict: | |
| pass | |
| async def process_webhook(self, request: Request) -> Dict: | |
| pass | |
| class CircuitBreakerInterface(ABC): | |
| async def safe_call(self, func, *args, **kwargs) -> Any: | |
| pass | |
| async def get_status(self) -> Dict: | |
| pass | |
| class WebhookProcessorInterface(ABC): | |
| async def verify_webhook(self, request: Request) -> bool: | |
| pass | |
| async def process_event(self, event: Dict) -> Dict: | |
| pass | |
| class IdempotencyManagerInterface(ABC): | |
| def generate_key(self, operation: str, account_id: str, **params) -> str: | |
| pass | |