public function SendinblueApiV2::getAttributes in SendinBlue 7.2
Get attribute by type.
Return value
GetAttributes An array of attributes.
Overrides SendInBlueApiInterface::getAttributes
File
- includes/
Api/ SendinblueApiV2.php, line 226
Class
- SendinblueApiV2
- Sendinblue REST client.
Code
public function getAttributes() {
$sibAttributes = $this->sIBHttpClient
->get("attribute/", "");
$attributes['attributes'] = [];
foreach ($sibAttributes['data']['normal_attributes'] as $attribute) {
$attributes['attributes'][] = [
'name' => $attribute['name'],
'type' => $attribute['type'],
'category' => 'normal',
];
}
return new GetAttributes($attributes);
}