diff --git a/AppifySheets.TBC.IntegrationService.Client.DemoConsole/Program.cs b/AppifySheets.TBC.IntegrationService.Client.DemoConsole/Program.cs index 285bede..753be61 100644 --- a/AppifySheets.TBC.IntegrationService.Client.DemoConsole/Program.cs +++ b/AppifySheets.TBC.IntegrationService.Client.DemoConsole/Program.cs @@ -33,15 +33,15 @@ Amount = 0.01m, BeneficiaryName = "TEST", SenderAccountWithCurrency = ownAccountGEL, - Description = "TEST", - PersonalNumber = null // Adding required PersonalNumber field + Description = "TEST" }; var withinBankGel2 = await tbcSoapCaller.GetDeserialized(new ImportSinglePaymentOrdersRequestIo( new TransferWithinBankPaymentOrderIo { RecipientAccountWithCurrency = BankAccount.Create("GE86TB1144836120100002", "GEL").Value, - BankTransferCommonDetails = bankTransferCommonDetails + BankTransferCommonDetails = bankTransferCommonDetails, + PersonalNumber = null })); var withinBankCurrency = await tbcSoapCaller.GetDeserialized(new ImportSinglePaymentOrdersRequestIo( @@ -52,6 +52,7 @@ SenderAccountWithCurrency = ownAccountUSD }, RecipientAccountWithCurrency = BankAccount.Create("GE86TB1144836120100002", "USD").Value, + PersonalNumber = null })); var toAnotherBankGel = await tbcSoapCaller.GetDeserialized( diff --git a/AppifySheets.TBC.IntegrationService.Client/SoapInfrastructure/ImportSinglePaymentOrders/ImportSinglePaymentOrdersRequestIo.cs b/AppifySheets.TBC.IntegrationService.Client/SoapInfrastructure/ImportSinglePaymentOrders/ImportSinglePaymentOrdersRequestIo.cs index f048fcb..c2c7cb9 100644 --- a/AppifySheets.TBC.IntegrationService.Client/SoapInfrastructure/ImportSinglePaymentOrders/ImportSinglePaymentOrdersRequestIo.cs +++ b/AppifySheets.TBC.IntegrationService.Client/SoapInfrastructure/ImportSinglePaymentOrders/ImportSinglePaymentOrdersRequestIo.cs @@ -34,7 +34,7 @@ public override string SoapXml() {TransferType.AdditionalDescription} {TransferType.Is(b => $"{b.Description}")} {TransferType.Is(b => $"{b.BeneficiaryName}")} - {TransferType.Is(b => $"{b.PersonalNumber}")} + {TransferType.Is(b => $"{b.PersonalNumber}")} {TransferType.Is(b => $"{b.BeneficiaryTaxCode}")} {TransferType.Is(b => $""" diff --git a/AppifySheets.TBC.IntegrationService.Client/SoapInfrastructure/ImportSinglePaymentOrders/TransferTypeInterfaces.cs b/AppifySheets.TBC.IntegrationService.Client/SoapInfrastructure/ImportSinglePaymentOrders/TransferTypeInterfaces.cs index 8f72d80..116394b 100644 --- a/AppifySheets.TBC.IntegrationService.Client/SoapInfrastructure/ImportSinglePaymentOrders/TransferTypeInterfaces.cs +++ b/AppifySheets.TBC.IntegrationService.Client/SoapInfrastructure/ImportSinglePaymentOrders/TransferTypeInterfaces.cs @@ -10,7 +10,6 @@ public sealed record BankTransferCommonDetails public required long DocumentNumber { get; init; } public required decimal Amount { get; init; } public required string BeneficiaryName { get; init; } - public required string? PersonalNumber { get; init; } public required string Description { get; init; } public string? AdditionalDescription { get; init; } } @@ -23,7 +22,7 @@ public abstract record TransferTypeRecord public long DocumentNumber => BankTransferCommonDetails.DocumentNumber; public decimal Amount => BankTransferCommonDetails.Amount; public string BeneficiaryName => BankTransferCommonDetails.BeneficiaryName; - public string? PersonalNumber => BankTransferCommonDetails.PersonalNumber; + // public string? PersonalNumber => BankTransferCommonDetails.PersonalNumber; public string Description => BankTransferCommonDetails.Description; public string? AdditionalDescription => BankTransferCommonDetails.AdditionalDescription; } @@ -31,9 +30,13 @@ public abstract record TransferTypeRecord public interface IBeneficiaryName { public string BeneficiaryName { get; } - public string? PersonalNumber { get; } + // public string? PersonalNumber { get; } } +public interface IPersonalNumber +{ + string? PersonalNumber { get; } +} public interface IDescription { public string Description { get; } diff --git a/AppifySheets.TBC.IntegrationService.Client/SoapInfrastructure/ImportSinglePaymentOrders/TransferTypeRecords.cs b/AppifySheets.TBC.IntegrationService.Client/SoapInfrastructure/ImportSinglePaymentOrders/TransferTypeRecords.cs index 379a65b..2c77c3f 100644 --- a/AppifySheets.TBC.IntegrationService.Client/SoapInfrastructure/ImportSinglePaymentOrders/TransferTypeRecords.cs +++ b/AppifySheets.TBC.IntegrationService.Client/SoapInfrastructure/ImportSinglePaymentOrders/TransferTypeRecords.cs @@ -3,9 +3,10 @@ namespace AppifySheets.TBC.IntegrationService.Client.SoapInfrastructure.ImportSinglePaymentOrders; -public record TransferWithinBankPaymentOrderIo : TransferTypeRecord, IRecipient, IBeneficiaryName, IDescription +public record TransferWithinBankPaymentOrderIo : TransferTypeRecord, IRecipient, IBeneficiaryName, IDescription, IPersonalNumber { public required BankAccount RecipientAccountWithCurrency { get; init; } + public required string? PersonalNumber { get; init; } } public record TransferToOtherBankForeignCurrencyPaymentOrderIo( diff --git a/AppifySheets.TBC.IntegrationService.Tests/TBCSoapCallerTests.cs b/AppifySheets.TBC.IntegrationService.Tests/TBCSoapCallerTests.cs index 1e110a1..1f6e896 100644 --- a/AppifySheets.TBC.IntegrationService.Tests/TBCSoapCallerTests.cs +++ b/AppifySheets.TBC.IntegrationService.Tests/TBCSoapCallerTests.cs @@ -72,15 +72,15 @@ public async Task ImportSinglePaymentOrders_returns_values() Amount = 0.01m, BeneficiaryName = "TEST", SenderAccountWithCurrency = ownAccountGEL, - Description = "TEST", - PersonalNumber = null // Adding required PersonalNumber field + Description = "TEST" }; var withinBankGel2 = await _tbcSoapCaller.GetDeserialized(new ImportSinglePaymentOrdersRequestIo( new TransferWithinBankPaymentOrderIo { RecipientAccountWithCurrency = BankAccount.Create("GE24TB7755145063300001", "GEL").Value, - BankTransferCommonDetails = bankTransferCommonDetails + BankTransferCommonDetails = bankTransferCommonDetails, + PersonalNumber = null })); var withinBankCurrency = await _tbcSoapCaller.GetDeserialized(new ImportSinglePaymentOrdersRequestIo( @@ -91,6 +91,7 @@ public async Task ImportSinglePaymentOrders_returns_values() SenderAccountWithCurrency = ownAccountUSD }, RecipientAccountWithCurrency = BankAccount.Create("GE86TB1144836120100002", "USD").Value, + PersonalNumber = null })); var toAnotherBankGel = await _tbcSoapCaller.GetDeserialized(