PayPal\Api\Patch::setOp PHP Method

setOp() public method

Valid Values: ["add", "remove", "replace", "move", "copy", "test"]
public setOp ( string $op )
$op string
    public function setOp($op)
    {
        $this->op = $op;
        return $this;
    }

Usage Example

Exemplo n.º 1
0
 public function activateBillingPlan($planId, $apiContext)
 {
     $patch = new Patch();
     $patch->setOp('replace');
     $patch->setPath('/');
     $patch->setValue(array('state' => 'ACTIVE'));
     $patchRequest = new PatchRequest();
     $patchRequest->setPatches(array($patch));
     $plan = new Plan();
     $plan->setId($planId);
     return $plan->update($patchRequest, $apiContext);
 }
All Usage Examples Of PayPal\Api\Patch::setOp