using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace UnifiedPOS.MICR.V1_4
{
    [ServiceContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public interface MICR
    {
        #region Version 1.1

        //
        // Common Properties
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetAutoDisable", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetAutoDisableResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        bool GetAutoDisable(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetAutoDisable", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetAutoDisableResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void SetAutoDisable(string ConsumerID, bool AutoDisable);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCapCompareFirmwareVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCapCompareFirmwareVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        bool GetCapCompareFirmwareVersion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCapPowerReporting", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCapPowerReportingResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        PowerReporting GetCapPowerReporting(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCapStatisticsReporting", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCapStatisticsReportingResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        bool GetCapStatisticsReporting(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCapUpdateFirmware", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCapUpdateFirmwareResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        bool GetCapUpdateFirmware(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCapUpdateStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCapUpdateStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        bool GetCapUpdateStatistics(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCheckHealthText", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCheckHealthTextResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetCheckHealthText(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetClaimed", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetClaimedResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        bool GetClaimed(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDataCount", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDataCountResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        int GetDataCount(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDataEventEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDataEventEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        bool GetDataEventEnabled(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetDataEventEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetDataEventEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void SetDataEventEnabled(string ConsumerID, bool DataEventEnabled);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDeviceEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDeviceEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        bool GetDeviceEnabled(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetDeviceEnabled", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetDeviceEnabledResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void SetDeviceEnabled(string ConsumerID, bool DeviceEnabled);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetFreezeEvents", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetFreezeEventsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        bool GetFreezeEvents(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetFreezeEvents", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetFreezeEventsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void SetFreezeEvents(string ConsumerID, bool FreezeEvents);

        // [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetOutputID", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetOutputIDResponse")]
        // [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        // int GetOutputID(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetPowerNotify", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetPowerNotifyResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        PowerNotification GetPowerNotify(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetPowerNotify", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetPowerNotifyResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void SetPowerNotify(string ConsumerID, PowerNotification PowerNotify);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetPowerState", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetPowerStateResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        PowerState GetPowerState(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetState", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetStateResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        ControlState GetState(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDeviceControlDescription", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDeviceControlDescriptionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetDeviceControlDescription(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDeviceControlVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDeviceControlVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        UposVersion GetDeviceControlVersion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDeviceServiceDescription", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDeviceServiceDescriptionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetDeviceServiceDescription(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDeviceServiceVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetDeviceServiceVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        UposVersion GetDeviceServiceVersion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetPhysicalDeviceDescription", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetPhysicalDeviceDescriptionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetPhysicalDeviceDescription(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetPhysicalDeviceName", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetPhysicalDeviceNameResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetPhysicalDeviceName(string ConsumerID);

        //
        // Specific Properties
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetAccountNumber", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetAccountNumberResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetAccountNumber(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetAmount", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetAmountResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetAmount(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetBankNumber", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetBankNumberResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetBankNumber(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCapValidationDevice", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCapValidationDeviceResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        bool GetCapValidationDevice(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCheckType", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCheckTypeResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        CheckType GetCheckType(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCountryCode", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetCountryCodeResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        CheckCountryCode GetCountryCode(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetEPC", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetEPCResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetEPC(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetRawData", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetRawDataResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetRawData(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetSerialNumber", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetSerialNumberResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetSerialNumber(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetTransitNumber", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetTransitNumberResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetTransitNumber(string ConsumerID);

        //
        // Common Methods
        //

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/Open", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/OpenResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        //void Open(string ConsumerID, string EndpointAddress);

        //[OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/Close", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/CloseResponse")]
        //[FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        //void Close(string ConsumerID, string EndpointAddress);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/Claim", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/ClaimResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void Claim(string ConsumerID, int Timeout);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/Release", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/ReleaseResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void Release(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/CheckHealth", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/CheckHealthResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void CheckHealth(string ConsumerID, HealthCheckLevel Level);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/ClearInput", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/ClearInputResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void ClearInput(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/ClearInputProperties", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/ClearInputPropertiesResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void ClearInputProperties(string ConsumerID);

        // [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/ClearOutput", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/ClearOutputResponse")]
        // [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        // void ClearOutput(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/DirectIO", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/DirectIOResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        DirectIOData DirectIO(string ConsumerID, int Command, int Data, object Obj);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/CompareFirmwareVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/CompareFirmwareVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        CompareFirmwareResult CompareFirmwareVersion(string ConsumerID, string FirmwareFileName);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/ResetStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/ResetStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void ResetStatistics(string ConsumerID, StatisticList StatisticsBuffer);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/RetrieveStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/RetrieveStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string RetrieveStatistics(string ConsumerID, StatisticList StatisticsBuffer);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UpdateFirmware", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/UpdateFirmwareResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void UpdateFirmware(string ConsumerID, string FirmwareFileName);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UpdateStatistics", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/UpdateStatisticsResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void UpdateStatistics(string ConsumerID, StatisticList StatisticsBuffer);

        //
        // Specific Methods
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/BeginInsertion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/BeginInsertionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void BeginInsertion(string ConsumerID, int Timeout);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/BeginRemoval", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/BeginRemovalResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void BeginRemoval(string ConsumerID, int Timeout);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/EndInsertion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/EndInsertionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void EndInsertion(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/EndRemoval", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/EndRemovalResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void EndRemoval(string ConsumerID);

        #endregion

        #region Version 1.2

        //
        // Session Management
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetWSPOSVersion", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetWSPOSVersionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        UposVersion GetWSPOSVersion();

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GenerateConsumerID", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GenerateConsumerIDResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GenerateConsumerID();

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/OpenSession", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/OpenSessionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void OpenSession(string ConsumerID, string EndpointAddress);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/CloseSession", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/CloseSessionResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void CloseSession(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetProviderSessionTimeout", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetProviderSessionTimeoutResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        int GetProviderSessionTimeout(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/KeepAlive", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/KeepAliveResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void KeepAlive(string ConsumerID);

        //
        // Device Control
        // 

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/OpenDevice", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/OpenDeviceResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void OpenDevice(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/CloseDevice", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/CloseDeviceResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void CloseDevice(string ConsumerID);

        //
        // Event Polling
        //

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/PollForUPOSEvent", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/PollForUPOSEventResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        MICREvent PollForUPOSEvent(string ConsumerID);

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetEventResponse", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetEventResponseResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void SetEventResponse(string ConsumerID, MICREventResponse EventResponse);

        #endregion

        #region Version 1.3

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetEncryptedClaimedConsumerID", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/GetEncryptedClaimedConsumerIDResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        string GetEncryptedClaimedConsumerID();

        [OperationContract(Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetEventRequestProperties", ReplyAction = "http://www.nrf-arts.org/UnifiedPOS/MICR/SetEventRequestPropertiesResponse")]
        [FaultContract(typeof(UposException), Action = "http://www.nrf-arts.org/UnifiedPOS/MICR/UposException", Name = "UposException")]
        void SetEventRequestProperties(string ConsumerID, PropertyNameList list);

        #endregion

    }

    #region Version 1.1

    //
    // Common Data Types
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class DirectIOData
    {
        [DataMember]
        public int Data { get; set; }
        [DataMember]
        public object Obj { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class UposException
    {
        [DataMember]
        public ErrorCode ErrorCode { get; set; }
        [DataMember]
        public int ErrorCodeExtended { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class UposVersion
    {
        [DataMember]
        public int Major { get; set; }
        [DataMember]
        public int Minor { get; set; }
        [DataMember]
        public int Build { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class Statistic
    {
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string Value { get; set; }
    }

    [CollectionDataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/", ItemName = "Statistic")]
    public class StatisticList : List<Statistic>
    {
    }

    //
    // Common Enumerations
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public enum CompareFirmwareResult
    {
        [EnumMember]
        CFV_FIRMWARE_OLDER,
        [EnumMember]
        CFV_FIRMWARE_SAME,
        [EnumMember]
        CFV_FIRMWARE_NEWER,
        [EnumMember]
        CFV_FIRMWARE_DIFFERENT,
        [EnumMember]
        CFV_FIRMWARE_UNKNOWN,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public enum ControlState
    {
        [EnumMember]
        S_CLOSED,
        [EnumMember]
        S_IDLE,
        [EnumMember]
        S_BUSY,
        [EnumMember]
        S_ERROR,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public enum ErrorCode
    {
        [EnumMember]
        E_CLOSED,
        [EnumMember]
        E_CLAIMED,
        [EnumMember]
        E_NOTCLAIMED,
        [EnumMember]
        E_NOSERVICE,
        [EnumMember]
        E_DISABLED,
        [EnumMember]
        E_ILLEGAL,
        [EnumMember]
        E_NOHARDWARE,
        [EnumMember]
        E_OFFLINE,
        [EnumMember]
        E_NOEXIST,
        [EnumMember]
        E_EXISTS,
        [EnumMember]
        E_FAILURE,
        [EnumMember]
        E_TIMEOUT,
        [EnumMember]
        E_BUSY,
        [EnumMember]
        E_EXTENDED,
        [EnumMember]
        E_DEPRECATED,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public enum HealthCheckLevel
    {
        [EnumMember]
        CH_INTERNAL,
        [EnumMember]
        CH_EXTERNAL,
        [EnumMember]
        CH_INTERACTIVE,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public enum PowerNotification
    {
        [EnumMember]
        PN_DISABLED,
        [EnumMember]
        PN_ENABLED,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public enum PowerReporting
    {
        [EnumMember]
        PR_NONE,
        [EnumMember]
        PR_STANDARD,
        [EnumMember]
        PR_ADVANCED,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public enum PowerState
    {
        [EnumMember]
        PS_UNKNOWN,
        [EnumMember]
        PS_ONLINE,
        [EnumMember]
        PS_OFF,
        [EnumMember]
        PS_OFFLINE,
        [EnumMember]
        PS_OFF_OFFLINE,
    }

    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public enum StatisticCategories
    {
        [EnumMember]
        All,
        [EnumMember]
        Manufacturer,
        [EnumMember]
        Upos,
    }
    */
    public class StatisticCategories
    {
        public const string All = "";
        public const string Manufacturer = "M_";
        public const string Upos = "U_";
    }

    //
    // Specific Data Types
    //

    //
    // Specific Enumerations
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public enum CheckCountryCode
    {
        [EnumMember]
        MICR_CC_USA,
        [EnumMember]
        MICR_CC_AUSTRALIA,
        [EnumMember]
        MICR_CC_CANADA,
        [EnumMember]
        MICR_CC_COLOMBIA,
        [EnumMember]
        MICR_CC_FRANCE,
        [EnumMember]
        MICR_CC_INDIA,
        [EnumMember]
        MICR_CC_ISRAEL,
        [EnumMember]
        MICR_CC_MEXICO,
        [EnumMember]
        MICR_CC_JAPAN,
        [EnumMember]
        MICR_CC_TURKEY,
        [EnumMember]
        MICR_CC_SPAIN,
        [EnumMember]
        MICR_CC_UK,
        [EnumMember]
        MICR_CC_OTHER,
        [EnumMember]
        MICR_CC_UNKNOWN,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public enum CheckType
    {
        [EnumMember]
        MICR_CT_PERSONAL,
        [EnumMember]
        MICR_CT_BUSINESS,
        [EnumMember]
        MICR_CT_UNKNOWN,
    }

    //
    // Constants
    //

    /*
    public class Constants
    {
        public const int ExtendedErrorBadData = 203;
        public const int ExtendedErrorBadSize = 205;
        public const int ExtendedErrorCheck = 202;
        public const int ExtendedErrorCheckDigit = 207;
        public const int ExtendedErrorCoverOpen = 208;
        public const int ExtendedErrorFirmwareBadFile = 281;
        public const int ExtendedErrorJam = 206;
        public const int ExtendedErrorNoCheck = 201;
        public const int ExtendedErrorNoData = 204;
        public const int ExtendedErrorStatistics = 280;
        public const int ExtendedErrorStatisticsDependency = 282;
        public const string StatisticCommunicationErrorCount = "CommunicationErrorCount";
        public const string StatisticDeviceCategory = "DeviceCategory";
        public const string StatisticFailedDataParseCount = "FailedDataParseCount";
        public const string StatisticFailedReadCount = "FailedReadCount";
        public const string StatisticFirmwareRevision = "FirmwareRevision";
        public const string StatisticGoodReadCount = "GoodReadCount";
        public const string StatisticHoursPoweredCount = "HoursPoweredCount";
        public const string StatisticInstallationDate = "InstallationDate";
        public const string StatisticInterface = "Interface";
        public const string StatisticManufactureDate = "ManufactureDate";
        public const string StatisticManufacturerName = "ManufacturerName";
        public const string StatisticMechanicalRevision = "MechanicalRevision";
        public const string StatisticModelName = "ModelName";
        public const string StatisticSerialNumber = "SerialNumber";
        public const string StatisticUnifiedPOSVersion = "UnifiedPOSVersion";
        public const int StatusPowerOff = 2002;
        public const int StatusPowerOffline = 2003;
        public const int StatusPowerOffOffline = 2004;
        public const int StatusPowerOnline = 2001;
        public const int StatusUpdateFirmwareComplete = 2200;
        public const int StatusUpdateFirmwareCompleteDeviceNotRestored = 2205;
        public const int StatusUpdateFirmwareFailedDeviceNeedsFirmware = 2203;
        public const int StatusUpdateFirmwareFailedDeviceOk = 2201;
        public const int StatusUpdateFirmwareFailedDeviceUnknown = 2204;
        public const int StatusUpdateFirmwareFailedDeviceUnrecoverable = 2202;
        public const int StatusUpdateFirmwareProgress = 2100;
        public const int WaitForever = -1;
    }
    */

    public class ExtendedError
    {
        public const int EMICR_NOCHECK = 201;
        public const int EMICR_CHECK = 202;
        public const int EMICR_BADDATA = 203;
        public const int EMICR_NODATA = 204;
        public const int EMICR_BADSIZE = 205;
        public const int EMICR_JAM = 206;
        public const int EMICR_CHECKDIGIT = 207;
        public const int EMICR_COVEROPEN = 208;
        public const int ESTATS_ERROR = 280;
        public const int EFIRMWARE_BAD_FILE = 281;
        public const int ESTATS_DEPENDENCY = 282;
    }

    public class StatisticProperties
    {
        public const string CommunicationErrorCount = "CommunicationErrorCount";
        public const string DeviceCategory = "DeviceCategory";
        public const string FailedDataParseCount = "FailedDataParseCount";
        public const string FailedReadCount = "FailedReadCount";
        public const string FirmwareRevision = "FirmwareRevision";
        public const string GoodReadCount = "GoodReadCount";
        public const string HoursPoweredCount = "HoursPoweredCount";
        public const string InstallationDate = "InstallationDate";
        public const string Interface = "Interface";
        public const string ManufactureDate = "ManufactureDate";
        public const string ManufacturerName = "ManufacturerName";
        public const string MechanicalRevision = "MechanicalRevision";
        public const string ModelName = "ModelName";
        public const string SerialNumber = "SerialNumber";
        public const string UnifiedPOSVersion = "UnifiedPOSVersion";
    }

    public class Wait
    {
        public const int FOREVER = -1;
    }

    #endregion

    #region Version 1.2

    //
    // Event Polling
    //

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class MICREvent
    {
        [DataMember]
        public DataEvent DataEvent { get; set; }
        [DataMember]
        public DirectIOEvent DirectIOEvent { get; set; }
        [DataMember]
        public ErrorEvent ErrorEvent { get; set; }
        //[DataMember]
        //public OutputCompleteEvent OutputCompleteEvent { get; set; }
        [DataMember]
        public StatusUpdateEvent StatusUpdateEvent { get; set; }
        [DataMember]
        public DataContainedEvent DataContainedEvent { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class MICREventResponse
    {
        [DataMember]
        public DataEventResponse DataEventResponse { get; set; }
        [DataMember]
        public DataContainedEventResponse DataContainedEventResponse { get; set; }
        [DataMember]
        public DirectIOEventResponse DirectIOEventResponse { get; set; }
        [DataMember]
        public ErrorEventResponse ErrorEventResponse { get; set; }
        //[DataMember]
        //public OutputCompleteEventResponse OutputCompleteEventResponse { get; set; }
        [DataMember]
        public StatusUpdateEventResponse StatusUpdateEventResponse { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class DataEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public int Status { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class DataEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class DirectIOEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public int EventNumber { get; set; }
        [DataMember]
        public int Data { get; set; }
        [DataMember]
        public object Obj { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class DirectIOEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DirectIOData DirectIOData { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class ErrorEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public ErrorCode ErrorCode { get; set; }
        [DataMember]
        public int ErrorCodeExtended { get; set; }
        [DataMember]
        public ErrorLocus ErrorLocus { get; set; }
        [DataMember]
        public ErrorResponse ErrorResponse { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class ErrorEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public ErrorResponse ErrorResponse { get; set; }
    }
    /*
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class OutputCompleteEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        int OutputID { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class OutputCompleteEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }
    */
    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class StatusUpdateEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public int Status { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class StatusUpdateEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public enum ErrorLocus
    {
        [EnumMember]
        EL_INPUT,
        [EnumMember]
        EL_INPUT_DATA,
        [EnumMember]
        EL_OUTPUT,
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public enum ErrorResponse
    {
        [EnumMember]
        ER_CLEAR,
        [EnumMember]
        ER_CONTINUEINPUT,
        [EnumMember]
        ER_RETRY,
    }

    #endregion

    #region Version 1.3

    [CollectionDataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/", ItemName = "PropertyName")]
    public class PropertyNameList : List<string>
    {
    }



    [CollectionDataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/", ItemName = "Parameter")]
    public class ParameterList : Dictionary<string, object>
    {
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class DataContainedEvent
    {
        [DataMember]
        public string Source { get; set; }
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public DateTime TimeStamp { get; set; }
        [DataMember]
        public int Status { get; set; }
        [DataMember]
        public ParameterList Parameters { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class DataContainedEventData
    {
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public bool SetDataEventEnabled { get; set; }
        [DataMember]
        public bool CallClearInputProperties { get; set; }
    }

    [DataContract(Namespace = "http://www.nrf-arts.org/UnifiedPOS/MICR/")]
    public class DataContainedEventResponse
    {
        [DataMember]
        public int EventID { get; set; }
        [DataMember]
        public bool SetDataEventEnabled { get; set; }
        [DataMember]
        public bool CallClearInputProperties { get; set; }
    }

    #endregion

}
