ZhimaMerchantSingleDataUploadModel.py 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class ZhimaMerchantSingleDataUploadModel(object):
  6. def __init__(self):
  7. self._biz_ext_params = None
  8. self._data = None
  9. self._linked_merchant_id = None
  10. self._primary_keys = None
  11. self._scene_code = None
  12. @property
  13. def biz_ext_params(self):
  14. return self._biz_ext_params
  15. @biz_ext_params.setter
  16. def biz_ext_params(self, value):
  17. self._biz_ext_params = value
  18. @property
  19. def data(self):
  20. return self._data
  21. @data.setter
  22. def data(self, value):
  23. self._data = value
  24. @property
  25. def linked_merchant_id(self):
  26. return self._linked_merchant_id
  27. @linked_merchant_id.setter
  28. def linked_merchant_id(self, value):
  29. self._linked_merchant_id = value
  30. @property
  31. def primary_keys(self):
  32. return self._primary_keys
  33. @primary_keys.setter
  34. def primary_keys(self, value):
  35. self._primary_keys = value
  36. @property
  37. def scene_code(self):
  38. return self._scene_code
  39. @scene_code.setter
  40. def scene_code(self, value):
  41. self._scene_code = value
  42. def to_alipay_dict(self):
  43. params = dict()
  44. if self.biz_ext_params:
  45. if hasattr(self.biz_ext_params, 'to_alipay_dict'):
  46. params['biz_ext_params'] = self.biz_ext_params.to_alipay_dict()
  47. else:
  48. params['biz_ext_params'] = self.biz_ext_params
  49. if self.data:
  50. if hasattr(self.data, 'to_alipay_dict'):
  51. params['data'] = self.data.to_alipay_dict()
  52. else:
  53. params['data'] = self.data
  54. if self.linked_merchant_id:
  55. if hasattr(self.linked_merchant_id, 'to_alipay_dict'):
  56. params['linked_merchant_id'] = self.linked_merchant_id.to_alipay_dict()
  57. else:
  58. params['linked_merchant_id'] = self.linked_merchant_id
  59. if self.primary_keys:
  60. if hasattr(self.primary_keys, 'to_alipay_dict'):
  61. params['primary_keys'] = self.primary_keys.to_alipay_dict()
  62. else:
  63. params['primary_keys'] = self.primary_keys
  64. if self.scene_code:
  65. if hasattr(self.scene_code, 'to_alipay_dict'):
  66. params['scene_code'] = self.scene_code.to_alipay_dict()
  67. else:
  68. params['scene_code'] = self.scene_code
  69. return params
  70. @staticmethod
  71. def from_alipay_dict(d):
  72. if not d:
  73. return None
  74. o = ZhimaMerchantSingleDataUploadModel()
  75. if 'biz_ext_params' in d:
  76. o.biz_ext_params = d['biz_ext_params']
  77. if 'data' in d:
  78. o.data = d['data']
  79. if 'linked_merchant_id' in d:
  80. o.linked_merchant_id = d['linked_merchant_id']
  81. if 'primary_keys' in d:
  82. o.primary_keys = d['primary_keys']
  83. if 'scene_code' in d:
  84. o.scene_code = d['scene_code']
  85. return o