public static get ( string $webhookId, |
||
$webhookId | string | |
$apiContext | is the APIContext for this call. It can be used to pass dynamic configuration and credentials. | |
$restCall | PayPalRestCall | is the Rest Call Service that is used to make rest calls |
Résultat |
public static function get($webhookId, $apiContext = null, $restCall = null)
{
ArgumentValidator::validate($webhookId, 'webhookId');
$payLoad = "";
$json = self::executeCall("/v1/notifications/webhooks/{$webhookId}", "GET", $payLoad, null, $apiContext, $restCall);
$ret = new Webhook();
$ret->fromJson($json);
return $ret;
}
/** * @depends testCreate * @param $webhook Webhook * @return Webhook */ public function testGet($webhook) { $result = Webhook::get($webhook->getId(), $this->apiContext, $this->mockPayPalRestCall); $this->assertNotNull($result); $this->assertEquals($webhook->getId(), $result->getId()); return $result; }