AlipayUserCertdocQueryResponse.py 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. from alipay.aop.api.domain.AlipayUserCertDocDrivingLicense import AlipayUserCertDocDrivingLicense
  6. from alipay.aop.api.domain.AlipayUserCertDocDrivingLicense import AlipayUserCertDocDrivingLicense
  7. from alipay.aop.api.domain.AlipayUserCertDocIDCard import AlipayUserCertDocIDCard
  8. from alipay.aop.api.domain.AlipayUserCertDocIDCard import AlipayUserCertDocIDCard
  9. from alipay.aop.api.domain.AlipayUserCertDocPassport import AlipayUserCertDocPassport
  10. from alipay.aop.api.domain.AlipayUserCertDocVehicleLicense import AlipayUserCertDocVehicleLicense
  11. from alipay.aop.api.domain.AlipayUserCertDocVehicleLicense import AlipayUserCertDocVehicleLicense
  12. class AlipayUserCertdocQueryResponse(AlipayResponse):
  13. def __init__(self):
  14. super(AlipayUserCertdocQueryResponse, self).__init__()
  15. self._driving_license = None
  16. self._driving_license_list = None
  17. self._identity_card = None
  18. self._identity_card_list = None
  19. self._passport_list = None
  20. self._self_vehicle_license_list = None
  21. self._vehicle_license_list = None
  22. @property
  23. def driving_license(self):
  24. return self._driving_license
  25. @driving_license.setter
  26. def driving_license(self, value):
  27. if isinstance(value, AlipayUserCertDocDrivingLicense):
  28. self._driving_license = value
  29. else:
  30. self._driving_license = AlipayUserCertDocDrivingLicense.from_alipay_dict(value)
  31. @property
  32. def driving_license_list(self):
  33. return self._driving_license_list
  34. @driving_license_list.setter
  35. def driving_license_list(self, value):
  36. if isinstance(value, list):
  37. self._driving_license_list = list()
  38. for i in value:
  39. if isinstance(i, AlipayUserCertDocDrivingLicense):
  40. self._driving_license_list.append(i)
  41. else:
  42. self._driving_license_list.append(AlipayUserCertDocDrivingLicense.from_alipay_dict(i))
  43. @property
  44. def identity_card(self):
  45. return self._identity_card
  46. @identity_card.setter
  47. def identity_card(self, value):
  48. if isinstance(value, AlipayUserCertDocIDCard):
  49. self._identity_card = value
  50. else:
  51. self._identity_card = AlipayUserCertDocIDCard.from_alipay_dict(value)
  52. @property
  53. def identity_card_list(self):
  54. return self._identity_card_list
  55. @identity_card_list.setter
  56. def identity_card_list(self, value):
  57. if isinstance(value, list):
  58. self._identity_card_list = list()
  59. for i in value:
  60. if isinstance(i, AlipayUserCertDocIDCard):
  61. self._identity_card_list.append(i)
  62. else:
  63. self._identity_card_list.append(AlipayUserCertDocIDCard.from_alipay_dict(i))
  64. @property
  65. def passport_list(self):
  66. return self._passport_list
  67. @passport_list.setter
  68. def passport_list(self, value):
  69. if isinstance(value, list):
  70. self._passport_list = list()
  71. for i in value:
  72. if isinstance(i, AlipayUserCertDocPassport):
  73. self._passport_list.append(i)
  74. else:
  75. self._passport_list.append(AlipayUserCertDocPassport.from_alipay_dict(i))
  76. @property
  77. def self_vehicle_license_list(self):
  78. return self._self_vehicle_license_list
  79. @self_vehicle_license_list.setter
  80. def self_vehicle_license_list(self, value):
  81. if isinstance(value, list):
  82. self._self_vehicle_license_list = list()
  83. for i in value:
  84. if isinstance(i, AlipayUserCertDocVehicleLicense):
  85. self._self_vehicle_license_list.append(i)
  86. else:
  87. self._self_vehicle_license_list.append(AlipayUserCertDocVehicleLicense.from_alipay_dict(i))
  88. @property
  89. def vehicle_license_list(self):
  90. return self._vehicle_license_list
  91. @vehicle_license_list.setter
  92. def vehicle_license_list(self, value):
  93. if isinstance(value, list):
  94. self._vehicle_license_list = list()
  95. for i in value:
  96. if isinstance(i, AlipayUserCertDocVehicleLicense):
  97. self._vehicle_license_list.append(i)
  98. else:
  99. self._vehicle_license_list.append(AlipayUserCertDocVehicleLicense.from_alipay_dict(i))
  100. def parse_response_content(self, response_content):
  101. response = super(AlipayUserCertdocQueryResponse, self).parse_response_content(response_content)
  102. if 'driving_license' in response:
  103. self.driving_license = response['driving_license']
  104. if 'driving_license_list' in response:
  105. self.driving_license_list = response['driving_license_list']
  106. if 'identity_card' in response:
  107. self.identity_card = response['identity_card']
  108. if 'identity_card_list' in response:
  109. self.identity_card_list = response['identity_card_list']
  110. if 'passport_list' in response:
  111. self.passport_list = response['passport_list']
  112. if 'self_vehicle_license_list' in response:
  113. self.self_vehicle_license_list = response['self_vehicle_license_list']
  114. if 'vehicle_license_list' in response:
  115. self.vehicle_license_list = response['vehicle_license_list']