ZhimaCustomerFulfillmentSyncModel.py 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class ZhimaCustomerFulfillmentSyncModel(object):
  6. def __init__(self):
  7. self._ext_info = None
  8. self._gmt_service = None
  9. self._service_id = None
  10. self._subject_delta_num = None
  11. self._subject_id = None
  12. self._subject_type = None
  13. self._transaction_id = None
  14. self._user_id = None
  15. @property
  16. def ext_info(self):
  17. return self._ext_info
  18. @ext_info.setter
  19. def ext_info(self, value):
  20. self._ext_info = value
  21. @property
  22. def gmt_service(self):
  23. return self._gmt_service
  24. @gmt_service.setter
  25. def gmt_service(self, value):
  26. self._gmt_service = value
  27. @property
  28. def service_id(self):
  29. return self._service_id
  30. @service_id.setter
  31. def service_id(self, value):
  32. self._service_id = value
  33. @property
  34. def subject_delta_num(self):
  35. return self._subject_delta_num
  36. @subject_delta_num.setter
  37. def subject_delta_num(self, value):
  38. self._subject_delta_num = value
  39. @property
  40. def subject_id(self):
  41. return self._subject_id
  42. @subject_id.setter
  43. def subject_id(self, value):
  44. self._subject_id = value
  45. @property
  46. def subject_type(self):
  47. return self._subject_type
  48. @subject_type.setter
  49. def subject_type(self, value):
  50. self._subject_type = value
  51. @property
  52. def transaction_id(self):
  53. return self._transaction_id
  54. @transaction_id.setter
  55. def transaction_id(self, value):
  56. self._transaction_id = value
  57. @property
  58. def user_id(self):
  59. return self._user_id
  60. @user_id.setter
  61. def user_id(self, value):
  62. self._user_id = value
  63. def to_alipay_dict(self):
  64. params = dict()
  65. if self.ext_info:
  66. if hasattr(self.ext_info, 'to_alipay_dict'):
  67. params['ext_info'] = self.ext_info.to_alipay_dict()
  68. else:
  69. params['ext_info'] = self.ext_info
  70. if self.gmt_service:
  71. if hasattr(self.gmt_service, 'to_alipay_dict'):
  72. params['gmt_service'] = self.gmt_service.to_alipay_dict()
  73. else:
  74. params['gmt_service'] = self.gmt_service
  75. if self.service_id:
  76. if hasattr(self.service_id, 'to_alipay_dict'):
  77. params['service_id'] = self.service_id.to_alipay_dict()
  78. else:
  79. params['service_id'] = self.service_id
  80. if self.subject_delta_num:
  81. if hasattr(self.subject_delta_num, 'to_alipay_dict'):
  82. params['subject_delta_num'] = self.subject_delta_num.to_alipay_dict()
  83. else:
  84. params['subject_delta_num'] = self.subject_delta_num
  85. if self.subject_id:
  86. if hasattr(self.subject_id, 'to_alipay_dict'):
  87. params['subject_id'] = self.subject_id.to_alipay_dict()
  88. else:
  89. params['subject_id'] = self.subject_id
  90. if self.subject_type:
  91. if hasattr(self.subject_type, 'to_alipay_dict'):
  92. params['subject_type'] = self.subject_type.to_alipay_dict()
  93. else:
  94. params['subject_type'] = self.subject_type
  95. if self.transaction_id:
  96. if hasattr(self.transaction_id, 'to_alipay_dict'):
  97. params['transaction_id'] = self.transaction_id.to_alipay_dict()
  98. else:
  99. params['transaction_id'] = self.transaction_id
  100. if self.user_id:
  101. if hasattr(self.user_id, 'to_alipay_dict'):
  102. params['user_id'] = self.user_id.to_alipay_dict()
  103. else:
  104. params['user_id'] = self.user_id
  105. return params
  106. @staticmethod
  107. def from_alipay_dict(d):
  108. if not d:
  109. return None
  110. o = ZhimaCustomerFulfillmentSyncModel()
  111. if 'ext_info' in d:
  112. o.ext_info = d['ext_info']
  113. if 'gmt_service' in d:
  114. o.gmt_service = d['gmt_service']
  115. if 'service_id' in d:
  116. o.service_id = d['service_id']
  117. if 'subject_delta_num' in d:
  118. o.subject_delta_num = d['subject_delta_num']
  119. if 'subject_id' in d:
  120. o.subject_id = d['subject_id']
  121. if 'subject_type' in d:
  122. o.subject_type = d['subject_type']
  123. if 'transaction_id' in d:
  124. o.transaction_id = d['transaction_id']
  125. if 'user_id' in d:
  126. o.user_id = d['user_id']
  127. return o