/// <summary> /// Identity constructor /// </summary> /// <param name="user"></param> public Identity(BusinessUser user) { if (user != null) { this.IdentityAliasOption = IdentityAlias.EIN; this.IdentityValue = user.IdentityValue; } }
/// <summary> /// If user is not null, set user values in the Entity object /// </summary> /// <param name="user"></param> public Entity(BusinessUser user) { if (user != null) { EntityName = user.EntityName; BusinessType = user.BusinessType; BusinessTypeUuid = user.BusinessTypeUuid; BusinessWebsite = user.BusinessWebsite; DoingBusinessAs = user.DoingBusinessAs; NaicsCode = user.NaicsCode; Type = user.Type ?? "business"; } }
/// <summary> /// If user and appHandle are not null, set user values in the differents object /// </summary> /// <param name="user"></param> /// <param name="appHandle"></param> public EntityMsg(BusinessUser user, string appHandle) { if (user != null && appHandle != null) { SetCommonFields(user, appHandle); if (user.IdentityValue != null) { Identity = new Identity(user); } if (user.EntityName != null || user.Type != null || user.BusinessType != null || user.BusinessWebsite != null || user.DoingBusinessAs != null || user.NaicsCode.HasValue || user.BusinessTypeUuid != null) { Entity = new Entity(user); } } }