get() public static method

Retrieves the Webhooks event resource identified by event_id. Can be used to retrieve the payload for an event.
public static get ( string $eventId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : WebhookEvent
$eventId string
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
return WebhookEvent
 /**
  * @dataProvider mockProvider
  * @param WebhookEvent $obj
  */
 public function testGet($obj, $mockApiContext)
 {
     $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(WebhookEventTest::getJson()));
     $result = $obj->get("eventId", $mockApiContext, $mockPayPalRestCall);
     $this->assertNotNull($result);
 }