PayPal\Api\PatchRequest::setPatches PHP Méthode

setPatches() public méthode

Placeholder for holding array of patch objects
public setPatches ( Patch[] $patches )
$patches Patch[]
    public function setPatches($patches)
    {
        $this->patches = $patches;
        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\PatchRequest::setPatches