Exemplo n.º 1
0
        public override void SetMessageDetails()
        {
            GovTalkMessageHeaderMessageDetails MessageDetails = new hmrcclasses.GovTalkMessageHeaderMessageDetails();

            MessageDetails.Class                   = ReferenceDataManager.Settings["MessageDetailsClass"];
            MessageDetails.Qualifier               = GovTalkMessageHeaderMessageDetailsQualifier.request;
            MessageDetails.FunctionSpecified       = true;
            MessageDetails.Function                = GovTalkMessageHeaderMessageDetailsFunction.submit;
            MessageDetails.TransformationSpecified = true;
            MessageDetails.Transformation          = GovTalkMessageHeaderMessageDetailsTransformation.XML;

            if (ReferenceDataManager.governmentGatewayEnvironment == GovernmentGatewayEnvironment.localtestservice)
            {
                MessageDetails.GatewayTimestampSpecified = true;
                MessageDetails.GatewayTimestamp          = DateTime.Now;
            }
            else
            {
                MessageDetails.GatewayTimestampSpecified = false;
                MessageDetails.GatewayTimestamp          = DateTime.MinValue;
            }

            if (ReferenceDataManager.governmentGatewayEnvironment == GovernmentGatewayEnvironment.localtestservice || ReferenceDataManager.governmentGatewayEnvironment == GovernmentGatewayEnvironment.devgateway)
            {
                MessageDetails.GatewayTest = ReferenceDataManager.Settings["MessageDetailsGatewayTest"];
            }

            Header.MessageDetails = MessageDetails;
        }
Exemplo n.º 2
0
        public override void SetMessageDetails()
        {
            GovTalkMessageHeaderMessageDetails MessageDetails = new hmrcclasses.GovTalkMessageHeaderMessageDetails();
            MessageDetails.Class = ReferenceDataManager.Settings["MessageDetailsClass"];
            MessageDetails.Qualifier = hmrcclasses.GovTalkMessageHeaderMessageDetailsQualifier.request;
            MessageDetails.FunctionSpecified = true;
            MessageDetails.Function = hmrcclasses.GovTalkMessageHeaderMessageDetailsFunction.delete;
            MessageDetails.TransformationSpecified = true;
            MessageDetails.Transformation = hmrcclasses.GovTalkMessageHeaderMessageDetailsTransformation.XML;

            // @TODO: This depends on whether it's a test ...
            MessageDetails.GatewayTest = ReferenceDataManager.Settings["MessageDetailsGatewayTest"];

            MessageDetails.CorrelationID = CorrelationId;
            MessageDetails.GatewayTimestampSpecified = false;
            MessageDetails.GatewayTimestamp = DateTime.MinValue;

            Header.MessageDetails = MessageDetails;
        }
Exemplo n.º 3
0
        public override void SetMessageDetails()
        {
            GovTalkMessageHeaderMessageDetails MessageDetails = new hmrcclasses.GovTalkMessageHeaderMessageDetails();

            MessageDetails.Class                   = ReferenceDataManager.Settings["MessageDetailsClass"];
            MessageDetails.Qualifier               = hmrcclasses.GovTalkMessageHeaderMessageDetailsQualifier.request;
            MessageDetails.FunctionSpecified       = true;
            MessageDetails.Function                = hmrcclasses.GovTalkMessageHeaderMessageDetailsFunction.list;
            MessageDetails.TransformationSpecified = true;
            MessageDetails.Transformation          = hmrcclasses.GovTalkMessageHeaderMessageDetailsTransformation.XML;

            // @TODO: This depends on whether it's a test ...
            MessageDetails.GatewayTest = ReferenceDataManager.Settings["MessageDetailsGatewayTest"];

            MessageDetails.CorrelationID             = String.Empty;
            MessageDetails.GatewayTimestampSpecified = false;
            MessageDetails.GatewayTimestamp          = DateTime.MinValue;

            Header.MessageDetails = MessageDetails;
        }
Exemplo n.º 4
0
        public override void SetMessageDetails()
        {
            GovTalkMessageHeaderMessageDetails MessageDetails = new hmrcclasses.GovTalkMessageHeaderMessageDetails();
            MessageDetails.Class = ReferenceDataManager.Settings["MessageDetailsClass"];
            MessageDetails.Qualifier = GovTalkMessageHeaderMessageDetailsQualifier.request;
            MessageDetails.FunctionSpecified = true;
            MessageDetails.Function = GovTalkMessageHeaderMessageDetailsFunction.submit;
            MessageDetails.TransformationSpecified = true;
            MessageDetails.Transformation = GovTalkMessageHeaderMessageDetailsTransformation.XML;

            if (ReferenceDataManager.governmentGatewayEnvironment == GovernmentGatewayEnvironment.localtestservice)
            {
                MessageDetails.GatewayTimestampSpecified = true;
                MessageDetails.GatewayTimestamp = DateTime.Now;

            }
            else
            {
                MessageDetails.GatewayTimestampSpecified = false;
                MessageDetails.GatewayTimestamp = DateTime.MinValue;
            }

            if (ReferenceDataManager.governmentGatewayEnvironment == GovernmentGatewayEnvironment.localtestservice || ReferenceDataManager.governmentGatewayEnvironment == GovernmentGatewayEnvironment.devgateway)
            {
                MessageDetails.GatewayTest = ReferenceDataManager.Settings["MessageDetailsGatewayTest"];
            }

            Header.MessageDetails = MessageDetails;
        }