public static string[] MappingDtoResponseToEchoMessage(ConsultaExtratoResponseDTO consultaExtratoResponse, ConsultaSaldoResponseDTO consultaSaldoResponse)
        {
            string[] arguments =
            {
                consultaExtratoResponse.Data.Transaction[0].TransactionInformation,
                consultaExtratoResponse.Data.Transaction[0].ValueDateTime.Day.ToString(),
                consultaExtratoResponse.Data.Transaction[0].ValueDateTime.Month.ToString(),
                consultaExtratoResponse.Data.Transaction[0].Balance.Amount.amount.ToString("C2",       CultureInfo.CurrentCulture),

                consultaExtratoResponse.Data.Transaction[0].Amount.amount >= 0? "positivo": "negativo",
                consultaExtratoResponse.Data.Transaction[0].Amount.amount.ToString("C2",               CultureInfo.CurrentCulture),
            };
            return(arguments);
        }
示例#2
0
 public static string[] MappingDtoResponseToEchoMessage(ConsultaExtratoResponseDTO consultaExtratoResponse)
 {
     string[] arguments =
     {
         consultaExtratoResponse.Data.Transaction.Count.ToString(),
         consultaExtratoResponse.Data.Transaction[0].TransactionId,
         consultaExtratoResponse.Data.Transaction[0].TransactionInformation,
         consultaExtratoResponse.Data.Transaction[0].Balance.Amount.amount.ToString("C2",       CultureInfo.CurrentCulture),
         consultaExtratoResponse.Data.Transaction[0].CreditDebitIndicator,
         consultaExtratoResponse.Data.Transaction[0].ValueDateTime.Day.ToString(),
         consultaExtratoResponse.Data.Transaction[0].ProprietaryBankTransactionCode.Issuer,
         consultaExtratoResponse.Data.Transaction[0].Amount.amount >= 0? "positivo": "negativo",
         consultaExtratoResponse.Data.Transaction[0].Amount.amount.ToString("C2",               CultureInfo.CurrentCulture),
     };
     return(arguments);
 }
示例#3
0
        public async System.Threading.Tasks.Task <SkillResponse> ExecuteIntentAsync()
        {
            SkillResponse response = await PermissionValidator.ValidatorAsync(_input, _locale);

            if (response != null)
            {
                return(response);
            }

            string result = await HttpSenderApi.Call("open-banking/v1/accounts/" + _acc + "/transactions", _token);

            ConsultaExtratoResponseDTO consultaExtratoResponse = JsonConvert.DeserializeObject <ConsultaExtratoResponseDTO>(result);

            string[] arguments       = MappingDtoResponseToEchoMessage(consultaExtratoResponse);
            var      consultaExtrato = await _locale.Get(LanguageKeys.ConsultaExtrato, arguments);

            return(ResponseBuilder.Ask(consultaExtrato, null, _input.Session));
        }