You are here

public function SendinblueApiV2::createUpdateUser in SendinBlue 8

Same name and namespace in other branches
  1. 8.2 src/Tools/Api/SendinblueApiV2.php \Drupal\sendinblue\Tools\Api\SendinblueApiV2::createUpdateUser()

Create and update user.

Parameters

string $email: An email address of user.

array $attributes: An attributes to update.

array $blacklisted: An array of black user.

string $listid: A new listid.

string $listid_unlink: A link unlink.

Overrides SendInBlueApiInterface::createUpdateUser

File

src/Tools/Api/SendinblueApiV2.php, line 259

Class

SendinblueApiV2
Sendinblue REST client.

Namespace

Drupal\sendinblue\Tools\Api

Code

public function createUpdateUser($email, array $attributes = [], array $blacklisted = [], $listid = '', $listid_unlink = '') {
  $this->sIBHttpClient
    ->post("user/createdituser", Json::encode([
    "email" => $email,
    "attributes" => $attributes,
    "blacklisted" => $blacklisted,
    "listid" => $listid,
    "listid_unlink" => $listid_unlink,
  ]));
}