Exemple #1
0
        public async Task <IStatusCodeActionResult> RemoveDebt([FromRoute] Guid id, [FromBody] RemoveDebtRequest removeDebtRequest)
        {
            removeDebtRequest.DebtId = id;
            await _moneyAdviserGateway.RemoveDebt(removeDebtRequest);

            return(Ok());
        }
        public async Task RemoveDebt(RemoveDebtRequest removeDebtRequest)
        {
            var parameters = removeDebtRequest
                             .ToDictionary()
                             .SetDynamicsActionAuditParameters(_auditContext);

            await _client.For <Ntt_breathingspacedebt>()
            .Key(removeDebtRequest.DebtId)
            .Action("ntt_BSSAPIMADebtMoneyAdviserRemove")
            .Set(parameters)
            .ExecuteAsSingleAsync();

            var contentDict = removeDebtRequest.ToDictionary();

            contentDict.Add(nameof(removeDebtRequest.DebtId), removeDebtRequest.DebtId);
            contentDict.Add("ntt_BSSAPIMADebtMoneyAdviserRemove", true);
            await _auditService.PerformAuditing(_auditContext.ToAuditDetail(contentDict));
        }