Ejemplo n.º 1
0
        private Task <ExecuteConsumerLoanFulfillmentArrangementDisbursementResponse> SetDisbursementFields(string cr_reference_id, ExecuteConsumerLoanFulfillmentArrangementDisbursementRequest body, bool overwriteAmount = false)
        {
            return(Task.Run(() =>
            {
                if (body == null)
                {
                    return new ExecuteConsumerLoanFulfillmentArrangementDisbursementResponse();
                }

                var loan = PrepareLoanForExecution(cr_reference_id, body, "msfsi_disbursementdate",
                                                   "msfsi_disbursedamount", overwriteAmount);

                _cdsWebApi.Update("msfsi_financialproducts", loan);

                return new ExecuteConsumerLoanFulfillmentArrangementDisbursementResponse()
                {
                    Amount = loan.Attributes.ContainsKey("msfsi_disbursedamount")
                             ? new Amount()
                    {
                        Currency = "USD",
                        Value = loan.Attributes["msfsi_disbursedamount"].ToString()
                    }
                             : body.Amount,
                    Currency = body.Currency,
                    CustomerReference = body.CustomerReference,
                    PayeeBankReference = body.PayeeBankReference,
                    PayeeProductInstanceReference = body.PayeeProductInstanceReference,
                    PayeeReference = body.PayeeReference,
                    ValueDate = body.ValueDate
                };
            }));
        }
Ejemplo n.º 2
0
 public Task <ExecuteConsumerLoanFulfillmentArrangementDisbursementResponse> ExecuteConsumerLoanFulfillmentArrangementDisbursementUpdateAsync(string cr_reference_id, string bq_reference_id, ExecuteConsumerLoanFulfillmentArrangementDisbursementRequest body = null)
 {
     return(SetDisbursementFields(cr_reference_id, body));
 }