Replaces webhook fields with new values. Pass a json_patch object with replace operation and path, which is /url for a URL or /event_types for events. The value is either the URL or a list of events.
public update ( |
||
$patchRequest | ||
$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 |
Результат |
/** * @dataProvider mockProvider * @param Webhook $obj */ public function testUpdate($obj, $mockApiContext) { $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(self::getJson())); $patchRequest = PatchRequestTest::getObject(); $result = $obj->update($patchRequest, $mockApiContext, $mockPayPalRestCall); $this->assertNotNull($result); }