PayPal\Api\Webhook::get PHP Method

get() public static method

Shows details for a webhook, by ID.
public static get ( string $webhookId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : Webhook
$webhookId string
$apiContext PayPal\Rest\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
return Webhook
    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;
    }

Usage Example

 /**
  * @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;
 }
All Usage Examples Of PayPal\Api\Webhook::get