Source code for openbankproject_client.consent

"""
Consent endpoints for the OpenBankProject API Client.
"""

from typing import Dict, List, Optional, Union, Any


[docs] class ConsentEndpoints: """Consent-related API endpoints."""
[docs] def __init__(self, client): """ Initialize the endpoint group. Args: client: OpenBankProjectClient instance """ self.client = client
[docs] def get_consents(self) -> Dict: """ Get Consents. Returns: Dict containing consents information """ return self.client.get("consents")
[docs] def get_consents_by_bank_id(self, bank_id: str) -> Dict: """ Get Consents By Bank Id. Args: bank_id: Bank identifier Returns: Dict containing consents information """ return self.client.get(f"banks/{bank_id}/consents")