|
|
using NetLibrary;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Web.Script.Serialization;
|
|
|
using System.Net.Security;
|
|
|
using System.Security.Authentication;
|
|
|
using System.Security.Cryptography.X509Certificates;
|
|
|
using System.Net;
|
|
|
using System.IO;
|
|
|
using NetLibrary.Data;
|
|
|
using System.Data.Common;
|
|
|
using System.Data;
|
|
|
using Lazop.Api;
|
|
|
using NetLibrary.Log;
|
|
|
using NetLibrary.OnlineTrade;
|
|
|
|
|
|
namespace TradeManageNew
|
|
|
{
|
|
|
public class LazadaApiNew
|
|
|
{
|
|
|
public Int32? ShopId { get; set; }
|
|
|
public string client_id { get; set; }
|
|
|
public string client_secret { get; set; }
|
|
|
public string access_token { get; set; }
|
|
|
public string refresh_token { get; set; }
|
|
|
public DateTime AccessTokenUpdateTime { get; set; }
|
|
|
public string country { get; set; }
|
|
|
#region 读取订单
|
|
|
public List<OrderModel> GetOrders(DateTime sdate,DateTime edate, out string ErrorMessage)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
GetReshToken(out ErrorMessage);
|
|
|
string url = "";
|
|
|
string crrury_code = "";
|
|
|
#region 设置市场所在地借口地址
|
|
|
switch (country)
|
|
|
{
|
|
|
case "新加坡":
|
|
|
crrury_code = "SGD";
|
|
|
url = "https://api.lazada.sg/rest";
|
|
|
break;
|
|
|
case "泰国":
|
|
|
crrury_code = "THB";
|
|
|
url = "https://api.lazada.co.th/rest";
|
|
|
break;
|
|
|
case "印尼":
|
|
|
crrury_code = "IDR";
|
|
|
url = "https://api.lazada.co.id/rest";
|
|
|
break;
|
|
|
case "越南":
|
|
|
crrury_code = "VND";
|
|
|
url = "https://api.lazada.vn/rest";
|
|
|
break;
|
|
|
case "马来西亚":
|
|
|
crrury_code = "MYR";
|
|
|
url = "https://api.lazada.com.my/rest";
|
|
|
break;
|
|
|
case "菲律宾":
|
|
|
crrury_code = "PHP";
|
|
|
url = "https://api.lazada.com.ph/rest";
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
List<OrderModel> list = new List<OrderModel>();
|
|
|
for (int j = 0; j < 5;j++)
|
|
|
{
|
|
|
string offset = (j*100).ToString();
|
|
|
ILazopClient client = new LazopClient(url, client_id, client_secret);
|
|
|
LazopRequest request = new LazopRequest();
|
|
|
request.SetApiName("/orders/get");
|
|
|
request.SetHttpMethod("GET");
|
|
|
request.AddApiParameter("created_before", edate.ToString("yyyy-MM-dd") + "T23:00:00+08:00");
|
|
|
request.AddApiParameter("created_after", sdate.ToString("yyyy-MM-dd") + "T01:00:00+08:00");
|
|
|
request.AddApiParameter("status", "pending");//unpaid, pending, canceled, ready_to_ship, delivered, returned, shipped and failed.
|
|
|
request.AddApiParameter("update_before", edate.ToString("yyyy-MM-dd") + "T23:00:00+08:00");
|
|
|
request.AddApiParameter("sort_direction", "asc");
|
|
|
request.AddApiParameter("offset", offset);
|
|
|
request.AddApiParameter("limit", "100");
|
|
|
request.AddApiParameter("update_after", sdate.ToString("yyyy-MM-dd") + "T01:00:00+08:00");
|
|
|
request.AddApiParameter("sort_by", "updated_at");
|
|
|
//ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
|
|
|
LazopResponse response = client.Execute(request, access_token);
|
|
|
JavaScriptSerializer JsonConvert = new JavaScriptSerializer();
|
|
|
|
|
|
if (response.Code == "0")
|
|
|
{
|
|
|
LazadaNew_Root Model = JsonConvert.Deserialize<LazadaNew_Root>(response.Body);
|
|
|
if (Model != null && Model.data != null && Model.data.orders != null)
|
|
|
{
|
|
|
foreach (var md in Model.data.orders)
|
|
|
{
|
|
|
OrderModel model = new OrderModel();
|
|
|
model.OrderCode = md.order_id;
|
|
|
if (md.order_id == "337608984364001")
|
|
|
{
|
|
|
string a = "";
|
|
|
}
|
|
|
model.TotalPrice = Convert.ToDecimal(md.price);
|
|
|
if (md.shipping_fee != null)
|
|
|
model.TotalPrice += Convert.ToDecimal(md.shipping_fee);
|
|
|
model.MoneyCode = crrury_code;
|
|
|
model.OrderDate = GetDateTime(md.created_at);
|
|
|
model.BuyerID = "";
|
|
|
model.BuyerName = md.address_shipping.first_name;
|
|
|
model.BuyerCountry = md.address_shipping.country;
|
|
|
model.BuyerAddr = md.address_shipping.address1;
|
|
|
// if (this.ShippingDetail.street_address2 != null && this.ShippingDetail.street_address2 != "")
|
|
|
// model.BuyerAddr += " " + this.ShippingDetail.street_address2;
|
|
|
model.BuyerPhone = md.address_shipping.phone;
|
|
|
model.BuyerMobile = "";
|
|
|
model.BuyerMail = "";
|
|
|
model.BuyerFax = "";
|
|
|
model.BuyerZip = md.address_shipping.post_code;
|
|
|
if (model.BuyerZip == null || model.BuyerZip == "")
|
|
|
model.BuyerZip = "*****";
|
|
|
model.BuyerProvince = md.address_shipping.city;
|
|
|
model.BuyerCity = md.address_shipping.city;
|
|
|
model.BuyerArea = "";
|
|
|
model.OrderRemark = md.remarks; //memo
|
|
|
model.LeaveWord = "";
|
|
|
model.PayDate = GetDateTime(md.updated_at);
|
|
|
model.OutOrderDate = null;
|
|
|
model.ListModel = new List<OrderDetailModel>();
|
|
|
var glist = GetOrderSKU(md.order_id);
|
|
|
if (glist != null)
|
|
|
{
|
|
|
model.ListModel = glist;
|
|
|
if (glist.Count > 0 && glist[0].MoneyCode != null && glist[0].MoneyCode != "")
|
|
|
model.MoneyCode = glist[0].MoneyCode;
|
|
|
if (glist.Count > 0)
|
|
|
model.PostInfo = glist[0].PostInfo;
|
|
|
}
|
|
|
list.Add(model);
|
|
|
}
|
|
|
if (Model.data.orders.Count < 100)
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
ErrorMessage = "";
|
|
|
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
if(j==0)
|
|
|
ErrorMessage = response.Message;
|
|
|
//return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return list;
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
ErrorFollow.TraceWrite("GetOrders", ex.Message, "");
|
|
|
ErrorMessage = ex.Message;
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
#endregion
|
|
|
#region 读取订单
|
|
|
public List<OrderDetailModel> GetOrderSKU(string order_id)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
string url = "";
|
|
|
string crrury_code = "";
|
|
|
#region 设置市场所在地借口地址
|
|
|
switch (country)
|
|
|
{
|
|
|
case "新加坡":
|
|
|
crrury_code = "SGD";
|
|
|
url = "https://api.lazada.sg/rest";
|
|
|
break;
|
|
|
case "泰国":
|
|
|
crrury_code = "THB";
|
|
|
url = "https://api.lazada.co.th/rest";
|
|
|
break;
|
|
|
case "印尼":
|
|
|
crrury_code = "IDR";
|
|
|
url = "https://api.lazada.co.id/rest";
|
|
|
break;
|
|
|
case "越南":
|
|
|
crrury_code = "VND";
|
|
|
url = "https://api.lazada.vn/rest";
|
|
|
break;
|
|
|
case "马来西亚":
|
|
|
crrury_code = "MYR";
|
|
|
url = "https://api.lazada.com.my/rest";
|
|
|
break;
|
|
|
case "菲律宾":
|
|
|
crrury_code = "PHP";
|
|
|
url = "https://api.lazada.com.ph/rest";
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
ILazopClient client = new LazopClient(url, client_id, client_secret);
|
|
|
LazopRequest request = new LazopRequest();
|
|
|
request.SetApiName("/order/items/get");
|
|
|
request.SetHttpMethod("GET");
|
|
|
request.AddApiParameter("order_id", order_id);
|
|
|
LazopResponse response = client.Execute(request, access_token);
|
|
|
var Glist = new List<OrderDetailModel>();
|
|
|
JavaScriptSerializer JsonConvert = new JavaScriptSerializer();
|
|
|
List<OrderModel> list = new List<OrderModel>();
|
|
|
if (response.Code == "0")
|
|
|
{
|
|
|
LazadaNew_Goods_Root Model = JsonConvert.Deserialize<LazadaNew_Goods_Root>(response.Body);
|
|
|
if (Model != null && Model.data != null)
|
|
|
{
|
|
|
foreach (var gmd in Model.data)
|
|
|
{
|
|
|
OrderDetailModel model2 = new OrderDetailModel();
|
|
|
model2.productImgUrl = gmd.product_main_image;
|
|
|
model2.OrderItemId = gmd.order_item_id;
|
|
|
model2.GoodsNum = 1;
|
|
|
if (gmd.item_price != null)
|
|
|
model2.GoodsPrice = Convert.ToDecimal(gmd.item_price);
|
|
|
model2.MoneyCode = gmd.currency;
|
|
|
model2.GoodsName = gmd.name;
|
|
|
model2.GoodsSKU = gmd.sku;
|
|
|
model2.PostInfo = gmd.shipment_provider;
|
|
|
model2.TypeDesc = gmd.Variation;
|
|
|
Glist.Add(model2);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
return Glist;
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
ErrorFollow.TraceWrite("GetOrders", ex.Message, "");
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
#region 读取跟踪码
|
|
|
public List<lazada_pack> SetStatusToPackedByMarketplace(string itemorderid, string shipment_provider)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
string url = "";
|
|
|
string crrury_code = "";
|
|
|
#region 设置市场所在地借口地址
|
|
|
switch (country)
|
|
|
{
|
|
|
case "新加坡":
|
|
|
crrury_code = "SGD";
|
|
|
url = "https://api.lazada.sg/rest";
|
|
|
break;
|
|
|
case "泰国":
|
|
|
crrury_code = "THB";
|
|
|
url = "https://api.lazada.co.th/rest";
|
|
|
break;
|
|
|
case "印尼":
|
|
|
crrury_code = "IDR";
|
|
|
url = "https://api.lazada.co.id/rest";
|
|
|
break;
|
|
|
case "越南":
|
|
|
crrury_code = "VND";
|
|
|
url = "https://api.lazada.vn/rest";
|
|
|
break;
|
|
|
case "马来西亚":
|
|
|
crrury_code = "MYR";
|
|
|
url = "https://api.lazada.com.my/rest";
|
|
|
break;
|
|
|
case "菲律宾":
|
|
|
crrury_code = "PHP";
|
|
|
url = "https://api.lazada.com.ph/rest";
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
ILazopClient client = new LazopClient(url, client_id, client_secret);
|
|
|
LazopRequest request = new LazopRequest();
|
|
|
request.SetApiName("/order/pack");
|
|
|
if(shipment_provider=="")
|
|
|
request.AddApiParameter("shipping_provider", "LGS-FM41");
|
|
|
else
|
|
|
request.AddApiParameter("shipping_provider", shipment_provider);
|
|
|
request.AddApiParameter("delivery_type", "dropship");//One of the following delivery types:'dropship' - the seller will send out the package on his own. 'pickup' - shop should pick up the item from the seller (cross-docking). 'send_to_warehouse' - the seller will send the item to the warehouse (cross-docking).
|
|
|
request.AddApiParameter("order_item_ids", "[" + itemorderid + "]");
|
|
|
LazopResponse response = client.Execute(request, access_token);
|
|
|
|
|
|
|
|
|
JavaScriptSerializer JsonConvert = new JavaScriptSerializer();
|
|
|
List<OrderModel> list = new List<OrderModel>();
|
|
|
if (response.Code == "0")
|
|
|
{
|
|
|
lazada_pack_Root Model = JsonConvert.Deserialize<lazada_pack_Root>(response.Body);
|
|
|
if (Model != null && Model.data != null)
|
|
|
{
|
|
|
return Model.data.order_items;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
ErrorFollow.TraceWrite("SetStatusToPackedByMarketplace", ex.Message, itemorderid);
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
#region 读取跟踪码
|
|
|
public List<lazada_pack> SetStatusToReadyToShip(string itemorderid, string tracking_number, string shipment_provider)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
string url = "";
|
|
|
string crrury_code = "";
|
|
|
#region 设置市场所在地借口地址
|
|
|
switch (country)
|
|
|
{
|
|
|
case "新加坡":
|
|
|
crrury_code = "SGD";
|
|
|
url = "https://api.lazada.sg/rest";
|
|
|
break;
|
|
|
case "泰国":
|
|
|
crrury_code = "THB";
|
|
|
url = "https://api.lazada.co.th/rest";
|
|
|
break;
|
|
|
case "印尼":
|
|
|
crrury_code = "IDR";
|
|
|
url = "https://api.lazada.co.id/rest";
|
|
|
break;
|
|
|
case "越南":
|
|
|
crrury_code = "VND";
|
|
|
url = "https://api.lazada.vn/rest";
|
|
|
break;
|
|
|
case "马来西亚":
|
|
|
crrury_code = "MYR";
|
|
|
url = "https://api.lazada.com.my/rest";
|
|
|
break;
|
|
|
case "菲律宾":
|
|
|
crrury_code = "PHP";
|
|
|
url = "https://api.lazada.com.ph/rest";
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
ILazopClient client = new LazopClient(url, client_id, client_secret);
|
|
|
LazopRequest request = new LazopRequest();
|
|
|
request.SetApiName("/order/rts");
|
|
|
request.AddApiParameter("delivery_type", "dropship");
|
|
|
request.AddApiParameter("order_item_ids", "[" + itemorderid + "]");
|
|
|
if(shipment_provider=="")
|
|
|
request.AddApiParameter("shipment_provider", "LGS-FM41");
|
|
|
else
|
|
|
request.AddApiParameter("shipment_provider", shipment_provider);
|
|
|
request.AddApiParameter("tracking_number", tracking_number);
|
|
|
LazopResponse response = client.Execute(request, access_token);
|
|
|
|
|
|
|
|
|
|
|
|
JavaScriptSerializer JsonConvert = new JavaScriptSerializer();
|
|
|
List<OrderModel> list = new List<OrderModel>();
|
|
|
if (response.Code == "0")
|
|
|
{
|
|
|
lazada_pack_Root Model = JsonConvert.Deserialize<lazada_pack_Root>(response.Body);
|
|
|
if (Model != null && Model.data != null)
|
|
|
{
|
|
|
return Model.data.order_items;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
ErrorFollow.TraceWrite("SetStatusToReadyToShip", ex.Message, itemorderid + " " + tracking_number);
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
#endregion
|
|
|
public DateTime? GetDateTime(string dt)
|
|
|
{
|
|
|
if (string.IsNullOrEmpty(dt) == true) return null;
|
|
|
// dt = dt.Replace("T", " ");
|
|
|
int len = dt.IndexOf("+");
|
|
|
dt = dt.Substring(0,len);
|
|
|
return Convert.ToDateTime(dt);
|
|
|
}
|
|
|
#region 当长时令牌超过25天,那么重新请求
|
|
|
public string GetToken()
|
|
|
{
|
|
|
|
|
|
LazopClient client = new LazopClient("https://auth.lazada.com/rest", client_id, client_secret);
|
|
|
LazopRequest request = new LazopRequest("/auth/token/create");
|
|
|
// request.AddApiParameter
|
|
|
request.AddApiParameter("code", "0_103013_YPO628jU3G3CEXEJ3jN6czhZ10430");
|
|
|
LazopResponse response = client.Execute(request);
|
|
|
return "";
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 当长时令牌超过25天,那么重新请求
|
|
|
public void GetReshToken(out string ErrorMessage)
|
|
|
{
|
|
|
if (AccessTokenUpdateTime.AddDays(4)> DateTime.Today)
|
|
|
{
|
|
|
ErrorMessage = "";
|
|
|
return;
|
|
|
}
|
|
|
LazopClient client = new LazopClient("https://auth.lazada.com/rest", client_id, client_secret);
|
|
|
LazopRequest request = new LazopRequest("/auth/token/refresh");
|
|
|
request.AddApiParameter("refresh_token", refresh_token);
|
|
|
LazopResponse response = client.Execute(request);
|
|
|
JavaScriptSerializer JsonConvert = new JavaScriptSerializer();
|
|
|
if (response.Code == "0")
|
|
|
{
|
|
|
ErrorMessage = "";
|
|
|
lazada_token Model = JsonConvert.Deserialize<lazada_token>(response.Body);
|
|
|
if (Model != null)
|
|
|
{
|
|
|
UpdateShopToken(Model.access_token,Model.refresh_token);
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
ErrorFollow.TraceWrite("LazadaGetReshToken", response.Message, "");
|
|
|
ErrorMessage = response.Message;
|
|
|
|
|
|
}
|
|
|
//if (Model.code == 0)
|
|
|
//{
|
|
|
// AccessToken = Model.data.access_token;
|
|
|
// RefreshToken = Model.data.refresh_token;
|
|
|
// RefreshTokenSaveTime = DateTime.Now;
|
|
|
// AccessTokenUpdateTime = DateTime.Now;
|
|
|
// UpdateShopToken();
|
|
|
//}
|
|
|
//else
|
|
|
//{
|
|
|
|
|
|
// ErrorMessage = Model.message;
|
|
|
//}
|
|
|
}
|
|
|
#endregion
|
|
|
#region 修改tocken
|
|
|
public void UpdateShopToken(string AccessToken, string refresh_token)
|
|
|
{
|
|
|
string tsql = @"
|
|
|
Update [JC_Shop] set [AccessToken]=@AccessToken,[AccessTokenUpdateTime]=getdate(),RefreshToken=@refresh_token where ShopId=@ShopId
|
|
|
";
|
|
|
Database db = DatabaseFactory.CreateDatabase();
|
|
|
DbCommand cmd = db.GetSqlStringCommand(tsql);
|
|
|
db.AddInParameter(cmd, "@ShopId", DbType.Int32, ShopId);
|
|
|
db.AddInParameter(cmd, "@AccessToken", DbType.String, AccessToken);
|
|
|
db.AddInParameter(cmd, "@refresh_token", DbType.String, refresh_token);
|
|
|
db.ExecuteNonQuery(cmd);
|
|
|
|
|
|
}
|
|
|
#endregion
|
|
|
}
|
|
|
public class lazada_pack_Root
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string code { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public lazada_pack_items data { get; set; }
|
|
|
|
|
|
}
|
|
|
public class lazada_pack_items
|
|
|
{
|
|
|
public List<lazada_pack> order_items { get; set; }
|
|
|
|
|
|
}
|
|
|
public class lazada_pack
|
|
|
{
|
|
|
public string order_item_id { get; set; }
|
|
|
public string purchase_order_id { get; set; }
|
|
|
public string tracking_number { get; set; }
|
|
|
public string purchase_order_number { get; set; }
|
|
|
public string shipment_provider { get; set; }
|
|
|
public string package_id { get; set; }
|
|
|
}
|
|
|
|
|
|
public class lazada_token
|
|
|
{
|
|
|
public string access_token { get; set; }
|
|
|
public string refresh_token { get; set; }
|
|
|
}
|
|
|
public class LazadaNew_Goods_Root
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string code { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public List<LazadaNew_Goods> data { get; set; }
|
|
|
|
|
|
}
|
|
|
public class LazadaNew_Goods
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string sku { get; set; }
|
|
|
public string name { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string shop_sku { get; set; }
|
|
|
|
|
|
public string order_item_id { get; set; }
|
|
|
|
|
|
public string item_price { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string product_detail_url { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string product_main_image { get; set; }
|
|
|
public string shipment_provider { get; set; }
|
|
|
|
|
|
public string Variation { get; set; }
|
|
|
public string tracking_code { get; set; }
|
|
|
|
|
|
public string warehouse_code { get; set; }
|
|
|
public string currency { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
public class Address_billing
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string country { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string address3 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string address2 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string city { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string phone { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string address1 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string post_code { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string phone2 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string last_name { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string address5 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string address4 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string first_name { get; set; }
|
|
|
}
|
|
|
|
|
|
public class Address_shipping
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string country { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string address3 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string address2 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string city { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string phone { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string address1 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string post_code { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string phone2 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string last_name { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string address5 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string address4 { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string first_name { get; set; }
|
|
|
}
|
|
|
|
|
|
public class LazadaNew_Orders2
|
|
|
{
|
|
|
// public string voucher_platform { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string voucher { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string warehouse_code { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string order_number { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string voucher_seller { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string created_at { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string voucher_code { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string gift_option { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string customer_last_name { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string updated_at { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string promised_shipping_times { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string price { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string national_registration_number { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string payment_method { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string address_updated_at { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string customer_first_name { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public decimal? shipping_fee { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string branch_number { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string tax_code { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public Int32? items_count { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string delivery_info { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string statuses { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public Address_billing address_billing { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string extra_attributes { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string order_id { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
// public string gift_message { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string remarks { get; set; }
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
public class LazadaNew_Orders
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string voucher_platform { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string voucher { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string warehouse_code { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string order_number { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string voucher_seller { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string created_at { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string voucher_code { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string gift_option { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string customer_last_name { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string updated_at { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string promised_shipping_times { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string price { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string national_registration_number { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string payment_method { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string address_updated_at { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string customer_first_name { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string shipping_fee { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string branch_number { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string tax_code { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public Int32? items_count { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string delivery_info { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public List<string> statuses { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public Address_billing address_billing { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string extra_attributes { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string order_id { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string gift_message { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public string remarks { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public Address_shipping address_shipping { get; set; }
|
|
|
}
|
|
|
public class LazadaNew_Data
|
|
|
{
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public Int32? count { get; set; }
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public List<LazadaNew_Orders> orders { get; set; }
|
|
|
}
|
|
|
|
|
|
public class LazadaNew_Root
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|
|
|
public LazadaNew_Data data { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
} |