for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from wechatpy.client.api.base import BaseWeChatAPI
class MerchantGroup(BaseWeChatAPI):
def add(self, name, product_list):
return self._post(
'merchant/group/add',
data={
'group_detail': {
'group_name': name,
'product_list': product_list
}
)
def delete(self, group_id):
'merchant/group/del',
'group_id': group_id
def update(self, group_id, name):
'merchant/group/propertymod',
'group_id': group_id,
'group_name': name
def update_product(self, group_id, product):
'merchant/group/productmod',
'product': product
def get_all(self):
res = self._get(
'merchant/group/getall',
result_processor=lambda x: x['group_detail']
return res
def get(self, group_id):
res = self._post(
'merchant/group/getbyid',
},