Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing attributes failed on \Brevo\Client\Model\CreateContact() #37

Open
draghetto84 opened this issue Aug 19, 2024 · 0 comments
Open

Comments

@draghetto84
Copy link

When I put attributes on CreateContact instance they're skipped and not imported.
Following my partial code:

$attribs = new \stdClass();
$attribs->FNAME = "Roger";
$attribs->LNAME = "White";

$createContact = new \Brevo\Client\Model\CreateContact();
$createContact->setEmail('[email protected]');
$createContact->setListIds([2]);
$createContact->setAttributes($attribs);
$createContact->setUpdateEnabled (true);

try {
$result = $apiInstance->createContact($createContact);
print_r($result);
} catch (Exception $e) {
print_r($e);
echo 'Exception when calling ContactsApi->createContact: ', $e->getMessage(), PHP_EOL;
}

the contact creation was successfully but without attributes. I only see the email in Brevo dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant