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 WorkDetail(object):
def __init__(self):
self._batch_code = None
self._expire_date = None
self._ext_info = None
self._goods_code = None
self._inventory_type = None
self._price = None
self._production_date = None
self._quantity = None
@property
def batch_code(self):
return self._batch_code
@batch_code.setter
def batch_code(self, value):
self._batch_code = value
@property
def expire_date(self):
return self._expire_date
@expire_date.setter
def expire_date(self, value):
self._expire_date = value
@property
def ext_info(self):
return self._ext_info
@ext_info.setter
def ext_info(self, value):
self._ext_info = value
@property
def goods_code(self):
return self._goods_code
@goods_code.setter
def goods_code(self, value):
self._goods_code = value
@property
def inventory_type(self):
return self._inventory_type
@inventory_type.setter
def inventory_type(self, value):
self._inventory_type = value
@property
def price(self):
return self._price
@price.setter
def price(self, value):
self._price = value
@property
def production_date(self):
return self._production_date
@production_date.setter
def production_date(self, value):
self._production_date = value
@property
def quantity(self):
return self._quantity
@quantity.setter
def quantity(self, value):
self._quantity = value
def to_alipay_dict(self):
params = dict()
if self.batch_code:
if hasattr(self.batch_code, 'to_alipay_dict'):
params['batch_code'] = self.batch_code.to_alipay_dict()
else:
params['batch_code'] = self.batch_code
if self.expire_date:
if hasattr(self.expire_date, 'to_alipay_dict'):
params['expire_date'] = self.expire_date.to_alipay_dict()
else:
params['expire_date'] = self.expire_date
if self.ext_info:
if hasattr(self.ext_info, 'to_alipay_dict'):
params['ext_info'] = self.ext_info.to_alipay_dict()
else:
params['ext_info'] = self.ext_info
if self.goods_code:
if hasattr(self.goods_code, 'to_alipay_dict'):
params['goods_code'] = self.goods_code.to_alipay_dict()
else:
params['goods_code'] = self.goods_code
if self.inventory_type:
if hasattr(self.inventory_type, 'to_alipay_dict'):
params['inventory_type'] = self.inventory_type.to_alipay_dict()
else:
params['inventory_type'] = self.inventory_type
if self.price:
if hasattr(self.price, 'to_alipay_dict'):
params['price'] = self.price.to_alipay_dict()
else:
params['price'] = self.price
if self.production_date:
if hasattr(self.production_date, 'to_alipay_dict'):
params['production_date'] = self.production_date.to_alipay_dict()
else:
params['production_date'] = self.production_date
if self.quantity:
if hasattr(self.quantity, 'to_alipay_dict'):
params['quantity'] = self.quantity.to_alipay_dict()
else:
params['quantity'] = self.quantity
return params
@staticmethod
def from_alipay_dict(d):
if not d:
return None
o = WorkDetail()
if 'batch_code' in d:
o.batch_code = d['batch_code']
if 'expire_date' in d:
o.expire_date = d['expire_date']
if 'ext_info' in d:
o.ext_info = d['ext_info']
if 'goods_code' in d:
o.goods_code = d['goods_code']
if 'inventory_type' in d:
o.inventory_type = d['inventory_type']
if 'price' in d:
o.price = d['price']
if 'production_date' in d:
o.production_date = d['production_date']
if 'quantity' in d:
o.quantity = d['quantity']
return o