StockoutOrderPush.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using WdtSdk;
  7. namespace StockoutOrderPush
  8. {
  9. class StockoutOrderPush
  10. {
  11. static void Main(string[] args)
  12. {
  13. WdtClient client = new WdtClient();
  14. client.sid = "";
  15. client.appkey = "";
  16. client.appsecret = "";
  17. client.gatewayUrl = "http://121.41.177.115/openapi2/stockout_order_push.php";
  18. var stockout_info = new
  19. {
  20. outer_no = "dd456789876543",
  21. warehouse_no = "api_test",
  22. detail_list = new[]
  23. {
  24. new{
  25. spec_no = "test-ptsd-00002",
  26. num = "1",
  27. price = "10"
  28. },
  29. new{
  30. spec_no = "test-ptsd-00001",
  31. num = "1",
  32. price = "10"
  33. }
  34. }
  35. };
  36. string json = stockout_info.ToJsonString();
  37. client.putParams("stockout_info", json);
  38. string result = client.wdtOpenapi();
  39. Console.WriteLine(result);
  40. Console.ReadKey();
  41. }
  42. }
  43. }