TaobaoTbkRtaConsumerMatchRequest.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3. using Topsdk.Util;
  4. using Topsdk.Top.Ability3197.Domain;
  5. namespace Topsdk.Top.Ability3197.Request;
  6. public class TaobaoTbkRtaConsumerMatchRequest : AbstractTopApiRequest
  7. {
  8. /*
  9. mm_xxx_xxx_xxx的第3段数字
  10. */
  11. private long? adzoneId;
  12. /*
  13. 活动列表
  14. */
  15. private IList<TaobaoTbkRtaConsumerMatchOfferList>? offerList;
  16. /*
  17. 消费者对应的会员ID(会员ID或设备信息同时填时,优先使用会员ID)
  18. */
  19. private string? specialId;
  20. /*
  21. 设备信息,加密后的值(IMEI,IDFA,OAID,MOBILE需要加密),需用MD5加密,32位小写
  22. */
  23. private string? deviceValue;
  24. /*
  25. 设备信息,入参类型(该模式下返回的结果为模糊匹配结果,和实际情况可能存在误差):IMEI, 或者IDFA, 或者OAID, 或者MOBILE, 或者ALIPAY_ID
  26. */
  27. private string? deviceType;
  28. /*
  29. 策略ID,与活动列表二选一传入
  30. */
  31. private IList<string>? strategyIdList;
  32. [JsonPropertyName("adzone_id")]
  33. public long? AdzoneId
  34. {
  35. get => adzoneId;
  36. set => this.adzoneId = value;
  37. }
  38. [JsonPropertyName("offer_list")]
  39. public IList<TaobaoTbkRtaConsumerMatchOfferList>? OfferList
  40. {
  41. get => offerList;
  42. set => this.offerList = value;
  43. }
  44. [JsonPropertyName("special_id")]
  45. public string? SpecialId
  46. {
  47. get => specialId;
  48. set => this.specialId = value;
  49. }
  50. [JsonPropertyName("device_value")]
  51. public string? DeviceValue
  52. {
  53. get => deviceValue;
  54. set => this.deviceValue = value;
  55. }
  56. [JsonPropertyName("device_type")]
  57. public string? DeviceType
  58. {
  59. get => deviceType;
  60. set => this.deviceType = value;
  61. }
  62. [JsonPropertyName("strategy_id_list")]
  63. public IList<string>? StrategyIdList
  64. {
  65. get => strategyIdList;
  66. set => this.strategyIdList = value;
  67. }
  68. public override IDictionary<string, string> ToRequestParam()
  69. {
  70. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  71. if(this.adzoneId != null)
  72. {
  73. requestParam.Add("adzone_id",TopUtils.ConvertBasicType(this.adzoneId));
  74. }
  75. if(this.offerList != null)
  76. {
  77. requestParam.Add("offer_list",TopUtils.ConvertStructList(this.offerList));
  78. }
  79. if(this.specialId != null)
  80. {
  81. requestParam.Add("special_id",TopUtils.ConvertBasicType(this.specialId));
  82. }
  83. if(this.deviceValue != null)
  84. {
  85. requestParam.Add("device_value",TopUtils.ConvertBasicType(this.deviceValue));
  86. }
  87. if(this.deviceType != null)
  88. {
  89. requestParam.Add("device_type",TopUtils.ConvertBasicType(this.deviceType));
  90. }
  91. if(this.strategyIdList != null)
  92. {
  93. requestParam.Add("strategy_id_list",TopUtils.ConvertBasicList(this.strategyIdList));
  94. }
  95. return requestParam;
  96. }
  97. public override IDictionary<string, TopFileItem> ToFileParam()
  98. {
  99. IDictionary<string, TopFileItem> fileParam = new Dictionary<string, TopFileItem>();
  100. return fileParam;
  101. }
  102. public override string GetApiCode()
  103. {
  104. return "taobao.tbk.rta.consumer.match";
  105. }
  106. }