Module: Reapal::Api::User::MobileQuery

Defined in:
lib/reapal/api/user/mobile_query.rb

Instance Method Summary collapse

Instance Method Details

#mobile_query(contract) ⇒ Hash

1.4 手机号查询

Parameters:

  • contract (String)

    用户协议号

Returns:

  • (Hash)

    结果集

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

    • :request_params [Hash] 请求参数

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

    • :error_code [String] 错误代号

    • :error_msg [String] 错误信息

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

      • :contracts [String] 用户协议号

      • :mobile [String] 用户手机号



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/reapal/api/user/mobile_query.rb', line 22

def mobile_query(contract)
  service = 'reapal.trust.mobileQuery'
  post_path = '/user/restApi.htm'

  params = {
    contracts: contract,
    queryTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'),
  }

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

  Reapal.logger.info res

  res
end