﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Net.Moloni.Model;
using System.Threading;

namespace Net.Moloni
{
    public class MasterDataContext : BaseContext, IMasterDataContext
    {
        internal MasterDataContext(ServiceClient client) 
            : base(client)
        {
        }

        public Task<IEnumerable<LanguageInfo>> GetAllLanguages()
        {
            return this.client.GetAsync<IEnumerable<LanguageInfo>>("languages/getAll", 
                null, new CancellationToken());
        }

        public Task<IEnumerable<ExchangeCurrencyInfo>> GetAllExchangeCurrencies()
        {
            return this.client.GetAsync<IEnumerable<ExchangeCurrencyInfo>>("currencyExchange/getAll",
                null, new CancellationToken());
        }

        public Task<IEnumerable<TaxExemptionInfo>> GetAllTaxExemptions()
        {
            return this.client.GetAsync<IEnumerable<TaxExemptionInfo>>("taxExemptions/getAll",
                null, new CancellationToken());
        }
    }
}
