You are here

public function SendinblueMailin::updateSendinblueMailin in SendinBlue 7.2

Change Class Class in function of API version.

Parameters

string $accessKey: The SiB access key.

Return value

SendInBlueApiInterface SendInBlueApiInterface (V2 or V3)

1 call to SendinblueMailin::updateSendinblueMailin()
SendinblueMailin::__construct in includes/sendinblue.mailin.php

File

includes/sendinblue.mailin.php, line 68
Rest class file.

Class

SendinblueMailin
Sendinblue REST client.

Code

public function updateSendinblueMailin($accessKey) {
  if ($this
    ->getApiVersion($accessKey) === self::SENDINBLUE_API_VERSION_V3) {
    $this->sendinblueMailin = $this->sendinblueApiV3;
  }
  else {
    $this->sendinblueMailin = $this->sendinblueApiV2;
  }
  $this->sendinblueMailin
    ->setApiKey($accessKey);
  return $this->sendinblueMailin;
}