ZhimaCreditEpInfoGetModel.py 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class ZhimaCreditEpInfoGetModel(object):
  6. def __init__(self):
  7. self._data_type = None
  8. self._data_value = None
  9. self._product_code = None
  10. self._transaction_id = None
  11. @property
  12. def data_type(self):
  13. return self._data_type
  14. @data_type.setter
  15. def data_type(self, value):
  16. self._data_type = value
  17. @property
  18. def data_value(self):
  19. return self._data_value
  20. @data_value.setter
  21. def data_value(self, value):
  22. self._data_value = value
  23. @property
  24. def product_code(self):
  25. return self._product_code
  26. @product_code.setter
  27. def product_code(self, value):
  28. self._product_code = value
  29. @property
  30. def transaction_id(self):
  31. return self._transaction_id
  32. @transaction_id.setter
  33. def transaction_id(self, value):
  34. self._transaction_id = value
  35. def to_alipay_dict(self):
  36. params = dict()
  37. if self.data_type:
  38. if hasattr(self.data_type, 'to_alipay_dict'):
  39. params['data_type'] = self.data_type.to_alipay_dict()
  40. else:
  41. params['data_type'] = self.data_type
  42. if self.data_value:
  43. if hasattr(self.data_value, 'to_alipay_dict'):
  44. params['data_value'] = self.data_value.to_alipay_dict()
  45. else:
  46. params['data_value'] = self.data_value
  47. if self.product_code:
  48. if hasattr(self.product_code, 'to_alipay_dict'):
  49. params['product_code'] = self.product_code.to_alipay_dict()
  50. else:
  51. params['product_code'] = self.product_code
  52. if self.transaction_id:
  53. if hasattr(self.transaction_id, 'to_alipay_dict'):
  54. params['transaction_id'] = self.transaction_id.to_alipay_dict()
  55. else:
  56. params['transaction_id'] = self.transaction_id
  57. return params
  58. @staticmethod
  59. def from_alipay_dict(d):
  60. if not d:
  61. return None
  62. o = ZhimaCreditEpInfoGetModel()
  63. if 'data_type' in d:
  64. o.data_type = d['data_type']
  65. if 'data_value' in d:
  66. o.data_value = d['data_value']
  67. if 'product_code' in d:
  68. o.product_code = d['product_code']
  69. if 'transaction_id' in d:
  70. o.transaction_id = d['transaction_id']
  71. return o