/** * @depends testSerializationDeserialization * @param WebhookEventList $obj */ public function testGetters($obj) { $this->assertEquals($obj->getEvents(), WebhookEventTest::getObject()); $this->assertEquals($obj->getCount(), 123); $this->assertEquals($obj->getLinks(), LinksTest::getObject()); }
/** * Retrieves the list of Webhooks events resources for the application associated with token. The developers can use it to see list of past webhooks events. * * @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 WebhookEventList */ public static function all($params, $apiContext = null, $restCall = null) { ArgumentValidator::validate($params, 'params'); $payLoad = ""; $allowedParams = array('page_size' => 1, 'start_time' => 1, 'end_time' => 1); $json = self::executeCall("/v1/notifications/webhooks-events" . "?" . http_build_query(array_intersect_key($params, $allowedParams)), "GET", $payLoad, null, $apiContext, $restCall); $ret = new WebhookEventList(); $ret->fromJson($json); return $ret; }