SnApplyInfo.py 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class SnApplyInfo(object):
  6. def __init__(self):
  7. self._apply_id = None
  8. self._content = None
  9. self._gmt_create = None
  10. self._item_id = None
  11. self._sn_count = None
  12. self._status = None
  13. self._supplier_id = None
  14. @property
  15. def apply_id(self):
  16. return self._apply_id
  17. @apply_id.setter
  18. def apply_id(self, value):
  19. self._apply_id = value
  20. @property
  21. def content(self):
  22. return self._content
  23. @content.setter
  24. def content(self, value):
  25. self._content = value
  26. @property
  27. def gmt_create(self):
  28. return self._gmt_create
  29. @gmt_create.setter
  30. def gmt_create(self, value):
  31. self._gmt_create = value
  32. @property
  33. def item_id(self):
  34. return self._item_id
  35. @item_id.setter
  36. def item_id(self, value):
  37. self._item_id = value
  38. @property
  39. def sn_count(self):
  40. return self._sn_count
  41. @sn_count.setter
  42. def sn_count(self, value):
  43. self._sn_count = value
  44. @property
  45. def status(self):
  46. return self._status
  47. @status.setter
  48. def status(self, value):
  49. self._status = value
  50. @property
  51. def supplier_id(self):
  52. return self._supplier_id
  53. @supplier_id.setter
  54. def supplier_id(self, value):
  55. self._supplier_id = value
  56. def to_alipay_dict(self):
  57. params = dict()
  58. if self.apply_id:
  59. if hasattr(self.apply_id, 'to_alipay_dict'):
  60. params['apply_id'] = self.apply_id.to_alipay_dict()
  61. else:
  62. params['apply_id'] = self.apply_id
  63. if self.content:
  64. if hasattr(self.content, 'to_alipay_dict'):
  65. params['content'] = self.content.to_alipay_dict()
  66. else:
  67. params['content'] = self.content
  68. if self.gmt_create:
  69. if hasattr(self.gmt_create, 'to_alipay_dict'):
  70. params['gmt_create'] = self.gmt_create.to_alipay_dict()
  71. else:
  72. params['gmt_create'] = self.gmt_create
  73. if self.item_id:
  74. if hasattr(self.item_id, 'to_alipay_dict'):
  75. params['item_id'] = self.item_id.to_alipay_dict()
  76. else:
  77. params['item_id'] = self.item_id
  78. if self.sn_count:
  79. if hasattr(self.sn_count, 'to_alipay_dict'):
  80. params['sn_count'] = self.sn_count.to_alipay_dict()
  81. else:
  82. params['sn_count'] = self.sn_count
  83. if self.status:
  84. if hasattr(self.status, 'to_alipay_dict'):
  85. params['status'] = self.status.to_alipay_dict()
  86. else:
  87. params['status'] = self.status
  88. if self.supplier_id:
  89. if hasattr(self.supplier_id, 'to_alipay_dict'):
  90. params['supplier_id'] = self.supplier_id.to_alipay_dict()
  91. else:
  92. params['supplier_id'] = self.supplier_id
  93. return params
  94. @staticmethod
  95. def from_alipay_dict(d):
  96. if not d:
  97. return None
  98. o = SnApplyInfo()
  99. if 'apply_id' in d:
  100. o.apply_id = d['apply_id']
  101. if 'content' in d:
  102. o.content = d['content']
  103. if 'gmt_create' in d:
  104. o.gmt_create = d['gmt_create']
  105. if 'item_id' in d:
  106. o.item_id = d['item_id']
  107. if 'sn_count' in d:
  108. o.sn_count = d['sn_count']
  109. if 'status' in d:
  110. o.status = d['status']
  111. if 'supplier_id' in d:
  112. o.supplier_id = d['supplier_id']
  113. return o