MybankPaymentTradeDepositVerifyMatchModel.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class MybankPaymentTradeDepositVerifyMatchModel(object):
  6. def __init__(self):
  7. self._amount = None
  8. self._currency = None
  9. self._verify_id = None
  10. @property
  11. def amount(self):
  12. return self._amount
  13. @amount.setter
  14. def amount(self, value):
  15. self._amount = value
  16. @property
  17. def currency(self):
  18. return self._currency
  19. @currency.setter
  20. def currency(self, value):
  21. self._currency = value
  22. @property
  23. def verify_id(self):
  24. return self._verify_id
  25. @verify_id.setter
  26. def verify_id(self, value):
  27. self._verify_id = value
  28. def to_alipay_dict(self):
  29. params = dict()
  30. if self.amount:
  31. if hasattr(self.amount, 'to_alipay_dict'):
  32. params['amount'] = self.amount.to_alipay_dict()
  33. else:
  34. params['amount'] = self.amount
  35. if self.currency:
  36. if hasattr(self.currency, 'to_alipay_dict'):
  37. params['currency'] = self.currency.to_alipay_dict()
  38. else:
  39. params['currency'] = self.currency
  40. if self.verify_id:
  41. if hasattr(self.verify_id, 'to_alipay_dict'):
  42. params['verify_id'] = self.verify_id.to_alipay_dict()
  43. else:
  44. params['verify_id'] = self.verify_id
  45. return params
  46. @staticmethod
  47. def from_alipay_dict(d):
  48. if not d:
  49. return None
  50. o = MybankPaymentTradeDepositVerifyMatchModel()
  51. if 'amount' in d:
  52. o.amount = d['amount']
  53. if 'currency' in d:
  54. o.currency = d['currency']
  55. if 'verify_id' in d:
  56. o.verify_id = d['verify_id']
  57. return o