@adyen/kyc-components
Version:
This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.
18 lines (17 loc) • 1.21 kB
JavaScript
try {
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e67376ac-dd31-4e26-9275-118e98da660e", e._sentryDebugIdIdentifier = "sentry-dbid-e67376ac-dd31-4e26-9275-118e98da660e");
} catch (e) {}
import { t as LegalEntityTypes } from "./legal-entity-type-VIfNYnJP.js";
//#region src/utils/getLegalEntityCountry.ts
var getLegalEntityCountry = (le) => {
switch (le.type) {
case LegalEntityTypes.INDIVIDUAL: return le.individual.residentialAddress.country;
case LegalEntityTypes.ORGANIZATION: return le.organization.registeredAddress.country;
case LegalEntityTypes.TRUST: return le.trust.countryOfGoverningLaw ?? le.trust.registeredAddress.country;
case LegalEntityTypes.SOLE_PROPRIETORSHIP: return le.soleProprietorship.registeredAddress.country;
case LegalEntityTypes.UNINCORPORATED_PARTNERSHIP: return le.unincorporatedPartnership.countryOfGoverningLaw ?? le.unincorporatedPartnership.registeredAddress.country;
}
};
//#endregion
export { getLegalEntityCountry as t };