@@ 319-343 (lines=25) @@ | ||
316 | } |
|
317 | } |
|
318 | ||
319 | class CardAttribute { |
|
320 | /** |
|
321 | * @var CardAttributeValue $value @required |
|
322 | * @var string $label Valid length range: 1 - 50. |
|
323 | */ |
|
324 | public $value; |
|
325 | public $label; |
|
326 | ||
327 | /** |
|
328 | * CardAttribute constructor. |
|
329 | * |
|
330 | * @param string $value Value for the attribute |
|
331 | */ |
|
332 | public function __construct($value) |
|
333 | { |
|
334 | $this->value = new CardAttributeValue($value); |
|
335 | } |
|
336 | ||
337 | public function toArray(){ |
|
338 | $result = array(); |
|
339 | if ($this->value) $result['value'] = $this->value->toArray(); |
|
340 | if ($this->label) $result['label'] = $this->label; |
|
341 | return $result; |
|
342 | } |
|
343 | } |
|
344 | ||
345 | class CardAttributeValue { |
|
346 | /** |
|
@@ 383-408 (lines=26) @@ | ||
380 | * |
|
381 | * @package GorkaLaucirica\HipchatAPIv2Client\Model |
|
382 | */ |
|
383 | class CardActivity { |
|
384 | /** |
|
385 | * @var string $html Html for the activity to show in one line a summary of the action that happened |
|
386 | * Valid length range: 1 - unlimited. @required |
|
387 | * @var CardIcon $icon |
|
388 | */ |
|
389 | public $html; |
|
390 | public $icon; |
|
391 | ||
392 | /** |
|
393 | * CardActivity constructor. |
|
394 | * |
|
395 | * @param string $html Html for the activity to show in one line a summary of the action that happened |
|
396 | */ |
|
397 | public function __construct($html) |
|
398 | { |
|
399 | $this->html = $html; |
|
400 | } |
|
401 | ||
402 | public function toArray(){ |
|
403 | $result = array(); |
|
404 | if ($this->html) $result['html'] = $this->html; |
|
405 | if ($this->icon) $result['icon'] = $this->icon->toArray(); |
|
406 | return $result; |
|
407 | } |
|
408 | } |
|
409 | ||
410 | /** |
|
411 | * An object with the following properties. |