PayPal\Api\Patch::setValue PHP Method

setValue() public method

New value to apply based on the operation.
public setValue ( mixed $value )
$value mixed
    public function setValue($value)
    {
        $this->value = $value;
        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::setValue