tencentcloud-sdk-ocr 1.0.309 → 1.0.310
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/VERSION +1 -1
- data/lib/v20181119/client.rb +24 -0
- data/lib/v20181119/models.rb +117 -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: 12f94cea2ed186ad4a9197f60ff66f8f072e963b
|
4
|
+
data.tar.gz: e623f43fbbbf725d6a91f626bdb37016228e933b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13d71783a7f59145dd707b3bc54f289fa80ddd8eaf95939d4ec4ef3d6439f7e1eec967f13ffc1890ca93aba663b985f7d20ad7ff83fbb87ef32b4e613ec83328
|
7
|
+
data.tar.gz: 21ffa2fc4a2c61811ca2aa383de58aeeaaa0c11447a4d8e2701ee43587c05f1dfd25cca7fafdb9c63e2b0356980307aea13164b82747b086e6a2e3625be9a029
|
data/lib/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.310
|
data/lib/v20181119/client.rb
CHANGED
@@ -1779,6 +1779,30 @@ module TencentCloud
|
|
1779
1779
|
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1780
1780
|
end
|
1781
1781
|
|
1782
|
+
# 本接口支持增值税发票的准确性核验,您可以通过输入增值税发票的关键字段提供所需的验证信息,接口返回真实的票面相关信息,包括发票代码、发票号码、开票日期、金额、消费类型、购方名称、购方税号、销方名称、销方税号等多个常用字段。支持多种发票类型核验,包括增值税专用发票、增值税普通发票(含电子普通发票、卷式发票、通行费发票)、全电发票、机动车销售统一发票、货物运输业增值税专用发票、二手车销售统一发票。
|
1783
|
+
|
1784
|
+
# @param request: Request instance for VatInvoiceVerifyNew.
|
1785
|
+
# @type request: :class:`Tencentcloud::ocr::V20181119::VatInvoiceVerifyNewRequest`
|
1786
|
+
# @rtype: :class:`Tencentcloud::ocr::V20181119::VatInvoiceVerifyNewResponse`
|
1787
|
+
def VatInvoiceVerifyNew(request)
|
1788
|
+
body = send_request('VatInvoiceVerifyNew', request.serialize)
|
1789
|
+
response = JSON.parse(body)
|
1790
|
+
if response['Response'].key?('Error') == false
|
1791
|
+
model = VatInvoiceVerifyNewResponse.new
|
1792
|
+
model.deserialize(response['Response'])
|
1793
|
+
model
|
1794
|
+
else
|
1795
|
+
code = response['Response']['Error']['Code']
|
1796
|
+
message = response['Response']['Error']['Message']
|
1797
|
+
reqid = response['Response']['RequestId']
|
1798
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1799
|
+
end
|
1800
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1801
|
+
raise e
|
1802
|
+
rescue StandardError => e
|
1803
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1804
|
+
end
|
1805
|
+
|
1782
1806
|
# 本接口支持对增值税发票(卷票)的发票代码、发票号码、日期、校验码、合计金额(小写)等关键字段的识别。
|
1783
1807
|
|
1784
1808
|
# @param request: Request instance for VatRollInvoiceOCR.
|
data/lib/v20181119/models.rb
CHANGED
@@ -3447,6 +3447,38 @@ module TencentCloud
|
|
3447
3447
|
end
|
3448
3448
|
end
|
3449
3449
|
|
3450
|
+
# 通行费发票信息
|
3451
|
+
class PassInvoiceInfo < TencentCloud::Common::AbstractModel
|
3452
|
+
# @param NumberPlate: 通行费车牌号
|
3453
|
+
# @type NumberPlate: String
|
3454
|
+
# @param Type: 通行费类型
|
3455
|
+
# @type Type: String
|
3456
|
+
# @param PassDateBegin: 通行日期起
|
3457
|
+
# @type PassDateBegin: String
|
3458
|
+
# @param PassDateEnd: 通行日期止
|
3459
|
+
# @type PassDateEnd: String
|
3460
|
+
# @param TaxClassifyCode: 税收分类编码
|
3461
|
+
# @type TaxClassifyCode: String
|
3462
|
+
|
3463
|
+
attr_accessor :NumberPlate, :Type, :PassDateBegin, :PassDateEnd, :TaxClassifyCode
|
3464
|
+
|
3465
|
+
def initialize(numberplate=nil, type=nil, passdatebegin=nil, passdateend=nil, taxclassifycode=nil)
|
3466
|
+
@NumberPlate = numberplate
|
3467
|
+
@Type = type
|
3468
|
+
@PassDateBegin = passdatebegin
|
3469
|
+
@PassDateEnd = passdateend
|
3470
|
+
@TaxClassifyCode = taxclassifycode
|
3471
|
+
end
|
3472
|
+
|
3473
|
+
def deserialize(params)
|
3474
|
+
@NumberPlate = params['NumberPlate']
|
3475
|
+
@Type = params['Type']
|
3476
|
+
@PassDateBegin = params['PassDateBegin']
|
3477
|
+
@PassDateEnd = params['PassDateEnd']
|
3478
|
+
@TaxClassifyCode = params['TaxClassifyCode']
|
3479
|
+
end
|
3480
|
+
end
|
3481
|
+
|
3450
3482
|
# PassportOCR请求参数结构体
|
3451
3483
|
class PassportOCRRequest < TencentCloud::Common::AbstractModel
|
3452
3484
|
# @param ImageBase64: 图片的 Base64 值。要求图片经Base64编码后不超过 7M,分辨率建议500*800以上,支持PNG、JPG、JPEG、BMP格式。建议卡片部分占据图片2/3以上。
|
@@ -6716,6 +6748,91 @@ module TencentCloud
|
|
6716
6748
|
end
|
6717
6749
|
end
|
6718
6750
|
|
6751
|
+
# VatInvoiceVerifyNew请求参数结构体
|
6752
|
+
class VatInvoiceVerifyNewRequest < TencentCloud::Common::AbstractModel
|
6753
|
+
# @param InvoiceNo: 发票号码,8位、20位(全电票)
|
6754
|
+
# @type InvoiceNo: String
|
6755
|
+
# @param InvoiceDate: 开票日期(不支持当天发票查询,支持五年以内开具的发票),格式:“YYYY-MM-DD”,如:2019-12-20。
|
6756
|
+
# @type InvoiceDate: String
|
6757
|
+
# @param InvoiceCode: 发票代码(10或12 位),全电发票为空。查验未成功超过5次后当日无法再查。
|
6758
|
+
# @type InvoiceCode: String
|
6759
|
+
# @param InvoiceKind: 票种类型 01:增值税专用发票, 02:货运运输业增值税专用发 票, 03:机动车销售统一发票, 04:增值税普通发票, 08:增值税电子专用发票(含全电), 10:增值税电子普通发票(含全电), 11:增值税普通发票(卷式), 14:增值税电子(通行费)发 票, 15:二手车销售统一发票, 32:深圳区块链发票(云南区块链因业务调整现已下线)。
|
6760
|
+
# @type InvoiceKind: String
|
6761
|
+
# @param CheckCode: 校验码后 6 位,增值税普通发票、增值税电子普通发票、增值税普通发票(卷式)、增值税电子普通发票(通行费)时必填;
|
6762
|
+
# 区块链为 5 位
|
6763
|
+
# @type CheckCode: String
|
6764
|
+
# @param Amount: 不含税金额,增值税专用发票、增值税电子专用发票、机动车销售统一发票、二手车销售统一发票、区块链发票时必填; 全电发票为价税合计(含税金额)
|
6765
|
+
# @type Amount: String
|
6766
|
+
|
6767
|
+
attr_accessor :InvoiceNo, :InvoiceDate, :InvoiceCode, :InvoiceKind, :CheckCode, :Amount
|
6768
|
+
|
6769
|
+
def initialize(invoiceno=nil, invoicedate=nil, invoicecode=nil, invoicekind=nil, checkcode=nil, amount=nil)
|
6770
|
+
@InvoiceNo = invoiceno
|
6771
|
+
@InvoiceDate = invoicedate
|
6772
|
+
@InvoiceCode = invoicecode
|
6773
|
+
@InvoiceKind = invoicekind
|
6774
|
+
@CheckCode = checkcode
|
6775
|
+
@Amount = amount
|
6776
|
+
end
|
6777
|
+
|
6778
|
+
def deserialize(params)
|
6779
|
+
@InvoiceNo = params['InvoiceNo']
|
6780
|
+
@InvoiceDate = params['InvoiceDate']
|
6781
|
+
@InvoiceCode = params['InvoiceCode']
|
6782
|
+
@InvoiceKind = params['InvoiceKind']
|
6783
|
+
@CheckCode = params['CheckCode']
|
6784
|
+
@Amount = params['Amount']
|
6785
|
+
end
|
6786
|
+
end
|
6787
|
+
|
6788
|
+
# VatInvoiceVerifyNew返回参数结构体
|
6789
|
+
class VatInvoiceVerifyNewResponse < TencentCloud::Common::AbstractModel
|
6790
|
+
# @param Invoice: 增值税发票信息,详情请点击左侧链接。
|
6791
|
+
# @type Invoice: :class:`Tencentcloud::Ocr.v20181119.models.VatInvoice`
|
6792
|
+
# @param VehicleInvoiceInfo: 机动车销售统一发票信息
|
6793
|
+
# @type VehicleInvoiceInfo: :class:`Tencentcloud::Ocr.v20181119.models.VehicleInvoiceInfo`
|
6794
|
+
# @param UsedVehicleInvoiceInfo: 二手车销售统一发票信息
|
6795
|
+
# @type UsedVehicleInvoiceInfo: :class:`Tencentcloud::Ocr.v20181119.models.UsedVehicleInvoiceInfo`
|
6796
|
+
# @param PassInvoiceInfoList: 通行费发票信息
|
6797
|
+
# @type PassInvoiceInfoList: Array
|
6798
|
+
# @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
6799
|
+
# @type RequestId: String
|
6800
|
+
|
6801
|
+
attr_accessor :Invoice, :VehicleInvoiceInfo, :UsedVehicleInvoiceInfo, :PassInvoiceInfoList, :RequestId
|
6802
|
+
|
6803
|
+
def initialize(invoice=nil, vehicleinvoiceinfo=nil, usedvehicleinvoiceinfo=nil, passinvoiceinfolist=nil, requestid=nil)
|
6804
|
+
@Invoice = invoice
|
6805
|
+
@VehicleInvoiceInfo = vehicleinvoiceinfo
|
6806
|
+
@UsedVehicleInvoiceInfo = usedvehicleinvoiceinfo
|
6807
|
+
@PassInvoiceInfoList = passinvoiceinfolist
|
6808
|
+
@RequestId = requestid
|
6809
|
+
end
|
6810
|
+
|
6811
|
+
def deserialize(params)
|
6812
|
+
unless params['Invoice'].nil?
|
6813
|
+
@Invoice = VatInvoice.new
|
6814
|
+
@Invoice.deserialize(params['Invoice'])
|
6815
|
+
end
|
6816
|
+
unless params['VehicleInvoiceInfo'].nil?
|
6817
|
+
@VehicleInvoiceInfo = VehicleInvoiceInfo.new
|
6818
|
+
@VehicleInvoiceInfo.deserialize(params['VehicleInvoiceInfo'])
|
6819
|
+
end
|
6820
|
+
unless params['UsedVehicleInvoiceInfo'].nil?
|
6821
|
+
@UsedVehicleInvoiceInfo = UsedVehicleInvoiceInfo.new
|
6822
|
+
@UsedVehicleInvoiceInfo.deserialize(params['UsedVehicleInvoiceInfo'])
|
6823
|
+
end
|
6824
|
+
unless params['PassInvoiceInfoList'].nil?
|
6825
|
+
@PassInvoiceInfoList = []
|
6826
|
+
params['PassInvoiceInfoList'].each do |i|
|
6827
|
+
passinvoiceinfo_tmp = PassInvoiceInfo.new
|
6828
|
+
passinvoiceinfo_tmp.deserialize(i)
|
6829
|
+
@PassInvoiceInfoList << passinvoiceinfo_tmp
|
6830
|
+
end
|
6831
|
+
end
|
6832
|
+
@RequestId = params['RequestId']
|
6833
|
+
end
|
6834
|
+
end
|
6835
|
+
|
6719
6836
|
# VatInvoiceVerify请求参数结构体
|
6720
6837
|
class VatInvoiceVerifyRequest < TencentCloud::Common::AbstractModel
|
6721
6838
|
# @param InvoiceCode: 发票代码, 一张发票一天只能查询5次。
|
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: 1.0.
|
4
|
+
version: 1.0.310
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tencent Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tencentcloud-sdk-common
|