tencentcloud-sdk-ocr 3.0.749 → 3.0.751
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 +24 -0
- data/lib/v20181119/models.rb +83 -0
- 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: ff309bef20d4232730e0fd66229309c64f5def8e
|
4
|
+
data.tar.gz: ae91f6d1accf0fa7bf7d9bcbf1dc0b080d3bae08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13fcd5cfbef6046dcb67327634b5ebed42522133a9315b066c4d19268b93d2b0fc24561dae74251bb8ad6af102dc46f29c76a73d463d799580d2e7fe559762fd
|
7
|
+
data.tar.gz: 79e01d44eb7cbb46a5cec437a0c1a67745b18369ddd47cbcfbc99642ecc44c56d94cb0eb99d5287cf430901ab20f78896561f6f76f2785de1577299066205112
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.751
|
data/lib/v20181119/client.rb
CHANGED
@@ -1457,6 +1457,30 @@ module TencentCloud
|
|
1457
1457
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1458
1458
|
end
|
1459
1459
|
|
1460
|
+
# 外国人永久居留身份证识别
|
1461
|
+
|
1462
|
+
# @param request: Request instance for RecognizeForeignPermanentResidentIdCard.
|
1463
|
+
# @type request: :class:`Tencentcloud::ocr::V20181119::RecognizeForeignPermanentResidentIdCardRequest`
|
1464
|
+
# @rtype: :class:`Tencentcloud::ocr::V20181119::RecognizeForeignPermanentResidentIdCardResponse`
|
1465
|
+
def RecognizeForeignPermanentResidentIdCard(request)
|
1466
|
+
body = send_request('RecognizeForeignPermanentResidentIdCard', request.serialize)
|
1467
|
+
response = JSON.parse(body)
|
1468
|
+
if response['Response'].key?('Error') == false
|
1469
|
+
model = RecognizeForeignPermanentResidentIdCardResponse.new
|
1470
|
+
model.deserialize(response['Response'])
|
1471
|
+
model
|
1472
|
+
else
|
1473
|
+
code = response['Response']['Error']['Code']
|
1474
|
+
message = response['Response']['Error']['Message']
|
1475
|
+
reqid = response['Response']['RequestId']
|
1476
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1477
|
+
end
|
1478
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1479
|
+
raise e
|
1480
|
+
rescue StandardError => e
|
1481
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1482
|
+
end
|
1483
|
+
|
1460
1484
|
# 本接口支持 PDF多页(最多30页)、一页中单张、多张、类型票据的混合识别,同时支持单选识别某类票据,已支持票种包括:增值税发票(专票、普票、卷票、区块链发票、通行费发票)、全电发票(专票、普票)、非税发票(通用票据、统一缴纳书)、定额发票、通用机打发票、购车发票(机动车销售发票、二手车发票)、火车票、出租车发票、机票行程单、汽车票、轮船票、过路过桥费发票共14种标准报销发票,支持OFD格式的 增值税电子普通发票、增值税电子专用发票、电子发票(普通发票)、电子发票(增值税专用发票)、电子发票(机票行程单)、电子发票(铁路电子客票)的第一页识别,并支持非上述类型的其他发票的智能识别,点击[立即试用](https://cloud.tencent.com/product/ocr)。
|
1461
1485
|
|
1462
1486
|
# 默认接口请求频率限制:5次/秒。
|
data/lib/v20181119/models.rb
CHANGED
@@ -6716,6 +6716,89 @@ module TencentCloud
|
|
6716
6716
|
end
|
6717
6717
|
end
|
6718
6718
|
|
6719
|
+
# RecognizeForeignPermanentResidentIdCard请求参数结构体
|
6720
|
+
class RecognizeForeignPermanentResidentIdCardRequest < TencentCloud::Common::AbstractModel
|
6721
|
+
# @param ImageUrl: 图片的 Url 地址。
|
6722
|
+
# 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
|
6723
|
+
# 支持的图片大小:所下载图片经 Base64 编码后不超过 7M。图片下载时间不超过 3 秒。
|
6724
|
+
# 支持的图片像素:需介于20-10000px之间。
|
6725
|
+
# 图片存储于腾讯云的 Url 可保障更高的下载速度和稳定性,建议图片存储于腾讯云。
|
6726
|
+
# 非腾讯云存储的 Url 速度和稳定性可能受一定影响。
|
6727
|
+
# 示例值:https://ocr-demo-1254418846.cos.ap-guangzhou.myqcloud.com/docume
|
6728
|
+
# @type ImageUrl: String
|
6729
|
+
# @param ImageBase64: 图片的 Base64 值。
|
6730
|
+
# 支持的图片格式:PNG、JPG、JPEG,暂不支持 GIF 格式。
|
6731
|
+
# 支持的图片大小:所下载图片经Base64编码后不超过 7M。图片下载时间不超过 3 秒。
|
6732
|
+
# 支持的图片像素:需介于20-10000px之间。
|
6733
|
+
# 图片的 ImageUrl、ImageBase64 必须提供一个,如果都提供,只使用 ImageUrl。
|
6734
|
+
# @type ImageBase64: String
|
6735
|
+
# @param EnablePdf: 是否开启PDF识别,默认值为false,开启后可同时支持图片和PDF的识别。
|
6736
|
+
# @type EnablePdf: Boolean
|
6737
|
+
# @param PdfPageNumber: 需要识别的PDF页面的对应页码,传入时仅支持PDF单页识别,当上传文件为PDF且EnablePdf参数值为true时有效,默认值为1。
|
6738
|
+
# 示例值:1
|
6739
|
+
# @type PdfPageNumber: Integer
|
6740
|
+
|
6741
|
+
attr_accessor :ImageUrl, :ImageBase64, :EnablePdf, :PdfPageNumber
|
6742
|
+
|
6743
|
+
def initialize(imageurl=nil, imagebase64=nil, enablepdf=nil, pdfpagenumber=nil)
|
6744
|
+
@ImageUrl = imageurl
|
6745
|
+
@ImageBase64 = imagebase64
|
6746
|
+
@EnablePdf = enablepdf
|
6747
|
+
@PdfPageNumber = pdfpagenumber
|
6748
|
+
end
|
6749
|
+
|
6750
|
+
def deserialize(params)
|
6751
|
+
@ImageUrl = params['ImageUrl']
|
6752
|
+
@ImageBase64 = params['ImageBase64']
|
6753
|
+
@EnablePdf = params['EnablePdf']
|
6754
|
+
@PdfPageNumber = params['PdfPageNumber']
|
6755
|
+
end
|
6756
|
+
end
|
6757
|
+
|
6758
|
+
# RecognizeForeignPermanentResidentIdCard返回参数结构体
|
6759
|
+
class RecognizeForeignPermanentResidentIdCardResponse < TencentCloud::Common::AbstractModel
|
6760
|
+
# @param CnName: 中文姓名。
|
6761
|
+
# @type CnName: String
|
6762
|
+
# @param EnName: 英文名。
|
6763
|
+
# @type EnName: String
|
6764
|
+
# @param Sex: 性别。
|
6765
|
+
# @type Sex: String
|
6766
|
+
# @param DateOfBirth: 出生日期。规范格式为 XXXX年XX月XX日。
|
6767
|
+
# @type DateOfBirth: String
|
6768
|
+
# @param Nationality: 国籍。
|
6769
|
+
# @type Nationality: String
|
6770
|
+
# @param PeriodOfValidity: 有效期限。
|
6771
|
+
# @type PeriodOfValidity: String
|
6772
|
+
# @param No: 证件号码。
|
6773
|
+
# @type No: String
|
6774
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
6775
|
+
# @type RequestId: String
|
6776
|
+
|
6777
|
+
attr_accessor :CnName, :EnName, :Sex, :DateOfBirth, :Nationality, :PeriodOfValidity, :No, :RequestId
|
6778
|
+
|
6779
|
+
def initialize(cnname=nil, enname=nil, sex=nil, dateofbirth=nil, nationality=nil, periodofvalidity=nil, no=nil, requestid=nil)
|
6780
|
+
@CnName = cnname
|
6781
|
+
@EnName = enname
|
6782
|
+
@Sex = sex
|
6783
|
+
@DateOfBirth = dateofbirth
|
6784
|
+
@Nationality = nationality
|
6785
|
+
@PeriodOfValidity = periodofvalidity
|
6786
|
+
@No = no
|
6787
|
+
@RequestId = requestid
|
6788
|
+
end
|
6789
|
+
|
6790
|
+
def deserialize(params)
|
6791
|
+
@CnName = params['CnName']
|
6792
|
+
@EnName = params['EnName']
|
6793
|
+
@Sex = params['Sex']
|
6794
|
+
@DateOfBirth = params['DateOfBirth']
|
6795
|
+
@Nationality = params['Nationality']
|
6796
|
+
@PeriodOfValidity = params['PeriodOfValidity']
|
6797
|
+
@No = params['No']
|
6798
|
+
@RequestId = params['RequestId']
|
6799
|
+
end
|
6800
|
+
end
|
6801
|
+
|
6719
6802
|
# RecognizeGeneralInvoice请求参数结构体
|
6720
6803
|
class RecognizeGeneralInvoiceRequest < TencentCloud::Common::AbstractModel
|
6721
6804
|
# @param ImageBase64: 图片的 Base64 值。
|
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.751
|
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-01-
|
11
|
+
date: 2024-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|