KoubeiTradeOrderAggregatePayResponse.py 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. from alipay.aop.api.domain.DiscountDetailInfo import DiscountDetailInfo
  6. class KoubeiTradeOrderAggregatePayResponse(AlipayResponse):
  7. def __init__(self):
  8. super(KoubeiTradeOrderAggregatePayResponse, self).__init__()
  9. self._buyer_id = None
  10. self._buyer_id_type = None
  11. self._buyer_pay_amount = None
  12. self._create_time = None
  13. self._discount_detail_list = None
  14. self._gmt_payment_time = None
  15. self._merchant_discount_amount = None
  16. self._order_no = None
  17. self._order_status = None
  18. self._out_order_no = None
  19. self._pay_channel = None
  20. self._platform_discount_amount = None
  21. self._receipt_amount = None
  22. self._total_amount = None
  23. self._trade_no = None
  24. @property
  25. def buyer_id(self):
  26. return self._buyer_id
  27. @buyer_id.setter
  28. def buyer_id(self, value):
  29. self._buyer_id = value
  30. @property
  31. def buyer_id_type(self):
  32. return self._buyer_id_type
  33. @buyer_id_type.setter
  34. def buyer_id_type(self, value):
  35. self._buyer_id_type = value
  36. @property
  37. def buyer_pay_amount(self):
  38. return self._buyer_pay_amount
  39. @buyer_pay_amount.setter
  40. def buyer_pay_amount(self, value):
  41. self._buyer_pay_amount = value
  42. @property
  43. def create_time(self):
  44. return self._create_time
  45. @create_time.setter
  46. def create_time(self, value):
  47. self._create_time = value
  48. @property
  49. def discount_detail_list(self):
  50. return self._discount_detail_list
  51. @discount_detail_list.setter
  52. def discount_detail_list(self, value):
  53. if isinstance(value, list):
  54. self._discount_detail_list = list()
  55. for i in value:
  56. if isinstance(i, DiscountDetailInfo):
  57. self._discount_detail_list.append(i)
  58. else:
  59. self._discount_detail_list.append(DiscountDetailInfo.from_alipay_dict(i))
  60. @property
  61. def gmt_payment_time(self):
  62. return self._gmt_payment_time
  63. @gmt_payment_time.setter
  64. def gmt_payment_time(self, value):
  65. self._gmt_payment_time = value
  66. @property
  67. def merchant_discount_amount(self):
  68. return self._merchant_discount_amount
  69. @merchant_discount_amount.setter
  70. def merchant_discount_amount(self, value):
  71. self._merchant_discount_amount = value
  72. @property
  73. def order_no(self):
  74. return self._order_no
  75. @order_no.setter
  76. def order_no(self, value):
  77. self._order_no = value
  78. @property
  79. def order_status(self):
  80. return self._order_status
  81. @order_status.setter
  82. def order_status(self, value):
  83. self._order_status = value
  84. @property
  85. def out_order_no(self):
  86. return self._out_order_no
  87. @out_order_no.setter
  88. def out_order_no(self, value):
  89. self._out_order_no = value
  90. @property
  91. def pay_channel(self):
  92. return self._pay_channel
  93. @pay_channel.setter
  94. def pay_channel(self, value):
  95. self._pay_channel = value
  96. @property
  97. def platform_discount_amount(self):
  98. return self._platform_discount_amount
  99. @platform_discount_amount.setter
  100. def platform_discount_amount(self, value):
  101. self._platform_discount_amount = value
  102. @property
  103. def receipt_amount(self):
  104. return self._receipt_amount
  105. @receipt_amount.setter
  106. def receipt_amount(self, value):
  107. self._receipt_amount = value
  108. @property
  109. def total_amount(self):
  110. return self._total_amount
  111. @total_amount.setter
  112. def total_amount(self, value):
  113. self._total_amount = value
  114. @property
  115. def trade_no(self):
  116. return self._trade_no
  117. @trade_no.setter
  118. def trade_no(self, value):
  119. self._trade_no = value
  120. def parse_response_content(self, response_content):
  121. response = super(KoubeiTradeOrderAggregatePayResponse, self).parse_response_content(response_content)
  122. if 'buyer_id' in response:
  123. self.buyer_id = response['buyer_id']
  124. if 'buyer_id_type' in response:
  125. self.buyer_id_type = response['buyer_id_type']
  126. if 'buyer_pay_amount' in response:
  127. self.buyer_pay_amount = response['buyer_pay_amount']
  128. if 'create_time' in response:
  129. self.create_time = response['create_time']
  130. if 'discount_detail_list' in response:
  131. self.discount_detail_list = response['discount_detail_list']
  132. if 'gmt_payment_time' in response:
  133. self.gmt_payment_time = response['gmt_payment_time']
  134. if 'merchant_discount_amount' in response:
  135. self.merchant_discount_amount = response['merchant_discount_amount']
  136. if 'order_no' in response:
  137. self.order_no = response['order_no']
  138. if 'order_status' in response:
  139. self.order_status = response['order_status']
  140. if 'out_order_no' in response:
  141. self.out_order_no = response['out_order_no']
  142. if 'pay_channel' in response:
  143. self.pay_channel = response['pay_channel']
  144. if 'platform_discount_amount' in response:
  145. self.platform_discount_amount = response['platform_discount_amount']
  146. if 'receipt_amount' in response:
  147. self.receipt_amount = response['receipt_amount']
  148. if 'total_amount' in response:
  149. self.total_amount = response['total_amount']
  150. if 'trade_no' in response:
  151. self.trade_no = response['trade_no']