AlipayCommerceKidsAccountConsultModel.py 3.7 KB

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