export interface LookupData { /** The recognized brand of the card (e.g., "Visa", "Mastercard"). */ brand?: string; /** The type of the card (e.g., "Credit", "Debit"). */ cardType?: string; /** The first six digits of the card number, typically used for BIN lookups. */ firstSixDigits?: string; /** The name of the issuing bank or institution. */ issuer?: string; /** The country name of the issuing bank (e.g., "United States"). */ issuerCountry?: string; /** The two-letter country code (ISO 3166-1 alpha-2) of the issuer (e.g., "US"). */ issuerCountryCode?: string; /** The product or category of the card (e.g., "Gold", "Platinum"). */ product?: string; } export function lookupDataFromJson(json: { [key: string]: any }): LookupData { return { brand: json.brand, cardType: json.card_type, firstSixDigits: json.first_six_digits, issuer: json.issuer, issuerCountry: json.issuer_country, issuerCountryCode: json.issuer_country_code, product: json.product, }; }