@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.
@@ -271,6 +271,19 @@ class DepositQuery extends TransactionQuery {
271
271
  }
272
272
  }
273
273
 
274
+ class PartnerQuery extends QueryParams {
275
+ constructor({ emailAddress, ...args }) {
276
+ super(args);
277
+ this.emailAddress = emailAddress;
278
+ }
279
+
280
+ toObject() {
281
+ return Object.assign(super.toObject(), {
282
+ email_address: this.emailAddress,
283
+ });
284
+ }
285
+ }
286
+
274
287
  class StatementQuery extends QueryParams {
275
288
  constructor({ month, year, ...args }) {
276
289
  super(args);
@@ -462,6 +475,13 @@ class BusinessDetails {
462
475
  accountUsageDescription: obj.account_usage_description,
463
476
  businessDescription: obj.business_description,
464
477
  });
478
+
479
+ toObject() {
480
+ return {
481
+ account_usage_description: this.accountUsageDescription,
482
+ business_description: this.businessDescription,
483
+ };
484
+ }
465
485
  }
466
486
 
467
487
  class VerificationError {
@@ -547,6 +567,16 @@ class PhysicalPerson {
547
567
  secondSurname: obj.second_surname,
548
568
  });
549
569
  };
570
+
571
+ toObject() {
572
+ return {
573
+ names: this.names,
574
+ curp: this.curp,
575
+ rfc: this.rfc,
576
+ first_surname: this.firstSurname,
577
+ second_surname: this.secondSurname,
578
+ };
579
+ }
550
580
  }
551
581
 
552
582
  class LegalRepresentatives extends PhysicalPerson {
@@ -588,14 +618,24 @@ class LegalRepresentatives extends PhysicalPerson {
588
618
  }
589
619
 
590
620
  class ShareholderPhysical extends PhysicalPerson {
591
- constructor({ names, curp, rfc, firstSurname, secondSurname, percentage }) {
621
+ constructor({
622
+ names,
623
+ curp,
624
+ rfc,
625
+ firstSurname,
626
+ secondSurname,
627
+ shareCapital,
628
+ percentage,
629
+ }) {
592
630
  super({ names, curp, rfc, firstSurname, secondSurname });
631
+ this.shareCapital = shareCapital;
593
632
  this.percentage = percentage;
594
633
  }
595
634
 
596
635
  static fromObject = ({ percentage, ...obj }) => {
597
636
  return new ShareholderPhysical({
598
637
  percentage,
638
+ shareCapital: obj.share_capital,
599
639
  ...PhysicalPerson.fromObject(obj),
600
640
  });
601
641
  };
@@ -654,13 +694,16 @@ class TransactionalProfileServices {
654
694
  this.internalTransfersAmount = internalTransfersAmount;
655
695
  }
656
696
 
657
- static fromObject = ({ ...obj }) =>
658
- new TransactionalProfileServices({
697
+ static fromObject = ({ ...obj }) => {
698
+ const response = new TransactionalProfileServices({
659
699
  speiTransfersNum: obj.spei_transfers_num,
660
700
  speiTransfersAmount: obj.spei_transfers_amount,
661
701
  internalTransfersNum: obj.internal_transfers_num,
662
702
  internalTransfersAmount: obj.internal_transfers_amount,
663
703
  });
704
+
705
+ return response;
706
+ };
664
707
  }
665
708
 
666
709
  class TOSAgreements {
@@ -721,6 +764,7 @@ exports.DepositQuery = DepositQuery;
721
764
  exports.KYCFile = KYCFile;
722
765
  exports.LegalRepresentatives = LegalRepresentatives;
723
766
  exports.License = License;
767
+ exports.PartnerQuery = PartnerQuery;
724
768
  exports.QueryParams = QueryParams;
725
769
  exports.ShareholderMoral = ShareholderMoral;
726
770
  exports.StatementQuery = StatementQuery;
@@ -269,6 +269,19 @@ class DepositQuery extends TransactionQuery {
269
269
  }
270
270
  }
271
271
 
272
+ class PartnerQuery extends QueryParams {
273
+ constructor({ emailAddress, ...args }) {
274
+ super(args);
275
+ this.emailAddress = emailAddress;
276
+ }
277
+
278
+ toObject() {
279
+ return Object.assign(super.toObject(), {
280
+ email_address: this.emailAddress,
281
+ });
282
+ }
283
+ }
284
+
272
285
  class StatementQuery extends QueryParams {
273
286
  constructor({ month, year, ...args }) {
274
287
  super(args);
@@ -460,6 +473,13 @@ class BusinessDetails {
460
473
  accountUsageDescription: obj.account_usage_description,
461
474
  businessDescription: obj.business_description,
462
475
  });
476
+
477
+ toObject() {
478
+ return {
479
+ account_usage_description: this.accountUsageDescription,
480
+ business_description: this.businessDescription,
481
+ };
482
+ }
463
483
  }
464
484
 
465
485
  class VerificationError {
@@ -545,6 +565,16 @@ class PhysicalPerson {
545
565
  secondSurname: obj.second_surname,
546
566
  });
547
567
  };
568
+
569
+ toObject() {
570
+ return {
571
+ names: this.names,
572
+ curp: this.curp,
573
+ rfc: this.rfc,
574
+ first_surname: this.firstSurname,
575
+ second_surname: this.secondSurname,
576
+ };
577
+ }
548
578
  }
549
579
 
550
580
  class LegalRepresentatives extends PhysicalPerson {
@@ -586,14 +616,24 @@ class LegalRepresentatives extends PhysicalPerson {
586
616
  }
587
617
 
588
618
  class ShareholderPhysical extends PhysicalPerson {
589
- constructor({ names, curp, rfc, firstSurname, secondSurname, percentage }) {
619
+ constructor({
620
+ names,
621
+ curp,
622
+ rfc,
623
+ firstSurname,
624
+ secondSurname,
625
+ shareCapital,
626
+ percentage,
627
+ }) {
590
628
  super({ names, curp, rfc, firstSurname, secondSurname });
629
+ this.shareCapital = shareCapital;
591
630
  this.percentage = percentage;
592
631
  }
593
632
 
594
633
  static fromObject = ({ percentage, ...obj }) => {
595
634
  return new ShareholderPhysical({
596
635
  percentage,
636
+ shareCapital: obj.share_capital,
597
637
  ...PhysicalPerson.fromObject(obj),
598
638
  });
599
639
  };
@@ -652,13 +692,16 @@ class TransactionalProfileServices {
652
692
  this.internalTransfersAmount = internalTransfersAmount;
653
693
  }
654
694
 
655
- static fromObject = ({ ...obj }) =>
656
- new TransactionalProfileServices({
695
+ static fromObject = ({ ...obj }) => {
696
+ const response = new TransactionalProfileServices({
657
697
  speiTransfersNum: obj.spei_transfers_num,
658
698
  speiTransfersAmount: obj.spei_transfers_amount,
659
699
  internalTransfersNum: obj.internal_transfers_num,
660
700
  internalTransfersAmount: obj.internal_transfers_amount,
661
701
  });
702
+
703
+ return response;
704
+ };
662
705
  }
663
706
 
664
707
  class TOSAgreements {
@@ -700,4 +743,4 @@ class VulnerableActivity {
700
743
  });
701
744
  }
702
745
 
703
- export { AlertLog as A, BusinessDetails as B, CardsQuery as C, DepositQuery as D, KYCFile as K, LegalRepresentatives as L, QueryParams as Q, ShareholderMoral as S, TOSAgreements as T, UserQuery as U, VulnerableActivity as V, WalletQuery as W, Address as a, TransactionalProfileServices as b, Audit as c, License as d, AccountQuery as e, AlertQuery as f, ApiKeyQuery as g, BalanceEntryQuery as h, BillPaymentQuery as i, BridgeAccountQuery as j, BridgeBankAccountQuery as k, BridgeQuery as l, BridgeTransactionQuery as m, CardTransactionQuery as n, StatementQuery as o, TransferQuery as p, WalletTransactionQuery as q, TransactionQuery as r, VerificationError as s };
746
+ export { AlertLog as A, BusinessDetails as B, CardsQuery as C, DepositQuery as D, KYCFile as K, LegalRepresentatives as L, PartnerQuery as P, QueryParams as Q, ShareholderMoral as S, TOSAgreements as T, UserQuery as U, VulnerableActivity as V, WalletQuery as W, Address as a, TransactionalProfileServices as b, Audit as c, License as d, AccountQuery as e, AlertQuery as f, ApiKeyQuery as g, BalanceEntryQuery as h, BillPaymentQuery as i, BridgeAccountQuery as j, BridgeBankAccountQuery as k, BridgeQuery as l, BridgeTransactionQuery as m, CardTransactionQuery as n, StatementQuery as o, TransferQuery as p, WalletTransactionQuery as q, TransactionQuery as r, VerificationError as s };