internal override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Id = wmXmlPackage.SelectUInt32("@id"); Ts = wmXmlPackage.SelectUInt32("@ts"); OrderId = wmXmlPackage.SelectUInt32("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"); OperationId = wmXmlPackage.SelectUInt32("wmtranid"); if (wmXmlPackage.Exists("customerpurse") && !string.IsNullOrEmpty(wmXmlPackage.SelectString("customerpurse"))) { SourcePurse = wmXmlPackage.SelectPurse("customerpurse"); } }
internal override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Id = wmXmlPackage.SelectUInt32("@id"); Ts = wmXmlPackage.SelectUInt32("@ts"); SourcePurse = wmXmlPackage.SelectPurse("pursesrc"); TargetPurse = wmXmlPackage.SelectPurse("pursedest"); Amount = wmXmlPackage.SelectAmount("amount"); Commission = wmXmlPackage.SelectAmount("comiss"); TransferType = (TransferType)wmXmlPackage.SelectInt32("opertype"); InvoiceId = wmXmlPackage.SelectUInt32("wminvid"); OrderId = wmXmlPackage.SelectUInt32("orderid"); TransferId = wmXmlPackage.SelectUInt32("tranid"); Period = wmXmlPackage.SelectUInt8("period"); Description = (Description)wmXmlPackage.SelectString("desc"); CreateTime = wmXmlPackage.SelectWmDateTime("datecrt"); UpdateTime = wmXmlPackage.SelectWmDateTime("dateupd"); Partner = wmXmlPackage.SelectWmId("corrwm"); Rest = wmXmlPackage.SelectAmount("rest"); if (wmXmlPackage.Exists("timelock")) { IsLocked = true; } }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Id = wmXmlPackage.SelectUInt32("operation/@id"); Ts = wmXmlPackage.SelectUInt32("operation/@ts"); TransferType = (TransferType)wmXmlPackage.SelectInt32("operation/opertype"); UpdateTime = wmXmlPackage.SelectWmDateTime("operation/dateupd"); }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Id = wmXmlPackage.SelectUInt32("ininvoice/@id"); Ts = wmXmlPackage.SelectUInt32("ininvoice/@ts"); State = (InvoiceState)wmXmlPackage.SelectUInt32("ininvoice/state"); UpdateTime = wmXmlPackage.SelectWmDateTime("ininvoice/dateupd"); }
internal void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Id = wmXmlPackage.SelectUInt32("@id"); Purse = wmXmlPackage.SelectPurse("pursename"); Amount = wmXmlPackage.SelectAmount("amount"); Description = (Description)wmXmlPackage.SelectString("desc"); Enable = wmXmlPackage.SelectBool("outsideopen"); LastIncomingTransfer = wmXmlPackage.SelectUInt32("lastintr"); LastOutgoingTransfer = wmXmlPackage.SelectUInt32("lastouttr"); }
internal void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Id = wmXmlPackage.SelectUInt32("@id"); InvoiceAllowed = wmXmlPackage.SelectBool("@inv"); TransferAllowed = wmXmlPackage.SelectBool("@trans"); BalanceAllowed = wmXmlPackage.SelectBool("@purse"); HistoryAllowed = wmXmlPackage.SelectBool("@transhist"); Master = wmXmlPackage.SelectWmId("master"); if (wmXmlPackage.Exists("purse") && !string.IsNullOrEmpty(wmXmlPackage.SelectString("purse"))) { Purse = wmXmlPackage.SelectPurse("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"); }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Id = wmXmlPackage.SelectUInt32("operation/@id"); Ts = wmXmlPackage.SelectUInt32("operation/@ts"); OperationId = wmXmlPackage.SelectUInt32("operation/inwmtranid"); SourcePurse = wmXmlPackage.SelectPurse("operation/pursesrc"); TargetPurse = wmXmlPackage.SelectPurse("operation/pursedest"); Amount = wmXmlPackage.SelectAmount("operation/amount"); Commission = wmXmlPackage.SelectAmount("operation/comiss"); Description = (Description)wmXmlPackage.SelectString("operation/desc"); CreateTime = wmXmlPackage.SelectWmDateTime("operation/datecrt"); UpdateTime = wmXmlPackage.SelectWmDateTime("operation/dateupd"); }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } ContractId = wmXmlPackage.SelectUInt32("contractid"); }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } TransferId = wmXmlPackage.SelectUInt32("paymer2purse/tranid"); Amount = wmXmlPackage.SelectAmount("paymer2purse/amount"); }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Token = wmXmlPackage.SelectNotEmptyString("transtoken"); Lifetime = wmXmlPackage.SelectUInt32("validityperiodinhours"); }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } InvoiceId = wmXmlPackage.SelectUInt32("operation/@wminvoiceid"); ConfirmationType = (ConfirmationType)wmXmlPackage.SelectInt32("operation/realsmstype"); Info = wmXmlPackage.SelectString("userdesc"); }
internal override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Id = wmXmlPackage.SelectUInt32("invoice/@id"); Ts = wmXmlPackage.SelectUInt32("invoice/@ts"); OrderId = wmXmlPackage.SelectUInt32("invoice/orderid"); SourceWmId = wmXmlPackage.SelectWmId("invoice/customerwmid"); TargetPurse = wmXmlPackage.SelectPurse("invoice/storepurse"); Amount = wmXmlPackage.SelectAmount("invoice/amount"); Description = (Description)wmXmlPackage.SelectString("invoice/desc"); Address = (Description)wmXmlPackage.SelectString("invoice/address"); Period = wmXmlPackage.SelectUInt8("invoice/period"); Expiration = wmXmlPackage.SelectUInt8("invoice/expiration"); State = (InvoiceState)wmXmlPackage.SelectInt32("invoice/state"); CreateTime = wmXmlPackage.SelectWmDateTime("invoice/datecrt"); UpdateTime = wmXmlPackage.SelectWmDateTime("invoice/dateupd"); }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Id = wmXmlPackage.SelectUInt32("purse/@id"); Purse = wmXmlPackage.SelectPurse("purse/pursename"); Amount = wmXmlPackage.SelectAmount("purse/amount"); Description = (Description)wmXmlPackage.SelectNotEmptyString("purse/desc"); }
internal override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Id = wmXmlPackage.SelectUInt32("operation/@id"); Ts = wmXmlPackage.SelectUInt32("operation/@ts"); TransferId = wmXmlPackage.SelectUInt32("operation/tranid"); SourcePurse = wmXmlPackage.SelectPurse("operation/pursesrc"); TargetPurse = wmXmlPackage.SelectPurse("operation/pursedest"); Amount = wmXmlPackage.SelectAmount("operation/amount"); Commission = wmXmlPackage.SelectAmount("operation/comiss"); TransferType = (TransferType)wmXmlPackage.SelectInt32("operation/opertype"); Period = wmXmlPackage.SelectUInt8("operation/period"); InvoiceId = wmXmlPackage.SelectUInt32("operation/wminvid"); Description = (Description)wmXmlPackage.SelectString("operation/desc"); CreateTime = wmXmlPackage.SelectWmDateTime("operation/datecrt"); UpdateTime = wmXmlPackage.SelectWmDateTime("operation/dateupd"); }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Reference = wmXmlPackage.SelectUInt32("trust/@purseid"); ConfirmationType = (ConfirmationType)wmXmlPackage.SelectInt32("trust/realsmstype"); Info = wmXmlPackage.SelectString("userdesc"); SmsReference = wmXmlPackage.SelectString("smssecureid"); }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Id = wmXmlPackage.SelectUInt32("message/@id"); WmId = wmXmlPackage.SelectWmId("message/receiverwmid"); Subject = (Description)wmXmlPackage.SelectString("message/msgsubj"); Content = (Message)wmXmlPackage.SelectNotEmptyString("message/msgtext"); CreateTime = wmXmlPackage.SelectWmDateTime("message/datecrt"); }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } TransferId = wmXmlPackage.SelectUInt32("operation/@wmtransid"); InvoiceId = wmXmlPackage.SelectUInt32("operation/@wminvoiceid"); Amount = wmXmlPackage.SelectAmount("operation/amount"); Date = wmXmlPackage.SelectWmDateTime("operation/operdate"); Description = (Description)wmXmlPackage.SelectString("operation/purpose"); ClientPurse = wmXmlPackage.SelectPurse("operation/pursefrom"); ClientWmId = wmXmlPackage.SelectWmId("operation/wmidfrom"); Info = wmXmlPackage.SelectString("userdesc"); if (wmXmlPackage.Exists("smssentstate")) { SmsState = (SmsState)Enum.Parse(typeof(SmsState), wmXmlPackage.SelectNotEmptyString("smssentstate"), true); } }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } // <?xml version="1.0"?><merchant.response><trust id="65376205"><slavepurse>U731654115046</slavepurse><slavewmid>729376294758</slavewmid><masterwmid>301095414760</masterwmid></trust><retval>0</retval><retdesc></retdesc><userdesc>Trust successfull! The required trust set from member`s purse U731654115046 to merchant wmid 301095414760</userdesc></merchant.response> TrustId = wmXmlPackage.SelectUInt32("trust/@id"); ClientPurse = wmXmlPackage.SelectPurse("trust/slavepurse"); ClientWmId = wmXmlPackage.SelectWmId("trust/slavewmid"); StoreWmId = wmXmlPackage.SelectWmId("trust/masterwmid"); Info = wmXmlPackage.SelectString("userdesc"); }
internal void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } ContractId = wmXmlPackage.SelectUInt32("@contractid"); WmId = wmXmlPackage.SelectWmId("@wmid"); if (wmXmlPackage.Exists("@acceptdate") && !string.IsNullOrEmpty(wmXmlPackage.SelectString("@acceptdate"))) { AcceptTime = wmXmlPackage.SelectWmDateTime("@acceptdate"); } }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } Id = wmXmlPackage.SelectUInt32("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"); // TODO: [L] Упростить проверку! if (wmXmlPackage.Exists("trust/purse") && !string.IsNullOrEmpty(wmXmlPackage.SelectString("trust/purse"))) { Purse = wmXmlPackage.SelectPurse("trust/purse"); } }
protected override void Fill(WmXmlPackage wmXmlPackage) { if (null == wmXmlPackage) { throw new ArgumentNullException(nameof(wmXmlPackage)); } OperationId = wmXmlPackage.SelectUInt32("operation/@wmtransid"); InvoiceId = wmXmlPackage.SelectUInt32("operation/@wminvoiceid"); CreateTime = wmXmlPackage.SelectWmDateTime("operation/operdate"); Description = (Description)wmXmlPackage.SelectString("operation/purpose"); SourcePurse = wmXmlPackage.SelectPurse("operation/pursefrom"); SourceWmId = wmXmlPackage.SelectWmId("operation/wmidfrom"); var capitallerFlagXPath = "operation/capitallerflag"; if (!string.IsNullOrEmpty(wmXmlPackage.SelectString(capitallerFlagXPath))) { CapitallerFlag = wmXmlPackage.SelectBool(capitallerFlagXPath); } var enumFlagFlagXPath = "operation/enumflag"; if (!string.IsNullOrEmpty(wmXmlPackage.SelectString(enumFlagFlagXPath))) { EnumFlag = wmXmlPackage.SelectUInt8(enumFlagFlagXPath); } IpAddress = IPAddress.Parse(wmXmlPackage.SelectNotEmptyString("operation/IPAddress")); TelepatPhone = wmXmlPackage.SelectString("operation/telepat_phone"); // TelepatMethod var telepatMethod = wmXmlPackage.SelectString("operation/telepat_paytype"); if (!string.IsNullOrEmpty(telepatMethod) && !"null".Equals(telepatMethod)) { TelepatMethod = (TelepatMethod)int.Parse(telepatMethod, NumberStyles.Integer, CultureInfo.InvariantCulture.NumberFormat); } PaymerNumber = wmXmlPackage.SelectString("operation/paymer_number"); PaymerEmail = wmXmlPackage.SelectString("operation/paymer_email"); string paymerType = wmXmlPackage.SelectString("operation/paymer_type"); if (!string.IsNullOrEmpty(paymerType) && !"null".Equals(paymerType)) { PaymerType = (PaymerType)int.Parse(paymerType, NumberStyles.Integer, CultureInfo.InvariantCulture.NumberFormat); } else { PaymerType = PaymerType.None; } //CashierNumber = wmXmlResponsePackage.SelectString("operation/cashier_number"); //if (!string.IsNullOrEmpty(wmXmlResponsePackage.SelectString("operation/cashier_date"))) // CashierDate = wmXmlResponsePackage.SelectWmDateTime("operation/cashier_date"); //if (!string.IsNullOrEmpty(wmXmlResponsePackage.SelectString("operation/cashier_amount"))) // CashierAmount = wmXmlResponsePackage.SelectAmount("operation/cashier_amount"); string sdpType = wmXmlPackage.SelectString("operation/sdp_type"); if (!string.IsNullOrEmpty(sdpType)) { SdpType = int.Parse(sdpType, NumberStyles.Integer, CultureInfo.InvariantCulture.NumberFormat); } }