diff --git a/src/Artisaninweb/SoapWrapper/SoapWrapper.php b/src/Artisaninweb/SoapWrapper/SoapWrapper.php index 9c611e1..8f8c5d7 100644 --- a/src/Artisaninweb/SoapWrapper/SoapWrapper.php +++ b/src/Artisaninweb/SoapWrapper/SoapWrapper.php @@ -138,6 +138,23 @@ public function call($call, $data = [], $options = []) }); } + /** + * Get last request from a service + * + * @param string $service_name + * + * @return mixed + */ + public function getLastCall($service_name) + { + + $service = $this->services[$service_name]; + + if (!is_null($service->getClient())) { + return $service->getClient()->__getLastRequest(); + } + } + /** * Check if wrapper has service *