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