YLBTransDetailInfo.py 4.2 KB

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