public static IbanParts Create(string countryCode, string checkDigits, string bban) { Require.NotNull(countryCode, nameof(countryCode)); Require.NotNull(checkDigits, nameof(checkDigits)); Require.NotNull(bban, nameof(bban)); Require.True(CountryPart.Validate(countryCode), nameof(countryCode)); Require.True(CheckDigitsPart.Validate(checkDigits), nameof(checkDigits)); Require.True(BbanPart.Validate(bban), nameof(bban)); return(new IbanParts(countryCode, checkDigits, bban)); }
public static IbanParts Build(string countryCode, string bban) { Require.NotNull(countryCode, nameof(countryCode)); Require.NotNull(bban, nameof(bban)); Require.True(CountryPart.Validate(countryCode), nameof(countryCode)); Require.True(BbanPart.Validate(bban), nameof(bban)); string checkDigits = IbanCheckDigits.Compute(countryCode, bban); return(new IbanParts(countryCode, checkDigits, bban)); }
public static Bic Create( string institutionCode, string countryCode, string locationCode, string branchCode, BicVersion version) { Require.NotNull(institutionCode, nameof(institutionCode)); Require.NotNull(countryCode, nameof(countryCode)); Require.NotNull(locationCode, nameof(locationCode)); Require.NotNull(branchCode, nameof(branchCode)); Require.True(InstitutionPart.Validate(institutionCode, version), nameof(institutionCode)); Require.True(CountryPart.Validate(countryCode), nameof(countryCode)); Require.True(LocationPart.Validate(locationCode), nameof(locationCode)); Require.True(BranchPart.Validate(branchCode), nameof(branchCode)); return(new Bic(institutionCode, countryCode, locationCode, branchCode)); }