public function registerClient(Domain $domain, RegisterClient $request): JsonResource 	{ 		$oAuthData = []; 		$oAuthUser = null; 		$oAuthDriver = (string) $request->oauth_driver;  		if ($oAuthDriver && ($oAuthUser = $this->getOAuthUserFromToken($oAuthDriver, $request->oauth_token))) { 			$oAuthData = [ 				$oAuthDriver => $oAuthUser->getId(), 			]; 		}  		$user = $domain->clients()->create([ 			'address' => $request->address, 			'vat_number' => $request->vat_number, 			'contact_first_name' => $request->contact_first_name, 			'contact_last_name' => $request->contact_last_name, 			'contact_phone_number' => $request->contact_phone_number, 			'industry_id' => $request->industry_id, 			'core_business' => $request->core_business, 			'company_size' => $request->enum('company_size', CompanySize::class), 			'default_language' => $request->enum('default_language', DomainLanguages::class), 		])->authParent()->create([ 			'active' => false, 			'name' => $request->name, 			'email' => $request->email, 			'password' => $request->password, 			'role_id' => setting('registration_api_role_id'), 			'email_verified_at' => $oAuthUser && !strcasecmp($oAuthUser->getEmail(), $request->email) ? formatTimestamp() : null, 			...$oAuthData, 		]);  		return $user->getModelResource(); 	}