TaobaoTbkDgCpaActivityDetailRequest.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3. using Topsdk.Util;
  4. namespace Topsdk.Top.Ability3261.Request;
  5. public class TaobaoTbkDgCpaActivityDetailRequest : AbstractTopApiRequest
  6. {
  7. /*
  8. 明细类型,1:预估明细,2:结算明细
  9. 默认值:1 */
  10. private long? queryType;
  11. /*
  12. 每页条数
  13. 默认值:10 */
  14. private long? pageSize;
  15. /*
  16. 页码
  17. 默认值:1 */
  18. private long? pageNo;
  19. /*
  20. CPA活动ID
  21. */
  22. private long? eventId;
  23. /*
  24. CPA活动奖励的统计口径,相关说明见文档:https://www.yuque.com/docs/share/7ecf8cf1-7f99-4633-a2ed-f9b6f8116af5?#
  25. */
  26. private string? indicatorAlias;
  27. /*
  28. 下一页开始查询的记录主键id
  29. */
  30. private long? startId;
  31. /*
  32. 指定数据批次号(时间戳)
  33. */
  34. private DateTime? runtime;
  35. [JsonPropertyName("query_type")]
  36. public long? QueryType
  37. {
  38. get => queryType;
  39. set => this.queryType = value;
  40. }
  41. [JsonPropertyName("page_size")]
  42. public long? PageSize
  43. {
  44. get => pageSize;
  45. set => this.pageSize = value;
  46. }
  47. [JsonPropertyName("page_no")]
  48. public long? PageNo
  49. {
  50. get => pageNo;
  51. set => this.pageNo = value;
  52. }
  53. [JsonPropertyName("event_id")]
  54. public long? EventId
  55. {
  56. get => eventId;
  57. set => this.eventId = value;
  58. }
  59. [JsonPropertyName("indicator_alias")]
  60. public string? IndicatorAlias
  61. {
  62. get => indicatorAlias;
  63. set => this.indicatorAlias = value;
  64. }
  65. [JsonPropertyName("start_id")]
  66. public long? StartId
  67. {
  68. get => startId;
  69. set => this.startId = value;
  70. }
  71. [JsonPropertyName("runtime")]
  72. public DateTime? Runtime
  73. {
  74. get => runtime;
  75. set => this.runtime = value;
  76. }
  77. public override IDictionary<string, string> ToRequestParam()
  78. {
  79. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  80. if(this.queryType != null)
  81. {
  82. requestParam.Add("query_type",TopUtils.ConvertBasicType(this.queryType));
  83. }
  84. if(this.pageSize != null)
  85. {
  86. requestParam.Add("page_size",TopUtils.ConvertBasicType(this.pageSize));
  87. }
  88. if(this.pageNo != null)
  89. {
  90. requestParam.Add("page_no",TopUtils.ConvertBasicType(this.pageNo));
  91. }
  92. if(this.eventId != null)
  93. {
  94. requestParam.Add("event_id",TopUtils.ConvertBasicType(this.eventId));
  95. }
  96. if(this.indicatorAlias != null)
  97. {
  98. requestParam.Add("indicator_alias",TopUtils.ConvertBasicType(this.indicatorAlias));
  99. }
  100. if(this.startId != null)
  101. {
  102. requestParam.Add("start_id",TopUtils.ConvertBasicType(this.startId));
  103. }
  104. if(this.runtime != null)
  105. {
  106. requestParam.Add("runtime",TopUtils.ConvertBasicType(this.runtime));
  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.dg.cpa.activity.detail";
  118. }
  119. }