AlipayUserAgreementUnsignModel.py 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayUserAgreementUnsignModel(object):
  6. def __init__(self):
  7. self._agreement_no = None
  8. self._alipay_logon_id = None
  9. self._alipay_user_id = None
  10. self._extend_params = None
  11. self._external_agreement_no = None
  12. self._operate_type = None
  13. self._personal_product_code = None
  14. self._sign_scene = None
  15. self._third_party_type = None
  16. @property
  17. def agreement_no(self):
  18. return self._agreement_no
  19. @agreement_no.setter
  20. def agreement_no(self, value):
  21. self._agreement_no = value
  22. @property
  23. def alipay_logon_id(self):
  24. return self._alipay_logon_id
  25. @alipay_logon_id.setter
  26. def alipay_logon_id(self, value):
  27. self._alipay_logon_id = value
  28. @property
  29. def alipay_user_id(self):
  30. return self._alipay_user_id
  31. @alipay_user_id.setter
  32. def alipay_user_id(self, value):
  33. self._alipay_user_id = value
  34. @property
  35. def extend_params(self):
  36. return self._extend_params
  37. @extend_params.setter
  38. def extend_params(self, value):
  39. self._extend_params = value
  40. @property
  41. def external_agreement_no(self):
  42. return self._external_agreement_no
  43. @external_agreement_no.setter
  44. def external_agreement_no(self, value):
  45. self._external_agreement_no = value
  46. @property
  47. def operate_type(self):
  48. return self._operate_type
  49. @operate_type.setter
  50. def operate_type(self, value):
  51. self._operate_type = value
  52. @property
  53. def personal_product_code(self):
  54. return self._personal_product_code
  55. @personal_product_code.setter
  56. def personal_product_code(self, value):
  57. self._personal_product_code = value
  58. @property
  59. def sign_scene(self):
  60. return self._sign_scene
  61. @sign_scene.setter
  62. def sign_scene(self, value):
  63. self._sign_scene = value
  64. @property
  65. def third_party_type(self):
  66. return self._third_party_type
  67. @third_party_type.setter
  68. def third_party_type(self, value):
  69. self._third_party_type = value
  70. def to_alipay_dict(self):
  71. params = dict()
  72. if self.agreement_no:
  73. if hasattr(self.agreement_no, 'to_alipay_dict'):
  74. params['agreement_no'] = self.agreement_no.to_alipay_dict()
  75. else:
  76. params['agreement_no'] = self.agreement_no
  77. if self.alipay_logon_id:
  78. if hasattr(self.alipay_logon_id, 'to_alipay_dict'):
  79. params['alipay_logon_id'] = self.alipay_logon_id.to_alipay_dict()
  80. else:
  81. params['alipay_logon_id'] = self.alipay_logon_id
  82. if self.alipay_user_id:
  83. if hasattr(self.alipay_user_id, 'to_alipay_dict'):
  84. params['alipay_user_id'] = self.alipay_user_id.to_alipay_dict()
  85. else:
  86. params['alipay_user_id'] = self.alipay_user_id
  87. if self.extend_params:
  88. if hasattr(self.extend_params, 'to_alipay_dict'):
  89. params['extend_params'] = self.extend_params.to_alipay_dict()
  90. else:
  91. params['extend_params'] = self.extend_params
  92. if self.external_agreement_no:
  93. if hasattr(self.external_agreement_no, 'to_alipay_dict'):
  94. params['external_agreement_no'] = self.external_agreement_no.to_alipay_dict()
  95. else:
  96. params['external_agreement_no'] = self.external_agreement_no
  97. if self.operate_type:
  98. if hasattr(self.operate_type, 'to_alipay_dict'):
  99. params['operate_type'] = self.operate_type.to_alipay_dict()
  100. else:
  101. params['operate_type'] = self.operate_type
  102. if self.personal_product_code:
  103. if hasattr(self.personal_product_code, 'to_alipay_dict'):
  104. params['personal_product_code'] = self.personal_product_code.to_alipay_dict()
  105. else:
  106. params['personal_product_code'] = self.personal_product_code
  107. if self.sign_scene:
  108. if hasattr(self.sign_scene, 'to_alipay_dict'):
  109. params['sign_scene'] = self.sign_scene.to_alipay_dict()
  110. else:
  111. params['sign_scene'] = self.sign_scene
  112. if self.third_party_type:
  113. if hasattr(self.third_party_type, 'to_alipay_dict'):
  114. params['third_party_type'] = self.third_party_type.to_alipay_dict()
  115. else:
  116. params['third_party_type'] = self.third_party_type
  117. return params
  118. @staticmethod
  119. def from_alipay_dict(d):
  120. if not d:
  121. return None
  122. o = AlipayUserAgreementUnsignModel()
  123. if 'agreement_no' in d:
  124. o.agreement_no = d['agreement_no']
  125. if 'alipay_logon_id' in d:
  126. o.alipay_logon_id = d['alipay_logon_id']
  127. if 'alipay_user_id' in d:
  128. o.alipay_user_id = d['alipay_user_id']
  129. if 'extend_params' in d:
  130. o.extend_params = d['extend_params']
  131. if 'external_agreement_no' in d:
  132. o.external_agreement_no = d['external_agreement_no']
  133. if 'operate_type' in d:
  134. o.operate_type = d['operate_type']
  135. if 'personal_product_code' in d:
  136. o.personal_product_code = d['personal_product_code']
  137. if 'sign_scene' in d:
  138. o.sign_scene = d['sign_scene']
  139. if 'third_party_type' in d:
  140. o.third_party_type = d['third_party_type']
  141. return o