public override int GetHashCode() { int result = 1; result = (result * 397) ^ (AltEmailAddress != null ? AltEmailAddress.GetHashCode() : 0); result = (result * 397) ^ (AltTelephoneContact != null ? AltTelephoneContact.GetHashCode() : 0); result = (result * 397) ^ (CreatedOn != null ? CreatedOn.GetHashCode() : 0); result = (result * 397) ^ (DateOfBirth != null ? DateOfBirth.GetHashCode() : 0); result = (result * 397) ^ (EmailAddress != null ? EmailAddress.GetHashCode() : 0); result = (result * 397) ^ (Gender != null ? Gender.GetHashCode() : 0); result = (result * 397) ^ (GivenName != null ? GivenName.GetHashCode() : 0); result = (result * 397) ^ (HomeLanguage != null ? HomeLanguage.GetHashCode() : 0); result = (result * 397) ^ Id.GetHashCode(); result = (result * 397) ^ (LastModified != null ? LastModified.GetHashCode() : 0); result = (result * 397) ^ (MaritalStatus != null ? MaritalStatus.GetHashCode() : 0); result = (result * 397) ^ (NextOfKinAddress != null ? NextOfKinAddress.GetHashCode() : 0); result = (result * 397) ^ (NextOfKinContact != null ? NextOfKinContact.GetHashCode() : 0); result = (result * 397) ^ (NextOfKinName != null ? NextOfKinName.GetHashCode() : 0); result = (result * 397) ^ (NextOfKinRelationship != null ? NextOfKinRelationship.GetHashCode() : 0); result = (result * 397) ^ (Occupation != null ? Occupation.GetHashCode() : 0); result = (result * 397) ^ (Organisation != null ? Organisation.GetHashCode() : 0); result = (result * 397) ^ (OtherName != null ? OtherName.GetHashCode() : 0); result = (result * 397) ^ (PermentAddress != null ? PermentAddress.GetHashCode() : 0); result = (result * 397) ^ (PersonOwnerType != null ? PersonOwnerType.GetHashCode() : 0); result = (result * 397) ^ (PlaceOfBirth != null ? PlaceOfBirth.GetHashCode() : 0); result = (result * 397) ^ (PostalAddress != null ? PostalAddress.GetHashCode() : 0); result = (result * 397) ^ (PreferredLanguage != null ? PreferredLanguage.GetHashCode() : 0); result = (result * 397) ^ (ProfilePhotoName != null ? ProfilePhotoName.GetHashCode() : 0); result = (result * 397) ^ (Religion != null ? Religion.GetHashCode() : 0); result = (result * 397) ^ (Surname != null ? Surname.GetHashCode() : 0); result = (result * 397) ^ (TelephoneContact != null ? TelephoneContact.GetHashCode() : 0); result = (result * 397) ^ (Title != null ? Title.GetHashCode() : 0); result = (result * 397) ^ (WebsiteUrl != null ? WebsiteUrl.GetHashCode() : 0); return(result); }
public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Vaan.Length != 0) { hash ^= Vaan.GetHashCode(); } if (postalAddress_ != null) { hash ^= PostalAddress.GetHashCode(); } if (placeOfBirth_ != null) { hash ^= PlaceOfBirth.GetHashCode(); } hash ^= naturalPersonId_.GetHashCode(); hash ^= juridicalPersonId_.GetHashCode(); if (Bic.Length != 0) { hash ^= Bic.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (FirstName != null) { hashCode = hashCode * 59 + FirstName.GetHashCode(); } if (LastName != null) { hashCode = hashCode * 59 + LastName.GetHashCode(); } if (DateOfBirth != null) { hashCode = hashCode * 59 + DateOfBirth.GetHashCode(); } if (PlaceOfBirth != null) { hashCode = hashCode * 59 + PlaceOfBirth.GetHashCode(); } if (NationalIdNumber != null) { hashCode = hashCode * 59 + NationalIdNumber.GetHashCode(); } if (NationalIdType != null) { hashCode = hashCode * 59 + NationalIdType.GetHashCode(); } return(hashCode); } }
/// <summary> /// Returns true if PersonalInfo instances are equal /// </summary> /// <param name="other">Instance of PersonalInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(PersonalInfo other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( MaidenName == other.MaidenName || MaidenName != null && MaidenName.Equals(other.MaidenName) ) && ( MaritalStatus == other.MaritalStatus || MaritalStatus != null && MaritalStatus.Equals(other.MaritalStatus) ) && ( AdditionalID == other.AdditionalID || AdditionalID != null && AdditionalID.Equals(other.AdditionalID) ) && ( PlaceOfBirth == other.PlaceOfBirth || PlaceOfBirth != null && PlaceOfBirth.Equals(other.PlaceOfBirth) ) && ( Nationality == other.Nationality || Nationality != null && Nationality.Equals(other.Nationality) ) && ( EthnicOrigin == other.EthnicOrigin || EthnicOrigin != null && EthnicOrigin.Equals(other.EthnicOrigin) ) && ( VisaRequired == other.VisaRequired || VisaRequired != null && VisaRequired.Equals(other.VisaRequired) ) && ( DisabledNo == other.DisabledNo || DisabledNo != null && DisabledNo.Equals(other.DisabledNo) ) && ( Disability == other.Disability || Disability != null && Disability.Equals(other.Disability) )); }
public void Delete(PlaceOfBirth ObjDelete) { var ObjToDelete = _context.PlaceOfBirths.SingleOrDefault(m => m.CompanyID == ObjDelete.CompanyID && m.PlaceCode == ObjDelete.PlaceCode); if (ObjToDelete != null) { _context.PlaceOfBirths.Remove(ObjToDelete); } }
public static Originator CreateOriginatorForNaturalPerson( string originatorName, VirtualAssetsAccountNumber vaan, PostalAddress postalAddress, PlaceOfBirth placeOfBirth, NaturalPersonId[] naturalPersonIds) { var originator = new Originator(originatorName, vaan.Vaan, postalAddress, placeOfBirth, naturalPersonIds, null, null); return(originator); }
public ActionResult Save() { var userId = User.Identity.GetUserId(); var UserInfo = _unitOfWork.User.GetMyInfo(userId); PlaceOfBirth Obj = new PlaceOfBirth { PlaceCode = _unitOfWork.PlaceOfBirth.GetMaxSerial(UserInfo.fCompanyId) }; return(PartialView(Obj)); }
public static Task <(VaspInformation VaspInformation, VaspContractInfo VaspContractInfo)> CreateForNaturalPersonAsync( IEthereumRpc ethereumRpc, string vaspSmartContractAddress, NaturalPersonId[] settingsNaturalPersonIds, PlaceOfBirth settingsPlaceOfBirth) { var vaspInformationBuilder = new VaspInformationBuilder(ethereumRpc); return(vaspInformationBuilder.CreateForNaturalPersonAsync(vaspSmartContractAddress, settingsNaturalPersonIds, settingsPlaceOfBirth)); }
public string Validate() { var sb = new StringBuilder(); LastName = LastName.ToSafeTrimmedString(); if (String.IsNullOrEmpty(LastName)) { sb.AppendLine(String.Format(ErrorTexts.FieldIsEmpty, Texts.LastName)); } FirstName = FirstName.ToSafeTrimmedString(); if (String.IsNullOrEmpty(FirstName)) { sb.AppendLine(String.Format(ErrorTexts.FieldIsEmpty, Texts.FirstName)); } MiddleName = MiddleName.ToSafeTrimmedString(); if (String.IsNullOrEmpty(MiddleName)) { sb.AppendLine(String.Format(ErrorTexts.FieldIsEmpty, Texts.MiddleName)); } PlaceOfBirth = PlaceOfBirth.ToSafeTrimmedString(); if (String.IsNullOrEmpty(PlaceOfBirth)) { sb.AppendLine(String.Format(ErrorTexts.FieldIsEmpty, Texts.PlaceOfBirth)); } PersonalNumber = PersonalNumber.ToSafeTrimmedString(); if (String.IsNullOrEmpty(PersonalNumber)) { sb.AppendLine(String.Format(ErrorTexts.FieldIsEmpty, Texts.PersonalNumber)); } if (DateOfBirth == DrivingLicense.MinDate) { sb.AppendLine(String.Format(ErrorTexts.FieldIsEmpty, Texts.DateOfBirth)); } var rs = PlaceOfResidence.Validate(); if (!String.IsNullOrEmpty(rs)) { sb.AppendLine(rs); } rs = Passport.Validate(); if (!String.IsNullOrEmpty(rs)) { sb.Append(rs); } return(sb.ToString()); }
public void Update(PlaceOfBirth ObjUpdate) { var ObjToUpdate = _context.PlaceOfBirths.SingleOrDefault(m => m.CompanyID == ObjUpdate.CompanyID && m.PlaceCode == ObjUpdate.PlaceCode); if (ObjToUpdate != null) { ObjToUpdate.ArabicName = ObjUpdate.ArabicName; ObjToUpdate.EnglishName = ObjUpdate.EnglishName; ObjToUpdate.InsDateTime = ObjUpdate.InsDateTime; ObjToUpdate.InsUserID = ObjUpdate.InsUserID; } }
/// <summary> /// Returns true if UserDetailsInfo instances are equal /// </summary> /// <param name="other">Instance of UserDetailsInfo to be compared</param> /// <returns>Boolean</returns> public bool Equals(UserDetailsInfo other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( LastName == other.LastName || LastName != null && LastName.Equals(other.LastName) ) && ( DateOfBirth == other.DateOfBirth || DateOfBirth != null && DateOfBirth.Equals(other.DateOfBirth) ) && ( PlaceOfBirth == other.PlaceOfBirth || PlaceOfBirth != null && PlaceOfBirth.Equals(other.PlaceOfBirth) ) && ( NationalIdNumber == other.NationalIdNumber || NationalIdNumber != null && NationalIdNumber.Equals(other.NationalIdNumber) ) && ( NationalIdType == other.NationalIdType || NationalIdType != null && NationalIdType.Equals(other.NationalIdType) ) && ( PrimaryCitizenshipId == other.PrimaryCitizenshipId || PrimaryCitizenshipId != null && PrimaryCitizenshipId.Equals(other.PrimaryCitizenshipId) ) && ( PrimaryAddressId == other.PrimaryAddressId || PrimaryAddressId != null && PrimaryAddressId.Equals(other.PrimaryAddressId) )); }
public static PlaceOfBirth MapPlaceOfBirthFromProto(ProtoPlaceOfBirth placeOfBirth) { if (placeOfBirth == null) { return(null); } Country.List.TryGetValue(placeOfBirth.CountryOfBirth, out var country); DateTime.TryParseExact(placeOfBirth.Date, "yyyyMMdd", CultureInfo.InvariantCulture, DateTimeStyles.None, out var dateOfBirth); var proto = new PlaceOfBirth(dateOfBirth, placeOfBirth.CityOfBirth, country); return(proto); }
private static SessionRequestMessage GetSessionRequestMessage() { //Should be a contract var vaspKey = EthECKey.GenerateKey(); //4Bytes var topic = "0x12345678"; //"0x" + "My Topic".GetHashCode().ToString("x"); string ecdhPubKey = "12"; var message = new Message( Guid.NewGuid().ToByteArray().ToHex(prefix: false), Guid.NewGuid().ToByteArray().ToHex(prefix: false), "1"); var handshake = new HandShakeRequest(topic, ecdhPubKey); var postalAddress = new PostalAddress( "TestingStreet", 61, "Test Address Line", "410000", "TownN", Country.List["DE"] ); var placeOfBirth = new PlaceOfBirth(DateTime.UtcNow, "TownN", Country.List["DE"]); var vaspInformation = new VaspInformation( "Test test", vaspKey.GetPublicAddress(), vaspKey.GetPubKey().ToHex(prefix: false), postalAddress, placeOfBirth, new NaturalPersonId[] { new NaturalPersonId("SomeId2", NaturalIdentificationType.AlienRegistrationNumber, Country.List["DE"]), }, new JuridicalPersonId[] { new JuridicalPersonId("SomeId1", JuridicalIdentificationType.BankPartyIdentification, Country.List["DE"]), }, "DEUTDEFF"); var request = new SessionRequestMessage(message, handshake, vaspInformation) { Comment = "This is test message", }; return(request); }
public static ProtoPlaceOfBirth MapPlaceOfBirthToProto(PlaceOfBirth placeOfBirth) { if (placeOfBirth == null) { return(null); } var proto = new ProtoPlaceOfBirth() { CityOfBirth = placeOfBirth.CityOfBirth, CountryOfBirth = placeOfBirth.CountryOfBirth.TwoLetterCode, Date = placeOfBirth.DateOfBirth.ToString("yyyyMMdd", CultureInfo.InvariantCulture) }; return(proto); }
public override int GetHashCode() { unchecked { const int randomPrime = 397; int hashCode = Id.GetHashCode(); hashCode = (hashCode * randomPrime) ^ (AuthorName != null ? AuthorName.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (AuthorFamilyName != null ? AuthorFamilyName.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (DateOfBirth != null ? DateOfBirth.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (PlaceOfBirth != null ? PlaceOfBirth.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (SharingDate != null ? SharingDate.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (TimeInterval != null ? TimeInterval.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (TypeOfInformation != null ? TypeOfInformation.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (Language != null ? Language.GetHashCode() : 0); return(hashCode); } }
public Originator( string name, string vaan, PostalAddress postalAddress, PlaceOfBirth placeOfBirth, NaturalPersonId[] naturalPersonId, JuridicalPersonId[] juridicalPersonId, string bic) { Name = name; VAAN = vaan; PostalAddress = postalAddress; PlaceOfBirth = placeOfBirth ?? default; NaturalPersonId = naturalPersonId ?? new NaturalPersonId[] {}; JuridicalPersonId = juridicalPersonId ?? new JuridicalPersonId[] {}; BIC = bic ?? string.Empty; }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (MaidenName != null) { hashCode = hashCode * 59 + MaidenName.GetHashCode(); } if (MaritalStatus != null) { hashCode = hashCode * 59 + MaritalStatus.GetHashCode(); } if (AdditionalID != null) { hashCode = hashCode * 59 + AdditionalID.GetHashCode(); } if (PlaceOfBirth != null) { hashCode = hashCode * 59 + PlaceOfBirth.GetHashCode(); } if (Nationality != null) { hashCode = hashCode * 59 + Nationality.GetHashCode(); } if (EthnicOrigin != null) { hashCode = hashCode * 59 + EthnicOrigin.GetHashCode(); } if (VisaRequired != null) { hashCode = hashCode * 59 + VisaRequired.GetHashCode(); } if (DisabledNo != null) { hashCode = hashCode * 59 + DisabledNo.GetHashCode(); } if (Disability != null) { hashCode = hashCode * 59 + Disability.GetHashCode(); } return(hashCode); } }
public JsonResult SavePlaceOfBirth(PlaceOfBirth ObjSave) { MsgUnit Msg = new MsgUnit(); try { var userId = User.Identity.GetUserId(); var UserInfo = _unitOfWork.User.GetMyInfo(userId); ObjSave.PlaceCode = _unitOfWork.PlaceOfBirth.GetMaxSerial(UserInfo.fCompanyId); ObjSave.InsDateTime = DateTime.Now; ObjSave.InsUserID = userId; ObjSave.CompanyID = UserInfo.fCompanyId; if (String.IsNullOrEmpty(ObjSave.EnglishName)) { ObjSave.EnglishName = ObjSave.ArabicName; } if (!ModelState.IsValid) { string Err = " "; var errors = ModelState.Values.SelectMany(v => v.Errors); foreach (ModelError error in errors) { Err = Err + error.ErrorMessage + " * "; } Msg.Msg = Resources.Resource.SomthingWentWrong + " : " + Err; Msg.Code = 0; return(Json(Msg, JsonRequestBehavior.AllowGet)); } _unitOfWork.PlaceOfBirth.Add(ObjSave); _unitOfWork.Complete(); Msg.LastID = _unitOfWork.PlaceOfBirth.GetMaxSerial(UserInfo.fCompanyId).ToString(); Msg.Code = 1; Msg.Msg = Resources.Resource.AddedSuccessfully; return(Json(Msg, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { Msg.Msg = Resources.Resource.SomthingWentWrong + " : " + ex.Message.ToString(); Msg.Code = 0; return(Json(Msg, JsonRequestBehavior.AllowGet)); } }
private static TerminationMessage GetTerminationMessage() { //Should be a contract var vaspKey = EthECKey.GenerateKey(); var message = new Message( Guid.NewGuid().ToByteArray().ToHex(prefix: false), Guid.NewGuid().ToByteArray().ToHex(prefix: false), "1"); var postalAddress = new PostalAddress( "TestingStreet", 61, "Test Address Line", "410000", "TownN", Country.List["DE"] ); var placeOfBirth = new PlaceOfBirth(DateTime.UtcNow, "TownN", Country.List["DE"]); var vaspInformation = new VaspInformation( "Test test", vaspKey.GetPublicAddress(), vaspKey.GetPubKey().ToHex(prefix: false), postalAddress, placeOfBirth, new NaturalPersonId[] { new NaturalPersonId("SomeId2", NaturalIdentificationType.AlienRegistrationNumber, Country.List["DE"]), }, new JuridicalPersonId[] { new JuridicalPersonId("SomeId1", JuridicalIdentificationType.BankPartyIdentification, Country.List["DE"]), }, "DEUTDEFF"); var request = new TerminationMessage(message, vaspInformation) { Comment = "This is test message", }; return(request); }
/// <summary> /// Returns true if SessionsModel3 instances are equal /// </summary> /// <param name="other">Instance of SessionsModel3 to be compared</param> /// <returns>Boolean</returns> public bool Equals(SessionsModel3 other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( FirstName == other.FirstName || FirstName != null && FirstName.Equals(other.FirstName) ) && ( LastName == other.LastName || LastName != null && LastName.Equals(other.LastName) ) && ( DateOfBirth == other.DateOfBirth || DateOfBirth != null && DateOfBirth.Equals(other.DateOfBirth) ) && ( PlaceOfBirth == other.PlaceOfBirth || PlaceOfBirth != null && PlaceOfBirth.Equals(other.PlaceOfBirth) ) && ( NationalIdNumber == other.NationalIdNumber || NationalIdNumber != null && NationalIdNumber.Equals(other.NationalIdNumber) ) && ( NationalIdType == other.NationalIdType || NationalIdType != null && NationalIdType.Equals(other.NationalIdType) )); }
public async Task <(VaspInformation VaspInformation, VaspContractInfo VaspContractInfo)> CreateForNaturalPersonAsync( string vaspSmartContractAddress, NaturalPersonId[] naturalPersonIds, PlaceOfBirth placeOfBirth) { var vaspContractInfo = await _nodeClientEthereumRpc.GetVaspContractInfoAync(vaspSmartContractAddress); var vaspInformation = new VaspInformation( vaspContractInfo.Name, vaspSmartContractAddress, vaspContractInfo.HandshakeKey,//Ensure it is correct vaspContractInfo.Address, placeOfBirth, naturalPersonIds, null, null); return(vaspInformation, vaspContractInfo); }
public void MergeFrom(ProtoVaspInfo other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.VaspIdentity.Length != 0) { VaspIdentity = other.VaspIdentity; } if (other.VaspPubkey.Length != 0) { VaspPubkey = other.VaspPubkey; } if (other.postalAddress_ != null) { if (postalAddress_ == null) { PostalAddress = new global::OpenVASP.ProtocolMessages.Messages.ProtoPostalAddress(); } PostalAddress.MergeFrom(other.PostalAddress); } if (other.placeOfBirth_ != null) { if (placeOfBirth_ == null) { PlaceOfBirth = new global::OpenVASP.ProtocolMessages.Messages.ProtoPlaceOfBirth(); } PlaceOfBirth.MergeFrom(other.PlaceOfBirth); } naturalPersonId_.Add(other.naturalPersonId_); juridicalPersonId_.Add(other.juridicalPersonId_); if (other.Bic.Length != 0) { Bic = other.Bic; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public JsonResult DeletePlaceOfBirth(PlaceOfBirth ObjDelete) { MsgUnit Msg = new MsgUnit(); try { var userId = User.Identity.GetUserId(); var UserInfo = _unitOfWork.User.GetMyInfo(userId); ObjDelete.CompanyID = UserInfo.fCompanyId; if (!ModelState.IsValid) { string Err = " "; var errors = ModelState.Values.SelectMany(v => v.Errors); foreach (ModelError error in errors) { Err = Err + error.ErrorMessage + " * "; } Msg.Msg = Resources.Resource.SomthingWentWrong + " : " + Err; Msg.Code = 0; return(Json(Msg, JsonRequestBehavior.AllowGet)); } _unitOfWork.PlaceOfBirth.Delete(ObjDelete); _unitOfWork.Complete(); Msg.Code = 1; Msg.Msg = Resources.Resource.DeletedSuccessfully; return(Json(Msg, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { Msg.Msg = Resources.Resource.SomthingWentWrong + " : " + ex.Message.ToString(); Msg.Code = 0; return(Json(Msg, JsonRequestBehavior.AllowGet)); } }
private static TransferConfirmationMessage GetTransferConfirmationMessage() { //Should be a contract var vaspKey = EthECKey.GenerateKey(); var message = new Message( Guid.NewGuid().ToByteArray().ToHex(prefix: false), Guid.NewGuid().ToByteArray().ToHex(prefix: false), "1"); var postalAddress = new PostalAddress( "TestingStreet", 61, "Test Address Line", "410000", "TownN", Country.List["DE"] ); var placeOfBirth = new PlaceOfBirth(DateTime.UtcNow, "TownN", Country.List["DE"]); var vaspInformation = new VaspInformation( "Test test", vaspKey.GetPublicAddress(), vaspKey.GetPubKey().ToHex(prefix: false), postalAddress, placeOfBirth, new NaturalPersonId[] { new NaturalPersonId("SomeId2", NaturalIdentificationType.AlienRegistrationNumber, Country.List["DE"]), }, new JuridicalPersonId[] { new JuridicalPersonId("SomeId1", JuridicalIdentificationType.BankPartyIdentification, Country.List["DE"]), }, "DEUTDEFF"); var originator = new Originator("Originator1", "VaaN", postalAddress, placeOfBirth, new NaturalPersonId[] { new NaturalPersonId("SomeId2", NaturalIdentificationType.AlienRegistrationNumber, Country.List["DE"]), }, new JuridicalPersonId[] { new JuridicalPersonId("SomeId1", JuridicalIdentificationType.BankPartyIdentification, Country.List["DE"]), }, "DEUTDEFF"); var beneficiary = new Beneficiary("Ben1", "VaaN"); var transferReply = new TransferReply(VirtualAssetType.ETH, TransferType.BlockchainTransfer, "10000000", "0x0000001"); var transaction = new Transaction("txId", DateTime.UtcNow, "0x0000002"); var request = new TransferConfirmationMessage(message, originator, beneficiary, transferReply, transaction, vaspInformation) { Comment = "This is test message", }; return(request); }
public Tester(PlaceOfBirth pob) { }
public void CreateSessionRequest( string beneficiaryName, string originatorName, PostalAddress originatorPostalAddress, PlaceOfBirth placeOfBirth, VirtualAssetType assetType, decimal transferAmount) { (VaspInformation vaspInfoPerson, VaspContractInfo vaspContractInfoPerson) = VaspInformationBuilder.CreateForNaturalPersonAsync( _ethereumRpc, _vaspSmartContractAddressPerson, _naturalPersonIds, placeOfBirth) .GetAwaiter() .GetResult(); VaspClient originator = VaspClient.Create( vaspInfoPerson, vaspContractInfoPerson, _personHandshakePrivateKeyHex, _personSignaturePrivateKeyHex, _ethereumRpc, _whisperRpc, _fakeEnsProvider, _signService, _transportClient); (VaspInformation vaspInfoJuridical, VaspContractInfo vaspContractInfoJuridical) = VaspInformationBuilder.CreateForJuridicalPersonAsync( _ethereumRpc, _vaspSmartContractAddressJuridical, _juridicalPersonIds) .GetAwaiter() .GetResult(); VaspClient beneficiary = VaspClient.Create( vaspInfoJuridical, vaspContractInfoJuridical, _juridicalHandshakePrivateKeyHex, _juridicalSignaturePrivateKeyHex, _ethereumRpc, _whisperRpc, _fakeEnsProvider, _signService, _transportClient); var originatorVaan = VirtualAssetssAccountNumber.Create(vaspInfoPerson.GetVaspCode(), "524ee3fb082809"); var beneficiaryVaan = VirtualAssetssAccountNumber.Create(vaspInfoJuridical.GetVaspCode(), "524ee3fb082809"); var vaspSession = new VaspSessionWrapper( beneficiaryName, originator, beneficiary); VaspSessions[vaspSession.Id] = vaspSession; var originatorDoc = Originator.CreateOriginatorForNaturalPerson( originatorName, originatorVaan, originatorPostalAddress, placeOfBirth, new NaturalPersonId[] { new NaturalPersonId("Id", NaturalIdentificationType.NationalIdentityNumber, Country.List["DE"]), }); vaspSession.StartSession(originatorDoc, beneficiaryVaan, assetType, transferAmount); }
private UploadAppSampleDataDictionary GetSampleData() { var r = new UploadAppSampleDataDictionary { ApplicationType = ApplicationType.XKeys(), CreditTermAsked = new[] { CreditTermAskedFrom.Text.Toi(), CreditTermAskedTo.Text.Toi() }, DepositTermAsked = new[] { DepositTermAskedFrom.Text.Toi(), DepositTermAskedTo.Text.Toi() }, CreditLimitAsked = new[] { CreditLimitAskedFrom.Text.Toi(), CreditLimitAskedTo.Text.Toi() }, DepositLimitAsked = new[] { DepositLimitAskedFrom.Text.Toi(), DepositLimitAskedTo.Text.Toi() }, CardCategory = CardCategory.XKeys(), PaternalNameM = PaternalNameM.XVals(), NameM = NameM.XVals(), LastNameM = LastNameM.XVals(), PaternalNameG = PaternalNameG.XVals(), NameG = NameG.XVals(), LastNameG = LastNameG.XVals(), IsSecondNameNOTChanged = IsSecondNameNOTChanged.XKeys(), PreviousSecondName = PreviousSecondName.XVals(), PlaceOfBirth = PlaceOfBirth.XVals(), BirthDate = new[] { BirthDateFrom.Value, BirthDateTo.Value }, Gender = Gender.XKeys(), IssuedOn = new[] { IssuedOnFrom.Value, IssuedOnTo.Value }, IssuePlace = IssuePlace.XVals(), IssuedBy = IssuedBy.XVals(), LineCodeKLADR = LineCodeKLADR.XKeys(), Building = new[] { BuildingFrom.Text.Toi(), BuildingTo.Text.Toi() }, DeliveryAddress = DeliveryAddress.XKeys(), AccountName = AccountName.XVals(), AccountType = AccountType.XKeys(), LaborContractType = LaborContractType.XKeys(), TotalWorkExperience = TotalWorkExperience.XKeys(), LastSeniority = LastSeniority.XKeys(), JobTitle = JobTitle.XKeys(), AverageMonthlyIncome = new[] { AverageMonthlyIncomeFrom.Text.Toi(), AverageMonthlyIncomeTo.Text.Toi() }, IncomeCheckStatus = IncomeCheckStatus.XKeys(), DeliveryAddressV = DeliveryAddressV.XKeys(), Education = Education.XKeys(), MaritalStatus = MaritalStatus.XKeys(), MinorChildrenNummber = MinorChildrenNummber.XKeys(), ContactName = ContactName.XVals(), RelationDegree = RelationDegree.XKeys(), IsNotPublicPerson = IsNotPublicPerson.XKeys(), MaidenName = MaidenName.XVals(), SecretQuestion = SecretQuestion.XKeys(), PreviousCreditsQuantity = PreviousCreditsQuantity.XKeys(), AccountSphere = AccountSphere.XKeys(), AccountCompanyEmployeesQty = AccountCompanyEmployeesQty.XVals(), SecretWord = SecretWord.XVals(), BankingServiceCredit = BankingServiceCredit.XKeys(), BankingServiceDebit = BankingServiceDebit.XKeys(), CurrencyAsked = CurrencyAsked.XKeys(), IsAgreeAuthorityTransfer = IsAgreeAuthorityTransfer.XKeys(), IsDataAuthentic = IsDataAuthentic.XKeys(), Street = Street.XVals(), PercentPayment = PercentPayment.XVals(), PercentPaymentMethod = PercentPaymentMethod.XVals(), DependentsNumber = DependantsNumber.XKeys(), EarlierCreditStatuse = EarlierCreditStatuse.XKeys(), EarlierCreditType = EarlierCreditType.XKeys(), EarlierBank = EarlierBank.XKeys(), EarlierMaxLoanTerm = EarlierMaxLoanTerm.XKeys(), ClientType = ClientType.XKeys(), }; return(r); }
private static void AssertPlaceOfBirth(PlaceOfBirth request, PlaceOfBirth response) { Assert.Equal(request.DateOfBirth.Date, response.DateOfBirth.Date); Assert.Equal(request.CountryOfBirth, response.CountryOfBirth); Assert.Equal(request.CityOfBirth, response.CityOfBirth); }
/// <summary> /// Returns true if Individual instances are equal /// </summary> /// <param name="other">Instance of Individual to be compared</param> /// <returns>Boolean</returns> public bool Equals(Individual other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( Title == other.Title || Title != null && Title.Equals(other.Title) ) && ( GivenName == other.GivenName || GivenName != null && GivenName.Equals(other.GivenName) ) && ( FamilyName == other.FamilyName || FamilyName != null && FamilyName.Equals(other.FamilyName) ) && ( MiddleName == other.MiddleName || MiddleName != null && MiddleName.Equals(other.MiddleName) ) && ( Href == other.Href || Href != null && Href.Equals(other.Href) ) && ( Gender == other.Gender || Gender != null && Gender.Equals(other.Gender) ) && ( PlaceOfBirth == other.PlaceOfBirth || PlaceOfBirth != null && PlaceOfBirth.Equals(other.PlaceOfBirth) ) && ( CountryOfBirth == other.CountryOfBirth || CountryOfBirth != null && CountryOfBirth.Equals(other.CountryOfBirth) ) && ( Nationality == other.Nationality || Nationality != null && Nationality.Equals(other.Nationality) ) && ( MaritalStatus == other.MaritalStatus || MaritalStatus != null && MaritalStatus.Equals(other.MaritalStatus) ) && ( BirthDate == other.BirthDate || BirthDate != null && BirthDate.Equals(other.BirthDate) ) && ( FullName == other.FullName || FullName != null && FullName.Equals(other.FullName) ) && ( FormattedName == other.FormattedName || FormattedName != null && FormattedName.Equals(other.FormattedName) ) && ( Location == other.Location || Location != null && Location.Equals(other.Location) ) && ( Status == other.Status || Status != null && Status.Equals(other.Status) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Id != null) { hashCode = hashCode * 59 + Id.GetHashCode(); } if (Title != null) { hashCode = hashCode * 59 + Title.GetHashCode(); } if (GivenName != null) { hashCode = hashCode * 59 + GivenName.GetHashCode(); } if (FamilyName != null) { hashCode = hashCode * 59 + FamilyName.GetHashCode(); } if (MiddleName != null) { hashCode = hashCode * 59 + MiddleName.GetHashCode(); } if (Href != null) { hashCode = hashCode * 59 + Href.GetHashCode(); } if (Gender != null) { hashCode = hashCode * 59 + Gender.GetHashCode(); } if (PlaceOfBirth != null) { hashCode = hashCode * 59 + PlaceOfBirth.GetHashCode(); } if (CountryOfBirth != null) { hashCode = hashCode * 59 + CountryOfBirth.GetHashCode(); } if (Nationality != null) { hashCode = hashCode * 59 + Nationality.GetHashCode(); } if (MaritalStatus != null) { hashCode = hashCode * 59 + MaritalStatus.GetHashCode(); } if (BirthDate != null) { hashCode = hashCode * 59 + BirthDate.GetHashCode(); } if (FullName != null) { hashCode = hashCode * 59 + FullName.GetHashCode(); } if (FormattedName != null) { hashCode = hashCode * 59 + FormattedName.GetHashCode(); } if (Location != null) { hashCode = hashCode * 59 + Location.GetHashCode(); } if (Status != null) { hashCode = hashCode * 59 + Status.GetHashCode(); } return(hashCode); } }