예제 #1
0
        public async Task GetTaxReductionsTest()
        {
            var request  = new TaxReductionListRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret);
            var response = await TaxReductionService.GetTaxReductionsAsync(request);

            Assert.IsNotNull(response);
        }
예제 #2
0
        public async Task GetTaxReductionTest()
        {
            var taxReductions = await GetTaxReductions();

            if (!taxReductions.Data.Any())
            {
                Assert.Inconclusive("No TaxReductions exist in the system");
                return;
            }

            var request  = new FortnoxApiRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret);
            var response = await TaxReductionService.GetTaxReductionAsync(
                request,
                taxReductions.Data.First().Id
                );

            Assert.IsTrue(response.Id == taxReductions.Data.First().Id);
        }
예제 #3
0
        private async Task <ListedResourceResponse <TaxReduction> > GetTaxReductions()
        {
            var request = new TaxReductionListRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret);

            return(await TaxReductionService.GetTaxReductionsAsync(request));
        }