public function __construct(Payload $payload) { $this->data = $payload; if ($this->getReturnCode() == static::RETURN_CODE_LEAD_NOT_FOUND) { throw new LeadNotFoundException($this, $this->getDescription()); } parent::__construct($payload); }
public function __construct(Payload $payload) { $this->data = $payload; if ($this->getReturnCode() == static::RETURN_CODE_EMAIL_ALREADY_EXISTS) { throw new EmailAlreadyExistsException($this, 'Email already exists'); } parent::__construct($payload); }