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 PromoteItemModel(object):
def __init__(self):
self._brand_name = None
self._merchant_name = None
self._voucher_name = None
@property
def brand_name(self):
return self._brand_name
@brand_name.setter
def brand_name(self, value):
self._brand_name = value
@property
def merchant_name(self):
return self._merchant_name
@merchant_name.setter
def merchant_name(self, value):
self._merchant_name = value
@property
def voucher_name(self):
return self._voucher_name
@voucher_name.setter
def voucher_name(self, value):
self._voucher_name = value
def to_alipay_dict(self):
params = dict()
if self.brand_name:
if hasattr(self.brand_name, 'to_alipay_dict'):
params['brand_name'] = self.brand_name.to_alipay_dict()
else:
params['brand_name'] = self.brand_name
if self.merchant_name:
if hasattr(self.merchant_name, 'to_alipay_dict'):
params['merchant_name'] = self.merchant_name.to_alipay_dict()
else:
params['merchant_name'] = self.merchant_name
if self.voucher_name:
if hasattr(self.voucher_name, 'to_alipay_dict'):
params['voucher_name'] = self.voucher_name.to_alipay_dict()
else:
params['voucher_name'] = self.voucher_name
return params
@staticmethod
def from_alipay_dict(d):
if not d:
return None
o = PromoteItemModel()
if 'brand_name' in d:
o.brand_name = d['brand_name']
if 'merchant_name' in d:
o.merchant_name = d['merchant_name']
if 'voucher_name' in d:
o.voucher_name = d['voucher_name']
return o