@riocrypto/common 1.0.1231 → 1.0.1232

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.
@@ -1,7 +1,7 @@
1
1
  import { CountryOfOrigin } from "../types/country-of-origin";
2
2
  export declare class KYCFieldAsset {
3
3
  field: "personalId" | "taxId";
4
- private country;
5
- constructor(field: "personalId" | "taxId", country: CountryOfOrigin);
4
+ private countryOfOrigin;
5
+ constructor(field: "personalId" | "taxId", countryOfOrigin: CountryOfOrigin);
6
6
  getName(): string;
7
7
  }
@@ -4,37 +4,37 @@ exports.KYCFieldAsset = void 0;
4
4
  const country_of_origin_1 = require("../types/country-of-origin");
5
5
  const CountryAsset_1 = require("./CountryAsset");
6
6
  class KYCFieldAsset {
7
- constructor(field, country) {
7
+ constructor(field, countryOfOrigin) {
8
8
  this.field = field;
9
- this.country = country;
9
+ this.countryOfOrigin = countryOfOrigin;
10
10
  }
11
11
  getName() {
12
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) {
13
+ if (this.countryOfOrigin === country_of_origin_1.CountryOfOrigin.Mexico) {
17
14
  return "CURP";
18
15
  }
16
+ else if (this.countryOfOrigin === country_of_origin_1.CountryOfOrigin.Peru) {
17
+ return "DNI";
18
+ }
19
19
  else {
20
- return `${new CountryAsset_1.CountryAsset(this.country).getName()} Personal Identification Number`;
20
+ return `${new CountryAsset_1.CountryAsset(this.countryOfOrigin).getName()} Personal Identification Number`;
21
21
  }
22
22
  }
23
23
  else {
24
- if (this.country === country_of_origin_1.CountryOfOrigin.UnitedStates) {
24
+ if (this.countryOfOrigin === country_of_origin_1.CountryOfOrigin.UnitedStates) {
25
25
  return "Employer Identification Number";
26
26
  }
27
- else if (this.country === country_of_origin_1.CountryOfOrigin.Mexico) {
27
+ else if (this.countryOfOrigin === country_of_origin_1.CountryOfOrigin.Mexico) {
28
28
  return "RFC";
29
29
  }
30
- else if (this.country === country_of_origin_1.CountryOfOrigin.Brazil) {
30
+ else if (this.countryOfOrigin === country_of_origin_1.CountryOfOrigin.Brazil) {
31
31
  return "CPF";
32
32
  }
33
- else if (this.country === country_of_origin_1.CountryOfOrigin.Peru) {
33
+ else if (this.countryOfOrigin === country_of_origin_1.CountryOfOrigin.Peru) {
34
34
  return "RUC";
35
35
  }
36
36
  else {
37
- return `${new CountryAsset_1.CountryAsset(this.country).getName()} Personal Identification Number`;
37
+ return `${new CountryAsset_1.CountryAsset(this.countryOfOrigin).getName()} Tax Identification Number`;
38
38
  }
39
39
  }
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1231",
3
+ "version": "1.0.1232",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",