AlipayOpenOperationBizfeeAftechConsultModel.py 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayOpenOperationBizfeeAftechConsultModel(object):
  6. def __init__(self):
  7. self._app_name = None
  8. self._biz_no = None
  9. self._customer = None
  10. self._event_codes = None
  11. self._gmt_charge = None
  12. self._out_biz_no = None
  13. self._product_code = None
  14. self._properties = None
  15. self._tnt_inst_id = None
  16. @property
  17. def app_name(self):
  18. return self._app_name
  19. @app_name.setter
  20. def app_name(self, value):
  21. self._app_name = value
  22. @property
  23. def biz_no(self):
  24. return self._biz_no
  25. @biz_no.setter
  26. def biz_no(self, value):
  27. self._biz_no = value
  28. @property
  29. def customer(self):
  30. return self._customer
  31. @customer.setter
  32. def customer(self, value):
  33. self._customer = value
  34. @property
  35. def event_codes(self):
  36. return self._event_codes
  37. @event_codes.setter
  38. def event_codes(self, value):
  39. self._event_codes = value
  40. @property
  41. def gmt_charge(self):
  42. return self._gmt_charge
  43. @gmt_charge.setter
  44. def gmt_charge(self, value):
  45. self._gmt_charge = value
  46. @property
  47. def out_biz_no(self):
  48. return self._out_biz_no
  49. @out_biz_no.setter
  50. def out_biz_no(self, value):
  51. self._out_biz_no = value
  52. @property
  53. def product_code(self):
  54. return self._product_code
  55. @product_code.setter
  56. def product_code(self, value):
  57. self._product_code = value
  58. @property
  59. def properties(self):
  60. return self._properties
  61. @properties.setter
  62. def properties(self, value):
  63. self._properties = value
  64. @property
  65. def tnt_inst_id(self):
  66. return self._tnt_inst_id
  67. @tnt_inst_id.setter
  68. def tnt_inst_id(self, value):
  69. self._tnt_inst_id = value
  70. def to_alipay_dict(self):
  71. params = dict()
  72. if self.app_name:
  73. if hasattr(self.app_name, 'to_alipay_dict'):
  74. params['app_name'] = self.app_name.to_alipay_dict()
  75. else:
  76. params['app_name'] = self.app_name
  77. if self.biz_no:
  78. if hasattr(self.biz_no, 'to_alipay_dict'):
  79. params['biz_no'] = self.biz_no.to_alipay_dict()
  80. else:
  81. params['biz_no'] = self.biz_no
  82. if self.customer:
  83. if hasattr(self.customer, 'to_alipay_dict'):
  84. params['customer'] = self.customer.to_alipay_dict()
  85. else:
  86. params['customer'] = self.customer
  87. if self.event_codes:
  88. if hasattr(self.event_codes, 'to_alipay_dict'):
  89. params['event_codes'] = self.event_codes.to_alipay_dict()
  90. else:
  91. params['event_codes'] = self.event_codes
  92. if self.gmt_charge:
  93. if hasattr(self.gmt_charge, 'to_alipay_dict'):
  94. params['gmt_charge'] = self.gmt_charge.to_alipay_dict()
  95. else:
  96. params['gmt_charge'] = self.gmt_charge
  97. if self.out_biz_no:
  98. if hasattr(self.out_biz_no, 'to_alipay_dict'):
  99. params['out_biz_no'] = self.out_biz_no.to_alipay_dict()
  100. else:
  101. params['out_biz_no'] = self.out_biz_no
  102. if self.product_code:
  103. if hasattr(self.product_code, 'to_alipay_dict'):
  104. params['product_code'] = self.product_code.to_alipay_dict()
  105. else:
  106. params['product_code'] = self.product_code
  107. if self.properties:
  108. if hasattr(self.properties, 'to_alipay_dict'):
  109. params['properties'] = self.properties.to_alipay_dict()
  110. else:
  111. params['properties'] = self.properties
  112. if self.tnt_inst_id:
  113. if hasattr(self.tnt_inst_id, 'to_alipay_dict'):
  114. params['tnt_inst_id'] = self.tnt_inst_id.to_alipay_dict()
  115. else:
  116. params['tnt_inst_id'] = self.tnt_inst_id
  117. return params
  118. @staticmethod
  119. def from_alipay_dict(d):
  120. if not d:
  121. return None
  122. o = AlipayOpenOperationBizfeeAftechConsultModel()
  123. if 'app_name' in d:
  124. o.app_name = d['app_name']
  125. if 'biz_no' in d:
  126. o.biz_no = d['biz_no']
  127. if 'customer' in d:
  128. o.customer = d['customer']
  129. if 'event_codes' in d:
  130. o.event_codes = d['event_codes']
  131. if 'gmt_charge' in d:
  132. o.gmt_charge = d['gmt_charge']
  133. if 'out_biz_no' in d:
  134. o.out_biz_no = d['out_biz_no']
  135. if 'product_code' in d:
  136. o.product_code = d['product_code']
  137. if 'properties' in d:
  138. o.properties = d['properties']
  139. if 'tnt_inst_id' in d:
  140. o.tnt_inst_id = d['tnt_inst_id']
  141. return o