AlipayBossFncInvoicereceiptCreateModel.py 3.1 KB

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