Class ContractApiService

java.lang.Object
energy.eddie.regionconnector.es.datadis.services.ContractApiService

@Service public class ContractApiService extends Object
  • Constructor Details

    • ContractApiService

      public ContractApiService(ContractApi contractApi)
  • Method Details

    • fetchContractDetails

      public reactor.core.publisher.Mono<ContractDetails> fetchContractDetails(String permissionId, String nif, String distributorCode, String meteringPointId)
      This method retrieves contract details based on the provided nif, distributor code and metering point. It performs a series of validations including checking for correct metering point and ensuring the point type supports the requested measurement type. If these conditions are not met, appropriate exceptions are thrown.
      Returns:
      A ContractDetails object containing the most recent contract details if successful.

      NoContractsException If no contracts are found for the provided NIF and distributor code.

      DatadisApiException If the API call * fails.