12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import json
- from alipay.aop.api.constant.ParamConstants import *
- class AlipayEbppInvoiceFileOutputQueryModel(object):
- def __init__(self):
- self._invoice_code = None
- self._invoice_no = None
- self._scene = None
- self._user_id = None
- @property
- def invoice_code(self):
- return self._invoice_code
- @invoice_code.setter
- def invoice_code(self, value):
- self._invoice_code = value
- @property
- def invoice_no(self):
- return self._invoice_no
- @invoice_no.setter
- def invoice_no(self, value):
- self._invoice_no = value
- @property
- def scene(self):
- return self._scene
- @scene.setter
- def scene(self, value):
- self._scene = value
- @property
- def user_id(self):
- return self._user_id
- @user_id.setter
- def user_id(self, value):
- self._user_id = value
- def to_alipay_dict(self):
- params = dict()
- if self.invoice_code:
- if hasattr(self.invoice_code, 'to_alipay_dict'):
- params['invoice_code'] = self.invoice_code.to_alipay_dict()
- else:
- params['invoice_code'] = self.invoice_code
- if self.invoice_no:
- if hasattr(self.invoice_no, 'to_alipay_dict'):
- params['invoice_no'] = self.invoice_no.to_alipay_dict()
- else:
- params['invoice_no'] = self.invoice_no
- if self.scene:
- if hasattr(self.scene, 'to_alipay_dict'):
- params['scene'] = self.scene.to_alipay_dict()
- else:
- params['scene'] = self.scene
- if self.user_id:
- if hasattr(self.user_id, 'to_alipay_dict'):
- params['user_id'] = self.user_id.to_alipay_dict()
- else:
- params['user_id'] = self.user_id
- return params
- @staticmethod
- def from_alipay_dict(d):
- if not d:
- return None
- o = AlipayEbppInvoiceFileOutputQueryModel()
- if 'invoice_code' in d:
- o.invoice_code = d['invoice_code']
- if 'invoice_no' in d:
- o.invoice_no = d['invoice_no']
- if 'scene' in d:
- o.scene = d['scene']
- if 'user_id' in d:
- o.user_id = d['user_id']
- return o
|