AlipayEcoLogisticsExpressPriceQueryModel.py 3.0 KB

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