public static availableEventTypes ( |
||
$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 |
public static function availableEventTypes($apiContext = null, $restCall = null)
{
$payLoad = "";
$json = self::executeCall("/v1/notifications/webhooks-event-types", "GET", $payLoad, null, $apiContext, $restCall);
$ret = new WebhookEventTypeList();
$ret->fromJson($json);
return $ret;
}
/** * @dataProvider mockProvider * @param WebhookEventType $obj */ public function testAvailableEventTypes($obj, $mockApiContext) { $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(WebhookEventTypeListTest::getJson())); $result = $obj->availableEventTypes($mockApiContext, $mockPayPalRestCall); $this->assertNotNull($result); }