src/authnet/AuthnetWebhooksRequest.php
public function updateWebhook($webhookId, $webhookUrl, Array $eventTypes, $status = 'active')
    {
        $this->endpoint = 'webhooks';
        $this->url = sprintf('%s%s/%s', $this->url, $this->endpoint, $webhookId);
        $request = [
            'url'        => $webhookUrl,
            'eventTypes' => $eventTypes,
            'status'     => $status
        ];
        $this->requestJson = json_encode($request);
        $response = $this->put($this->url, $this->requestJson);
        return new AuthnetWebhooksResponse($response);
    }
public function updateWebhook($webhookId, $webhookUrl, Array $eventTypes, $status = 'active')
    {
        $this->endpoint = 'webhooks';
        $this->url = sprintf('%s%s/%s', $this->url, $this->endpoint, $webhookId);
        $request = [
            'url'        => $webhookUrl,
            'eventTypes' => $eventTypes,
            'status'     => $status
        ];
        $this->requestJson = json_encode($request);
        $response = $this->put($this->url, $this->requestJson);
        return new AuthnetWebhooksResponse($response);
    }
public function updateWebhook ( $ webhookId , $ webhookUrl , Array $ eventTypes , $ status = 'active' ) { $ this -> endpoint = 'webhooks' ; $ this -> url = sprintf ( '%s%s/%s' , $ this -> url , $ this -> endpoint , $ webhookId ) ; $ request = [ 'url' => $ webhookUrl , 'eventTypes' => $ eventTypes , 'status' => $ status ] ; $ this -> requestJson = json_encode ( $ request ) ; $ response = $ this -> put ( $ this -> url , $ this -> requestJson ) ; return new AuthnetWebhooksResponse ( $ response ) ; }
Updates webhook event types

@param   array   $webhookId      Webhook ID to be modified
@param   string  $webhookUrl     URL of where webhook notifications will be sent
@param   array   $eventTypes     Array of event types to be added/removed
@param   string  $status         Status of webhooks to be modified [active/inactive]
@return  \JohnConde\Authnet\AuthnetWebhooksResponse
@throws  \JohnConde\Authnet\AuthnetInvalidJsonException
@throws  \JohnConde\Authnet\AuthnetCurlException
Updates webhook event types