Ejemplo n.º 1
0
 public function createWebhook(Webhook $webhook)
 {
     $command = $this->getCommand('CreateWebhook', array('create_webhook' => array('name' => $webhook->getName(), 'callbackUrl' => $webhook->getCallbackUrl(), 'listenedEvents' => $webhook->getListenedEvents(), 'listenedSources' => $webhook->getListenedSources())));
     $savedWebhook = $this->execute($command);
     $webhook->setId($savedWebhook->getId());
     return $webhook;
 }
 public function testGetWebhookCallReturnsCorrectData()
 {
     $webhook = new Webhook();
     $webhook->setId('00000000-0000-0000-0000-000000000000');
     $this->setMockResponse($this->client, array('webhooks/getWebhookCall'));
     $webhookCall = $this->client->getWebhookCall($webhook, '00000000-0000-0000-0000-000000000000');
     $this->assertInstanceOf('\\Mgrt\\Model\\WebhookCall', $webhookCall);
 }