diff --git a/0_Framework/Application/UID/IUidService.cs b/0_Framework/Application/UID/IUidService.cs index 63599699..a3350dfa 100644 --- a/0_Framework/Application/UID/IUidService.cs +++ b/0_Framework/Application/UID/IUidService.cs @@ -129,6 +129,8 @@ public class AccountToIbanResponse:UidBaseResponse public class IbanInquiryResponse:UidBaseResponse { public IbanInquiryAccountBasicInformation AccountBasicInformation { get; set; } + [JsonProperty("owners")] + public List Owners { get; set; } } public class IbanInquiryAccountBasicInformation @@ -137,7 +139,7 @@ public class IbanInquiryAccountBasicInformation public string AccountNumber { get; set; } public IbanInquiryBankInformation BankInformation { get; set; } public string AccountStatus { get; set; } - public List Owners { get; set; } + } public class IbanInquiryBankInformation @@ -147,9 +149,13 @@ public class IbanInquiryBankInformation public class IbanInquiryOwner { + [JsonProperty("firstName")] public string FirstName { get; set; } + [JsonProperty("lastName")] public string LastName { get; set; } + [JsonProperty("nationalIdentifier")] public string NationalIdentifier { get; set; } + [JsonProperty("customerType")] public string CustomerType { get; set; } } diff --git a/CompanyManagment.EFCore/Services/UidService.cs b/CompanyManagment.EFCore/Services/UidService.cs index bb84c06a..a23bdfd2 100644 --- a/CompanyManagment.EFCore/Services/UidService.cs +++ b/CompanyManagment.EFCore/Services/UidService.cs @@ -154,13 +154,14 @@ public class UidService : IUidService { var request = new { - Iban = iban, - RequestContext = new UidRequestContext() + iban, + requestContext = new UidRequestContext() }; var json = JsonConvert.SerializeObject(request); var contentType = new StringContent(json, Encoding.UTF8, "application/json"); var requestResult = await _httpClient.PostAsync("inquiry/iban/v2", contentType); requestResult.EnsureSuccessStatusCode(); + //var stringRes =await requestResult.Content.ReadAsStringAsync(); var responseResult = await requestResult.Content.ReadFromJsonAsync(); return responseResult; } @@ -171,7 +172,7 @@ public class UidService : IUidService { accountNumber, bank, - RequestContext = new UidRequestContext() + requestContext = new UidRequestContext() }; var json = JsonConvert.SerializeObject(request); var contentType = new StringContent(json, Encoding.UTF8, "application/json"); @@ -186,11 +187,11 @@ public class UidService : IUidService var request = new { cardNumber, - RequestContext = new UidRequestContext() + requestContext = new UidRequestContext() }; var json = JsonConvert.SerializeObject(request); var contentType = new StringContent(json, Encoding.UTF8, "application/json"); - var requestResult = await _httpClient.PostAsync("account-to-iban", contentType); + var requestResult = await _httpClient.PostAsync("inquiry/card", contentType); requestResult.EnsureSuccessStatusCode(); var responseResult = await requestResult.Content.ReadFromJsonAsync(); return responseResult; diff --git a/ServiceHost/Areas/Admin/Controllers/DashboardController.cs b/ServiceHost/Areas/Admin/Controllers/DashboardController.cs index 49cf1486..5f1d45d1 100644 --- a/ServiceHost/Areas/Admin/Controllers/DashboardController.cs +++ b/ServiceHost/Areas/Admin/Controllers/DashboardController.cs @@ -71,26 +71,6 @@ public class DashboardController : AdminBaseController var result = (int)await _smsService.GetCreditAmount(); return new SmsRemainingResult(result); } - - [HttpGet("account-info")] - public async Task OnGetAccountInfo(string cardNumber) - { - var cardToNumberResponse = await _uidService.CardToIban(cardNumber); - return Ok(cardToNumberResponse); - } - [HttpGet("account-info2")] - public async Task OnGetAccountInfo2(string iban) - { - var cardToNumberResponse = await _uidService.IbanInquiry(iban); - return Ok(cardToNumberResponse); - } - [HttpGet("account-info3")] - public async Task OnGetAccountInfo3(string accountNumber, UidBanks banks) - { - var cardToNumberResponse = await _uidService.AccountToIban(accountNumber, banks); - return Ok(cardToNumberResponse); - } - } public record SmsRemainingResult(int Data);