Beispiel #1
0
        static void AddCustomerLog(StoreManager neto)
        {
            Entities.Customers.CustomerLog.CustomerLogs customerLogs = new Entities.Customers.CustomerLog.CustomerLogs
            {
                CustomerLog = new CustomerLog[] {
                    new CustomerLog {
                        Username             = "******",
                        DateRequiredFollowUp = DateTime.Now.AddDays(14),
                        Notes  = "Example customer log",
                        Status = Status.RequireRecontact
                    }
                }
            };


            var result = neto.Customers.AddCustomerLog(customerLogs);

            switch (result.Ack)
            {
            case Ack.Success:
                foreach (var i in result.CustomerLog)
                {
                    Console.WriteLine($"Created LogId:{i.LogID} at {result.CurrentTime}");
                }
                break;

            case Ack.Warning:
                foreach (var warn in result.Messages.Warning)
                {
                    Console.WriteLine($"Warning: {warn.Message}");
                }
                break;
            }
        }
        public UpdateCustomerLogResponse UpdateCustomerLog(Entities.Customers.CustomerLog.CustomerLogs customerLogs)
        {
            UpdateCustomerLogFilter updateCustomerLogFilter = new UpdateCustomerLogFilter(customerLogs);

            var nRequest  = new UpdateCustomerLogRequest(updateCustomerLogFilter);
            var nResponse = GetResponse <UpdateCustomerLogResponse>(nRequest);

            return(nResponse);
        }
        public AddCustomerLogResponse AddCustomerLog(Entities.Customers.CustomerLog.CustomerLogs customerLogs)
        {
            AddCustomerLogFilter addCustomerLogFilter = new AddCustomerLogFilter(customerLogs);


            var nRequest  = new AddCustomerLogRequest(addCustomerLogFilter);
            var nResponse = GetResponse <AddCustomerLogResponse>(nRequest);


            return(nResponse);
        }
Beispiel #4
0
        public void Should_Add_CustomerLog()
        {
            var netoStore = GetStoreManager();

            Entities.Customers.CustomerLog.CustomerLogs customerLogs = new Entities.Customers.CustomerLog.CustomerLogs
            {
                CustomerLog = new CustomerLog[] {
                    GetTestAddCustomerLog()
                }
            };

            var result = netoStore.Customers.AddCustomerLog(customerLogs);

            Assert.IsNotNull(result);
            Assert.AreEqual(Ack.Success, result.Ack);
            Assert.AreEqual(result.CustomerLog.Count, 1);
        }
Beispiel #5
0
        public void Should_Update_CustomerLog(int logid)
        {
            var netoStore = GetStoreManager();

            Entities.Customers.CustomerLog.CustomerLogs customerLogs = new Entities.Customers.CustomerLog.CustomerLogs
            {
                CustomerLog = new CustomerLog[] {
                    new CustomerLog {
                        LogID                = logid,
                        Username             = "******",
                        DateRequiredFollowUp = DateTime.Now.AddDays(21),
                        Notes                = "Example customer log updated",
                        Status               = Status.RequireRecontact
                    }
                }
            };


            var result = netoStore.Customers.UpdateCustomerLog(customerLogs);

            Assert.IsNotNull(result);
            Assert.AreEqual(Ack.Success, result.Ack);
        }
 public AddCustomerLogFilter(Entities.Customers.CustomerLog.CustomerLogs customerLogs)
 {
     this.CustomerLogs = customerLogs;
 }
 public UpdateCustomerLogFilter(Entities.Customers.CustomerLog.CustomerLogs customerLogs)
 {
     this.CustomerLogs = customerLogs;
 }