using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;

namespace Wex.Sdk
{
    public static class WexSdkStartupExtensions
    {
        public static IServiceCollection AddWexSdk(this IServiceCollection services, string wexAddress)
        {
            services.AddHttpClient(Defaults.ServiceName, d =>
            {
                d.BaseAddress = new Uri(wexAddress);
            });

            services.AddScoped<IWexClient, WexClient>()
                ;
            return services;
        }
    }
}
