123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import json
- from alipay.aop.api.constant.ParamConstants import *
- class VoucherInfoDetail(object):
- def __init__(self):
- self._description = None
- self._expired_time = None
- self._id = None
- self._name = None
- self._status = None
- self._valid_time = None
- self._value = None
- @property
- def description(self):
- return self._description
- @description.setter
- def description(self, value):
- self._description = value
- @property
- def expired_time(self):
- return self._expired_time
- @expired_time.setter
- def expired_time(self, value):
- self._expired_time = value
- @property
- def id(self):
- return self._id
- @id.setter
- def id(self, value):
- self._id = value
- @property
- def name(self):
- return self._name
- @name.setter
- def name(self, value):
- self._name = value
- @property
- def status(self):
- return self._status
- @status.setter
- def status(self, value):
- self._status = value
- @property
- def valid_time(self):
- return self._valid_time
- @valid_time.setter
- def valid_time(self, value):
- self._valid_time = value
- @property
- def value(self):
- return self._value
- @value.setter
- def value(self, value):
- self._value = value
- def to_alipay_dict(self):
- params = dict()
- if self.description:
- if hasattr(self.description, 'to_alipay_dict'):
- params['description'] = self.description.to_alipay_dict()
- else:
- params['description'] = self.description
- if self.expired_time:
- if hasattr(self.expired_time, 'to_alipay_dict'):
- params['expired_time'] = self.expired_time.to_alipay_dict()
- else:
- params['expired_time'] = self.expired_time
- if self.id:
- if hasattr(self.id, 'to_alipay_dict'):
- params['id'] = self.id.to_alipay_dict()
- else:
- params['id'] = self.id
- if self.name:
- if hasattr(self.name, 'to_alipay_dict'):
- params['name'] = self.name.to_alipay_dict()
- else:
- params['name'] = self.name
- if self.status:
- if hasattr(self.status, 'to_alipay_dict'):
- params['status'] = self.status.to_alipay_dict()
- else:
- params['status'] = self.status
- if self.valid_time:
- if hasattr(self.valid_time, 'to_alipay_dict'):
- params['valid_time'] = self.valid_time.to_alipay_dict()
- else:
- params['valid_time'] = self.valid_time
- if self.value:
- if hasattr(self.value, 'to_alipay_dict'):
- params['value'] = self.value.to_alipay_dict()
- else:
- params['value'] = self.value
- return params
- @staticmethod
- def from_alipay_dict(d):
- if not d:
- return None
- o = VoucherInfoDetail()
- if 'description' in d:
- o.description = d['description']
- if 'expired_time' in d:
- o.expired_time = d['expired_time']
- if 'id' in d:
- o.id = d['id']
- if 'name' in d:
- o.name = d['name']
- if 'status' in d:
- o.status = d['status']
- if 'valid_time' in d:
- o.valid_time = d['valid_time']
- if 'value' in d:
- o.value = d['value']
- return o
|