AlipayOpenOperationBizfeeAftechRefundModel.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 AlipayOpenOperationBizfeeAftechRefundModel(object):
  6. def __init__(self):
  7. self._app_name = None
  8. self._currency = None
  9. self._fee_order_no = None
  10. self._gmt_service = None
  11. self._order_no = None
  12. self._out_biz_no = None
  13. self._refund_amount = None
  14. self._refund_no = 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 currency(self):
  24. return self._currency
  25. @currency.setter
  26. def currency(self, value):
  27. self._currency = value
  28. @property
  29. def fee_order_no(self):
  30. return self._fee_order_no
  31. @fee_order_no.setter
  32. def fee_order_no(self, value):
  33. self._fee_order_no = value
  34. @property
  35. def gmt_service(self):
  36. return self._gmt_service
  37. @gmt_service.setter
  38. def gmt_service(self, value):
  39. self._gmt_service = value
  40. @property
  41. def order_no(self):
  42. return self._order_no
  43. @order_no.setter
  44. def order_no(self, value):
  45. self._order_no = 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 refund_amount(self):
  54. return self._refund_amount
  55. @refund_amount.setter
  56. def refund_amount(self, value):
  57. self._refund_amount = value
  58. @property
  59. def refund_no(self):
  60. return self._refund_no
  61. @refund_no.setter
  62. def refund_no(self, value):
  63. self._refund_no = 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.currency:
  78. if hasattr(self.currency, 'to_alipay_dict'):
  79. params['currency'] = self.currency.to_alipay_dict()
  80. else:
  81. params['currency'] = self.currency
  82. if self.fee_order_no:
  83. if hasattr(self.fee_order_no, 'to_alipay_dict'):
  84. params['fee_order_no'] = self.fee_order_no.to_alipay_dict()
  85. else:
  86. params['fee_order_no'] = self.fee_order_no
  87. if self.gmt_service:
  88. if hasattr(self.gmt_service, 'to_alipay_dict'):
  89. params['gmt_service'] = self.gmt_service.to_alipay_dict()
  90. else:
  91. params['gmt_service'] = self.gmt_service
  92. if self.order_no:
  93. if hasattr(self.order_no, 'to_alipay_dict'):
  94. params['order_no'] = self.order_no.to_alipay_dict()
  95. else:
  96. params['order_no'] = self.order_no
  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.refund_amount:
  103. if hasattr(self.refund_amount, 'to_alipay_dict'):
  104. params['refund_amount'] = self.refund_amount.to_alipay_dict()
  105. else:
  106. params['refund_amount'] = self.refund_amount
  107. if self.refund_no:
  108. if hasattr(self.refund_no, 'to_alipay_dict'):
  109. params['refund_no'] = self.refund_no.to_alipay_dict()
  110. else:
  111. params['refund_no'] = self.refund_no
  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 = AlipayOpenOperationBizfeeAftechRefundModel()
  123. if 'app_name' in d:
  124. o.app_name = d['app_name']
  125. if 'currency' in d:
  126. o.currency = d['currency']
  127. if 'fee_order_no' in d:
  128. o.fee_order_no = d['fee_order_no']
  129. if 'gmt_service' in d:
  130. o.gmt_service = d['gmt_service']
  131. if 'order_no' in d:
  132. o.order_no = d['order_no']
  133. if 'out_biz_no' in d:
  134. o.out_biz_no = d['out_biz_no']
  135. if 'refund_amount' in d:
  136. o.refund_amount = d['refund_amount']
  137. if 'refund_no' in d:
  138. o.refund_no = d['refund_no']
  139. if 'tnt_inst_id' in d:
  140. o.tnt_inst_id = d['tnt_inst_id']
  141. return o