Class SupplyApiService
java.lang.Object
energy.eddie.regionconnector.es.datadis.services.SupplyApiService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Supply> fetchSupplyForPermissionRequest(EsPermissionRequest permissionRequest) Fetches the supply information for a given permission request.
-
Constructor Details
-
SupplyApiService
-
-
Method Details
-
fetchSupplyForPermissionRequest
public reactor.core.publisher.Mono<Supply> fetchSupplyForPermissionRequest(EsPermissionRequest permissionRequest) Fetches the supply information for a given permission request. This method retrieves supply details based on the NIF and distributor code provided in the permission request. 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.- Parameters:
permissionRequest- The permission request containing the NIF, distributor code, metering point ID, and measurement type.- Returns:
- A
Supplyobject containing the supply details if successful.NoSuppliesExceptionIf no supplies are found for the provided NIF a nd distributor code.NoSupplyForMeteringPointExceptionIf no supply is found for the given metering point ID.DatadisApiExceptionIf the API call fails.
-