public bool DoesActionPlanExistAndBelongToCustomer(Guid actionPlanId, Guid interactionId, Guid customerId) { var documentDbProvider = new DocumentDBProvider(); var doesActionPlanExist = documentDbProvider.DoesActionPlanExistAndBelongToCustomer(actionPlanId, interactionId, customerId); return(doesActionPlanExist); }
public async Task <bool> DoesCustomerExist(Guid customerId) { var documentDbProvider = new DocumentDBProvider(); var doesCustomerExist = await documentDbProvider.DoesCustomerResourceExist(customerId); return(doesCustomerExist); }
public async Task <Session> GetSessionForCustomerAsync(Guid customerId, Guid sessionId) { var documentDbProvider = new DocumentDBProvider(); var session = await documentDbProvider.GetSessionForCustomerAsync(customerId, sessionId); return(session); }
public async Task <List <Models.Outcomes> > GetOutcomesAsync(Guid customerId) { var documentDbProvider = new DocumentDBProvider(); var Outcomes = await documentDbProvider.GetOutcomesForCustomerAsync(customerId); return(Outcomes); }
public async Task <bool> IsCustomerReadOnly(Guid customerId) { var documentDbProvider = new DocumentDBProvider(); var isCustomerReadOnly = await documentDbProvider.DoesCustomerHaveATerminationDate(customerId); return(isCustomerReadOnly); }
public async Task <Contact.Models.ContactDetails> GetContactDetailsForCustomerAsync(Guid customerId, Guid contactId) { var documentDbProvider = new DocumentDBProvider(); var contactdetails = await documentDbProvider.GetContactDetailForCustomerAsync(customerId, contactId); return(contactdetails); }
public bool DoesInteractionExist(Guid interactionId) { var documentDbProvider = new DocumentDBProvider(_configuration); var doesInteractionExist = documentDbProvider.DoesInteractionResourceExist(interactionId); return(doesInteractionExist); }
public async Task <Models.Subscriptions> GetSubscriptionsForCustomerAsync(Guid customerId, Guid subscriptionId) { var documentDbProvider = new DocumentDBProvider(); var subscriptions = await documentDbProvider.GetSubscriptionsForCustomerAsync(customerId, subscriptionId); return(subscriptions); }
public async Task <Models.Action> GetActionForCustomerAsync(Guid customerId, Guid actionId) { var documentDbProvider = new DocumentDBProvider(); var action = await documentDbProvider.GetActionForCustomerAsync(customerId, actionId); return(action); }
public async Task <List <Models.ActionPlan> > GetActionPlansAsync(Guid customerId) { var documentDbProvider = new DocumentDBProvider(); var actionPlans = await documentDbProvider.GetActionPlansForCustomerAsync(customerId); return(actionPlans); }
public async Task <Guid?> DoesSubscriptionExist(Guid customerId, string touchpointId) { var documentDbProvider = new DocumentDBProvider(); var doesSubscriptionExist = await documentDbProvider.DoesSubscriptionExist(customerId, touchpointId); return(doesSubscriptionExist); }
public async Task <List <Session> > GetSessionsAsync(Guid customerId) { var documentDbProvider = new DocumentDBProvider(); var sessions = await documentDbProvider.GetSessionsForCustomerAsync(customerId); return(sessions); }
public async Task <bool> DeleteAsync(Guid OutcomeId) { var documentDbProvider = new DocumentDBProvider(); var outcomes = await documentDbProvider.DeleteAsync(OutcomeId); return(outcomes); }
public async Task <Guid?> GetDiversityDetailIdAsync(Guid customerId) { var documentDbProvider = new DocumentDBProvider(); var diversityDetailId = await documentDbProvider.GetDiversityDetailIdForCustomerAsync(customerId); return(diversityDetailId); }
public async Task <List <Models.Customer> > GetAllCustomerAsync() { var documentDbProvider = new DocumentDBProvider(); var customer = documentDbProvider.GetAllCustomer(); return(await customer); }
public async Task <ContactDetails> GetContactDetailsForCustomerAsync(Guid customerGuid) { var documentDbProvider = new DocumentDBProvider(); var contactdetail = await documentDbProvider.GetContactDetailForCustomerAsync(customerGuid); return(contactdetail); }
public async Task <List <Models.Goal> > GetGoalsAsync(Guid customerId) { var documentDbProvider = new DocumentDBProvider(); var goals = await documentDbProvider.GetGoalsForCustomerAsync(customerId); return(goals); }
public async Task <Models.Transfer> GetTransferForCustomerAsync(Guid customerId, Guid transferId) { var documentDbProvider = new DocumentDBProvider(); var transfer = await documentDbProvider.GetTransferForCustomerAsync(customerId, transferId); return(transfer); }
public bool DoesCustomerExist(Guid customerId) { var documentDbProvider = new DocumentDBProvider(_configuration); var doesCustomerExist = documentDbProvider.DoesCustomerResourceExist(customerId); return(doesCustomerExist); }
public async Task <Models.Address> GetAddressForCustomerAsync(Guid customerId, Guid addressId) { var documentDbProvider = new DocumentDBProvider(); var address = await documentDbProvider.GetAddressForCustomerAsync(customerId, addressId); return(address); }
public async Task <Models.Outcomes> GetOutcomesForCustomerAsync(Guid customerId, Guid interactionId, Guid actionplanId, Guid OutcomeId) { var documentDbProvider = new DocumentDBProvider(); var Outcomes = await documentDbProvider.GetOutcomesForCustomerAsync(customerId, interactionId, actionplanId, OutcomeId); return(Outcomes); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { string sqlConnectionString = Configuration.GetConnectionString("DefaultConnection"); var sqlProvider = new SqlProvider(); sqlProvider.ConnectionString = sqlConnectionString; var docProvider = new DocumentDBProvider(Configuration.GetConnectionString("DocumentDBUri"), Configuration.GetConnectionString("DocumentDBKey")); // Add framework services. services.AddMvc(); services.AddSingleton(typeof(DocumentDBProvider), docProvider); services.AddSingleton(typeof(SqlProvider), sqlProvider); services.AddApplicationInsightsTelemetry(Configuration); var storageAccount = CloudStorageAccount.Parse(Configuration.GetConnectionString("StorageConnectionString")); // Create the table client. var tableClient = storageAccount.CreateCloudTableClient(); services.AddSingleton(typeof(CloudTableClient), tableClient); Task.Run(() => { var generateArticles = new Services.GenerateArticles(sqlConnectionString, docProvider, tableClient); generateArticles.GenerateUsersArticles(); }); }
public async Task <Models.Diversity> GetDiversityByIdAsync(Guid customerId, Guid diversityId) { var documentDbProvider = new DocumentDBProvider(); var diversityDetail = await documentDbProvider.GetDiversityDetailForCustomerAsync(customerId, diversityId); return(diversityDetail); }
public async Task <List <Models.WebChat> > GetWebChatsForCustomerAsync(Guid customerId, Guid interactionId) { var documentDbProvider = new DocumentDBProvider(); var webChats = await documentDbProvider.GetWebChatsForCustomerAsync(customerId, interactionId); return(webChats); }
public bool DoesInteractionResourceExistAndBelongToCustomer(Guid interactionId, Guid customerId) { var documentDbProvider = new DocumentDBProvider(); var doesInteractionExist = documentDbProvider.DoesInteractionResourceExistAndBelongToCustomer(interactionId, customerId); return(doesInteractionExist); }
public async Task <Subscriptions> CreateSubscriptionAsync(Models.Transfer transfer) { if (transfer == null) { return(null); } var subscription = new Subscriptions { SubscriptionId = Guid.NewGuid(), CustomerId = transfer.CustomerId, TouchPointId = transfer.TargetTouchpointId, Subscribe = true, LastModifiedDate = transfer.LastModifiedDate, }; if (!transfer.LastModifiedDate.HasValue) { subscription.LastModifiedDate = DateTime.Now; } var documentDbProvider = new DocumentDBProvider(); var response = await documentDbProvider.CreateSubscriptionsAsync(subscription); return(response.StatusCode == HttpStatusCode.Created ? (dynamic)response.Resource : (Guid?)null); }
public static async Task SaveNotificationToDBAsync(int rspHttpCode, string MessageId, Notification rspNotification, string AppIdUri, string ClientUrl, string BearerToken, bool Success) { var DBNotification = new DBNotification { MessageId = MessageId, HttpCode = rspHttpCode, AppIdUri = AppIdUri, ClientUrl = ClientUrl, BearerToken = string.Empty, Success = Success, Notification = rspNotification, Timestamp = DateTime.UtcNow }; var documentDbProvider = new DocumentDBProvider(); try { await documentDbProvider.CreateNotificationAsync(DBNotification); } catch (Exception) { throw; } }
public async Task <List <Subscriptions> > GetSubscriptionsAsync(Guid customerGuid) { var documentDbProvider = new DocumentDBProvider(); var subscriptions = await documentDbProvider.GetSubscriptionsByCustomerIdAsync(customerGuid); return(subscriptions); }
public async Task <List <Models.Transfer> > GetTransfersAsync(Guid customerId) { var documentDbProvider = new DocumentDBProvider(); var transfers = await documentDbProvider.GetTransfersForCustomerAsync(customerId); return(transfers); }
public async Task <Models.Customer> GetCustomerAsync(Guid customerId) { var documentDbProvider = new DocumentDBProvider(); var customer = await documentDbProvider.GetCustomerByIdAsync(customerId); return(customer); }