You are here

public function GetAccountPlan::__construct in SendinBlue 7.2

GetAccount constructor.

File

includes/Model/GetAccountPlan.php, line 30

Class

GetAccountPlan

Code

public function __construct($data = []) {
  $this
    ->setType($data['type']);
  $this
    ->setCreditsType($data['creditsType']);
  $this
    ->setCredits($data['credits']);
  if (!empty($data['startDate'])) {
    $this
      ->setStartDate(new \DateTime($data['startDate']));
  }
  if (!empty($data['endDate'])) {
    $this
      ->setEndDate(new \DateTime($data['endDate']));
  }
  if (!empty($data['userLimit'])) {
    $this
      ->setUserLimit($data['userLimit']);
  }
}