|
13 | 13 | public static class SettlementAggregateExtensions{ |
14 | 14 | public static void MarkFeeAsSettled(this SettlementAggregate aggregate, Guid merchantId, Guid transactionId, Guid feeId) |
15 | 15 | { |
16 | | - (Guid transactionId, Guid merchantId, CalculatedFee calculatedFee) pendingFee = aggregate.CalculatedFeesPendingSettlement.Where(c => c.merchantId == merchantId && c.transactionId == transactionId && c.calculatedFee.FeeId == feeId) |
17 | | - .SingleOrDefault(); |
| 16 | + (Guid transactionId, Guid merchantId, CalculatedFee calculatedFee) pendingFee = aggregate.CalculatedFeesPendingSettlement |
| 17 | + .SingleOrDefault(c => c.merchantId == merchantId && c.transactionId == transactionId && c.calculatedFee.FeeId == feeId); |
18 | 18 |
|
19 | | - (Guid transactionId, Guid merchantId, CalculatedFee calculatedFee) settledFee = aggregate.SettledCalculatedFees.Where(c => c.merchantId == merchantId && c.transactionId == transactionId && c.calculatedFee.FeeId == feeId) |
20 | | - .SingleOrDefault(); |
| 19 | + (Guid transactionId, Guid merchantId, CalculatedFee calculatedFee) settledFee = aggregate.SettledCalculatedFees |
| 20 | + .SingleOrDefault(c => c.merchantId == merchantId && c.transactionId == transactionId && c.calculatedFee.FeeId == feeId); |
21 | 21 |
|
22 | 22 | if (settledFee != default((Guid, Guid, CalculatedFee))) |
23 | 23 | { |
@@ -53,11 +53,11 @@ public static void MarkFeeAsSettled(this SettlementAggregate aggregate, Guid mer |
53 | 53 |
|
54 | 54 | public static void ImmediatelyMarkFeeAsSettled(this SettlementAggregate aggregate, Guid merchantId, Guid transactionId, Guid feeId) |
55 | 55 | { |
56 | | - (Guid transactionId, Guid merchantId, CalculatedFee calculatedFee) pendingFee = aggregate.CalculatedFeesPendingSettlement.Where(c => c.merchantId == merchantId && c.transactionId == transactionId && c.calculatedFee.FeeId == feeId) |
57 | | - .SingleOrDefault(); |
| 56 | + (Guid transactionId, Guid merchantId, CalculatedFee calculatedFee) pendingFee = aggregate.CalculatedFeesPendingSettlement |
| 57 | + .SingleOrDefault(c => c.merchantId == merchantId && c.transactionId == transactionId && c.calculatedFee.FeeId == feeId); |
58 | 58 |
|
59 | | - (Guid transactionId, Guid merchantId, CalculatedFee calculatedFee) settledFee = aggregate.SettledCalculatedFees.Where(c => c.merchantId == merchantId && c.transactionId == transactionId && c.calculatedFee.FeeId == feeId) |
60 | | - .SingleOrDefault(); |
| 59 | + (Guid transactionId, Guid merchantId, CalculatedFee calculatedFee) settledFee = aggregate.SettledCalculatedFees |
| 60 | + .SingleOrDefault(c => c.merchantId == merchantId && c.transactionId == transactionId && c.calculatedFee.FeeId == feeId); |
61 | 61 |
|
62 | 62 | if (settledFee != default((Guid, Guid, CalculatedFee))) |
63 | 63 | { |
|
0 commit comments