diff --git a/MaarchREST.class.php b/MaarchREST.class.php index 9e7dbe7644dda815aa2d6fec4f85623cb3d91b0c..7e7e37d2913e29eba19c9271d32f1b5324228e30 100644 --- a/MaarchREST.class.php +++ b/MaarchREST.class.php @@ -104,6 +104,15 @@ class MaarchREST extends SAEConnecteur { * @throws Exception */ public function getAcuseReception($id_transfert) { + return $this->getAck($id_transfert, $this->originatingAgency); + } + + /** + * @param $id_transfert + * @return string Le contenu du fichier XML contenant l'accusé de reception + * @throws Exception + */ + public function getAck(string $transfert_id, string $originating_agency_id): string { if (!$id_transfert){ throw new UnrecoverableException("L'identifiant du transfert n'a pas été trouvé"); } @@ -129,7 +138,11 @@ class MaarchREST extends SAEConnecteur { * @throws Exception */ public function getReply($id_transfert) { - if (! $id_transfert){ + return $this->getAttr($id_transfert, $this->originatingAgency); + } + + public function getAtr(string $transfert_id, string $originating_agency_id): string { + if (! $id_transfert){ throw new UnrecoverableException("L'identifiant du transfert n'a pas été trouvé"); } @@ -150,7 +163,7 @@ class MaarchREST extends SAEConnecteur { } return $this->getXmlFromZipMessage($zipMessage, $messageInformations['replyMessage']['messageId']); - } + } /** * @param $zipMessage (Zip binary file from Maarch RM Export)