GetAccount.php in SendinBlue 7.2
File
includes/Model/GetAccount.php
View source
<?php
class GetAccount {
public $email;
public $firstName;
public $lastName;
public $companyName;
public $address;
public $plan = [];
public function __construct($data = []) {
$this
->setEmail($data['email']);
$this
->setFirstName($data['firstName']);
$this
->setLastName($data['lastName']);
$this
->setCompanyName($data['companyName']);
if (!empty($data['address'])) {
$address = new GetExtendedClientAddress($data['address']);
$this
->setAddress($address);
}
if (!empty($data['plan'])) {
foreach ($data['plan'] as $plan) {
$accountPlan = new GetAccountPlan($plan);
$this
->addPlan($accountPlan);
}
}
}
public function getEmail() {
return $this->email;
}
public function setEmail($email) {
$this->email = $email;
}
public function getFirstName() {
return $this->firstName;
}
public function setFirstName($firstName) {
$this->firstName = $firstName;
}
public function getLastName() {
return $this->lastName;
}
public function setLastName($lastName) {
$this->lastName = $lastName;
}
public function getCompanyName() {
return $this->companyName;
}
public function setCompanyName($companyName) {
$this->companyName = $companyName;
}
public function getAddress() {
return $this->address;
}
public function setAddress($address) {
$this->address = $address;
}
public function getPlan() {
return $this->plan;
}
public function addPlan($plan) {
$this->plan[] = $plan;
}
}