1234567891011121314151617181920212223242526272829303132333435363738394041 |
- # -*- coding: utf-8 -*-
- # !/usr/bin/env python
- from library.jdopen.client.api.base import BaseJdOpenAPI
- class JdOpenAttach(BaseJdOpenAPI):
- def upload_attach(self, customerNum, attachType, content):
- """
- 上传附件
- """
- url = "/v2/agent/declare/attach/upload"
- data = {
- "customerNum": customerNum,
- "attachType": attachType,
- "file": content
- }
- return self._post(url, data=data)
- def modify_attach(self, attachNum, customerNum, attachType, content):
- """
- 修改附件
- """
- url = "/v1/agent/declare/attach/modify"
- data = {
- "attachNum": attachNum,
- "customerNum": customerNum,
- "attachType": attachType,
- "file": content
- }
- return self._post(url, data=data)
- def get_attach(self, attachNum):
- """
- 获取附件信息
- """
|