Exemplo n.º 1
0
        public async Task GetSupplierInvoicesTest()
        {
            var request     = new SupplierInvoiceListRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret);
            var invoiceList = await SupplierInvoiceService.GetSupplierInvoicesAsync(request);

            Assert.IsTrue(invoiceList.Data.ToList().Count > 0);
        }
Exemplo n.º 2
0
        private async Task <List <SupplierInvoiceSubset> > GetInvoices()
        {
            var request = new SupplierInvoiceListRequest(
                connectionSettings.AccessToken,
                connectionSettings.ClientSecret
                );

            return((await SupplierInvoiceService.GetSupplierInvoicesAsync(request)).Data?.ToList());
        }
Exemplo n.º 3
0
        public async Task GetSupplierInvoicesSearchTest()
        {
            var request = new SupplierInvoiceListRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret);

            request.SearchParameters = new Dictionary <SupplierInvoiceSearchParameters, object>();
            request.SearchParameters[SupplierInvoiceSearchParameters.Project] = "1";
            var invoiceList = await SupplierInvoiceService.GetSupplierInvoicesAsync(request);

            Assert.IsTrue(invoiceList.Data.ToList().Count > 0);
        }
Exemplo n.º 4
0
        public async Task GetSupplierInvoicesFromDateToDateTest()
        {
            var request = new SupplierInvoiceListRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret)
            {
                SearchParameters = new Dictionary <SupplierInvoiceSearchParameters, object>()
                {
                    { SupplierInvoiceSearchParameters.FromDate, "2018-02-18" },
                    { SupplierInvoiceSearchParameters.ToDate, "2030-12-31" },
                }
            };

            request.SearchParameters[SupplierInvoiceSearchParameters.FinancialYearDate] = DateTime.UtcNow.ToString("yyyy-MM-dd");

            var invoiceList = await SupplierInvoiceService.GetSupplierInvoicesAsync(request);

            Assert.IsNotNull(invoiceList);
        }
Exemplo n.º 5
0
        private async Task <ListedResourceResponse <SupplierInvoiceSubset> > GetSupplierInvoices()
        {
            var request = new SupplierInvoiceListRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret);

            return(await SupplierInvoiceService.GetSupplierInvoicesAsync(request));
        }