TaobaoTbkDgMaterialTemporaryOptionalRequest.cs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3. using Topsdk.Util;
  4. using Topsdk.Top.Ability370.Domain;
  5. namespace Topsdk.Top.Ability370.Request;
  6. public class TaobaoTbkDgMaterialTemporaryOptionalRequest : AbstractTopApiRequest
  7. {
  8. /*
  9. 商品筛选(特定媒体支持)-店铺dsr评分。筛选大于等于当前设置的店铺dsr评分的商品0-50000之间
  10. */
  11. private long? startDsr;
  12. /*
  13. 页大小,默认20,1~100
  14. 默认值:20 */
  15. private long? pageSize;
  16. /*
  17. 第几页,默认:1
  18. 默认值:1 */
  19. private long? pageNo;
  20. /*
  21. 链接形式:1:PC,2:无线,默认:1
  22. 默认值:1 */
  23. private long? platform;
  24. /*
  25. 商品筛选-淘客佣金比率上限。如:1234表示12.34%
  26. */
  27. private long? endTkRate;
  28. /*
  29. 商品筛选-淘客佣金比率下限。如:1234表示12.34%
  30. */
  31. private long? startTkRate;
  32. /*
  33. 商品筛选-折扣价范围上限。单位:元
  34. */
  35. private long? endPrice;
  36. /*
  37. 商品筛选-折扣价范围下限。单位:元
  38. */
  39. private long? startPrice;
  40. /*
  41. 商品筛选-是否海外商品。true表示属于海外商品,false或不设置表示不限
  42. */
  43. private bool? isOverseas;
  44. /*
  45. 商品筛选-是否天猫商品。true表示属于天猫商品,false或不设置表示不限
  46. */
  47. private bool? isTmall;
  48. /*
  49. 排序_des(降序),排序_asc(升序),销量(total_sales),淘客佣金比率(tk_rate), 累计推广量(tk_total_sales),总支出佣金(tk_total_commi),价格(price),匹配分(match)
  50. */
  51. private string? sort;
  52. /*
  53. 商品筛选-所在地
  54. */
  55. private string? itemloc;
  56. /*
  57. 商品筛选-后台类目ID。用,分割,最大10个,该ID可以通过taobao.itemcats.get接口获取到
  58. */
  59. private string? cat;
  60. /*
  61. 商品筛选-查询词
  62. */
  63. private string? q;
  64. /*
  65. 不传时默认物料id=2836;如果直接对消费者投放,可使用官方个性化算法优化的搜索物料id=17004
  66. 默认值:2836 */
  67. private long? materialId;
  68. /*
  69. 优惠券筛选-是否有优惠券。true表示该商品有优惠券,false或不设置表示不限
  70. */
  71. private bool? hasCoupon;
  72. /*
  73. ip参数影响邮费获取,如果不传或者传入不准确,邮费无法精准提供
  74. */
  75. private string? ip;
  76. /*
  77. mm_xxx_xxx_12345678三段式的最后一段数字
  78. */
  79. private long? adzoneId;
  80. /*
  81. 商品筛选-是否包邮。true表示包邮,false或不设置表示不限
  82. */
  83. private bool? needFreeShipment;
  84. /*
  85. 商品筛选-是否加入消费者保障。true表示加入,false或不设置表示不限
  86. */
  87. private bool? needPrepay;
  88. /*
  89. 商品筛选(特定媒体支持)-成交转化是否高于行业均值。True表示大于等于,false或不设置表示不限
  90. */
  91. private bool? includePayRate30;
  92. /*
  93. 商品筛选-好评率是否高于行业均值。True表示大于等于,false或不设置表示不限
  94. */
  95. private bool? includeGoodRate;
  96. /*
  97. 商品筛选(特定媒体支持)-退款率是否低于行业均值。True表示大于等于,false或不设置表示不限
  98. */
  99. private bool? includeRfdRate;
  100. /*
  101. 商品筛选-牛皮癣程度。取值:1不限,2无,3轻微
  102. 默认值:1 */
  103. private long? npxLevel;
  104. /*
  105. 智能匹配-设备号加密类型:MD5
  106. */
  107. private string? deviceEncrypt;
  108. /*
  109. 智能匹配-设备号加密后的值(MD5加密需32位小写)
  110. */
  111. private string? deviceValue;
  112. /*
  113. 智能匹配-设备类型:IMEI/IDFA/UTDID/OAID,(IOS推荐使用IDFA,android等推荐使用OAID)
  114. */
  115. private string? deviceType;
  116. /*
  117. 商品筛选-KA媒体淘客佣金比率上限。如:1234表示12.34%
  118. */
  119. private long? endKaTkRate;
  120. /*
  121. 商品筛选-KA媒体淘客佣金比率下限。如:1234表示12.34%
  122. */
  123. private long? startKaTkRate;
  124. /*
  125. 锁佣结束时间
  126. */
  127. private long? lockRateEndTime;
  128. /*
  129. 锁佣开始时间
  130. */
  131. private long? lockRateStartTime;
  132. /*
  133. 本地化业务入参-LBS信息-经度
  134. */
  135. private string? longitude;
  136. /*
  137. 本地化业务入参-LBS信息-纬度
  138. */
  139. private string? latitude;
  140. /*
  141. 本地化业务入参-LBS信息-国标城市码,仅支持单个请求,请求饿了么卡券物料时,该字段必填。 (详细城市ID见:https://mo.m.taobao.com/page_2020010315120200508)
  142. */
  143. private string? cityCode;
  144. /*
  145. 商家id,仅支持饿了么卡券商家ID,支持批量请求1-100以内,多个商家ID使用英文逗号分隔
  146. */
  147. private string? sellerIds;
  148. /*
  149. 会员运营ID
  150. */
  151. private string? specialId;
  152. /*
  153. 渠道关系ID,仅适用于渠道推广场景
  154. */
  155. private string? relationId;
  156. /*
  157. 本地化业务入参-分页唯一标识,非首页的请求必传,值为上一页返回结果中的page_result_key字段值
  158. */
  159. private string? pageResultKey;
  160. /*
  161. 人群ID,仅适用于物料评估场景material_id=41377
  162. */
  163. private long? ucrowdId;
  164. /*
  165. 物料评估-商品列表
  166. */
  167. private IList<TaobaoTbkDgMaterialTemporaryOptionalUcrowdrankitems>? ucrowdRankItems;
  168. /*
  169. 是否获取前N件佣金信息 0否,1是,其他值否
  170. */
  171. private long? getTopnRate;
  172. [JsonPropertyName("start_dsr")]
  173. public long? StartDsr
  174. {
  175. get => startDsr;
  176. set => this.startDsr = value;
  177. }
  178. [JsonPropertyName("page_size")]
  179. public long? PageSize
  180. {
  181. get => pageSize;
  182. set => this.pageSize = value;
  183. }
  184. [JsonPropertyName("page_no")]
  185. public long? PageNo
  186. {
  187. get => pageNo;
  188. set => this.pageNo = value;
  189. }
  190. [JsonPropertyName("platform")]
  191. public long? Platform
  192. {
  193. get => platform;
  194. set => this.platform = value;
  195. }
  196. [JsonPropertyName("end_tk_rate")]
  197. public long? EndTkRate
  198. {
  199. get => endTkRate;
  200. set => this.endTkRate = value;
  201. }
  202. [JsonPropertyName("start_tk_rate")]
  203. public long? StartTkRate
  204. {
  205. get => startTkRate;
  206. set => this.startTkRate = value;
  207. }
  208. [JsonPropertyName("end_price")]
  209. public long? EndPrice
  210. {
  211. get => endPrice;
  212. set => this.endPrice = value;
  213. }
  214. [JsonPropertyName("start_price")]
  215. public long? StartPrice
  216. {
  217. get => startPrice;
  218. set => this.startPrice = value;
  219. }
  220. [JsonPropertyName("is_overseas")]
  221. public bool? IsOverseas
  222. {
  223. get => isOverseas;
  224. set => this.isOverseas = value;
  225. }
  226. [JsonPropertyName("is_tmall")]
  227. public bool? IsTmall
  228. {
  229. get => isTmall;
  230. set => this.isTmall = value;
  231. }
  232. [JsonPropertyName("sort")]
  233. public string? Sort
  234. {
  235. get => sort;
  236. set => this.sort = value;
  237. }
  238. [JsonPropertyName("itemloc")]
  239. public string? Itemloc
  240. {
  241. get => itemloc;
  242. set => this.itemloc = value;
  243. }
  244. [JsonPropertyName("cat")]
  245. public string? Cat
  246. {
  247. get => cat;
  248. set => this.cat = value;
  249. }
  250. [JsonPropertyName("q")]
  251. public string? Q
  252. {
  253. get => q;
  254. set => this.q = value;
  255. }
  256. [JsonPropertyName("material_id")]
  257. public long? MaterialId
  258. {
  259. get => materialId;
  260. set => this.materialId = value;
  261. }
  262. [JsonPropertyName("has_coupon")]
  263. public bool? HasCoupon
  264. {
  265. get => hasCoupon;
  266. set => this.hasCoupon = value;
  267. }
  268. [JsonPropertyName("ip")]
  269. public string? Ip
  270. {
  271. get => ip;
  272. set => this.ip = value;
  273. }
  274. [JsonPropertyName("adzone_id")]
  275. public long? AdzoneId
  276. {
  277. get => adzoneId;
  278. set => this.adzoneId = value;
  279. }
  280. [JsonPropertyName("need_free_shipment")]
  281. public bool? NeedFreeShipment
  282. {
  283. get => needFreeShipment;
  284. set => this.needFreeShipment = value;
  285. }
  286. [JsonPropertyName("need_prepay")]
  287. public bool? NeedPrepay
  288. {
  289. get => needPrepay;
  290. set => this.needPrepay = value;
  291. }
  292. [JsonPropertyName("include_pay_rate_30")]
  293. public bool? IncludePayRate30
  294. {
  295. get => includePayRate30;
  296. set => this.includePayRate30 = value;
  297. }
  298. [JsonPropertyName("include_good_rate")]
  299. public bool? IncludeGoodRate
  300. {
  301. get => includeGoodRate;
  302. set => this.includeGoodRate = value;
  303. }
  304. [JsonPropertyName("include_rfd_rate")]
  305. public bool? IncludeRfdRate
  306. {
  307. get => includeRfdRate;
  308. set => this.includeRfdRate = value;
  309. }
  310. [JsonPropertyName("npx_level")]
  311. public long? NpxLevel
  312. {
  313. get => npxLevel;
  314. set => this.npxLevel = value;
  315. }
  316. [JsonPropertyName("device_encrypt")]
  317. public string? DeviceEncrypt
  318. {
  319. get => deviceEncrypt;
  320. set => this.deviceEncrypt = value;
  321. }
  322. [JsonPropertyName("device_value")]
  323. public string? DeviceValue
  324. {
  325. get => deviceValue;
  326. set => this.deviceValue = value;
  327. }
  328. [JsonPropertyName("device_type")]
  329. public string? DeviceType
  330. {
  331. get => deviceType;
  332. set => this.deviceType = value;
  333. }
  334. [JsonPropertyName("end_ka_tk_rate")]
  335. public long? EndKaTkRate
  336. {
  337. get => endKaTkRate;
  338. set => this.endKaTkRate = value;
  339. }
  340. [JsonPropertyName("start_ka_tk_rate")]
  341. public long? StartKaTkRate
  342. {
  343. get => startKaTkRate;
  344. set => this.startKaTkRate = value;
  345. }
  346. [JsonPropertyName("lock_rate_end_time")]
  347. public long? LockRateEndTime
  348. {
  349. get => lockRateEndTime;
  350. set => this.lockRateEndTime = value;
  351. }
  352. [JsonPropertyName("lock_rate_start_time")]
  353. public long? LockRateStartTime
  354. {
  355. get => lockRateStartTime;
  356. set => this.lockRateStartTime = value;
  357. }
  358. [JsonPropertyName("longitude")]
  359. public string? Longitude
  360. {
  361. get => longitude;
  362. set => this.longitude = value;
  363. }
  364. [JsonPropertyName("latitude")]
  365. public string? Latitude
  366. {
  367. get => latitude;
  368. set => this.latitude = value;
  369. }
  370. [JsonPropertyName("city_code")]
  371. public string? CityCode
  372. {
  373. get => cityCode;
  374. set => this.cityCode = value;
  375. }
  376. [JsonPropertyName("seller_ids")]
  377. public string? SellerIds
  378. {
  379. get => sellerIds;
  380. set => this.sellerIds = value;
  381. }
  382. [JsonPropertyName("special_id")]
  383. public string? SpecialId
  384. {
  385. get => specialId;
  386. set => this.specialId = value;
  387. }
  388. [JsonPropertyName("relation_id")]
  389. public string? RelationId
  390. {
  391. get => relationId;
  392. set => this.relationId = value;
  393. }
  394. [JsonPropertyName("page_result_key")]
  395. public string? PageResultKey
  396. {
  397. get => pageResultKey;
  398. set => this.pageResultKey = value;
  399. }
  400. [JsonPropertyName("ucrowd_id")]
  401. public long? UcrowdId
  402. {
  403. get => ucrowdId;
  404. set => this.ucrowdId = value;
  405. }
  406. [JsonPropertyName("ucrowd_rank_items")]
  407. public IList<TaobaoTbkDgMaterialTemporaryOptionalUcrowdrankitems>? UcrowdRankItems
  408. {
  409. get => ucrowdRankItems;
  410. set => this.ucrowdRankItems = value;
  411. }
  412. [JsonPropertyName("get_topn_rate")]
  413. public long? GetTopnRate
  414. {
  415. get => getTopnRate;
  416. set => this.getTopnRate = value;
  417. }
  418. public override IDictionary<string, string> ToRequestParam()
  419. {
  420. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  421. if(this.startDsr != null)
  422. {
  423. requestParam.Add("start_dsr",TopUtils.ConvertBasicType(this.startDsr));
  424. }
  425. if(this.pageSize != null)
  426. {
  427. requestParam.Add("page_size",TopUtils.ConvertBasicType(this.pageSize));
  428. }
  429. if(this.pageNo != null)
  430. {
  431. requestParam.Add("page_no",TopUtils.ConvertBasicType(this.pageNo));
  432. }
  433. if(this.platform != null)
  434. {
  435. requestParam.Add("platform",TopUtils.ConvertBasicType(this.platform));
  436. }
  437. if(this.endTkRate != null)
  438. {
  439. requestParam.Add("end_tk_rate",TopUtils.ConvertBasicType(this.endTkRate));
  440. }
  441. if(this.startTkRate != null)
  442. {
  443. requestParam.Add("start_tk_rate",TopUtils.ConvertBasicType(this.startTkRate));
  444. }
  445. if(this.endPrice != null)
  446. {
  447. requestParam.Add("end_price",TopUtils.ConvertBasicType(this.endPrice));
  448. }
  449. if(this.startPrice != null)
  450. {
  451. requestParam.Add("start_price",TopUtils.ConvertBasicType(this.startPrice));
  452. }
  453. if(this.isOverseas != null)
  454. {
  455. requestParam.Add("is_overseas",TopUtils.ConvertBasicType(this.isOverseas));
  456. }
  457. if(this.isTmall != null)
  458. {
  459. requestParam.Add("is_tmall",TopUtils.ConvertBasicType(this.isTmall));
  460. }
  461. if(this.sort != null)
  462. {
  463. requestParam.Add("sort",TopUtils.ConvertBasicType(this.sort));
  464. }
  465. if(this.itemloc != null)
  466. {
  467. requestParam.Add("itemloc",TopUtils.ConvertBasicType(this.itemloc));
  468. }
  469. if(this.cat != null)
  470. {
  471. requestParam.Add("cat",TopUtils.ConvertBasicType(this.cat));
  472. }
  473. if(this.q != null)
  474. {
  475. requestParam.Add("q",TopUtils.ConvertBasicType(this.q));
  476. }
  477. if(this.materialId != null)
  478. {
  479. requestParam.Add("material_id",TopUtils.ConvertBasicType(this.materialId));
  480. }
  481. if(this.hasCoupon != null)
  482. {
  483. requestParam.Add("has_coupon",TopUtils.ConvertBasicType(this.hasCoupon));
  484. }
  485. if(this.ip != null)
  486. {
  487. requestParam.Add("ip",TopUtils.ConvertBasicType(this.ip));
  488. }
  489. if(this.adzoneId != null)
  490. {
  491. requestParam.Add("adzone_id",TopUtils.ConvertBasicType(this.adzoneId));
  492. }
  493. if(this.needFreeShipment != null)
  494. {
  495. requestParam.Add("need_free_shipment",TopUtils.ConvertBasicType(this.needFreeShipment));
  496. }
  497. if(this.needPrepay != null)
  498. {
  499. requestParam.Add("need_prepay",TopUtils.ConvertBasicType(this.needPrepay));
  500. }
  501. if(this.includePayRate30 != null)
  502. {
  503. requestParam.Add("include_pay_rate_30",TopUtils.ConvertBasicType(this.includePayRate30));
  504. }
  505. if(this.includeGoodRate != null)
  506. {
  507. requestParam.Add("include_good_rate",TopUtils.ConvertBasicType(this.includeGoodRate));
  508. }
  509. if(this.includeRfdRate != null)
  510. {
  511. requestParam.Add("include_rfd_rate",TopUtils.ConvertBasicType(this.includeRfdRate));
  512. }
  513. if(this.npxLevel != null)
  514. {
  515. requestParam.Add("npx_level",TopUtils.ConvertBasicType(this.npxLevel));
  516. }
  517. if(this.deviceEncrypt != null)
  518. {
  519. requestParam.Add("device_encrypt",TopUtils.ConvertBasicType(this.deviceEncrypt));
  520. }
  521. if(this.deviceValue != null)
  522. {
  523. requestParam.Add("device_value",TopUtils.ConvertBasicType(this.deviceValue));
  524. }
  525. if(this.deviceType != null)
  526. {
  527. requestParam.Add("device_type",TopUtils.ConvertBasicType(this.deviceType));
  528. }
  529. if(this.endKaTkRate != null)
  530. {
  531. requestParam.Add("end_ka_tk_rate",TopUtils.ConvertBasicType(this.endKaTkRate));
  532. }
  533. if(this.startKaTkRate != null)
  534. {
  535. requestParam.Add("start_ka_tk_rate",TopUtils.ConvertBasicType(this.startKaTkRate));
  536. }
  537. if(this.lockRateEndTime != null)
  538. {
  539. requestParam.Add("lock_rate_end_time",TopUtils.ConvertBasicType(this.lockRateEndTime));
  540. }
  541. if(this.lockRateStartTime != null)
  542. {
  543. requestParam.Add("lock_rate_start_time",TopUtils.ConvertBasicType(this.lockRateStartTime));
  544. }
  545. if(this.longitude != null)
  546. {
  547. requestParam.Add("longitude",TopUtils.ConvertBasicType(this.longitude));
  548. }
  549. if(this.latitude != null)
  550. {
  551. requestParam.Add("latitude",TopUtils.ConvertBasicType(this.latitude));
  552. }
  553. if(this.cityCode != null)
  554. {
  555. requestParam.Add("city_code",TopUtils.ConvertBasicType(this.cityCode));
  556. }
  557. if(this.sellerIds != null)
  558. {
  559. requestParam.Add("seller_ids",TopUtils.ConvertBasicType(this.sellerIds));
  560. }
  561. if(this.specialId != null)
  562. {
  563. requestParam.Add("special_id",TopUtils.ConvertBasicType(this.specialId));
  564. }
  565. if(this.relationId != null)
  566. {
  567. requestParam.Add("relation_id",TopUtils.ConvertBasicType(this.relationId));
  568. }
  569. if(this.pageResultKey != null)
  570. {
  571. requestParam.Add("page_result_key",TopUtils.ConvertBasicType(this.pageResultKey));
  572. }
  573. if(this.ucrowdId != null)
  574. {
  575. requestParam.Add("ucrowd_id",TopUtils.ConvertBasicType(this.ucrowdId));
  576. }
  577. if(this.ucrowdRankItems != null)
  578. {
  579. requestParam.Add("ucrowd_rank_items",TopUtils.ConvertStructList(this.ucrowdRankItems));
  580. }
  581. if(this.getTopnRate != null)
  582. {
  583. requestParam.Add("get_topn_rate",TopUtils.ConvertBasicType(this.getTopnRate));
  584. }
  585. return requestParam;
  586. }
  587. public override IDictionary<string, TopFileItem> ToFileParam()
  588. {
  589. IDictionary<string, TopFileItem> fileParam = new Dictionary<string, TopFileItem>();
  590. return fileParam;
  591. }
  592. public override string GetApiCode()
  593. {
  594. return "taobao.tbk.dg.material.temporary.optional";
  595. }
  596. }