public async Task <ProposeDebtResponse> ProposeADebt(ProposeDebtRequest model)
        {
            var parameters = model
                             .ToDictionary()
                             .SetDynamicsActionAuditParameters(_auditContext);

            var result = await _client.ExecuteActionAsSingleAsync("ntt_BSSDebtCreate", parameters);

            var debtId    = result["DebtId"].ToString();
            var createdOn = result["CreatedOn"].ToString().ToDateTimeOffset(Constants.UkDateTimeFormat);

            var contentDict = model.ToDictionary();

            contentDict.Add("ntt_BSSDebtCreate", true);
            await _auditService.PerformAuditing(_auditContext.ToAuditDetail(contentDict));

            return(new ProposeDebtResponse
            {
                DebtId = new Guid(debtId),
                CreatedOn = createdOn,
            });
        }
        public async Task <ActionResult <ProposeDebtResponse> > ProposeADebt([FromRoute] Guid id, [FromBody] ProposeDebtRequest model)
        {
            model.MoratoriumId = id;
            model.CreditorId   = GetOrganisationId();

            var result = await _creditorGateway.ProposeADebt(model);

            return(Ok(result));
        }