src/EB/SDK/Webhook/Webhook.php
public function post(Payload $payload, $endpoint)
    {
        if (! Type::isValidWebhookType($payload->getAction())) {
            throw new \Exception(sprintf('Webhook "%s" isn\'t valid', $payload->getAction()));
        }

        $requestContent = [
            'headers' => ['Content-Type' => 'application/json'],
            'body'    => json_encode($payload),
            'timeout' => self::DEFAULT_REQUEST_TIMEOUT
        ];

        return $this->guzzleClient->post($endpoint, $requestContent);
    }
public function post(Payload $payload, $endpoint)
    {
        if (! Type::isValidWebhookType($payload->getAction())) {
            throw new \Exception(sprintf('Webhook "%s" isn\'t valid', $payload->getAction()));
        }

        $requestContent = [
            'headers' => ['Content-Type' => 'application/json'],
            'body'    => json_encode($payload),
            'timeout' => self::DEFAULT_REQUEST_TIMEOUT
        ];

        return $this->guzzleClient->post($endpoint, $requestContent);
    }
public function post ( Payload $ payload , $ endpoint ) { if ( ! Type :: isValidWebhookType ( $ payload -> getAction ( ) ) ) { throw new \ Exception ( sprintf ( 'Webhook "%s" isn\'t valid' , $ payload -> getAction ( ) ) ) ; } $ requestContent = [ 'headers' => [ 'Content-Type' => 'application/json' ] , 'body' => json_encode ( $ payload ) , 'timeout' => self :: DEFAULT_REQUEST_TIMEOUT ] ; return $ this -> guzzleClient -> post ( $ endpoint , $ requestContent ) ; }
Makes a request identical to the Emailbidding webhook event

@param Payload $payload The Emailbidding payload
@param string  $endpoint The endpoint where to the Emailbidding payload should be sent

@return \Psr\Http\Message\ResponseInterface
@throws \Exception An exception if the payload has errors
Makes a request identical to the Emailbidding webhook event