Ejemplo n.º 1
0
 /**
  * Create a new WebHook.
  *
  * @param WebHook $webHook
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param BlockCypherRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return WebHook
  */
 public function create(WebHook $webHook, $apiContext = null, $restCall = null)
 {
     $payLoad = $webHook->toJSON();
     $chainUrlPrefix = $this->getChainUrlPrefix($apiContext);
     $json = $this->executeCall("{$chainUrlPrefix}/hooks", "POST", $payLoad, null, $apiContext, $restCall);
     $webHook->fromJson($json);
     return $webHook;
 }