You are here

public function GetAttributesAttributes::__construct in SendinBlue 7.2

GetAttributesAttributes constructor.

Parameters

array $data:

File

includes/Model/GetAttributesAttributes.php, line 31

Class

GetAttributesAttributes
Class GetAttributesAttributes.

Code

public function __construct($data = []) {
  $this->name = $data['name'];
  $this->type = $data['type'] ?? NULL;
  $this->category = $data['category'];
  if (!empty($data['calculatedValue'])) {
    $this->calculatedValue = $data['calculatedValue'];
  }
  if (!empty($data['enumeration'])) {
    foreach ($data['enumeration'] as $enumeration) {
      $this->enumeration[] = new GetAttributesEnumeration($enumeration);
    }
  }
}