Module: Wdt::Client::Shipments

Included in:
Wdt::Client
Defined in:
lib/wdt/client/shipments.rb

Overview

物流接口

Instance Method Summary collapse

Instance Method Details

#ack_shipments(rec_id, status, message) ⇒ Object

物流同步状态回写

Parameters:

  • rec_ic, (Integer)

    回写的记录id

  • status, (Integer)

    回写状态 0-成功 1-失败

  • message, (String)

    相关描述信息,可在erp的物流同步界⾯面看到



21
22
23
24
25
# File 'lib/wdt/client/shipments.rb', line 21

def ack_shipments(rec_id, status, message)
  options = options.merge( rec_id: rec_id.to_i, status: status.to_i, message: message.to_s)
  response = post "/openapi2/logistics_sync_ack.php", options
  response
end

#query_shipments(limit, options = {}) ⇒ Object

待同步物流查询

Parameters:

  • limit (Integer)

    最多返回几条。最大数值为100



9
10
11
12
13
# File 'lib/wdt/client/shipments.rb', line 9

def query_shipments(limit, options={})
  limit = 100 if limit > 100
  response = post "/openapi2/logistics_sync_query.php", options.merge(limit: limit)
  respone
end