UNPKG

@automattic/wpcom-checkout

Version:
59 lines 2.36 kB
import type { ResponseCart } from '@automattic/shopping-cart'; /** * Returns whether we should Ebanx credit card processing for a particular country * @param {string} countryCode - a two-letter country code, e.g., 'DE', 'BR' * @param {import('@automattic/shopping-cart').ResponseCart} cart - The shopping cart * @returns {boolean} Whether the country code requires ebanx payment processing */ export declare function isEbanxCreditCardProcessingEnabledForCountry(countryCode: string, cart: ResponseCart): boolean; /** * CPF number (Cadastrado de Pessoas Físicas) is the Brazilian tax identification number. * Total of 11 digits: 9 numbers followed by 2 verification numbers . E.g., 188.247.019-22 * @param {string} cpf - a Brazilian tax identification number * @returns {boolean} Whether the cpf is valid or not */ export declare function isValidCPF(cpf: string): boolean; /** * CNPJ number (Cadastro Nacional da Pessoa Jurídica ) is the Brazilian tax identification number for companies. * Total of 14 digits: 8 digits identify the company, a slash, 4 digit to identify the branch, followed by 2 verification numbers . E.g., 67.762.675/0001-49 * @param {string} cnpj - a Brazilian company tax identification number * @returns {boolean} Whether the cnpj is valid or not */ export declare function isValidCNPJ(cnpj: string): boolean; export declare function fullAddressFieldsRules(): { 'street-number': { description: string; rules: string[]; }; 'address-1': { description: string; rules: string[]; }; state: { description: string; rules: string[]; }; city: { description: string; rules: string[]; }; 'postal-code': { description: string; rules: string[]; }; }; export interface FieldRule { description: string; rules: string[]; } export type FieldRuleCollection = Record<string, FieldRule>; /** * Returns country/processor specific validation rule sets for defined fields. * @param {string} country two-letter country code to determine the required fields */ export declare function countrySpecificFieldRules(country: string): FieldRuleCollection; export declare function translatedEbanxError(error: { status_code: string; message?: string; }): string; //# sourceMappingURL=processor-specific.d.ts.map