KoubeiTradeTicketTicketcodeUseModel.py 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiTradeTicketTicketcodeUseModel(object):
  6. def __init__(self):
  7. self._code_type = None
  8. self._gmt_biz = None
  9. self._order_no = None
  10. self._quantity = None
  11. self._request_id = None
  12. self._shop_id = None
  13. self._shop_type = None
  14. self._ticket_code = None
  15. @property
  16. def code_type(self):
  17. return self._code_type
  18. @code_type.setter
  19. def code_type(self, value):
  20. self._code_type = value
  21. @property
  22. def gmt_biz(self):
  23. return self._gmt_biz
  24. @gmt_biz.setter
  25. def gmt_biz(self, value):
  26. self._gmt_biz = value
  27. @property
  28. def order_no(self):
  29. return self._order_no
  30. @order_no.setter
  31. def order_no(self, value):
  32. self._order_no = value
  33. @property
  34. def quantity(self):
  35. return self._quantity
  36. @quantity.setter
  37. def quantity(self, value):
  38. self._quantity = value
  39. @property
  40. def request_id(self):
  41. return self._request_id
  42. @request_id.setter
  43. def request_id(self, value):
  44. self._request_id = value
  45. @property
  46. def shop_id(self):
  47. return self._shop_id
  48. @shop_id.setter
  49. def shop_id(self, value):
  50. self._shop_id = value
  51. @property
  52. def shop_type(self):
  53. return self._shop_type
  54. @shop_type.setter
  55. def shop_type(self, value):
  56. self._shop_type = value
  57. @property
  58. def ticket_code(self):
  59. return self._ticket_code
  60. @ticket_code.setter
  61. def ticket_code(self, value):
  62. self._ticket_code = value
  63. def to_alipay_dict(self):
  64. params = dict()
  65. if self.code_type:
  66. if hasattr(self.code_type, 'to_alipay_dict'):
  67. params['code_type'] = self.code_type.to_alipay_dict()
  68. else:
  69. params['code_type'] = self.code_type
  70. if self.gmt_biz:
  71. if hasattr(self.gmt_biz, 'to_alipay_dict'):
  72. params['gmt_biz'] = self.gmt_biz.to_alipay_dict()
  73. else:
  74. params['gmt_biz'] = self.gmt_biz
  75. if self.order_no:
  76. if hasattr(self.order_no, 'to_alipay_dict'):
  77. params['order_no'] = self.order_no.to_alipay_dict()
  78. else:
  79. params['order_no'] = self.order_no
  80. if self.quantity:
  81. if hasattr(self.quantity, 'to_alipay_dict'):
  82. params['quantity'] = self.quantity.to_alipay_dict()
  83. else:
  84. params['quantity'] = self.quantity
  85. if self.request_id:
  86. if hasattr(self.request_id, 'to_alipay_dict'):
  87. params['request_id'] = self.request_id.to_alipay_dict()
  88. else:
  89. params['request_id'] = self.request_id
  90. if self.shop_id:
  91. if hasattr(self.shop_id, 'to_alipay_dict'):
  92. params['shop_id'] = self.shop_id.to_alipay_dict()
  93. else:
  94. params['shop_id'] = self.shop_id
  95. if self.shop_type:
  96. if hasattr(self.shop_type, 'to_alipay_dict'):
  97. params['shop_type'] = self.shop_type.to_alipay_dict()
  98. else:
  99. params['shop_type'] = self.shop_type
  100. if self.ticket_code:
  101. if hasattr(self.ticket_code, 'to_alipay_dict'):
  102. params['ticket_code'] = self.ticket_code.to_alipay_dict()
  103. else:
  104. params['ticket_code'] = self.ticket_code
  105. return params
  106. @staticmethod
  107. def from_alipay_dict(d):
  108. if not d:
  109. return None
  110. o = KoubeiTradeTicketTicketcodeUseModel()
  111. if 'code_type' in d:
  112. o.code_type = d['code_type']
  113. if 'gmt_biz' in d:
  114. o.gmt_biz = d['gmt_biz']
  115. if 'order_no' in d:
  116. o.order_no = d['order_no']
  117. if 'quantity' in d:
  118. o.quantity = d['quantity']
  119. if 'request_id' in d:
  120. o.request_id = d['request_id']
  121. if 'shop_id' in d:
  122. o.shop_id = d['shop_id']
  123. if 'shop_type' in d:
  124. o.shop_type = d['shop_type']
  125. if 'ticket_code' in d:
  126. o.ticket_code = d['ticket_code']
  127. return o