protected override void Fill(WmXmlPackage wmXmlPackage)
        {
            if (null == wmXmlPackage)
            {
                throw new ArgumentNullException(nameof(wmXmlPackage));
            }

            Success = wmXmlPackage.SelectBool("retval");

            if (!Success)
            {
                return;
            }

            WmId = wmXmlPackage.SelectWmIdIfExists("testwmpurse/wmid");

            var transferRejectedValue = wmXmlPackage.SelectInt32("testwmpurse/wmid/@available");

            if (transferRejectedValue >= 0)
            {
                TransferRejected = 1 == transferRejectedValue;
            }

            var partnerAvailabilityValue = wmXmlPackage.SelectInt32("testwmpurse/wmid/@themselfcorrstate");

            if (partnerAvailabilityValue > 0)
            {
                Availability = (PartnerAvailability)partnerAvailabilityValue;
            }

            var passportValue = wmXmlPackage.SelectInt32("testwmpurse/wmid/@newattst");

            if (passportValue >= 0)
            {
                Passport = (PassportDegree)passportValue;
            }

            Purse = wmXmlPackage.SelectPurseIfExists("testwmpurse/purse");

            var merchantEnabledValue = wmXmlPackage.SelectInt32("testwmpurse/purse/@merchant_active_mode");

            if (merchantEnabledValue >= 0)
            {
                MerchantEnabled = 1 == merchantEnabledValue;
            }

            var cashierEnabled = wmXmlPackage.SelectInt32("testwmpurse/purse/@merchant_allow_cashier");

            if (cashierEnabled >= 0)
            {
                CashierEnabled = 1 == cashierEnabled;
            }
        }
        protected override void Fill(WmXmlPackage wmXmlPackage)
        {
            if (null == wmXmlPackage)
            {
                throw new ArgumentNullException(nameof(wmXmlPackage));
            }

            Id              = wmXmlPackage.SelectInt32("trust/@id");
            InvoiceAllowed  = wmXmlPackage.SelectBool("trust/@inv");
            TransferAllowed = wmXmlPackage.SelectBool("trust/@trans");
            BalanceAllowed  = wmXmlPackage.SelectBool("trust/@purse");
            HistoryAllowed  = wmXmlPackage.SelectBool("trust/@transhist");
            Master          = wmXmlPackage.SelectWmId("trust/master");
            Purse           = wmXmlPackage.SelectPurseIfExists("trust/purse");
        }
        internal void Fill(WmXmlPackage wmXmlPackage)
        {
            if (null == wmXmlPackage)
            {
                throw new ArgumentNullException(nameof(wmXmlPackage));
            }

            Id              = wmXmlPackage.SelectInt32("@id");
            InvoiceAllowed  = wmXmlPackage.SelectBool("@inv");
            TransferAllowed = wmXmlPackage.SelectBool("@trans");
            BalanceAllowed  = wmXmlPackage.SelectBool("@purse");
            HistoryAllowed  = wmXmlPackage.SelectBool("@transhist");
            Master          = wmXmlPackage.SelectWmId("master");
            Purse           = wmXmlPackage.SelectPurseIfExists("purse");
            Hours24Limit    = wmXmlPackage.SelectAmount("daylimit");
            DayLimit        = wmXmlPackage.SelectAmount("dlimit");
            WeekLimit       = wmXmlPackage.SelectAmount("wlimit");
            MonthLimit      = wmXmlPackage.SelectAmount("mlimit");
            DayAmount       = wmXmlPackage.SelectAmount("dsum");
            WeekAmount      = wmXmlPackage.SelectAmount("wsum");
            MonthAmount     = wmXmlPackage.SelectAmount("msum");
            LastDate        = wmXmlPackage.SelectWmDate("lastsumdate");
        }
Exemple #4
0
        internal override void Fill(WmXmlPackage wmXmlPackage)
        {
            if (null == wmXmlPackage)
            {
                throw new ArgumentNullException(nameof(wmXmlPackage));
            }

            PrimaryId    = wmXmlPackage.SelectInt64("@id");
            SecondaryId  = wmXmlPackage.SelectInt64("@ts");
            OrderId      = wmXmlPackage.SelectInt32("orderid");
            SourceWmId   = wmXmlPackage.SelectWmId("customerwmid");
            TargetPurse  = wmXmlPackage.SelectPurse("storepurse");
            Amount       = wmXmlPackage.SelectAmount("amount");
            Description  = (Description)wmXmlPackage.SelectString("desc");
            Address      = (Description)wmXmlPackage.SelectString("address");
            Period       = wmXmlPackage.SelectUInt8("period");
            Expiration   = wmXmlPackage.SelectUInt8("expiration");
            InvoiceState = (InvoiceState)wmXmlPackage.SelectInt32("state");
            CreateTime   = wmXmlPackage.SelectWmDateTime("datecrt");
            UpdateTime   = wmXmlPackage.SelectWmDateTime("dateupd");
            TransferId   = wmXmlPackage.SelectInt64("wmtranid");
            SourcePurse  = wmXmlPackage.SelectPurseIfExists("customerpurse");
        }