AlipaySecurityProdFacepayVerifyModel.py 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipaySecurityProdFacepayVerifyModel(object):
  6. def __init__(self):
  7. self._check_code = None
  8. self._face_image = None
  9. self._ftoken = None
  10. self._store_id = None
  11. self._user_auth_id = None
  12. self._user_auth_type = None
  13. @property
  14. def check_code(self):
  15. return self._check_code
  16. @check_code.setter
  17. def check_code(self, value):
  18. self._check_code = value
  19. @property
  20. def face_image(self):
  21. return self._face_image
  22. @face_image.setter
  23. def face_image(self, value):
  24. self._face_image = value
  25. @property
  26. def ftoken(self):
  27. return self._ftoken
  28. @ftoken.setter
  29. def ftoken(self, value):
  30. self._ftoken = value
  31. @property
  32. def store_id(self):
  33. return self._store_id
  34. @store_id.setter
  35. def store_id(self, value):
  36. self._store_id = value
  37. @property
  38. def user_auth_id(self):
  39. return self._user_auth_id
  40. @user_auth_id.setter
  41. def user_auth_id(self, value):
  42. self._user_auth_id = value
  43. @property
  44. def user_auth_type(self):
  45. return self._user_auth_type
  46. @user_auth_type.setter
  47. def user_auth_type(self, value):
  48. self._user_auth_type = value
  49. def to_alipay_dict(self):
  50. params = dict()
  51. if self.check_code:
  52. if hasattr(self.check_code, 'to_alipay_dict'):
  53. params['check_code'] = self.check_code.to_alipay_dict()
  54. else:
  55. params['check_code'] = self.check_code
  56. if self.face_image:
  57. if hasattr(self.face_image, 'to_alipay_dict'):
  58. params['face_image'] = self.face_image.to_alipay_dict()
  59. else:
  60. params['face_image'] = self.face_image
  61. if self.ftoken:
  62. if hasattr(self.ftoken, 'to_alipay_dict'):
  63. params['ftoken'] = self.ftoken.to_alipay_dict()
  64. else:
  65. params['ftoken'] = self.ftoken
  66. if self.store_id:
  67. if hasattr(self.store_id, 'to_alipay_dict'):
  68. params['store_id'] = self.store_id.to_alipay_dict()
  69. else:
  70. params['store_id'] = self.store_id
  71. if self.user_auth_id:
  72. if hasattr(self.user_auth_id, 'to_alipay_dict'):
  73. params['user_auth_id'] = self.user_auth_id.to_alipay_dict()
  74. else:
  75. params['user_auth_id'] = self.user_auth_id
  76. if self.user_auth_type:
  77. if hasattr(self.user_auth_type, 'to_alipay_dict'):
  78. params['user_auth_type'] = self.user_auth_type.to_alipay_dict()
  79. else:
  80. params['user_auth_type'] = self.user_auth_type
  81. return params
  82. @staticmethod
  83. def from_alipay_dict(d):
  84. if not d:
  85. return None
  86. o = AlipaySecurityProdFacepayVerifyModel()
  87. if 'check_code' in d:
  88. o.check_code = d['check_code']
  89. if 'face_image' in d:
  90. o.face_image = d['face_image']
  91. if 'ftoken' in d:
  92. o.ftoken = d['ftoken']
  93. if 'store_id' in d:
  94. o.store_id = d['store_id']
  95. if 'user_auth_id' in d:
  96. o.user_auth_id = d['user_auth_id']
  97. if 'user_auth_type' in d:
  98. o.user_auth_type = d['user_auth_type']
  99. return o