|
| 1 | +<?php |
| 2 | +namespace QuickBooksOnline\API\WebhooksService; |
| 3 | + |
| 4 | +/** |
| 5 | + * POJO Class for CloudEvents-based webhook event item |
| 6 | + */ |
| 7 | +class WebhooksCloudEvent |
| 8 | +{ |
| 9 | + /** |
| 10 | + * The CloudEvents specification version |
| 11 | + * |
| 12 | + * @var string |
| 13 | + */ |
| 14 | + private $specVersion; |
| 15 | + |
| 16 | + /** |
| 17 | + * Unique identifier for the event |
| 18 | + * |
| 19 | + * @var string |
| 20 | + */ |
| 21 | + private $id; |
| 22 | + |
| 23 | + /** |
| 24 | + * The source of the event |
| 25 | + * |
| 26 | + * @var string |
| 27 | + */ |
| 28 | + private $source; |
| 29 | + |
| 30 | + /** |
| 31 | + * The type of event |
| 32 | + * |
| 33 | + * @var string |
| 34 | + */ |
| 35 | + private $type; |
| 36 | + |
| 37 | + /** |
| 38 | + * The content type of the data |
| 39 | + * |
| 40 | + * @var string |
| 41 | + */ |
| 42 | + private $dataContentType; |
| 43 | + |
| 44 | + /** |
| 45 | + * The timestamp of the event |
| 46 | + * |
| 47 | + * @var string |
| 48 | + */ |
| 49 | + private $time; |
| 50 | + |
| 51 | + /** |
| 52 | + * Intuit entity ID |
| 53 | + * |
| 54 | + * @var string |
| 55 | + */ |
| 56 | + private $intuitEntityId; |
| 57 | + |
| 58 | + /** |
| 59 | + * Intuit account ID |
| 60 | + * |
| 61 | + * @var string |
| 62 | + */ |
| 63 | + private $intuitAccountId; |
| 64 | + |
| 65 | + /** |
| 66 | + * The event data payload |
| 67 | + * |
| 68 | + * @var array |
| 69 | + */ |
| 70 | + private $data; |
| 71 | + |
| 72 | + /** |
| 73 | + * Get the CloudEvents specification version |
| 74 | + * |
| 75 | + * @return string |
| 76 | + */ |
| 77 | + public function getSpecVersion() |
| 78 | + { |
| 79 | + return $this->specVersion; |
| 80 | + } |
| 81 | + |
| 82 | + /** |
| 83 | + * Set the CloudEvents specification version |
| 84 | + * |
| 85 | + * @param string $specVersion |
| 86 | + * @return $this |
| 87 | + */ |
| 88 | + public function setSpecVersion($specVersion) |
| 89 | + { |
| 90 | + $this->specVersion = $specVersion; |
| 91 | + return $this; |
| 92 | + } |
| 93 | + |
| 94 | + /** |
| 95 | + * Get the event ID |
| 96 | + * |
| 97 | + * @return string |
| 98 | + */ |
| 99 | + public function getId() |
| 100 | + { |
| 101 | + return $this->id; |
| 102 | + } |
| 103 | + |
| 104 | + /** |
| 105 | + * Set the event ID |
| 106 | + * |
| 107 | + * @param string $id |
| 108 | + * @return $this |
| 109 | + */ |
| 110 | + public function setId($id) |
| 111 | + { |
| 112 | + $this->id = $id; |
| 113 | + return $this; |
| 114 | + } |
| 115 | + |
| 116 | + /** |
| 117 | + * Get the event source |
| 118 | + * |
| 119 | + * @return string |
| 120 | + */ |
| 121 | + public function getSource() |
| 122 | + { |
| 123 | + return $this->source; |
| 124 | + } |
| 125 | + |
| 126 | + /** |
| 127 | + * Set the event source |
| 128 | + * |
| 129 | + * @param string $source |
| 130 | + * @return $this |
| 131 | + */ |
| 132 | + public function setSource($source) |
| 133 | + { |
| 134 | + $this->source = $source; |
| 135 | + return $this; |
| 136 | + } |
| 137 | + |
| 138 | + /** |
| 139 | + * Get the event type |
| 140 | + * |
| 141 | + * @return string |
| 142 | + */ |
| 143 | + public function getType() |
| 144 | + { |
| 145 | + return $this->type; |
| 146 | + } |
| 147 | + |
| 148 | + /** |
| 149 | + * Set the event type |
| 150 | + * |
| 151 | + * @param string $type |
| 152 | + * @return $this |
| 153 | + */ |
| 154 | + public function setType($type) |
| 155 | + { |
| 156 | + $this->type = $type; |
| 157 | + return $this; |
| 158 | + } |
| 159 | + |
| 160 | + /** |
| 161 | + * Get the data content type |
| 162 | + * |
| 163 | + * @return string |
| 164 | + */ |
| 165 | + public function getDataContentType() |
| 166 | + { |
| 167 | + return $this->dataContentType; |
| 168 | + } |
| 169 | + |
| 170 | + /** |
| 171 | + * Set the data content type |
| 172 | + * |
| 173 | + * @param string $dataContentType |
| 174 | + * @return $this |
| 175 | + */ |
| 176 | + public function setDataContentType($dataContentType) |
| 177 | + { |
| 178 | + $this->dataContentType = $dataContentType; |
| 179 | + return $this; |
| 180 | + } |
| 181 | + |
| 182 | + /** |
| 183 | + * Get the event timestamp |
| 184 | + * |
| 185 | + * @return string |
| 186 | + */ |
| 187 | + public function getTime() |
| 188 | + { |
| 189 | + return $this->time; |
| 190 | + } |
| 191 | + |
| 192 | + /** |
| 193 | + * Set the event timestamp |
| 194 | + * |
| 195 | + * @param string $time |
| 196 | + * @return $this |
| 197 | + */ |
| 198 | + public function setTime($time) |
| 199 | + { |
| 200 | + $this->time = $time; |
| 201 | + return $this; |
| 202 | + } |
| 203 | + |
| 204 | + /** |
| 205 | + * Get the Intuit entity ID |
| 206 | + * |
| 207 | + * @return string |
| 208 | + */ |
| 209 | + public function getIntuitEntityId() |
| 210 | + { |
| 211 | + return $this->intuitEntityId; |
| 212 | + } |
| 213 | + |
| 214 | + /** |
| 215 | + * Set the Intuit entity ID |
| 216 | + * |
| 217 | + * @param string $intuitEntityId |
| 218 | + * @return $this |
| 219 | + */ |
| 220 | + public function setIntuitEntityId($intuitEntityId) |
| 221 | + { |
| 222 | + $this->intuitEntityId = $intuitEntityId; |
| 223 | + return $this; |
| 224 | + } |
| 225 | + |
| 226 | + /** |
| 227 | + * Get the Intuit account ID |
| 228 | + * |
| 229 | + * @return string |
| 230 | + */ |
| 231 | + public function getIntuitAccountId() |
| 232 | + { |
| 233 | + return $this->intuitAccountId; |
| 234 | + } |
| 235 | + |
| 236 | + /** |
| 237 | + * Set the Intuit account ID |
| 238 | + * |
| 239 | + * @param string $intuitAccountId |
| 240 | + * @return $this |
| 241 | + */ |
| 242 | + public function setIntuitAccountId($intuitAccountId) |
| 243 | + { |
| 244 | + $this->intuitAccountId = $intuitAccountId; |
| 245 | + return $this; |
| 246 | + } |
| 247 | + |
| 248 | + /** |
| 249 | + * Get the event data payload |
| 250 | + * |
| 251 | + * @return array |
| 252 | + */ |
| 253 | + public function getData() |
| 254 | + { |
| 255 | + return $this->data; |
| 256 | + } |
| 257 | + |
| 258 | + /** |
| 259 | + * Set the event data payload |
| 260 | + * |
| 261 | + * @param array $data |
| 262 | + * @return $this |
| 263 | + */ |
| 264 | + public function setData($data) |
| 265 | + { |
| 266 | + $this->data = $data; |
| 267 | + return $this; |
| 268 | + } |
| 269 | +} |
0 commit comments