using Newtonsoft.Json;
using System;

namespace InABox.Integration.Logikal
{
    public abstract class LogikalObject
    {
        public abstract LogikalMethod Method();

        public LogikalMessage ToMessage(Guid messageID)
        {
            var _result = new LogikalMessage()
            {
                ID = messageID,
                Method = Method(),
                Payload = JsonConvert.SerializeObject(this)
            };
            return _result;
        }

    }
}