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