MybankCreditSceneprodRepayDeputyApplyModel.py 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. from alipay.aop.api.domain.SceneProdDeputyPaymentBillDetail import SceneProdDeputyPaymentBillDetail
  6. class MybankCreditSceneprodRepayDeputyApplyModel(object):
  7. def __init__(self):
  8. self._app_seqno = None
  9. self._bill_list = None
  10. self._drawdown_no = None
  11. self._operation_type = None
  12. self._org_code = None
  13. self._product_code = None
  14. self._site = None
  15. self._site_user_id = None
  16. @property
  17. def app_seqno(self):
  18. return self._app_seqno
  19. @app_seqno.setter
  20. def app_seqno(self, value):
  21. self._app_seqno = value
  22. @property
  23. def bill_list(self):
  24. return self._bill_list
  25. @bill_list.setter
  26. def bill_list(self, value):
  27. if isinstance(value, list):
  28. self._bill_list = list()
  29. for i in value:
  30. if isinstance(i, SceneProdDeputyPaymentBillDetail):
  31. self._bill_list.append(i)
  32. else:
  33. self._bill_list.append(SceneProdDeputyPaymentBillDetail.from_alipay_dict(i))
  34. @property
  35. def drawdown_no(self):
  36. return self._drawdown_no
  37. @drawdown_no.setter
  38. def drawdown_no(self, value):
  39. self._drawdown_no = value
  40. @property
  41. def operation_type(self):
  42. return self._operation_type
  43. @operation_type.setter
  44. def operation_type(self, value):
  45. self._operation_type = value
  46. @property
  47. def org_code(self):
  48. return self._org_code
  49. @org_code.setter
  50. def org_code(self, value):
  51. self._org_code = value
  52. @property
  53. def product_code(self):
  54. return self._product_code
  55. @product_code.setter
  56. def product_code(self, value):
  57. self._product_code = value
  58. @property
  59. def site(self):
  60. return self._site
  61. @site.setter
  62. def site(self, value):
  63. self._site = value
  64. @property
  65. def site_user_id(self):
  66. return self._site_user_id
  67. @site_user_id.setter
  68. def site_user_id(self, value):
  69. self._site_user_id = value
  70. def to_alipay_dict(self):
  71. params = dict()
  72. if self.app_seqno:
  73. if hasattr(self.app_seqno, 'to_alipay_dict'):
  74. params['app_seqno'] = self.app_seqno.to_alipay_dict()
  75. else:
  76. params['app_seqno'] = self.app_seqno
  77. if self.bill_list:
  78. if isinstance(self.bill_list, list):
  79. for i in range(0, len(self.bill_list)):
  80. element = self.bill_list[i]
  81. if hasattr(element, 'to_alipay_dict'):
  82. self.bill_list[i] = element.to_alipay_dict()
  83. if hasattr(self.bill_list, 'to_alipay_dict'):
  84. params['bill_list'] = self.bill_list.to_alipay_dict()
  85. else:
  86. params['bill_list'] = self.bill_list
  87. if self.drawdown_no:
  88. if hasattr(self.drawdown_no, 'to_alipay_dict'):
  89. params['drawdown_no'] = self.drawdown_no.to_alipay_dict()
  90. else:
  91. params['drawdown_no'] = self.drawdown_no
  92. if self.operation_type:
  93. if hasattr(self.operation_type, 'to_alipay_dict'):
  94. params['operation_type'] = self.operation_type.to_alipay_dict()
  95. else:
  96. params['operation_type'] = self.operation_type
  97. if self.org_code:
  98. if hasattr(self.org_code, 'to_alipay_dict'):
  99. params['org_code'] = self.org_code.to_alipay_dict()
  100. else:
  101. params['org_code'] = self.org_code
  102. if self.product_code:
  103. if hasattr(self.product_code, 'to_alipay_dict'):
  104. params['product_code'] = self.product_code.to_alipay_dict()
  105. else:
  106. params['product_code'] = self.product_code
  107. if self.site:
  108. if hasattr(self.site, 'to_alipay_dict'):
  109. params['site'] = self.site.to_alipay_dict()
  110. else:
  111. params['site'] = self.site
  112. if self.site_user_id:
  113. if hasattr(self.site_user_id, 'to_alipay_dict'):
  114. params['site_user_id'] = self.site_user_id.to_alipay_dict()
  115. else:
  116. params['site_user_id'] = self.site_user_id
  117. return params
  118. @staticmethod
  119. def from_alipay_dict(d):
  120. if not d:
  121. return None
  122. o = MybankCreditSceneprodRepayDeputyApplyModel()
  123. if 'app_seqno' in d:
  124. o.app_seqno = d['app_seqno']
  125. if 'bill_list' in d:
  126. o.bill_list = d['bill_list']
  127. if 'drawdown_no' in d:
  128. o.drawdown_no = d['drawdown_no']
  129. if 'operation_type' in d:
  130. o.operation_type = d['operation_type']
  131. if 'org_code' in d:
  132. o.org_code = d['org_code']
  133. if 'product_code' in d:
  134. o.product_code = d['product_code']
  135. if 'site' in d:
  136. o.site = d['site']
  137. if 'site_user_id' in d:
  138. o.site_user_id = d['site_user_id']
  139. return o