Total Complexity | 2 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Coverage | 60% |
1 | # -*- coding: utf-8 -*- |
||
6 | 10 | class MerchantStock(BaseWeChatAPI): |
|
7 | |||
8 | 10 | def add(self, product_id, quantity, sku_info=''): |
|
9 | return self._post( |
||
10 | 'merchant/stock/add', |
||
11 | data={ |
||
12 | 'product_id': product_id, |
||
13 | 'quantity': quantity, |
||
14 | 'sku_info': sku_info |
||
15 | } |
||
16 | ) |
||
17 | |||
18 | 10 | def reduce(self, product_id, quantity, sku_info=''): |
|
19 | return self._post( |
||
20 | 'merchant/stock/reduce', |
||
21 | data={ |
||
22 | 'product_id': product_id, |
||
23 | 'quantity': quantity, |
||
24 | 'sku_info': sku_info |
||
25 | } |
||
27 |