@cuenca-mx/cuenca-js 0.0.14-dev14 → 0.0.14-dev15

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,6 +1,5 @@
1
1
  import { ValidationError } from './errors/index.mjs';
2
2
  import { d as dateToUTC, e as enumValueFromString, s as VerificationType } from './data-fa5e8a84.mjs';
3
- import 'constants';
4
3
 
5
4
  class BaseRequest {
6
5
  toObject() {
@@ -408,13 +407,472 @@ class KYCValidationsRequest extends BaseRequest {
408
407
  }
409
408
  }
410
409
 
410
+ class TosUpdateRequest extends BaseRequest {
411
+ constructor({ ip, location, type, version }) {
412
+ super();
413
+ this.ipAddress = ip;
414
+ this.location = location;
415
+ this.type = type;
416
+ this.version = version;
417
+ }
418
+
419
+ get ip() {
420
+ return this._ip;
421
+ }
422
+
423
+ set ipAddress(value) {
424
+ if (!value) throw new ValidationError('missing ip address');
425
+ const ipBlocks = value.split('.');
426
+ const blocks = ipBlocks.every((block) => {
427
+ return block >= 0 && block <= 255;
428
+ });
429
+ if (blocks) {
430
+ this._ip = value;
431
+ } else {
432
+ throw new ValidationError('Invalid ip address');
433
+ }
434
+ }
435
+
436
+ toObject() {
437
+ return {
438
+ ip: this.ip,
439
+ location: this.location,
440
+ type: this.type,
441
+ version: this.version,
442
+ };
443
+ }
444
+ }
445
+
446
+ class AddressUpdateRequest extends BaseRequest {
447
+ constructor({
448
+ city,
449
+ colonia,
450
+ country,
451
+ extNumber,
452
+ fullName,
453
+ intNumber,
454
+ postalCode,
455
+ state,
456
+ street,
457
+ } = {}) {
458
+ super();
459
+ this.city = city;
460
+ this.colonia = colonia;
461
+ this.country = country;
462
+ this.extNumber = extNumber;
463
+ this.fullName = fullName;
464
+ this.intNumber = intNumber;
465
+ this.postalCode = postalCode;
466
+ this.state = state;
467
+ this.street = street;
468
+ }
469
+
470
+ toObject() {
471
+ return {
472
+ city: this.city,
473
+ colonia: this.colonia,
474
+ country: this.country,
475
+ ext_number: this.extNumber,
476
+ full_name: this.fullName,
477
+ int_number: this.intNumber,
478
+ postal_code: this.postalCode,
479
+ state: this.state,
480
+ street: this.street,
481
+ };
482
+ }
483
+ }
484
+
485
+ class KycFileRequest extends BaseRequest {
486
+ constructor({ data, isMx, status, type, uriBack, uriFront }) {
487
+ super();
488
+ this.data = data;
489
+ this.isMx = isMx;
490
+ this.status = status;
491
+ this.type = type;
492
+ this.uriBack = uriBack;
493
+ this.uriFront = uriFront;
494
+ }
495
+
496
+ toObject() {
497
+ return {
498
+ data: this.data,
499
+ is_mx: this.isMx,
500
+ status: this.status,
501
+ type: this.type,
502
+ uri_back: this.uriBack,
503
+ uri_front: this.uriFront,
504
+ };
505
+ }
506
+ }
507
+
508
+ class UserUpdateRequest extends BaseRequest {
509
+ constructor({
510
+ address,
511
+ curpDocumentUri,
512
+ govtId,
513
+ profession,
514
+ proofOfAddress,
515
+ proofOfLife,
516
+ requiredLevel,
517
+ termsOfService,
518
+ phoneNumber,
519
+ userType,
520
+ verificationId,
521
+ }) {
522
+ super();
523
+ this.addressProofs = proofOfAddress;
524
+ this.adrs = address;
525
+ this.curpDocumentUri = curpDocumentUri;
526
+ this.govstIds = govtId;
527
+ this.lifeProofs = proofOfLife;
528
+ this.profession = profession;
529
+ this.phoneNumber = phoneNumber;
530
+ this.requiredLevel = requiredLevel;
531
+ this.termsOfService = termsOfService;
532
+ this.userType = userType;
533
+ this.verificationId = verificationId;
534
+ }
535
+
536
+ get termsOfService() {
537
+ return this._termsOfService;
538
+ }
539
+
540
+ set termsOfService(value) {
541
+ if (!value) return;
542
+ this._termsOfService = new TosUpdateRequest(value).toObject();
543
+ }
544
+
545
+ get address() {
546
+ return this._address;
547
+ }
548
+
549
+ set adrs(value) {
550
+ if (!value) return;
551
+ this._address = new AddressUpdateRequest(value).toCleanObject();
552
+ }
553
+
554
+ get proofOfLife() {
555
+ return this._proofOfLife;
556
+ }
557
+
558
+ set lifeProofs(value) {
559
+ if (!value) return;
560
+ this._proofOfLife = new KycFileRequest(value).toCleanObject();
561
+ }
562
+
563
+ get proofOfAddress() {
564
+ return this._proofOfAddress;
565
+ }
566
+
567
+ set addressProofs(value) {
568
+ if (!value) return;
569
+ this._proofOfAddress = new KycFileRequest(value).toCleanObject();
570
+ }
571
+
572
+ get govtId() {
573
+ return this._govtId;
574
+ }
575
+
576
+ set govstIds(value) {
577
+ if (!value) return;
578
+ this._govtId = new KycFileRequest(value).toCleanObject();
579
+ }
580
+
581
+ toObject() {
582
+ return {
583
+ address: this.address,
584
+ curp_document_uri: this.curpDocumentUri,
585
+ profession: this.profession,
586
+ phone_number: this.phoneNumber,
587
+ requiredLevel: this.requiredLevel,
588
+ terms_of_service: this.termsOfService,
589
+ verification_id: this.verificationId,
590
+ proof_of_life: this.proofOfLife,
591
+ proof_of_address: this.proofOfAddress,
592
+ govt_id: this.govtId,
593
+ user_type: this.userType,
594
+ };
595
+ }
596
+ }
597
+
598
+ class TransactionalProfileServicesRequest extends BaseRequest {
599
+ constructor({
600
+ speiTransfersNum,
601
+ speiTransfersAmount,
602
+ internalTransfersNum,
603
+ internalTransfersAmount,
604
+ }) {
605
+ super();
606
+ this.speiTransfersNum = speiTransfersNum;
607
+ this.speiTransfersAmount = speiTransfersAmount;
608
+ this.internalTransfersNum = internalTransfersNum;
609
+ this.internalTransfersAmount = internalTransfersAmount;
610
+ }
611
+
612
+ toObject() {
613
+ const response = {
614
+ spei_transfers_num: this.speiTransfersNum,
615
+ spei_transfers_amount: this.speiTransfersAmount,
616
+ internal_transfers_num: this.internalTransfersNum,
617
+ internal_transfers_amount: this.internalTransfersAmount,
618
+ };
619
+ return response;
620
+ }
621
+ }
622
+
623
+ class TransactionalProfileRequest {
624
+ constructor({
625
+ currency,
626
+ monthlyAmount,
627
+ recipientsNum,
628
+ payersNum,
629
+ deposits,
630
+ withdrawal,
631
+ }) {
632
+ this.currency = currency;
633
+ this.monthlyAmount = monthlyAmount;
634
+
635
+ this.recipientsNum = recipientsNum;
636
+ this.payersNum = payersNum;
637
+
638
+ this.setDeposits = deposits;
639
+ this.setWithdrawal = withdrawal;
640
+ }
641
+
642
+ get deposits() {
643
+ return this._deposits;
644
+ }
645
+
646
+ set setDeposits(value) {
647
+ if (!value) return;
648
+ this._deposits = new TransactionalProfileServicesRequest(value).toObject();
649
+ }
650
+
651
+ get withdrawal() {
652
+ return this._withdrawal;
653
+ }
654
+
655
+ set setWithdrawal(value) {
656
+ if (!value) return;
657
+ this._withdrawal = new TransactionalProfileServicesRequest(
658
+ value,
659
+ ).toObject();
660
+ }
661
+
662
+ toObject() {
663
+ return {
664
+ currency: this.currency,
665
+ monthly_amount: this.monthlyAmount,
666
+ recipients_num: this.recipientsNum,
667
+ payers_num: this.payersNum,
668
+ deposits: this.deposits,
669
+ withdrawal: this.withdrawal,
670
+ };
671
+ }
672
+ }
673
+
674
+ class BusinessDetailsRequest extends BaseRequest {
675
+ constructor({ accountUsageDescription, businessDescription }) {
676
+ super();
677
+ this.accountUsageDescription = accountUsageDescription;
678
+ this.businessDescription = businessDescription;
679
+ }
680
+
681
+ toObject() {
682
+ return {
683
+ account_usage_description: this.accountUsageDescription,
684
+ business_description: this.businessDescription,
685
+ };
686
+ }
687
+ }
688
+
689
+ class ShareholderPhysicalRequest extends BaseRequest {
690
+ constructor({
691
+ names,
692
+ curp,
693
+ rfc,
694
+ firstSurname,
695
+ percentage,
696
+ secondSurname,
697
+ shareCapital,
698
+ }) {
699
+ super();
700
+ this.names = names;
701
+ this.curp = curp;
702
+ this.percentage = percentage;
703
+ this.rfc = rfc;
704
+ this.shareCapital = shareCapital;
705
+ this.firstSurname = firstSurname;
706
+ this.secondSurname = secondSurname;
707
+ }
708
+
709
+ toObject() {
710
+ return {
711
+ curp: this.curp,
712
+ names: this.names,
713
+ percentage: this.percentage,
714
+ rfc: this.rfc,
715
+ share_capital: this.shareCapital,
716
+ first_surname: this.firstSurname,
717
+ second_surname: this.secondSurname,
718
+ };
719
+ }
720
+ }
721
+
722
+ class LegalRepresentativesRequest extends ShareholderPhysicalRequest {
723
+ constructor({
724
+ address,
725
+ curp,
726
+ emailAddress,
727
+ firstSurname,
728
+ job,
729
+ names,
730
+ percentage,
731
+ phoneNumber,
732
+ rfc,
733
+ secondSurname,
734
+ }) {
735
+ super({ curp, firstSurname, names, percentage, rfc, secondSurname });
736
+ this.job = job;
737
+ this.phoneNumber = phoneNumber;
738
+ this.emailAddress = emailAddress;
739
+ this.setAddress = address;
740
+ }
741
+
742
+ get address() {
743
+ return this._address;
744
+ }
745
+
746
+ set setAddress(value) {
747
+ if (!value) return;
748
+ this._address = new AddressUpdateRequest(value).toCleanObject();
749
+ }
750
+
751
+ toObject() {
752
+ return {
753
+ ...super.toObject(),
754
+ job: this.job,
755
+ phone_number: this.phoneNumber,
756
+ email_address: this.emailAddress,
757
+ address: this.address,
758
+ };
759
+ }
760
+ }
761
+
762
+ class ShareholderMoralRequest extends BaseRequest {
763
+ constructor({ name, percentage, shareholders, legalRepresentatives }) {
764
+ super();
765
+ this.name = name;
766
+ this.percentage = percentage;
767
+ this.setShareholders = shareholders;
768
+ this.setLegalRepresentatives = legalRepresentatives;
769
+ }
770
+
771
+ get shareholders() {
772
+ return this._shareholders;
773
+ }
774
+
775
+ set setShareholders(value) {
776
+ if (!value) return;
777
+ this._shareholders = value.map((sh) =>
778
+ new ShareholderPhysicalRequest(sh).toObject(),
779
+ );
780
+ }
781
+
782
+ get legalRepresentatives() {
783
+ return this._legalRepresentatives;
784
+ }
785
+
786
+ set setLegalRepresentatives(value) {
787
+ if (!value) return;
788
+ this._legalRepresentatives = value.map((lr) =>
789
+ new LegalRepresentativesRequest(lr).toObject(),
790
+ );
791
+ }
792
+
793
+ toObject() {
794
+ return {
795
+ name: this.name,
796
+ percentage: this.percentage,
797
+ shareholders: this.shareholders,
798
+ legal_representatives: this.legalRepresentatives,
799
+ };
800
+ }
801
+ }
802
+
803
+ class VulnerableActivityRequest extends BaseRequest {
804
+ constructor({
805
+ isVulnerableActivity,
806
+ hasSatRegister,
807
+ satRegisteredDate,
808
+ isInCompliance,
809
+ }) {
810
+ super();
811
+ this.isVulnerableActivity = isVulnerableActivity;
812
+ this.hasSatRegister = hasSatRegister;
813
+ this.satRegisteredDate = satRegisteredDate;
814
+ this.isInCompliance = isInCompliance;
815
+ }
816
+
817
+ toObject() {
818
+ return {
819
+ is_vulnerable_activity: this.isVulnerableActivity,
820
+ has_sat_register: this.hasSatRegister,
821
+ sat_registered_date: this.satRegisteredDate,
822
+ is_in_compliance: this.isInCompliance,
823
+ };
824
+ }
825
+ }
826
+
827
+ class LicenseRequest extends BaseRequest {
828
+ constructor({
829
+ licenseRequired,
830
+ supervisoryEntity,
831
+ licenseType,
832
+ licenseDate,
833
+ }) {
834
+ super();
835
+ this.licenseRequired = licenseRequired;
836
+ this.supervisoryEntity = supervisoryEntity;
837
+ this.licenseType = licenseType;
838
+ this.licenseDate = licenseDate;
839
+ }
840
+
841
+ toObject() {
842
+ return {
843
+ license_required: this.licenseRequired,
844
+ supervisory_entity: this.supervisoryEntity,
845
+ license_type: this.licenseType,
846
+ license_date: this.licenseDate,
847
+ };
848
+ }
849
+ }
850
+
851
+ class AuditRequest extends BaseRequest {
852
+ constructor({ hasAudit, auditProvider, auditDate, auditComments }) {
853
+ super();
854
+ this.hasAudit = hasAudit;
855
+ this.auditProvider = auditProvider;
856
+ this.auditDate = auditDate;
857
+ this.auditComments = auditComments;
858
+ }
859
+
860
+ toObject() {
861
+ return {
862
+ has_audit: this.hasAudit,
863
+ audit_provider: this.auditProvider,
864
+ audit_date: this.auditDate,
865
+ audit_comments: this.auditComments,
866
+ };
867
+ }
868
+ }
869
+
411
870
  class PartnerUserRequest extends BaseRequest {
412
871
  constructor({
413
872
  address,
414
873
  audit,
415
874
  businessDetails,
416
875
  businessName,
417
- cert,
418
876
  clabe,
419
877
  createdAt,
420
878
  documentationUrl,
@@ -428,9 +886,11 @@ class PartnerUserRequest extends BaseRequest {
428
886
  level,
429
887
  license,
430
888
  meta,
889
+ nationality,
431
890
  phoneNumber,
432
891
  platformId,
433
892
  requiredLevel,
893
+ rfc,
434
894
  shareholders,
435
895
  status,
436
896
  transactionalProfile,
@@ -441,11 +901,10 @@ class PartnerUserRequest extends BaseRequest {
441
901
  webSite,
442
902
  } = {}) {
443
903
  super(); // Asegúrate de pasar cualquier argumento necesario al constructor de la clase base, si es aplicable
444
- this.address = address;
445
- this.audit = audit;
446
- this.businessDetails = businessDetails;
904
+ this.adrs = address;
905
+ this.auditMap = audit;
906
+ this.businessDetailsMap = businessDetails;
447
907
  this.businessName = businessName;
448
- this.cert = cert;
449
908
  this.clabe = clabe;
450
909
  this.createdAt = createdAt;
451
910
  this.documentationUrl = documentationUrl;
@@ -455,30 +914,109 @@ class PartnerUserRequest extends BaseRequest {
455
914
  this.id = id;
456
915
  this.incorporationDate = incorporationDate;
457
916
  this.legalName = legalName;
458
- this.legalRepresentatives = legalRepresentatives; // Asegúrate de manejar correctamente las listas de objetos
917
+ this.legalRepresentativesMap = legalRepresentatives; // Asegúrate de manejar correctamente las listas de objetos
459
918
  this.level = level;
460
- this.license = license;
919
+ this.licenseMap = license;
461
920
  this.meta = meta;
921
+ this.nationality = nationality;
462
922
  this.phoneNumber = phoneNumber;
463
923
  this.platformId = platformId;
464
924
  this.requiredLevel = requiredLevel;
465
- this.shareholders = shareholders; // Asegúrate de manejar correctamente las listas de objetos
925
+ this.rfc = rfc;
926
+ this.shareholdersMap = shareholders;
466
927
  this.status = status;
467
- this.transactionalProfile = transactionalProfile;
928
+ this.transactionalProfileMap = transactionalProfile;
468
929
  this.updatedAt = updatedAt;
469
930
  this.userId = userId;
470
931
  this.userType = userType;
471
- this.vulnerableActivity = vulnerableActivity;
932
+ this.vulnerableActivitMAP = vulnerableActivity;
472
933
  this.webSite = webSite;
473
934
  }
474
935
 
936
+ get businessDetails() {
937
+ return this._businessDetails;
938
+ }
939
+
940
+ set businessDetailsMap(value) {
941
+ if (!value) return;
942
+ this._businessDetails = new BusinessDetailsRequest(value).toObject();
943
+ }
944
+
945
+ get address() {
946
+ return this._address;
947
+ }
948
+
949
+ set adrs(value) {
950
+ if (!value) return;
951
+ this._address = new AddressUpdateRequest(value).toCleanObject();
952
+ }
953
+
954
+ get transactionalProfile() {
955
+ return this._transactionalProfile;
956
+ }
957
+
958
+ set transactionalProfileMap(value) {
959
+ if (!value) return;
960
+ this._transactionalProfile = new TransactionalProfileRequest(
961
+ value,
962
+ ).toObject();
963
+ }
964
+
965
+ get shareholders() {
966
+ return this._shareholders;
967
+ }
968
+
969
+ set shareholdersMap(value) {
970
+ if (!value) return;
971
+ this._shareholders = value.map((sh) =>
972
+ new ShareholderMoralRequest(sh).toObject(),
973
+ );
974
+ }
975
+
976
+ get legalRepresentatives() {
977
+ return this._legalRepresentatives;
978
+ }
979
+
980
+ set legalRepresentativesMap(value) {
981
+ if (!value) return;
982
+ this._legalRepresentatives = value.map((lr) =>
983
+ new LegalRepresentativesRequest(lr).toObject(),
984
+ );
985
+ }
986
+
987
+ get vulnerableActivity() {
988
+ return this._vulnerableActivity;
989
+ }
990
+
991
+ set vulnerableActivitMAP(value) {
992
+ if (!value) return;
993
+ this._vulnerableActivity = new VulnerableActivityRequest(value).toObject();
994
+ }
995
+
996
+ get license() {
997
+ return this._license;
998
+ }
999
+
1000
+ set licenseMap(value) {
1001
+ if (!value) return;
1002
+ this._license = new LicenseRequest(value).toObject();
1003
+ }
1004
+
1005
+ get audit() {
1006
+ return this._audit;
1007
+ }
1008
+
1009
+ set auditMap(value) {
1010
+ if (!value) return;
1011
+ this._audit = new AuditRequest(value).toObject();
1012
+ }
1013
+
475
1014
  toObject() {
476
- return {
1015
+ const obj = {
477
1016
  address: this.address,
478
1017
  audit: this.audit,
479
1018
  business_details: this.businessDetails,
480
1019
  business_name: this.businessName,
481
- cert: this.cert,
482
1020
  clabe: this.clabe,
483
1021
  created_at: this.createdAt,
484
1022
  documentation_url: this.documentationUrl,
@@ -488,16 +1026,16 @@ class PartnerUserRequest extends BaseRequest {
488
1026
  id: this.id,
489
1027
  incorporation_date: this.incorporationDate,
490
1028
  legal_name: this.legalName,
491
- legal_representatives: this.legalRepresentatives.map((lr) =>
492
- lr.toObject(),
493
- ),
1029
+ legal_representatives: this.legalRepresentatives,
494
1030
  level: this.level,
495
1031
  license: this.license,
496
1032
  meta: this.meta,
1033
+ nationality: this.nationality,
497
1034
  phone_number: this.phoneNumber,
498
1035
  platform_id: this.platformId,
499
1036
  required_level: this.requiredLevel,
500
- shareholders: this.shareholders.map((sh) => sh.toObject()),
1037
+ rfc: this.rfc,
1038
+ shareholders: this.shareholders,
501
1039
  status: this.status,
502
1040
  transactional_profile: this.transactionalProfile,
503
1041
  updated_at: this.updatedAt,
@@ -506,6 +1044,7 @@ class PartnerUserRequest extends BaseRequest {
506
1044
  vulnerable_activity: this.vulnerableActivity,
507
1045
  web_site: this.webSite,
508
1046
  };
1047
+ return obj;
509
1048
  }
510
1049
  }
511
1050
 
@@ -687,191 +1226,6 @@ class UserLoginRequest extends BaseRequest {
687
1226
  }
688
1227
  }
689
1228
 
690
- class TosUpdateRequest extends BaseRequest {
691
- constructor({ ip, location, type, version }) {
692
- super();
693
- this.ipAddress = ip;
694
- this.location = location;
695
- this.type = type;
696
- this.version = version;
697
- }
698
-
699
- get ip() {
700
- return this._ip;
701
- }
702
-
703
- set ipAddress(value) {
704
- if (!value) throw new ValidationError('missing ip address');
705
- const ipBlocks = value.split('.');
706
- const blocks = ipBlocks.every((block) => {
707
- return block >= 0 && block <= 255;
708
- });
709
- if (blocks) {
710
- this._ip = value;
711
- } else {
712
- throw new ValidationError('Invalid ip address');
713
- }
714
- }
715
-
716
- toObject() {
717
- return {
718
- ip: this.ip,
719
- location: this.location,
720
- type: this.type,
721
- version: this.version,
722
- };
723
- }
724
- }
725
-
726
- class AddressUpdateRequest extends BaseRequest {
727
- constructor({
728
- city,
729
- colonia,
730
- country,
731
- extNumber,
732
- fullName,
733
- intNumber,
734
- postalCode,
735
- state,
736
- street,
737
- } = {}) {
738
- super();
739
- this.city = city;
740
- this.colonia = colonia;
741
- this.country = country;
742
- this.extNumber = extNumber;
743
- this.fullName = fullName;
744
- this.intNumber = intNumber;
745
- this.postalCode = postalCode;
746
- this.state = state;
747
- this.street = street;
748
- }
749
-
750
- toObject() {
751
- return {
752
- city: this.city,
753
- colonia: this.colonia,
754
- country: this.country,
755
- ext_number: this.extNumber,
756
- full_name: this.fullName,
757
- int_number: this.intNumber,
758
- postal_code: this.postalCode,
759
- state: this.state,
760
- street: this.street,
761
- };
762
- }
763
- }
764
-
765
- class KycFileRequest extends BaseRequest {
766
- constructor({ data, isMx, status, type, uriBack, uriFront }) {
767
- super();
768
- this.data = data;
769
- this.isMx = isMx;
770
- this.status = status;
771
- this.type = type;
772
- this.uriBack = uriBack;
773
- this.uriFront = uriFront;
774
- }
775
-
776
- toObject() {
777
- return {
778
- data: this.data,
779
- is_mx: this.isMx,
780
- status: this.status,
781
- type: this.type,
782
- uri_back: this.uriBack,
783
- uri_front: this.uriFront,
784
- };
785
- }
786
- }
787
-
788
- class UserUpdateRequest extends BaseRequest {
789
- constructor({
790
- address,
791
- curpDocumentUri,
792
- govtId,
793
- profession,
794
- proofOfAddress,
795
- proofOfLife,
796
- requiredLevel,
797
- termsOfService,
798
- userType,
799
- verificationId,
800
- }) {
801
- super();
802
- this.adrs = address;
803
- this.curpDocumentUri = curpDocumentUri;
804
- this.govstIds = govtId;
805
- this.profession = profession;
806
- this.addressProofs = proofOfAddress;
807
- this.lifeProofs = proofOfLife;
808
- this.requiredLevel = requiredLevel;
809
- this.terms = termsOfService;
810
- this.userType = userType;
811
- this.verificationId = verificationId;
812
- }
813
-
814
- get termsOfService() {
815
- return this._termsOfService;
816
- }
817
-
818
- set terms(value) {
819
- if (!value) return;
820
- this._termsOfService = new TosUpdateRequest(value).toObject();
821
- }
822
-
823
- get address() {
824
- return this._address;
825
- }
826
-
827
- set adrs(value) {
828
- if (!value) return;
829
- this._address = new AddressUpdateRequest(value).toCleanObject();
830
- }
831
-
832
- get proofOfLife() {
833
- return this._proofOfLife;
834
- }
835
-
836
- set lifeProofs(value) {
837
- if (!value) return;
838
- this._proofOfLife = new KycFileRequest(value).toCleanObject();
839
- }
840
-
841
- get proofOfAddress() {
842
- return this._proofOfAddress;
843
- }
844
-
845
- set addressProofs(value) {
846
- if (!value) return;
847
- this._proofOfAddress = new KycFileRequest(value).toCleanObject();
848
- }
849
-
850
- get govtId() {
851
- return this._govtId;
852
- }
853
-
854
- set govstIds(value) {
855
- if (!value) return;
856
- this._govtId = new KycFileRequest(value).toCleanObject();
857
- }
858
-
859
- toObject() {
860
- return {
861
- address: this.address,
862
- curp_document_uri: this.curpDocumentUri,
863
- profession: this.profession,
864
- requiredLevel: this.requiredLevel,
865
- terms_of_service: this.termsOfService,
866
- verification_id: this.verificationId,
867
- proof_of_life: this.proofOfLife,
868
- proof_of_address: this.proofOfAddress,
869
- govt_id: this.govtId,
870
- user_type: this.userType,
871
- };
872
- }
873
- }
874
-
875
1229
  class VerificationRequest extends BaseRequest {
876
1230
  constructor({ platformId, recipient, type }) {
877
1231
  super();