Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
24 changes: 24 additions & 0 deletions src/Services/InvokeAction.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace Pace\Services;

use Pace\Service;

class InvokeAction extends Service
{
/**
* Invoke action.
*
* @param string $action
* @param array $attributes
* @return array
*/
public function invokeAction($action, $key)
{
$request = ['in0' => $key];

$response = $this->soap->{$action}($request);

return (array)$response->out;
}
}