@riocrypto/common 1.0.1219 → 1.0.1221
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KYCFieldAsset = void 0;
|
|
4
|
+
const country_of_origin_1 = require("../types/country-of-origin");
|
|
5
|
+
const CountryAsset_1 = require("./CountryAsset");
|
|
6
|
+
class KYCFieldAsset {
|
|
7
|
+
constructor(field, country) {
|
|
8
|
+
this.field = field;
|
|
9
|
+
this.country = country;
|
|
10
|
+
}
|
|
11
|
+
getName() {
|
|
12
|
+
if (this.field === "personalId") {
|
|
13
|
+
if (this.country === country_of_origin_1.CountryOfOrigin.UnitedStates) {
|
|
14
|
+
return "Social Security Number";
|
|
15
|
+
}
|
|
16
|
+
else if (this.country === country_of_origin_1.CountryOfOrigin.Mexico) {
|
|
17
|
+
return "CURP";
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return `${new CountryAsset_1.CountryAsset(this.country).getName()} Personal Identification Number`;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
if (this.country === country_of_origin_1.CountryOfOrigin.UnitedStates) {
|
|
25
|
+
return "Employer Identification Number";
|
|
26
|
+
}
|
|
27
|
+
else if (this.country === country_of_origin_1.CountryOfOrigin.Mexico) {
|
|
28
|
+
return "RFC";
|
|
29
|
+
}
|
|
30
|
+
else if (this.country === country_of_origin_1.CountryOfOrigin.Brazil) {
|
|
31
|
+
return "CPF";
|
|
32
|
+
}
|
|
33
|
+
else if (this.country === country_of_origin_1.CountryOfOrigin.Peru) {
|
|
34
|
+
return "RUC";
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return `${new CountryAsset_1.CountryAsset(this.country).getName()} Personal Identification Number`;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.KYCFieldAsset = KYCFieldAsset;
|
package/build/index.d.ts
CHANGED
|
@@ -200,6 +200,7 @@ export * from "./types/risk-tier";
|
|
|
200
200
|
export * from "./types/market-data";
|
|
201
201
|
export * from "./types/KYCFileType";
|
|
202
202
|
export * from "./classes/Asset";
|
|
203
|
+
export * from "./classes/KYCFieldClass";
|
|
203
204
|
export * from "./classes/CountryAsset";
|
|
204
205
|
export * from "./classes/CryptoAsset";
|
|
205
206
|
export * from "./classes/FiatAsset";
|
package/build/index.js
CHANGED
|
@@ -216,6 +216,7 @@ __exportStar(require("./types/risk-tier"), exports);
|
|
|
216
216
|
__exportStar(require("./types/market-data"), exports);
|
|
217
217
|
__exportStar(require("./types/KYCFileType"), exports);
|
|
218
218
|
__exportStar(require("./classes/Asset"), exports);
|
|
219
|
+
__exportStar(require("./classes/KYCFieldClass"), exports);
|
|
219
220
|
__exportStar(require("./classes/CountryAsset"), exports);
|
|
220
221
|
__exportStar(require("./classes/CryptoAsset"), exports);
|
|
221
222
|
__exportStar(require("./classes/FiatAsset"), exports);
|