public async Task Get_AllTransactionType()
        {
            var service = new TransactionTypeService(_httpClient);
            var result  = await service.GetAllTransactionTypes(requestUri);

            // Assert
            Assert.False(result.Status == HttpStatusCode.BadRequest, "ERROR");
            Assert.True(result.Status == HttpStatusCode.OK, "OK");
        }
Пример #2
0
        public async void GetTransactions()
        {
            #region Get Id Transaction Type

            var serviceTransactionType = new TransactionTypeService(_httpClient);
            var resultTransactionType  = await serviceTransactionType.GetAllTransactionTypes(requestUri + "TransactionType-management/");

            #endregion
        }
        public static async Task <dynamic> Information()
        {
            var serviceTransactionType = new TransactionTypeService(_httpClient);
            var resultTransactionType  = await serviceTransactionType.GetAllTransactionTypes(requestUri);

            List <TransactionType> statusTrans = new List <TransactionType>();

            foreach (var item in resultTransactionType.Data)
            {
                statusTrans.Add(new TransactionType {
                    Id = item.Id, Name = item.Name
                });
            }

            return(statusTrans);
        }
        public static async Task <List <string> > InformationCombo()
        {
            List <string> typesTrans = new List <string>();

            try
            {
                var serviceTransactionType = new TransactionTypeService(_httpClient);
                var resultTransactionType  = await serviceTransactionType.GetAllTransactionTypes(requestUri);

                typesTrans.Add("CRÉDITO / DÉBITO");

                foreach (var item in resultTransactionType.Data)
                {
                    typesTrans.Add(item.Name);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Erro servidor - " + ex.Message);
            }

            return(typesTrans);
        }