TaobaoTbkShopRecommendGetRequest.cs 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3. using Topsdk.Util;
  4. namespace Topsdk.Top.Ability372.Request;
  5. public class TaobaoTbkShopRecommendGetRequest : AbstractTopApiRequest
  6. {
  7. /*
  8. 返回数量,默认20,最大值40
  9. */
  10. private long? count;
  11. /*
  12. 需返回的字段列表
  13. */
  14. private string? fields;
  15. /*
  16. 链接形式:1:PC,2:无线,默认:1
  17. */
  18. private long? platform;
  19. /*
  20. 卖家Id
  21. */
  22. private long? userId;
  23. [JsonPropertyName("count")]
  24. public long? Count
  25. {
  26. get => count;
  27. set => this.count = value;
  28. }
  29. [JsonPropertyName("fields")]
  30. public string? Fields
  31. {
  32. get => fields;
  33. set => this.fields = value;
  34. }
  35. [JsonPropertyName("platform")]
  36. public long? Platform
  37. {
  38. get => platform;
  39. set => this.platform = value;
  40. }
  41. [JsonPropertyName("user_id")]
  42. public long? UserId
  43. {
  44. get => userId;
  45. set => this.userId = value;
  46. }
  47. public override IDictionary<string, string> ToRequestParam()
  48. {
  49. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  50. if(this.count != null)
  51. {
  52. requestParam.Add("count",TopUtils.ConvertBasicType(this.count));
  53. }
  54. if(this.fields != null)
  55. {
  56. requestParam.Add("fields",TopUtils.ConvertBasicType(this.fields));
  57. }
  58. if(this.platform != null)
  59. {
  60. requestParam.Add("platform",TopUtils.ConvertBasicType(this.platform));
  61. }
  62. if(this.userId != null)
  63. {
  64. requestParam.Add("user_id",TopUtils.ConvertBasicType(this.userId));
  65. }
  66. return requestParam;
  67. }
  68. public override IDictionary<string, TopFileItem> ToFileParam()
  69. {
  70. IDictionary<string, TopFileItem> fileParam = new Dictionary<string, TopFileItem>();
  71. return fileParam;
  72. }
  73. public override string GetApiCode()
  74. {
  75. return "taobao.tbk.shop.recommend.get";
  76. }
  77. }