OcrRequest class abstract

身份证 OCR 请求

appId 腾讯云控制台申请的 WBappid userId 用户唯一标识 orderNo 本次请求的唯一订单号,最长 32 个字符 apiVersion 参与本次签名的接口版本 nonce 单次请求的一次性随机字符串 sign 由服务端生成的单次签名

Available extensions
Annotations
  • @Freezed.new(toStringOverride: false)

Constructors

OcrRequest({required String appId, required String userId, required String orderNo, @JsonKey.new(name: 'version') required String apiVersion, required String nonce, required String sign})
const
factory
OcrRequest.fromJson(Map<String, dynamic> json)
factory

Properties

apiVersion → String
no setterinherited
appId → String
no setterinherited
copyWith → $OcrRequestCopyWith<OcrRequest>
Create a copy of OcrRequest with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
nonce → String
no setterinherited
orderNo → String
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sign → String
no setterinherited
userId → String
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_OcrRequest value)) → TResult

Available on OcrRequest, provided by the OcrRequestPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_OcrRequest value)?) → TResult?

Available on OcrRequest, provided by the OcrRequestPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_OcrRequest value)?, {required TResult orElse()}) → TResult

Available on OcrRequest, provided by the OcrRequestPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String appId, String userId, String orderNo, String apiVersion, String nonce, String sign)?, {required TResult orElse()}) → TResult

Available on OcrRequest, provided by the OcrRequestPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this OcrRequest to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String appId, String userId, String orderNo, String apiVersion, String nonce, String sign)) → TResult

Available on OcrRequest, provided by the OcrRequestPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String appId, String userId, String orderNo, String apiVersion, String nonce, String sign)?) → TResult?

Available on OcrRequest, provided by the OcrRequestPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) → bool
The equality operator.
inherited