12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import json
- from alipay.aop.api.constant.ParamConstants import *
- class CloudbusTransitItem(object):
- def __init__(self):
- self._month = None
- self._type = None
- self._url = None
- @property
- def month(self):
- return self._month
- @month.setter
- def month(self, value):
- self._month = value
- @property
- def type(self):
- return self._type
- @type.setter
- def type(self, value):
- self._type = value
- @property
- def url(self):
- return self._url
- @url.setter
- def url(self, value):
- self._url = value
- def to_alipay_dict(self):
- params = dict()
- if self.month:
- if hasattr(self.month, 'to_alipay_dict'):
- params['month'] = self.month.to_alipay_dict()
- else:
- params['month'] = self.month
- if self.type:
- if hasattr(self.type, 'to_alipay_dict'):
- params['type'] = self.type.to_alipay_dict()
- else:
- params['type'] = self.type
- if self.url:
- if hasattr(self.url, 'to_alipay_dict'):
- params['url'] = self.url.to_alipay_dict()
- else:
- params['url'] = self.url
- return params
- @staticmethod
- def from_alipay_dict(d):
- if not d:
- return None
- o = CloudbusTransitItem()
- if 'month' in d:
- o.month = d['month']
- if 'type' in d:
- o.type = d['type']
- if 'url' in d:
- o.url = d['url']
- return o
|