コード例 #1
0
        public static argtype TranslateToGetOfferRequest(GatekeeperServiceRequest ahRequest)
        {
            EventLogger.LogEvent("ENTERING -> SFGWrapper.GateKeeperTranslators.TranslateToGetOfferRequest()");
            argtype sfgRequest = new argtype();

            #region readonly properties
            sfgRequest.org = ahRequest.Org;
            sfgRequest.program_type_id = ahRequest.ProgramTypeId;
            sfgRequest.test_mode = ahRequest.TestMode ? "Y" : "N";
            sfgRequest.app_version = ahRequest.AppVersion;
            #endregion

            sfgRequest.days_history = ahRequest.DaysHistory;
            sfgRequest.customer_number = ahRequest.MemberId;
            sfgRequest.search_by_custno = ahRequest.SearchByCustno ? "Y" : "N";
            sfgRequest.offers_key_code = ahRequest.OffersKeyCode;
            sfgRequest.check_pw = ahRequest.CheckPassword ? "Y" : "N";
            sfgRequest.load_customer = ahRequest.LoadCustomer ? "Y" : "N";
            sfgRequest.load_history = ahRequest.LoadHistory ? "Y" : "N";
            sfgRequest.load_renewal_offers = ahRequest.LoadRenewalOffers ? "Y" : "N";
            sfgRequest.validate_subscription = ahRequest.ValidateSubscription ? "Y" : "N";

            EventLogger.LogEvent("LEAVING -> SFGWrapper.GateKeeperTranslators.TranslateToGetOfferRequest()");
            return sfgRequest;
        }
コード例 #2
0
        public static argtype TranslateToLoginRequest(GatekeeperServiceRequest ahRequest)
        {
            EventLogger.LogEvent("ENTERING -> SFGWrapper.GateKeeperTranslators.TranslateToLoginRequest()");
            argtype sfgRequest = new argtype();

            #region readonly properties
            sfgRequest.org = ahRequest.Org;
            sfgRequest.program_type_id = ahRequest.ProgramTypeId;
            sfgRequest.test_mode = ahRequest.TestMode ? "Y" : "N";
            sfgRequest.app_version = ahRequest.AppVersion;
            #endregion

            sfgRequest.validate_subscription = ahRequest.ValidateSubscription ? "Y" : "N";
            sfgRequest.load_renewal_offers = ahRequest.LoadRenewalOffers ? "Y" : "N";
            sfgRequest.offers_key_code = ahRequest.OffersKeyCode;//"E000764"

            sfgRequest.userid = ahRequest.Username;
            sfgRequest.hashed_pw = ahRequest.HashedPassword;
            sfgRequest.check_pw = ahRequest.CheckPassword ? "Y" : "N";
            sfgRequest.load_customer = "Y";
            sfgRequest.load_history = "Y";
            sfgRequest.days_history = ahRequest.DaysHistory;

            EventLogger.LogEvent("LEAVING -> SFGWrapper.GateKeeperTranslators.TranslateToLoginRequest()");
            return sfgRequest;
        }
コード例 #3
0
        public static argtype TranslateToGetMemberByUsernameRequest(GatekeeperServiceRequest ahRequest)
        {
            EventLogger.LogEvent("ENTERING -> SFGWrapper.GateKeeperTranslators.TranslateToGetMemberByUsernameRequest()");
            argtype sfgRequest = new argtype();

            #region readonly properties
            sfgRequest.org = ahRequest.Org;
            sfgRequest.program_type_id = ahRequest.ProgramTypeId;
            //no programid in login?
            sfgRequest.test_mode = ahRequest.TestMode ? "Y" : "N";
            sfgRequest.app_version = ahRequest.AppVersion;
            #endregion

            sfgRequest.load_renewal_offers = ahRequest.LoadRenewalOffers ? "Y" : "N";
            //sfgRequest.offers_key_code = "E000764";//ahRequest.OffersKeyCode;

            sfgRequest.userid = ahRequest.Username;
            sfgRequest.load_customer = ahRequest.LoadCustomer ? "Y" : "N";
            sfgRequest.load_history = ahRequest.LoadHistory ? "Y" : "N";
            sfgRequest.days_history = ahRequest.DaysHistory;

            EventLogger.LogEvent("LEAVING -> SFGWrapper.GateKeeperTranslators.TranslateToGetMemberByUsernameRequest()");
            return sfgRequest;
        }