KoubeiSalesKbsalesShopSyncModel.py 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiSalesKbsalesShopSyncModel(object):
  6. def __init__(self):
  7. self._action = None
  8. self._action_mode = None
  9. self._data_source = None
  10. self._data_version = None
  11. self._ext_info = None
  12. self._external_shop_id = None
  13. self._order_id = None
  14. self._relation_type = None
  15. self._scene = None
  16. self._shop_id = None
  17. self._status = None
  18. self._task_id = None
  19. @property
  20. def action(self):
  21. return self._action
  22. @action.setter
  23. def action(self, value):
  24. self._action = value
  25. @property
  26. def action_mode(self):
  27. return self._action_mode
  28. @action_mode.setter
  29. def action_mode(self, value):
  30. self._action_mode = value
  31. @property
  32. def data_source(self):
  33. return self._data_source
  34. @data_source.setter
  35. def data_source(self, value):
  36. self._data_source = value
  37. @property
  38. def data_version(self):
  39. return self._data_version
  40. @data_version.setter
  41. def data_version(self, value):
  42. self._data_version = value
  43. @property
  44. def ext_info(self):
  45. return self._ext_info
  46. @ext_info.setter
  47. def ext_info(self, value):
  48. self._ext_info = value
  49. @property
  50. def external_shop_id(self):
  51. return self._external_shop_id
  52. @external_shop_id.setter
  53. def external_shop_id(self, value):
  54. self._external_shop_id = value
  55. @property
  56. def order_id(self):
  57. return self._order_id
  58. @order_id.setter
  59. def order_id(self, value):
  60. self._order_id = value
  61. @property
  62. def relation_type(self):
  63. return self._relation_type
  64. @relation_type.setter
  65. def relation_type(self, value):
  66. self._relation_type = value
  67. @property
  68. def scene(self):
  69. return self._scene
  70. @scene.setter
  71. def scene(self, value):
  72. self._scene = value
  73. @property
  74. def shop_id(self):
  75. return self._shop_id
  76. @shop_id.setter
  77. def shop_id(self, value):
  78. self._shop_id = value
  79. @property
  80. def status(self):
  81. return self._status
  82. @status.setter
  83. def status(self, value):
  84. self._status = value
  85. @property
  86. def task_id(self):
  87. return self._task_id
  88. @task_id.setter
  89. def task_id(self, value):
  90. self._task_id = value
  91. def to_alipay_dict(self):
  92. params = dict()
  93. if self.action:
  94. if hasattr(self.action, 'to_alipay_dict'):
  95. params['action'] = self.action.to_alipay_dict()
  96. else:
  97. params['action'] = self.action
  98. if self.action_mode:
  99. if hasattr(self.action_mode, 'to_alipay_dict'):
  100. params['action_mode'] = self.action_mode.to_alipay_dict()
  101. else:
  102. params['action_mode'] = self.action_mode
  103. if self.data_source:
  104. if hasattr(self.data_source, 'to_alipay_dict'):
  105. params['data_source'] = self.data_source.to_alipay_dict()
  106. else:
  107. params['data_source'] = self.data_source
  108. if self.data_version:
  109. if hasattr(self.data_version, 'to_alipay_dict'):
  110. params['data_version'] = self.data_version.to_alipay_dict()
  111. else:
  112. params['data_version'] = self.data_version
  113. if self.ext_info:
  114. if hasattr(self.ext_info, 'to_alipay_dict'):
  115. params['ext_info'] = self.ext_info.to_alipay_dict()
  116. else:
  117. params['ext_info'] = self.ext_info
  118. if self.external_shop_id:
  119. if hasattr(self.external_shop_id, 'to_alipay_dict'):
  120. params['external_shop_id'] = self.external_shop_id.to_alipay_dict()
  121. else:
  122. params['external_shop_id'] = self.external_shop_id
  123. if self.order_id:
  124. if hasattr(self.order_id, 'to_alipay_dict'):
  125. params['order_id'] = self.order_id.to_alipay_dict()
  126. else:
  127. params['order_id'] = self.order_id
  128. if self.relation_type:
  129. if hasattr(self.relation_type, 'to_alipay_dict'):
  130. params['relation_type'] = self.relation_type.to_alipay_dict()
  131. else:
  132. params['relation_type'] = self.relation_type
  133. if self.scene:
  134. if hasattr(self.scene, 'to_alipay_dict'):
  135. params['scene'] = self.scene.to_alipay_dict()
  136. else:
  137. params['scene'] = self.scene
  138. if self.shop_id:
  139. if hasattr(self.shop_id, 'to_alipay_dict'):
  140. params['shop_id'] = self.shop_id.to_alipay_dict()
  141. else:
  142. params['shop_id'] = self.shop_id
  143. if self.status:
  144. if hasattr(self.status, 'to_alipay_dict'):
  145. params['status'] = self.status.to_alipay_dict()
  146. else:
  147. params['status'] = self.status
  148. if self.task_id:
  149. if hasattr(self.task_id, 'to_alipay_dict'):
  150. params['task_id'] = self.task_id.to_alipay_dict()
  151. else:
  152. params['task_id'] = self.task_id
  153. return params
  154. @staticmethod
  155. def from_alipay_dict(d):
  156. if not d:
  157. return None
  158. o = KoubeiSalesKbsalesShopSyncModel()
  159. if 'action' in d:
  160. o.action = d['action']
  161. if 'action_mode' in d:
  162. o.action_mode = d['action_mode']
  163. if 'data_source' in d:
  164. o.data_source = d['data_source']
  165. if 'data_version' in d:
  166. o.data_version = d['data_version']
  167. if 'ext_info' in d:
  168. o.ext_info = d['ext_info']
  169. if 'external_shop_id' in d:
  170. o.external_shop_id = d['external_shop_id']
  171. if 'order_id' in d:
  172. o.order_id = d['order_id']
  173. if 'relation_type' in d:
  174. o.relation_type = d['relation_type']
  175. if 'scene' in d:
  176. o.scene = d['scene']
  177. if 'shop_id' in d:
  178. o.shop_id = d['shop_id']
  179. if 'status' in d:
  180. o.status = d['status']
  181. if 'task_id' in d:
  182. o.task_id = d['task_id']
  183. return o