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