TaobaoTbkDgCpaActivityReportRequest.cs 3.5 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 TaobaoTbkDgCpaActivityReportRequest : AbstractTopApiRequest
  6. {
  7. /*
  8. CPA活动ID,详见https://www.yuque.com/docs/share/16905f3f-3a22-4e7c-b8c3-4d23791d42f7?#
  9. */
  10. private long? eventId;
  11. /*
  12. 日期(yyyyMMdd)
  13. */
  14. private string? bizDate;
  15. /*
  16. 分页页数,从1开始
  17. */
  18. private long? pageNo;
  19. /*
  20. 数据类型:数据类型:1预估 2结算 (选择1可查询含当天实时预估统计的累计数据,选择2可查询最晚截止昨天结算的累计数据,具体逻辑以活动规则描述为准;)
  21. 默认值:1 */
  22. private long? queryType;
  23. /*
  24. 分页大小
  25. */
  26. private long? pageSize;
  27. /*
  28. 媒体三段式id(如果传入pid则返回pid汇总数据,不传则返回member维度统计数据,pid和relationid不可同时传入)
  29. */
  30. private string? pid;
  31. /*
  32. 代理id(如果传入rid则返回rid统计数据,不传则返回member维度统计数据)
  33. */
  34. private long? relationId;
  35. [JsonPropertyName("event_id")]
  36. public long? EventId
  37. {
  38. get => eventId;
  39. set => this.eventId = value;
  40. }
  41. [JsonPropertyName("biz_date")]
  42. public string? BizDate
  43. {
  44. get => bizDate;
  45. set => this.bizDate = value;
  46. }
  47. [JsonPropertyName("page_no")]
  48. public long? PageNo
  49. {
  50. get => pageNo;
  51. set => this.pageNo = value;
  52. }
  53. [JsonPropertyName("query_type")]
  54. public long? QueryType
  55. {
  56. get => queryType;
  57. set => this.queryType = value;
  58. }
  59. [JsonPropertyName("page_size")]
  60. public long? PageSize
  61. {
  62. get => pageSize;
  63. set => this.pageSize = value;
  64. }
  65. [JsonPropertyName("pid")]
  66. public string? Pid
  67. {
  68. get => pid;
  69. set => this.pid = value;
  70. }
  71. [JsonPropertyName("relation_id")]
  72. public long? RelationId
  73. {
  74. get => relationId;
  75. set => this.relationId = value;
  76. }
  77. public override IDictionary<string, string> ToRequestParam()
  78. {
  79. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  80. if(this.eventId != null)
  81. {
  82. requestParam.Add("event_id",TopUtils.ConvertBasicType(this.eventId));
  83. }
  84. if(this.bizDate != null)
  85. {
  86. requestParam.Add("biz_date",TopUtils.ConvertBasicType(this.bizDate));
  87. }
  88. if(this.pageNo != null)
  89. {
  90. requestParam.Add("page_no",TopUtils.ConvertBasicType(this.pageNo));
  91. }
  92. if(this.queryType != null)
  93. {
  94. requestParam.Add("query_type",TopUtils.ConvertBasicType(this.queryType));
  95. }
  96. if(this.pageSize != null)
  97. {
  98. requestParam.Add("page_size",TopUtils.ConvertBasicType(this.pageSize));
  99. }
  100. if(this.pid != null)
  101. {
  102. requestParam.Add("pid",TopUtils.ConvertBasicType(this.pid));
  103. }
  104. if(this.relationId != null)
  105. {
  106. requestParam.Add("relation_id",TopUtils.ConvertBasicType(this.relationId));
  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.report";
  118. }
  119. }