PayPal\Api\Patch::setPath PHP Method

setPath() public method

A JSON pointer that references a location in the target document where the operation is performed. A string value.
public setPath ( string $path )
$path string
    public function setPath($path)
    {
        $this->path = $path;
        return $this;
    }

Usage Example

 /**
  * @depends testGet
  * @param $agreement Agreement
  */
 public function testUpdate($agreement)
 {
     /** @var Patch[] $request */
     $request = $this->operation['request']['body'][0];
     $patch = new Patch();
     $patch->setOp($request['op']);
     $patch->setPath($request['path']);
     $patch->setValue($request['value']);
     $patches = array();
     $patches[] = $patch;
     $patchRequest = new PatchRequest();
     $patchRequest->setPatches($patches);
     $result = $agreement->update($patchRequest, $this->apiContext, $this->mockPayPalRestCall);
     $this->assertTrue($result);
 }
All Usage Examples Of PayPal\Api\Patch::setPath