mirror of
https://gh.wpcy.net/https://github.com/ztersinc/freescout-clickup-module.git
synced 2026-04-17 19:22:21 +08:00
27 lines
No EOL
585 B
PHP
27 lines
No EOL
585 B
PHP
<?php
|
|
|
|
namespace Modules\ClickupIntegration\Entities;
|
|
|
|
class Group
|
|
{
|
|
public string $id;
|
|
public string $name;
|
|
public string $avatarUrl;
|
|
|
|
/**
|
|
* Hydrates an entity with the required data for the integration
|
|
*
|
|
* @param array $data
|
|
* @return Group
|
|
*/
|
|
public static function hydrate(array $data)
|
|
{
|
|
$instance = new static;
|
|
|
|
$instance->id = $data['id'] ?? '';
|
|
$instance->name = $data['name'] ?? '';
|
|
$instance->avatarUrl = $data['avatar']['attachment']['thumbnail_small'] ?? '';
|
|
|
|
return $instance;
|
|
}
|
|
} |