QueryInstBillInfo.py 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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.QueryInstBillDetail import QueryInstBillDetail
  6. class QueryInstBillInfo(object):
  7. def __init__(self):
  8. self._amount = None
  9. self._balance = None
  10. self._bill_date = None
  11. self._bill_detail = None
  12. self._bill_fines = None
  13. self._bill_key = None
  14. self._bill_user_name = None
  15. self._charge_inst = None
  16. self._charge_uniq_id = None
  17. self._chargeoff_inst = None
  18. self._company_id = None
  19. self._extend = None
  20. self._order_type = None
  21. self._out_id = None
  22. self._return_message = None
  23. self._sub_order_type = None
  24. @property
  25. def amount(self):
  26. return self._amount
  27. @amount.setter
  28. def amount(self, value):
  29. self._amount = value
  30. @property
  31. def balance(self):
  32. return self._balance
  33. @balance.setter
  34. def balance(self, value):
  35. self._balance = value
  36. @property
  37. def bill_date(self):
  38. return self._bill_date
  39. @bill_date.setter
  40. def bill_date(self, value):
  41. self._bill_date = value
  42. @property
  43. def bill_detail(self):
  44. return self._bill_detail
  45. @bill_detail.setter
  46. def bill_detail(self, value):
  47. if isinstance(value, list):
  48. self._bill_detail = list()
  49. for i in value:
  50. if isinstance(i, QueryInstBillDetail):
  51. self._bill_detail.append(i)
  52. else:
  53. self._bill_detail.append(QueryInstBillDetail.from_alipay_dict(i))
  54. @property
  55. def bill_fines(self):
  56. return self._bill_fines
  57. @bill_fines.setter
  58. def bill_fines(self, value):
  59. self._bill_fines = value
  60. @property
  61. def bill_key(self):
  62. return self._bill_key
  63. @bill_key.setter
  64. def bill_key(self, value):
  65. self._bill_key = value
  66. @property
  67. def bill_user_name(self):
  68. return self._bill_user_name
  69. @bill_user_name.setter
  70. def bill_user_name(self, value):
  71. self._bill_user_name = value
  72. @property
  73. def charge_inst(self):
  74. return self._charge_inst
  75. @charge_inst.setter
  76. def charge_inst(self, value):
  77. self._charge_inst = value
  78. @property
  79. def charge_uniq_id(self):
  80. return self._charge_uniq_id
  81. @charge_uniq_id.setter
  82. def charge_uniq_id(self, value):
  83. self._charge_uniq_id = value
  84. @property
  85. def chargeoff_inst(self):
  86. return self._chargeoff_inst
  87. @chargeoff_inst.setter
  88. def chargeoff_inst(self, value):
  89. self._chargeoff_inst = value
  90. @property
  91. def company_id(self):
  92. return self._company_id
  93. @company_id.setter
  94. def company_id(self, value):
  95. self._company_id = value
  96. @property
  97. def extend(self):
  98. return self._extend
  99. @extend.setter
  100. def extend(self, value):
  101. self._extend = value
  102. @property
  103. def order_type(self):
  104. return self._order_type
  105. @order_type.setter
  106. def order_type(self, value):
  107. self._order_type = value
  108. @property
  109. def out_id(self):
  110. return self._out_id
  111. @out_id.setter
  112. def out_id(self, value):
  113. self._out_id = value
  114. @property
  115. def return_message(self):
  116. return self._return_message
  117. @return_message.setter
  118. def return_message(self, value):
  119. self._return_message = value
  120. @property
  121. def sub_order_type(self):
  122. return self._sub_order_type
  123. @sub_order_type.setter
  124. def sub_order_type(self, value):
  125. self._sub_order_type = value
  126. def to_alipay_dict(self):
  127. params = dict()
  128. if self.amount:
  129. if hasattr(self.amount, 'to_alipay_dict'):
  130. params['amount'] = self.amount.to_alipay_dict()
  131. else:
  132. params['amount'] = self.amount
  133. if self.balance:
  134. if hasattr(self.balance, 'to_alipay_dict'):
  135. params['balance'] = self.balance.to_alipay_dict()
  136. else:
  137. params['balance'] = self.balance
  138. if self.bill_date:
  139. if hasattr(self.bill_date, 'to_alipay_dict'):
  140. params['bill_date'] = self.bill_date.to_alipay_dict()
  141. else:
  142. params['bill_date'] = self.bill_date
  143. if self.bill_detail:
  144. if isinstance(self.bill_detail, list):
  145. for i in range(0, len(self.bill_detail)):
  146. element = self.bill_detail[i]
  147. if hasattr(element, 'to_alipay_dict'):
  148. self.bill_detail[i] = element.to_alipay_dict()
  149. if hasattr(self.bill_detail, 'to_alipay_dict'):
  150. params['bill_detail'] = self.bill_detail.to_alipay_dict()
  151. else:
  152. params['bill_detail'] = self.bill_detail
  153. if self.bill_fines:
  154. if hasattr(self.bill_fines, 'to_alipay_dict'):
  155. params['bill_fines'] = self.bill_fines.to_alipay_dict()
  156. else:
  157. params['bill_fines'] = self.bill_fines
  158. if self.bill_key:
  159. if hasattr(self.bill_key, 'to_alipay_dict'):
  160. params['bill_key'] = self.bill_key.to_alipay_dict()
  161. else:
  162. params['bill_key'] = self.bill_key
  163. if self.bill_user_name:
  164. if hasattr(self.bill_user_name, 'to_alipay_dict'):
  165. params['bill_user_name'] = self.bill_user_name.to_alipay_dict()
  166. else:
  167. params['bill_user_name'] = self.bill_user_name
  168. if self.charge_inst:
  169. if hasattr(self.charge_inst, 'to_alipay_dict'):
  170. params['charge_inst'] = self.charge_inst.to_alipay_dict()
  171. else:
  172. params['charge_inst'] = self.charge_inst
  173. if self.charge_uniq_id:
  174. if hasattr(self.charge_uniq_id, 'to_alipay_dict'):
  175. params['charge_uniq_id'] = self.charge_uniq_id.to_alipay_dict()
  176. else:
  177. params['charge_uniq_id'] = self.charge_uniq_id
  178. if self.chargeoff_inst:
  179. if hasattr(self.chargeoff_inst, 'to_alipay_dict'):
  180. params['chargeoff_inst'] = self.chargeoff_inst.to_alipay_dict()
  181. else:
  182. params['chargeoff_inst'] = self.chargeoff_inst
  183. if self.company_id:
  184. if hasattr(self.company_id, 'to_alipay_dict'):
  185. params['company_id'] = self.company_id.to_alipay_dict()
  186. else:
  187. params['company_id'] = self.company_id
  188. if self.extend:
  189. if hasattr(self.extend, 'to_alipay_dict'):
  190. params['extend'] = self.extend.to_alipay_dict()
  191. else:
  192. params['extend'] = self.extend
  193. if self.order_type:
  194. if hasattr(self.order_type, 'to_alipay_dict'):
  195. params['order_type'] = self.order_type.to_alipay_dict()
  196. else:
  197. params['order_type'] = self.order_type
  198. if self.out_id:
  199. if hasattr(self.out_id, 'to_alipay_dict'):
  200. params['out_id'] = self.out_id.to_alipay_dict()
  201. else:
  202. params['out_id'] = self.out_id
  203. if self.return_message:
  204. if hasattr(self.return_message, 'to_alipay_dict'):
  205. params['return_message'] = self.return_message.to_alipay_dict()
  206. else:
  207. params['return_message'] = self.return_message
  208. if self.sub_order_type:
  209. if hasattr(self.sub_order_type, 'to_alipay_dict'):
  210. params['sub_order_type'] = self.sub_order_type.to_alipay_dict()
  211. else:
  212. params['sub_order_type'] = self.sub_order_type
  213. return params
  214. @staticmethod
  215. def from_alipay_dict(d):
  216. if not d:
  217. return None
  218. o = QueryInstBillInfo()
  219. if 'amount' in d:
  220. o.amount = d['amount']
  221. if 'balance' in d:
  222. o.balance = d['balance']
  223. if 'bill_date' in d:
  224. o.bill_date = d['bill_date']
  225. if 'bill_detail' in d:
  226. o.bill_detail = d['bill_detail']
  227. if 'bill_fines' in d:
  228. o.bill_fines = d['bill_fines']
  229. if 'bill_key' in d:
  230. o.bill_key = d['bill_key']
  231. if 'bill_user_name' in d:
  232. o.bill_user_name = d['bill_user_name']
  233. if 'charge_inst' in d:
  234. o.charge_inst = d['charge_inst']
  235. if 'charge_uniq_id' in d:
  236. o.charge_uniq_id = d['charge_uniq_id']
  237. if 'chargeoff_inst' in d:
  238. o.chargeoff_inst = d['chargeoff_inst']
  239. if 'company_id' in d:
  240. o.company_id = d['company_id']
  241. if 'extend' in d:
  242. o.extend = d['extend']
  243. if 'order_type' in d:
  244. o.order_type = d['order_type']
  245. if 'out_id' in d:
  246. o.out_id = d['out_id']
  247. if 'return_message' in d:
  248. o.return_message = d['return_message']
  249. if 'sub_order_type' in d:
  250. o.sub_order_type = d['sub_order_type']
  251. return o