Repository URL to install this package:
|
Version:
3.3.202-c2ee258 ▾
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AuthInfo(object):
def __init__(self):
self._auth_code = None
self._auth_type = None
@property
def auth_code(self):
return self._auth_code
@auth_code.setter
def auth_code(self, value):
self._auth_code = value
@property
def auth_type(self):
return self._auth_type
@auth_type.setter
def auth_type(self, value):
self._auth_type = value
def to_alipay_dict(self):
params = dict()
if self.auth_code:
if hasattr(self.auth_code, 'to_alipay_dict'):
params['auth_code'] = self.auth_code.to_alipay_dict()
else:
params['auth_code'] = self.auth_code
if self.auth_type:
if hasattr(self.auth_type, 'to_alipay_dict'):
params['auth_type'] = self.auth_type.to_alipay_dict()
else:
params['auth_type'] = self.auth_type
return params
@staticmethod
def from_alipay_dict(d):
if not d:
return None
o = AuthInfo()
if 'auth_code' in d:
o.auth_code = d['auth_code']
if 'auth_type' in d:
o.auth_type = d['auth_type']
return o