AlipayAssetPointAccountlogQueryModel.py 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayAssetPointAccountlogQueryModel(object):
  6. def __init__(self):
  7. self._account_date_begin = None
  8. self._account_date_end = None
  9. self._page_number = None
  10. self._page_size = None
  11. self._sub_trans_code = None
  12. self._trans_code = None
  13. self._user_symbol = None
  14. self._user_symbol_type = None
  15. @property
  16. def account_date_begin(self):
  17. return self._account_date_begin
  18. @account_date_begin.setter
  19. def account_date_begin(self, value):
  20. self._account_date_begin = value
  21. @property
  22. def account_date_end(self):
  23. return self._account_date_end
  24. @account_date_end.setter
  25. def account_date_end(self, value):
  26. self._account_date_end = value
  27. @property
  28. def page_number(self):
  29. return self._page_number
  30. @page_number.setter
  31. def page_number(self, value):
  32. self._page_number = value
  33. @property
  34. def page_size(self):
  35. return self._page_size
  36. @page_size.setter
  37. def page_size(self, value):
  38. self._page_size = value
  39. @property
  40. def sub_trans_code(self):
  41. return self._sub_trans_code
  42. @sub_trans_code.setter
  43. def sub_trans_code(self, value):
  44. if isinstance(value, list):
  45. self._sub_trans_code = list()
  46. for i in value:
  47. self._sub_trans_code.append(i)
  48. @property
  49. def trans_code(self):
  50. return self._trans_code
  51. @trans_code.setter
  52. def trans_code(self, value):
  53. if isinstance(value, list):
  54. self._trans_code = list()
  55. for i in value:
  56. self._trans_code.append(i)
  57. @property
  58. def user_symbol(self):
  59. return self._user_symbol
  60. @user_symbol.setter
  61. def user_symbol(self, value):
  62. self._user_symbol = value
  63. @property
  64. def user_symbol_type(self):
  65. return self._user_symbol_type
  66. @user_symbol_type.setter
  67. def user_symbol_type(self, value):
  68. self._user_symbol_type = value
  69. def to_alipay_dict(self):
  70. params = dict()
  71. if self.account_date_begin:
  72. if hasattr(self.account_date_begin, 'to_alipay_dict'):
  73. params['account_date_begin'] = self.account_date_begin.to_alipay_dict()
  74. else:
  75. params['account_date_begin'] = self.account_date_begin
  76. if self.account_date_end:
  77. if hasattr(self.account_date_end, 'to_alipay_dict'):
  78. params['account_date_end'] = self.account_date_end.to_alipay_dict()
  79. else:
  80. params['account_date_end'] = self.account_date_end
  81. if self.page_number:
  82. if hasattr(self.page_number, 'to_alipay_dict'):
  83. params['page_number'] = self.page_number.to_alipay_dict()
  84. else:
  85. params['page_number'] = self.page_number
  86. if self.page_size:
  87. if hasattr(self.page_size, 'to_alipay_dict'):
  88. params['page_size'] = self.page_size.to_alipay_dict()
  89. else:
  90. params['page_size'] = self.page_size
  91. if self.sub_trans_code:
  92. if isinstance(self.sub_trans_code, list):
  93. for i in range(0, len(self.sub_trans_code)):
  94. element = self.sub_trans_code[i]
  95. if hasattr(element, 'to_alipay_dict'):
  96. self.sub_trans_code[i] = element.to_alipay_dict()
  97. if hasattr(self.sub_trans_code, 'to_alipay_dict'):
  98. params['sub_trans_code'] = self.sub_trans_code.to_alipay_dict()
  99. else:
  100. params['sub_trans_code'] = self.sub_trans_code
  101. if self.trans_code:
  102. if isinstance(self.trans_code, list):
  103. for i in range(0, len(self.trans_code)):
  104. element = self.trans_code[i]
  105. if hasattr(element, 'to_alipay_dict'):
  106. self.trans_code[i] = element.to_alipay_dict()
  107. if hasattr(self.trans_code, 'to_alipay_dict'):
  108. params['trans_code'] = self.trans_code.to_alipay_dict()
  109. else:
  110. params['trans_code'] = self.trans_code
  111. if self.user_symbol:
  112. if hasattr(self.user_symbol, 'to_alipay_dict'):
  113. params['user_symbol'] = self.user_symbol.to_alipay_dict()
  114. else:
  115. params['user_symbol'] = self.user_symbol
  116. if self.user_symbol_type:
  117. if hasattr(self.user_symbol_type, 'to_alipay_dict'):
  118. params['user_symbol_type'] = self.user_symbol_type.to_alipay_dict()
  119. else:
  120. params['user_symbol_type'] = self.user_symbol_type
  121. return params
  122. @staticmethod
  123. def from_alipay_dict(d):
  124. if not d:
  125. return None
  126. o = AlipayAssetPointAccountlogQueryModel()
  127. if 'account_date_begin' in d:
  128. o.account_date_begin = d['account_date_begin']
  129. if 'account_date_end' in d:
  130. o.account_date_end = d['account_date_end']
  131. if 'page_number' in d:
  132. o.page_number = d['page_number']
  133. if 'page_size' in d:
  134. o.page_size = d['page_size']
  135. if 'sub_trans_code' in d:
  136. o.sub_trans_code = d['sub_trans_code']
  137. if 'trans_code' in d:
  138. o.trans_code = d['trans_code']
  139. if 'user_symbol' in d:
  140. o.user_symbol = d['user_symbol']
  141. if 'user_symbol_type' in d:
  142. o.user_symbol_type = d['user_symbol_type']
  143. return o