AlipayEcoEprintOrderNotifyModel.py 3.3 KB

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