private static HttpClient BuildJobberHttpClientFrom(JobberConfig jobberConfig) { return(new HttpClient(new JobberHttpClient(jobberConfig.ApiKey)) { BaseAddress = new Uri(jobberConfig.BaseApiUrl) }); }
public IJobberClient CreateJobberClient(JobberConfig jobberConfig) { var httpClient = BuildJobberHttpClientFrom(jobberConfig); var jobberApi = RestService.For <IJobberApi>(httpClient); return(new JobberClient(jobberApi)); }