tencentcloud-sdk-ocr 3.0.971 → 3.0.973
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20181119/client.rb +54 -6
- data/lib/v20181119/models.rb +274 -22
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3924246eb410edea04020501a17dfbe552b4b76
|
4
|
+
data.tar.gz: beccffe8c17dd34ef501b15bd4dca5e347ce0bf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 468e25fc29eb526bb7a898b53e8e8b5eb8489c6d32a918c7fd2c62f9e9e0ccf104333cb5b41a67565641e4e61419f20422ce23474c41ae10dc498596164efd61
|
7
|
+
data.tar.gz: 13be190d46726056b96a101a6a16c5807012190b4db7b0e1d65862d31abdddc437de67dfa294c2fd7694d4faf8656980417753792ad1f7226d86b61e4d107320
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.973
|
data/lib/v20181119/client.rb
CHANGED
@@ -896,6 +896,54 @@ module TencentCloud
|
|
896
896
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
897
897
|
end
|
898
898
|
|
899
|
+
# 获取ocr结果
|
900
|
+
|
901
|
+
# @param request: Request instance for GetOCRResult.
|
902
|
+
# @type request: :class:`Tencentcloud::ocr::V20181119::GetOCRResultRequest`
|
903
|
+
# @rtype: :class:`Tencentcloud::ocr::V20181119::GetOCRResultResponse`
|
904
|
+
def GetOCRResult(request)
|
905
|
+
body = send_request('GetOCRResult', request.serialize)
|
906
|
+
response = JSON.parse(body)
|
907
|
+
if response['Response'].key?('Error') == false
|
908
|
+
model = GetOCRResultResponse.new
|
909
|
+
model.deserialize(response['Response'])
|
910
|
+
model
|
911
|
+
else
|
912
|
+
code = response['Response']['Error']['Code']
|
913
|
+
message = response['Response']['Error']['Message']
|
914
|
+
reqid = response['Response']['RequestId']
|
915
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
916
|
+
end
|
917
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
918
|
+
raise e
|
919
|
+
rescue StandardError => e
|
920
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
921
|
+
end
|
922
|
+
|
923
|
+
# 获取ocr的token值
|
924
|
+
|
925
|
+
# @param request: Request instance for GetOCRToken.
|
926
|
+
# @type request: :class:`Tencentcloud::ocr::V20181119::GetOCRTokenRequest`
|
927
|
+
# @rtype: :class:`Tencentcloud::ocr::V20181119::GetOCRTokenResponse`
|
928
|
+
def GetOCRToken(request)
|
929
|
+
body = send_request('GetOCRToken', request.serialize)
|
930
|
+
response = JSON.parse(body)
|
931
|
+
if response['Response'].key?('Error') == false
|
932
|
+
model = GetOCRTokenResponse.new
|
933
|
+
model.deserialize(response['Response'])
|
934
|
+
model
|
935
|
+
else
|
936
|
+
code = response['Response']['Error']['Code']
|
937
|
+
message = response['Response']['Error']['Message']
|
938
|
+
reqid = response['Response']['RequestId']
|
939
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
940
|
+
end
|
941
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
942
|
+
raise e
|
943
|
+
rescue StandardError => e
|
944
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
945
|
+
end
|
946
|
+
|
899
947
|
# 智慧表单产品已下线,需要下线相关API
|
900
948
|
|
901
949
|
# 支持查询智能表单录入任务的状态。本产品免费公测中,您可以点击demo(超链接:https://ocr.smartform.cloud.tencent.com/)试用,如需购买请与商务团队联系。
|
@@ -976,12 +1024,12 @@ module TencentCloud
|
|
976
1024
|
|
977
1025
|
# 本接口支持中国大陆居民二代身份证正反面所有字段的识别,包括姓名、性别、民族、出生日期、住址、公民身份证号、签发机关、有效期限,识别准确度达到99%以上。
|
978
1026
|
|
979
|
-
#
|
1027
|
+
# 另外,本接口还支持多种扩展能力,满足不同场景的需求。如身份证照片、人像照片的裁剪功能,同时具备8种告警功能,如下表所示。
|
980
1028
|
|
981
1029
|
# <table style="width:650px">
|
982
1030
|
# <thead>
|
983
1031
|
# <tr>
|
984
|
-
# <th width="150"
|
1032
|
+
# <th width="150">扩展能力</th>
|
985
1033
|
# <th width="500">能力项</th>
|
986
1034
|
# </tr>
|
987
1035
|
# </thead>
|
@@ -1492,12 +1540,12 @@ module TencentCloud
|
|
1492
1540
|
|
1493
1541
|
# 本接口支持中国大陆居民二代身份证正反面所有字段的识别,包括姓名、性别、民族、出生日期、住址、公民身份证号、签发机关、有效期限,识别准确度达到99%以上。
|
1494
1542
|
|
1495
|
-
#
|
1543
|
+
# 另外,本接口还支持多种扩展能力,满足不同场景的需求。如身份证照片、人像照片的裁剪功能,同时具备9种告警功能,如下表所示。
|
1496
1544
|
|
1497
1545
|
# <table style="width:650px">
|
1498
1546
|
# <thead>
|
1499
1547
|
# <tr>
|
1500
|
-
# <th width="150"
|
1548
|
+
# <th width="150">扩展能力</th>
|
1501
1549
|
# <th width="500">能力项</th>
|
1502
1550
|
# </tr>
|
1503
1551
|
# </thead>
|
@@ -1889,7 +1937,7 @@ module TencentCloud
|
|
1889
1937
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1890
1938
|
end
|
1891
1939
|
|
1892
|
-
# 本接口支持中英文图片/PDF内常规表格、无线表格、多表格的检测和识别,返回每个单元格的文字内容,支持旋转的表格图片识别,且支持将识别结果保存为 Excel 格式。识别效果比表格识别V2更好,覆盖场景更加广泛,对表格难例场景,如无线表格、嵌套表格(有线表格中包含无线表格)的识别效果均优于表格识别V2
|
1940
|
+
# 本接口支持中英文图片/PDF内常规表格、无线表格、多表格的检测和识别,返回每个单元格的文字内容,支持旋转的表格图片识别,且支持将识别结果保存为 Excel 格式。识别效果比表格识别V2更好,覆盖场景更加广泛,对表格难例场景,如无线表格、嵌套表格(有线表格中包含无线表格)的识别效果均优于表格识别V2。
|
1893
1941
|
|
1894
1942
|
# 默认接口请求频率限制:2次/秒。
|
1895
1943
|
|
@@ -2226,7 +2274,7 @@ module TencentCloud
|
|
2226
2274
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2227
2275
|
end
|
2228
2276
|
|
2229
|
-
# 本接口支持智能提取各类证照、票据、表单、合同等结构化场景的key:value字段信息,并支持提取表格信息的key:value组的结构化,灵活高效,适用于各类非标准材料的信息录入场景,点击[立即体验](https://cloud.tencent.com/
|
2277
|
+
# 本接口支持智能提取各类证照、票据、表单、合同等结构化场景的key:value字段信息,并支持提取表格信息的key:value组的结构化,灵活高效,适用于各类非标准材料的信息录入场景,点击[立即体验](https://ocrdemo.cloud.tencent.com/)。
|
2230
2278
|
|
2231
2279
|
# 默认接口请求频率限制:5次/秒。
|
2232
2280
|
|
data/lib/v20181119/models.rb
CHANGED
@@ -1731,8 +1731,8 @@ module TencentCloud
|
|
1731
1731
|
|
1732
1732
|
attr_accessor :PageNumber, :Angle, :Height, :Width, :OriginHeight, :OriginWidth, :Elements, :RotatedAngle
|
1733
1733
|
extend Gem::Deprecate
|
1734
|
-
deprecate :Angle, :none,
|
1735
|
-
deprecate :Angle=, :none,
|
1734
|
+
deprecate :Angle, :none, 2025, 1
|
1735
|
+
deprecate :Angle=, :none, 2025, 1
|
1736
1736
|
|
1737
1737
|
def initialize(pagenumber=nil, angle=nil, height=nil, width=nil, originheight=nil, originwidth=nil, elements=nil, rotatedangle=nil)
|
1738
1738
|
@PageNumber = pagenumber
|
@@ -3546,8 +3546,8 @@ module TencentCloud
|
|
3546
3546
|
|
3547
3547
|
attr_accessor :TextDetections, :Angel, :Angle, :RequestId
|
3548
3548
|
extend Gem::Deprecate
|
3549
|
-
deprecate :Angel, :none,
|
3550
|
-
deprecate :Angel=, :none,
|
3549
|
+
deprecate :Angel, :none, 2025, 1
|
3550
|
+
deprecate :Angel=, :none, 2025, 1
|
3551
3551
|
|
3552
3552
|
def initialize(textdetections=nil, angel=nil, angle=nil, requestid=nil)
|
3553
3553
|
@TextDetections = textdetections
|
@@ -3653,8 +3653,8 @@ module TencentCloud
|
|
3653
3653
|
|
3654
3654
|
attr_accessor :TextDetections, :Language, :Angel, :PdfPageSize, :Angle, :RequestId
|
3655
3655
|
extend Gem::Deprecate
|
3656
|
-
deprecate :Angel, :none,
|
3657
|
-
deprecate :Angel=, :none,
|
3656
|
+
deprecate :Angel, :none, 2025, 1
|
3657
|
+
deprecate :Angel=, :none, 2025, 1
|
3658
3658
|
|
3659
3659
|
def initialize(textdetections=nil, language=nil, angel=nil, pdfpagesize=nil, angle=nil, requestid=nil)
|
3660
3660
|
@TextDetections = textdetections
|
@@ -3866,8 +3866,8 @@ module TencentCloud
|
|
3866
3866
|
|
3867
3867
|
attr_accessor :TextDetections, :Angel, :Angle, :RequestId
|
3868
3868
|
extend Gem::Deprecate
|
3869
|
-
deprecate :Angel, :none,
|
3870
|
-
deprecate :Angel=, :none,
|
3869
|
+
deprecate :Angel, :none, 2025, 1
|
3870
|
+
deprecate :Angel=, :none, 2025, 1
|
3871
3871
|
|
3872
3872
|
def initialize(textdetections=nil, angel=nil, angle=nil, requestid=nil)
|
3873
3873
|
@TextDetections = textdetections
|
@@ -3968,6 +3968,92 @@ module TencentCloud
|
|
3968
3968
|
end
|
3969
3969
|
end
|
3970
3970
|
|
3971
|
+
# GetOCRResult请求参数结构体
|
3972
|
+
class GetOCRResultRequest < TencentCloud::Common::AbstractModel
|
3973
|
+
# @param OCRToken: token值
|
3974
|
+
# @type OCRToken: String
|
3975
|
+
|
3976
|
+
attr_accessor :OCRToken
|
3977
|
+
|
3978
|
+
def initialize(ocrtoken=nil)
|
3979
|
+
@OCRToken = ocrtoken
|
3980
|
+
end
|
3981
|
+
|
3982
|
+
def deserialize(params)
|
3983
|
+
@OCRToken = params['OCRToken']
|
3984
|
+
end
|
3985
|
+
end
|
3986
|
+
|
3987
|
+
# GetOCRResult返回参数结构体
|
3988
|
+
class GetOCRResultResponse < TencentCloud::Common::AbstractModel
|
3989
|
+
# @param Type: ocr业务类型
|
3990
|
+
# @type Type: String
|
3991
|
+
# @param OCRResult: ocr结果
|
3992
|
+
# @type OCRResult: :class:`Tencentcloud::Ocr.v20181119.models.OCRResult`
|
3993
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
3994
|
+
# @type RequestId: String
|
3995
|
+
|
3996
|
+
attr_accessor :Type, :OCRResult, :RequestId
|
3997
|
+
|
3998
|
+
def initialize(type=nil, ocrresult=nil, requestid=nil)
|
3999
|
+
@Type = type
|
4000
|
+
@OCRResult = ocrresult
|
4001
|
+
@RequestId = requestid
|
4002
|
+
end
|
4003
|
+
|
4004
|
+
def deserialize(params)
|
4005
|
+
@Type = params['Type']
|
4006
|
+
unless params['OCRResult'].nil?
|
4007
|
+
@OCRResult = OCRResult.new
|
4008
|
+
@OCRResult.deserialize(params['OCRResult'])
|
4009
|
+
end
|
4010
|
+
@RequestId = params['RequestId']
|
4011
|
+
end
|
4012
|
+
end
|
4013
|
+
|
4014
|
+
# GetOCRToken请求参数结构体
|
4015
|
+
class GetOCRTokenRequest < TencentCloud::Common::AbstractModel
|
4016
|
+
# @param Type: 业务类型,如身份证识别为IDCardOCR
|
4017
|
+
# @type Type: String
|
4018
|
+
# @param IDCardConfig: 身份证配置信息
|
4019
|
+
# @type IDCardConfig: :class:`Tencentcloud::Ocr.v20181119.models.IDCardConfig`
|
4020
|
+
|
4021
|
+
attr_accessor :Type, :IDCardConfig
|
4022
|
+
|
4023
|
+
def initialize(type=nil, idcardconfig=nil)
|
4024
|
+
@Type = type
|
4025
|
+
@IDCardConfig = idcardconfig
|
4026
|
+
end
|
4027
|
+
|
4028
|
+
def deserialize(params)
|
4029
|
+
@Type = params['Type']
|
4030
|
+
unless params['IDCardConfig'].nil?
|
4031
|
+
@IDCardConfig = IDCardConfig.new
|
4032
|
+
@IDCardConfig.deserialize(params['IDCardConfig'])
|
4033
|
+
end
|
4034
|
+
end
|
4035
|
+
end
|
4036
|
+
|
4037
|
+
# GetOCRToken返回参数结构体
|
4038
|
+
class GetOCRTokenResponse < TencentCloud::Common::AbstractModel
|
4039
|
+
# @param OCRToken: token值
|
4040
|
+
# @type OCRToken: String
|
4041
|
+
# @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
|
4042
|
+
# @type RequestId: String
|
4043
|
+
|
4044
|
+
attr_accessor :OCRToken, :RequestId
|
4045
|
+
|
4046
|
+
def initialize(ocrtoken=nil, requestid=nil)
|
4047
|
+
@OCRToken = ocrtoken
|
4048
|
+
@RequestId = requestid
|
4049
|
+
end
|
4050
|
+
|
4051
|
+
def deserialize(params)
|
4052
|
+
@OCRToken = params['OCRToken']
|
4053
|
+
@RequestId = params['RequestId']
|
4054
|
+
end
|
4055
|
+
end
|
4056
|
+
|
3971
4057
|
# GetTaskState请求参数结构体
|
3972
4058
|
class GetTaskStateRequest < TencentCloud::Common::AbstractModel
|
3973
4059
|
# @param TaskId: 智慧表单任务唯一身份ID
|
@@ -4051,8 +4137,8 @@ module TencentCloud
|
|
4051
4137
|
|
4052
4138
|
attr_accessor :ReturnHeadImage, :DetectFake, :ImageBase64, :ImageUrl
|
4053
4139
|
extend Gem::Deprecate
|
4054
|
-
deprecate :DetectFake, :none,
|
4055
|
-
deprecate :DetectFake=, :none,
|
4140
|
+
deprecate :DetectFake, :none, 2025, 1
|
4141
|
+
deprecate :DetectFake=, :none, 2025, 1
|
4056
4142
|
|
4057
4143
|
def initialize(returnheadimage=nil, detectfake=nil, imagebase64=nil, imageurl=nil)
|
4058
4144
|
@ReturnHeadImage = returnheadimage
|
@@ -4121,10 +4207,10 @@ module TencentCloud
|
|
4121
4207
|
|
4122
4208
|
attr_accessor :CnName, :EnName, :TelexCode, :Sex, :Birthday, :Permanent, :IdNum, :Symbol, :FirstIssueDate, :CurrentIssueDate, :FakeDetectResult, :HeadImage, :WarningCode, :WarnCardInfos, :RequestId
|
4123
4209
|
extend Gem::Deprecate
|
4124
|
-
deprecate :FakeDetectResult, :none,
|
4125
|
-
deprecate :FakeDetectResult=, :none,
|
4126
|
-
deprecate :WarningCode, :none,
|
4127
|
-
deprecate :WarningCode=, :none,
|
4210
|
+
deprecate :FakeDetectResult, :none, 2025, 1
|
4211
|
+
deprecate :FakeDetectResult=, :none, 2025, 1
|
4212
|
+
deprecate :WarningCode, :none, 2025, 1
|
4213
|
+
deprecate :WarningCode=, :none, 2025, 1
|
4128
4214
|
|
4129
4215
|
def initialize(cnname=nil, enname=nil, telexcode=nil, sex=nil, birthday=nil, permanent=nil, idnum=nil, symbol=nil, firstissuedate=nil, currentissuedate=nil, fakedetectresult=nil, headimage=nil, warningcode=nil, warncardinfos=nil, requestid=nil)
|
4130
4216
|
@CnName = cnname
|
@@ -4264,6 +4350,46 @@ module TencentCloud
|
|
4264
4350
|
end
|
4265
4351
|
end
|
4266
4352
|
|
4353
|
+
# 身份证配置信息
|
4354
|
+
class IDCardConfig < TencentCloud::Common::AbstractModel
|
4355
|
+
# @param CopyWarn: 默认为false
|
4356
|
+
# @type CopyWarn: Boolean
|
4357
|
+
# @param BorderCheckWarn: 默认为false
|
4358
|
+
# @type BorderCheckWarn: Boolean
|
4359
|
+
# @param ReshootWarn: 默认为false
|
4360
|
+
# @type ReshootWarn: Boolean
|
4361
|
+
# @param DetectPsWarn: 默认为false
|
4362
|
+
# @type DetectPsWarn: Boolean
|
4363
|
+
# @param TempIdWarn: 默认为false
|
4364
|
+
# @type TempIdWarn: Boolean
|
4365
|
+
# @param InvalidDateWarn: 默认为false
|
4366
|
+
# @type InvalidDateWarn: Boolean
|
4367
|
+
# @param ReflectWarn: 默认为false
|
4368
|
+
# @type ReflectWarn: Boolean
|
4369
|
+
|
4370
|
+
attr_accessor :CopyWarn, :BorderCheckWarn, :ReshootWarn, :DetectPsWarn, :TempIdWarn, :InvalidDateWarn, :ReflectWarn
|
4371
|
+
|
4372
|
+
def initialize(copywarn=nil, bordercheckwarn=nil, reshootwarn=nil, detectpswarn=nil, tempidwarn=nil, invaliddatewarn=nil, reflectwarn=nil)
|
4373
|
+
@CopyWarn = copywarn
|
4374
|
+
@BorderCheckWarn = bordercheckwarn
|
4375
|
+
@ReshootWarn = reshootwarn
|
4376
|
+
@DetectPsWarn = detectpswarn
|
4377
|
+
@TempIdWarn = tempidwarn
|
4378
|
+
@InvalidDateWarn = invaliddatewarn
|
4379
|
+
@ReflectWarn = reflectwarn
|
4380
|
+
end
|
4381
|
+
|
4382
|
+
def deserialize(params)
|
4383
|
+
@CopyWarn = params['CopyWarn']
|
4384
|
+
@BorderCheckWarn = params['BorderCheckWarn']
|
4385
|
+
@ReshootWarn = params['ReshootWarn']
|
4386
|
+
@DetectPsWarn = params['DetectPsWarn']
|
4387
|
+
@TempIdWarn = params['TempIdWarn']
|
4388
|
+
@InvalidDateWarn = params['InvalidDateWarn']
|
4389
|
+
@ReflectWarn = params['ReflectWarn']
|
4390
|
+
end
|
4391
|
+
end
|
4392
|
+
|
4267
4393
|
# 身份证信息返回
|
4268
4394
|
class IDCardInfo < TencentCloud::Common::AbstractModel
|
4269
4395
|
# @param Name: 姓名(人像面)
|
@@ -4353,6 +4479,82 @@ module TencentCloud
|
|
4353
4479
|
end
|
4354
4480
|
end
|
4355
4481
|
|
4482
|
+
# 身份证ocr信息结果
|
4483
|
+
class IDCardInfoResult < TencentCloud::Common::AbstractModel
|
4484
|
+
# @param WarnCodes: 警告代码
|
4485
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4486
|
+
# @type WarnCodes: Array
|
4487
|
+
# @param Address: 地址
|
4488
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4489
|
+
# @type Address: String
|
4490
|
+
# @param Authority: 签发机关
|
4491
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4492
|
+
# @type Authority: String
|
4493
|
+
# @param Birth: 出生日期
|
4494
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4495
|
+
# @type Birth: String
|
4496
|
+
# @param IdNum: 身份证号
|
4497
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4498
|
+
# @type IdNum: String
|
4499
|
+
# @param Name: 名字
|
4500
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4501
|
+
# @type Name: String
|
4502
|
+
# @param Nation: 地区
|
4503
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4504
|
+
# @type Nation: String
|
4505
|
+
# @param Sex: 性别
|
4506
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4507
|
+
# @type Sex: String
|
4508
|
+
# @param ValidDate: 到期时间
|
4509
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4510
|
+
# @type ValidDate: String
|
4511
|
+
# @param RequestId: 请求的id
|
4512
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4513
|
+
# @type RequestId: String
|
4514
|
+
# @param ErrorCode: 错误码
|
4515
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4516
|
+
# @type ErrorCode: String
|
4517
|
+
# @param ErrorMessage: 错误信息
|
4518
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4519
|
+
# @type ErrorMessage: String
|
4520
|
+
# @param ImageUrl: 原图地址
|
4521
|
+
# @type ImageUrl: String
|
4522
|
+
|
4523
|
+
attr_accessor :WarnCodes, :Address, :Authority, :Birth, :IdNum, :Name, :Nation, :Sex, :ValidDate, :RequestId, :ErrorCode, :ErrorMessage, :ImageUrl
|
4524
|
+
|
4525
|
+
def initialize(warncodes=nil, address=nil, authority=nil, birth=nil, idnum=nil, name=nil, nation=nil, sex=nil, validdate=nil, requestid=nil, errorcode=nil, errormessage=nil, imageurl=nil)
|
4526
|
+
@WarnCodes = warncodes
|
4527
|
+
@Address = address
|
4528
|
+
@Authority = authority
|
4529
|
+
@Birth = birth
|
4530
|
+
@IdNum = idnum
|
4531
|
+
@Name = name
|
4532
|
+
@Nation = nation
|
4533
|
+
@Sex = sex
|
4534
|
+
@ValidDate = validdate
|
4535
|
+
@RequestId = requestid
|
4536
|
+
@ErrorCode = errorcode
|
4537
|
+
@ErrorMessage = errormessage
|
4538
|
+
@ImageUrl = imageurl
|
4539
|
+
end
|
4540
|
+
|
4541
|
+
def deserialize(params)
|
4542
|
+
@WarnCodes = params['WarnCodes']
|
4543
|
+
@Address = params['Address']
|
4544
|
+
@Authority = params['Authority']
|
4545
|
+
@Birth = params['Birth']
|
4546
|
+
@IdNum = params['IdNum']
|
4547
|
+
@Name = params['Name']
|
4548
|
+
@Nation = params['Nation']
|
4549
|
+
@Sex = params['Sex']
|
4550
|
+
@ValidDate = params['ValidDate']
|
4551
|
+
@RequestId = params['RequestId']
|
4552
|
+
@ErrorCode = params['ErrorCode']
|
4553
|
+
@ErrorMessage = params['ErrorMessage']
|
4554
|
+
@ImageUrl = params['ImageUrl']
|
4555
|
+
end
|
4556
|
+
end
|
4557
|
+
|
4356
4558
|
# IDCardOCR请求参数结构体
|
4357
4559
|
class IDCardOCRRequest < TencentCloud::Common::AbstractModel
|
4358
4560
|
# @param ImageBase64: 图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
@@ -4496,6 +4698,34 @@ module TencentCloud
|
|
4496
4698
|
end
|
4497
4699
|
end
|
4498
4700
|
|
4701
|
+
# IDCardResult
|
4702
|
+
class IDCardResult < TencentCloud::Common::AbstractModel
|
4703
|
+
# @param Front: 正面结果
|
4704
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4705
|
+
# @type Front: :class:`Tencentcloud::Ocr.v20181119.models.IDCardInfoResult`
|
4706
|
+
# @param Back: 反面结果
|
4707
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
4708
|
+
# @type Back: :class:`Tencentcloud::Ocr.v20181119.models.IDCardInfoResult`
|
4709
|
+
|
4710
|
+
attr_accessor :Front, :Back
|
4711
|
+
|
4712
|
+
def initialize(front=nil, back=nil)
|
4713
|
+
@Front = front
|
4714
|
+
@Back = back
|
4715
|
+
end
|
4716
|
+
|
4717
|
+
def deserialize(params)
|
4718
|
+
unless params['Front'].nil?
|
4719
|
+
@Front = IDCardInfoResult.new
|
4720
|
+
@Front.deserialize(params['Front'])
|
4721
|
+
end
|
4722
|
+
unless params['Back'].nil?
|
4723
|
+
@Back = IDCardInfoResult.new
|
4724
|
+
@Back.deserialize(params['Back'])
|
4725
|
+
end
|
4726
|
+
end
|
4727
|
+
end
|
4728
|
+
|
4499
4729
|
# 头像位置坐标
|
4500
4730
|
class ImageCoordinates < TencentCloud::Common::AbstractModel
|
4501
4731
|
# @param X: 头像左上角横坐标
|
@@ -5322,8 +5552,8 @@ module TencentCloud
|
|
5322
5552
|
|
5323
5553
|
attr_accessor :ID, :Name, :Address, :Sex, :Warn, :Image, :AdvancedInfo, :Type, :Birthday, :MyKadNumber, :WarnCardInfos, :RequestId
|
5324
5554
|
extend Gem::Deprecate
|
5325
|
-
deprecate :Warn, :none,
|
5326
|
-
deprecate :Warn=, :none,
|
5555
|
+
deprecate :Warn, :none, 2025, 1
|
5556
|
+
deprecate :Warn=, :none, 2025, 1
|
5327
5557
|
|
5328
5558
|
def initialize(id=nil, name=nil, address=nil, sex=nil, warn=nil, image=nil, advancedinfo=nil, type=nil, birthday=nil, mykadnumber=nil, warncardinfos=nil, requestid=nil)
|
5329
5559
|
@ID = id
|
@@ -6461,6 +6691,26 @@ module TencentCloud
|
|
6461
6691
|
end
|
6462
6692
|
end
|
6463
6693
|
|
6694
|
+
# ocr结果信息
|
6695
|
+
class OCRResult < TencentCloud::Common::AbstractModel
|
6696
|
+
# @param IDCardResult: 身份证结果
|
6697
|
+
# 注意:此字段可能返回 null,表示取不到有效值。
|
6698
|
+
# @type IDCardResult: :class:`Tencentcloud::Ocr.v20181119.models.IDCardResult`
|
6699
|
+
|
6700
|
+
attr_accessor :IDCardResult
|
6701
|
+
|
6702
|
+
def initialize(idcardresult=nil)
|
6703
|
+
@IDCardResult = idcardresult
|
6704
|
+
end
|
6705
|
+
|
6706
|
+
def deserialize(params)
|
6707
|
+
unless params['IDCardResult'].nil?
|
6708
|
+
@IDCardResult = IDCardResult.new
|
6709
|
+
@IDCardResult.deserialize(params['IDCardResult'])
|
6710
|
+
end
|
6711
|
+
end
|
6712
|
+
end
|
6713
|
+
|
6464
6714
|
# 网约车行程单识别结果
|
6465
6715
|
class OnlineTaxiItineraryInfo < TencentCloud::Common::AbstractModel
|
6466
6716
|
# @param Name: 识别出的字段名称(关键字),支持以下字段:
|
@@ -10214,16 +10464,19 @@ module TencentCloud
|
|
10214
10464
|
# @type ReturnFullText: Boolean
|
10215
10465
|
# @param ConfigId: 配置id支持:General -- 通用场景 InvoiceEng -- 海运提单、国际invoice模版 WayBillEng --海运订单模板
|
10216
10466
|
# @type ConfigId: String
|
10467
|
+
# @param EnableCoord: 是否开启全文字段坐标值的识别
|
10468
|
+
# @type EnableCoord: Boolean
|
10217
10469
|
|
10218
|
-
attr_accessor :ImageUrl, :ImageBase64, :PdfPageNumber, :ItemNames, :ReturnFullText, :ConfigId
|
10470
|
+
attr_accessor :ImageUrl, :ImageBase64, :PdfPageNumber, :ItemNames, :ReturnFullText, :ConfigId, :EnableCoord
|
10219
10471
|
|
10220
|
-
def initialize(imageurl=nil, imagebase64=nil, pdfpagenumber=nil, itemnames=nil, returnfulltext=nil, configid=nil)
|
10472
|
+
def initialize(imageurl=nil, imagebase64=nil, pdfpagenumber=nil, itemnames=nil, returnfulltext=nil, configid=nil, enablecoord=nil)
|
10221
10473
|
@ImageUrl = imageurl
|
10222
10474
|
@ImageBase64 = imagebase64
|
10223
10475
|
@PdfPageNumber = pdfpagenumber
|
10224
10476
|
@ItemNames = itemnames
|
10225
10477
|
@ReturnFullText = returnfulltext
|
10226
10478
|
@ConfigId = configid
|
10479
|
+
@EnableCoord = enablecoord
|
10227
10480
|
end
|
10228
10481
|
|
10229
10482
|
def deserialize(params)
|
@@ -10233,6 +10486,7 @@ module TencentCloud
|
|
10233
10486
|
@ItemNames = params['ItemNames']
|
10234
10487
|
@ReturnFullText = params['ReturnFullText']
|
10235
10488
|
@ConfigId = params['ConfigId']
|
10489
|
+
@EnableCoord = params['EnableCoord']
|
10236
10490
|
end
|
10237
10491
|
end
|
10238
10492
|
|
@@ -13277,7 +13531,7 @@ module TencentCloud
|
|
13277
13531
|
# @type InvoiceNo: String
|
13278
13532
|
# @param InvoiceDate: 开票日期(不支持当天发票查询,支持五年以内开具的发票),格式:“YYYY-MM-DD”,如:2019-12-20。
|
13279
13533
|
# @type InvoiceDate: String
|
13280
|
-
# @param InvoiceCode: 发票代码(10或12
|
13534
|
+
# @param InvoiceCode: 发票代码(10或12 位),全电发票为空。查验超过5次后当日无法再查。
|
13281
13535
|
# @type InvoiceCode: String
|
13282
13536
|
# @param InvoiceKind: 票种类型 01:增值税专用发票, 02:货运运输业增值税专用发 票, 03:机动车销售统一发票, 04:增值税普通发票, 08:增值税电子专用发票(含全电), 10:增值税电子普通发票(含全电), 11:增值税普通发票(卷式), 14:增值税电子(通行费)发 票, 15:二手车销售统一发票,16:财务发票, 32:深圳区块链发票(云南区块链因业务调整现已下线)。
|
13283
13537
|
# @type InvoiceKind: String
|
@@ -13293,9 +13547,7 @@ module TencentCloud
|
|
13293
13547
|
# @type SellerTaxCode: String
|
13294
13548
|
# @param EnableCommonElectronic: 是否开启通用机打电子发票,默认为关闭。
|
13295
13549
|
# @type EnableCommonElectronic: Boolean
|
13296
|
-
# @param EnableTodayInvoice: 是否允许查验当日发票,默认值为false
|
13297
|
-
|
13298
|
-
# 请注意,发票从开具到录入税局需要一定的时间来更新和验证发票信息,打开后仅支持查验已成功录入到税局中的发票。
|
13550
|
+
# @param EnableTodayInvoice: 是否允许查验当日发票,默认值为false。请注意,发票从开具到录入税局需要一定的时间来更新和验证发票信息,打开后仅支持查验已成功录入到税局中的当日发票。
|
13299
13551
|
# @type EnableTodayInvoice: Boolean
|
13300
13552
|
|
13301
13553
|
attr_accessor :InvoiceNo, :InvoiceDate, :InvoiceCode, :InvoiceKind, :CheckCode, :Amount, :RegionCode, :SellerTaxCode, :EnableCommonElectronic, :EnableTodayInvoice
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tencentcloud-sdk-ocr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.973
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|