AlipayEbppInvoiceApplyResultSyncModel.py 2.8 KB

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