@cuenca-mx/cuenca-js 0.0.14-dev13 → 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.
- package/README.md +3 -1
- package/build/index.cjs +11 -11
- package/build/index.mjs +11 -11
- package/build/requests/index.cjs +1 -1
- package/build/requests/index.mjs +2 -2
- package/build/types/index.cjs +2 -1
- package/build/types/index.mjs +1 -1
- package/build/umd/cuenca.umd.js +1 -1
- package/build/{vulnerableActivity-aad6b958.cjs → vulnerableActivity-88dfbcae.cjs} +47 -3
- package/build/{vulnerableActivity-2fdebcc2.mjs → vulnerableActivity-f14186ae.mjs} +47 -4
- package/build/{walletTransactionRequest-dcc77215.mjs → walletTransactionRequest-8ad2b7e7.mjs} +556 -201
- package/build/{walletTransactionRequest-7a9ae1a7.cjs → walletTransactionRequest-a7cea0ee.cjs} +556 -201
- package/package.json +3 -2
package/build/{walletTransactionRequest-dcc77215.mjs → walletTransactionRequest-8ad2b7e7.mjs}
RENAMED
|
@@ -407,13 +407,472 @@ class KYCValidationsRequest extends BaseRequest {
|
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
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
|
+
|
|
410
870
|
class PartnerUserRequest extends BaseRequest {
|
|
411
871
|
constructor({
|
|
412
872
|
address,
|
|
413
873
|
audit,
|
|
414
874
|
businessDetails,
|
|
415
875
|
businessName,
|
|
416
|
-
cert,
|
|
417
876
|
clabe,
|
|
418
877
|
createdAt,
|
|
419
878
|
documentationUrl,
|
|
@@ -427,9 +886,11 @@ class PartnerUserRequest extends BaseRequest {
|
|
|
427
886
|
level,
|
|
428
887
|
license,
|
|
429
888
|
meta,
|
|
889
|
+
nationality,
|
|
430
890
|
phoneNumber,
|
|
431
891
|
platformId,
|
|
432
892
|
requiredLevel,
|
|
893
|
+
rfc,
|
|
433
894
|
shareholders,
|
|
434
895
|
status,
|
|
435
896
|
transactionalProfile,
|
|
@@ -440,11 +901,10 @@ class PartnerUserRequest extends BaseRequest {
|
|
|
440
901
|
webSite,
|
|
441
902
|
} = {}) {
|
|
442
903
|
super(); // Asegúrate de pasar cualquier argumento necesario al constructor de la clase base, si es aplicable
|
|
443
|
-
this.
|
|
444
|
-
this.
|
|
445
|
-
this.
|
|
904
|
+
this.adrs = address;
|
|
905
|
+
this.auditMap = audit;
|
|
906
|
+
this.businessDetailsMap = businessDetails;
|
|
446
907
|
this.businessName = businessName;
|
|
447
|
-
this.cert = cert;
|
|
448
908
|
this.clabe = clabe;
|
|
449
909
|
this.createdAt = createdAt;
|
|
450
910
|
this.documentationUrl = documentationUrl;
|
|
@@ -454,30 +914,109 @@ class PartnerUserRequest extends BaseRequest {
|
|
|
454
914
|
this.id = id;
|
|
455
915
|
this.incorporationDate = incorporationDate;
|
|
456
916
|
this.legalName = legalName;
|
|
457
|
-
this.
|
|
917
|
+
this.legalRepresentativesMap = legalRepresentatives; // Asegúrate de manejar correctamente las listas de objetos
|
|
458
918
|
this.level = level;
|
|
459
|
-
this.
|
|
919
|
+
this.licenseMap = license;
|
|
460
920
|
this.meta = meta;
|
|
921
|
+
this.nationality = nationality;
|
|
461
922
|
this.phoneNumber = phoneNumber;
|
|
462
923
|
this.platformId = platformId;
|
|
463
924
|
this.requiredLevel = requiredLevel;
|
|
464
|
-
this.
|
|
925
|
+
this.rfc = rfc;
|
|
926
|
+
this.shareholdersMap = shareholders;
|
|
465
927
|
this.status = status;
|
|
466
|
-
this.
|
|
928
|
+
this.transactionalProfileMap = transactionalProfile;
|
|
467
929
|
this.updatedAt = updatedAt;
|
|
468
930
|
this.userId = userId;
|
|
469
931
|
this.userType = userType;
|
|
470
|
-
this.
|
|
932
|
+
this.vulnerableActivitMAP = vulnerableActivity;
|
|
471
933
|
this.webSite = webSite;
|
|
472
934
|
}
|
|
473
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
|
+
|
|
474
1014
|
toObject() {
|
|
475
|
-
|
|
1015
|
+
const obj = {
|
|
476
1016
|
address: this.address,
|
|
477
1017
|
audit: this.audit,
|
|
478
1018
|
business_details: this.businessDetails,
|
|
479
1019
|
business_name: this.businessName,
|
|
480
|
-
cert: this.cert,
|
|
481
1020
|
clabe: this.clabe,
|
|
482
1021
|
created_at: this.createdAt,
|
|
483
1022
|
documentation_url: this.documentationUrl,
|
|
@@ -487,16 +1026,16 @@ class PartnerUserRequest extends BaseRequest {
|
|
|
487
1026
|
id: this.id,
|
|
488
1027
|
incorporation_date: this.incorporationDate,
|
|
489
1028
|
legal_name: this.legalName,
|
|
490
|
-
legal_representatives: this.legalRepresentatives
|
|
491
|
-
lr.toObject(),
|
|
492
|
-
),
|
|
1029
|
+
legal_representatives: this.legalRepresentatives,
|
|
493
1030
|
level: this.level,
|
|
494
1031
|
license: this.license,
|
|
495
1032
|
meta: this.meta,
|
|
1033
|
+
nationality: this.nationality,
|
|
496
1034
|
phone_number: this.phoneNumber,
|
|
497
1035
|
platform_id: this.platformId,
|
|
498
1036
|
required_level: this.requiredLevel,
|
|
499
|
-
|
|
1037
|
+
rfc: this.rfc,
|
|
1038
|
+
shareholders: this.shareholders,
|
|
500
1039
|
status: this.status,
|
|
501
1040
|
transactional_profile: this.transactionalProfile,
|
|
502
1041
|
updated_at: this.updatedAt,
|
|
@@ -505,6 +1044,7 @@ class PartnerUserRequest extends BaseRequest {
|
|
|
505
1044
|
vulnerable_activity: this.vulnerableActivity,
|
|
506
1045
|
web_site: this.webSite,
|
|
507
1046
|
};
|
|
1047
|
+
return obj;
|
|
508
1048
|
}
|
|
509
1049
|
}
|
|
510
1050
|
|
|
@@ -686,191 +1226,6 @@ class UserLoginRequest extends BaseRequest {
|
|
|
686
1226
|
}
|
|
687
1227
|
}
|
|
688
1228
|
|
|
689
|
-
class TosUpdateRequest extends BaseRequest {
|
|
690
|
-
constructor({ ip, location, type, version }) {
|
|
691
|
-
super();
|
|
692
|
-
this.ipAddress = ip;
|
|
693
|
-
this.location = location;
|
|
694
|
-
this.type = type;
|
|
695
|
-
this.version = version;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
get ip() {
|
|
699
|
-
return this._ip;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
set ipAddress(value) {
|
|
703
|
-
if (!value) throw new ValidationError('missing ip address');
|
|
704
|
-
const ipBlocks = value.split('.');
|
|
705
|
-
const blocks = ipBlocks.every((block) => {
|
|
706
|
-
return block >= 0 && block <= 255;
|
|
707
|
-
});
|
|
708
|
-
if (blocks) {
|
|
709
|
-
this._ip = value;
|
|
710
|
-
} else {
|
|
711
|
-
throw new ValidationError('Invalid ip address');
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
toObject() {
|
|
716
|
-
return {
|
|
717
|
-
ip: this.ip,
|
|
718
|
-
location: this.location,
|
|
719
|
-
type: this.type,
|
|
720
|
-
version: this.version,
|
|
721
|
-
};
|
|
722
|
-
}
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
class AddressUpdateRequest extends BaseRequest {
|
|
726
|
-
constructor({
|
|
727
|
-
city,
|
|
728
|
-
colonia,
|
|
729
|
-
country,
|
|
730
|
-
extNumber,
|
|
731
|
-
fullName,
|
|
732
|
-
intNumber,
|
|
733
|
-
postalCode,
|
|
734
|
-
state,
|
|
735
|
-
street,
|
|
736
|
-
} = {}) {
|
|
737
|
-
super();
|
|
738
|
-
this.city = city;
|
|
739
|
-
this.colonia = colonia;
|
|
740
|
-
this.country = country;
|
|
741
|
-
this.extNumber = extNumber;
|
|
742
|
-
this.fullName = fullName;
|
|
743
|
-
this.intNumber = intNumber;
|
|
744
|
-
this.postalCode = postalCode;
|
|
745
|
-
this.state = state;
|
|
746
|
-
this.street = street;
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
toObject() {
|
|
750
|
-
return {
|
|
751
|
-
city: this.city,
|
|
752
|
-
colonia: this.colonia,
|
|
753
|
-
country: this.country,
|
|
754
|
-
ext_number: this.extNumber,
|
|
755
|
-
full_name: this.fullName,
|
|
756
|
-
int_number: this.intNumber,
|
|
757
|
-
postal_code: this.postalCode,
|
|
758
|
-
state: this.state,
|
|
759
|
-
street: this.street,
|
|
760
|
-
};
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
class KycFileRequest extends BaseRequest {
|
|
765
|
-
constructor({ data, isMx, status, type, uriBack, uriFront }) {
|
|
766
|
-
super();
|
|
767
|
-
this.data = data;
|
|
768
|
-
this.isMx = isMx;
|
|
769
|
-
this.status = status;
|
|
770
|
-
this.type = type;
|
|
771
|
-
this.uriBack = uriBack;
|
|
772
|
-
this.uriFront = uriFront;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
toObject() {
|
|
776
|
-
return {
|
|
777
|
-
data: this.data,
|
|
778
|
-
is_mx: this.isMx,
|
|
779
|
-
status: this.status,
|
|
780
|
-
type: this.type,
|
|
781
|
-
uri_back: this.uriBack,
|
|
782
|
-
uri_front: this.uriFront,
|
|
783
|
-
};
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
class UserUpdateRequest extends BaseRequest {
|
|
788
|
-
constructor({
|
|
789
|
-
address,
|
|
790
|
-
curpDocumentUri,
|
|
791
|
-
govtId,
|
|
792
|
-
profession,
|
|
793
|
-
proofOfAddress,
|
|
794
|
-
proofOfLife,
|
|
795
|
-
requiredLevel,
|
|
796
|
-
termsOfService,
|
|
797
|
-
userType,
|
|
798
|
-
verificationId,
|
|
799
|
-
}) {
|
|
800
|
-
super();
|
|
801
|
-
this.adrs = address;
|
|
802
|
-
this.curpDocumentUri = curpDocumentUri;
|
|
803
|
-
this.govstIds = govtId;
|
|
804
|
-
this.profession = profession;
|
|
805
|
-
this.addressProofs = proofOfAddress;
|
|
806
|
-
this.lifeProofs = proofOfLife;
|
|
807
|
-
this.requiredLevel = requiredLevel;
|
|
808
|
-
this.terms = termsOfService;
|
|
809
|
-
this.userType = userType;
|
|
810
|
-
this.verificationId = verificationId;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
get termsOfService() {
|
|
814
|
-
return this._termsOfService;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
set terms(value) {
|
|
818
|
-
if (!value) return;
|
|
819
|
-
this._termsOfService = new TosUpdateRequest(value).toObject();
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
get address() {
|
|
823
|
-
return this._address;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
set adrs(value) {
|
|
827
|
-
if (!value) return;
|
|
828
|
-
this._address = new AddressUpdateRequest(value).toCleanObject();
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
get proofOfLife() {
|
|
832
|
-
return this._proofOfLife;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
set lifeProofs(value) {
|
|
836
|
-
if (!value) return;
|
|
837
|
-
this._proofOfLife = new KycFileRequest(value).toCleanObject();
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
get proofOfAddress() {
|
|
841
|
-
return this._proofOfAddress;
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
set addressProofs(value) {
|
|
845
|
-
if (!value) return;
|
|
846
|
-
this._proofOfAddress = new KycFileRequest(value).toCleanObject();
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
get govtId() {
|
|
850
|
-
return this._govtId;
|
|
851
|
-
}
|
|
852
|
-
|
|
853
|
-
set govstIds(value) {
|
|
854
|
-
if (!value) return;
|
|
855
|
-
this._govtId = new KycFileRequest(value).toCleanObject();
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
toObject() {
|
|
859
|
-
return {
|
|
860
|
-
address: this.address,
|
|
861
|
-
curp_document_uri: this.curpDocumentUri,
|
|
862
|
-
profession: this.profession,
|
|
863
|
-
requiredLevel: this.requiredLevel,
|
|
864
|
-
terms_of_service: this.termsOfService,
|
|
865
|
-
verification_id: this.verificationId,
|
|
866
|
-
proof_of_life: this.proofOfLife,
|
|
867
|
-
proof_of_address: this.proofOfAddress,
|
|
868
|
-
govt_id: this.govtId,
|
|
869
|
-
user_type: this.userType,
|
|
870
|
-
};
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
|
|
874
1229
|
class VerificationRequest extends BaseRequest {
|
|
875
1230
|
constructor({ platformId, recipient, type }) {
|
|
876
1231
|
super();
|