Skip to content

Commit 23c7aea

Browse files
committed
Update API Initialize: add request parameters DateOfBirth.
1 parent d7adc94 commit 23c7aea

File tree

4 files changed

+681
-4
lines changed

4 files changed

+681
-4
lines changed

ChangeLog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2025-04-23 Version: 3.4.2
2+
- Update API Initialize: add request parameters DateOfBirth.
3+
- Update API Initialize: add request parameters DateOfExpiry.
4+
- Update API Initialize: add request parameters DocPageConfig.
5+
- Update API Initialize: add request parameters DocumentNumber.
6+
- Update API Initialize: add request parameters MRTDInput.
7+
- Update API Initialize: add request parameters UseNFC.
8+
9+
110
2025-04-21 Version: 3.4.1
211
- Generated php 2022-08-09 for Cloudauth-intl.
312

src/Cloudauthintl.php

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\Id2MetaVerifyIntlResponse;
3434
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\InitializeRequest;
3535
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\InitializeResponse;
36+
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\InitializeShrinkRequest;
3637
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\Mobile3MetaVerifyIntlRequest;
3738
use AlibabaCloud\SDK\Cloudauthintl\V20220809\Models\Mobile3MetaVerifyIntlResponse;
3839
use Darabonba\OpenApi\Models\OpenApiRequest;
@@ -1116,19 +1117,25 @@ public function id2MetaVerifyIntl($request)
11161117
/**
11171118
* 认证初始化.
11181119
*
1119-
* @param request - InitializeRequest
1120+
* @param tmpReq - InitializeRequest
11201121
* @param runtime - runtime options for this request RuntimeOptions
11211122
*
11221123
* @returns InitializeResponse
11231124
*
1124-
* @param InitializeRequest $request
1125+
* @param InitializeRequest $tmpReq
11251126
* @param RuntimeOptions $runtime
11261127
*
11271128
* @return InitializeResponse
11281129
*/
1129-
public function initializeWithOptions($request, $runtime)
1130+
public function initializeWithOptions($tmpReq, $runtime)
11301131
{
1131-
$request->validate();
1132+
$tmpReq->validate();
1133+
$request = new InitializeShrinkRequest([]);
1134+
Utils::convert($tmpReq, $request);
1135+
if (null !== $tmpReq->docPageConfig) {
1136+
$request->docPageConfigShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->docPageConfig, 'DocPageConfig', 'json');
1137+
}
1138+
11321139
$query = [];
11331140
if (null !== $request->appQualityCheck) {
11341141
@$query['AppQualityCheck'] = $request->appQualityCheck;
@@ -1150,6 +1157,18 @@ public function initializeWithOptions($request, $runtime)
11501157
@$query['Crop'] = $request->crop;
11511158
}
11521159

1160+
if (null !== $request->dateOfBirth) {
1161+
@$query['DateOfBirth'] = $request->dateOfBirth;
1162+
}
1163+
1164+
if (null !== $request->dateOfExpiry) {
1165+
@$query['DateOfExpiry'] = $request->dateOfExpiry;
1166+
}
1167+
1168+
if (null !== $request->docPageConfigShrink) {
1169+
@$query['DocPageConfig'] = $request->docPageConfigShrink;
1170+
}
1171+
11531172
if (null !== $request->docScanMode) {
11541173
@$query['DocScanMode'] = $request->docScanMode;
11551174
}
@@ -1162,6 +1181,10 @@ public function initializeWithOptions($request, $runtime)
11621181
@$query['DocVideo'] = $request->docVideo;
11631182
}
11641183

1184+
if (null !== $request->documentNumber) {
1185+
@$query['DocumentNumber'] = $request->documentNumber;
1186+
}
1187+
11651188
if (null !== $request->experienceCode) {
11661189
@$query['ExperienceCode'] = $request->experienceCode;
11671190
}
@@ -1186,6 +1209,10 @@ public function initializeWithOptions($request, $runtime)
11861209
@$query['LanguageConfig'] = $request->languageConfig;
11871210
}
11881211

1212+
if (null !== $request->MRTDInput) {
1213+
@$query['MRTDInput'] = $request->MRTDInput;
1214+
}
1215+
11891216
if (null !== $request->merchantBizId) {
11901217
@$query['MerchantBizId'] = $request->merchantBizId;
11911218
}
@@ -1246,6 +1273,10 @@ public function initializeWithOptions($request, $runtime)
12461273
@$query['StyleConfig'] = $request->styleConfig;
12471274
}
12481275

1276+
if (null !== $request->useNFC) {
1277+
@$query['UseNFC'] = $request->useNFC;
1278+
}
1279+
12491280
$body = [];
12501281
if (null !== $request->facePictureBase64) {
12511282
@$body['FacePictureBase64'] = $request->facePictureBase64;

src/Models/InitializeRequest.php

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,21 @@ class InitializeRequest extends Model
3333
*/
3434
public $crop;
3535

36+
/**
37+
* @var string
38+
*/
39+
public $dateOfBirth;
40+
41+
/**
42+
* @var string
43+
*/
44+
public $dateOfExpiry;
45+
46+
/**
47+
* @var string[]
48+
*/
49+
public $docPageConfig;
50+
3651
/**
3752
* @var string
3853
*/
@@ -48,6 +63,11 @@ class InitializeRequest extends Model
4863
*/
4964
public $docVideo;
5065

66+
/**
67+
* @var string
68+
*/
69+
public $documentNumber;
70+
5171
/**
5272
* @var string
5373
*/
@@ -83,6 +103,11 @@ class InitializeRequest extends Model
83103
*/
84104
public $languageConfig;
85105

106+
/**
107+
* @var string
108+
*/
109+
public $MRTDInput;
110+
86111
/**
87112
* @var string
88113
*/
@@ -157,22 +182,32 @@ class InitializeRequest extends Model
157182
* @var string
158183
*/
159184
public $styleConfig;
185+
186+
/**
187+
* @var string
188+
*/
189+
public $useNFC;
160190
protected $_name = [
161191
'appQualityCheck' => 'AppQualityCheck',
162192
'authorize' => 'Authorize',
163193
'callbackToken' => 'CallbackToken',
164194
'callbackUrl' => 'CallbackUrl',
165195
'crop' => 'Crop',
196+
'dateOfBirth' => 'DateOfBirth',
197+
'dateOfExpiry' => 'DateOfExpiry',
198+
'docPageConfig' => 'DocPageConfig',
166199
'docScanMode' => 'DocScanMode',
167200
'docType' => 'DocType',
168201
'docVideo' => 'DocVideo',
202+
'documentNumber' => 'DocumentNumber',
169203
'experienceCode' => 'ExperienceCode',
170204
'facePictureBase64' => 'FacePictureBase64',
171205
'facePictureUrl' => 'FacePictureUrl',
172206
'idFaceQuality' => 'IdFaceQuality',
173207
'idSpoof' => 'IdSpoof',
174208
'idThreshold' => 'IdThreshold',
175209
'languageConfig' => 'LanguageConfig',
210+
'MRTDInput' => 'MRTDInput',
176211
'merchantBizId' => 'MerchantBizId',
177212
'merchantUserId' => 'MerchantUserId',
178213
'metaInfo' => 'MetaInfo',
@@ -188,10 +223,14 @@ class InitializeRequest extends Model
188223
'showGuidePage' => 'ShowGuidePage',
189224
'showOcrResult' => 'ShowOcrResult',
190225
'styleConfig' => 'StyleConfig',
226+
'useNFC' => 'UseNFC',
191227
];
192228

193229
public function validate()
194230
{
231+
if (\is_array($this->docPageConfig)) {
232+
Model::validateArray($this->docPageConfig);
233+
}
195234
parent::validate();
196235
}
197236

@@ -218,6 +257,24 @@ public function toArray($noStream = false)
218257
$res['Crop'] = $this->crop;
219258
}
220259

260+
if (null !== $this->dateOfBirth) {
261+
$res['DateOfBirth'] = $this->dateOfBirth;
262+
}
263+
264+
if (null !== $this->dateOfExpiry) {
265+
$res['DateOfExpiry'] = $this->dateOfExpiry;
266+
}
267+
268+
if (null !== $this->docPageConfig) {
269+
if (\is_array($this->docPageConfig)) {
270+
$res['DocPageConfig'] = [];
271+
$n1 = 0;
272+
foreach ($this->docPageConfig as $item1) {
273+
$res['DocPageConfig'][$n1++] = $item1;
274+
}
275+
}
276+
}
277+
221278
if (null !== $this->docScanMode) {
222279
$res['DocScanMode'] = $this->docScanMode;
223280
}
@@ -230,6 +287,10 @@ public function toArray($noStream = false)
230287
$res['DocVideo'] = $this->docVideo;
231288
}
232289

290+
if (null !== $this->documentNumber) {
291+
$res['DocumentNumber'] = $this->documentNumber;
292+
}
293+
233294
if (null !== $this->experienceCode) {
234295
$res['ExperienceCode'] = $this->experienceCode;
235296
}
@@ -258,6 +319,10 @@ public function toArray($noStream = false)
258319
$res['LanguageConfig'] = $this->languageConfig;
259320
}
260321

322+
if (null !== $this->MRTDInput) {
323+
$res['MRTDInput'] = $this->MRTDInput;
324+
}
325+
261326
if (null !== $this->merchantBizId) {
262327
$res['MerchantBizId'] = $this->merchantBizId;
263328
}
@@ -318,6 +383,10 @@ public function toArray($noStream = false)
318383
$res['StyleConfig'] = $this->styleConfig;
319384
}
320385

386+
if (null !== $this->useNFC) {
387+
$res['UseNFC'] = $this->useNFC;
388+
}
389+
321390
return $res;
322391
}
323392

@@ -349,6 +418,24 @@ public static function fromMap($map = [])
349418
$model->crop = $map['Crop'];
350419
}
351420

421+
if (isset($map['DateOfBirth'])) {
422+
$model->dateOfBirth = $map['DateOfBirth'];
423+
}
424+
425+
if (isset($map['DateOfExpiry'])) {
426+
$model->dateOfExpiry = $map['DateOfExpiry'];
427+
}
428+
429+
if (isset($map['DocPageConfig'])) {
430+
if (!empty($map['DocPageConfig'])) {
431+
$model->docPageConfig = [];
432+
$n1 = 0;
433+
foreach ($map['DocPageConfig'] as $item1) {
434+
$model->docPageConfig[$n1++] = $item1;
435+
}
436+
}
437+
}
438+
352439
if (isset($map['DocScanMode'])) {
353440
$model->docScanMode = $map['DocScanMode'];
354441
}
@@ -361,6 +448,10 @@ public static function fromMap($map = [])
361448
$model->docVideo = $map['DocVideo'];
362449
}
363450

451+
if (isset($map['DocumentNumber'])) {
452+
$model->documentNumber = $map['DocumentNumber'];
453+
}
454+
364455
if (isset($map['ExperienceCode'])) {
365456
$model->experienceCode = $map['ExperienceCode'];
366457
}
@@ -389,6 +480,10 @@ public static function fromMap($map = [])
389480
$model->languageConfig = $map['LanguageConfig'];
390481
}
391482

483+
if (isset($map['MRTDInput'])) {
484+
$model->MRTDInput = $map['MRTDInput'];
485+
}
486+
392487
if (isset($map['MerchantBizId'])) {
393488
$model->merchantBizId = $map['MerchantBizId'];
394489
}
@@ -449,6 +544,10 @@ public static function fromMap($map = [])
449544
$model->styleConfig = $map['StyleConfig'];
450545
}
451546

547+
if (isset($map['UseNFC'])) {
548+
$model->useNFC = $map['UseNFC'];
549+
}
550+
452551
return $model;
453552
}
454553
}

0 commit comments

Comments
 (0)