feat: adds endpoints 'client contacts' and 'contacts' and integration tests for all existing endpoints.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Novaloop.PaymoApi.ClientContacts;
|
||||
using Novaloop.PaymoApi.Clients;
|
||||
using Novaloop.PaymoApi.Shared;
|
||||
using Novaloop.PaymoApi.Tasks;
|
||||
|
||||
@@ -13,7 +15,9 @@ namespace Novaloop.PaymoApi.Extensions
|
||||
services.Configure(options);
|
||||
var resolvedOptions = (IOptions<PaymoApiOptions>) services.BuildServiceProvider().GetService(typeof(IOptions<PaymoApiOptions>));
|
||||
services.AddHttpClient<PaymoApiClient>(client => { client.BaseAddress = new Uri(resolvedOptions.Value.BaseUrl); });
|
||||
services.AddTransient<IPaymoTasksApiService, PaymoTasksApiService>();
|
||||
services.AddTransient<IPaymoTasksApi, PaymoTasksApi>();
|
||||
services.AddTransient<IPaymoClientContactsApi, PaymoClientContactsApi>();
|
||||
services.AddTransient<IPaymoClientsApi, PaymoClientsApi>();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user