Exemple #1
0
        public void GetSupplierInvoicePaymentTest()
        {
            var request  = new FortnoxApiRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret);
            var response = SupplierInvoicePaymentService.GetSupplierInvoicePaymentAsync(request, "1").GetAwaiter().GetResult();

            Assert.IsTrue(response.Amount == 3012.5m);
        }
Exemple #2
0
        public async Task GetSupplierInvoicePaymentsTest()
        {
            var request  = new SupplierInvoicePaymentListRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret);
            var response = await SupplierInvoicePaymentService.GetSupplierInvoicePaymentsAsync(request);

            Assert.IsTrue(response.Data.Count() > 0);
        }
Exemple #3
0
        public void UpdateSupplierInvoicePaymentTest()
        {
            var request = new FortnoxApiRequest(this.connectionSettings.AccessToken, this.connectionSettings.ClientSecret);
            var supplierInvoicePayment = new SupplierInvoicePayment {
                Number = 2, Amount = 99, InvoiceNumber = "1", ModeOfPayment = "BG"
            };

            var updatedSupplierInvoicePayment = SupplierInvoicePaymentService.UpdateSupplierInvoicePaymentAsync(request, supplierInvoicePayment).GetAwaiter().GetResult();

            Assert.AreEqual(99, updatedSupplierInvoicePayment.Amount);
        }