diff --git a/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature b/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature
index a8a067c..d68e93e 100644
--- a/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature
+++ b/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature
@@ -63,9 +63,9 @@ Background:
| Test Estate 2 | Voucher | Hospital 2 Contract | 10 KES | 10 KES | | Voucher |
Given I create the following merchants
- | MerchantName | AddressLine1 | Town | Region |PostalCode | Country | ContactName | EmailAddress | EstateName |
- | Test Merchant 1 | Address Line 1 | TestTown | Test Region |TE57 1NG | United Kingdom | Test Contact 1 | testcontact1@merchant1.co.uk | Test Estate 1 |
- | Test Merchant 2 | Address Line 1 | TestTown | Test Region |TE57 2NG | United Kingdom | Test Contact 1 | testcontact1@merchant1.co.uk | Test Estate 2 |
+ | MerchantName | AddressLine1 | Town | Region | PostalCode | Country | ContactName | EmailAddress | EstateName |
+ | Test Merchant 1 | Address Line 1 | TestTown | Test Region | TE57 1NG | United Kingdom | Test Contact 1 | testcontact1@merchant1.co.uk | Test Estate 1 |
+ | Test Merchant 2 | Address Line 1 | TestTown | Test Region | TE57 2NG | United Kingdom | Test Contact 1 | testcontact1@merchant1.co.uk | Test Estate 2 |
Given I have assigned the following operator to the merchants
| OperatorName | MerchantName | MerchantNumber | TerminalNumber | EstateName |
diff --git a/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature.cs b/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature.cs
index 8b059ca..3424b81 100644
--- a/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature.cs
+++ b/TransactionProcessorACL.IntegrationTests/RedeemVoucher/RedeemVoucher.feature.cs
@@ -111,130 +111,130 @@ public void ScenarioInitialize(global::Reqnroll.ScenarioInfo scenarioInfo, globa
{
#line 4
#line hidden
- global::Reqnroll.Table table54 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table1 = new global::Reqnroll.Table(new string[] {
"Role Name"});
- table54.AddRow(new string[] {
+ table1.AddRow(new string[] {
"Merchant"});
- table54.AddRow(new string[] {
+ table1.AddRow(new string[] {
"VoucherRedemption"});
#line 6
- await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table54, "Given ");
+ await testRunner.GivenAsync("the following security roles exist", ((string)(null)), table1, "Given ");
#line hidden
- global::Reqnroll.Table table55 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table2 = new global::Reqnroll.Table(new string[] {
"Name",
"DisplayName",
"Description"});
- table55.AddRow(new string[] {
+ table2.AddRow(new string[] {
"estateManagement",
"Estate Managememt REST Scope",
"A scope for Estate Managememt REST"});
- table55.AddRow(new string[] {
+ table2.AddRow(new string[] {
"transactionProcessor",
"Transaction Processor REST Scope",
"A scope for Transaction Processor REST"});
- table55.AddRow(new string[] {
+ table2.AddRow(new string[] {
"transactionProcessorACL",
"Transaction Processor ACL REST Scope",
"A scope for Transaction Processor ACL REST"});
- table55.AddRow(new string[] {
+ table2.AddRow(new string[] {
"voucherManagement",
"Voucher Management REST Scope",
"A scope for Voucher Management REST"});
#line 11
- await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table55, "Given ");
+ await testRunner.GivenAsync("I create the following api scopes", ((string)(null)), table2, "Given ");
#line hidden
- global::Reqnroll.Table table56 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table3 = new global::Reqnroll.Table(new string[] {
"Name",
"DisplayName",
"Secret",
"Scopes",
"UserClaims"});
- table56.AddRow(new string[] {
+ table3.AddRow(new string[] {
"estateManagement",
"Estate Managememt REST",
"Secret1",
"estateManagement",
"merchantId, estateId, role"});
- table56.AddRow(new string[] {
+ table3.AddRow(new string[] {
"transactionProcessor",
"Transaction Processor REST",
"Secret1",
"transactionProcessor",
""});
- table56.AddRow(new string[] {
+ table3.AddRow(new string[] {
"transactionProcessorACL",
"Transaction Processor ACL REST",
"Secret1",
"transactionProcessorACL",
"merchantId, estateId, role, contractId"});
- table56.AddRow(new string[] {
+ table3.AddRow(new string[] {
"voucherManagement",
"Voucher Management REST",
"Secret1",
"voucherManagement",
""});
#line 18
- await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table56, "Given ");
+ await testRunner.GivenAsync("the following api resources exist", ((string)(null)), table3, "Given ");
#line hidden
- global::Reqnroll.Table table57 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table4 = new global::Reqnroll.Table(new string[] {
"ClientId",
"ClientName",
"Secret",
"Scopes",
"GrantTypes"});
- table57.AddRow(new string[] {
+ table4.AddRow(new string[] {
"serviceClient",
"Service Client",
"Secret1",
"estateManagement,transactionProcessor,transactionProcessorACL,voucherManagement",
"client_credentials"});
- table57.AddRow(new string[] {
+ table4.AddRow(new string[] {
"merchantClient",
"Merchant Client",
"Secret1",
"transactionProcessorACL",
"password"});
- table57.AddRow(new string[] {
+ table4.AddRow(new string[] {
"redemptionClient",
"Redemption Client",
"Secret1",
"transactionProcessorACL",
"password"});
#line 25
- await testRunner.GivenAsync("the following clients exist", ((string)(null)), table57, "Given ");
+ await testRunner.GivenAsync("the following clients exist", ((string)(null)), table4, "Given ");
#line hidden
- global::Reqnroll.Table table58 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table5 = new global::Reqnroll.Table(new string[] {
"ClientId"});
- table58.AddRow(new string[] {
+ table5.AddRow(new string[] {
"serviceClient"});
#line 31
await testRunner.GivenAsync("I have a token to access the estate management and transaction processor acl reso" +
- "urces", ((string)(null)), table58, "Given ");
+ "urces", ((string)(null)), table5, "Given ");
#line hidden
- global::Reqnroll.Table table59 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table6 = new global::Reqnroll.Table(new string[] {
"EstateName"});
- table59.AddRow(new string[] {
+ table6.AddRow(new string[] {
"Test Estate 1"});
- table59.AddRow(new string[] {
+ table6.AddRow(new string[] {
"Test Estate 2"});
#line 35
- await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table59, "Given ");
+ await testRunner.GivenAsync("I have created the following estates", ((string)(null)), table6, "Given ");
#line hidden
- global::Reqnroll.Table table60 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table7 = new global::Reqnroll.Table(new string[] {
"Email Address",
"Password",
"Given Name",
"Family Name",
"EstateName",
"Roles"});
- table60.AddRow(new string[] {
+ table7.AddRow(new string[] {
"redemptionuser@testredemption1.co.uk",
"123456",
"TestRedemption",
"User1",
"Test Estate 1",
"VoucherRedemption"});
- table60.AddRow(new string[] {
+ table7.AddRow(new string[] {
"redemptionuser@testredemption2.co.uk",
"123456",
"TestRedemption",
@@ -242,54 +242,54 @@ await testRunner.GivenAsync("I have a token to access the estate management and
"Test Estate 2",
"VoucherRedemption"});
#line 40
- await testRunner.GivenAsync("I have created the following security users for voucher redemption", ((string)(null)), table60, "Given ");
+ await testRunner.GivenAsync("I have created the following security users for voucher redemption", ((string)(null)), table7, "Given ");
#line hidden
- global::Reqnroll.Table table61 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table8 = new global::Reqnroll.Table(new string[] {
"EstateName",
"OperatorName",
"RequireCustomMerchantNumber",
"RequireCustomTerminalNumber"});
- table61.AddRow(new string[] {
+ table8.AddRow(new string[] {
"Test Estate 1",
"Voucher",
"True",
"True"});
- table61.AddRow(new string[] {
+ table8.AddRow(new string[] {
"Test Estate 2",
"Voucher",
"True",
"True"});
#line 45
- await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table61, "Given ");
+ await testRunner.GivenAsync("I have created the following operators", ((string)(null)), table8, "Given ");
#line hidden
- global::Reqnroll.Table table62 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table9 = new global::Reqnroll.Table(new string[] {
"EstateName",
"OperatorName"});
- table62.AddRow(new string[] {
+ table9.AddRow(new string[] {
"Test Estate 1",
"Voucher"});
- table62.AddRow(new string[] {
+ table9.AddRow(new string[] {
"Test Estate 2",
"Voucher"});
#line 50
- await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table62, "And ");
+ await testRunner.AndAsync("I have assigned the following operators to the estates", ((string)(null)), table9, "And ");
#line hidden
- global::Reqnroll.Table table63 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table10 = new global::Reqnroll.Table(new string[] {
"EstateName",
"OperatorName",
"ContractDescription"});
- table63.AddRow(new string[] {
+ table10.AddRow(new string[] {
"Test Estate 1",
"Voucher",
"Hospital 1 Contract"});
- table63.AddRow(new string[] {
+ table10.AddRow(new string[] {
"Test Estate 2",
"Voucher",
"Hospital 2 Contract"});
#line 55
- await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table63, "Given ");
+ await testRunner.GivenAsync("I create a contract with the following values", ((string)(null)), table10, "Given ");
#line hidden
- global::Reqnroll.Table table64 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table11 = new global::Reqnroll.Table(new string[] {
"EstateName",
"OperatorName",
"ContractDescription",
@@ -297,7 +297,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and
"DisplayText",
"Value",
"ProductType"});
- table64.AddRow(new string[] {
+ table11.AddRow(new string[] {
"Test Estate 1",
"Voucher",
"Hospital 1 Contract",
@@ -305,7 +305,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and
"10 KES",
"",
"Voucher"});
- table64.AddRow(new string[] {
+ table11.AddRow(new string[] {
"Test Estate 2",
"Voucher",
"Hospital 2 Contract",
@@ -314,125 +314,128 @@ await testRunner.GivenAsync("I have a token to access the estate management and
"",
"Voucher"});
#line 60
- await testRunner.WhenAsync("I create the following Products", ((string)(null)), table64, "When ");
+ await testRunner.WhenAsync("I create the following Products", ((string)(null)), table11, "When ");
#line hidden
- global::Reqnroll.Table table65 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table12 = new global::Reqnroll.Table(new string[] {
"MerchantName",
"AddressLine1",
"Town",
"Region",
+ "PostalCode",
"Country",
"ContactName",
"EmailAddress",
"EstateName"});
- table65.AddRow(new string[] {
+ table12.AddRow(new string[] {
"Test Merchant 1",
"Address Line 1",
"TestTown",
"Test Region",
+ "TE57 1NG",
"United Kingdom",
"Test Contact 1",
"testcontact1@merchant1.co.uk",
"Test Estate 1"});
- table65.AddRow(new string[] {
+ table12.AddRow(new string[] {
"Test Merchant 2",
"Address Line 1",
"TestTown",
"Test Region",
+ "TE57 2NG",
"United Kingdom",
"Test Contact 1",
"testcontact1@merchant1.co.uk",
"Test Estate 2"});
#line 65
- await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table65, "Given ");
+ await testRunner.GivenAsync("I create the following merchants", ((string)(null)), table12, "Given ");
#line hidden
- global::Reqnroll.Table table66 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table13 = new global::Reqnroll.Table(new string[] {
"OperatorName",
"MerchantName",
"MerchantNumber",
"TerminalNumber",
"EstateName"});
- table66.AddRow(new string[] {
+ table13.AddRow(new string[] {
"Voucher",
"Test Merchant 1",
"00000001",
"10000001",
"Test Estate 1"});
- table66.AddRow(new string[] {
+ table13.AddRow(new string[] {
"Voucher",
"Test Merchant 2",
"00000002",
"10000002",
"Test Estate 2"});
#line 70
- await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table66, "Given ");
+ await testRunner.GivenAsync("I have assigned the following operator to the merchants", ((string)(null)), table13, "Given ");
#line hidden
- global::Reqnroll.Table table67 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table14 = new global::Reqnroll.Table(new string[] {
"DeviceIdentifier",
"MerchantName",
"EstateName"});
- table67.AddRow(new string[] {
+ table14.AddRow(new string[] {
"123456780",
"Test Merchant 1",
"Test Estate 1"});
- table67.AddRow(new string[] {
+ table14.AddRow(new string[] {
"123456781",
"Test Merchant 2",
"Test Estate 2"});
#line 75
- await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table67, "Given ");
+ await testRunner.GivenAsync("I have assigned the following devices to the merchants", ((string)(null)), table14, "Given ");
#line hidden
- global::Reqnroll.Table table68 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table15 = new global::Reqnroll.Table(new string[] {
"EstateName",
"MerchantName",
"ContractDescription"});
- table68.AddRow(new string[] {
+ table15.AddRow(new string[] {
"Test Estate 1",
"Test Merchant 1",
"Hospital 1 Contract"});
- table68.AddRow(new string[] {
+ table15.AddRow(new string[] {
"Test Estate 2",
"Test Merchant 2",
"Hospital 2 Contract"});
#line 80
-await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table68, "When ");
+await testRunner.WhenAsync("I add the following contracts to the following merchants", ((string)(null)), table15, "When ");
#line hidden
- global::Reqnroll.Table table69 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table16 = new global::Reqnroll.Table(new string[] {
"Reference",
"Amount",
"DateTime",
"MerchantName",
"EstateName"});
- table69.AddRow(new string[] {
+ table16.AddRow(new string[] {
"Deposit1",
"20.00",
"Today",
"Test Merchant 1",
"Test Estate 1"});
- table69.AddRow(new string[] {
+ table16.AddRow(new string[] {
"Deposit1",
"20.00",
"Today",
"Test Merchant 2",
"Test Estate 2"});
#line 85
- await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table69, "Given ");
+ await testRunner.GivenAsync("I make the following manual merchant deposits", ((string)(null)), table16, "Given ");
#line hidden
- global::Reqnroll.Table table70 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table17 = new global::Reqnroll.Table(new string[] {
"EmailAddress",
"Password",
"GivenName",
"FamilyName",
"EstateName",
"MerchantName"});
- table70.AddRow(new string[] {
+ table17.AddRow(new string[] {
"merchantuser@testmerchant1.co.uk",
"123456",
"TestMerchant",
"User1",
"Test Estate 1",
"Test Merchant 1"});
- table70.AddRow(new string[] {
+ table17.AddRow(new string[] {
"merchantuser@testmerchant2.co.uk",
"123456",
"TestMerchant",
@@ -440,14 +443,14 @@ await testRunner.GivenAsync("I have a token to access the estate management and
"Test Estate 2",
"Test Merchant 2"});
#line 90
- await testRunner.GivenAsync("I have created the following security users", ((string)(null)), table70, "Given ");
+ await testRunner.GivenAsync("I have created the following security users", ((string)(null)), table17, "Given ");
#line hidden
#line 95
await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant1.co.uk\" with password \"123456\" for M" +
"erchant \"Test Merchant 1\" for Estate \"Test Estate 1\" with client \"merchantClient" +
"\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table71 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table18 = new global::Reqnroll.Table(new string[] {
"DateTime",
"TransactionNumber",
"TransactionType",
@@ -466,7 +469,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and
"MessageType",
"AccountNumber",
"CustomerName"});
- table71.AddRow(new string[] {
+ table18.AddRow(new string[] {
"Today",
"1",
"Sale",
@@ -486,14 +489,14 @@ await testRunner.GivenAsync("I have a token to access the estate management and
"",
""});
#line 97
- await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table71, "When ");
+ await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table18, "When ");
#line hidden
#line 101
await testRunner.GivenAsync("I am logged in as \"merchantuser@testmerchant2.co.uk\" with password \"123456\" for M" +
"erchant \"Test Merchant 2\" for Estate \"Test Estate 2\" with client \"merchantClient" +
"\"", ((string)(null)), ((global::Reqnroll.Table)(null)), "Given ");
#line hidden
- global::Reqnroll.Table table72 = new global::Reqnroll.Table(new string[] {
+ global::Reqnroll.Table table19 = new global::Reqnroll.Table(new string[] {
"DateTime",
"TransactionNumber",
"TransactionType",
@@ -512,7 +515,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and
"MessageType",
"AccountNumber",
"CustomerName"});
- table72.AddRow(new string[] {
+ table19.AddRow(new string[] {
"Today",
"2",
"Sale",
@@ -532,7 +535,7 @@ await testRunner.GivenAsync("I have a token to access the estate management and
"",
""});
#line 103
- await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table72, "When ");
+ await testRunner.WhenAsync("I perform the following transactions", ((string)(null)), table19, "When ");
#line hidden
}
diff --git a/TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs b/TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs
index 3a66e39..26a76d3 100644
--- a/TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs
+++ b/TransactionProcessorACL.IntegrationTests/Shared/SharedSteps.cs
@@ -349,8 +349,14 @@ public async Task WhenICreateTheFollowingMerchants(DataTable table){
public async Task WhenICreateTheFollowingOperators(DataTable table){
var estates = this.TestingContext.Estates.Select(e => e.EstateDetails).ToList();
List<(EstateDetails estate, CreateOperatorRequest request)> requests = table.Rows.ToCreateOperatorRequests(estates);
+ List<(EstateDetails estate, CreateOperatorRequest request)> newRequests = new();
+ foreach ((EstateDetails estate, CreateOperatorRequest request) r in requests) {
+ newRequests.Add((r.estate, new CreateOperatorRequest {
+ OperatorId = Guid.NewGuid(), Name = r.request.Name, RequireCustomMerchantNumber = r.request.RequireCustomMerchantNumber, RequireCustomTerminalNumber = r.request.RequireCustomTerminalNumber,
+ }));
+ }
- List<(Guid, EstateOperatorResponse)> results = await this.TransactionProcessorSteps.WhenICreateTheFollowingOperators(this.TestingContext.AccessToken, requests);
+ List<(Guid, EstateOperatorResponse)> results = await this.TransactionProcessorSteps.WhenICreateTheFollowingOperators(this.TestingContext.AccessToken, newRequests);
foreach ((Guid, EstateOperatorResponse) result in results){
this.TestingContext.Logger.LogInformation($"Operator {result.Item2.Name} created with Id {result.Item2.OperatorId} for Estate {result.Item1}");
diff --git a/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj b/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj
index 8e66782..fbb078e 100644
--- a/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj
+++ b/TransactionProcessorACL.IntegrationTests/TransactionProcessorACL.IntegrationTests.csproj
@@ -24,7 +24,7 @@
-
+
all
diff --git a/TransactionProcessorACL/Handlers/MerchantHandlers.cs b/TransactionProcessorACL/Handlers/MerchantHandlers.cs
index 732d9c7..35c689f 100644
--- a/TransactionProcessorACL/Handlers/MerchantHandlers.cs
+++ b/TransactionProcessorACL/Handlers/MerchantHandlers.cs
@@ -51,8 +51,61 @@ public static async Task GetMerchant(IMediator mediator,
MerchantQueries.GetMerchantQuery query = new(claimsResult.Data.estateId, claimsResult.Data.merchantId);
Result result = await mediator.Send(query, cancellationToken);
- return ResponseFactory.FromResult(result, modelFactory.ConvertFrom);
+ return ResponseFactory.FromResult(result, MapMerchantResponse);
}
+
+ private static DataTransferObjects.Responses.MerchantResponse MapMerchantResponse(MerchantResponse merchantResponse) => new() {
+ EstateId = merchantResponse.EstateId,
+ MerchantId = merchantResponse.MerchantId,
+ EstateReportingId = merchantResponse.EstateReportingId,
+ MerchantName = merchantResponse.MerchantName,
+ MerchantReference = merchantResponse.MerchantReference,
+ MerchantReportingId = merchantResponse.MerchantReportingId,
+ NextStatementDate = merchantResponse.NextStatementDate,
+ SettlementSchedule = merchantResponse.SettlementSchedule switch {
+ SettlementSchedule.Weekly => DataTransferObjects.Responses.SettlementSchedule.Weekly,
+ SettlementSchedule.Monthly => DataTransferObjects.Responses.SettlementSchedule.Monthly,
+ _ => DataTransferObjects.Responses.SettlementSchedule.NotSet
+ },
+ Addresses = merchantResponse.Addresses.Select(MapAddress).ToList(),
+ Contacts = merchantResponse.Contacts.Select(MapContact).ToList(),
+ Contracts = merchantResponse.Contracts.Select(MapContract).ToList(),
+ Devices = new Dictionary(merchantResponse.Devices),
+ Operators = merchantResponse.Operators.Select(MapOperator).ToList()
+ };
+
+ private static DataTransferObjects.Responses.AddressResponse MapAddress(AddressResponse addressResponse) => new() {
+ AddressId = addressResponse.AddressId,
+ AddressLine1 = addressResponse.AddressLine1,
+ AddressLine2 = addressResponse.AddressLine2,
+ AddressLine3 = addressResponse.AddressLine3,
+ AddressLine4 = addressResponse.AddressLine4,
+ Country = addressResponse.Country,
+ PostalCode = addressResponse.PostalCode,
+ Region = addressResponse.Region,
+ Town = addressResponse.Town
+ };
+
+ private static DataTransferObjects.Responses.ContactResponse MapContact(ContactResponse contactResponse) => new() {
+ ContactId = contactResponse.ContactId,
+ ContactName = contactResponse.ContactName,
+ ContactPhoneNumber = contactResponse.ContactPhoneNumber,
+ ContactEmailAddress = contactResponse.ContactEmailAddress
+ };
+
+ private static DataTransferObjects.Responses.MerchantContractResponse MapContract(MerchantContractResponse contractResponse) => new() {
+ ContractId = contractResponse.ContractId,
+ IsDeleted = contractResponse.IsDeleted,
+ ContractProducts = contractResponse.ContractProducts.ToList()
+ };
+
+ private static DataTransferObjects.Responses.MerchantOperatorResponse MapOperator(MerchantOperatorResponse operatorResponse) => new() {
+ OperatorId = operatorResponse.OperatorId,
+ IsDeleted = operatorResponse.IsDeleted,
+ MerchantNumber = operatorResponse.MerchantNumber,
+ Name = operatorResponse.Name,
+ TerminalNumber = operatorResponse.TerminalNumber
+ };
}
public class PasswordTokenRequirement : IAuthorizationRequirement { }