AlipayEcoCplifeBillDeleteModel.py 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoCplifeBillDeleteModel(object):
  6. def __init__(self):
  7. self._bill_entry_id_list = None
  8. self._community_id = None
  9. @property
  10. def bill_entry_id_list(self):
  11. return self._bill_entry_id_list
  12. @bill_entry_id_list.setter
  13. def bill_entry_id_list(self, value):
  14. if isinstance(value, list):
  15. self._bill_entry_id_list = list()
  16. for i in value:
  17. self._bill_entry_id_list.append(i)
  18. @property
  19. def community_id(self):
  20. return self._community_id
  21. @community_id.setter
  22. def community_id(self, value):
  23. self._community_id = value
  24. def to_alipay_dict(self):
  25. params = dict()
  26. if self.bill_entry_id_list:
  27. if isinstance(self.bill_entry_id_list, list):
  28. for i in range(0, len(self.bill_entry_id_list)):
  29. element = self.bill_entry_id_list[i]
  30. if hasattr(element, 'to_alipay_dict'):
  31. self.bill_entry_id_list[i] = element.to_alipay_dict()
  32. if hasattr(self.bill_entry_id_list, 'to_alipay_dict'):
  33. params['bill_entry_id_list'] = self.bill_entry_id_list.to_alipay_dict()
  34. else:
  35. params['bill_entry_id_list'] = self.bill_entry_id_list
  36. if self.community_id:
  37. if hasattr(self.community_id, 'to_alipay_dict'):
  38. params['community_id'] = self.community_id.to_alipay_dict()
  39. else:
  40. params['community_id'] = self.community_id
  41. return params
  42. @staticmethod
  43. def from_alipay_dict(d):
  44. if not d:
  45. return None
  46. o = AlipayEcoCplifeBillDeleteModel()
  47. if 'bill_entry_id_list' in d:
  48. o.bill_entry_id_list = d['bill_entry_id_list']
  49. if 'community_id' in d:
  50. o.community_id = d['community_id']
  51. return o