QueryUserChargeInstAndAreaInfo.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 QueryUserChargeInstAndAreaInfo(object):
  6. def __init__(self):
  7. self._charge_inst = None
  8. self._charge_inst_name = None
  9. self._city = None
  10. self._city_code = None
  11. self._pay_count = None
  12. self._pay_date = None
  13. self._sub_biz_type = None
  14. self._user_id = None
  15. @property
  16. def charge_inst(self):
  17. return self._charge_inst
  18. @charge_inst.setter
  19. def charge_inst(self, value):
  20. self._charge_inst = value
  21. @property
  22. def charge_inst_name(self):
  23. return self._charge_inst_name
  24. @charge_inst_name.setter
  25. def charge_inst_name(self, value):
  26. self._charge_inst_name = value
  27. @property
  28. def city(self):
  29. return self._city
  30. @city.setter
  31. def city(self, value):
  32. self._city = value
  33. @property
  34. def city_code(self):
  35. return self._city_code
  36. @city_code.setter
  37. def city_code(self, value):
  38. self._city_code = value
  39. @property
  40. def pay_count(self):
  41. return self._pay_count
  42. @pay_count.setter
  43. def pay_count(self, value):
  44. self._pay_count = value
  45. @property
  46. def pay_date(self):
  47. return self._pay_date
  48. @pay_date.setter
  49. def pay_date(self, value):
  50. self._pay_date = value
  51. @property
  52. def sub_biz_type(self):
  53. return self._sub_biz_type
  54. @sub_biz_type.setter
  55. def sub_biz_type(self, value):
  56. self._sub_biz_type = value
  57. @property
  58. def user_id(self):
  59. return self._user_id
  60. @user_id.setter
  61. def user_id(self, value):
  62. self._user_id = value
  63. def to_alipay_dict(self):
  64. params = dict()
  65. if self.charge_inst:
  66. if hasattr(self.charge_inst, 'to_alipay_dict'):
  67. params['charge_inst'] = self.charge_inst.to_alipay_dict()
  68. else:
  69. params['charge_inst'] = self.charge_inst
  70. if self.charge_inst_name:
  71. if hasattr(self.charge_inst_name, 'to_alipay_dict'):
  72. params['charge_inst_name'] = self.charge_inst_name.to_alipay_dict()
  73. else:
  74. params['charge_inst_name'] = self.charge_inst_name
  75. if self.city:
  76. if hasattr(self.city, 'to_alipay_dict'):
  77. params['city'] = self.city.to_alipay_dict()
  78. else:
  79. params['city'] = self.city
  80. if self.city_code:
  81. if hasattr(self.city_code, 'to_alipay_dict'):
  82. params['city_code'] = self.city_code.to_alipay_dict()
  83. else:
  84. params['city_code'] = self.city_code
  85. if self.pay_count:
  86. if hasattr(self.pay_count, 'to_alipay_dict'):
  87. params['pay_count'] = self.pay_count.to_alipay_dict()
  88. else:
  89. params['pay_count'] = self.pay_count
  90. if self.pay_date:
  91. if hasattr(self.pay_date, 'to_alipay_dict'):
  92. params['pay_date'] = self.pay_date.to_alipay_dict()
  93. else:
  94. params['pay_date'] = self.pay_date
  95. if self.sub_biz_type:
  96. if hasattr(self.sub_biz_type, 'to_alipay_dict'):
  97. params['sub_biz_type'] = self.sub_biz_type.to_alipay_dict()
  98. else:
  99. params['sub_biz_type'] = self.sub_biz_type
  100. if self.user_id:
  101. if hasattr(self.user_id, 'to_alipay_dict'):
  102. params['user_id'] = self.user_id.to_alipay_dict()
  103. else:
  104. params['user_id'] = self.user_id
  105. return params
  106. @staticmethod
  107. def from_alipay_dict(d):
  108. if not d:
  109. return None
  110. o = QueryUserChargeInstAndAreaInfo()
  111. if 'charge_inst' in d:
  112. o.charge_inst = d['charge_inst']
  113. if 'charge_inst_name' in d:
  114. o.charge_inst_name = d['charge_inst_name']
  115. if 'city' in d:
  116. o.city = d['city']
  117. if 'city_code' in d:
  118. o.city_code = d['city_code']
  119. if 'pay_count' in d:
  120. o.pay_count = d['pay_count']
  121. if 'pay_date' in d:
  122. o.pay_date = d['pay_date']
  123. if 'sub_biz_type' in d:
  124. o.sub_biz_type = d['sub_biz_type']
  125. if 'user_id' in d:
  126. o.user_id = d['user_id']
  127. return o