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