public AllocationProvider(IAllocationSettings allocationSettings, IApiAuthenticationSettings apiAuthenticationSettings)
        {
            Check.If(allocationSettings).IsNotNull();
            Check.If(apiAuthenticationSettings).IsNotNull();

            _allocationSettings = allocationSettings;
            _apiAuthenticationSettings = apiAuthenticationSettings;
        }
        private static void PostAllocation(PropertyAllocation propertyAllocation, string url,
            IApiAuthenticationSettings apiAuthenticationSettings)
        {
            var restClient = new RestClient(url)
            {
                Authenticator = new HttpBasicAuthenticator(
                    apiAuthenticationSettings.AuthorisedApiCredentials.FirstOrDefault()?.AppId,
                    apiAuthenticationSettings.AuthorisedApiCredentials.FirstOrDefault()?.ApiKey)
            };

            var request = new RestRequest {RequestFormat = DataFormat.Json, Method = Method.POST};

            if(propertyAllocation != null)
                request.AddBody(propertyAllocation);

            var x = restClient.Execute(request);
        }
 public EmailInController(IEmailService emailService, IApiAuthenticationSettings apiAuthenticationSettings)
 {
     _emailService = emailService;
     _apiAuthenticationSettings = apiAuthenticationSettings;
 }
 public SmsController(ISmsService smsService, IApiAuthenticationSettings apiAuthenticationSettings)
 {
     _smsService = smsService;
     _apiAuthenticationSettings = apiAuthenticationSettings;
 }
 public CallInController(ICallService callService, IApiAuthenticationSettings apiAuthenticationSettings)
 {
     _callService = callService;
     _apiAuthenticationSettings = apiAuthenticationSettings;
 }