# 外送平台Model解析 ## FoodPanda 1. **Model : FoodPandaOrderDetailResponse** 2. **品項集合 : FoodPandaOrderDetailResponse.products** * 品項名稱 : products[n].name * 品項數量 : products[n].quantity * 品項單價 : products[n].unitPrice * 品項合計 : products[n].paidPrice * 品項複選項集合(沒有則為null) : products.selectedToppings * 品項複選項名稱 : products.selectedToppings[n].name ``` String sSubName = string.Empty; if (item.selectedToppings != null && item.selectedToppings.Any()) { foreach (var sub in item.selectedToppings) { if (sub.name.Any()) { sSubName += string.IsNullOrWhiteSpace(sSubName) ? sub.name : $"、{sub.name}";; } } ``` 3. **總計 : FoodPandaOrderDetailResponse.price** * 小計 : price.totalNet * 折扣 : price.discountAmountTotal * 實收 : price.totalNet - price.discountAmountTotal ## UberEats 1. **Model : UberEatsOrderDetailResponse** 2. **品項集合 : UberEatsOrderDetailResponse.cart.items** * 品項名稱 : cart.items[n].title * 品項數量 : cart.items[n].quantity * 品項單價(單位分) : cart.items[n].price.unit_price.amount * 品項合計(單位分) : cart.items[n].price.total_price.amount * 品項複選項集合(沒有則為null) : cart.items[n].selected_modifier_groups * 品項複選項名稱 : selected_modifier_groups[n].selected_items[n].title ``` String sSubName = string.Empty; if (item.selected_modifier_groups != null && item.selected_modifier_groups.Any()) { foreach (var sub in item.selected_modifier_groups) { if (sub.selected_items.Any()) { foreach(var subitem in sub.selected_items) { sSubName += string.IsNullOrWhiteSpace(sSubName) ? subitem.title : $"、{subitem.title}"; } } } } ``` 3. **總計 : UberEatsOrderDetailResponse.payment.charges** * 小計(單位分) : charges.sub_total.amount * 折扣(單位分) : charges.total_fee.amount * 實收(單位分) : charges.total.amount
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up