PHP Class PayPal\Api\PatchRequest

A JSON patch request.
Inheritance: extends PayPal\Common\PayPalModel
Show file Open project: paypal/rest-api-sdk-php Class Usage Examples

Public Methods

Method Description
addPatch ( Patch $patch ) Append Patches to the list.
getPatches ( ) : Patch[] Placeholder for holding array of patch objects
removePatch ( Patch $patch ) Remove Patches from the list.
setPatches ( Patch[] $patches ) Placeholder for holding array of patch objects
toJSON ( integer $options ) : mixed | string As PatchRequest holds the array of Patch object, we would override the json conversion to return a json representation of array of Patch objects.

Method Details

addPatch() public method

Append Patches to the list.
public addPatch ( Patch $patch )
$patch Patch

getPatches() public method

Placeholder for holding array of patch objects
public getPatches ( ) : Patch[]
return Patch[]

removePatch() public method

Remove Patches from the list.
public removePatch ( Patch $patch )
$patch Patch

setPatches() public method

Placeholder for holding array of patch objects
public setPatches ( Patch[] $patches )
$patches Patch[]

toJSON() public method

As PatchRequest holds the array of Patch object, we would override the json conversion to return a json representation of array of Patch objects.
public toJSON ( integer $options ) : mixed | string
$options integer
return mixed | string