OpenApiRefundFundDetailPojo.py 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class OpenApiRefundFundDetailPojo(object):
  6. def __init__(self):
  7. self._funds = None
  8. self._trans_in = None
  9. self._trans_in_type = None
  10. self._type = None
  11. @property
  12. def funds(self):
  13. return self._funds
  14. @funds.setter
  15. def funds(self, value):
  16. if isinstance(value, list):
  17. self._funds = list()
  18. for i in value:
  19. self._funds.append(i)
  20. @property
  21. def trans_in(self):
  22. return self._trans_in
  23. @trans_in.setter
  24. def trans_in(self, value):
  25. self._trans_in = value
  26. @property
  27. def trans_in_type(self):
  28. return self._trans_in_type
  29. @trans_in_type.setter
  30. def trans_in_type(self, value):
  31. self._trans_in_type = value
  32. @property
  33. def type(self):
  34. return self._type
  35. @type.setter
  36. def type(self, value):
  37. self._type = value
  38. def to_alipay_dict(self):
  39. params = dict()
  40. if self.funds:
  41. if isinstance(self.funds, list):
  42. for i in range(0, len(self.funds)):
  43. element = self.funds[i]
  44. if hasattr(element, 'to_alipay_dict'):
  45. self.funds[i] = element.to_alipay_dict()
  46. if hasattr(self.funds, 'to_alipay_dict'):
  47. params['funds'] = self.funds.to_alipay_dict()
  48. else:
  49. params['funds'] = self.funds
  50. if self.trans_in:
  51. if hasattr(self.trans_in, 'to_alipay_dict'):
  52. params['trans_in'] = self.trans_in.to_alipay_dict()
  53. else:
  54. params['trans_in'] = self.trans_in
  55. if self.trans_in_type:
  56. if hasattr(self.trans_in_type, 'to_alipay_dict'):
  57. params['trans_in_type'] = self.trans_in_type.to_alipay_dict()
  58. else:
  59. params['trans_in_type'] = self.trans_in_type
  60. if self.type:
  61. if hasattr(self.type, 'to_alipay_dict'):
  62. params['type'] = self.type.to_alipay_dict()
  63. else:
  64. params['type'] = self.type
  65. return params
  66. @staticmethod
  67. def from_alipay_dict(d):
  68. if not d:
  69. return None
  70. o = OpenApiRefundFundDetailPojo()
  71. if 'funds' in d:
  72. o.funds = d['funds']
  73. if 'trans_in' in d:
  74. o.trans_in = d['trans_in']
  75. if 'trans_in_type' in d:
  76. o.trans_in_type = d['trans_in_type']
  77. if 'type' in d:
  78. o.type = d['type']
  79. return o