TaobaoTbkItemInfoGetRequest.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3. using Topsdk.Util;
  4. namespace Topsdk.Top.Ability371.Request;
  5. public class TaobaoTbkItemInfoGetRequest : AbstractTopApiRequest
  6. {
  7. /*
  8. 商品ID串,用,分割,最大40个
  9. */
  10. private string? numIids;
  11. /*
  12. 链接形式:1:PC,2:无线,默认:1
  13. 默认值:1 */
  14. private long? platform;
  15. /*
  16. ip地址,影响邮费获取,如果不传或者传入不准确,邮费无法精准提供
  17. */
  18. private string? ip;
  19. /*
  20. 1-动态ID转链场景,2-消费者比价场景,3-商品库导购场景(不填默认为1)
  21. */
  22. private string? bizSceneId;
  23. /*
  24. 1-自购省,2-推广赚(代理模式专属ID,代理模式必填,非代理模式不用填写该字段)
  25. */
  26. private string? promotionType;
  27. /*
  28. 渠道关系ID
  29. */
  30. private string? relationId;
  31. /*
  32. 商品库服务账户(场景id3权限对应的memberid)
  33. */
  34. private long? manageItemPubId;
  35. [JsonPropertyName("num_iids")]
  36. public string? NumIids
  37. {
  38. get => numIids;
  39. set => this.numIids = value;
  40. }
  41. [JsonPropertyName("platform")]
  42. public long? Platform
  43. {
  44. get => platform;
  45. set => this.platform = value;
  46. }
  47. [JsonPropertyName("ip")]
  48. public string? Ip
  49. {
  50. get => ip;
  51. set => this.ip = value;
  52. }
  53. [JsonPropertyName("biz_scene_id")]
  54. public string? BizSceneId
  55. {
  56. get => bizSceneId;
  57. set => this.bizSceneId = value;
  58. }
  59. [JsonPropertyName("promotion_type")]
  60. public string? PromotionType
  61. {
  62. get => promotionType;
  63. set => this.promotionType = value;
  64. }
  65. [JsonPropertyName("relation_id")]
  66. public string? RelationId
  67. {
  68. get => relationId;
  69. set => this.relationId = value;
  70. }
  71. [JsonPropertyName("manage_item_pub_id")]
  72. public long? ManageItemPubId
  73. {
  74. get => manageItemPubId;
  75. set => this.manageItemPubId = value;
  76. }
  77. public override IDictionary<string, string> ToRequestParam()
  78. {
  79. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  80. if(this.numIids != null)
  81. {
  82. requestParam.Add("num_iids",TopUtils.ConvertBasicType(this.numIids));
  83. }
  84. if(this.platform != null)
  85. {
  86. requestParam.Add("platform",TopUtils.ConvertBasicType(this.platform));
  87. }
  88. if(this.ip != null)
  89. {
  90. requestParam.Add("ip",TopUtils.ConvertBasicType(this.ip));
  91. }
  92. if(this.bizSceneId != null)
  93. {
  94. requestParam.Add("biz_scene_id",TopUtils.ConvertBasicType(this.bizSceneId));
  95. }
  96. if(this.promotionType != null)
  97. {
  98. requestParam.Add("promotion_type",TopUtils.ConvertBasicType(this.promotionType));
  99. }
  100. if(this.relationId != null)
  101. {
  102. requestParam.Add("relation_id",TopUtils.ConvertBasicType(this.relationId));
  103. }
  104. if(this.manageItemPubId != null)
  105. {
  106. requestParam.Add("manage_item_pub_id",TopUtils.ConvertBasicType(this.manageItemPubId));
  107. }
  108. return requestParam;
  109. }
  110. public override IDictionary<string, TopFileItem> ToFileParam()
  111. {
  112. IDictionary<string, TopFileItem> fileParam = new Dictionary<string, TopFileItem>();
  113. return fileParam;
  114. }
  115. public override string GetApiCode()
  116. {
  117. return "taobao.tbk.item.info.get";
  118. }
  119. }