AlipayMarketingCardActivateurlApplyModel.py 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayMarketingCardActivateurlApplyModel(object):
  6. def __init__(self):
  7. self._callback = None
  8. self._follow_app_id = None
  9. self._out_string = None
  10. self._template_id = None
  11. @property
  12. def callback(self):
  13. return self._callback
  14. @callback.setter
  15. def callback(self, value):
  16. self._callback = value
  17. @property
  18. def follow_app_id(self):
  19. return self._follow_app_id
  20. @follow_app_id.setter
  21. def follow_app_id(self, value):
  22. self._follow_app_id = value
  23. @property
  24. def out_string(self):
  25. return self._out_string
  26. @out_string.setter
  27. def out_string(self, value):
  28. self._out_string = value
  29. @property
  30. def template_id(self):
  31. return self._template_id
  32. @template_id.setter
  33. def template_id(self, value):
  34. self._template_id = value
  35. def to_alipay_dict(self):
  36. params = dict()
  37. if self.callback:
  38. if hasattr(self.callback, 'to_alipay_dict'):
  39. params['callback'] = self.callback.to_alipay_dict()
  40. else:
  41. params['callback'] = self.callback
  42. if self.follow_app_id:
  43. if hasattr(self.follow_app_id, 'to_alipay_dict'):
  44. params['follow_app_id'] = self.follow_app_id.to_alipay_dict()
  45. else:
  46. params['follow_app_id'] = self.follow_app_id
  47. if self.out_string:
  48. if hasattr(self.out_string, 'to_alipay_dict'):
  49. params['out_string'] = self.out_string.to_alipay_dict()
  50. else:
  51. params['out_string'] = self.out_string
  52. if self.template_id:
  53. if hasattr(self.template_id, 'to_alipay_dict'):
  54. params['template_id'] = self.template_id.to_alipay_dict()
  55. else:
  56. params['template_id'] = self.template_id
  57. return params
  58. @staticmethod
  59. def from_alipay_dict(d):
  60. if not d:
  61. return None
  62. o = AlipayMarketingCardActivateurlApplyModel()
  63. if 'callback' in d:
  64. o.callback = d['callback']
  65. if 'follow_app_id' in d:
  66. o.follow_app_id = d['follow_app_id']
  67. if 'out_string' in d:
  68. o.out_string = d['out_string']
  69. if 'template_id' in d:
  70. o.template_id = d['template_id']
  71. return o