package Ġuk . gov . just ice . digital . h mp ps . h mp ps deli us inter vention se vent listener . service Ċ Ċ import Ġmu . K Logging Ċ import Ġorg . springframework . beans . factory . annotation . Value Ċ import Ġorg . springframework . stereotype . Service Ċ import Ġorg . springframework . web . util . Uri Components Builder Ċ import Ġreactor . core . publisher . Mono Ċ import Ġuk . gov . just ice . digital . h mp ps . h mp ps deli us inter vention se vent listener . component . Inter ventions ApiClient Ċ import Ġuk . gov . just ice . digital . h mp ps . h mp ps deli us inter vention se vent listener . model . crs . Inter vention Ċ import Ġuk . gov . just ice . digital . h mp ps . h mp ps deli us inter vention se vent listener . model . crs . Sent Ref erral Ċ import Ġjava . net . URI Ċ import Ġjava . util . UUID Ċ import Ġkotlin . reflect . K Class Ċ Ċ @ Service Ċ class ĠInter ventions ApiService ( ĊĠ Ġ@ Value ("\ ${ services . inter ventions - api . baseurl }") Ġprivate Ġval Ġinter ventions Base URL : ĠString , ĊĠ Ġprivate Ġval Ġinter ventions ApiClient : ĠInter ventions ApiClient Ċ ) Ġ{ ĊĠ Ġcompanion Ġobject Ġ: ĠK Logging () ĊĊĠ Ġfun Ġ< T Ġ: ĠAny > Ġget ( uri : ĠURI , Ġklass : ĠK Class < T >): ĠMono < T > Ġ{ ĊĠĠĠ Ġreturn Ġinter ventions ApiClient . get ( uri , Ġklass ) ĊĠ Ġ} ĊĊĠ Ġfun Ġget Ref erral ( ref erral Id : ĠUUID ): ĠMono < Sent Ref erral > Ġ{ ĊĠĠĠ Ġreturn Ġinter ventions ApiClient . get ( Uri Components Builder . from Http Url ("$ inter ventions Base URL / sent - ref erral /{ id } "). build And Expand ( ref erral Id ). to Uri (), ĠSent Ref erral :: class ) ĊĠ Ġ} ĊĊĠ Ġfun Ġget Inter vention ( inter vention Id : ĠUUID ): ĠMono < Inter vention > Ġ{ ĊĠĠĠ Ġreturn Ġinter ventions ApiClient . get ( Uri Components Builder . from Http Url ("$ inter ventions Base URL / inter vention /{ id } "). build And Expand ( inter vention Id ). to Uri (), ĠInter vention :: class ) ĊĠ Ġ} Ċ } Ċ