TaobaoTbkScPublisherInfoSaveRequest.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3. using Topsdk.Util;
  4. namespace Topsdk.Top.Ability425.Request;
  5. public class TaobaoTbkScPublisherInfoSaveRequest : AbstractTopApiRequest
  6. {
  7. /*
  8. 渠道备案 - 来源,取链接的来源
  9. */
  10. private string? relationFrom;
  11. /*
  12. 渠道备案 - 线下场景信息,1 - 门店,2- 学校,3 - 工厂,4 - 其他
  13. */
  14. private string? offlineScene;
  15. /*
  16. 渠道备案 - 线上场景信息,1 - 微信群,2- QQ群,3 - 其他
  17. */
  18. private string? onlineScene;
  19. /*
  20. 淘宝客邀请渠道或会员的邀请码
  21. */
  22. private string? inviterCode;
  23. /*
  24. 类型,必选 默认为1:
  25. */
  26. private long? infoType;
  27. /*
  28. 媒体侧渠道备注
  29. */
  30. private string? note;
  31. /*
  32. 线下备案注册信息,字段包含: 电话号码(phoneNumber,必填),省(province,必填),市(city,必填),区县街道(location,必填),详细地址(detailAddress,必填),经营类型(career,线下个人必填),店铺类型(shopType,线下店铺必填),店铺名称(shopName,线下店铺必填),店铺证书类型(shopCertifyType,线下店铺选填),店铺证书编号(certifyNumber,线下店铺选填)
  33. */
  34. private string? registerInfo;
  35. [JsonPropertyName("relation_from")]
  36. public string? RelationFrom
  37. {
  38. get => relationFrom;
  39. set => this.relationFrom = value;
  40. }
  41. [JsonPropertyName("offline_scene")]
  42. public string? OfflineScene
  43. {
  44. get => offlineScene;
  45. set => this.offlineScene = value;
  46. }
  47. [JsonPropertyName("online_scene")]
  48. public string? OnlineScene
  49. {
  50. get => onlineScene;
  51. set => this.onlineScene = value;
  52. }
  53. [JsonPropertyName("inviter_code")]
  54. public string? InviterCode
  55. {
  56. get => inviterCode;
  57. set => this.inviterCode = value;
  58. }
  59. [JsonPropertyName("info_type")]
  60. public long? InfoType
  61. {
  62. get => infoType;
  63. set => this.infoType = value;
  64. }
  65. [JsonPropertyName("note")]
  66. public string? Note
  67. {
  68. get => note;
  69. set => this.note = value;
  70. }
  71. [JsonPropertyName("register_info")]
  72. public string? RegisterInfo
  73. {
  74. get => registerInfo;
  75. set => this.registerInfo = value;
  76. }
  77. public override IDictionary<string, string> ToRequestParam()
  78. {
  79. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  80. if(this.relationFrom != null)
  81. {
  82. requestParam.Add("relation_from",TopUtils.ConvertBasicType(this.relationFrom));
  83. }
  84. if(this.offlineScene != null)
  85. {
  86. requestParam.Add("offline_scene",TopUtils.ConvertBasicType(this.offlineScene));
  87. }
  88. if(this.onlineScene != null)
  89. {
  90. requestParam.Add("online_scene",TopUtils.ConvertBasicType(this.onlineScene));
  91. }
  92. if(this.inviterCode != null)
  93. {
  94. requestParam.Add("inviter_code",TopUtils.ConvertBasicType(this.inviterCode));
  95. }
  96. if(this.infoType != null)
  97. {
  98. requestParam.Add("info_type",TopUtils.ConvertBasicType(this.infoType));
  99. }
  100. if(this.note != null)
  101. {
  102. requestParam.Add("note",TopUtils.ConvertBasicType(this.note));
  103. }
  104. if(this.registerInfo != null)
  105. {
  106. requestParam.Add("register_info",TopUtils.ConvertBasicType(this.registerInfo));
  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.sc.publisher.info.save";
  118. }
  119. }