AlipayEbppRechargeFlowSendModel.py 3.2 KB

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