JfExportInstBillModel.py 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class JfExportInstBillModel(object):
  6. def __init__(self):
  7. self._amount = None
  8. self._balance = None
  9. self._bill_date = None
  10. self._bill_fines = None
  11. self._bill_key = None
  12. self._extend_field = None
  13. self._inst_bill_no = None
  14. self._owner_name = None
  15. self._uniq_id = None
  16. @property
  17. def amount(self):
  18. return self._amount
  19. @amount.setter
  20. def amount(self, value):
  21. self._amount = value
  22. @property
  23. def balance(self):
  24. return self._balance
  25. @balance.setter
  26. def balance(self, value):
  27. self._balance = value
  28. @property
  29. def bill_date(self):
  30. return self._bill_date
  31. @bill_date.setter
  32. def bill_date(self, value):
  33. self._bill_date = value
  34. @property
  35. def bill_fines(self):
  36. return self._bill_fines
  37. @bill_fines.setter
  38. def bill_fines(self, value):
  39. self._bill_fines = value
  40. @property
  41. def bill_key(self):
  42. return self._bill_key
  43. @bill_key.setter
  44. def bill_key(self, value):
  45. self._bill_key = value
  46. @property
  47. def extend_field(self):
  48. return self._extend_field
  49. @extend_field.setter
  50. def extend_field(self, value):
  51. self._extend_field = value
  52. @property
  53. def inst_bill_no(self):
  54. return self._inst_bill_no
  55. @inst_bill_no.setter
  56. def inst_bill_no(self, value):
  57. self._inst_bill_no = value
  58. @property
  59. def owner_name(self):
  60. return self._owner_name
  61. @owner_name.setter
  62. def owner_name(self, value):
  63. self._owner_name = value
  64. @property
  65. def uniq_id(self):
  66. return self._uniq_id
  67. @uniq_id.setter
  68. def uniq_id(self, value):
  69. self._uniq_id = value
  70. def to_alipay_dict(self):
  71. params = dict()
  72. if self.amount:
  73. if hasattr(self.amount, 'to_alipay_dict'):
  74. params['amount'] = self.amount.to_alipay_dict()
  75. else:
  76. params['amount'] = self.amount
  77. if self.balance:
  78. if hasattr(self.balance, 'to_alipay_dict'):
  79. params['balance'] = self.balance.to_alipay_dict()
  80. else:
  81. params['balance'] = self.balance
  82. if self.bill_date:
  83. if hasattr(self.bill_date, 'to_alipay_dict'):
  84. params['bill_date'] = self.bill_date.to_alipay_dict()
  85. else:
  86. params['bill_date'] = self.bill_date
  87. if self.bill_fines:
  88. if hasattr(self.bill_fines, 'to_alipay_dict'):
  89. params['bill_fines'] = self.bill_fines.to_alipay_dict()
  90. else:
  91. params['bill_fines'] = self.bill_fines
  92. if self.bill_key:
  93. if hasattr(self.bill_key, 'to_alipay_dict'):
  94. params['bill_key'] = self.bill_key.to_alipay_dict()
  95. else:
  96. params['bill_key'] = self.bill_key
  97. if self.extend_field:
  98. if hasattr(self.extend_field, 'to_alipay_dict'):
  99. params['extend_field'] = self.extend_field.to_alipay_dict()
  100. else:
  101. params['extend_field'] = self.extend_field
  102. if self.inst_bill_no:
  103. if hasattr(self.inst_bill_no, 'to_alipay_dict'):
  104. params['inst_bill_no'] = self.inst_bill_no.to_alipay_dict()
  105. else:
  106. params['inst_bill_no'] = self.inst_bill_no
  107. if self.owner_name:
  108. if hasattr(self.owner_name, 'to_alipay_dict'):
  109. params['owner_name'] = self.owner_name.to_alipay_dict()
  110. else:
  111. params['owner_name'] = self.owner_name
  112. if self.uniq_id:
  113. if hasattr(self.uniq_id, 'to_alipay_dict'):
  114. params['uniq_id'] = self.uniq_id.to_alipay_dict()
  115. else:
  116. params['uniq_id'] = self.uniq_id
  117. return params
  118. @staticmethod
  119. def from_alipay_dict(d):
  120. if not d:
  121. return None
  122. o = JfExportInstBillModel()
  123. if 'amount' in d:
  124. o.amount = d['amount']
  125. if 'balance' in d:
  126. o.balance = d['balance']
  127. if 'bill_date' in d:
  128. o.bill_date = d['bill_date']
  129. if 'bill_fines' in d:
  130. o.bill_fines = d['bill_fines']
  131. if 'bill_key' in d:
  132. o.bill_key = d['bill_key']
  133. if 'extend_field' in d:
  134. o.extend_field = d['extend_field']
  135. if 'inst_bill_no' in d:
  136. o.inst_bill_no = d['inst_bill_no']
  137. if 'owner_name' in d:
  138. o.owner_name = d['owner_name']
  139. if 'uniq_id' in d:
  140. o.uniq_id = d['uniq_id']
  141. return o