AlipayEbppInvoiceAuthUnsignModel.py 2.5 KB

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