lib/v20200226/client.rb in tencentcloud-sdk-af-1.0.204 vs lib/v20200226/client.rb in tencentcloud-sdk-af-1.0.205
- old
+ new
@@ -53,9 +53,33 @@
raise e
rescue StandardError => e
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
end
+ # 反欺诈评分接口
+
+ # @param request: Request instance for GetAntiFraud.
+ # @type request: :class:`Tencentcloud::af::V20200226::GetAntiFraudRequest`
+ # @rtype: :class:`Tencentcloud::af::V20200226::GetAntiFraudResponse`
+ def GetAntiFraud(request)
+ body = send_request('GetAntiFraud', request.serialize)
+ response = JSON.parse(body)
+ if response['Response'].key?('Error') == false
+ model = GetAntiFraudResponse.new
+ model.deserialize(response['Response'])
+ model
+ else
+ code = response['Response']['Error']['Code']
+ message = response['Response']['Error']['Message']
+ reqid = response['Response']['RequestId']
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
+ end
+ rescue TencentCloud::Common::TencentCloudSDKException => e
+ raise e
+ rescue StandardError => e
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
+ end
+
# 天御反欺诈服务,主要应用于银行、证券、保险、消费金融等金融行业客户,通过腾讯的大数据风控能力,
# 可以准确识别恶意用户信息,解决客户在支付、活动、理财,风控等业务环节遇到的欺诈威胁,降低企业
# 的损失。
# @param request: Request instance for QueryAntiFraud.
\ No newline at end of file