module GuanyiErp

Constants

API_GY_ERP_ITEMS_GET
API_GY_ERP_STOCK_GET
API_GY_ERP_TRADE_ADD
API_GY_ERP_TRADE_GET
VERSION

Public Instance Methods

api_erp_items_get(params={}) click to toggle source

商品查询(gy.erp.items.get) page_no Number 非必填 页码 1 page_size Number 非必填 每页大小 10 code String 必填 商品代码 参考文档 gop.guanyierp.com/interface/gy.erp.items.get.htm

# File lib/guanyi_erp.rb, line 37
def api_erp_items_get(params={})
  GuanyiErp::Request.post({method: API_GY_ERP_ITEMS_GET}.merge(params))
end
api_erp_stock_get(params={}) click to toggle source

库存查询(gy.erp.stock.get) page_no Number 非必填 页码 1 page_size Number 非必填 每页大小 10 item_code String 非必填 商品代码 sku_code String 非必填 规格代码 warehouse_code String 非必填 仓库code 参考文档 gop.guanyierp.com/interface/gy.erp.stock.get.htm

# File lib/guanyi_erp.rb, line 28
def api_erp_stock_get(params={})
  GuanyiErp::Request.post({method: API_GY_ERP_STOCK_GET}.merge(params))
end
api_erp_trade_add(params={}) click to toggle source

订单新增(gy.erp.trade.add)

+order_type_code+   String                            订单类型code
+refund+    Number             0-非退款 ,1--退款(退款中);         退款状态
+cod+       Boolean                               货到付款
+order_settlement_code+     String                              结算方式code
+platform_code+     String                              平台单号(必填:防止重复导入erp,这里填写系统的订单号)
+shop_code+ String  是                        店铺code
+express_code+      String       是                     物流公司code
+warehouse_code+    String     是                   仓库code
+vip_code+  String   是                 会员code
+vip_name+  String                           会员名称
+receiver_name+     String                              收货人
+receiver_address+  String                           收货地址
+receiver_zip+      String                               收货邮编
+receiver_mobile+   String            手机和电话必填一项         收货人手机
+receiver_phone+    String             手机和电话必填一项          收货人电话
+receiver_province+ String                          收货人省份
+receiver_city+     String                              收货人城市
+receiver_district+ String                          收货人区域
+tag_code+  String                           标记code
+deal_datetime+     String      是    2015-03-17 15:03:45                拍单时间
+pay_datetime+      String               2015-03-17 15:03:45          付款时间
+business_man_code+ String                          业务员code
+post_fee+  Price                    0.0      物流费用
+cod_fee+   Price                             到付服务费
+discount_fee+      Price                                让利金额
+plan_delivery_date+        Date                           预计发货日期
+buyer_memo+        String                         买家留言
+seller_memo+       String                                卖家备注
+seller_memo+_late  String                           二次备注
+vipIdCard+ String                          身份证号
+vipRealName+       String                                真实姓名
+vipEmail+  String                           电子邮箱
+invoices+  List     是                   发票信息数组
+details+   List                              商品信息数组
+payments+  List     是                   支付信息数组

参考文档 gop.guanyierp.com/interface/gy.erp.trade.add.htm

# File lib/guanyi_erp.rb, line 78
def api_erp_trade_add(params={})
  GuanyiErp::Request.post({method: API_GY_ERP_TRADE_ADD}.merge(params))
end
api_erp_trade_get(params={}) click to toggle source

订单查询(gy.erp.trade.get)

+page_no+   Number                    1        页码
+page_size+ Number                  10     每页大小
+start_date+        DateTime                               开始时间
+end_date+  DateTime                         结束时间
+date_type+ Number          默认为0, 0、创建时间 1、拍单时间 2、付款时间              时间类型
+order_state+       Number                默认为0, 0、全部 1、未审核 2、已审核                订单类型
+warehouse_code+    String                             仓库代码
+shop_code+ String                          店铺代码
+vip_name+  String                           会员名称
+platform_code+     String                              平台单号
+receiver_mobile+   String                            收件手机
# File lib/guanyi_erp.rb, line 94
def api_erp_trade_get(params={})
  GuanyiErp::Request.post({method: API_GY_ERP_TRADE_GET}.merge(params))
end