TaobaoTbkDgNewuserOrderGetRequest.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3. using Topsdk.Util;
  4. namespace Topsdk.Top.Ability2138.Request;
  5. public class TaobaoTbkDgNewuserOrderGetRequest : AbstractTopApiRequest
  6. {
  7. /*
  8. 页大小,默认20,1~100
  9. 默认值:20 */
  10. private long? pageSize;
  11. /*
  12. 页码,默认1
  13. 默认值:1 */
  14. private long? pageNo;
  15. /*
  16. mm_xxx_xxx_xxx的第三位
  17. */
  18. private long? adzoneId;
  19. /*
  20. 开始时间,当活动为淘宝活动,表示最早注册时间;当活动为支付宝活动,表示最早绑定时间;当活动为天猫活动,表示最早领取红包时间
  21. */
  22. private DateTime? startTime;
  23. /*
  24. 结束时间,当活动为淘宝活动,表示最晚结束时间;当活动为支付宝活动,表示最晚绑定时间;当活动为天猫活动,表示最晚领取红包的时间
  25. */
  26. private DateTime? endTime;
  27. /*
  28. 活动id, 活动名称与活动ID列表(该字段已废弃)
  29. */
  30. private string? activityId;
  31. [JsonPropertyName("page_size")]
  32. public long? PageSize
  33. {
  34. get => pageSize;
  35. set => this.pageSize = value;
  36. }
  37. [JsonPropertyName("page_no")]
  38. public long? PageNo
  39. {
  40. get => pageNo;
  41. set => this.pageNo = value;
  42. }
  43. [JsonPropertyName("adzone_id")]
  44. public long? AdzoneId
  45. {
  46. get => adzoneId;
  47. set => this.adzoneId = value;
  48. }
  49. [JsonPropertyName("start_time")]
  50. public DateTime? StartTime
  51. {
  52. get => startTime;
  53. set => this.startTime = value;
  54. }
  55. [JsonPropertyName("end_time")]
  56. public DateTime? EndTime
  57. {
  58. get => endTime;
  59. set => this.endTime = value;
  60. }
  61. [JsonPropertyName("activity_id")]
  62. public string? ActivityId
  63. {
  64. get => activityId;
  65. set => this.activityId = value;
  66. }
  67. public override IDictionary<string, string> ToRequestParam()
  68. {
  69. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  70. if(this.pageSize != null)
  71. {
  72. requestParam.Add("page_size",TopUtils.ConvertBasicType(this.pageSize));
  73. }
  74. if(this.pageNo != null)
  75. {
  76. requestParam.Add("page_no",TopUtils.ConvertBasicType(this.pageNo));
  77. }
  78. if(this.adzoneId != null)
  79. {
  80. requestParam.Add("adzone_id",TopUtils.ConvertBasicType(this.adzoneId));
  81. }
  82. if(this.startTime != null)
  83. {
  84. requestParam.Add("start_time",TopUtils.ConvertBasicType(this.startTime));
  85. }
  86. if(this.endTime != null)
  87. {
  88. requestParam.Add("end_time",TopUtils.ConvertBasicType(this.endTime));
  89. }
  90. if(this.activityId != null)
  91. {
  92. requestParam.Add("activity_id",TopUtils.ConvertBasicType(this.activityId));
  93. }
  94. return requestParam;
  95. }
  96. public override IDictionary<string, TopFileItem> ToFileParam()
  97. {
  98. IDictionary<string, TopFileItem> fileParam = new Dictionary<string, TopFileItem>();
  99. return fileParam;
  100. }
  101. public override string GetApiCode()
  102. {
  103. return "taobao.tbk.dg.newuser.order.get";
  104. }
  105. }