1+ // Copyright 2018 JDCLOUD.COM
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+ //
15+ // NOTE: This class is auto generated by the jdcloud code generator program.
16+
17+ package apis
18+
19+ import (
20+ "github.com/jdcloud-api/jdcloud-sdk-go/core"
21+ )
22+
23+ type BusinessOCRRequest struct {
24+
25+ core.JDCloudRequest
26+
27+ /* 营业执照图像base64(支持base64编码后小于3M) */
28+ ImageData string `json:"imageData"`
29+ }
30+
31+ /*
32+ * param imageData: 营业执照图像base64(支持base64编码后小于3M) (Required)
33+ *
34+ * @Deprecated, not compatible when mandatory parameters changed
35+ */
36+ func NewBusinessOCRRequest (
37+ imageData string ,
38+ ) * BusinessOCRRequest {
39+
40+ return & BusinessOCRRequest {
41+ JDCloudRequest : core.JDCloudRequest {
42+ URL : "/ocr:Business" ,
43+ Method : "POST" ,
44+ Header : nil ,
45+ Version : "v1" ,
46+ },
47+ ImageData : imageData ,
48+ }
49+ }
50+
51+ /*
52+ * param imageData: 营业执照图像base64(支持base64编码后小于3M) (Required)
53+ */
54+ func NewBusinessOCRRequestWithAllParams (
55+ imageData string ,
56+ ) * BusinessOCRRequest {
57+
58+ return & BusinessOCRRequest {
59+ JDCloudRequest : core.JDCloudRequest {
60+ URL : "/ocr:Business" ,
61+ Method : "POST" ,
62+ Header : nil ,
63+ Version : "v1" ,
64+ },
65+ ImageData : imageData ,
66+ }
67+ }
68+
69+ /* This constructor has better compatible ability when API parameters changed */
70+ func NewBusinessOCRRequestWithoutParam () * BusinessOCRRequest {
71+
72+ return & BusinessOCRRequest {
73+ JDCloudRequest : core.JDCloudRequest {
74+ URL : "/ocr:Business" ,
75+ Method : "POST" ,
76+ Header : nil ,
77+ Version : "v1" ,
78+ },
79+ }
80+ }
81+
82+ /* param imageData: 营业执照图像base64(支持base64编码后小于3M)(Required) */
83+ func (r * BusinessOCRRequest ) SetImageData (imageData string ) {
84+ r .ImageData = imageData
85+ }
86+
87+
88+ // GetRegionId returns path parameter 'regionId' if exist,
89+ // otherwise return empty string
90+ func (r BusinessOCRRequest ) GetRegionId () string {
91+ return ""
92+ }
93+
94+ type BusinessOCRResponse struct {
95+ RequestID string `json:"requestId"`
96+ Error core.ErrorResponse `json:"error"`
97+ Result BusinessOCRResult `json:"result"`
98+ }
99+
100+ type BusinessOCRResult struct {
101+ Status string `json:"status"`
102+ Code string `json:"code"`
103+ Number string `json:"number"`
104+ Name string `json:"name"`
105+ CompanyType string `json:"companyType"`
106+ Address string `json:"address"`
107+ LegalPersonal string `json:"legalPersonal"`
108+ RegisteredCapital string `json:"registeredCapital"`
109+ Date string `json:"date"`
110+ Scope string `json:"scope"`
111+ RegistrationDate string `json:"registrationDate"`
112+ ChargeFlag string `json:"chargeFlag"`
113+ }
0 commit comments