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; + } +}