List of webhooks.
Наследование: extends PayPal\Common\PayPalModel
Пример #1
0
 /**
  * Retrieves all Webhooks for the application associated with access token.
  *
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return WebhookList
  */
 public static function getAll($apiContext = null, $restCall = null)
 {
     $payLoad = "";
     $json = self::executeCall("/v1/notifications/webhooks", "GET", $payLoad, null, $apiContext, $restCall);
     $ret = new WebhookList();
     $ret->fromJson($json);
     return $ret;
 }
Пример #2
0
 /**
  * Lists all webhooks for an app.
  *
  * @param array $params
  * @param ApiContext $apiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
  * @param PayPalRestCall $restCall is the Rest Call Service that is used to make rest calls
  * @return WebhookList
  */
 public static function getAllWithParams($params = array(), $apiContext = null, $restCall = null)
 {
     ArgumentValidator::validate($params, 'params');
     $payLoad = "";
     $allowedParams = array('anchor_type' => 1);
     $json = self::executeCall("/v1/notifications/webhooks?" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad, null, $apiContext, $restCall);
     $ret = new WebhookList();
     $ret->fromJson($json);
     return $ret;
 }
Пример #3
0
 /**
  * @depends testSerializationDeserialization
  * @param WebhookList $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getWebhooks(), WebhookTest::getObject());
 }