TaobaoTbkItemInfoUpgradeGetRequest.cs 3.8 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 TaobaoTbkItemInfoUpgradeGetRequest : AbstractTopApiRequest
  6. {
  7. /*
  8. 商品ID。多个用","分割,一次最多查询20个
  9. */
  10. private string? itemId;
  11. /*
  12. ip地址,影响邮费获取,如果不传或者传入不准确,邮费无法精准提供
  13. */
  14. private string? ip;
  15. /*
  16. 1-动态ID转链场景,2-消费者比价场景,3-商品库导购场景(不填默认为1);场景id使用说明参考《淘宝客新商品ID升级》白皮书:https://www.yuque.com/taobaolianmengguanfangxiaoer/zmig94/tfyt0pahmlpzu2ud
  17. */
  18. private string? bizSceneId;
  19. /*
  20. 1-自购省,2-推广赚(代理模式专属ID,代理模式必填,非代理模式不用填写该字段)
  21. */
  22. private string? promotionType;
  23. /*
  24. 渠道关系ID,仅适用于渠道推广场景
  25. */
  26. private string? relationId;
  27. /*
  28. 商品库服务账户(场景id3权限对应的memberid)
  29. */
  30. private long? manageItemPubId;
  31. /*
  32. 是否获取单品淘礼金剩余数量,0-否,1-是,默认否(仅开通淘礼金权限媒体可查)
  33. */
  34. private long? getTljInfo;
  35. [JsonPropertyName("item_id")]
  36. public string? ItemId
  37. {
  38. get => itemId;
  39. set => this.itemId = value;
  40. }
  41. [JsonPropertyName("ip")]
  42. public string? Ip
  43. {
  44. get => ip;
  45. set => this.ip = value;
  46. }
  47. [JsonPropertyName("biz_scene_id")]
  48. public string? BizSceneId
  49. {
  50. get => bizSceneId;
  51. set => this.bizSceneId = value;
  52. }
  53. [JsonPropertyName("promotion_type")]
  54. public string? PromotionType
  55. {
  56. get => promotionType;
  57. set => this.promotionType = value;
  58. }
  59. [JsonPropertyName("relation_id")]
  60. public string? RelationId
  61. {
  62. get => relationId;
  63. set => this.relationId = value;
  64. }
  65. [JsonPropertyName("manage_item_pub_id")]
  66. public long? ManageItemPubId
  67. {
  68. get => manageItemPubId;
  69. set => this.manageItemPubId = value;
  70. }
  71. [JsonPropertyName("get_tlj_info")]
  72. public long? GetTljInfo
  73. {
  74. get => getTljInfo;
  75. set => this.getTljInfo = value;
  76. }
  77. public override IDictionary<string, string> ToRequestParam()
  78. {
  79. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  80. if(this.itemId != null)
  81. {
  82. requestParam.Add("item_id",TopUtils.ConvertBasicType(this.itemId));
  83. }
  84. if(this.ip != null)
  85. {
  86. requestParam.Add("ip",TopUtils.ConvertBasicType(this.ip));
  87. }
  88. if(this.bizSceneId != null)
  89. {
  90. requestParam.Add("biz_scene_id",TopUtils.ConvertBasicType(this.bizSceneId));
  91. }
  92. if(this.promotionType != null)
  93. {
  94. requestParam.Add("promotion_type",TopUtils.ConvertBasicType(this.promotionType));
  95. }
  96. if(this.relationId != null)
  97. {
  98. requestParam.Add("relation_id",TopUtils.ConvertBasicType(this.relationId));
  99. }
  100. if(this.manageItemPubId != null)
  101. {
  102. requestParam.Add("manage_item_pub_id",TopUtils.ConvertBasicType(this.manageItemPubId));
  103. }
  104. if(this.getTljInfo != null)
  105. {
  106. requestParam.Add("get_tlj_info",TopUtils.ConvertBasicType(this.getTljInfo));
  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.upgrade.get";
  118. }
  119. }