private async Task <List <Payable> > GetTransactionsPayables(string transactionId, CancellationToken cancellationToken) { var payables = new List <Payable>(); var response = await PagarMe.GetTransactionsPayables(transactionId, _configuration); if (response.StatusCode == HttpStatusCode.OK) { var content = await response.Content.ReadAsStringAsync(); //var parsed = JObject.Parse(content); payables = JsonConvert.DeserializeObject <List <Payable> >( content ); } else { string content = await response.Content.ReadAsStringAsync(); await CreateErrorLog("payable-not-found", content, cancellationToken); } return(payables); }
private async Task <List <Payable> > GetTransactionsPayables(string transactionId) { var payables = new List <Payable>(); var response = await PagarMe.GetTransactionsPayables(transactionId, _configuration); if (response.StatusCode == HttpStatusCode.OK) { var content = await response.Content.ReadAsStringAsync(); payables = JsonConvert.DeserializeObject <List <Payable> >( content ); } else { string content = await response.Content.ReadAsStringAsync(); var exc = new Exception($"payable-not-found: {content}"); SentrySdk.CaptureException(exc); } return(payables); }