ZhimaCustomerEpIdentificationInitializeModel.py 3.6 KB

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