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