AlipayDataDataserviceShoppingmallrecVoucherQueryModel.py 2.8 KB

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