TaobaoTbkOrderDetailsTemporaryGetRequest.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3. using Topsdk.Util;
  4. namespace Topsdk.Top.Ability414.Request;
  5. public class TaobaoTbkOrderDetailsTemporaryGetRequest : AbstractTopApiRequest
  6. {
  7. /*
  8. 查询时间类型,1:按照订单淘客创建时间查询,2:按照订单淘客付款时间查询,3:按照订单淘客结算时间查询,4:按照订单更新时间;
  9. 默认值:1 */
  10. private long? queryType;
  11. /*
  12. 位点,除第一页之外,都需要传递;前端原样返回。
  13. */
  14. private string? positionIndex;
  15. /*
  16. 页大小,默认20,1~100
  17. 默认值:20 */
  18. private long? pageSize;
  19. /*
  20. 推广者角色类型,2:二方,3:三方,不传,表示所有角色
  21. */
  22. private long? memberType;
  23. /*
  24. 淘客订单状态,11-拍下未付款,12-付款,13-关闭,14-确认收货,3-结算成功;不传,表示所有状态
  25. */
  26. private long? tkStatus;
  27. /*
  28. 订单查询结束时间,订单开始时间至订单结束时间,中间时间段日常要求不超过3个小时,但如618、双11、年货节等大促期间预估时间段不可超过20分钟,超过会提示错误,调用时请务必注意时间段的选择,以保证亲能正常调用!
  29. */
  30. private string? endTime;
  31. /*
  32. 订单查询开始时间
  33. */
  34. private string? startTime;
  35. /*
  36. 跳转类型,当向前或者向后翻页必须提供,-1: 向前翻页,1:向后翻页
  37. 默认值:1 */
  38. private long? jumpType;
  39. /*
  40. 第几页,默认1,1~100
  41. 默认值:1 */
  42. private long? pageNo;
  43. /*
  44. 场景订单场景类型,1:常规订单,2:渠道订单,3:会员运营订单,默认为1
  45. 默认值:1 */
  46. private long? orderScene;
  47. [JsonPropertyName("query_type")]
  48. public long? QueryType
  49. {
  50. get => queryType;
  51. set => this.queryType = value;
  52. }
  53. [JsonPropertyName("position_index")]
  54. public string? PositionIndex
  55. {
  56. get => positionIndex;
  57. set => this.positionIndex = value;
  58. }
  59. [JsonPropertyName("page_size")]
  60. public long? PageSize
  61. {
  62. get => pageSize;
  63. set => this.pageSize = value;
  64. }
  65. [JsonPropertyName("member_type")]
  66. public long? MemberType
  67. {
  68. get => memberType;
  69. set => this.memberType = value;
  70. }
  71. [JsonPropertyName("tk_status")]
  72. public long? TkStatus
  73. {
  74. get => tkStatus;
  75. set => this.tkStatus = value;
  76. }
  77. [JsonPropertyName("end_time")]
  78. public string? EndTime
  79. {
  80. get => endTime;
  81. set => this.endTime = value;
  82. }
  83. [JsonPropertyName("start_time")]
  84. public string? StartTime
  85. {
  86. get => startTime;
  87. set => this.startTime = value;
  88. }
  89. [JsonPropertyName("jump_type")]
  90. public long? JumpType
  91. {
  92. get => jumpType;
  93. set => this.jumpType = value;
  94. }
  95. [JsonPropertyName("page_no")]
  96. public long? PageNo
  97. {
  98. get => pageNo;
  99. set => this.pageNo = value;
  100. }
  101. [JsonPropertyName("order_scene")]
  102. public long? OrderScene
  103. {
  104. get => orderScene;
  105. set => this.orderScene = value;
  106. }
  107. public override IDictionary<string, string> ToRequestParam()
  108. {
  109. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  110. if(this.queryType != null)
  111. {
  112. requestParam.Add("query_type",TopUtils.ConvertBasicType(this.queryType));
  113. }
  114. if(this.positionIndex != null)
  115. {
  116. requestParam.Add("position_index",TopUtils.ConvertBasicType(this.positionIndex));
  117. }
  118. if(this.pageSize != null)
  119. {
  120. requestParam.Add("page_size",TopUtils.ConvertBasicType(this.pageSize));
  121. }
  122. if(this.memberType != null)
  123. {
  124. requestParam.Add("member_type",TopUtils.ConvertBasicType(this.memberType));
  125. }
  126. if(this.tkStatus != null)
  127. {
  128. requestParam.Add("tk_status",TopUtils.ConvertBasicType(this.tkStatus));
  129. }
  130. if(this.endTime != null)
  131. {
  132. requestParam.Add("end_time",TopUtils.ConvertBasicType(this.endTime));
  133. }
  134. if(this.startTime != null)
  135. {
  136. requestParam.Add("start_time",TopUtils.ConvertBasicType(this.startTime));
  137. }
  138. if(this.jumpType != null)
  139. {
  140. requestParam.Add("jump_type",TopUtils.ConvertBasicType(this.jumpType));
  141. }
  142. if(this.pageNo != null)
  143. {
  144. requestParam.Add("page_no",TopUtils.ConvertBasicType(this.pageNo));
  145. }
  146. if(this.orderScene != null)
  147. {
  148. requestParam.Add("order_scene",TopUtils.ConvertBasicType(this.orderScene));
  149. }
  150. return requestParam;
  151. }
  152. public override IDictionary<string, TopFileItem> ToFileParam()
  153. {
  154. IDictionary<string, TopFileItem> fileParam = new Dictionary<string, TopFileItem>();
  155. return fileParam;
  156. }
  157. public override string GetApiCode()
  158. {
  159. return "taobao.tbk.order.details.temporary.get";
  160. }
  161. }