KoubeiItemExtitemCreateModel.py 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiItemExtitemCreateModel(object):
  6. def __init__(self):
  7. self._brand_code = None
  8. self._category_code = None
  9. self._count = None
  10. self._country = None
  11. self._description = None
  12. self._item_code = None
  13. self._picture = None
  14. self._price = None
  15. self._specification = None
  16. self._title = None
  17. @property
  18. def brand_code(self):
  19. return self._brand_code
  20. @brand_code.setter
  21. def brand_code(self, value):
  22. self._brand_code = value
  23. @property
  24. def category_code(self):
  25. return self._category_code
  26. @category_code.setter
  27. def category_code(self, value):
  28. self._category_code = value
  29. @property
  30. def count(self):
  31. return self._count
  32. @count.setter
  33. def count(self, value):
  34. self._count = value
  35. @property
  36. def country(self):
  37. return self._country
  38. @country.setter
  39. def country(self, value):
  40. self._country = value
  41. @property
  42. def description(self):
  43. return self._description
  44. @description.setter
  45. def description(self, value):
  46. self._description = value
  47. @property
  48. def item_code(self):
  49. return self._item_code
  50. @item_code.setter
  51. def item_code(self, value):
  52. self._item_code = value
  53. @property
  54. def picture(self):
  55. return self._picture
  56. @picture.setter
  57. def picture(self, value):
  58. self._picture = value
  59. @property
  60. def price(self):
  61. return self._price
  62. @price.setter
  63. def price(self, value):
  64. self._price = value
  65. @property
  66. def specification(self):
  67. return self._specification
  68. @specification.setter
  69. def specification(self, value):
  70. self._specification = value
  71. @property
  72. def title(self):
  73. return self._title
  74. @title.setter
  75. def title(self, value):
  76. self._title = value
  77. def to_alipay_dict(self):
  78. params = dict()
  79. if self.brand_code:
  80. if hasattr(self.brand_code, 'to_alipay_dict'):
  81. params['brand_code'] = self.brand_code.to_alipay_dict()
  82. else:
  83. params['brand_code'] = self.brand_code
  84. if self.category_code:
  85. if hasattr(self.category_code, 'to_alipay_dict'):
  86. params['category_code'] = self.category_code.to_alipay_dict()
  87. else:
  88. params['category_code'] = self.category_code
  89. if self.count:
  90. if hasattr(self.count, 'to_alipay_dict'):
  91. params['count'] = self.count.to_alipay_dict()
  92. else:
  93. params['count'] = self.count
  94. if self.country:
  95. if hasattr(self.country, 'to_alipay_dict'):
  96. params['country'] = self.country.to_alipay_dict()
  97. else:
  98. params['country'] = self.country
  99. if self.description:
  100. if hasattr(self.description, 'to_alipay_dict'):
  101. params['description'] = self.description.to_alipay_dict()
  102. else:
  103. params['description'] = self.description
  104. if self.item_code:
  105. if hasattr(self.item_code, 'to_alipay_dict'):
  106. params['item_code'] = self.item_code.to_alipay_dict()
  107. else:
  108. params['item_code'] = self.item_code
  109. if self.picture:
  110. if hasattr(self.picture, 'to_alipay_dict'):
  111. params['picture'] = self.picture.to_alipay_dict()
  112. else:
  113. params['picture'] = self.picture
  114. if self.price:
  115. if hasattr(self.price, 'to_alipay_dict'):
  116. params['price'] = self.price.to_alipay_dict()
  117. else:
  118. params['price'] = self.price
  119. if self.specification:
  120. if hasattr(self.specification, 'to_alipay_dict'):
  121. params['specification'] = self.specification.to_alipay_dict()
  122. else:
  123. params['specification'] = self.specification
  124. if self.title:
  125. if hasattr(self.title, 'to_alipay_dict'):
  126. params['title'] = self.title.to_alipay_dict()
  127. else:
  128. params['title'] = self.title
  129. return params
  130. @staticmethod
  131. def from_alipay_dict(d):
  132. if not d:
  133. return None
  134. o = KoubeiItemExtitemCreateModel()
  135. if 'brand_code' in d:
  136. o.brand_code = d['brand_code']
  137. if 'category_code' in d:
  138. o.category_code = d['category_code']
  139. if 'count' in d:
  140. o.count = d['count']
  141. if 'country' in d:
  142. o.country = d['country']
  143. if 'description' in d:
  144. o.description = d['description']
  145. if 'item_code' in d:
  146. o.item_code = d['item_code']
  147. if 'picture' in d:
  148. o.picture = d['picture']
  149. if 'price' in d:
  150. o.price = d['price']
  151. if 'specification' in d:
  152. o.specification = d['specification']
  153. if 'title' in d:
  154. o.title = d['title']
  155. return o