Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions EstateReportingAPI.BusinessLogic/ReportingManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,7 @@ from s in sJoin.DefaultIfEmpty()
Value = t.TransactionAmount,
FeeValue = msf != null ? msf.FeeValue : 0m,
SettlementId = s != null ? s.SettlementId : Guid.Empty,
TransactionNumber = Int32.Parse(t.TransactionNumber)
};
}

Expand Down Expand Up @@ -737,7 +738,8 @@ private static TransactionDetailReportResponse MapToTransactionDetailResponse(Li
Status = q.Status,
Value = q.Value,
TotalFees = q.FeeValue,
SettlementReference = q.SettlementId.ToString()
SettlementReference = q.SettlementId.ToString(),
TransactionNumber = q.TransactionNumber
}).ToList(),
Summary = new TransactionDetailSummary { TransactionCount = queryResults.Count(), TotalValue = queryResults.Sum(q => q.Value), TotalFees = queryResults.Sum(q => q.FeeValue) }
};
Expand Down Expand Up @@ -1466,7 +1468,8 @@ private sealed class TransactionDetailQueryResult {
public decimal Value { get; init; }
public decimal FeeValue { get; init; }
public Guid SettlementId { get; init; }
}
public Int32 TransactionNumber { get; init; }
}

private sealed class OperatorTransactionData {
public Guid MerchantId { get; init; }
Expand Down
2 changes: 2 additions & 0 deletions EstateReportingAPI.DataTrasferObjects/TransactionDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ public class TransactionDetail
public Decimal TotalFees { get; set; }
[JsonProperty("settlement_reference")]
public String SettlementReference { get; set; }
[JsonProperty("transaction_number")]
public Int32 TransactionNumber { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ public async Task TransactionsEndpoint_TransactionDetailReport_NoFilters_Transac
foreach (Transaction transaction in transactions) {
var foundTxn = transactionDetailReportResponse.Transactions.SingleOrDefault(t => t.Id == transaction.TransactionId);
foundTxn.ShouldNotBeNull(transaction.TransactionId.ToString());
foundTxn.TransactionNumber.ShouldNotBe(0);
}
}

Expand Down
1 change: 1 addition & 0 deletions EstateReportingAPI.Models/TransactionDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ public class TransactionDetail {
public Decimal Value { get; set; }
public Decimal TotalFees { get; set; }
public String SettlementReference { get; set; }
public Int32 TransactionNumber { get; set; }
}
3 changes: 2 additions & 1 deletion EstateReportingAPI/Handlers/TransactionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ TransactionDetailReportResponse SuccessFactory (Models.TransactionDetailReportRe
OperatorId = t.OperatorId,
MerchantReportingId = t.MerchantReportingId,
ProductId = t.ProductId,
ProductReportingId = t.ProductReportingId
ProductReportingId = t.ProductReportingId,
TransactionNumber = t.TransactionNumber

})
.ToList()
Expand Down
Loading