Module: Reapal::Api::Tender::TenderOnekeyInvestHistory

Defined in:
lib/reapal/api/tender/tender_onekey_invest_history.rb

Instance Method Summary collapse

Instance Method Details

#tender_onekey_invest_history(tender_no, invest_details, remark = '') ⇒ Hash

3.15 投资关系迁移 (要求标的为已满标放款状态)

Parameters:

  • tender_no (String)

    商户系统标的号

  • invest_details (Array)

    投资方列表

    • :orderNo [String] 投标订单号

    • :investContracts [String] 投资方协议号

    • :amount [BigDecimal] 金额

    • :applyTime [Time] 投标时间 YYYY-MM-DD HH:mm:ss

    • :remark [String] 备注

  • remark (String) (defaults to: '')

    业务备注,默认为空

Returns:

  • (Hash)

    结果集

    • :result [String] 业务结果:‘S/F/P’

    • :request_params [Hash] 请求参数

    • :response [Object] 请求返回对象

    • :error_code [String] 错误代号

    • :error_msg [String] 错误信息

    • :data: 具体业务返回信息

      * :tenderNo [String] 完成订单号
      * :resultCode [String] 结果代码 0000:表示迁移成功
      


29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/reapal/api/tender/tender_onekey_invest_history.rb', line 29

def tender_onekey_invest_history(tender_no, invest_details, remark='')
  service = 'reapal.trust.onekeyInvestHistory'
  post_path = '/tender/rest.htm'

  params = {
    tenderNo: tender_no,
    investDetails: invest_details,
    remark: remark,
    applyTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'),
  }

  res = operate_post(:operate, service, params, post_path, Http::ErrorCode.tender_onekey_invest, ['0000'])

  Reapal.logger.info res

  res
end