BillDetailVo.py 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. from alipay.aop.api.domain.BillAmtVo import BillAmtVo
  6. from alipay.aop.api.domain.BillAmtVo import BillAmtVo
  7. from alipay.aop.api.domain.MultiCurrencyMoneyVO import MultiCurrencyMoneyVO
  8. class BillDetailVo(object):
  9. def __init__(self):
  10. self._bill_account_date = None
  11. self._bill_balance_detail = None
  12. self._bill_create_date = None
  13. self._bill_no = None
  14. self._bill_repay_detail = None
  15. self._bill_status = None
  16. self._clear_date = None
  17. self._repay_date = None
  18. self._total_prin_amt = None
  19. @property
  20. def bill_account_date(self):
  21. return self._bill_account_date
  22. @bill_account_date.setter
  23. def bill_account_date(self, value):
  24. self._bill_account_date = value
  25. @property
  26. def bill_balance_detail(self):
  27. return self._bill_balance_detail
  28. @bill_balance_detail.setter
  29. def bill_balance_detail(self, value):
  30. if isinstance(value, BillAmtVo):
  31. self._bill_balance_detail = value
  32. else:
  33. self._bill_balance_detail = BillAmtVo.from_alipay_dict(value)
  34. @property
  35. def bill_create_date(self):
  36. return self._bill_create_date
  37. @bill_create_date.setter
  38. def bill_create_date(self, value):
  39. self._bill_create_date = value
  40. @property
  41. def bill_no(self):
  42. return self._bill_no
  43. @bill_no.setter
  44. def bill_no(self, value):
  45. self._bill_no = value
  46. @property
  47. def bill_repay_detail(self):
  48. return self._bill_repay_detail
  49. @bill_repay_detail.setter
  50. def bill_repay_detail(self, value):
  51. if isinstance(value, BillAmtVo):
  52. self._bill_repay_detail = value
  53. else:
  54. self._bill_repay_detail = BillAmtVo.from_alipay_dict(value)
  55. @property
  56. def bill_status(self):
  57. return self._bill_status
  58. @bill_status.setter
  59. def bill_status(self, value):
  60. self._bill_status = value
  61. @property
  62. def clear_date(self):
  63. return self._clear_date
  64. @clear_date.setter
  65. def clear_date(self, value):
  66. self._clear_date = value
  67. @property
  68. def repay_date(self):
  69. return self._repay_date
  70. @repay_date.setter
  71. def repay_date(self, value):
  72. self._repay_date = value
  73. @property
  74. def total_prin_amt(self):
  75. return self._total_prin_amt
  76. @total_prin_amt.setter
  77. def total_prin_amt(self, value):
  78. if isinstance(value, MultiCurrencyMoneyVO):
  79. self._total_prin_amt = value
  80. else:
  81. self._total_prin_amt = MultiCurrencyMoneyVO.from_alipay_dict(value)
  82. def to_alipay_dict(self):
  83. params = dict()
  84. if self.bill_account_date:
  85. if hasattr(self.bill_account_date, 'to_alipay_dict'):
  86. params['bill_account_date'] = self.bill_account_date.to_alipay_dict()
  87. else:
  88. params['bill_account_date'] = self.bill_account_date
  89. if self.bill_balance_detail:
  90. if hasattr(self.bill_balance_detail, 'to_alipay_dict'):
  91. params['bill_balance_detail'] = self.bill_balance_detail.to_alipay_dict()
  92. else:
  93. params['bill_balance_detail'] = self.bill_balance_detail
  94. if self.bill_create_date:
  95. if hasattr(self.bill_create_date, 'to_alipay_dict'):
  96. params['bill_create_date'] = self.bill_create_date.to_alipay_dict()
  97. else:
  98. params['bill_create_date'] = self.bill_create_date
  99. if self.bill_no:
  100. if hasattr(self.bill_no, 'to_alipay_dict'):
  101. params['bill_no'] = self.bill_no.to_alipay_dict()
  102. else:
  103. params['bill_no'] = self.bill_no
  104. if self.bill_repay_detail:
  105. if hasattr(self.bill_repay_detail, 'to_alipay_dict'):
  106. params['bill_repay_detail'] = self.bill_repay_detail.to_alipay_dict()
  107. else:
  108. params['bill_repay_detail'] = self.bill_repay_detail
  109. if self.bill_status:
  110. if hasattr(self.bill_status, 'to_alipay_dict'):
  111. params['bill_status'] = self.bill_status.to_alipay_dict()
  112. else:
  113. params['bill_status'] = self.bill_status
  114. if self.clear_date:
  115. if hasattr(self.clear_date, 'to_alipay_dict'):
  116. params['clear_date'] = self.clear_date.to_alipay_dict()
  117. else:
  118. params['clear_date'] = self.clear_date
  119. if self.repay_date:
  120. if hasattr(self.repay_date, 'to_alipay_dict'):
  121. params['repay_date'] = self.repay_date.to_alipay_dict()
  122. else:
  123. params['repay_date'] = self.repay_date
  124. if self.total_prin_amt:
  125. if hasattr(self.total_prin_amt, 'to_alipay_dict'):
  126. params['total_prin_amt'] = self.total_prin_amt.to_alipay_dict()
  127. else:
  128. params['total_prin_amt'] = self.total_prin_amt
  129. return params
  130. @staticmethod
  131. def from_alipay_dict(d):
  132. if not d:
  133. return None
  134. o = BillDetailVo()
  135. if 'bill_account_date' in d:
  136. o.bill_account_date = d['bill_account_date']
  137. if 'bill_balance_detail' in d:
  138. o.bill_balance_detail = d['bill_balance_detail']
  139. if 'bill_create_date' in d:
  140. o.bill_create_date = d['bill_create_date']
  141. if 'bill_no' in d:
  142. o.bill_no = d['bill_no']
  143. if 'bill_repay_detail' in d:
  144. o.bill_repay_detail = d['bill_repay_detail']
  145. if 'bill_status' in d:
  146. o.bill_status = d['bill_status']
  147. if 'clear_date' in d:
  148. o.clear_date = d['clear_date']
  149. if 'repay_date' in d:
  150. o.repay_date = d['repay_date']
  151. if 'total_prin_amt' in d:
  152. o.total_prin_amt = d['total_prin_amt']
  153. return o