AlipayPayCodecAcodeDecodeUseModel.py 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayPayCodecAcodeDecodeUseModel(object):
  6. def __init__(self):
  7. self._acode_scene = None
  8. self._biz_scene = None
  9. self._device_id = None
  10. self._dynamic_id = None
  11. self._institution_type = None
  12. self._lbs_info = None
  13. self._scan_time = None
  14. self._scene_no = None
  15. @property
  16. def acode_scene(self):
  17. return self._acode_scene
  18. @acode_scene.setter
  19. def acode_scene(self, value):
  20. self._acode_scene = value
  21. @property
  22. def biz_scene(self):
  23. return self._biz_scene
  24. @biz_scene.setter
  25. def biz_scene(self, value):
  26. self._biz_scene = value
  27. @property
  28. def device_id(self):
  29. return self._device_id
  30. @device_id.setter
  31. def device_id(self, value):
  32. self._device_id = value
  33. @property
  34. def dynamic_id(self):
  35. return self._dynamic_id
  36. @dynamic_id.setter
  37. def dynamic_id(self, value):
  38. self._dynamic_id = value
  39. @property
  40. def institution_type(self):
  41. return self._institution_type
  42. @institution_type.setter
  43. def institution_type(self, value):
  44. self._institution_type = value
  45. @property
  46. def lbs_info(self):
  47. return self._lbs_info
  48. @lbs_info.setter
  49. def lbs_info(self, value):
  50. self._lbs_info = value
  51. @property
  52. def scan_time(self):
  53. return self._scan_time
  54. @scan_time.setter
  55. def scan_time(self, value):
  56. self._scan_time = value
  57. @property
  58. def scene_no(self):
  59. return self._scene_no
  60. @scene_no.setter
  61. def scene_no(self, value):
  62. self._scene_no = value
  63. def to_alipay_dict(self):
  64. params = dict()
  65. if self.acode_scene:
  66. if hasattr(self.acode_scene, 'to_alipay_dict'):
  67. params['acode_scene'] = self.acode_scene.to_alipay_dict()
  68. else:
  69. params['acode_scene'] = self.acode_scene
  70. if self.biz_scene:
  71. if hasattr(self.biz_scene, 'to_alipay_dict'):
  72. params['biz_scene'] = self.biz_scene.to_alipay_dict()
  73. else:
  74. params['biz_scene'] = self.biz_scene
  75. if self.device_id:
  76. if hasattr(self.device_id, 'to_alipay_dict'):
  77. params['device_id'] = self.device_id.to_alipay_dict()
  78. else:
  79. params['device_id'] = self.device_id
  80. if self.dynamic_id:
  81. if hasattr(self.dynamic_id, 'to_alipay_dict'):
  82. params['dynamic_id'] = self.dynamic_id.to_alipay_dict()
  83. else:
  84. params['dynamic_id'] = self.dynamic_id
  85. if self.institution_type:
  86. if hasattr(self.institution_type, 'to_alipay_dict'):
  87. params['institution_type'] = self.institution_type.to_alipay_dict()
  88. else:
  89. params['institution_type'] = self.institution_type
  90. if self.lbs_info:
  91. if hasattr(self.lbs_info, 'to_alipay_dict'):
  92. params['lbs_info'] = self.lbs_info.to_alipay_dict()
  93. else:
  94. params['lbs_info'] = self.lbs_info
  95. if self.scan_time:
  96. if hasattr(self.scan_time, 'to_alipay_dict'):
  97. params['scan_time'] = self.scan_time.to_alipay_dict()
  98. else:
  99. params['scan_time'] = self.scan_time
  100. if self.scene_no:
  101. if hasattr(self.scene_no, 'to_alipay_dict'):
  102. params['scene_no'] = self.scene_no.to_alipay_dict()
  103. else:
  104. params['scene_no'] = self.scene_no
  105. return params
  106. @staticmethod
  107. def from_alipay_dict(d):
  108. if not d:
  109. return None
  110. o = AlipayPayCodecAcodeDecodeUseModel()
  111. if 'acode_scene' in d:
  112. o.acode_scene = d['acode_scene']
  113. if 'biz_scene' in d:
  114. o.biz_scene = d['biz_scene']
  115. if 'device_id' in d:
  116. o.device_id = d['device_id']
  117. if 'dynamic_id' in d:
  118. o.dynamic_id = d['dynamic_id']
  119. if 'institution_type' in d:
  120. o.institution_type = d['institution_type']
  121. if 'lbs_info' in d:
  122. o.lbs_info = d['lbs_info']
  123. if 'scan_time' in d:
  124. o.scan_time = d['scan_time']
  125. if 'scene_no' in d:
  126. o.scene_no = d['scene_no']
  127. return o