AlipayEcoPrinterStatusNotifyModel.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoPrinterStatusNotifyModel(object):
  6. def __init__(self):
  7. self._eprint_sign = None
  8. self._machine_code = None
  9. self._oauth_type = None
  10. self._online = None
  11. self._push_time = None
  12. @property
  13. def eprint_sign(self):
  14. return self._eprint_sign
  15. @eprint_sign.setter
  16. def eprint_sign(self, value):
  17. self._eprint_sign = value
  18. @property
  19. def machine_code(self):
  20. return self._machine_code
  21. @machine_code.setter
  22. def machine_code(self, value):
  23. self._machine_code = value
  24. @property
  25. def oauth_type(self):
  26. return self._oauth_type
  27. @oauth_type.setter
  28. def oauth_type(self, value):
  29. self._oauth_type = value
  30. @property
  31. def online(self):
  32. return self._online
  33. @online.setter
  34. def online(self, value):
  35. self._online = value
  36. @property
  37. def push_time(self):
  38. return self._push_time
  39. @push_time.setter
  40. def push_time(self, value):
  41. self._push_time = value
  42. def to_alipay_dict(self):
  43. params = dict()
  44. if self.eprint_sign:
  45. if hasattr(self.eprint_sign, 'to_alipay_dict'):
  46. params['eprint_sign'] = self.eprint_sign.to_alipay_dict()
  47. else:
  48. params['eprint_sign'] = self.eprint_sign
  49. if self.machine_code:
  50. if hasattr(self.machine_code, 'to_alipay_dict'):
  51. params['machine_code'] = self.machine_code.to_alipay_dict()
  52. else:
  53. params['machine_code'] = self.machine_code
  54. if self.oauth_type:
  55. if hasattr(self.oauth_type, 'to_alipay_dict'):
  56. params['oauth_type'] = self.oauth_type.to_alipay_dict()
  57. else:
  58. params['oauth_type'] = self.oauth_type
  59. if self.online:
  60. if hasattr(self.online, 'to_alipay_dict'):
  61. params['online'] = self.online.to_alipay_dict()
  62. else:
  63. params['online'] = self.online
  64. if self.push_time:
  65. if hasattr(self.push_time, 'to_alipay_dict'):
  66. params['push_time'] = self.push_time.to_alipay_dict()
  67. else:
  68. params['push_time'] = self.push_time
  69. return params
  70. @staticmethod
  71. def from_alipay_dict(d):
  72. if not d:
  73. return None
  74. o = AlipayEcoPrinterStatusNotifyModel()
  75. if 'eprint_sign' in d:
  76. o.eprint_sign = d['eprint_sign']
  77. if 'machine_code' in d:
  78. o.machine_code = d['machine_code']
  79. if 'oauth_type' in d:
  80. o.oauth_type = d['oauth_type']
  81. if 'online' in d:
  82. o.online = d['online']
  83. if 'push_time' in d:
  84. o.push_time = d['push_time']
  85. return o