import { Account } from './types/Accounts'; import { TierType } from './types/TierType'; /** * Returns true if the given tier type can be subject to VAT */ export declare const isTierTypeSubjectToVAT: (tierType: TierType | `${TierType}`) => boolean; /** * For a given tier type, this function returns the country that should be used * for calculating the percentage. */ export declare const getVatOriginCountry: (tierType: TierType | `${TierType}`, hostCountry: string | null, collectiveCountry: string | null) => string | null; /** * Returns true if VAT is enabled for this account */ export declare const accountHasVAT: (account: Account | null, host: Account | null) => boolean; declare enum AccountVATType { OWN = "OWN", HOST = "HOST" } export type VATSettings = { number?: string; type?: AccountVATType; disabled?: boolean; }; export declare const getAccountVATType: (account: Account | null, host: Account | null) => AccountVATType | null; /** * Returns true if VAT may apply. * * @param tierType - the tier type (eg. SUPPORT, TICKET...) * @param originCOuntry - two letters country where VAT is applied */ export declare const vatMayApply: (tierType: TierType | `${TierType}`, originCountry: string | null) => boolean; /** * Get the base vat percentage for this host/collective/tier as a number between 0 and 100 */ export declare const getStandardVatRate: (tierType: TierType | `${TierType}`, originCountry: string | null) => number; /** * Calculates the vat rate. * * @param tierType - the tier type (eg. SUPPORT, TICKET...) * @param originCountry - two letters country where VAT is applied * @param userCountry - two letters country code of the payer * @param hasValidVatNumber - (optional) payer VAT identification number * * @returns {Number} `0` if no VAT applies or the percentage as a number between 0 and 100 */ export declare const getVatPercentage: (tierType: TierType | `${TierType}`, originCountry: string | null, userCountry: string, hasValidVatNumber: boolean) => number; /** * Check the formatof a VAT ID number. * * @param number: The VAT number to check * @param countryCode: Provide a country code if you want to check against a single country code * @returns {object} * - value: Standardized number * - isValid * - country: { isoCode: { short } } */ export declare const checkVATNumberFormat: (number: string, countryCode?: string) => import("jsvat-next").VatCheckResult; export {};