ZhimaMerchantCreditlifeRiskApplyModel.py 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class ZhimaMerchantCreditlifeRiskApplyModel(object):
  6. def __init__(self):
  7. self._address = None
  8. self._cert_no = None
  9. self._item_id = None
  10. self._mobile = None
  11. self._name = None
  12. self._transaction_id = None
  13. @property
  14. def address(self):
  15. return self._address
  16. @address.setter
  17. def address(self, value):
  18. self._address = value
  19. @property
  20. def cert_no(self):
  21. return self._cert_no
  22. @cert_no.setter
  23. def cert_no(self, value):
  24. self._cert_no = value
  25. @property
  26. def item_id(self):
  27. return self._item_id
  28. @item_id.setter
  29. def item_id(self, value):
  30. self._item_id = value
  31. @property
  32. def mobile(self):
  33. return self._mobile
  34. @mobile.setter
  35. def mobile(self, value):
  36. self._mobile = value
  37. @property
  38. def name(self):
  39. return self._name
  40. @name.setter
  41. def name(self, value):
  42. self._name = 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.address:
  52. if hasattr(self.address, 'to_alipay_dict'):
  53. params['address'] = self.address.to_alipay_dict()
  54. else:
  55. params['address'] = self.address
  56. if self.cert_no:
  57. if hasattr(self.cert_no, 'to_alipay_dict'):
  58. params['cert_no'] = self.cert_no.to_alipay_dict()
  59. else:
  60. params['cert_no'] = self.cert_no
  61. if self.item_id:
  62. if hasattr(self.item_id, 'to_alipay_dict'):
  63. params['item_id'] = self.item_id.to_alipay_dict()
  64. else:
  65. params['item_id'] = self.item_id
  66. if self.mobile:
  67. if hasattr(self.mobile, 'to_alipay_dict'):
  68. params['mobile'] = self.mobile.to_alipay_dict()
  69. else:
  70. params['mobile'] = self.mobile
  71. if self.name:
  72. if hasattr(self.name, 'to_alipay_dict'):
  73. params['name'] = self.name.to_alipay_dict()
  74. else:
  75. params['name'] = self.name
  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 = ZhimaMerchantCreditlifeRiskApplyModel()
  87. if 'address' in d:
  88. o.address = d['address']
  89. if 'cert_no' in d:
  90. o.cert_no = d['cert_no']
  91. if 'item_id' in d:
  92. o.item_id = d['item_id']
  93. if 'mobile' in d:
  94. o.mobile = d['mobile']
  95. if 'name' in d:
  96. o.name = d['name']
  97. if 'transaction_id' in d:
  98. o.transaction_id = d['transaction_id']
  99. return o