ZhimaCreditEpSceneTradeConsultModel.py 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class ZhimaCreditEpSceneTradeConsultModel(object):
  6. def __init__(self):
  7. self._apply_amount = None
  8. self._biz_ext_param = None
  9. self._customer_rating_no = None
  10. self._out_order_no = None
  11. self._product_code = None
  12. @property
  13. def apply_amount(self):
  14. return self._apply_amount
  15. @apply_amount.setter
  16. def apply_amount(self, value):
  17. self._apply_amount = value
  18. @property
  19. def biz_ext_param(self):
  20. return self._biz_ext_param
  21. @biz_ext_param.setter
  22. def biz_ext_param(self, value):
  23. self._biz_ext_param = value
  24. @property
  25. def customer_rating_no(self):
  26. return self._customer_rating_no
  27. @customer_rating_no.setter
  28. def customer_rating_no(self, value):
  29. self._customer_rating_no = value
  30. @property
  31. def out_order_no(self):
  32. return self._out_order_no
  33. @out_order_no.setter
  34. def out_order_no(self, value):
  35. self._out_order_no = value
  36. @property
  37. def product_code(self):
  38. return self._product_code
  39. @product_code.setter
  40. def product_code(self, value):
  41. self._product_code = value
  42. def to_alipay_dict(self):
  43. params = dict()
  44. if self.apply_amount:
  45. if hasattr(self.apply_amount, 'to_alipay_dict'):
  46. params['apply_amount'] = self.apply_amount.to_alipay_dict()
  47. else:
  48. params['apply_amount'] = self.apply_amount
  49. if self.biz_ext_param:
  50. if hasattr(self.biz_ext_param, 'to_alipay_dict'):
  51. params['biz_ext_param'] = self.biz_ext_param.to_alipay_dict()
  52. else:
  53. params['biz_ext_param'] = self.biz_ext_param
  54. if self.customer_rating_no:
  55. if hasattr(self.customer_rating_no, 'to_alipay_dict'):
  56. params['customer_rating_no'] = self.customer_rating_no.to_alipay_dict()
  57. else:
  58. params['customer_rating_no'] = self.customer_rating_no
  59. if self.out_order_no:
  60. if hasattr(self.out_order_no, 'to_alipay_dict'):
  61. params['out_order_no'] = self.out_order_no.to_alipay_dict()
  62. else:
  63. params['out_order_no'] = self.out_order_no
  64. if self.product_code:
  65. if hasattr(self.product_code, 'to_alipay_dict'):
  66. params['product_code'] = self.product_code.to_alipay_dict()
  67. else:
  68. params['product_code'] = self.product_code
  69. return params
  70. @staticmethod
  71. def from_alipay_dict(d):
  72. if not d:
  73. return None
  74. o = ZhimaCreditEpSceneTradeConsultModel()
  75. if 'apply_amount' in d:
  76. o.apply_amount = d['apply_amount']
  77. if 'biz_ext_param' in d:
  78. o.biz_ext_param = d['biz_ext_param']
  79. if 'customer_rating_no' in d:
  80. o.customer_rating_no = d['customer_rating_no']
  81. if 'out_order_no' in d:
  82. o.out_order_no = d['out_order_no']
  83. if 'product_code' in d:
  84. o.product_code = d['product_code']
  85. return o