public override List <WuliuBranch> GetWuliuBranchs(Shop shop) { var req = new CainiaoWaybillIiSearchRequest(); var rep = InvokeOpenApi <CainiaoWaybillIiSearchResponse>(shop, req); var datas = new List <WuliuBranch>(); foreach (var v in rep.WaybillApplySubscriptionCols) { foreach (var vv in v.BranchAccountCols) { foreach (var vvv in vv.ShippAddressCols) { var data = new WuliuBranch(); data.Type = v.CpCode; data.Name = vv.BranchName; data.Number = vv.BranchCode; data.Quantity = vv.Quantity; data.SenderName = ""; data.SenderPhone = ""; data.SenderAddress = vvv.Province + " " + vvv.City + " " + vvv.District + " " + vvv.Detail; datas.Add(data); } } } return(datas); }
public override List <WuliuBranch> GetWuliuBranchs(Shop shop) { SortedDictionary <string, string> param = new SortedDictionary <string, string>(); var rsp = this.Invoke <PddRspWaybillSearch>(shop, "pdd.waybill.search", param); var wbs = new List <WuliuBranch>(); foreach (var v in rsp.waybill_apply_subscription_cols) { foreach (var vv in v.branch_account_cols) { foreach (var vvv in vv.shipp_address_cols) { var wb = new WuliuBranch { Name = vv.branch_name, Number = vv.branch_code, Quantity = vv.quantity, Type = v.wp_code, SenderName = "", SenderPhone = "", SenderAddress = vvv.province + " " + vvv.city + " " + vvv.district + " " + vvv.detail }; wbs.Add(wb); } } } return(wbs); }