1 <?php
2
3 namespace PayPal\Api;
4
5 use PayPal\Common\PayPalModel;
6
7 /**
8 * Class Patch
9 *
10 * A JSON patch object that you can use to apply partial updates to resources.
11 *
12 * @package PayPal\Api
13 *
14 * @property string op
15 * @property string path
16 * @property mixed value
17 * @property string from
18 */
19 class Patch extends PayPalModel
20 {
21 /**
22 * The operation to perform.
23 * Valid Values: ["add", "remove", "replace", "move", "copy", "test"]
24 *
25 * @param string $op
26 *
27 * @return $this
28 */
29 public function setOp($op)
30 {
31 $this->op = $op;
32 return $this;
33 }
34
35 /**
36 * The operation to perform.
37 *
38 * @return string
39 */
40 public function getOp()
41 {
42 return $this->op;
43 }
44
45 /**
46 * A JSON pointer that references a location in the target document where the operation is performed. A `string` value.
47 *
48 * @param string $path
49 *
50 * @return $this
51 */
52 public function setPath($path)
53 {
54 $this->path = $path;
55 return $this;
56 }
57
58 /**
59 * A JSON pointer that references a location in the target document where the operation is performed. A `string` value.
60 *
61 * @return string
62 */
63 public function getPath()
64 {
65 return $this->path;
66 }
67
68 /**
69 * New value to apply based on the operation.
70 *
71 * @param mixed $value
72 *
73 * @return $this
74 */
75 public function setValue($value)
76 {
77 $this->value = $value;
78 return $this;
79 }
80
81 /**
82 * New value to apply based on the operation.
83 *
84 * @return mixed
85 */
86 public function getValue()
87 {
88 return $this->value;
89 }
90
91 /**
92 * A string containing a JSON Pointer value that references the location in the target document to move the value from.
93 *
94 * @param string $from
95 *
96 * @return $this
97 */
98 public function setFrom($from)
99 {
100 $this->from = $from;
101 return $this;
102 }
103
104 /**
105 * A string containing a JSON Pointer value that references the location in the target document to move the value from.
106 *
107 * @return string
108 */
109 public function getFrom()
110 {
111 return $this->from;
112 }
113
114 }
115