public static VoiceServiceProfile NewVoiceServiceProfile(string phoneNumber, int ig, int crv, string devID) { VoiceServiceProfile data = new VoiceServiceProfile(); Phone phone = new Phone(); data.PhoneLines = new List<Phone>() { phone }; phone.Number = phoneNumber; phone.ProvisioningSpec = new PhoneProvSpec(); phone.ProvisioningSpec.InterfaceGroup = ig; phone.ProvisioningSpec.CRV = crv; phone.ProvisioningSpec.EquipmentId = devID; return data; }
public static Subscriber Simpltest1() { var loc = DefaultAddress("3001.0001"); loc.CustomFields = DefaultCustomFields_Loc(); RestoreLocation(loc); const string serial = "MRCC30010011"; var equip = RestoreEquip(new EquipmentCriteria { SerialNumber = serial, LocationId = loc.ID, Status = "ACTIVE", Model = "ONT1000M", UnitAddress = "EVRTWAXFOL2-18-4-10" }); var svcs = DefaultServices_MOCA(); var customFields = new List<CustomField> { new CustomField{Label ="Service_ID", Value=""}, new CustomField{Label = "PCAN", Value=""}, new CustomField{Label = "IP_TYPE", Value="DYNAMIC"}, new CustomField{Label = "Sub_WTN", Value="3001000103"}, }; var phones = new List<Phone> { new Phone{ Number = "3001000100", ProvisioningSpec = new PhoneProvSpec{ InterfaceGroup=1, CRV = 149, EquipmentId = serial+"P01"} } , new Phone{ Number = "3001000101", ProvisioningSpec = new PhoneProvSpec{ InterfaceGroup=1, CRV = 149, EquipmentId = serial+"P02"} } , }; var vsp = new VoiceServiceProfile { PhoneLines = phones }; var sub = new Subscriber { ID = "SIMPLTEST1", Name = "SIMPLTEST1", SubContactPhone = "3001000102", SubContactEmail = "*****@*****.**", CustomFields = customFields, Accounts = new List<Account> { new Account { PPVCap = "75.00", PPVResetDay = "5", PPVPrivilege = "2", PIN = "1234", PinRequired = true, ServiceEnabled = true, Location = loc, Equipment = equip, Services = svcs, ServiceProfiles = new List<ServiceProfile>{vsp} } } }; equip.ForEach(x => x.AssociatedSubscriberId = sub.ID); return RestoreSubscriber(sub); }