feat: adds endpoints 'client contacts' and 'contacts' and integration tests for all existing endpoints.

This commit is contained in:
Matthias Langhard
2021-03-24 08:22:58 +01:00
parent dd92939a6f
commit c5734a065c
28 changed files with 775 additions and 145 deletions

View File

@@ -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;
}
}