TopSecretGetRequest.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using Top.Api.Util;
  4. namespace Top.Api.Security
  5. {
  6. public class TopSecretGetRequest : BaseTopRequest<TopSecretGetResponse>
  7. {
  8. /// <summary>
  9. /// 伪随机码
  10. /// </summary>
  11. public string RandomNum { get; set; }
  12. /// <summary>
  13. /// 秘钥版本
  14. /// </summary>
  15. public Nullable<Int64> SecretVersion { get; set; }
  16. /// <summary>
  17. /// 自主账号id
  18. /// </summary>
  19. public Nullable<Int64> CustomerUserId { get; set; }
  20. public override string GetApiName()
  21. {
  22. return "taobao.top.secret.get";
  23. }
  24. public override void Validate()
  25. {
  26. RequestValidator.ValidateRequired("RandomNum", RandomNum);
  27. }
  28. public override IDictionary<string, string> GetParameters()
  29. {
  30. TopDictionary parameters = new TopDictionary();
  31. parameters.Add("random_num", this.RandomNum);
  32. parameters.Add("secret_version", this.SecretVersion);
  33. parameters.Add("customer_user_id", this.CustomerUserId);
  34. if (this.otherParams != null)
  35. {
  36. parameters.AddAll(otherParams);
  37. }
  38. return parameters;
  39. }
  40. }
  41. }