"""Requests to ows-abacus-contract.""" from src.connectors.ows_service import OwsService class OwsAbacusContract(OwsService): """OwsAbacusContract client for fetching requests.""" _service = 'ows-abacus-contract' @classmethod def get_contract(cls, contract_id: int) -> dict: """Get a contract. Args: contract_id (int): ID of the contract get. Returns: dict: Contract object. """ path = f'/contract/{contract_id}' return cls.validate_response_type(cls.get(path), dict) @classmethod def get_reference_payment_entity(cls, reference_payment_entity_id: int) -> dict: """Get a reference payment entity. Args: reference_payment_entity_id (int): ID of the entity. Returns: dict: ReferencePaymentEntity object. """ path = f'/reference-payment-entity/{reference_payment_entity_id}/' return cls.validate_response_type(cls.get(path), dict) @classmethod def get_reference_signing_entity(cls, reference_signing_entity_id: int) -> dict: """Get a reference signing entity. Args: reference_signing_entity_id (int): ID of the signing entity. Returns: dict: ReferenceSigningEntity object. """ path = f'/reference-signing-entity/{reference_signing_entity_id}/' return cls.validate_response_type(cls.get(path), dict)