TaobaoTbkShopGetRequest.cs 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3. using Topsdk.Util;
  4. namespace Topsdk.Top.Ability370.Request;
  5. public class TaobaoTbkShopGetRequest : AbstractTopApiRequest
  6. {
  7. /*
  8. 累计推广商品上限
  9. */
  10. private long? endAuctionCount;
  11. /*
  12. 淘客佣金比率上限,1~10000
  13. */
  14. private long? endCommissionRate;
  15. /*
  16. 信用等级上限,1~20
  17. */
  18. private long? endCredit;
  19. /*
  20. 店铺商品总数上限
  21. */
  22. private long? endTotalAction;
  23. /*
  24. 需返回的字段列表
  25. */
  26. private string? fields;
  27. /*
  28. 是否商城的店铺,设置为true表示该是属于淘宝商城的店铺,设置为false或不设置表示不判断这个属性
  29. */
  30. private bool? isTmall;
  31. /*
  32. 第几页,默认1,1~100
  33. 默认值:1 */
  34. private long? pageNo;
  35. /*
  36. 页大小,默认20,1~100
  37. 默认值:20 */
  38. private long? pageSize;
  39. /*
  40. 链接形式:1:PC,2:无线,默认:1
  41. 默认值:1 */
  42. private long? platform;
  43. /*
  44. 查询词
  45. */
  46. private string? q;
  47. /*
  48. 排序_des(降序),排序_asc(升序),佣金比率(commission_rate), 商品数量(auction_count),销售总数量(total_auction)
  49. */
  50. private string? sort;
  51. /*
  52. 累计推广商品下限
  53. */
  54. private long? startAuctionCount;
  55. /*
  56. 淘客佣金比率下限,1~10000
  57. */
  58. private long? startCommissionRate;
  59. /*
  60. 信用等级下限,1~20
  61. */
  62. private long? startCredit;
  63. /*
  64. 店铺商品总数下限
  65. */
  66. private long? startTotalAction;
  67. [JsonPropertyName("end_auction_count")]
  68. public long? EndAuctionCount
  69. {
  70. get => endAuctionCount;
  71. set => this.endAuctionCount = value;
  72. }
  73. [JsonPropertyName("end_commission_rate")]
  74. public long? EndCommissionRate
  75. {
  76. get => endCommissionRate;
  77. set => this.endCommissionRate = value;
  78. }
  79. [JsonPropertyName("end_credit")]
  80. public long? EndCredit
  81. {
  82. get => endCredit;
  83. set => this.endCredit = value;
  84. }
  85. [JsonPropertyName("end_total_action")]
  86. public long? EndTotalAction
  87. {
  88. get => endTotalAction;
  89. set => this.endTotalAction = value;
  90. }
  91. [JsonPropertyName("fields")]
  92. public string? Fields
  93. {
  94. get => fields;
  95. set => this.fields = value;
  96. }
  97. [JsonPropertyName("is_tmall")]
  98. public bool? IsTmall
  99. {
  100. get => isTmall;
  101. set => this.isTmall = value;
  102. }
  103. [JsonPropertyName("page_no")]
  104. public long? PageNo
  105. {
  106. get => pageNo;
  107. set => this.pageNo = value;
  108. }
  109. [JsonPropertyName("page_size")]
  110. public long? PageSize
  111. {
  112. get => pageSize;
  113. set => this.pageSize = value;
  114. }
  115. [JsonPropertyName("platform")]
  116. public long? Platform
  117. {
  118. get => platform;
  119. set => this.platform = value;
  120. }
  121. [JsonPropertyName("q")]
  122. public string? Q
  123. {
  124. get => q;
  125. set => this.q = value;
  126. }
  127. [JsonPropertyName("sort")]
  128. public string? Sort
  129. {
  130. get => sort;
  131. set => this.sort = value;
  132. }
  133. [JsonPropertyName("start_auction_count")]
  134. public long? StartAuctionCount
  135. {
  136. get => startAuctionCount;
  137. set => this.startAuctionCount = value;
  138. }
  139. [JsonPropertyName("start_commission_rate")]
  140. public long? StartCommissionRate
  141. {
  142. get => startCommissionRate;
  143. set => this.startCommissionRate = value;
  144. }
  145. [JsonPropertyName("start_credit")]
  146. public long? StartCredit
  147. {
  148. get => startCredit;
  149. set => this.startCredit = value;
  150. }
  151. [JsonPropertyName("start_total_action")]
  152. public long? StartTotalAction
  153. {
  154. get => startTotalAction;
  155. set => this.startTotalAction = value;
  156. }
  157. public override IDictionary<string, string> ToRequestParam()
  158. {
  159. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  160. if(this.endAuctionCount != null)
  161. {
  162. requestParam.Add("end_auction_count",TopUtils.ConvertBasicType(this.endAuctionCount));
  163. }
  164. if(this.endCommissionRate != null)
  165. {
  166. requestParam.Add("end_commission_rate",TopUtils.ConvertBasicType(this.endCommissionRate));
  167. }
  168. if(this.endCredit != null)
  169. {
  170. requestParam.Add("end_credit",TopUtils.ConvertBasicType(this.endCredit));
  171. }
  172. if(this.endTotalAction != null)
  173. {
  174. requestParam.Add("end_total_action",TopUtils.ConvertBasicType(this.endTotalAction));
  175. }
  176. if(this.fields != null)
  177. {
  178. requestParam.Add("fields",TopUtils.ConvertBasicType(this.fields));
  179. }
  180. if(this.isTmall != null)
  181. {
  182. requestParam.Add("is_tmall",TopUtils.ConvertBasicType(this.isTmall));
  183. }
  184. if(this.pageNo != null)
  185. {
  186. requestParam.Add("page_no",TopUtils.ConvertBasicType(this.pageNo));
  187. }
  188. if(this.pageSize != null)
  189. {
  190. requestParam.Add("page_size",TopUtils.ConvertBasicType(this.pageSize));
  191. }
  192. if(this.platform != null)
  193. {
  194. requestParam.Add("platform",TopUtils.ConvertBasicType(this.platform));
  195. }
  196. if(this.q != null)
  197. {
  198. requestParam.Add("q",TopUtils.ConvertBasicType(this.q));
  199. }
  200. if(this.sort != null)
  201. {
  202. requestParam.Add("sort",TopUtils.ConvertBasicType(this.sort));
  203. }
  204. if(this.startAuctionCount != null)
  205. {
  206. requestParam.Add("start_auction_count",TopUtils.ConvertBasicType(this.startAuctionCount));
  207. }
  208. if(this.startCommissionRate != null)
  209. {
  210. requestParam.Add("start_commission_rate",TopUtils.ConvertBasicType(this.startCommissionRate));
  211. }
  212. if(this.startCredit != null)
  213. {
  214. requestParam.Add("start_credit",TopUtils.ConvertBasicType(this.startCredit));
  215. }
  216. if(this.startTotalAction != null)
  217. {
  218. requestParam.Add("start_total_action",TopUtils.ConvertBasicType(this.startTotalAction));
  219. }
  220. return requestParam;
  221. }
  222. public override IDictionary<string, TopFileItem> ToFileParam()
  223. {
  224. IDictionary<string, TopFileItem> fileParam = new Dictionary<string, TopFileItem>();
  225. return fileParam;
  226. }
  227. public override string GetApiCode()
  228. {
  229. return "taobao.tbk.shop.get";
  230. }
  231. }