AlipayMerchantOrderDigestUnlimitedBatchqueryModel.py 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayMerchantOrderDigestUnlimitedBatchqueryModel(object):
  6. def __init__(self):
  7. self._buyer_id = None
  8. self._end_time = None
  9. self._merchant_app_id = None
  10. self._merchant_user_id = None
  11. self._order_source = None
  12. self._size = None
  13. self._start_time = None
  14. @property
  15. def buyer_id(self):
  16. return self._buyer_id
  17. @buyer_id.setter
  18. def buyer_id(self, value):
  19. self._buyer_id = value
  20. @property
  21. def end_time(self):
  22. return self._end_time
  23. @end_time.setter
  24. def end_time(self, value):
  25. self._end_time = value
  26. @property
  27. def merchant_app_id(self):
  28. return self._merchant_app_id
  29. @merchant_app_id.setter
  30. def merchant_app_id(self, value):
  31. self._merchant_app_id = value
  32. @property
  33. def merchant_user_id(self):
  34. return self._merchant_user_id
  35. @merchant_user_id.setter
  36. def merchant_user_id(self, value):
  37. self._merchant_user_id = value
  38. @property
  39. def order_source(self):
  40. return self._order_source
  41. @order_source.setter
  42. def order_source(self, value):
  43. self._order_source = value
  44. @property
  45. def size(self):
  46. return self._size
  47. @size.setter
  48. def size(self, value):
  49. self._size = value
  50. @property
  51. def start_time(self):
  52. return self._start_time
  53. @start_time.setter
  54. def start_time(self, value):
  55. self._start_time = value
  56. def to_alipay_dict(self):
  57. params = dict()
  58. if self.buyer_id:
  59. if hasattr(self.buyer_id, 'to_alipay_dict'):
  60. params['buyer_id'] = self.buyer_id.to_alipay_dict()
  61. else:
  62. params['buyer_id'] = self.buyer_id
  63. if self.end_time:
  64. if hasattr(self.end_time, 'to_alipay_dict'):
  65. params['end_time'] = self.end_time.to_alipay_dict()
  66. else:
  67. params['end_time'] = self.end_time
  68. if self.merchant_app_id:
  69. if hasattr(self.merchant_app_id, 'to_alipay_dict'):
  70. params['merchant_app_id'] = self.merchant_app_id.to_alipay_dict()
  71. else:
  72. params['merchant_app_id'] = self.merchant_app_id
  73. if self.merchant_user_id:
  74. if hasattr(self.merchant_user_id, 'to_alipay_dict'):
  75. params['merchant_user_id'] = self.merchant_user_id.to_alipay_dict()
  76. else:
  77. params['merchant_user_id'] = self.merchant_user_id
  78. if self.order_source:
  79. if hasattr(self.order_source, 'to_alipay_dict'):
  80. params['order_source'] = self.order_source.to_alipay_dict()
  81. else:
  82. params['order_source'] = self.order_source
  83. if self.size:
  84. if hasattr(self.size, 'to_alipay_dict'):
  85. params['size'] = self.size.to_alipay_dict()
  86. else:
  87. params['size'] = self.size
  88. if self.start_time:
  89. if hasattr(self.start_time, 'to_alipay_dict'):
  90. params['start_time'] = self.start_time.to_alipay_dict()
  91. else:
  92. params['start_time'] = self.start_time
  93. return params
  94. @staticmethod
  95. def from_alipay_dict(d):
  96. if not d:
  97. return None
  98. o = AlipayMerchantOrderDigestUnlimitedBatchqueryModel()
  99. if 'buyer_id' in d:
  100. o.buyer_id = d['buyer_id']
  101. if 'end_time' in d:
  102. o.end_time = d['end_time']
  103. if 'merchant_app_id' in d:
  104. o.merchant_app_id = d['merchant_app_id']
  105. if 'merchant_user_id' in d:
  106. o.merchant_user_id = d['merchant_user_id']
  107. if 'order_source' in d:
  108. o.order_source = d['order_source']
  109. if 'size' in d:
  110. o.size = d['size']
  111. if 'start_time' in d:
  112. o.start_time = d['start_time']
  113. return o