예제 #1
0
        private async Task <int> GetClientIdAsync()
        {
            var clientRepository = new ClientsRepository(billingoApi);
            var clients          = await clientRepository.GetListAsync(1, 1);

            return(clients?.SingleOrDefault()?.Id ?? (await clientRepository.CreateAsync(new Client
            {
                Name = "Test Elek",
                Email = "*****@*****.**",
                Billing_address = new BillingAddress
                {
                    Country = "Magyarország",
                    Postcode = "1117",
                    City = "Budapest",
                    Street_name = "Test",
                    Street_type = "utca",
                    House_nr = "10",
                },
                Bank = new Bank
                {
                    Account_no = "11739009-23905470-"
                },
                Defaults = new Defaults
                {
                    Electronic_invoice = "true",
                    Invoice_currency = "HUF"
                }
            })).Id);
        }