StockHolderVO.py 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class StockHolderVO(object):
  6. def __init__(self):
  7. self._invest_date = None
  8. self._invest_rate = None
  9. self._org_holder_name = None
  10. self._org_holder_type = None
  11. self._subscript_amt = None
  12. self._subscript_amt_curcy = None
  13. @property
  14. def invest_date(self):
  15. return self._invest_date
  16. @invest_date.setter
  17. def invest_date(self, value):
  18. self._invest_date = value
  19. @property
  20. def invest_rate(self):
  21. return self._invest_rate
  22. @invest_rate.setter
  23. def invest_rate(self, value):
  24. self._invest_rate = value
  25. @property
  26. def org_holder_name(self):
  27. return self._org_holder_name
  28. @org_holder_name.setter
  29. def org_holder_name(self, value):
  30. self._org_holder_name = value
  31. @property
  32. def org_holder_type(self):
  33. return self._org_holder_type
  34. @org_holder_type.setter
  35. def org_holder_type(self, value):
  36. self._org_holder_type = value
  37. @property
  38. def subscript_amt(self):
  39. return self._subscript_amt
  40. @subscript_amt.setter
  41. def subscript_amt(self, value):
  42. self._subscript_amt = value
  43. @property
  44. def subscript_amt_curcy(self):
  45. return self._subscript_amt_curcy
  46. @subscript_amt_curcy.setter
  47. def subscript_amt_curcy(self, value):
  48. self._subscript_amt_curcy = value
  49. def to_alipay_dict(self):
  50. params = dict()
  51. if self.invest_date:
  52. if hasattr(self.invest_date, 'to_alipay_dict'):
  53. params['invest_date'] = self.invest_date.to_alipay_dict()
  54. else:
  55. params['invest_date'] = self.invest_date
  56. if self.invest_rate:
  57. if hasattr(self.invest_rate, 'to_alipay_dict'):
  58. params['invest_rate'] = self.invest_rate.to_alipay_dict()
  59. else:
  60. params['invest_rate'] = self.invest_rate
  61. if self.org_holder_name:
  62. if hasattr(self.org_holder_name, 'to_alipay_dict'):
  63. params['org_holder_name'] = self.org_holder_name.to_alipay_dict()
  64. else:
  65. params['org_holder_name'] = self.org_holder_name
  66. if self.org_holder_type:
  67. if hasattr(self.org_holder_type, 'to_alipay_dict'):
  68. params['org_holder_type'] = self.org_holder_type.to_alipay_dict()
  69. else:
  70. params['org_holder_type'] = self.org_holder_type
  71. if self.subscript_amt:
  72. if hasattr(self.subscript_amt, 'to_alipay_dict'):
  73. params['subscript_amt'] = self.subscript_amt.to_alipay_dict()
  74. else:
  75. params['subscript_amt'] = self.subscript_amt
  76. if self.subscript_amt_curcy:
  77. if hasattr(self.subscript_amt_curcy, 'to_alipay_dict'):
  78. params['subscript_amt_curcy'] = self.subscript_amt_curcy.to_alipay_dict()
  79. else:
  80. params['subscript_amt_curcy'] = self.subscript_amt_curcy
  81. return params
  82. @staticmethod
  83. def from_alipay_dict(d):
  84. if not d:
  85. return None
  86. o = StockHolderVO()
  87. if 'invest_date' in d:
  88. o.invest_date = d['invest_date']
  89. if 'invest_rate' in d:
  90. o.invest_rate = d['invest_rate']
  91. if 'org_holder_name' in d:
  92. o.org_holder_name = d['org_holder_name']
  93. if 'org_holder_type' in d:
  94. o.org_holder_type = d['org_holder_type']
  95. if 'subscript_amt' in d:
  96. o.subscript_amt = d['subscript_amt']
  97. if 'subscript_amt_curcy' in d:
  98. o.subscript_amt_curcy = d['subscript_amt_curcy']
  99. return o