AlipayFundTransBatchCreatesinglebatchModel.py 4.7 KB

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