AlipayOfflineProviderEquipmentAuthRemoveModel.py 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayOfflineProviderEquipmentAuthRemoveModel(object):
  6. def __init__(self):
  7. self._device_id = None
  8. self._device_type = None
  9. self._ext_info = None
  10. self._merchant_pid = None
  11. self._operator = None
  12. self._operator_id = None
  13. @property
  14. def device_id(self):
  15. return self._device_id
  16. @device_id.setter
  17. def device_id(self, value):
  18. self._device_id = value
  19. @property
  20. def device_type(self):
  21. return self._device_type
  22. @device_type.setter
  23. def device_type(self, value):
  24. self._device_type = value
  25. @property
  26. def ext_info(self):
  27. return self._ext_info
  28. @ext_info.setter
  29. def ext_info(self, value):
  30. self._ext_info = value
  31. @property
  32. def merchant_pid(self):
  33. return self._merchant_pid
  34. @merchant_pid.setter
  35. def merchant_pid(self, value):
  36. self._merchant_pid = value
  37. @property
  38. def operator(self):
  39. return self._operator
  40. @operator.setter
  41. def operator(self, value):
  42. self._operator = value
  43. @property
  44. def operator_id(self):
  45. return self._operator_id
  46. @operator_id.setter
  47. def operator_id(self, value):
  48. self._operator_id = value
  49. def to_alipay_dict(self):
  50. params = dict()
  51. if self.device_id:
  52. if hasattr(self.device_id, 'to_alipay_dict'):
  53. params['device_id'] = self.device_id.to_alipay_dict()
  54. else:
  55. params['device_id'] = self.device_id
  56. if self.device_type:
  57. if hasattr(self.device_type, 'to_alipay_dict'):
  58. params['device_type'] = self.device_type.to_alipay_dict()
  59. else:
  60. params['device_type'] = self.device_type
  61. if self.ext_info:
  62. if hasattr(self.ext_info, 'to_alipay_dict'):
  63. params['ext_info'] = self.ext_info.to_alipay_dict()
  64. else:
  65. params['ext_info'] = self.ext_info
  66. if self.merchant_pid:
  67. if hasattr(self.merchant_pid, 'to_alipay_dict'):
  68. params['merchant_pid'] = self.merchant_pid.to_alipay_dict()
  69. else:
  70. params['merchant_pid'] = self.merchant_pid
  71. if self.operator:
  72. if hasattr(self.operator, 'to_alipay_dict'):
  73. params['operator'] = self.operator.to_alipay_dict()
  74. else:
  75. params['operator'] = self.operator
  76. if self.operator_id:
  77. if hasattr(self.operator_id, 'to_alipay_dict'):
  78. params['operator_id'] = self.operator_id.to_alipay_dict()
  79. else:
  80. params['operator_id'] = self.operator_id
  81. return params
  82. @staticmethod
  83. def from_alipay_dict(d):
  84. if not d:
  85. return None
  86. o = AlipayOfflineProviderEquipmentAuthRemoveModel()
  87. if 'device_id' in d:
  88. o.device_id = d['device_id']
  89. if 'device_type' in d:
  90. o.device_type = d['device_type']
  91. if 'ext_info' in d:
  92. o.ext_info = d['ext_info']
  93. if 'merchant_pid' in d:
  94. o.merchant_pid = d['merchant_pid']
  95. if 'operator' in d:
  96. o.operator = d['operator']
  97. if 'operator_id' in d:
  98. o.operator_id = d['operator_id']
  99. return o