Client/YooChooseNotifier.php
protected function notify(array $events)
    {
        $this->logger->debug(sprintf('POST notification to Recommendation Service: %s', json_encode($events, true)));

        $data = array(
            'json' => array(
                'transaction' => null,
                'events' => $events,
            ),
            'auth' => array(
                $this->options['customer-id'],
                $this->options['license-key'],
            ),
        );

        if (method_exists($this->guzzle, 'post')) {
            $this->notifyGuzzle5($data);
        } else {
            $this->notifyGuzzle6($data);
        }
    }
protected function notify(array $events)
    {
        $this->logger->debug(sprintf('POST notification to Recommendation Service: %s', json_encode($events, true)));

        $data = array(
            'json' => array(
                'transaction' => null,
                'events' => $events,
            ),
            'auth' => array(
                $this->options['customer-id'],
                $this->options['license-key'],
            ),
        );

        if (method_exists($this->guzzle, 'post')) {
            $this->notifyGuzzle5($data);
        } else {
            $this->notifyGuzzle6($data);
        }
    }
protected function notify ( array $ events ) { $ this -> logger -> debug ( sprintf ( 'POST notification to Recommendation Service: %s' , json_encode ( $ events , true ) ) ) ; $ data = array ( 'json' => array ( 'transaction' => null , 'events' => $ events , ) , 'auth' => array ( $ this -> options [ 'customer-id' ] , $ this -> options [ 'license-key' ] , ) , ) ; if ( method_exists ( $ this -> guzzle , 'post' ) ) { $ this -> notifyGuzzle5 ( $ data ) ; } else { $ this -> notifyGuzzle6 ( $ data ) ; } }
Notifies the Recommendation Service API of one or more repository events.

A repository event is defined as an array with three keys:
- action: the event name (update, delete)
- uri: the event's target, as an absolute HTTP URI to the REST resource
- contentTypeId: currently processed ContentType ID

@param array $events

@throws \InvalidArgumentException If provided $events seems to be of wrong type
@throws \GuzzleHttp\Exception\RequestException if a request error occurs
Notifies the Recommendation Service API of one or more repository events .