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

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