From 3b31c407eb491120473d7cb06fe7871110b4990c Mon Sep 17 00:00:00 2001 From: Dwight Kelly Date: Thu, 23 Apr 2020 18:25:25 -0400 Subject: [PATCH] implemented InvokeAction --- src/Client.php | 12 ++++++++++++ src/Services/InvokeAction.php | 24 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 src/Services/InvokeAction.php diff --git a/src/Client.php b/src/Client.php index a2f7011..10624dd 100644 --- a/src/Client.php +++ b/src/Client.php @@ -178,6 +178,18 @@ public function report($report): ReportBuilder return new ReportBuilder($this->service('ReportService'), $report); } + /** + * Invoke an action. + * + * @param string action + * @param object|array $object + * @return \stdClass + */ + public function invokeAction($action, $object) + { + return $this->service('InvokeAction')->invokeAction($action, $object); + } + /** * Get an instance of the specified service. * diff --git a/src/Services/InvokeAction.php b/src/Services/InvokeAction.php new file mode 100644 index 0000000..a185f2d --- /dev/null +++ b/src/Services/InvokeAction.php @@ -0,0 +1,24 @@ + $key]; + + $response = $this->soap->{$action}($request); + + return (array)$response->out; + } +}