Class: Fuyou::Order

Inherits:
Object
  • Object
show all
Extended by:
Base
Defined in:
lib/fuyou/order.rb

Class Method Summary collapse

Methods included from Base

connection, format_response, http_get, http_post, refresh_token, sign

Class Method Details

.query(org_id, begin_at = nil, end_at = nil, page = nil, per_page = nil) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/fuyou/order.rb', line 6

def query(org_id, begin_at = nil, end_at = nil, page = nil, per_page = nil)
  options = {
    customNo: Fuyou.config.custom_id,
    corpAccounts: org_id,
    beginDate: begin_at || Date.yesterday.strftime('%Y-%m-%d'),
    endDate: end_at || Date.today.strftime('%Y-%m-%d'),
    pageNum: page || 1,
    pageSize: per_page || 30
  }

  http_post('/FuyouRest/mjfuguan/queryBusinessOrder', options)
end