Module: RockFintech::Api::Trade::AutoBidApply

Defined in:
lib/rock_fintech/api/trade/auto_bid_apply.rb

Instance Method Summary collapse

Instance Method Details

#auto_bid_apply(card_no, out_serial_no, amount, use_bonus, bonus_amount, auth_code, asset_no, interest_date, interest_type, interest_day, end_date, interest_rate, frozen_flag, frozen_no, devise = "000001", remark = '') ⇒ Hash

P2P平台自动为投资人投标

Parameters:

  • card_no (String)

    电子账号 ,必填,19

  • out_serial_no (String)

    申请流水号 ,必填,用于交易的唯一性标识,40

  • amount (Decimal)

    投标金额 ,必填,13

  • use_bonus (Integer)

    是否使用红包 ,必填,0:不使用红包;1:使用红包,1

  • bonus_amount

    Decimal] 抵扣红包金额 ,必填,两位小数,13

  • auth_code (String)

    签约交易流水号 ,必填,40

  • asset_no (String)

    标的编号 ,必填,40

  • interest_date (Date)

    起息日,YYYYMMDD,必填,8

  • interest_type (Integer)

    付息方式 ,必填 1:等额本息; 2:每月付息,到期还本,1

  • interest_day (Integer)

    利息每月支付日, 条件选填 ,DD ,付息方式为2时必填;,2

  • end_date (Date)

    产品到期日,YYYYMMDD,必填,8

  • interest_rate

    Decimal] 预期年化收益率 ,必填,8

  • frozen_flag (Integer)

    是否冻结金额 ,必填,0:不冻结;1:冻结,1

  • frozen_no (String)

    冻结编号,选填

  • devise (String) (defaults to: "000001")

    交易终端,默认手机 000001手机APP 000002网页 000003微信 000004柜面

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

    备注,默认为空

Returns:

  • (Hash)

    结果集

    • :result [String] “S”/“F”/“P”

    • :request_params [Hash] 请求参数

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

    • :code [String] 结果代码

    • :msg [String] 结果信息

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

      * :out_serial_no	[String] 申请流水号,40
      * :card_no	[String] 电子账号,19
      * :name	[String] 姓名,60
      * :asset_no	[String] 标的编号,40
      * :bid_amount	[Decimal] 投标金额,13
      * :forcast_income	[Decimal] 预期收益,13
      * :buy_date	[Date] 投标日期,8
      * :state	[Integer] 记录状态,1:投标中 2:计息中 3:到期待返还 4:本息已返还,1
      * :auth_code	[Integer] 投标申请授权码,20
      


42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/rock_fintech/api/trade/auto_bid_apply.rb', line 42

def auto_bid_apply(card_no, out_serial_no, amount, use_bonus, bonus_amount, auth_code, asset_no, interest_date, interest_type, interest_day, end_date, interest_rate, frozen_flag, frozen_no, devise="000001", remark='')
  service = "auto_bid_apply"

  params = {
    card_no: card_no,
    out_serial_no: out_serial_no,
    amount: amount,
    use_bonus: use_bonus,
    bonus_amount: bonus_amount,
    auth_code: auth_code,
    asset_no: asset_no,
    interest_date: interest_date,
    interest_type: interest_type,
    interest_day: interest_day,
    end_date: end_date,
    interest_rate: interest_rate,
    frozen_flag: frozen_flag,
    frozen_no: frozen_no,
    client: devise,
    custom: remark,
  }

  res = operate_post(:operate, service, params, Http::ErrorCode.auto_bid_apply, ["RD000000"] )

  res
end