UNPKG

capacitor-plugin-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK for Capacitor

31 lines 1.18 kB
/// Auto-generated. Modifications will be overwritten. /// Generated from core/document-schemas/CreditCardDocumentModel.yaml export const CreditCardDocumentType = 'CreditCard'; /** Credit Card Document */ export class CreditCard { get document() { return this._document; } constructor(document) { if (document.type.name !== this.requiredDocumentType()) { throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`); } this._document = document; } requiredDocumentType() { return CreditCardDocumentType; } /** The card number of the recognized credit card */ get cardNumber() { return this.document.fields.find((f) => f.type.name === 'CardNumber'); } /** The cardholder name of the recognized credit card */ get cardholderName() { return this.document.fields.find((f) => f.type.name === 'CardholderName'); } /** The expiry date of the recognized credit card */ get expiryDate() { return this.document.fields.find((f) => f.type.name === 'ExpiryDate'); } } //# sourceMappingURL=CreditCardDocumentModel.js.map