# -*- 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, customerNum, attachNum, 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): """ 获取附件信息 """