Documentation ¶
Overview ¶
金融服务
消息服务
订单服务
签约服务
商品服务
店铺服务
商户服务
Index ¶
- func APIInterface(config *Config, strAction string, params map[string]interface{}) (interface{}, error)
- type APIClient
- type APIError
- type ApiBody
- type Category
- func (category *Category) CreateCategory(shopId_ int64, name_ string, description_ string) (interface{}, error)
- func (category *Category) CreateCategoryWithChildren(shopId_ int64, name_ string, parentId_ int64, description_ string) (interface{}, error)
- func (category *Category) GetBackCategory(shopId_ int64) (interface{}, error)
- func (category *Category) GetCategory(categoryId_ int64) (interface{}, error)
- func (category *Category) GetCategoryWithChildren(categoryId_ int64) (interface{}, error)
- func (category *Category) GetShopCategories(shopId_ int64) (interface{}, error)
- func (category *Category) GetShopCategoriesWithChildren(shopId_ int64) (interface{}, error)
- func (category *Category) RemoveCategory(categoryId_ int64) (interface{}, error)
- func (category *Category) SetCategoryPositions(shopId_ int64, categoryIds_ interface{}) (interface{}, error)
- func (category *Category) SetCategoryPositionsWithChildren(shopId_ int64, categoryWithChildrenIds_ interface{}) (interface{}, error)
- func (category *Category) UpdateCategory(categoryId_ int64, name_ string, description_ string) (interface{}, error)
- func (category *Category) UpdateCategoryWithChildren(categoryId_ int64, name_ string, parentId_ int64, description_ string) (interface{}, error)
- type Config
- type ElemeSdkLogger
- type File
- type Finance
- func (finance *Finance) GetOrder(shopId_ int64, orderId_ string) (interface{}, error)
- func (finance *Finance) QueryBalance(shopId_ int) (interface{}, error)
- func (finance *Finance) QueryBalanceLog(request_ interface{}) (interface{}, error)
- func (finance *Finance) QueryBranchBills(shopId_ int64, query_ interface{}) (interface{}, error)
- func (finance *Finance) QueryBranchOrders(shopId_ int64, query_ interface{}) (interface{}, error)
- func (finance *Finance) QueryHeadBills(shopId_ int64, query_ interface{}) (interface{}, error)
- func (finance *Finance) QueryHeadOrders(shopId_ int64, query_ interface{}) (interface{}, error)
- type Item
- func (item *Item) BatchClearStock(specIds_ interface{}) (interface{}, error)
- func (item *Item) BatchCreateItems(categoryId_ int64, items_ interface{}) (interface{}, error)
- func (item *Item) BatchFillStock(specIds_ interface{}) (interface{}, error)
- func (item *Item) BatchGetItems(itemIds_ interface{}) (interface{}, error)
- func (item *Item) BatchOffShelf(specIds_ interface{}) (interface{}, error)
- func (item *Item) BatchOnShelf(specIds_ interface{}) (interface{}, error)
- func (item *Item) BatchRemoveItems(itemIds_ interface{}) (interface{}, error)
- func (item *Item) BatchUpdatePrices(shopId_ int64, specPrices_ interface{}) (interface{}, error)
- func (item *Item) BatchUpdateSpecStocks(specStocks_ interface{}) (interface{}, error)
- func (item *Item) ClearAndTimingMaxStock(clearStocks_ interface{}) (interface{}, error)
- func (item *Item) CreateItem(categoryId_ int64, properties_ interface{}) (interface{}, error)
- func (item *Item) GetItem(itemId_ int64) (interface{}, error)
- func (item *Item) GetItemByShopIdAndExtendCode(shopId_ int64, extendCode_ string) (interface{}, error)
- func (item *Item) GetItemIdsHasActivityByShopId(shopId_ int64) (interface{}, error)
- func (item *Item) GetItemsByCategoryId(categoryId_ int64) (interface{}, error)
- func (item *Item) GetItemsByShopIdAndBarCode(shopId_ int64, barCode_ string) (interface{}, error)
- func (item *Item) RemoveItem(itemId_ int64) (interface{}, error)
- func (item *Item) SetItemPositions(categoryId_ int64, itemIds_ interface{}) (interface{}, error)
- func (item *Item) UpdateItem(itemId_ int64, categoryId_ int64, properties_ interface{}) (interface{}, error)
- type Message
- type OAuthClient
- func (oauth *OAuthClient) GenerateAuthUrl(state string, scope string, redirectUri string) string
- func (oauth *OAuthClient) GetClientToken() Token
- func (oauth *OAuthClient) GetTokenByAuthCode(code string, redirectURL string) Token
- func (oauth *OAuthClient) GetTokenByRefreshToken(refreshToken string, scope string) Token
- func (oauth *OAuthClient) SetConfig(conf Config)
- type Order
- func (order *Order) AgreeRefund(orderId_ string) (interface{}, error)
- func (order *Order) AgreeRefundLite(orderId_ string) (interface{}, error)
- func (order *Order) BatchGetDeliveryStates(orderIds_ interface{}) (interface{}, error)
- func (order *Order) CallDelivery(orderId_ string, fee_ int) (interface{}, error)
- func (order *Order) CancelDelivery(orderId_ string) (interface{}, error)
- func (order *Order) CancelOrder(orderId_ string, type_ interface{}, remark_ string) (interface{}, error)
- func (order *Order) CancelOrderLite(orderId_ string, type_ interface{}, remark_ string) (interface{}, error)
- func (order *Order) ConfirmOrder(orderId_ string) (interface{}, error)
- func (order *Order) ConfirmOrderLite(orderId_ string) (interface{}, error)
- func (order *Order) DeliveryBySelf(orderId_ string) (interface{}, error)
- func (order *Order) DeliveryBySelfLite(orderId_ string) (interface{}, error)
- func (order *Order) DisagreeRefund(orderId_ string, reason_ string) (interface{}, error)
- func (order *Order) DisagreeRefundLite(orderId_ string, reason_ string) (interface{}, error)
- func (order *Order) GetAllOrders(shopId_ int64, pageNo_ int, pageSize_ int, date_ string) (interface{}, error)
- func (order *Order) GetCancelOrders(shopId_ int64) (interface{}, error)
- func (order *Order) GetCommodities(orderId_ string) (interface{}, error)
- func (order *Order) GetDeliveryStateRecord(orderId_ string) (interface{}, error)
- func (order *Order) GetOrder(orderId_ string) (interface{}, error)
- func (order *Order) GetRefundOrder(orderId_ string) (interface{}, error)
- func (order *Order) GetRefundOrders(shopId_ int64) (interface{}, error)
- func (order *Order) GetUnprocessOrders(shopId_ int64) (interface{}, error)
- func (order *Order) GetUnreplyReminders(shopId_ int64) (interface{}, error)
- func (order *Order) MgetCommodities(orderIds_ interface{}) (interface{}, error)
- func (order *Order) MgetOrders(orderIds_ interface{}) (interface{}, error)
- func (order *Order) MgetRefundOrders(orderIds_ interface{}) (interface{}, error)
- func (order *Order) NoMoreDelivery(orderId_ string) (interface{}, error)
- func (order *Order) NoMoreDeliveryLite(orderId_ string) (interface{}, error)
- func (order *Order) ReceivedOrder(orderId_ string) (interface{}, error)
- func (order *Order) ReceivedOrderLite(orderId_ string) (interface{}, error)
- func (order *Order) ReplyReminder(remindId_ string, type_ interface{}, content_ string) (interface{}, error)
- type Packs
- type Product
- type Shop
- func (shop *Shop) GetShop(shopId_ int64) (interface{}, error)
- func (shop *Shop) MgetShopStatus(shopIds_ interface{}) (interface{}, error)
- func (shop *Shop) SetDeliveryTime(shopId_ int64, deliveryBasicMins_ int, deliveryAdjustMins_ int) (interface{}, error)
- func (shop *Shop) SetOnlineRefund(shopId_ int64, enable_ bool) (interface{}, error)
- func (shop *Shop) UpdateShop(shopId_ int64, properties_ interface{}) (interface{}, error)
- type SimpleLogger
- type Token
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIClient ¶
type APIError ¶
type ApiBody ¶
type Category ¶
type Category struct {
// contains filtered or unexported fields
}
func (*Category) CreateCategory ¶
func (category *Category) CreateCategory(shopId_ int64, name_ string, description_ string) (interface{}, error)
添加商品分类 shopId 店铺Id name 商品分类名称,长度需在50字以内 description 商品分类描述,长度需在50字以内
func (*Category) CreateCategoryWithChildren ¶ added in v1.9.0
func (category *Category) CreateCategoryWithChildren(shopId_ int64, name_ string, parentId_ int64, description_ string) (interface{}, error)
添加商品分类,支持二级分类 shopId 店铺Id name 商品分类名称,长度需在50字以内 parentId 父分类ID,如果没有可以填0 description 商品分类描述,长度需在50字以内
func (*Category) GetBackCategory ¶ added in v1.9.0
查询商品后台类目 shopId 店铺Id
func (*Category) GetCategory ¶
查询商品分类详情 categoryId 商品分类Id
func (*Category) GetCategoryWithChildren ¶ added in v1.9.0
查询商品分类详情,包含二级分类 categoryId 商品分类Id
func (*Category) GetShopCategories ¶
查询店铺商品分类 shopId 店铺Id
func (*Category) GetShopCategoriesWithChildren ¶ added in v1.9.0
查询店铺商品分类,包含二级分类 shopId 店铺Id
func (*Category) RemoveCategory ¶
删除商品分类 categoryId 商品分类Id
func (*Category) SetCategoryPositions ¶
func (category *Category) SetCategoryPositions(shopId_ int64, categoryIds_ interface{}) (interface{}, error)
设置分类排序 shopId 饿了么店铺Id categoryIds 需要排序的分类Id
func (*Category) SetCategoryPositionsWithChildren ¶ added in v1.9.0
func (category *Category) SetCategoryPositionsWithChildren(shopId_ int64, categoryWithChildrenIds_ interface{}) (interface{}, error)
设置二级分类排序 shopId 饿了么店铺Id categoryWithChildrenIds 需要排序的父分类Id,及其下属的二级分类ID
func (*Category) UpdateCategory ¶
func (category *Category) UpdateCategory(categoryId_ int64, name_ string, description_ string) (interface{}, error)
更新商品分类 categoryId 商品分类Id name 商品分类名称,长度需在50字以内 description 商品分类描述,长度需在50字以内
func (*Category) UpdateCategoryWithChildren ¶ added in v1.9.0
func (category *Category) UpdateCategoryWithChildren(categoryId_ int64, name_ string, parentId_ int64, description_ string) (interface{}, error)
更新商品分类,包含二级分类 categoryId 商品分类Id name 商品分类名称,长度需在50字以内 parentId 父分类ID,如果没有可以填0 description 商品分类描述,长度需在50字以内
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
type File ¶
type File struct {
// contains filtered or unexported fields
}
func (*File) GetUploadedUrl ¶
获取上传文件的访问URL,返回文件的Url地址 hash 图片hash值
func (*File) UploadImage ¶
上传图片,返回图片的hash值 image 文件内容base64编码值
type Finance ¶ added in v1.10.0
type Finance struct {
// contains filtered or unexported fields
}
func (*Finance) GetOrder ¶ added in v1.11.0
查询订单 shopId 饿了么店总店店铺id orderId 订单id
func (*Finance) QueryBalance ¶ added in v1.10.0
查询商户余额,返回可用余额和总余额 shopId 饿了么店铺id
func (*Finance) QueryBalanceLog ¶ added in v1.10.0
查询余额流水,有流水改动的交易 request 查询条件
func (*Finance) QueryBranchBills ¶ added in v1.11.0
查询分店账单 shopId 饿了么店总店店铺id query 查询条件
func (*Finance) QueryBranchOrders ¶ added in v1.11.0
查询分店订单 shopId 饿了么店总店店铺id query 查询条件
func (*Finance) QueryHeadBills ¶ added in v1.11.0
查询总店账单 shopId 饿了么店总店店铺id query 查询条件
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
func (*Item) BatchClearStock ¶
批量沽清库存 specIds 商品及商品规格的列表
func (*Item) BatchCreateItems ¶
批量添加商品 categoryId 商品分类Id items 商品属性的列表
func (*Item) BatchFillStock ¶
批量置满库存 specIds 商品及商品规格的列表
func (*Item) BatchGetItems ¶
批量查询商品详情 itemIds 商品Id的列表
func (*Item) BatchOffShelf ¶
批量下架商品 specIds 商品及商品规格的列表
func (*Item) BatchOnShelf ¶
批量上架商品 specIds 商品及商品规格的列表
func (*Item) BatchRemoveItems ¶
批量删除商品 itemIds 商品Id的列表
func (*Item) BatchUpdatePrices ¶ added in v1.9.0
批量修改商品价格 shopId 店铺Id specPrices 商品Id及其下SkuId和价格对应Map(限制最多50个)
func (*Item) BatchUpdateSpecStocks ¶
批量更新商品库存 specStocks 商品以及规格库存列表
func (*Item) ClearAndTimingMaxStock ¶ added in v1.2.0
批量沽清库存并在次日2:00开始置满 clearStocks 店铺Id及商品Id的列表
func (*Item) CreateItem ¶
添加商品 categoryId 商品分类Id properties 商品属性
func (*Item) GetItem ¶
查询商品详情 itemId 商品Id
func (*Item) GetItemByShopIdAndExtendCode ¶ added in v1.9.0
func (item *Item) GetItemByShopIdAndExtendCode(shopId_ int64, extendCode_ string) (interface{}, error)
根据商品扩展码获取商品 shopId 店铺Id extendCode 商品扩展码
func (*Item) GetItemIdsHasActivityByShopId ¶ added in v1.10.0
查询活动商品 shopId 店铺Id
func (*Item) GetItemsByCategoryId ¶
获取一个分类下的所有商品 categoryId 商品分类Id
func (*Item) GetItemsByShopIdAndBarCode ¶ added in v1.9.0
根据商品条形码获取商品 shopId 店铺Id barCode 商品条形码
func (*Item) RemoveItem ¶
删除商品 itemId 商品Id
func (*Item) SetItemPositions ¶
设置商品排序 categoryId 商品分类Id itemIds 商品Id列表
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func (*Message) GetNonReachedMessages ¶
获取未到达的推送消息 appId 应用ID
type OAuthClient ¶
type OAuthClient struct {
// contains filtered or unexported fields
}
func NewAuthClient ¶
func NewAuthClient(conf Config) OAuthClient
func (*OAuthClient) GenerateAuthUrl ¶
func (oauth *OAuthClient) GenerateAuthUrl(state string, scope string, redirectUri string) string
获取授权 URL
func (*OAuthClient) GetClientToken ¶
func (oauth *OAuthClient) GetClientToken() Token
获取 token 客户端模式
func (*OAuthClient) GetTokenByAuthCode ¶
func (oauth *OAuthClient) GetTokenByAuthCode(code string, redirectURL string) Token
通过 auth code 获取 token
func (*OAuthClient) GetTokenByRefreshToken ¶
func (oauth *OAuthClient) GetTokenByRefreshToken(refreshToken string, scope string) Token
通过刷新 token 获取 token
type Order ¶
type Order struct {
// contains filtered or unexported fields
}
func (*Order) AgreeRefund ¶
同意退单/同意取消单 orderId 订单Id
func (*Order) AgreeRefundLite ¶ added in v1.9.0
同意退单/同意取消单(推荐) orderId 订单Id
func (*Order) BatchGetDeliveryStates ¶
批量获取订单最新配送记录 orderIds 订单Id列表
func (*Order) CallDelivery ¶ added in v1.9.0
呼叫配送 orderId 订单Id fee 小费,1-8之间的整数
func (*Order) CancelDelivery ¶ added in v1.9.0
取消呼叫配送 orderId 订单Id
func (*Order) CancelOrder ¶
func (order *Order) CancelOrder(orderId_ string, type_ interface{}, remark_ string) (interface{}, error)
取消订单 orderId 订单Id type 取消原因 remark 备注说明
func (*Order) CancelOrderLite ¶ added in v1.9.0
func (order *Order) CancelOrderLite(orderId_ string, type_ interface{}, remark_ string) (interface{}, error)
取消订单(推荐) orderId 订单Id type 取消原因 remark 备注说明
func (*Order) ConfirmOrder ¶
确认订单 orderId 订单Id
func (*Order) ConfirmOrderLite ¶ added in v1.9.0
确认订单(推荐) orderId 订单Id
func (*Order) DeliveryBySelf ¶
配送异常或者物流拒单后选择自行配送 orderId 订单Id
func (*Order) DeliveryBySelfLite ¶ added in v1.9.0
配送异常或者物流拒单后选择自行配送(推荐) orderId 订单Id
func (*Order) DisagreeRefund ¶
不同意退单/不同意取消单 orderId 订单Id reason 商家不同意退单原因
func (*Order) DisagreeRefundLite ¶ added in v1.9.0
不同意退单/不同意取消单(推荐) orderId 订单Id reason 商家不同意退单原因
func (*Order) GetAllOrders ¶ added in v1.9.0
func (order *Order) GetAllOrders(shopId_ int64, pageNo_ int, pageSize_ int, date_ string) (interface{}, error)
查询全部订单 shopId 店铺id pageNo 页码。取值范围:大于零的整数最大限制为100 pageSize 每页获取条数。最小值1,最大值50。 date 日期,默认当天,格式:yyyy-MM-dd
func (*Order) GetCancelOrders ¶ added in v1.9.0
查询店铺未处理的取消单 shopId 店铺id
func (*Order) GetCommodities ¶ added in v1.9.0
获取指定订单菜品活动价格. orderId 订单Id
func (*Order) GetDeliveryStateRecord ¶
获取订单配送记录 orderId 订单Id
func (*Order) GetOrder ¶
获取订单 orderId 订单Id
func (*Order) GetRefundOrder ¶ added in v1.9.0
获取订单退款信息 orderId 订单Id
func (*Order) GetRefundOrders ¶ added in v1.9.0
查询店铺未处理的退单 shopId 店铺id
func (*Order) GetUnprocessOrders ¶ added in v1.9.0
查询店铺未处理订单 shopId 店铺id
func (*Order) GetUnreplyReminders ¶ added in v1.9.0
获取店铺未回复的催单 shopId 店铺id
func (*Order) MgetCommodities ¶ added in v1.9.0
批量获取订单菜品活动价格 orderIds 订单Id列表
func (*Order) MgetOrders ¶
批量获取订单 orderIds 订单Id的列表
func (*Order) MgetRefundOrders ¶ added in v1.9.0
批量获取订单退款信息 orderIds 订单Id列表
func (*Order) NoMoreDelivery ¶
配送异常或者物流拒单后选择不再配送 orderId 订单Id
func (*Order) NoMoreDeliveryLite ¶ added in v1.9.0
配送异常或者物流拒单后选择不再配送(推荐) orderId 订单Id
func (*Order) ReceivedOrder ¶
订单确认送达 orderId 订单ID
func (*Order) ReceivedOrderLite ¶ added in v1.9.0
订单确认送达(推荐) orderId 订单ID
type Packs ¶ added in v1.9.0
type Packs struct {
// contains filtered or unexported fields
}
type Product ¶
type Shop ¶
type Shop struct {
// contains filtered or unexported fields
}
func (*Shop) GetShop ¶
查询店铺信息 shopId 店铺Id
func (*Shop) MgetShopStatus ¶
批量获取店铺简要 shopIds 店铺Id的列表
func (*Shop) SetDeliveryTime ¶ added in v1.3.0
func (shop *Shop) SetDeliveryTime(shopId_ int64, deliveryBasicMins_ int, deliveryAdjustMins_ int) (interface{}, error)
设置送达时间 shopId 店铺Id deliveryBasicMins 配送基准时间(单位分钟) deliveryAdjustMins 配送调整时间(单位分钟)
func (*Shop) SetOnlineRefund ¶ added in v1.9.0
设置是否支持在线退单 shopId 店铺Id enable 是否支持
type SimpleLogger ¶
type SimpleLogger struct { }
func (*SimpleLogger) Error ¶
func (logger *SimpleLogger) Error(message string)
func (*SimpleLogger) Info ¶
func (logger *SimpleLogger) Info(message string)