diff --git a/README.md b/README.md index c313705..f16e6d7 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,36 @@ Dans le docker-composer.yaml volumes: - ../ednotif-bundle:/var/www/html/ednotif-bundle ``` + +## Utilisation + +Le bundle expose `Malio\EdnotifBundle\Bovin\Api\BovinApiInterface`. Injection standard par autowiring. + +```php +use Malio\EdnotifBundle\Bovin\Api\BovinApiInterface; + +final class MyController +{ + public function __construct(private BovinApiInterface $ednotif) {} + + public function example(): void + { + // Dossier d'un bovin + $file = $this->ednotif->getAnimalFile('FR1234567890'); + + // Inventaire du cheptel à une date + $inventory = $this->ednotif->getInventory( + startDate: new \DateTimeImmutable('2026-01-01'), + includeEarTagStock: true, + ); + + // Retours de notifications depuis une date + $returns = $this->ednotif->getReturnedDossiers(new \DateTimeImmutable('2026-03-01')); + + // Sorties présumées par l'IPG (flux de rapprochement) + $presumed = $this->ednotif->getPresumedExits(); + } +} +``` + +Toutes les méthodes lèvent `Malio\EdnotifBundle\Shared\Exception\EdnotifException` en cas de `Resultat=false` côté EDNOTIF. diff --git a/docs/ws-catalog.md b/docs/ws-catalog.md index a5acb25..3f7713b 100644 --- a/docs/ws-catalog.md +++ b/docs/ws-catalog.md @@ -21,9 +21,9 @@ WS métier principal : déclarations réglementaires d'un cheptel bovin auprès | Opération | Statut | Description probable | |---|---|---| | `IpBGetDossierAnimal` | Implémenté | Dossier complet d'un bovin (identifications, mouvements, parents…) | -| `IpBGetInventaire` | À faire | Inventaire des animaux présents sur l'exploitation | -| `IpBGetRetourDossiers` | À faire | Retours de traitement des notifications envoyées | -| `IpBGetSortiesPresumees` | À faire | Animaux sortis selon l'IPG mais non déclarés par l'éleveur | +| `IpBGetInventaire` | Implémenté | Inventaire des animaux présents sur l'exploitation | +| `IpBGetRetourDossiers` | Implémenté | Retours de traitement des notifications envoyées | +| `IpBGetSortiesPresumees` | Implémenté | Animaux sortis selon l'IPG mais non déclarés par l'éleveur | ### Écriture