AlipayUserElectronicidOutermerchantbarcodeCreateModel.py 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayUserElectronicidOutermerchantbarcodeCreateModel(object):
  6. def __init__(self):
  7. self._barcode_type = None
  8. self._expire_time = None
  9. self._merchant_type = None
  10. self._redirect_url = None
  11. @property
  12. def barcode_type(self):
  13. return self._barcode_type
  14. @barcode_type.setter
  15. def barcode_type(self, value):
  16. self._barcode_type = value
  17. @property
  18. def expire_time(self):
  19. return self._expire_time
  20. @expire_time.setter
  21. def expire_time(self, value):
  22. self._expire_time = value
  23. @property
  24. def merchant_type(self):
  25. return self._merchant_type
  26. @merchant_type.setter
  27. def merchant_type(self, value):
  28. self._merchant_type = value
  29. @property
  30. def redirect_url(self):
  31. return self._redirect_url
  32. @redirect_url.setter
  33. def redirect_url(self, value):
  34. self._redirect_url = value
  35. def to_alipay_dict(self):
  36. params = dict()
  37. if self.barcode_type:
  38. if hasattr(self.barcode_type, 'to_alipay_dict'):
  39. params['barcode_type'] = self.barcode_type.to_alipay_dict()
  40. else:
  41. params['barcode_type'] = self.barcode_type
  42. if self.expire_time:
  43. if hasattr(self.expire_time, 'to_alipay_dict'):
  44. params['expire_time'] = self.expire_time.to_alipay_dict()
  45. else:
  46. params['expire_time'] = self.expire_time
  47. if self.merchant_type:
  48. if hasattr(self.merchant_type, 'to_alipay_dict'):
  49. params['merchant_type'] = self.merchant_type.to_alipay_dict()
  50. else:
  51. params['merchant_type'] = self.merchant_type
  52. if self.redirect_url:
  53. if hasattr(self.redirect_url, 'to_alipay_dict'):
  54. params['redirect_url'] = self.redirect_url.to_alipay_dict()
  55. else:
  56. params['redirect_url'] = self.redirect_url
  57. return params
  58. @staticmethod
  59. def from_alipay_dict(d):
  60. if not d:
  61. return None
  62. o = AlipayUserElectronicidOutermerchantbarcodeCreateModel()
  63. if 'barcode_type' in d:
  64. o.barcode_type = d['barcode_type']
  65. if 'expire_time' in d:
  66. o.expire_time = d['expire_time']
  67. if 'merchant_type' in d:
  68. o.merchant_type = d['merchant_type']
  69. if 'redirect_url' in d:
  70. o.redirect_url = d['redirect_url']
  71. return o