TaobaoTbkTpwdCreateRequest.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3. using Topsdk.Util;
  4. namespace Topsdk.Top.Ability375.Request;
  5. public class TaobaoTbkTpwdCreateRequest : AbstractTopApiRequest
  6. {
  7. /*
  8. 兼容旧版本api参数,无实际作用
  9. */
  10. private string? text;
  11. /*
  12. 兼容旧版本api参数,无实际作用
  13. */
  14. private string? logo;
  15. /*
  16. 兼容旧版本api参数,无实际作用
  17. */
  18. private string? ext;
  19. /*
  20. 兼容旧版本api参数,无实际作用
  21. */
  22. private string? userId;
  23. /*
  24. 联盟官方渠道获取的淘客推广链接,请注意,不要随意篡改官方生成的链接,否则可能无法生成淘口令
  25. */
  26. private string? url;
  27. [JsonPropertyName("text")]
  28. public string? Text
  29. {
  30. get => text;
  31. set => this.text = value;
  32. }
  33. [JsonPropertyName("logo")]
  34. public string? Logo
  35. {
  36. get => logo;
  37. set => this.logo = value;
  38. }
  39. [JsonPropertyName("ext")]
  40. public string? Ext
  41. {
  42. get => ext;
  43. set => this.ext = value;
  44. }
  45. [JsonPropertyName("user_id")]
  46. public string? UserId
  47. {
  48. get => userId;
  49. set => this.userId = value;
  50. }
  51. [JsonPropertyName("url")]
  52. public string? Url
  53. {
  54. get => url;
  55. set => this.url = value;
  56. }
  57. public override IDictionary<string, string> ToRequestParam()
  58. {
  59. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  60. if(this.text != null)
  61. {
  62. requestParam.Add("text",TopUtils.ConvertBasicType(this.text));
  63. }
  64. if(this.logo != null)
  65. {
  66. requestParam.Add("logo",TopUtils.ConvertBasicType(this.logo));
  67. }
  68. if(this.ext != null)
  69. {
  70. requestParam.Add("ext",TopUtils.ConvertBasicType(this.ext));
  71. }
  72. if(this.userId != null)
  73. {
  74. requestParam.Add("user_id",TopUtils.ConvertBasicType(this.userId));
  75. }
  76. if(this.url != null)
  77. {
  78. requestParam.Add("url",TopUtils.ConvertBasicType(this.url));
  79. }
  80. return requestParam;
  81. }
  82. public override IDictionary<string, TopFileItem> ToFileParam()
  83. {
  84. IDictionary<string, TopFileItem> fileParam = new Dictionary<string, TopFileItem>();
  85. return fileParam;
  86. }
  87. public override string GetApiCode()
  88. {
  89. return "taobao.tbk.tpwd.create";
  90. }
  91. }