AlipayDataDataserviceHellobikeLogSyncModel.py 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayDataDataserviceHellobikeLogSyncModel(object):
  6. def __init__(self):
  7. self._action_type = None
  8. self._channel = None
  9. self._city_code = None
  10. self._pay_price_cent = None
  11. self._pay_tool = None
  12. self._trace_id = None
  13. self._user_id = None
  14. @property
  15. def action_type(self):
  16. return self._action_type
  17. @action_type.setter
  18. def action_type(self, value):
  19. self._action_type = value
  20. @property
  21. def channel(self):
  22. return self._channel
  23. @channel.setter
  24. def channel(self, value):
  25. self._channel = value
  26. @property
  27. def city_code(self):
  28. return self._city_code
  29. @city_code.setter
  30. def city_code(self, value):
  31. self._city_code = value
  32. @property
  33. def pay_price_cent(self):
  34. return self._pay_price_cent
  35. @pay_price_cent.setter
  36. def pay_price_cent(self, value):
  37. self._pay_price_cent = value
  38. @property
  39. def pay_tool(self):
  40. return self._pay_tool
  41. @pay_tool.setter
  42. def pay_tool(self, value):
  43. self._pay_tool = value
  44. @property
  45. def trace_id(self):
  46. return self._trace_id
  47. @trace_id.setter
  48. def trace_id(self, value):
  49. self._trace_id = value
  50. @property
  51. def user_id(self):
  52. return self._user_id
  53. @user_id.setter
  54. def user_id(self, value):
  55. self._user_id = value
  56. def to_alipay_dict(self):
  57. params = dict()
  58. if self.action_type:
  59. if hasattr(self.action_type, 'to_alipay_dict'):
  60. params['action_type'] = self.action_type.to_alipay_dict()
  61. else:
  62. params['action_type'] = self.action_type
  63. if self.channel:
  64. if hasattr(self.channel, 'to_alipay_dict'):
  65. params['channel'] = self.channel.to_alipay_dict()
  66. else:
  67. params['channel'] = self.channel
  68. if self.city_code:
  69. if hasattr(self.city_code, 'to_alipay_dict'):
  70. params['city_code'] = self.city_code.to_alipay_dict()
  71. else:
  72. params['city_code'] = self.city_code
  73. if self.pay_price_cent:
  74. if hasattr(self.pay_price_cent, 'to_alipay_dict'):
  75. params['pay_price_cent'] = self.pay_price_cent.to_alipay_dict()
  76. else:
  77. params['pay_price_cent'] = self.pay_price_cent
  78. if self.pay_tool:
  79. if hasattr(self.pay_tool, 'to_alipay_dict'):
  80. params['pay_tool'] = self.pay_tool.to_alipay_dict()
  81. else:
  82. params['pay_tool'] = self.pay_tool
  83. if self.trace_id:
  84. if hasattr(self.trace_id, 'to_alipay_dict'):
  85. params['trace_id'] = self.trace_id.to_alipay_dict()
  86. else:
  87. params['trace_id'] = self.trace_id
  88. if self.user_id:
  89. if hasattr(self.user_id, 'to_alipay_dict'):
  90. params['user_id'] = self.user_id.to_alipay_dict()
  91. else:
  92. params['user_id'] = self.user_id
  93. return params
  94. @staticmethod
  95. def from_alipay_dict(d):
  96. if not d:
  97. return None
  98. o = AlipayDataDataserviceHellobikeLogSyncModel()
  99. if 'action_type' in d:
  100. o.action_type = d['action_type']
  101. if 'channel' in d:
  102. o.channel = d['channel']
  103. if 'city_code' in d:
  104. o.city_code = d['city_code']
  105. if 'pay_price_cent' in d:
  106. o.pay_price_cent = d['pay_price_cent']
  107. if 'pay_tool' in d:
  108. o.pay_tool = d['pay_tool']
  109. if 'trace_id' in d:
  110. o.trace_id = d['trace_id']
  111. if 'user_id' in d:
  112. o.user_id = d['user_id']
  113. return o