public Protocols.ToolkitResultProtocol CreateContract(Protocols.Interfaces.CreateContractSetupProtocol setupParam)
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit toolkit = new FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit( session );
            FChoice.Toolkits.Clarify.Interfaces.CreateContractSetup setup;

            switch( setupParam.ConstructorCue )
            {
                case 0:
                    setup = new FChoice.Toolkits.Clarify.Interfaces.CreateContractSetup();
                    break;
                default:
                    throw new InvalidOperationException(string.Format("Constructor index '{0}' does not exist.", setupParam.ConstructorCue));
            }

            if( Global.IsPropertyDirty(2, setupParam.DirtyFieldFlags) )
            {
                setup.ContractType = setupParam.ContractType;
            }

            if( Global.IsPropertyDirty(4, setupParam.DirtyFieldFlags) )
            {
                setup.Status = setupParam.Status;
            }

            if( Global.IsPropertyDirty(8, setupParam.DirtyFieldFlags) )
            {
                setup.PONumber = setupParam.PONumber;
            }

            if( Global.IsPropertyDirty(16, setupParam.DirtyFieldFlags) )
            {
                setup.PayOptions = setupParam.PayOptions;
            }

            if( Global.IsPropertyDirty(32, setupParam.DirtyFieldFlags) )
            {
                setup.PhoneResponseDuration = TimeSpan.FromSeconds(setupParam.PhoneResponseDuration);
            }

            if( Global.IsPropertyDirty(64, setupParam.DirtyFieldFlags) )
            {
                setup.OnsiteResponseDuration = TimeSpan.FromSeconds(setupParam.OnsiteResponseDuration);
            }

            if( Global.IsPropertyDirty(128, setupParam.DirtyFieldFlags) )
            {
                setup.BusinessHoursForPM = setupParam.BusinessHoursForPM;
            }

            if( Global.IsPropertyDirty(256, setupParam.DirtyFieldFlags) )
            {
                setup.StartDate = setupParam.StartDate;
            }

            if( Global.IsPropertyDirty(512, setupParam.DirtyFieldFlags) )
            {
                setup.ExpireDate = setupParam.ExpireDate;
            }

            if( Global.IsPropertyDirty(1024, setupParam.DirtyFieldFlags) )
            {
                setup.UnitType = setupParam.UnitType;
            }

            if( Global.IsPropertyDirty(2048, setupParam.DirtyFieldFlags) )
            {
                setup.UnitsPurchased = setupParam.UnitsPurchased;
            }

            if( Global.IsPropertyDirty(4096, setupParam.DirtyFieldFlags) )
            {
                setup.UnitsUsed = setupParam.UnitsUsed;
            }

            if( Global.IsPropertyDirty(8192, setupParam.DirtyFieldFlags) )
            {
                setup.UnitsAvailable = setupParam.UnitsAvailable;
            }

            if( Global.IsPropertyDirty(16384, setupParam.DirtyFieldFlags) )
            {
                setup.UseSpecialConsiderations = setupParam.UseSpecialConsiderations;
            }

            if( Global.IsPropertyDirty(32768, setupParam.DirtyFieldFlags) )
            {
                setup.Notes = setupParam.Notes;
            }

            if( Global.IsPropertyDirty(65536, setupParam.DirtyFieldFlags) )
            {
                foreach(Protocols.AdditionalFieldProtocol field in setupParam.AdditionalFields){setup.AdditionalFields.Append( field.FieldName, field.FieldType, field.FieldValue);}
            }

            return new Protocols.ToolkitResultProtocol( toolkit.CreateContract(setup) );
        }
        public Protocols.ToolkitResultProtocol CreateContract()
        {
            ClarifySession session = Global.GetSession( AuthHeader );
            FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit toolkit = new FChoice.Toolkits.Clarify.Interfaces.InterfacesToolkit( session );

            return new Protocols.ToolkitResultProtocol( toolkit.CreateContract() );
        }