modern-treasury 0.10.0 → 0.11.0
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/deno.d.ts +1920 -1141
- package/deno.js +1 -1
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/resources/counterparties.d.ts +3 -2
- package/dist/cjs/resources/counterparties.js.map +1 -1
- package/dist/cjs/resources/expected-payments.d.ts +26 -57
- package/dist/cjs/resources/external-accounts.d.ts +14 -3
- package/dist/cjs/resources/payment-orders/payment-orders.d.ts +41 -79
- package/dist/cjs/resources/payment-orders/payment-orders.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/index.ts +4 -0
- package/package.json +1 -1
- package/resources/counterparties.ts +3 -2
- package/resources/expected-payments.ts +27 -57
- package/resources/external-accounts.ts +15 -3
- package/resources/payment-orders/payment-orders.ts +43 -79
- package/version.ts +1 -1
package/deno.d.ts
CHANGED
|
@@ -505,11 +505,13 @@ declare namespace ModernTreasury {
|
|
|
505
505
|
export import EventsPage = API.EventsPage;
|
|
506
506
|
export import EventListParams = API.EventListParams;
|
|
507
507
|
export import ExpectedPayment = API.ExpectedPayment;
|
|
508
|
+
export import ExpectedPaymentType = API.ExpectedPaymentType;
|
|
508
509
|
export import ExpectedPaymentsPage = API.ExpectedPaymentsPage;
|
|
509
510
|
export import ExpectedPaymentCreateParams = API.ExpectedPaymentCreateParams;
|
|
510
511
|
export import ExpectedPaymentUpdateParams = API.ExpectedPaymentUpdateParams;
|
|
511
512
|
export import ExpectedPaymentListParams = API.ExpectedPaymentListParams;
|
|
512
513
|
export import ExternalAccount = API.ExternalAccount;
|
|
514
|
+
export import ExternalAccountType = API.ExternalAccountType;
|
|
513
515
|
export import ExternalAccountsPage = API.ExternalAccountsPage;
|
|
514
516
|
export import ExternalAccountCreateParams = API.ExternalAccountCreateParams;
|
|
515
517
|
export import ExternalAccountUpdateParams = API.ExternalAccountUpdateParams;
|
|
@@ -567,6 +569,8 @@ declare namespace ModernTreasury {
|
|
|
567
569
|
export import LineItemUpdateParams = API.LineItemUpdateParams;
|
|
568
570
|
export import LineItemListParams = API.LineItemListParams;
|
|
569
571
|
export import PaymentOrder = API.PaymentOrder;
|
|
572
|
+
export import PaymentOrderSubtype = API.PaymentOrderSubtype;
|
|
573
|
+
export import PaymentOrderType = API.PaymentOrderType;
|
|
570
574
|
export import PaymentOrdersPage = API.PaymentOrdersPage;
|
|
571
575
|
export import PaymentOrderCreateParams = API.PaymentOrderCreateParams;
|
|
572
576
|
export import PaymentOrderUpdateParams = API.PaymentOrderUpdateParams;
|
|
@@ -612,11 +616,13 @@ declare namespace ModernTreasury {
|
|
|
612
616
|
export import EventsPage = API.EventsPage;
|
|
613
617
|
export import EventListParams = API.EventListParams;
|
|
614
618
|
export import ExpectedPayment = API.ExpectedPayment;
|
|
619
|
+
export import ExpectedPaymentType = API.ExpectedPaymentType;
|
|
615
620
|
export import ExpectedPaymentsPage = API.ExpectedPaymentsPage;
|
|
616
621
|
export import ExpectedPaymentCreateParams = API.ExpectedPaymentCreateParams;
|
|
617
622
|
export import ExpectedPaymentUpdateParams = API.ExpectedPaymentUpdateParams;
|
|
618
623
|
export import ExpectedPaymentListParams = API.ExpectedPaymentListParams;
|
|
619
624
|
export import ExternalAccount = API.ExternalAccount;
|
|
625
|
+
export import ExternalAccountType = API.ExternalAccountType;
|
|
620
626
|
export import ExternalAccountsPage = API.ExternalAccountsPage;
|
|
621
627
|
export import ExternalAccountCreateParams = API.ExternalAccountCreateParams;
|
|
622
628
|
export import ExternalAccountUpdateParams = API.ExternalAccountUpdateParams;
|
|
@@ -674,6 +680,8 @@ declare namespace ModernTreasury {
|
|
|
674
680
|
export import LineItemUpdateParams = API.LineItemUpdateParams;
|
|
675
681
|
export import LineItemListParams = API.LineItemListParams;
|
|
676
682
|
export import PaymentOrder = API.PaymentOrder;
|
|
683
|
+
export import PaymentOrderSubtype = API.PaymentOrderSubtype;
|
|
684
|
+
export import PaymentOrderType = API.PaymentOrderType;
|
|
677
685
|
export import PaymentOrdersPage = API.PaymentOrdersPage;
|
|
678
686
|
export import PaymentOrderCreateParams = API.PaymentOrderCreateParams;
|
|
679
687
|
export import PaymentOrderUpdateParams = API.PaymentOrderUpdateParams;
|
|
@@ -719,11 +727,13 @@ declare namespace ModernTreasury {
|
|
|
719
727
|
export import EventsPage = API.EventsPage;
|
|
720
728
|
export import EventListParams = API.EventListParams;
|
|
721
729
|
export import ExpectedPayment = API.ExpectedPayment;
|
|
730
|
+
export import ExpectedPaymentType = API.ExpectedPaymentType;
|
|
722
731
|
export import ExpectedPaymentsPage = API.ExpectedPaymentsPage;
|
|
723
732
|
export import ExpectedPaymentCreateParams = API.ExpectedPaymentCreateParams;
|
|
724
733
|
export import ExpectedPaymentUpdateParams = API.ExpectedPaymentUpdateParams;
|
|
725
734
|
export import ExpectedPaymentListParams = API.ExpectedPaymentListParams;
|
|
726
735
|
export import ExternalAccount = API.ExternalAccount;
|
|
736
|
+
export import ExternalAccountType = API.ExternalAccountType;
|
|
727
737
|
export import ExternalAccountsPage = API.ExternalAccountsPage;
|
|
728
738
|
export import ExternalAccountCreateParams = API.ExternalAccountCreateParams;
|
|
729
739
|
export import ExternalAccountUpdateParams = API.ExternalAccountUpdateParams;
|
|
@@ -781,6 +791,119 @@ declare namespace ModernTreasury {
|
|
|
781
791
|
export import LineItemUpdateParams = API.LineItemUpdateParams;
|
|
782
792
|
export import LineItemListParams = API.LineItemListParams;
|
|
783
793
|
export import PaymentOrder = API.PaymentOrder;
|
|
794
|
+
export import PaymentOrderSubtype = API.PaymentOrderSubtype;
|
|
795
|
+
export import PaymentOrderType = API.PaymentOrderType;
|
|
796
|
+
export import PaymentOrdersPage = API.PaymentOrdersPage;
|
|
797
|
+
export import PaymentOrderCreateParams = API.PaymentOrderCreateParams;
|
|
798
|
+
export import PaymentOrderUpdateParams = API.PaymentOrderUpdateParams;
|
|
799
|
+
export import PaymentOrderListParams = API.PaymentOrderListParams;
|
|
800
|
+
export import PaymentOrderCreateAsyncParams = API.PaymentOrderCreateAsyncParams;
|
|
801
|
+
export import ReturnObject = API.ReturnObject;
|
|
802
|
+
export import ReturnObjectsPage = API.ReturnObjectsPage;
|
|
803
|
+
export import ReturnCreateParams = API.ReturnCreateParams;
|
|
804
|
+
export import ReturnListParams = API.ReturnListParams;
|
|
805
|
+
export import Transaction = API.Transaction;
|
|
806
|
+
export import TransactionsPage = API.TransactionsPage;
|
|
807
|
+
export import TransactionUpdateParams = API.TransactionUpdateParams;
|
|
808
|
+
export import TransactionListParams = API.TransactionListParams;
|
|
809
|
+
export import RoutingNumberLookupRequest = API.RoutingNumberLookupRequest;
|
|
810
|
+
export import ValidationValidateRoutingNumberParams = API.ValidationValidateRoutingNumberParams;
|
|
811
|
+
export import PaperItem = API.PaperItem;
|
|
812
|
+
export import PaperItemsPage = API.PaperItemsPage;
|
|
813
|
+
export import PaperItemListParams = API.PaperItemListParams;
|
|
814
|
+
export import VirtualAccount = API.VirtualAccount;
|
|
815
|
+
export import VirtualAccountsPage = API.VirtualAccountsPage;
|
|
816
|
+
export import VirtualAccountCreateParams = API.VirtualAccountCreateParams;
|
|
817
|
+
export import VirtualAccountUpdateParams = API.VirtualAccountUpdateParams;
|
|
818
|
+
export import VirtualAccountListParams = API.VirtualAccountListParams;
|
|
819
|
+
}
|
|
820
|
+
declare namespace ModernTreasury {
|
|
821
|
+
// Helper functions
|
|
822
|
+
export import fileFromPath = FileFromPath.fileFromPath;
|
|
823
|
+
export import Page = Pagination.Page;
|
|
824
|
+
export import PageParams = Pagination.PageParams;
|
|
825
|
+
export import PageResponse = Pagination.PageResponse;
|
|
826
|
+
export import PingResponse = API.PingResponse;
|
|
827
|
+
export import Connection = API.Connection;
|
|
828
|
+
export import ConnectionsPage = API.ConnectionsPage;
|
|
829
|
+
export import ConnectionListParams = API.ConnectionListParams;
|
|
830
|
+
export import Counterparty = API.Counterparty;
|
|
831
|
+
export import CounterpartyCollectAccountResponse = API.CounterpartyCollectAccountResponse;
|
|
832
|
+
export import CounterpartiesPage = API.CounterpartiesPage;
|
|
833
|
+
export import CounterpartyCreateParams = API.CounterpartyCreateParams;
|
|
834
|
+
export import CounterpartyUpdateParams = API.CounterpartyUpdateParams;
|
|
835
|
+
export import CounterpartyListParams = API.CounterpartyListParams;
|
|
836
|
+
export import CounterpartyCollectAccountParams = API.CounterpartyCollectAccountParams;
|
|
837
|
+
export import Event = API.Event;
|
|
838
|
+
export import EventsPage = API.EventsPage;
|
|
839
|
+
export import EventListParams = API.EventListParams;
|
|
840
|
+
export import ExpectedPayment = API.ExpectedPayment;
|
|
841
|
+
export import ExpectedPaymentType = API.ExpectedPaymentType;
|
|
842
|
+
export import ExpectedPaymentsPage = API.ExpectedPaymentsPage;
|
|
843
|
+
export import ExpectedPaymentCreateParams = API.ExpectedPaymentCreateParams;
|
|
844
|
+
export import ExpectedPaymentUpdateParams = API.ExpectedPaymentUpdateParams;
|
|
845
|
+
export import ExpectedPaymentListParams = API.ExpectedPaymentListParams;
|
|
846
|
+
export import ExternalAccount = API.ExternalAccount;
|
|
847
|
+
export import ExternalAccountType = API.ExternalAccountType;
|
|
848
|
+
export import ExternalAccountsPage = API.ExternalAccountsPage;
|
|
849
|
+
export import ExternalAccountCreateParams = API.ExternalAccountCreateParams;
|
|
850
|
+
export import ExternalAccountUpdateParams = API.ExternalAccountUpdateParams;
|
|
851
|
+
export import ExternalAccountListParams = API.ExternalAccountListParams;
|
|
852
|
+
export import ExternalAccountCompleteVerificationParams = API.ExternalAccountCompleteVerificationParams;
|
|
853
|
+
export import ExternalAccountVerifyParams = API.ExternalAccountVerifyParams;
|
|
854
|
+
export import IncomingPaymentDetail = API.IncomingPaymentDetail;
|
|
855
|
+
export import IncomingPaymentDetailsPage = API.IncomingPaymentDetailsPage;
|
|
856
|
+
export import IncomingPaymentDetailUpdateParams = API.IncomingPaymentDetailUpdateParams;
|
|
857
|
+
export import IncomingPaymentDetailListParams = API.IncomingPaymentDetailListParams;
|
|
858
|
+
export import IncomingPaymentDetailCreateAsyncParams = API.IncomingPaymentDetailCreateAsyncParams;
|
|
859
|
+
export import Document = API.Document;
|
|
860
|
+
export import DocumentsPage = API.DocumentsPage;
|
|
861
|
+
export import DocumentCreateParams = API.DocumentCreateParams;
|
|
862
|
+
export import DocumentListParams = API.DocumentListParams;
|
|
863
|
+
export import AccountDetail = API.AccountDetail;
|
|
864
|
+
export import AccountDetailsPage = API.AccountDetailsPage;
|
|
865
|
+
export import AccountDetailCreateParams = API.AccountDetailCreateParams;
|
|
866
|
+
export import AccountDetailListParams = API.AccountDetailListParams;
|
|
867
|
+
export import RoutingDetail = API.RoutingDetail;
|
|
868
|
+
export import RoutingDetailsPage = API.RoutingDetailsPage;
|
|
869
|
+
export import RoutingDetailCreateParams = API.RoutingDetailCreateParams;
|
|
870
|
+
export import RoutingDetailListParams = API.RoutingDetailListParams;
|
|
871
|
+
export import InternalAccount = API.InternalAccount;
|
|
872
|
+
export import InternalAccountsPage = API.InternalAccountsPage;
|
|
873
|
+
export import InternalAccountCreateParams = API.InternalAccountCreateParams;
|
|
874
|
+
export import InternalAccountUpdateParams = API.InternalAccountUpdateParams;
|
|
875
|
+
export import InternalAccountListParams = API.InternalAccountListParams;
|
|
876
|
+
export import Ledger = API.Ledger;
|
|
877
|
+
export import LedgersPage = API.LedgersPage;
|
|
878
|
+
export import LedgerCreateParams = API.LedgerCreateParams;
|
|
879
|
+
export import LedgerUpdateParams = API.LedgerUpdateParams;
|
|
880
|
+
export import LedgerListParams = API.LedgerListParams;
|
|
881
|
+
export import LedgerAccountCategory = API.LedgerAccountCategory;
|
|
882
|
+
export import LedgerAccountCategoriesPage = API.LedgerAccountCategoriesPage;
|
|
883
|
+
export import LedgerAccountCategoryCreateParams = API.LedgerAccountCategoryCreateParams;
|
|
884
|
+
export import LedgerAccountCategoryUpdateParams = API.LedgerAccountCategoryUpdateParams;
|
|
885
|
+
export import LedgerAccountCategoryListParams = API.LedgerAccountCategoryListParams;
|
|
886
|
+
export import LedgerAccount = API.LedgerAccount;
|
|
887
|
+
export import LedgerAccountsPage = API.LedgerAccountsPage;
|
|
888
|
+
export import LedgerAccountCreateParams = API.LedgerAccountCreateParams;
|
|
889
|
+
export import LedgerAccountRetrieveParams = API.LedgerAccountRetrieveParams;
|
|
890
|
+
export import LedgerAccountUpdateParams = API.LedgerAccountUpdateParams;
|
|
891
|
+
export import LedgerAccountListParams = API.LedgerAccountListParams;
|
|
892
|
+
export import LedgerEntry = API.LedgerEntry;
|
|
893
|
+
export import LedgerEntriesPage = API.LedgerEntriesPage;
|
|
894
|
+
export import LedgerEntryListParams = API.LedgerEntryListParams;
|
|
895
|
+
export import LedgerTransaction = API.LedgerTransaction;
|
|
896
|
+
export import LedgerTransactionsPage = API.LedgerTransactionsPage;
|
|
897
|
+
export import LedgerTransactionCreateParams = API.LedgerTransactionCreateParams;
|
|
898
|
+
export import LedgerTransactionUpdateParams = API.LedgerTransactionUpdateParams;
|
|
899
|
+
export import LedgerTransactionListParams = API.LedgerTransactionListParams;
|
|
900
|
+
export import LineItem = API.LineItem;
|
|
901
|
+
export import LineItemsPage = API.LineItemsPage;
|
|
902
|
+
export import LineItemUpdateParams = API.LineItemUpdateParams;
|
|
903
|
+
export import LineItemListParams = API.LineItemListParams;
|
|
904
|
+
export import PaymentOrder = API.PaymentOrder;
|
|
905
|
+
export import PaymentOrderSubtype = API.PaymentOrderSubtype;
|
|
906
|
+
export import PaymentOrderType = API.PaymentOrderType;
|
|
784
907
|
export import PaymentOrdersPage = API.PaymentOrdersPage;
|
|
785
908
|
export import PaymentOrderCreateParams = API.PaymentOrderCreateParams;
|
|
786
909
|
export import PaymentOrderUpdateParams = API.PaymentOrderUpdateParams;
|
|
@@ -836,155 +959,758 @@ declare namespace RoutingDetail {
|
|
|
836
959
|
updated_at: string;
|
|
837
960
|
}
|
|
838
961
|
}
|
|
839
|
-
declare namespace
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
962
|
+
declare namespace Shared {
|
|
963
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
964
|
+
/**
|
|
965
|
+
* Three-letter ISO currency code.
|
|
966
|
+
*/
|
|
967
|
+
type Currency =
|
|
968
|
+
| 'AED'
|
|
969
|
+
| 'AFN'
|
|
970
|
+
| 'ALL'
|
|
971
|
+
| 'AMD'
|
|
972
|
+
| 'ANG'
|
|
973
|
+
| 'AOA'
|
|
974
|
+
| 'ARS'
|
|
975
|
+
| 'AUD'
|
|
976
|
+
| 'AWG'
|
|
977
|
+
| 'AZN'
|
|
978
|
+
| 'BAM'
|
|
979
|
+
| 'BBD'
|
|
980
|
+
| 'BCH'
|
|
981
|
+
| 'BDT'
|
|
982
|
+
| 'BGN'
|
|
983
|
+
| 'BHD'
|
|
984
|
+
| 'BIF'
|
|
985
|
+
| 'BMD'
|
|
986
|
+
| 'BND'
|
|
987
|
+
| 'BOB'
|
|
988
|
+
| 'BRL'
|
|
989
|
+
| 'BSD'
|
|
990
|
+
| 'BTC'
|
|
991
|
+
| 'BTN'
|
|
992
|
+
| 'BWP'
|
|
993
|
+
| 'BYN'
|
|
994
|
+
| 'BYR'
|
|
995
|
+
| 'BZD'
|
|
996
|
+
| 'CAD'
|
|
997
|
+
| 'CDF'
|
|
998
|
+
| 'CHF'
|
|
999
|
+
| 'CLF'
|
|
1000
|
+
| 'CLP'
|
|
1001
|
+
| 'CNH'
|
|
1002
|
+
| 'CNY'
|
|
1003
|
+
| 'COP'
|
|
1004
|
+
| 'CRC'
|
|
1005
|
+
| 'CUC'
|
|
1006
|
+
| 'CUP'
|
|
1007
|
+
| 'CVE'
|
|
1008
|
+
| 'CZK'
|
|
1009
|
+
| 'DJF'
|
|
1010
|
+
| 'DKK'
|
|
1011
|
+
| 'DOP'
|
|
1012
|
+
| 'DZD'
|
|
1013
|
+
| 'EEK'
|
|
1014
|
+
| 'EGP'
|
|
1015
|
+
| 'ERN'
|
|
1016
|
+
| 'ETB'
|
|
1017
|
+
| 'EUR'
|
|
1018
|
+
| 'FJD'
|
|
1019
|
+
| 'FKP'
|
|
1020
|
+
| 'GBP'
|
|
1021
|
+
| 'GBX'
|
|
1022
|
+
| 'GEL'
|
|
1023
|
+
| 'GGP'
|
|
1024
|
+
| 'GHS'
|
|
1025
|
+
| 'GIP'
|
|
1026
|
+
| 'GMD'
|
|
1027
|
+
| 'GNF'
|
|
1028
|
+
| 'GTQ'
|
|
1029
|
+
| 'GYD'
|
|
1030
|
+
| 'HKD'
|
|
1031
|
+
| 'HNL'
|
|
1032
|
+
| 'HRK'
|
|
1033
|
+
| 'HTG'
|
|
1034
|
+
| 'HUF'
|
|
1035
|
+
| 'IDR'
|
|
1036
|
+
| 'ILS'
|
|
1037
|
+
| 'IMP'
|
|
1038
|
+
| 'INR'
|
|
1039
|
+
| 'IQD'
|
|
1040
|
+
| 'IRR'
|
|
1041
|
+
| 'ISK'
|
|
1042
|
+
| 'JEP'
|
|
1043
|
+
| 'JMD'
|
|
1044
|
+
| 'JOD'
|
|
1045
|
+
| 'JPY'
|
|
1046
|
+
| 'KES'
|
|
1047
|
+
| 'KGS'
|
|
1048
|
+
| 'KHR'
|
|
1049
|
+
| 'KMF'
|
|
1050
|
+
| 'KPW'
|
|
1051
|
+
| 'KRW'
|
|
1052
|
+
| 'KWD'
|
|
1053
|
+
| 'KYD'
|
|
1054
|
+
| 'KZT'
|
|
1055
|
+
| 'LAK'
|
|
1056
|
+
| 'LBP'
|
|
1057
|
+
| 'LKR'
|
|
1058
|
+
| 'LRD'
|
|
1059
|
+
| 'LSL'
|
|
1060
|
+
| 'LTL'
|
|
1061
|
+
| 'LVL'
|
|
1062
|
+
| 'LYD'
|
|
1063
|
+
| 'MAD'
|
|
1064
|
+
| 'MDL'
|
|
1065
|
+
| 'MGA'
|
|
1066
|
+
| 'MKD'
|
|
1067
|
+
| 'MMK'
|
|
1068
|
+
| 'MNT'
|
|
1069
|
+
| 'MOP'
|
|
1070
|
+
| 'MRO'
|
|
1071
|
+
| 'MRU'
|
|
1072
|
+
| 'MTL'
|
|
1073
|
+
| 'MUR'
|
|
1074
|
+
| 'MVR'
|
|
1075
|
+
| 'MWK'
|
|
1076
|
+
| 'MXN'
|
|
1077
|
+
| 'MYR'
|
|
1078
|
+
| 'MZN'
|
|
1079
|
+
| 'NAD'
|
|
1080
|
+
| 'NGN'
|
|
1081
|
+
| 'NIO'
|
|
1082
|
+
| 'NOK'
|
|
1083
|
+
| 'NPR'
|
|
1084
|
+
| 'NZD'
|
|
1085
|
+
| 'OMR'
|
|
1086
|
+
| 'PAB'
|
|
1087
|
+
| 'PEN'
|
|
1088
|
+
| 'PGK'
|
|
1089
|
+
| 'PHP'
|
|
1090
|
+
| 'PKR'
|
|
1091
|
+
| 'PLN'
|
|
1092
|
+
| 'PYG'
|
|
1093
|
+
| 'QAR'
|
|
1094
|
+
| 'RON'
|
|
1095
|
+
| 'RSD'
|
|
1096
|
+
| 'RUB'
|
|
1097
|
+
| 'RWF'
|
|
1098
|
+
| 'SAR'
|
|
1099
|
+
| 'SBD'
|
|
1100
|
+
| 'SCR'
|
|
1101
|
+
| 'SDG'
|
|
1102
|
+
| 'SEK'
|
|
1103
|
+
| 'SGD'
|
|
1104
|
+
| 'SHP'
|
|
1105
|
+
| 'SKK'
|
|
1106
|
+
| 'SLL'
|
|
1107
|
+
| 'SOS'
|
|
1108
|
+
| 'SRD'
|
|
1109
|
+
| 'SSP'
|
|
1110
|
+
| 'STD'
|
|
1111
|
+
| 'SVC'
|
|
1112
|
+
| 'SYP'
|
|
1113
|
+
| 'SZL'
|
|
1114
|
+
| 'THB'
|
|
1115
|
+
| 'TJS'
|
|
1116
|
+
| 'TMM'
|
|
1117
|
+
| 'TMT'
|
|
1118
|
+
| 'TND'
|
|
1119
|
+
| 'TOP'
|
|
1120
|
+
| 'TRY'
|
|
1121
|
+
| 'TTD'
|
|
1122
|
+
| 'TWD'
|
|
1123
|
+
| 'TZS'
|
|
1124
|
+
| 'UAH'
|
|
1125
|
+
| 'UGX'
|
|
1126
|
+
| 'USD'
|
|
1127
|
+
| 'UYU'
|
|
1128
|
+
| 'UZS'
|
|
1129
|
+
| 'VEF'
|
|
1130
|
+
| 'VES'
|
|
1131
|
+
| 'VND'
|
|
1132
|
+
| 'VUV'
|
|
1133
|
+
| 'WST'
|
|
1134
|
+
| 'XAF'
|
|
1135
|
+
| 'XAG'
|
|
1136
|
+
| 'XAU'
|
|
1137
|
+
| 'XBA'
|
|
1138
|
+
| 'XBB'
|
|
1139
|
+
| 'XBC'
|
|
1140
|
+
| 'XBD'
|
|
1141
|
+
| 'XCD'
|
|
1142
|
+
| 'XDR'
|
|
1143
|
+
| 'XFU'
|
|
1144
|
+
| 'XOF'
|
|
1145
|
+
| 'XPD'
|
|
1146
|
+
| 'XPF'
|
|
1147
|
+
| 'XPT'
|
|
1148
|
+
| 'XTS'
|
|
1149
|
+
| 'YER'
|
|
1150
|
+
| 'ZAR'
|
|
1151
|
+
| 'ZMK'
|
|
1152
|
+
| 'ZMW'
|
|
1153
|
+
| 'ZWD'
|
|
1154
|
+
| 'ZWL'
|
|
1155
|
+
| 'ZWN'
|
|
1156
|
+
| 'ZWR'
|
|
1157
|
+
| null;
|
|
1158
|
+
}
|
|
1159
|
+
declare namespace AccountDetails {
|
|
1160
|
+
type Config = {
|
|
1161
|
+
/**
|
|
1162
|
+
* Defaults to to process.env["MODERN_TREASURY_API_KEY"]. Set it to null if you want to send unauthenticated requests.
|
|
1163
|
+
*/
|
|
1164
|
+
apiKey?: string | null;
|
|
1165
|
+
baseURL?: string;
|
|
1166
|
+
timeout?: number;
|
|
1167
|
+
httpAgent?: Agent;
|
|
1168
|
+
organizationId?: string | null;
|
|
1169
|
+
webhookKey?: string | null;
|
|
1170
|
+
};
|
|
1171
|
+
class ModernTreasury extends Core.APIClient {
|
|
1172
|
+
apiKey: string | null;
|
|
1173
|
+
organizationId: string;
|
|
1174
|
+
webhookKey?: string | null;
|
|
1175
|
+
constructor(config: Config);
|
|
1176
|
+
connections: API.Connections;
|
|
1177
|
+
counterparties: API.Counterparties;
|
|
1178
|
+
events: API.Events;
|
|
1179
|
+
expectedPayments: API.ExpectedPayments;
|
|
1180
|
+
externalAccounts: API.ExternalAccounts;
|
|
1181
|
+
incomingPaymentDetails: API.IncomingPaymentDetails;
|
|
1182
|
+
documents: API.Documents;
|
|
1183
|
+
accountDetails: API.AccountDetails;
|
|
1184
|
+
routingDetails: API.RoutingDetails;
|
|
1185
|
+
internalAccounts: API.InternalAccounts;
|
|
1186
|
+
ledgers: API.Ledgers;
|
|
1187
|
+
ledgerAccountCategories: API.LedgerAccountCategories;
|
|
1188
|
+
ledgerAccounts: API.LedgerAccounts;
|
|
1189
|
+
ledgerEntries: API.LedgerEntries;
|
|
1190
|
+
ledgerTransactions: API.LedgerTransactions;
|
|
1191
|
+
lineItems: API.LineItems;
|
|
1192
|
+
paymentOrders: API.PaymentOrders;
|
|
1193
|
+
returns: API.Returns;
|
|
1194
|
+
transactions: API.Transactions;
|
|
1195
|
+
validations: API.Validations;
|
|
1196
|
+
paperItems: API.PaperItems;
|
|
1197
|
+
webhooks: API.Webhooks;
|
|
1198
|
+
virtualAccounts: API.VirtualAccounts;
|
|
1199
|
+
/**
|
|
1200
|
+
* A test endpoint often used to confirm credentials and headers are being passed
|
|
1201
|
+
* in correctly.
|
|
1202
|
+
*/
|
|
1203
|
+
ping(options?: Core.RequestOptions): Promise<Core.APIResponse<ModernTreasury.PingResponse>>;
|
|
1204
|
+
protected authHeaders(): Core.Headers;
|
|
1205
|
+
protected qsOptions(): qs.IStringifyOptions;
|
|
1206
|
+
static APIError: typeof Core.APIError;
|
|
1207
|
+
static APIConnectionError: typeof Core.APIConnectionError;
|
|
1208
|
+
static APIConnectionTimeoutError: typeof Core.APIConnectionTimeoutError;
|
|
1209
|
+
static BadRequestError: typeof Core.BadRequestError;
|
|
1210
|
+
static AuthenticationError: typeof Core.AuthenticationError;
|
|
1211
|
+
static PermissionDeniedError: typeof Core.PermissionDeniedError;
|
|
1212
|
+
static NotFoundError: typeof Core.NotFoundError;
|
|
1213
|
+
static ConflictError: typeof Core.ConflictError;
|
|
1214
|
+
static UnprocessableEntityError: typeof Core.UnprocessableEntityError;
|
|
1215
|
+
static RateLimitError: typeof Core.RateLimitError;
|
|
1216
|
+
static InternalServerError: typeof Core.InternalServerError;
|
|
1217
|
+
}
|
|
1218
|
+
const APIError: typeof Core.APIError,
|
|
1219
|
+
APIConnectionError: typeof Core.APIConnectionError,
|
|
1220
|
+
APIConnectionTimeoutError: typeof Core.APIConnectionTimeoutError,
|
|
1221
|
+
BadRequestError: typeof Core.BadRequestError,
|
|
1222
|
+
AuthenticationError: typeof Core.AuthenticationError,
|
|
1223
|
+
PermissionDeniedError: typeof Core.PermissionDeniedError,
|
|
1224
|
+
NotFoundError: typeof Core.NotFoundError,
|
|
1225
|
+
ConflictError: typeof Core.ConflictError,
|
|
1226
|
+
UnprocessableEntityError: typeof Core.UnprocessableEntityError,
|
|
1227
|
+
RateLimitError: typeof Core.RateLimitError,
|
|
1228
|
+
InternalServerError: typeof Core.InternalServerError;
|
|
1229
|
+
class APIResource {
|
|
1230
|
+
protected client: ModernTreasury;
|
|
1231
|
+
constructor(client: ModernTreasury);
|
|
1232
|
+
protected get: ModernTreasury['get'];
|
|
1233
|
+
protected post: ModernTreasury['post'];
|
|
1234
|
+
protected patch: ModernTreasury['patch'];
|
|
1235
|
+
protected put: ModernTreasury['put'];
|
|
1236
|
+
protected delete: ModernTreasury['delete'];
|
|
1237
|
+
protected getAPIList: ModernTreasury['getAPIList'];
|
|
1238
|
+
}
|
|
1239
|
+
// 60s
|
|
1240
|
+
type Fetch = (url: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
1241
|
+
abstract class APIClient {
|
|
1242
|
+
baseURL: string;
|
|
1243
|
+
maxRetries: number;
|
|
1244
|
+
timeout: number;
|
|
1245
|
+
httpAgent: Agent | undefined;
|
|
1246
|
+
private fetch;
|
|
1247
|
+
protected idempotencyHeader?: string;
|
|
1248
|
+
constructor({
|
|
1249
|
+
baseURL,
|
|
1250
|
+
maxRetries,
|
|
1251
|
+
timeout,
|
|
1252
|
+
httpAgent,
|
|
1253
|
+
}: {
|
|
1254
|
+
baseURL: string;
|
|
1255
|
+
maxRetries?: number;
|
|
1256
|
+
timeout: number | undefined;
|
|
1257
|
+
httpAgent: Agent | undefined;
|
|
1258
|
+
});
|
|
1259
|
+
protected authHeaders(): Headers;
|
|
1260
|
+
/**
|
|
1261
|
+
* Override this to add your own default headers, for example:
|
|
1262
|
+
*
|
|
1263
|
+
* {
|
|
1264
|
+
* ...super.defaultHeaders(),
|
|
1265
|
+
* Authorization: 'Bearer 123',
|
|
1266
|
+
* }
|
|
1267
|
+
*/
|
|
1268
|
+
protected defaultHeaders(): Headers;
|
|
1269
|
+
/**
|
|
1270
|
+
* Override this to add your own qs.stringify options, for example:
|
|
1271
|
+
*
|
|
1272
|
+
* {
|
|
1273
|
+
* ...super.qsOptions(),
|
|
1274
|
+
* strictNullHandling: true,
|
|
1275
|
+
* }
|
|
1276
|
+
*/
|
|
1277
|
+
protected qsOptions(): qs.IStringifyOptions | undefined;
|
|
1278
|
+
protected defaultIdempotencyKey(): string;
|
|
1279
|
+
get<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req>): Promise<Rsp>;
|
|
1280
|
+
post<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req>): Promise<Rsp>;
|
|
1281
|
+
patch<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req>): Promise<Rsp>;
|
|
1282
|
+
put<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req>): Promise<Rsp>;
|
|
1283
|
+
delete<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req>): Promise<Rsp>;
|
|
1284
|
+
getAPIList<Item, PageClass extends AbstractPage<Item> = AbstractPage<Item>>(
|
|
1285
|
+
path: string,
|
|
1286
|
+
Page: new (...args: any[]) => PageClass,
|
|
1287
|
+
opts?: RequestOptions<any>,
|
|
1288
|
+
): PagePromise<PageClass>;
|
|
1289
|
+
request<Req extends {}, Rsp>(
|
|
1290
|
+
options: FinalRequestOptions<Req>,
|
|
1291
|
+
retriesRemaining?: number,
|
|
1292
|
+
): Promise<APIResponse<Rsp>>;
|
|
1293
|
+
requestAPIList<Item = unknown, PageClass extends AbstractPage<Item> = AbstractPage<Item>>(
|
|
1294
|
+
Page: new (...args: ConstructorParameters<typeof AbstractPage>) => PageClass,
|
|
1295
|
+
options: FinalRequestOptions,
|
|
1296
|
+
): PagePromise<PageClass>;
|
|
1297
|
+
buildURL<Req>(path: string, query: Req | undefined): string;
|
|
1298
|
+
fetchWithTimeout(
|
|
1299
|
+
url: RequestInfo,
|
|
1300
|
+
{ signal, ...options }: RequestInit | undefined,
|
|
1301
|
+
ms: number,
|
|
1302
|
+
): Promise<Response>;
|
|
1303
|
+
protected getRequestClient(): RequestClient;
|
|
1304
|
+
private shouldRetry;
|
|
1305
|
+
private retryRequest;
|
|
1306
|
+
private calculateRetryTimeoutSeconds;
|
|
1307
|
+
private getUserAgent;
|
|
1308
|
+
private debug;
|
|
1309
|
+
}
|
|
1310
|
+
class APIResource$0 {
|
|
1311
|
+
protected client: APIClient;
|
|
1312
|
+
constructor(client: APIClient);
|
|
1313
|
+
protected get: APIClient['get'];
|
|
1314
|
+
protected post: APIClient['post'];
|
|
1315
|
+
protected patch: APIClient['patch'];
|
|
1316
|
+
protected put: APIClient['put'];
|
|
1317
|
+
protected delete: APIClient['delete'];
|
|
1318
|
+
protected getAPIList: APIClient['getAPIList'];
|
|
1319
|
+
}
|
|
1320
|
+
type PageInfo =
|
|
1321
|
+
| {
|
|
1322
|
+
url: URL;
|
|
1323
|
+
}
|
|
1324
|
+
| {
|
|
1325
|
+
params: Record<string, unknown> | null;
|
|
1326
|
+
};
|
|
1327
|
+
abstract class AbstractPage<Item> implements AsyncIterable<Item> {
|
|
1328
|
+
#private;
|
|
1329
|
+
protected options: FinalRequestOptions;
|
|
1330
|
+
constructor(client: APIClient, response: APIResponse<unknown>, options: FinalRequestOptions);
|
|
1331
|
+
/**
|
|
1332
|
+
* @deprecated Use nextPageInfo instead
|
|
1333
|
+
*/
|
|
1334
|
+
abstract nextPageParams(): Partial<Record<string, unknown>> | null;
|
|
1335
|
+
abstract nextPageInfo(): PageInfo | null;
|
|
1336
|
+
abstract getPaginatedItems(): Item[];
|
|
1337
|
+
hasNextPage(): boolean;
|
|
1338
|
+
getNextPage(): Promise<AbstractPage<Item>>;
|
|
1339
|
+
iterPages(): AsyncGenerator<AbstractPage<Item>, void, unknown>;
|
|
1340
|
+
[Symbol.asyncIterator](): AsyncGenerator<Awaited<Item>, void, unknown>;
|
|
1341
|
+
}
|
|
1342
|
+
class PagePromise<
|
|
1343
|
+
PageClass extends AbstractPage<Item>,
|
|
1344
|
+
Item = ReturnType<PageClass['getPaginatedItems']>[number],
|
|
1345
|
+
>
|
|
1346
|
+
extends Promise<PageClass>
|
|
1347
|
+
implements AsyncIterable<Item>
|
|
1348
|
+
{
|
|
1349
|
+
/**
|
|
1350
|
+
* This subclass of Promise will resolve to an instantiated Page once the request completes.
|
|
1351
|
+
*/
|
|
1352
|
+
constructor(
|
|
1353
|
+
client: APIClient,
|
|
1354
|
+
requestPromise: Promise<APIResponse<unknown>>,
|
|
1355
|
+
options: FinalRequestOptions,
|
|
1356
|
+
Page: new (...args: ConstructorParameters<typeof AbstractPage>) => PageClass,
|
|
1357
|
+
);
|
|
1358
|
+
/**
|
|
1359
|
+
* Enable subclassing Promise.
|
|
1360
|
+
* Ref: https://stackoverflow.com/a/60328122
|
|
1361
|
+
*/
|
|
1362
|
+
static get [Symbol.species](): PromiseConstructor;
|
|
1363
|
+
/**
|
|
1364
|
+
* Allow auto-paginating iteration on an unawaited list call, eg:
|
|
1365
|
+
*
|
|
1366
|
+
* for await (const item of client.items.list()) {
|
|
1367
|
+
* console.log(item)
|
|
1368
|
+
* }
|
|
1369
|
+
*/
|
|
1370
|
+
[Symbol.asyncIterator](): AsyncGenerator<Awaited<Item>, void, unknown>;
|
|
1371
|
+
}
|
|
1372
|
+
const createResponseHeaders: (headers: Awaited<ReturnType<Fetch>>['headers']) => Record<string, string>;
|
|
1373
|
+
type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
1374
|
+
type RequestClient = {
|
|
1375
|
+
fetch: Fetch;
|
|
1376
|
+
};
|
|
1377
|
+
type Headers = Record<string, string | null | undefined>;
|
|
1378
|
+
type KeysEnum<T> = {
|
|
1379
|
+
[P in keyof Required<T>]: true;
|
|
1380
|
+
};
|
|
1381
|
+
type RequestOptions<Req extends {} = Record<string, unknown> | Readable> = {
|
|
1382
|
+
method?: HTTPMethod;
|
|
1383
|
+
path?: string;
|
|
1384
|
+
query?: Req | undefined;
|
|
1385
|
+
body?: Req | undefined;
|
|
1386
|
+
headers?: Headers | undefined;
|
|
1387
|
+
maxRetries?: number;
|
|
1388
|
+
timeout?: number;
|
|
1389
|
+
httpAgent?: Agent;
|
|
1390
|
+
idempotencyKey?: string;
|
|
1391
|
+
};
|
|
1392
|
+
const isRequestOptions: (obj: unknown) => obj is RequestOptions<Readable | Record<string, unknown>>;
|
|
1393
|
+
type FinalRequestOptions<Req extends {} = Record<string, unknown> | Readable> = RequestOptions<Req> & {
|
|
1394
|
+
method: HTTPMethod;
|
|
1395
|
+
path: string;
|
|
1396
|
+
};
|
|
1397
|
+
type APIResponse<T> = T & {
|
|
1398
|
+
responseHeaders: Headers;
|
|
1399
|
+
};
|
|
1400
|
+
class APIError$0 extends Error {
|
|
1401
|
+
readonly status: number | undefined;
|
|
1402
|
+
readonly headers: Headers | undefined;
|
|
1403
|
+
readonly error: Object | undefined;
|
|
1404
|
+
constructor(
|
|
1405
|
+
status: number | undefined,
|
|
1406
|
+
error: Object | undefined,
|
|
1407
|
+
message: string | undefined,
|
|
1408
|
+
headers: Headers | undefined,
|
|
1409
|
+
);
|
|
1410
|
+
static generate(
|
|
1411
|
+
status: number | undefined,
|
|
1412
|
+
error: Object | undefined,
|
|
1413
|
+
message: string | undefined,
|
|
1414
|
+
headers: Headers | undefined,
|
|
1415
|
+
): APIError$0;
|
|
1416
|
+
}
|
|
1417
|
+
class BadRequestError$0 extends APIError$0 {
|
|
1418
|
+
readonly status: 400;
|
|
1419
|
+
}
|
|
1420
|
+
class AuthenticationError$0 extends APIError$0 {
|
|
1421
|
+
readonly status: 401;
|
|
1422
|
+
}
|
|
1423
|
+
class PermissionDeniedError$0 extends APIError$0 {
|
|
1424
|
+
readonly status: 403;
|
|
1425
|
+
}
|
|
1426
|
+
class NotFoundError$0 extends APIError$0 {
|
|
1427
|
+
readonly status: 404;
|
|
1428
|
+
}
|
|
1429
|
+
class ConflictError$0 extends APIError$0 {
|
|
1430
|
+
readonly status: 409;
|
|
1431
|
+
}
|
|
1432
|
+
class UnprocessableEntityError$0 extends APIError$0 {
|
|
1433
|
+
readonly status: 422;
|
|
1434
|
+
}
|
|
1435
|
+
class RateLimitError$0 extends APIError$0 {
|
|
1436
|
+
readonly status: 429;
|
|
1437
|
+
}
|
|
1438
|
+
class InternalServerError$0 extends APIError$0 {}
|
|
1439
|
+
class APIConnectionError$0 extends APIError$0 {
|
|
1440
|
+
readonly status: undefined;
|
|
1441
|
+
constructor({ message, cause }: { message?: string; cause?: Error | undefined });
|
|
1442
|
+
}
|
|
1443
|
+
class APIConnectionTimeoutError$0 extends APIConnectionError$0 {
|
|
1444
|
+
constructor();
|
|
1445
|
+
}
|
|
1446
|
+
/**
|
|
1447
|
+
* Returns a multipart/form-data request if any part of the given request body contains a File / Blob value.
|
|
1448
|
+
* Otherwise returns the request as is.
|
|
1449
|
+
*/
|
|
1450
|
+
const maybeMultipartFormRequestOptions: <T extends {} = Record<string, unknown>>(
|
|
1451
|
+
opts: RequestOptions<T>,
|
|
1452
|
+
) => RequestOptions<Readable | T>;
|
|
1453
|
+
const multipartFormRequestOptions: <T extends {} = Record<string, unknown>>(
|
|
1454
|
+
opts: RequestOptions<T>,
|
|
1455
|
+
) => RequestOptions<Readable | T>;
|
|
1456
|
+
const ensurePresent: <T>(value: T | null | undefined) => T;
|
|
1457
|
+
const coerceInteger: (value: unknown) => number;
|
|
1458
|
+
// https://stackoverflow.com/a/34491287
|
|
1459
|
+
function isEmptyObj(obj: Object | null | undefined): boolean;
|
|
1460
|
+
// https://eslint.org/docs/latest/rules/no-prototype-builtins
|
|
1461
|
+
function hasOwn(obj: Object, key: string): boolean;
|
|
1462
|
+
interface HeadersProtocol {
|
|
1463
|
+
get: (header: string) => string | null | undefined;
|
|
1464
|
+
}
|
|
1465
|
+
type HeadersLike = Record<string, string | string[] | undefined> | HeadersProtocol;
|
|
1466
|
+
const isHeadersProtocol: (headers: any) => headers is HeadersProtocol;
|
|
1467
|
+
const getHeader: (headers: HeadersLike, key: string) => string | null | undefined;
|
|
1468
|
+
type PageResponse<Item> = Item[];
|
|
1469
|
+
interface PageParams {
|
|
1470
|
+
after_cursor?: string | null;
|
|
1471
|
+
per_page?: number;
|
|
1472
|
+
}
|
|
1473
|
+
class Page<Item> extends AbstractPage<Item> {
|
|
1474
|
+
items: Array<Item>;
|
|
1475
|
+
per_page: number | null;
|
|
1476
|
+
after_cursor: string | null;
|
|
1477
|
+
constructor(client: APIClient, response: APIResponse<PageResponse<Item>>, options: FinalRequestOptions);
|
|
1478
|
+
getPaginatedItems(): Item[];
|
|
1479
|
+
// @deprecated Please use `nextPageInfo()` instead
|
|
1480
|
+
nextPageParams(): Partial<PageParams> | null;
|
|
1481
|
+
nextPageInfo(): PageInfo | null;
|
|
1482
|
+
}
|
|
1483
|
+
class AccountDetails extends APIResource {
|
|
1484
|
+
/**
|
|
1485
|
+
* Create an account detail for an external account.
|
|
1486
|
+
*/
|
|
1487
|
+
create(
|
|
1488
|
+
accountsType: 'external_accounts',
|
|
1489
|
+
accountId: string,
|
|
1490
|
+
body: AccountDetailCreateParams,
|
|
1491
|
+
options?: Core.RequestOptions,
|
|
1492
|
+
): Promise<Core.APIResponse<AccountDetail>>;
|
|
1493
|
+
/**
|
|
1494
|
+
* Get a single account detail for a single internal or external account.
|
|
1495
|
+
*/
|
|
1496
|
+
retrieve(
|
|
1497
|
+
accountsType: 'external_accounts' | 'internal_accounts',
|
|
1498
|
+
accountId: string,
|
|
1499
|
+
id: string,
|
|
1500
|
+
options?: Core.RequestOptions,
|
|
1501
|
+
): Promise<Core.APIResponse<AccountDetail>>;
|
|
1502
|
+
/**
|
|
1503
|
+
* Get a list of account details for a single internal or external account.
|
|
1504
|
+
*/
|
|
1505
|
+
list(
|
|
1506
|
+
accountsType: 'external_accounts' | 'internal_accounts',
|
|
1507
|
+
accountId: string,
|
|
1508
|
+
query?: AccountDetailListParams,
|
|
1509
|
+
options?: Core.RequestOptions,
|
|
1510
|
+
): Core.PagePromise<AccountDetailsPage>;
|
|
1511
|
+
list(
|
|
1512
|
+
accountsType: 'external_accounts' | 'internal_accounts',
|
|
1513
|
+
accountId: string,
|
|
1514
|
+
options?: Core.RequestOptions,
|
|
1515
|
+
): Core.PagePromise<AccountDetailsPage>;
|
|
1516
|
+
/**
|
|
1517
|
+
* Delete a single account detail for an external account.
|
|
1518
|
+
*/
|
|
1519
|
+
del(
|
|
1520
|
+
accountsType: 'external_accounts',
|
|
1521
|
+
accountId: string,
|
|
1522
|
+
id: string,
|
|
1523
|
+
options?: Core.RequestOptions,
|
|
1524
|
+
): Promise<void>;
|
|
1525
|
+
}
|
|
1526
|
+
class AccountDetailsPage extends Page<AccountDetail> {}
|
|
1527
|
+
interface AccountDetail {
|
|
1528
|
+
/**
|
|
1529
|
+
* The account number for the bank account.
|
|
1530
|
+
*/
|
|
1531
|
+
account_number: string;
|
|
1532
|
+
/**
|
|
1533
|
+
* The last 4 digits of the account_number.
|
|
1534
|
+
*/
|
|
1535
|
+
account_number_safe: string;
|
|
1536
|
+
/**
|
|
1537
|
+
* One of `iban`, `clabe`, `wallet_address`, or `other`. Use `other` if the bank
|
|
1538
|
+
* account number is in a generic format.
|
|
1539
|
+
*/
|
|
1540
|
+
account_number_type: 'clabe' | 'iban' | 'other' | 'pan' | 'wallet_address';
|
|
1541
|
+
created_at: string;
|
|
1542
|
+
discarded_at: string | null;
|
|
1543
|
+
id: string;
|
|
1544
|
+
/**
|
|
1545
|
+
* This field will be true if this object exists in the live environment or false
|
|
1546
|
+
* if it exists in the test environment.
|
|
1547
|
+
*/
|
|
1548
|
+
live_mode: boolean;
|
|
1549
|
+
object: string;
|
|
1550
|
+
updated_at: string;
|
|
1551
|
+
}
|
|
1552
|
+
interface AccountDetailCreateParams {
|
|
1553
|
+
/**
|
|
1554
|
+
* The account number for the bank account.
|
|
1555
|
+
*/
|
|
1556
|
+
account_number: string;
|
|
1557
|
+
/**
|
|
1558
|
+
* One of `iban`, `clabe`, `wallet_address`, or `other`. Use `other` if the bank
|
|
1559
|
+
* account number is in a generic format.
|
|
1560
|
+
*/
|
|
1561
|
+
account_number_type?: 'clabe' | 'iban' | 'other' | 'pan' | 'wallet_address';
|
|
1562
|
+
}
|
|
1563
|
+
interface AccountDetailListParams extends PageParams {}
|
|
1564
|
+
}
|
|
1565
|
+
declare namespace RoutingDetails {
|
|
1566
|
+
type Config = {
|
|
1567
|
+
/**
|
|
1568
|
+
* Defaults to to process.env["MODERN_TREASURY_API_KEY"]. Set it to null if you want to send unauthenticated requests.
|
|
1569
|
+
*/
|
|
1570
|
+
apiKey?: string | null;
|
|
1571
|
+
baseURL?: string;
|
|
1572
|
+
timeout?: number;
|
|
1573
|
+
httpAgent?: Agent;
|
|
1574
|
+
organizationId?: string | null;
|
|
1575
|
+
webhookKey?: string | null;
|
|
1576
|
+
};
|
|
1577
|
+
class ModernTreasury extends Core.APIClient {
|
|
1578
|
+
apiKey: string | null;
|
|
1579
|
+
organizationId: string;
|
|
1580
|
+
webhookKey?: string | null;
|
|
1581
|
+
constructor(config: Config);
|
|
1582
|
+
connections: API.Connections;
|
|
1583
|
+
counterparties: API.Counterparties;
|
|
1584
|
+
events: API.Events;
|
|
1585
|
+
expectedPayments: API.ExpectedPayments;
|
|
1586
|
+
externalAccounts: API.ExternalAccounts;
|
|
1587
|
+
incomingPaymentDetails: API.IncomingPaymentDetails;
|
|
1588
|
+
documents: API.Documents;
|
|
1589
|
+
accountDetails: API.AccountDetails;
|
|
1590
|
+
routingDetails: API.RoutingDetails;
|
|
1591
|
+
internalAccounts: API.InternalAccounts;
|
|
1592
|
+
ledgers: API.Ledgers;
|
|
1593
|
+
ledgerAccountCategories: API.LedgerAccountCategories;
|
|
1594
|
+
ledgerAccounts: API.LedgerAccounts;
|
|
1595
|
+
ledgerEntries: API.LedgerEntries;
|
|
1596
|
+
ledgerTransactions: API.LedgerTransactions;
|
|
1597
|
+
lineItems: API.LineItems;
|
|
1598
|
+
paymentOrders: API.PaymentOrders;
|
|
1599
|
+
returns: API.Returns;
|
|
1600
|
+
transactions: API.Transactions;
|
|
1601
|
+
validations: API.Validations;
|
|
1602
|
+
paperItems: API.PaperItems;
|
|
1603
|
+
webhooks: API.Webhooks;
|
|
1604
|
+
virtualAccounts: API.VirtualAccounts;
|
|
1605
|
+
/**
|
|
1606
|
+
* A test endpoint often used to confirm credentials and headers are being passed
|
|
1607
|
+
* in correctly.
|
|
1608
|
+
*/
|
|
1609
|
+
ping(options?: Core.RequestOptions): Promise<Core.APIResponse<ModernTreasury.PingResponse>>;
|
|
1610
|
+
protected authHeaders(): Core.Headers;
|
|
1611
|
+
protected qsOptions(): qs.IStringifyOptions;
|
|
1612
|
+
static APIError: typeof Core.APIError;
|
|
1613
|
+
static APIConnectionError: typeof Core.APIConnectionError;
|
|
1614
|
+
static APIConnectionTimeoutError: typeof Core.APIConnectionTimeoutError;
|
|
1615
|
+
static BadRequestError: typeof Core.BadRequestError;
|
|
1616
|
+
static AuthenticationError: typeof Core.AuthenticationError;
|
|
1617
|
+
static PermissionDeniedError: typeof Core.PermissionDeniedError;
|
|
1618
|
+
static NotFoundError: typeof Core.NotFoundError;
|
|
1619
|
+
static ConflictError: typeof Core.ConflictError;
|
|
1620
|
+
static UnprocessableEntityError: typeof Core.UnprocessableEntityError;
|
|
1621
|
+
static RateLimitError: typeof Core.RateLimitError;
|
|
1622
|
+
static InternalServerError: typeof Core.InternalServerError;
|
|
1623
|
+
}
|
|
1624
|
+
const APIError: typeof Core.APIError,
|
|
1625
|
+
APIConnectionError: typeof Core.APIConnectionError,
|
|
1626
|
+
APIConnectionTimeoutError: typeof Core.APIConnectionTimeoutError,
|
|
1627
|
+
BadRequestError: typeof Core.BadRequestError,
|
|
1628
|
+
AuthenticationError: typeof Core.AuthenticationError,
|
|
1629
|
+
PermissionDeniedError: typeof Core.PermissionDeniedError,
|
|
1630
|
+
NotFoundError: typeof Core.NotFoundError,
|
|
1631
|
+
ConflictError: typeof Core.ConflictError,
|
|
1632
|
+
UnprocessableEntityError: typeof Core.UnprocessableEntityError,
|
|
1633
|
+
RateLimitError: typeof Core.RateLimitError,
|
|
1634
|
+
InternalServerError: typeof Core.InternalServerError;
|
|
1635
|
+
class APIResource {
|
|
1636
|
+
protected client: ModernTreasury;
|
|
1637
|
+
constructor(client: ModernTreasury);
|
|
1638
|
+
protected get: ModernTreasury['get'];
|
|
1639
|
+
protected post: ModernTreasury['post'];
|
|
1640
|
+
protected patch: ModernTreasury['patch'];
|
|
1641
|
+
protected put: ModernTreasury['put'];
|
|
1642
|
+
protected delete: ModernTreasury['delete'];
|
|
1643
|
+
protected getAPIList: ModernTreasury['getAPIList'];
|
|
1644
|
+
}
|
|
1645
|
+
// 60s
|
|
1646
|
+
type Fetch = (url: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
1647
|
+
abstract class APIClient {
|
|
1648
|
+
baseURL: string;
|
|
1649
|
+
maxRetries: number;
|
|
1650
|
+
timeout: number;
|
|
1651
|
+
httpAgent: Agent | undefined;
|
|
1652
|
+
private fetch;
|
|
1653
|
+
protected idempotencyHeader?: string;
|
|
1654
|
+
constructor({
|
|
1655
|
+
baseURL,
|
|
1656
|
+
maxRetries,
|
|
1657
|
+
timeout,
|
|
1658
|
+
httpAgent,
|
|
1659
|
+
}: {
|
|
1660
|
+
baseURL: string;
|
|
1661
|
+
maxRetries?: number;
|
|
1662
|
+
timeout: number | undefined;
|
|
1663
|
+
httpAgent: Agent | undefined;
|
|
1664
|
+
});
|
|
1665
|
+
protected authHeaders(): Headers;
|
|
1666
|
+
/**
|
|
1667
|
+
* Override this to add your own default headers, for example:
|
|
1668
|
+
*
|
|
1669
|
+
* {
|
|
1670
|
+
* ...super.defaultHeaders(),
|
|
1671
|
+
* Authorization: 'Bearer 123',
|
|
1672
|
+
* }
|
|
1673
|
+
*/
|
|
1674
|
+
protected defaultHeaders(): Headers;
|
|
1675
|
+
/**
|
|
1676
|
+
* Override this to add your own qs.stringify options, for example:
|
|
1677
|
+
*
|
|
1678
|
+
* {
|
|
1679
|
+
* ...super.qsOptions(),
|
|
1680
|
+
* strictNullHandling: true,
|
|
1681
|
+
* }
|
|
1682
|
+
*/
|
|
1683
|
+
protected qsOptions(): qs.IStringifyOptions | undefined;
|
|
1684
|
+
protected defaultIdempotencyKey(): string;
|
|
1685
|
+
get<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req>): Promise<Rsp>;
|
|
1686
|
+
post<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req>): Promise<Rsp>;
|
|
1687
|
+
patch<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req>): Promise<Rsp>;
|
|
1688
|
+
put<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req>): Promise<Rsp>;
|
|
1689
|
+
delete<Req extends {}, Rsp>(path: string, opts?: RequestOptions<Req>): Promise<Rsp>;
|
|
1690
|
+
getAPIList<Item, PageClass extends AbstractPage<Item> = AbstractPage<Item>>(
|
|
1691
|
+
path: string,
|
|
1692
|
+
Page: new (...args: any[]) => PageClass,
|
|
1693
|
+
opts?: RequestOptions<any>,
|
|
1694
|
+
): PagePromise<PageClass>;
|
|
1695
|
+
request<Req extends {}, Rsp>(
|
|
1696
|
+
options: FinalRequestOptions<Req>,
|
|
1697
|
+
retriesRemaining?: number,
|
|
1698
|
+
): Promise<APIResponse<Rsp>>;
|
|
1699
|
+
requestAPIList<Item = unknown, PageClass extends AbstractPage<Item> = AbstractPage<Item>>(
|
|
1700
|
+
Page: new (...args: ConstructorParameters<typeof AbstractPage>) => PageClass,
|
|
1701
|
+
options: FinalRequestOptions,
|
|
1702
|
+
): PagePromise<PageClass>;
|
|
1703
|
+
buildURL<Req>(path: string, query: Req | undefined): string;
|
|
1704
|
+
fetchWithTimeout(
|
|
1705
|
+
url: RequestInfo,
|
|
1706
|
+
{ signal, ...options }: RequestInit | undefined,
|
|
1707
|
+
ms: number,
|
|
1708
|
+
): Promise<Response>;
|
|
1709
|
+
protected getRequestClient(): RequestClient;
|
|
1710
|
+
private shouldRetry;
|
|
1711
|
+
private retryRequest;
|
|
1712
|
+
private calculateRetryTimeoutSeconds;
|
|
1713
|
+
private getUserAgent;
|
|
988
1714
|
private debug;
|
|
989
1715
|
}
|
|
990
1716
|
class APIResource$0 {
|
|
@@ -1160,41 +1886,41 @@ declare namespace AccountDetails {
|
|
|
1160
1886
|
nextPageParams(): Partial<PageParams> | null;
|
|
1161
1887
|
nextPageInfo(): PageInfo | null;
|
|
1162
1888
|
}
|
|
1163
|
-
class
|
|
1889
|
+
class RoutingDetails extends APIResource {
|
|
1164
1890
|
/**
|
|
1165
|
-
* Create
|
|
1891
|
+
* Create a routing detail for a single external account.
|
|
1166
1892
|
*/
|
|
1167
1893
|
create(
|
|
1168
1894
|
accountsType: 'external_accounts',
|
|
1169
1895
|
accountId: string,
|
|
1170
|
-
body:
|
|
1896
|
+
body: RoutingDetailCreateParams,
|
|
1171
1897
|
options?: Core.RequestOptions,
|
|
1172
|
-
): Promise<Core.APIResponse<
|
|
1898
|
+
): Promise<Core.APIResponse<RoutingDetail>>;
|
|
1173
1899
|
/**
|
|
1174
|
-
* Get a single
|
|
1900
|
+
* Get a single routing detail for a single internal or external account.
|
|
1175
1901
|
*/
|
|
1176
1902
|
retrieve(
|
|
1177
1903
|
accountsType: 'external_accounts' | 'internal_accounts',
|
|
1178
1904
|
accountId: string,
|
|
1179
1905
|
id: string,
|
|
1180
1906
|
options?: Core.RequestOptions,
|
|
1181
|
-
): Promise<Core.APIResponse<
|
|
1907
|
+
): Promise<Core.APIResponse<RoutingDetail>>;
|
|
1182
1908
|
/**
|
|
1183
|
-
* Get a list of
|
|
1909
|
+
* Get a list of routing details for a single internal or external account.
|
|
1184
1910
|
*/
|
|
1185
1911
|
list(
|
|
1186
1912
|
accountsType: 'external_accounts' | 'internal_accounts',
|
|
1187
1913
|
accountId: string,
|
|
1188
|
-
query?:
|
|
1914
|
+
query?: RoutingDetailListParams,
|
|
1189
1915
|
options?: Core.RequestOptions,
|
|
1190
|
-
): Core.PagePromise<
|
|
1916
|
+
): Core.PagePromise<RoutingDetailsPage>;
|
|
1191
1917
|
list(
|
|
1192
1918
|
accountsType: 'external_accounts' | 'internal_accounts',
|
|
1193
1919
|
accountId: string,
|
|
1194
1920
|
options?: Core.RequestOptions,
|
|
1195
|
-
): Core.PagePromise<
|
|
1921
|
+
): Core.PagePromise<RoutingDetailsPage>;
|
|
1196
1922
|
/**
|
|
1197
|
-
* Delete a
|
|
1923
|
+
* Delete a routing detail for a single external account.
|
|
1198
1924
|
*/
|
|
1199
1925
|
del(
|
|
1200
1926
|
accountsType: 'external_accounts',
|
|
@@ -1203,21 +1929,141 @@ declare namespace AccountDetails {
|
|
|
1203
1929
|
options?: Core.RequestOptions,
|
|
1204
1930
|
): Promise<void>;
|
|
1205
1931
|
}
|
|
1206
|
-
class
|
|
1207
|
-
interface
|
|
1932
|
+
class RoutingDetailsPage extends Page<RoutingDetail> {}
|
|
1933
|
+
interface RoutingDetail {
|
|
1934
|
+
bank_address: RoutingDetail.BankAddress | null;
|
|
1935
|
+
/**
|
|
1936
|
+
* The name of the bank.
|
|
1937
|
+
*/
|
|
1938
|
+
bank_name: string;
|
|
1939
|
+
created_at: string;
|
|
1940
|
+
discarded_at: string | null;
|
|
1941
|
+
id: string;
|
|
1942
|
+
/**
|
|
1943
|
+
* This field will be true if this object exists in the live environment or false
|
|
1944
|
+
* if it exists in the test environment.
|
|
1945
|
+
*/
|
|
1946
|
+
live_mode: boolean;
|
|
1947
|
+
object: string;
|
|
1948
|
+
/**
|
|
1949
|
+
* If the routing detail is to be used for a specific payment type this field will
|
|
1950
|
+
* be populated, otherwise null.
|
|
1951
|
+
*/
|
|
1952
|
+
payment_type:
|
|
1953
|
+
| 'ach'
|
|
1954
|
+
| 'au_becs'
|
|
1955
|
+
| 'bacs'
|
|
1956
|
+
| 'book'
|
|
1957
|
+
| 'card'
|
|
1958
|
+
| 'check'
|
|
1959
|
+
| 'cross_border'
|
|
1960
|
+
| 'eft'
|
|
1961
|
+
| 'interac'
|
|
1962
|
+
| 'masav'
|
|
1963
|
+
| 'neft'
|
|
1964
|
+
| 'provxchange'
|
|
1965
|
+
| 'rtp'
|
|
1966
|
+
| 'sen'
|
|
1967
|
+
| 'sepa'
|
|
1968
|
+
| 'signet'
|
|
1969
|
+
| 'wire'
|
|
1970
|
+
| null;
|
|
1971
|
+
/**
|
|
1972
|
+
* The routing number of the bank.
|
|
1973
|
+
*/
|
|
1974
|
+
routing_number: string;
|
|
1975
|
+
/**
|
|
1976
|
+
* One of `aba`, `swift`, `ca_cpa`, `au_bsb`, `gb_sort_code`, `in_ifsc`, `cnaps`.
|
|
1977
|
+
*/
|
|
1978
|
+
routing_number_type:
|
|
1979
|
+
| 'aba'
|
|
1980
|
+
| 'au_bsb'
|
|
1981
|
+
| 'br_codigo'
|
|
1982
|
+
| 'ca_cpa'
|
|
1983
|
+
| 'cnaps'
|
|
1984
|
+
| 'gb_sort_code'
|
|
1985
|
+
| 'in_ifsc'
|
|
1986
|
+
| 'my_branch_code'
|
|
1987
|
+
| 'swift';
|
|
1988
|
+
updated_at: string;
|
|
1989
|
+
}
|
|
1990
|
+
interface RoutingDetailCreateParams {
|
|
1991
|
+
/**
|
|
1992
|
+
* The routing number of the bank.
|
|
1993
|
+
*/
|
|
1994
|
+
routing_number: string;
|
|
1995
|
+
/**
|
|
1996
|
+
* One of `aba`, `swift`, `ca_cpa`, `au_bsb`, `gb_sort_code`, `in_ifsc`, `cnaps`.
|
|
1997
|
+
*/
|
|
1998
|
+
routing_number_type:
|
|
1999
|
+
| 'aba'
|
|
2000
|
+
| 'au_bsb'
|
|
2001
|
+
| 'br_codigo'
|
|
2002
|
+
| 'ca_cpa'
|
|
2003
|
+
| 'cnaps'
|
|
2004
|
+
| 'gb_sort_code'
|
|
2005
|
+
| 'in_ifsc'
|
|
2006
|
+
| 'my_branch_code'
|
|
2007
|
+
| 'swift';
|
|
2008
|
+
/**
|
|
2009
|
+
* If the routing detail is to be used for a specific payment type this field will
|
|
2010
|
+
* be populated, otherwise null.
|
|
2011
|
+
*/
|
|
2012
|
+
payment_type?:
|
|
2013
|
+
| 'ach'
|
|
2014
|
+
| 'au_becs'
|
|
2015
|
+
| 'bacs'
|
|
2016
|
+
| 'book'
|
|
2017
|
+
| 'card'
|
|
2018
|
+
| 'check'
|
|
2019
|
+
| 'cross_border'
|
|
2020
|
+
| 'eft'
|
|
2021
|
+
| 'interac'
|
|
2022
|
+
| 'masav'
|
|
2023
|
+
| 'neft'
|
|
2024
|
+
| 'provxchange'
|
|
2025
|
+
| 'rtp'
|
|
2026
|
+
| 'sen'
|
|
2027
|
+
| 'sepa'
|
|
2028
|
+
| 'signet'
|
|
2029
|
+
| 'wire'
|
|
2030
|
+
| null;
|
|
2031
|
+
}
|
|
2032
|
+
interface RoutingDetailListParams extends PageParams {}
|
|
2033
|
+
}
|
|
2034
|
+
declare namespace ExternalAccount {
|
|
2035
|
+
interface PartyAddress {
|
|
2036
|
+
/**
|
|
2037
|
+
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
2038
|
+
*/
|
|
2039
|
+
country: string | null;
|
|
2040
|
+
created_at: string;
|
|
2041
|
+
id: string;
|
|
2042
|
+
line1: string | null;
|
|
2043
|
+
line2: string | null;
|
|
2044
|
+
/**
|
|
2045
|
+
* This field will be true if this object exists in the live environment or false
|
|
2046
|
+
* if it exists in the test environment.
|
|
2047
|
+
*/
|
|
2048
|
+
live_mode: boolean;
|
|
1208
2049
|
/**
|
|
1209
|
-
*
|
|
2050
|
+
* Locality or City.
|
|
1210
2051
|
*/
|
|
1211
|
-
|
|
2052
|
+
locality: string | null;
|
|
2053
|
+
object: string;
|
|
1212
2054
|
/**
|
|
1213
|
-
* The
|
|
2055
|
+
* The postal code of the address.
|
|
1214
2056
|
*/
|
|
1215
|
-
|
|
2057
|
+
postal_code: string | null;
|
|
1216
2058
|
/**
|
|
1217
|
-
*
|
|
1218
|
-
* account number is in a generic format.
|
|
2059
|
+
* Region or State.
|
|
1219
2060
|
*/
|
|
1220
|
-
|
|
2061
|
+
region: string | null;
|
|
2062
|
+
updated_at: string;
|
|
2063
|
+
}
|
|
2064
|
+
interface ContactDetails {
|
|
2065
|
+
contact_identifier: string;
|
|
2066
|
+
contact_identifier_type: 'email' | 'phone_number';
|
|
1221
2067
|
created_at: string;
|
|
1222
2068
|
discarded_at: string | null;
|
|
1223
2069
|
id: string;
|
|
@@ -1229,20 +2075,91 @@ declare namespace AccountDetails {
|
|
|
1229
2075
|
object: string;
|
|
1230
2076
|
updated_at: string;
|
|
1231
2077
|
}
|
|
1232
|
-
|
|
2078
|
+
}
|
|
2079
|
+
declare namespace ExternalAccountCreateParams {
|
|
2080
|
+
interface PartyAddress {
|
|
1233
2081
|
/**
|
|
1234
|
-
*
|
|
2082
|
+
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
2083
|
+
*/
|
|
2084
|
+
country?: string | null;
|
|
2085
|
+
line1?: string | null;
|
|
2086
|
+
line2?: string | null;
|
|
2087
|
+
/**
|
|
2088
|
+
* Locality or City.
|
|
2089
|
+
*/
|
|
2090
|
+
locality?: string | null;
|
|
2091
|
+
/**
|
|
2092
|
+
* The postal code of the address.
|
|
2093
|
+
*/
|
|
2094
|
+
postal_code?: string | null;
|
|
2095
|
+
/**
|
|
2096
|
+
* Region or State.
|
|
1235
2097
|
*/
|
|
2098
|
+
region?: string | null;
|
|
2099
|
+
}
|
|
2100
|
+
interface AccountDetails {
|
|
1236
2101
|
account_number: string;
|
|
2102
|
+
account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
|
|
2103
|
+
}
|
|
2104
|
+
interface RoutingDetails {
|
|
2105
|
+
routing_number: string;
|
|
2106
|
+
routing_number_type:
|
|
2107
|
+
| 'aba'
|
|
2108
|
+
| 'swift'
|
|
2109
|
+
| 'au_bsb'
|
|
2110
|
+
| 'ca_cpa'
|
|
2111
|
+
| 'cnaps'
|
|
2112
|
+
| 'gb_sort_code'
|
|
2113
|
+
| 'in_ifsc'
|
|
2114
|
+
| 'my_branch_code'
|
|
2115
|
+
| 'br_codigo';
|
|
2116
|
+
payment_type?:
|
|
2117
|
+
| 'ach'
|
|
2118
|
+
| 'au_becs'
|
|
2119
|
+
| 'bacs'
|
|
2120
|
+
| 'book'
|
|
2121
|
+
| 'card'
|
|
2122
|
+
| 'check'
|
|
2123
|
+
| 'eft'
|
|
2124
|
+
| 'cross_border'
|
|
2125
|
+
| 'interac'
|
|
2126
|
+
| 'masav'
|
|
2127
|
+
| 'neft'
|
|
2128
|
+
| 'provxchange'
|
|
2129
|
+
| 'rtp'
|
|
2130
|
+
| 'sen'
|
|
2131
|
+
| 'sepa'
|
|
2132
|
+
| 'signet'
|
|
2133
|
+
| 'wire';
|
|
2134
|
+
}
|
|
2135
|
+
interface ContactDetails {
|
|
2136
|
+
contact_identifier?: string;
|
|
2137
|
+
contact_identifier_type?: 'email' | 'phone_number';
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
declare namespace ExternalAccountUpdateParams {
|
|
2141
|
+
interface PartyAddress {
|
|
1237
2142
|
/**
|
|
1238
|
-
*
|
|
1239
|
-
* account number is in a generic format.
|
|
2143
|
+
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
1240
2144
|
*/
|
|
1241
|
-
|
|
2145
|
+
country?: string | null;
|
|
2146
|
+
line1?: string | null;
|
|
2147
|
+
line2?: string | null;
|
|
2148
|
+
/**
|
|
2149
|
+
* Locality or City.
|
|
2150
|
+
*/
|
|
2151
|
+
locality?: string | null;
|
|
2152
|
+
/**
|
|
2153
|
+
* The postal code of the address.
|
|
2154
|
+
*/
|
|
2155
|
+
postal_code?: string | null;
|
|
2156
|
+
/**
|
|
2157
|
+
* Region or State.
|
|
2158
|
+
*/
|
|
2159
|
+
region?: string | null;
|
|
1242
2160
|
}
|
|
1243
|
-
interface AccountDetailListParams extends PageParams {}
|
|
1244
2161
|
}
|
|
1245
|
-
declare namespace
|
|
2162
|
+
declare namespace ExternalAccounts {
|
|
1246
2163
|
type Config = {
|
|
1247
2164
|
/**
|
|
1248
2165
|
* Defaults to to process.env["MODERN_TREASURY_API_KEY"]. Set it to null if you want to send unauthenticated requests.
|
|
@@ -1566,248 +2483,102 @@ declare namespace RoutingDetails {
|
|
|
1566
2483
|
nextPageParams(): Partial<PageParams> | null;
|
|
1567
2484
|
nextPageInfo(): PageInfo | null;
|
|
1568
2485
|
}
|
|
1569
|
-
class
|
|
1570
|
-
/**
|
|
1571
|
-
* Create a routing detail for a single external account.
|
|
1572
|
-
*/
|
|
2486
|
+
class ExternalAccounts extends APIResource {
|
|
1573
2487
|
create(
|
|
1574
|
-
|
|
1575
|
-
accountId: string,
|
|
1576
|
-
body: RoutingDetailCreateParams,
|
|
2488
|
+
body: ExternalAccountCreateParams,
|
|
1577
2489
|
options?: Core.RequestOptions,
|
|
1578
|
-
): Promise<Core.APIResponse<
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
*/
|
|
1582
|
-
retrieve(
|
|
1583
|
-
accountsType: 'external_accounts' | 'internal_accounts',
|
|
1584
|
-
accountId: string,
|
|
2490
|
+
): Promise<Core.APIResponse<ExternalAccount>>;
|
|
2491
|
+
retrieve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<ExternalAccount>>;
|
|
2492
|
+
update(
|
|
1585
2493
|
id: string,
|
|
2494
|
+
body?: ExternalAccountUpdateParams,
|
|
1586
2495
|
options?: Core.RequestOptions,
|
|
1587
|
-
): Promise<Core.APIResponse<
|
|
1588
|
-
|
|
1589
|
-
* Get a list of routing details for a single internal or external account.
|
|
1590
|
-
*/
|
|
2496
|
+
): Promise<Core.APIResponse<ExternalAccount>>;
|
|
2497
|
+
update(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<ExternalAccount>>;
|
|
1591
2498
|
list(
|
|
1592
|
-
|
|
1593
|
-
accountId: string,
|
|
1594
|
-
query?: RoutingDetailListParams,
|
|
2499
|
+
query?: ExternalAccountListParams,
|
|
1595
2500
|
options?: Core.RequestOptions,
|
|
1596
|
-
): Core.PagePromise<
|
|
1597
|
-
list(
|
|
1598
|
-
|
|
1599
|
-
|
|
2501
|
+
): Core.PagePromise<ExternalAccountsPage>;
|
|
2502
|
+
list(options?: Core.RequestOptions): Core.PagePromise<ExternalAccountsPage>;
|
|
2503
|
+
del(id: string, options?: Core.RequestOptions): Promise<void>;
|
|
2504
|
+
completeVerification(
|
|
2505
|
+
id: string,
|
|
2506
|
+
body?: ExternalAccountCompleteVerificationParams,
|
|
1600
2507
|
options?: Core.RequestOptions,
|
|
1601
|
-
): Core.
|
|
1602
|
-
|
|
1603
|
-
* Delete a routing detail for a single external account.
|
|
1604
|
-
*/
|
|
1605
|
-
del(
|
|
1606
|
-
accountsType: 'external_accounts',
|
|
1607
|
-
accountId: string,
|
|
2508
|
+
): Promise<Core.APIResponse<ExternalAccount>>;
|
|
2509
|
+
completeVerification(
|
|
1608
2510
|
id: string,
|
|
1609
2511
|
options?: Core.RequestOptions,
|
|
1610
|
-
): Promise<
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
* The name of the bank.
|
|
1617
|
-
*/
|
|
1618
|
-
bank_name: string;
|
|
1619
|
-
created_at: string;
|
|
1620
|
-
discarded_at: string | null;
|
|
1621
|
-
id: string;
|
|
1622
|
-
/**
|
|
1623
|
-
* This field will be true if this object exists in the live environment or false
|
|
1624
|
-
* if it exists in the test environment.
|
|
1625
|
-
*/
|
|
1626
|
-
live_mode: boolean;
|
|
1627
|
-
object: string;
|
|
1628
|
-
/**
|
|
1629
|
-
* If the routing detail is to be used for a specific payment type this field will
|
|
1630
|
-
* be populated, otherwise null.
|
|
1631
|
-
*/
|
|
1632
|
-
payment_type:
|
|
1633
|
-
| 'ach'
|
|
1634
|
-
| 'au_becs'
|
|
1635
|
-
| 'bacs'
|
|
1636
|
-
| 'book'
|
|
1637
|
-
| 'card'
|
|
1638
|
-
| 'check'
|
|
1639
|
-
| 'cross_border'
|
|
1640
|
-
| 'eft'
|
|
1641
|
-
| 'interac'
|
|
1642
|
-
| 'masav'
|
|
1643
|
-
| 'neft'
|
|
1644
|
-
| 'provxchange'
|
|
1645
|
-
| 'rtp'
|
|
1646
|
-
| 'sen'
|
|
1647
|
-
| 'sepa'
|
|
1648
|
-
| 'signet'
|
|
1649
|
-
| 'wire'
|
|
1650
|
-
| null;
|
|
1651
|
-
/**
|
|
1652
|
-
* The routing number of the bank.
|
|
1653
|
-
*/
|
|
1654
|
-
routing_number: string;
|
|
1655
|
-
/**
|
|
1656
|
-
* One of `aba`, `swift`, `ca_cpa`, `au_bsb`, `gb_sort_code`, `in_ifsc`, `cnaps`.
|
|
1657
|
-
*/
|
|
1658
|
-
routing_number_type:
|
|
1659
|
-
| 'aba'
|
|
1660
|
-
| 'au_bsb'
|
|
1661
|
-
| 'br_codigo'
|
|
1662
|
-
| 'ca_cpa'
|
|
1663
|
-
| 'cnaps'
|
|
1664
|
-
| 'gb_sort_code'
|
|
1665
|
-
| 'in_ifsc'
|
|
1666
|
-
| 'my_branch_code'
|
|
1667
|
-
| 'swift';
|
|
1668
|
-
updated_at: string;
|
|
1669
|
-
}
|
|
1670
|
-
interface RoutingDetailCreateParams {
|
|
1671
|
-
/**
|
|
1672
|
-
* The routing number of the bank.
|
|
1673
|
-
*/
|
|
1674
|
-
routing_number: string;
|
|
1675
|
-
/**
|
|
1676
|
-
* One of `aba`, `swift`, `ca_cpa`, `au_bsb`, `gb_sort_code`, `in_ifsc`, `cnaps`.
|
|
1677
|
-
*/
|
|
1678
|
-
routing_number_type:
|
|
1679
|
-
| 'aba'
|
|
1680
|
-
| 'au_bsb'
|
|
1681
|
-
| 'br_codigo'
|
|
1682
|
-
| 'ca_cpa'
|
|
1683
|
-
| 'cnaps'
|
|
1684
|
-
| 'gb_sort_code'
|
|
1685
|
-
| 'in_ifsc'
|
|
1686
|
-
| 'my_branch_code'
|
|
1687
|
-
| 'swift';
|
|
1688
|
-
/**
|
|
1689
|
-
* If the routing detail is to be used for a specific payment type this field will
|
|
1690
|
-
* be populated, otherwise null.
|
|
1691
|
-
*/
|
|
1692
|
-
payment_type?:
|
|
1693
|
-
| 'ach'
|
|
1694
|
-
| 'au_becs'
|
|
1695
|
-
| 'bacs'
|
|
1696
|
-
| 'book'
|
|
1697
|
-
| 'card'
|
|
1698
|
-
| 'check'
|
|
1699
|
-
| 'cross_border'
|
|
1700
|
-
| 'eft'
|
|
1701
|
-
| 'interac'
|
|
1702
|
-
| 'masav'
|
|
1703
|
-
| 'neft'
|
|
1704
|
-
| 'provxchange'
|
|
1705
|
-
| 'rtp'
|
|
1706
|
-
| 'sen'
|
|
1707
|
-
| 'sepa'
|
|
1708
|
-
| 'signet'
|
|
1709
|
-
| 'wire'
|
|
1710
|
-
| null;
|
|
2512
|
+
): Promise<Core.APIResponse<ExternalAccount>>;
|
|
2513
|
+
verify(
|
|
2514
|
+
id: string,
|
|
2515
|
+
body: ExternalAccountVerifyParams,
|
|
2516
|
+
options?: Core.RequestOptions,
|
|
2517
|
+
): Promise<Core.APIResponse<ExternalAccount>>;
|
|
1711
2518
|
}
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
interface Accounts {
|
|
1716
|
-
account_details?: Array<AccountDetails.AccountDetail>;
|
|
2519
|
+
class ExternalAccountsPage extends Page<ExternalAccount> {}
|
|
2520
|
+
interface ExternalAccount {
|
|
2521
|
+
account_details: Array<AccountDetails.AccountDetail>;
|
|
1717
2522
|
/**
|
|
1718
2523
|
* Can be `checking`, `savings` or `other`.
|
|
1719
2524
|
*/
|
|
1720
|
-
account_type
|
|
1721
|
-
contact_details
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
2525
|
+
account_type: ExternalAccountType;
|
|
2526
|
+
contact_details: Array<ExternalAccount.ContactDetails>;
|
|
2527
|
+
counterparty_id: string | null;
|
|
2528
|
+
created_at: string;
|
|
2529
|
+
discarded_at: string | null;
|
|
2530
|
+
id: string;
|
|
1725
2531
|
/**
|
|
1726
2532
|
* This field will be true if this object exists in the live environment or false
|
|
1727
2533
|
* if it exists in the test environment.
|
|
1728
2534
|
*/
|
|
1729
|
-
live_mode
|
|
2535
|
+
live_mode: boolean;
|
|
1730
2536
|
/**
|
|
1731
2537
|
* Additional data represented as key-value pairs. Both the key and value must be
|
|
1732
2538
|
* strings.
|
|
1733
2539
|
*/
|
|
1734
|
-
metadata
|
|
2540
|
+
metadata: Record<string, string>;
|
|
1735
2541
|
/**
|
|
1736
2542
|
* A nickname for the external account. This is only for internal usage and won't
|
|
1737
2543
|
* affect any payments
|
|
1738
2544
|
*/
|
|
1739
|
-
name
|
|
1740
|
-
object
|
|
2545
|
+
name: string | null;
|
|
2546
|
+
object: string;
|
|
1741
2547
|
/**
|
|
1742
2548
|
* The address associated with the owner or `null`.
|
|
1743
2549
|
*/
|
|
1744
|
-
party_address
|
|
2550
|
+
party_address: ExternalAccount.PartyAddress | null;
|
|
1745
2551
|
/**
|
|
1746
2552
|
* The legal name of the entity which owns the account.
|
|
1747
2553
|
*/
|
|
1748
|
-
party_name
|
|
2554
|
+
party_name: string;
|
|
1749
2555
|
/**
|
|
1750
2556
|
* Either `individual` or `business`.
|
|
1751
2557
|
*/
|
|
1752
|
-
party_type
|
|
1753
|
-
routing_details
|
|
1754
|
-
updated_at
|
|
1755
|
-
verification_status
|
|
1756
|
-
}
|
|
1757
|
-
namespace Accounts {
|
|
1758
|
-
interface PartyAddress {
|
|
1759
|
-
/**
|
|
1760
|
-
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
1761
|
-
*/
|
|
1762
|
-
country: string | null;
|
|
1763
|
-
created_at: string;
|
|
1764
|
-
id: string;
|
|
1765
|
-
line1: string | null;
|
|
1766
|
-
line2: string | null;
|
|
1767
|
-
/**
|
|
1768
|
-
* This field will be true if this object exists in the live environment or false
|
|
1769
|
-
* if it exists in the test environment.
|
|
1770
|
-
*/
|
|
1771
|
-
live_mode: boolean;
|
|
1772
|
-
/**
|
|
1773
|
-
* Locality or City.
|
|
1774
|
-
*/
|
|
1775
|
-
locality: string | null;
|
|
1776
|
-
object: string;
|
|
1777
|
-
/**
|
|
1778
|
-
* The postal code of the address.
|
|
1779
|
-
*/
|
|
1780
|
-
postal_code: string | null;
|
|
1781
|
-
/**
|
|
1782
|
-
* Region or State.
|
|
1783
|
-
*/
|
|
1784
|
-
region: string | null;
|
|
1785
|
-
updated_at: string;
|
|
1786
|
-
}
|
|
1787
|
-
interface ContactDetails {
|
|
1788
|
-
contact_identifier: string;
|
|
1789
|
-
contact_identifier_type: 'email' | 'phone_number';
|
|
1790
|
-
created_at: string;
|
|
1791
|
-
discarded_at: string | null;
|
|
1792
|
-
id: string;
|
|
1793
|
-
/**
|
|
1794
|
-
* This field will be true if this object exists in the live environment or false
|
|
1795
|
-
* if it exists in the test environment.
|
|
1796
|
-
*/
|
|
1797
|
-
live_mode: boolean;
|
|
1798
|
-
object: string;
|
|
1799
|
-
updated_at: string;
|
|
1800
|
-
}
|
|
2558
|
+
party_type: 'business' | 'individual' | null;
|
|
2559
|
+
routing_details: Array<RoutingDetails.RoutingDetail>;
|
|
2560
|
+
updated_at: string;
|
|
2561
|
+
verification_status: 'pending_verification' | 'unverified' | 'verified';
|
|
1801
2562
|
}
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
2563
|
+
/**
|
|
2564
|
+
* Can be `checking`, `savings` or `other`.
|
|
2565
|
+
*/
|
|
2566
|
+
type ExternalAccountType =
|
|
2567
|
+
| 'cash'
|
|
2568
|
+
| 'checking'
|
|
2569
|
+
| 'loan'
|
|
2570
|
+
| 'non_resident'
|
|
2571
|
+
| 'other'
|
|
2572
|
+
| 'overdraft'
|
|
2573
|
+
| 'savings';
|
|
2574
|
+
interface ExternalAccountCreateParams {
|
|
2575
|
+
counterparty_id: string | null;
|
|
2576
|
+
account_details?: Array<ExternalAccountCreateParams.AccountDetails>;
|
|
1806
2577
|
/**
|
|
1807
2578
|
* Can be `checking`, `savings` or `other`.
|
|
1808
2579
|
*/
|
|
1809
|
-
account_type?:
|
|
1810
|
-
contact_details?: Array<
|
|
2580
|
+
account_type?: ExternalAccountType;
|
|
2581
|
+
contact_details?: Array<ExternalAccountCreateParams.ContactDetails>;
|
|
1811
2582
|
/**
|
|
1812
2583
|
* Additional data represented as key-value pairs. Both the key and value must be
|
|
1813
2584
|
* strings.
|
|
@@ -1821,7 +2592,7 @@ declare namespace CounterpartyCreateParams {
|
|
|
1821
2592
|
/**
|
|
1822
2593
|
* Required if receiving wire payments.
|
|
1823
2594
|
*/
|
|
1824
|
-
party_address?:
|
|
2595
|
+
party_address?: ExternalAccountCreateParams.PartyAddress;
|
|
1825
2596
|
party_identifier?: string;
|
|
1826
2597
|
/**
|
|
1827
2598
|
* If this value isn't provided, it will be inherited from the counterparty's name.
|
|
@@ -1836,439 +2607,316 @@ declare namespace CounterpartyCreateParams {
|
|
|
1836
2607
|
* you can pass the processor token in this field.
|
|
1837
2608
|
*/
|
|
1838
2609
|
plaid_processor_token?: string;
|
|
1839
|
-
routing_details?: Array<
|
|
2610
|
+
routing_details?: Array<ExternalAccountCreateParams.RoutingDetails>;
|
|
1840
2611
|
}
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
interface RoutingDetails {
|
|
1867
|
-
routing_number: string;
|
|
1868
|
-
routing_number_type:
|
|
1869
|
-
| 'aba'
|
|
1870
|
-
| 'swift'
|
|
1871
|
-
| 'au_bsb'
|
|
1872
|
-
| 'ca_cpa'
|
|
1873
|
-
| 'cnaps'
|
|
1874
|
-
| 'gb_sort_code'
|
|
1875
|
-
| 'in_ifsc'
|
|
1876
|
-
| 'my_branch_code'
|
|
1877
|
-
| 'br_codigo';
|
|
1878
|
-
payment_type?:
|
|
1879
|
-
| 'ach'
|
|
1880
|
-
| 'au_becs'
|
|
1881
|
-
| 'bacs'
|
|
1882
|
-
| 'book'
|
|
1883
|
-
| 'card'
|
|
1884
|
-
| 'check'
|
|
1885
|
-
| 'eft'
|
|
1886
|
-
| 'cross_border'
|
|
1887
|
-
| 'interac'
|
|
1888
|
-
| 'masav'
|
|
1889
|
-
| 'neft'
|
|
1890
|
-
| 'provxchange'
|
|
1891
|
-
| 'rtp'
|
|
1892
|
-
| 'sen'
|
|
1893
|
-
| 'sepa'
|
|
1894
|
-
| 'signet'
|
|
1895
|
-
| 'wire';
|
|
1896
|
-
}
|
|
1897
|
-
interface ContactDetails {
|
|
1898
|
-
contact_identifier?: string;
|
|
1899
|
-
contact_identifier_type?: 'email' | 'phone_number';
|
|
1900
|
-
}
|
|
2612
|
+
interface ExternalAccountUpdateParams {
|
|
2613
|
+
/**
|
|
2614
|
+
* Can be `checking`, `savings` or `other`.
|
|
2615
|
+
*/
|
|
2616
|
+
account_type?: ExternalAccountType;
|
|
2617
|
+
counterparty_id?: string | null;
|
|
2618
|
+
/**
|
|
2619
|
+
* Additional data in the form of key-value pairs. Pairs can be removed by passing
|
|
2620
|
+
* an empty string or `null` as the value.
|
|
2621
|
+
*/
|
|
2622
|
+
metadata?: Record<string, string>;
|
|
2623
|
+
/**
|
|
2624
|
+
* A nickname for the external account. This is only for internal usage and won't
|
|
2625
|
+
* affect any payments
|
|
2626
|
+
*/
|
|
2627
|
+
name?: string | null;
|
|
2628
|
+
party_address?: ExternalAccountUpdateParams.PartyAddress;
|
|
2629
|
+
/**
|
|
2630
|
+
* If this value isn't provided, it will be inherited from the counterparty's name.
|
|
2631
|
+
*/
|
|
2632
|
+
party_name?: string;
|
|
2633
|
+
/**
|
|
2634
|
+
* Either `individual` or `business`.
|
|
2635
|
+
*/
|
|
2636
|
+
party_type?: 'business' | 'individual' | null;
|
|
1901
2637
|
}
|
|
1902
|
-
interface
|
|
2638
|
+
interface ExternalAccountListParams extends PageParams {
|
|
2639
|
+
counterparty_id?: string;
|
|
2640
|
+
/**
|
|
2641
|
+
* For example, if you want to query for records with metadata key `Type` and value
|
|
2642
|
+
* `Loan`, the query would be `metadata%5BType%5D=Loan`. This encodes the query
|
|
2643
|
+
* parameters.
|
|
2644
|
+
*/
|
|
2645
|
+
metadata?: Record<string, string>;
|
|
2646
|
+
/**
|
|
2647
|
+
* Searches the ExternalAccount's party_name AND the Counterparty's party_name
|
|
2648
|
+
*/
|
|
2649
|
+
party_name?: string;
|
|
2650
|
+
}
|
|
2651
|
+
interface ExternalAccountCompleteVerificationParams {
|
|
2652
|
+
amounts?: Array<number>;
|
|
2653
|
+
}
|
|
2654
|
+
interface ExternalAccountVerifyParams {
|
|
2655
|
+
/**
|
|
2656
|
+
* The ID of the internal account where the micro-deposits originate from. Both
|
|
2657
|
+
* credit and debit capabilities must be enabled.
|
|
2658
|
+
*/
|
|
2659
|
+
originating_account_id: string;
|
|
2660
|
+
/**
|
|
2661
|
+
* Both ach and eft are supported payment types.
|
|
2662
|
+
*/
|
|
2663
|
+
payment_type:
|
|
2664
|
+
| 'ach'
|
|
2665
|
+
| 'au_becs'
|
|
2666
|
+
| 'bacs'
|
|
2667
|
+
| 'book'
|
|
2668
|
+
| 'card'
|
|
2669
|
+
| 'check'
|
|
2670
|
+
| 'cross_border'
|
|
2671
|
+
| 'eft'
|
|
2672
|
+
| 'interac'
|
|
2673
|
+
| 'masav'
|
|
2674
|
+
| 'neft'
|
|
2675
|
+
| 'provxchange'
|
|
2676
|
+
| 'rtp'
|
|
2677
|
+
| 'sen'
|
|
2678
|
+
| 'sepa'
|
|
2679
|
+
| 'signet'
|
|
2680
|
+
| 'wire';
|
|
2681
|
+
/**
|
|
2682
|
+
* Defaults to the currency of the originating account.
|
|
2683
|
+
*/
|
|
2684
|
+
currency?: Shared.Currency;
|
|
2685
|
+
}
|
|
2686
|
+
}
|
|
2687
|
+
declare namespace Counterparty {
|
|
2688
|
+
interface Accounts {
|
|
2689
|
+
account_details?: Array<AccountDetails.AccountDetail>;
|
|
2690
|
+
/**
|
|
2691
|
+
* Can be `checking`, `savings` or `other`.
|
|
2692
|
+
*/
|
|
2693
|
+
account_type?: ExternalAccounts.ExternalAccountType;
|
|
2694
|
+
contact_details?: Array<Accounts.ContactDetails>;
|
|
2695
|
+
created_at?: string;
|
|
2696
|
+
discarded_at?: string | null;
|
|
2697
|
+
id?: string;
|
|
2698
|
+
/**
|
|
2699
|
+
* This field will be true if this object exists in the live environment or false
|
|
2700
|
+
* if it exists in the test environment.
|
|
2701
|
+
*/
|
|
2702
|
+
live_mode?: boolean;
|
|
2703
|
+
/**
|
|
2704
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
2705
|
+
* strings.
|
|
2706
|
+
*/
|
|
2707
|
+
metadata?: Record<string, string>;
|
|
1903
2708
|
/**
|
|
1904
|
-
*
|
|
1905
|
-
*
|
|
2709
|
+
* A nickname for the external account. This is only for internal usage and won't
|
|
2710
|
+
* affect any payments
|
|
1906
2711
|
*/
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
}
|
|
1910
|
-
declare namespace Document {
|
|
1911
|
-
interface File {
|
|
2712
|
+
name?: string | null;
|
|
2713
|
+
object?: string;
|
|
1912
2714
|
/**
|
|
1913
|
-
* The
|
|
2715
|
+
* The address associated with the owner or `null`.
|
|
1914
2716
|
*/
|
|
1915
|
-
|
|
2717
|
+
party_address?: Accounts.PartyAddress | null;
|
|
1916
2718
|
/**
|
|
1917
|
-
* The
|
|
2719
|
+
* The legal name of the entity which owns the account.
|
|
1918
2720
|
*/
|
|
1919
|
-
|
|
2721
|
+
party_name?: string;
|
|
1920
2722
|
/**
|
|
1921
|
-
*
|
|
2723
|
+
* Either `individual` or `business`.
|
|
1922
2724
|
*/
|
|
1923
|
-
|
|
2725
|
+
party_type?: 'business' | 'individual' | null;
|
|
2726
|
+
routing_details?: Array<RoutingDetails.RoutingDetail>;
|
|
2727
|
+
updated_at?: string;
|
|
2728
|
+
verification_status?: 'pending_verification' | 'unverified' | 'verified';
|
|
2729
|
+
}
|
|
2730
|
+
namespace Accounts {
|
|
2731
|
+
interface PartyAddress {
|
|
2732
|
+
/**
|
|
2733
|
+
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
2734
|
+
*/
|
|
2735
|
+
country: string | null;
|
|
2736
|
+
created_at: string;
|
|
2737
|
+
id: string;
|
|
2738
|
+
line1: string | null;
|
|
2739
|
+
line2: string | null;
|
|
2740
|
+
/**
|
|
2741
|
+
* This field will be true if this object exists in the live environment or false
|
|
2742
|
+
* if it exists in the test environment.
|
|
2743
|
+
*/
|
|
2744
|
+
live_mode: boolean;
|
|
2745
|
+
/**
|
|
2746
|
+
* Locality or City.
|
|
2747
|
+
*/
|
|
2748
|
+
locality: string | null;
|
|
2749
|
+
object: string;
|
|
2750
|
+
/**
|
|
2751
|
+
* The postal code of the address.
|
|
2752
|
+
*/
|
|
2753
|
+
postal_code: string | null;
|
|
2754
|
+
/**
|
|
2755
|
+
* Region or State.
|
|
2756
|
+
*/
|
|
2757
|
+
region: string | null;
|
|
2758
|
+
updated_at: string;
|
|
2759
|
+
}
|
|
2760
|
+
interface ContactDetails {
|
|
2761
|
+
contact_identifier: string;
|
|
2762
|
+
contact_identifier_type: 'email' | 'phone_number';
|
|
2763
|
+
created_at: string;
|
|
2764
|
+
discarded_at: string | null;
|
|
2765
|
+
id: string;
|
|
2766
|
+
/**
|
|
2767
|
+
* This field will be true if this object exists in the live environment or false
|
|
2768
|
+
* if it exists in the test environment.
|
|
2769
|
+
*/
|
|
2770
|
+
live_mode: boolean;
|
|
2771
|
+
object: string;
|
|
2772
|
+
updated_at: string;
|
|
2773
|
+
}
|
|
1924
2774
|
}
|
|
1925
2775
|
}
|
|
1926
|
-
declare namespace
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
* Three-letter ISO currency code.
|
|
1930
|
-
*/
|
|
1931
|
-
type Currency =
|
|
1932
|
-
| 'AED'
|
|
1933
|
-
| 'AFN'
|
|
1934
|
-
| 'ALL'
|
|
1935
|
-
| 'AMD'
|
|
1936
|
-
| 'ANG'
|
|
1937
|
-
| 'AOA'
|
|
1938
|
-
| 'ARS'
|
|
1939
|
-
| 'AUD'
|
|
1940
|
-
| 'AWG'
|
|
1941
|
-
| 'AZN'
|
|
1942
|
-
| 'BAM'
|
|
1943
|
-
| 'BBD'
|
|
1944
|
-
| 'BCH'
|
|
1945
|
-
| 'BDT'
|
|
1946
|
-
| 'BGN'
|
|
1947
|
-
| 'BHD'
|
|
1948
|
-
| 'BIF'
|
|
1949
|
-
| 'BMD'
|
|
1950
|
-
| 'BND'
|
|
1951
|
-
| 'BOB'
|
|
1952
|
-
| 'BRL'
|
|
1953
|
-
| 'BSD'
|
|
1954
|
-
| 'BTC'
|
|
1955
|
-
| 'BTN'
|
|
1956
|
-
| 'BWP'
|
|
1957
|
-
| 'BYN'
|
|
1958
|
-
| 'BYR'
|
|
1959
|
-
| 'BZD'
|
|
1960
|
-
| 'CAD'
|
|
1961
|
-
| 'CDF'
|
|
1962
|
-
| 'CHF'
|
|
1963
|
-
| 'CLF'
|
|
1964
|
-
| 'CLP'
|
|
1965
|
-
| 'CNH'
|
|
1966
|
-
| 'CNY'
|
|
1967
|
-
| 'COP'
|
|
1968
|
-
| 'CRC'
|
|
1969
|
-
| 'CUC'
|
|
1970
|
-
| 'CUP'
|
|
1971
|
-
| 'CVE'
|
|
1972
|
-
| 'CZK'
|
|
1973
|
-
| 'DJF'
|
|
1974
|
-
| 'DKK'
|
|
1975
|
-
| 'DOP'
|
|
1976
|
-
| 'DZD'
|
|
1977
|
-
| 'EEK'
|
|
1978
|
-
| 'EGP'
|
|
1979
|
-
| 'ERN'
|
|
1980
|
-
| 'ETB'
|
|
1981
|
-
| 'EUR'
|
|
1982
|
-
| 'FJD'
|
|
1983
|
-
| 'FKP'
|
|
1984
|
-
| 'GBP'
|
|
1985
|
-
| 'GBX'
|
|
1986
|
-
| 'GEL'
|
|
1987
|
-
| 'GGP'
|
|
1988
|
-
| 'GHS'
|
|
1989
|
-
| 'GIP'
|
|
1990
|
-
| 'GMD'
|
|
1991
|
-
| 'GNF'
|
|
1992
|
-
| 'GTQ'
|
|
1993
|
-
| 'GYD'
|
|
1994
|
-
| 'HKD'
|
|
1995
|
-
| 'HNL'
|
|
1996
|
-
| 'HRK'
|
|
1997
|
-
| 'HTG'
|
|
1998
|
-
| 'HUF'
|
|
1999
|
-
| 'IDR'
|
|
2000
|
-
| 'ILS'
|
|
2001
|
-
| 'IMP'
|
|
2002
|
-
| 'INR'
|
|
2003
|
-
| 'IQD'
|
|
2004
|
-
| 'IRR'
|
|
2005
|
-
| 'ISK'
|
|
2006
|
-
| 'JEP'
|
|
2007
|
-
| 'JMD'
|
|
2008
|
-
| 'JOD'
|
|
2009
|
-
| 'JPY'
|
|
2010
|
-
| 'KES'
|
|
2011
|
-
| 'KGS'
|
|
2012
|
-
| 'KHR'
|
|
2013
|
-
| 'KMF'
|
|
2014
|
-
| 'KPW'
|
|
2015
|
-
| 'KRW'
|
|
2016
|
-
| 'KWD'
|
|
2017
|
-
| 'KYD'
|
|
2018
|
-
| 'KZT'
|
|
2019
|
-
| 'LAK'
|
|
2020
|
-
| 'LBP'
|
|
2021
|
-
| 'LKR'
|
|
2022
|
-
| 'LRD'
|
|
2023
|
-
| 'LSL'
|
|
2024
|
-
| 'LTL'
|
|
2025
|
-
| 'LVL'
|
|
2026
|
-
| 'LYD'
|
|
2027
|
-
| 'MAD'
|
|
2028
|
-
| 'MDL'
|
|
2029
|
-
| 'MGA'
|
|
2030
|
-
| 'MKD'
|
|
2031
|
-
| 'MMK'
|
|
2032
|
-
| 'MNT'
|
|
2033
|
-
| 'MOP'
|
|
2034
|
-
| 'MRO'
|
|
2035
|
-
| 'MRU'
|
|
2036
|
-
| 'MTL'
|
|
2037
|
-
| 'MUR'
|
|
2038
|
-
| 'MVR'
|
|
2039
|
-
| 'MWK'
|
|
2040
|
-
| 'MXN'
|
|
2041
|
-
| 'MYR'
|
|
2042
|
-
| 'MZN'
|
|
2043
|
-
| 'NAD'
|
|
2044
|
-
| 'NGN'
|
|
2045
|
-
| 'NIO'
|
|
2046
|
-
| 'NOK'
|
|
2047
|
-
| 'NPR'
|
|
2048
|
-
| 'NZD'
|
|
2049
|
-
| 'OMR'
|
|
2050
|
-
| 'PAB'
|
|
2051
|
-
| 'PEN'
|
|
2052
|
-
| 'PGK'
|
|
2053
|
-
| 'PHP'
|
|
2054
|
-
| 'PKR'
|
|
2055
|
-
| 'PLN'
|
|
2056
|
-
| 'PYG'
|
|
2057
|
-
| 'QAR'
|
|
2058
|
-
| 'RON'
|
|
2059
|
-
| 'RSD'
|
|
2060
|
-
| 'RUB'
|
|
2061
|
-
| 'RWF'
|
|
2062
|
-
| 'SAR'
|
|
2063
|
-
| 'SBD'
|
|
2064
|
-
| 'SCR'
|
|
2065
|
-
| 'SDG'
|
|
2066
|
-
| 'SEK'
|
|
2067
|
-
| 'SGD'
|
|
2068
|
-
| 'SHP'
|
|
2069
|
-
| 'SKK'
|
|
2070
|
-
| 'SLL'
|
|
2071
|
-
| 'SOS'
|
|
2072
|
-
| 'SRD'
|
|
2073
|
-
| 'SSP'
|
|
2074
|
-
| 'STD'
|
|
2075
|
-
| 'SVC'
|
|
2076
|
-
| 'SYP'
|
|
2077
|
-
| 'SZL'
|
|
2078
|
-
| 'THB'
|
|
2079
|
-
| 'TJS'
|
|
2080
|
-
| 'TMM'
|
|
2081
|
-
| 'TMT'
|
|
2082
|
-
| 'TND'
|
|
2083
|
-
| 'TOP'
|
|
2084
|
-
| 'TRY'
|
|
2085
|
-
| 'TTD'
|
|
2086
|
-
| 'TWD'
|
|
2087
|
-
| 'TZS'
|
|
2088
|
-
| 'UAH'
|
|
2089
|
-
| 'UGX'
|
|
2090
|
-
| 'USD'
|
|
2091
|
-
| 'UYU'
|
|
2092
|
-
| 'UZS'
|
|
2093
|
-
| 'VEF'
|
|
2094
|
-
| 'VES'
|
|
2095
|
-
| 'VND'
|
|
2096
|
-
| 'VUV'
|
|
2097
|
-
| 'WST'
|
|
2098
|
-
| 'XAF'
|
|
2099
|
-
| 'XAG'
|
|
2100
|
-
| 'XAU'
|
|
2101
|
-
| 'XBA'
|
|
2102
|
-
| 'XBB'
|
|
2103
|
-
| 'XBC'
|
|
2104
|
-
| 'XBD'
|
|
2105
|
-
| 'XCD'
|
|
2106
|
-
| 'XDR'
|
|
2107
|
-
| 'XFU'
|
|
2108
|
-
| 'XOF'
|
|
2109
|
-
| 'XPD'
|
|
2110
|
-
| 'XPF'
|
|
2111
|
-
| 'XPT'
|
|
2112
|
-
| 'XTS'
|
|
2113
|
-
| 'YER'
|
|
2114
|
-
| 'ZAR'
|
|
2115
|
-
| 'ZMK'
|
|
2116
|
-
| 'ZMW'
|
|
2117
|
-
| 'ZWD'
|
|
2118
|
-
| 'ZWL'
|
|
2119
|
-
| 'ZWN'
|
|
2120
|
-
| 'ZWR'
|
|
2121
|
-
| null;
|
|
2122
|
-
}
|
|
2123
|
-
declare namespace ExpectedPaymentCreateParams {
|
|
2124
|
-
interface LineItems {
|
|
2125
|
-
/**
|
|
2126
|
-
* Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
2127
|
-
* as 1000.
|
|
2128
|
-
*/
|
|
2129
|
-
amount: number;
|
|
2130
|
-
/**
|
|
2131
|
-
* The ID of one of your accounting categories. Note that these will only be
|
|
2132
|
-
* accessible if your accounting system has been connected.
|
|
2133
|
-
*/
|
|
2134
|
-
accounting_category_id?: string | null;
|
|
2776
|
+
declare namespace CounterpartyCreateParams {
|
|
2777
|
+
interface Accounts {
|
|
2778
|
+
account_details?: Array<Accounts.AccountDetails>;
|
|
2135
2779
|
/**
|
|
2136
|
-
*
|
|
2780
|
+
* Can be `checking`, `savings` or `other`.
|
|
2137
2781
|
*/
|
|
2138
|
-
|
|
2782
|
+
account_type?: ExternalAccounts.ExternalAccountType;
|
|
2783
|
+
contact_details?: Array<Accounts.ContactDetails>;
|
|
2139
2784
|
/**
|
|
2140
2785
|
* Additional data represented as key-value pairs. Both the key and value must be
|
|
2141
2786
|
* strings.
|
|
2142
2787
|
*/
|
|
2143
2788
|
metadata?: Record<string, string>;
|
|
2144
|
-
}
|
|
2145
|
-
}
|
|
2146
|
-
declare namespace ExternalAccount {
|
|
2147
|
-
interface PartyAddress {
|
|
2148
2789
|
/**
|
|
2149
|
-
*
|
|
2790
|
+
* A nickname for the external account. This is only for internal usage and won't
|
|
2791
|
+
* affect any payments
|
|
2150
2792
|
*/
|
|
2151
|
-
|
|
2152
|
-
created_at: string;
|
|
2153
|
-
id: string;
|
|
2154
|
-
line1: string | null;
|
|
2155
|
-
line2: string | null;
|
|
2793
|
+
name?: string | null;
|
|
2156
2794
|
/**
|
|
2157
|
-
*
|
|
2158
|
-
* if it exists in the test environment.
|
|
2795
|
+
* Required if receiving wire payments.
|
|
2159
2796
|
*/
|
|
2160
|
-
|
|
2797
|
+
party_address?: Accounts.PartyAddress;
|
|
2798
|
+
party_identifier?: string;
|
|
2161
2799
|
/**
|
|
2162
|
-
*
|
|
2800
|
+
* If this value isn't provided, it will be inherited from the counterparty's name.
|
|
2163
2801
|
*/
|
|
2164
|
-
|
|
2165
|
-
object: string;
|
|
2802
|
+
party_name?: string;
|
|
2166
2803
|
/**
|
|
2167
|
-
*
|
|
2804
|
+
* Either `individual` or `business`.
|
|
2168
2805
|
*/
|
|
2169
|
-
|
|
2806
|
+
party_type?: 'business' | 'individual' | null;
|
|
2170
2807
|
/**
|
|
2171
|
-
*
|
|
2808
|
+
* If you've enabled the Modern Treasury + Plaid integration in your Plaid account,
|
|
2809
|
+
* you can pass the processor token in this field.
|
|
2172
2810
|
*/
|
|
2173
|
-
|
|
2174
|
-
|
|
2811
|
+
plaid_processor_token?: string;
|
|
2812
|
+
routing_details?: Array<Accounts.RoutingDetails>;
|
|
2175
2813
|
}
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2814
|
+
namespace Accounts {
|
|
2815
|
+
interface PartyAddress {
|
|
2816
|
+
/**
|
|
2817
|
+
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
2818
|
+
*/
|
|
2819
|
+
country?: string | null;
|
|
2820
|
+
line1?: string | null;
|
|
2821
|
+
line2?: string | null;
|
|
2822
|
+
/**
|
|
2823
|
+
* Locality or City.
|
|
2824
|
+
*/
|
|
2825
|
+
locality?: string | null;
|
|
2826
|
+
/**
|
|
2827
|
+
* The postal code of the address.
|
|
2828
|
+
*/
|
|
2829
|
+
postal_code?: string | null;
|
|
2830
|
+
/**
|
|
2831
|
+
* Region or State.
|
|
2832
|
+
*/
|
|
2833
|
+
region?: string | null;
|
|
2834
|
+
}
|
|
2835
|
+
interface AccountDetails {
|
|
2836
|
+
account_number: string;
|
|
2837
|
+
account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
|
|
2838
|
+
}
|
|
2839
|
+
interface RoutingDetails {
|
|
2840
|
+
routing_number: string;
|
|
2841
|
+
routing_number_type:
|
|
2842
|
+
| 'aba'
|
|
2843
|
+
| 'swift'
|
|
2844
|
+
| 'au_bsb'
|
|
2845
|
+
| 'ca_cpa'
|
|
2846
|
+
| 'cnaps'
|
|
2847
|
+
| 'gb_sort_code'
|
|
2848
|
+
| 'in_ifsc'
|
|
2849
|
+
| 'my_branch_code'
|
|
2850
|
+
| 'br_codigo';
|
|
2851
|
+
payment_type?:
|
|
2852
|
+
| 'ach'
|
|
2853
|
+
| 'au_becs'
|
|
2854
|
+
| 'bacs'
|
|
2855
|
+
| 'book'
|
|
2856
|
+
| 'card'
|
|
2857
|
+
| 'check'
|
|
2858
|
+
| 'eft'
|
|
2859
|
+
| 'cross_border'
|
|
2860
|
+
| 'interac'
|
|
2861
|
+
| 'masav'
|
|
2862
|
+
| 'neft'
|
|
2863
|
+
| 'provxchange'
|
|
2864
|
+
| 'rtp'
|
|
2865
|
+
| 'sen'
|
|
2866
|
+
| 'sepa'
|
|
2867
|
+
| 'signet'
|
|
2868
|
+
| 'wire';
|
|
2869
|
+
}
|
|
2870
|
+
interface ContactDetails {
|
|
2871
|
+
contact_identifier?: string;
|
|
2872
|
+
contact_identifier_type?: 'email' | 'phone_number';
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
interface Accounting {
|
|
2182
2876
|
/**
|
|
2183
|
-
*
|
|
2184
|
-
*
|
|
2877
|
+
* An optional type to auto-sync the counterparty to your ledger. Either `customer`
|
|
2878
|
+
* or `vendor`.
|
|
2185
2879
|
*/
|
|
2186
|
-
|
|
2187
|
-
object: string;
|
|
2188
|
-
updated_at: string;
|
|
2880
|
+
type?: 'customer' | 'vendor';
|
|
2189
2881
|
}
|
|
2190
2882
|
}
|
|
2191
|
-
declare namespace
|
|
2192
|
-
interface
|
|
2193
|
-
/**
|
|
2194
|
-
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
2195
|
-
*/
|
|
2196
|
-
country?: string | null;
|
|
2197
|
-
line1?: string | null;
|
|
2198
|
-
line2?: string | null;
|
|
2883
|
+
declare namespace Document {
|
|
2884
|
+
interface File {
|
|
2199
2885
|
/**
|
|
2200
|
-
*
|
|
2886
|
+
* The MIME content type of the document.
|
|
2201
2887
|
*/
|
|
2202
|
-
|
|
2888
|
+
content_type?: string;
|
|
2203
2889
|
/**
|
|
2204
|
-
* The
|
|
2890
|
+
* The original filename of the document.
|
|
2205
2891
|
*/
|
|
2206
|
-
|
|
2892
|
+
filename?: string;
|
|
2207
2893
|
/**
|
|
2208
|
-
*
|
|
2894
|
+
* The size of the document in bytes.
|
|
2209
2895
|
*/
|
|
2210
|
-
|
|
2211
|
-
}
|
|
2212
|
-
interface AccountDetails {
|
|
2213
|
-
account_number: string;
|
|
2214
|
-
account_number_type?: 'iban' | 'clabe' | 'wallet_address' | 'pan' | 'other';
|
|
2215
|
-
}
|
|
2216
|
-
interface RoutingDetails {
|
|
2217
|
-
routing_number: string;
|
|
2218
|
-
routing_number_type:
|
|
2219
|
-
| 'aba'
|
|
2220
|
-
| 'swift'
|
|
2221
|
-
| 'au_bsb'
|
|
2222
|
-
| 'ca_cpa'
|
|
2223
|
-
| 'cnaps'
|
|
2224
|
-
| 'gb_sort_code'
|
|
2225
|
-
| 'in_ifsc'
|
|
2226
|
-
| 'my_branch_code'
|
|
2227
|
-
| 'br_codigo';
|
|
2228
|
-
payment_type?:
|
|
2229
|
-
| 'ach'
|
|
2230
|
-
| 'au_becs'
|
|
2231
|
-
| 'bacs'
|
|
2232
|
-
| 'book'
|
|
2233
|
-
| 'card'
|
|
2234
|
-
| 'check'
|
|
2235
|
-
| 'eft'
|
|
2236
|
-
| 'cross_border'
|
|
2237
|
-
| 'interac'
|
|
2238
|
-
| 'masav'
|
|
2239
|
-
| 'neft'
|
|
2240
|
-
| 'provxchange'
|
|
2241
|
-
| 'rtp'
|
|
2242
|
-
| 'sen'
|
|
2243
|
-
| 'sepa'
|
|
2244
|
-
| 'signet'
|
|
2245
|
-
| 'wire';
|
|
2246
|
-
}
|
|
2247
|
-
interface ContactDetails {
|
|
2248
|
-
contact_identifier?: string;
|
|
2249
|
-
contact_identifier_type?: 'email' | 'phone_number';
|
|
2896
|
+
size?: number;
|
|
2250
2897
|
}
|
|
2251
2898
|
}
|
|
2252
|
-
declare namespace
|
|
2253
|
-
interface
|
|
2899
|
+
declare namespace ExpectedPaymentCreateParams {
|
|
2900
|
+
interface LineItems {
|
|
2254
2901
|
/**
|
|
2255
|
-
*
|
|
2902
|
+
* Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
2903
|
+
* as 1000.
|
|
2256
2904
|
*/
|
|
2257
|
-
|
|
2258
|
-
line1?: string | null;
|
|
2259
|
-
line2?: string | null;
|
|
2905
|
+
amount: number;
|
|
2260
2906
|
/**
|
|
2261
|
-
*
|
|
2907
|
+
* The ID of one of your accounting categories. Note that these will only be
|
|
2908
|
+
* accessible if your accounting system has been connected.
|
|
2262
2909
|
*/
|
|
2263
|
-
|
|
2910
|
+
accounting_category_id?: string | null;
|
|
2264
2911
|
/**
|
|
2265
|
-
*
|
|
2912
|
+
* A free-form description of the line item.
|
|
2266
2913
|
*/
|
|
2267
|
-
|
|
2914
|
+
description?: string | null;
|
|
2268
2915
|
/**
|
|
2269
|
-
*
|
|
2916
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
2917
|
+
* strings.
|
|
2270
2918
|
*/
|
|
2271
|
-
|
|
2919
|
+
metadata?: Record<string, string>;
|
|
2272
2920
|
}
|
|
2273
2921
|
}
|
|
2274
2922
|
declare namespace ModernTreasury {
|
|
@@ -2292,11 +2940,13 @@ declare namespace ModernTreasury {
|
|
|
2292
2940
|
export import EventsPage = API.EventsPage;
|
|
2293
2941
|
export import EventListParams = API.EventListParams;
|
|
2294
2942
|
export import ExpectedPayment = API.ExpectedPayment;
|
|
2943
|
+
export import ExpectedPaymentType = API.ExpectedPaymentType;
|
|
2295
2944
|
export import ExpectedPaymentsPage = API.ExpectedPaymentsPage;
|
|
2296
2945
|
export import ExpectedPaymentCreateParams = API.ExpectedPaymentCreateParams;
|
|
2297
2946
|
export import ExpectedPaymentUpdateParams = API.ExpectedPaymentUpdateParams;
|
|
2298
2947
|
export import ExpectedPaymentListParams = API.ExpectedPaymentListParams;
|
|
2299
2948
|
export import ExternalAccount = API.ExternalAccount;
|
|
2949
|
+
export import ExternalAccountType = API.ExternalAccountType;
|
|
2300
2950
|
export import ExternalAccountsPage = API.ExternalAccountsPage;
|
|
2301
2951
|
export import ExternalAccountCreateParams = API.ExternalAccountCreateParams;
|
|
2302
2952
|
export import ExternalAccountUpdateParams = API.ExternalAccountUpdateParams;
|
|
@@ -2354,6 +3004,8 @@ declare namespace ModernTreasury {
|
|
|
2354
3004
|
export import LineItemUpdateParams = API.LineItemUpdateParams;
|
|
2355
3005
|
export import LineItemListParams = API.LineItemListParams;
|
|
2356
3006
|
export import PaymentOrder = API.PaymentOrder;
|
|
3007
|
+
export import PaymentOrderSubtype = API.PaymentOrderSubtype;
|
|
3008
|
+
export import PaymentOrderType = API.PaymentOrderType;
|
|
2357
3009
|
export import PaymentOrdersPage = API.PaymentOrdersPage;
|
|
2358
3010
|
export import PaymentOrderCreateParams = API.PaymentOrderCreateParams;
|
|
2359
3011
|
export import PaymentOrderUpdateParams = API.PaymentOrderUpdateParams;
|
|
@@ -2920,11 +3572,13 @@ declare namespace ModernTreasury {
|
|
|
2920
3572
|
export import EventsPage = API.EventsPage;
|
|
2921
3573
|
export import EventListParams = API.EventListParams;
|
|
2922
3574
|
export import ExpectedPayment = API.ExpectedPayment;
|
|
3575
|
+
export import ExpectedPaymentType = API.ExpectedPaymentType;
|
|
2923
3576
|
export import ExpectedPaymentsPage = API.ExpectedPaymentsPage;
|
|
2924
3577
|
export import ExpectedPaymentCreateParams = API.ExpectedPaymentCreateParams;
|
|
2925
3578
|
export import ExpectedPaymentUpdateParams = API.ExpectedPaymentUpdateParams;
|
|
2926
3579
|
export import ExpectedPaymentListParams = API.ExpectedPaymentListParams;
|
|
2927
3580
|
export import ExternalAccount = API.ExternalAccount;
|
|
3581
|
+
export import ExternalAccountType = API.ExternalAccountType;
|
|
2928
3582
|
export import ExternalAccountsPage = API.ExternalAccountsPage;
|
|
2929
3583
|
export import ExternalAccountCreateParams = API.ExternalAccountCreateParams;
|
|
2930
3584
|
export import ExternalAccountUpdateParams = API.ExternalAccountUpdateParams;
|
|
@@ -2982,6 +3636,8 @@ declare namespace ModernTreasury {
|
|
|
2982
3636
|
export import LineItemUpdateParams = API.LineItemUpdateParams;
|
|
2983
3637
|
export import LineItemListParams = API.LineItemListParams;
|
|
2984
3638
|
export import PaymentOrder = API.PaymentOrder;
|
|
3639
|
+
export import PaymentOrderSubtype = API.PaymentOrderSubtype;
|
|
3640
|
+
export import PaymentOrderType = API.PaymentOrderType;
|
|
2985
3641
|
export import PaymentOrdersPage = API.PaymentOrdersPage;
|
|
2986
3642
|
export import PaymentOrderCreateParams = API.PaymentOrderCreateParams;
|
|
2987
3643
|
export import PaymentOrderUpdateParams = API.PaymentOrderUpdateParams;
|
|
@@ -3637,11 +4293,13 @@ declare namespace ModernTreasury {
|
|
|
3637
4293
|
export import EventsPage = API.EventsPage;
|
|
3638
4294
|
export import EventListParams = API.EventListParams;
|
|
3639
4295
|
export import ExpectedPayment = API.ExpectedPayment;
|
|
4296
|
+
export import ExpectedPaymentType = API.ExpectedPaymentType;
|
|
3640
4297
|
export import ExpectedPaymentsPage = API.ExpectedPaymentsPage;
|
|
3641
4298
|
export import ExpectedPaymentCreateParams = API.ExpectedPaymentCreateParams;
|
|
3642
4299
|
export import ExpectedPaymentUpdateParams = API.ExpectedPaymentUpdateParams;
|
|
3643
4300
|
export import ExpectedPaymentListParams = API.ExpectedPaymentListParams;
|
|
3644
4301
|
export import ExternalAccount = API.ExternalAccount;
|
|
4302
|
+
export import ExternalAccountType = API.ExternalAccountType;
|
|
3645
4303
|
export import ExternalAccountsPage = API.ExternalAccountsPage;
|
|
3646
4304
|
export import ExternalAccountCreateParams = API.ExternalAccountCreateParams;
|
|
3647
4305
|
export import ExternalAccountUpdateParams = API.ExternalAccountUpdateParams;
|
|
@@ -3699,6 +4357,8 @@ declare namespace ModernTreasury {
|
|
|
3699
4357
|
export import LineItemUpdateParams = API.LineItemUpdateParams;
|
|
3700
4358
|
export import LineItemListParams = API.LineItemListParams;
|
|
3701
4359
|
export import PaymentOrder = API.PaymentOrder;
|
|
4360
|
+
export import PaymentOrderSubtype = API.PaymentOrderSubtype;
|
|
4361
|
+
export import PaymentOrderType = API.PaymentOrderType;
|
|
3702
4362
|
export import PaymentOrdersPage = API.PaymentOrdersPage;
|
|
3703
4363
|
export import PaymentOrderCreateParams = API.PaymentOrderCreateParams;
|
|
3704
4364
|
export import PaymentOrderUpdateParams = API.PaymentOrderUpdateParams;
|
|
@@ -4469,11 +5129,13 @@ declare namespace ModernTreasury {
|
|
|
4469
5129
|
export import EventsPage = API.EventsPage;
|
|
4470
5130
|
export import EventListParams = API.EventListParams;
|
|
4471
5131
|
export import ExpectedPayment = API.ExpectedPayment;
|
|
5132
|
+
export import ExpectedPaymentType = API.ExpectedPaymentType;
|
|
4472
5133
|
export import ExpectedPaymentsPage = API.ExpectedPaymentsPage;
|
|
4473
5134
|
export import ExpectedPaymentCreateParams = API.ExpectedPaymentCreateParams;
|
|
4474
5135
|
export import ExpectedPaymentUpdateParams = API.ExpectedPaymentUpdateParams;
|
|
4475
5136
|
export import ExpectedPaymentListParams = API.ExpectedPaymentListParams;
|
|
4476
5137
|
export import ExternalAccount = API.ExternalAccount;
|
|
5138
|
+
export import ExternalAccountType = API.ExternalAccountType;
|
|
4477
5139
|
export import ExternalAccountsPage = API.ExternalAccountsPage;
|
|
4478
5140
|
export import ExternalAccountCreateParams = API.ExternalAccountCreateParams;
|
|
4479
5141
|
export import ExternalAccountUpdateParams = API.ExternalAccountUpdateParams;
|
|
@@ -4531,6 +5193,8 @@ declare namespace ModernTreasury {
|
|
|
4531
5193
|
export import LineItemUpdateParams = API.LineItemUpdateParams;
|
|
4532
5194
|
export import LineItemListParams = API.LineItemListParams;
|
|
4533
5195
|
export import PaymentOrder = API.PaymentOrder;
|
|
5196
|
+
export import PaymentOrderSubtype = API.PaymentOrderSubtype;
|
|
5197
|
+
export import PaymentOrderType = API.PaymentOrderType;
|
|
4534
5198
|
export import PaymentOrdersPage = API.PaymentOrdersPage;
|
|
4535
5199
|
export import PaymentOrderCreateParams = API.PaymentOrderCreateParams;
|
|
4536
5200
|
export import PaymentOrderUpdateParams = API.PaymentOrderUpdateParams;
|
|
@@ -5298,7 +5962,7 @@ declare namespace PaymentOrderCreateParams {
|
|
|
5298
5962
|
/**
|
|
5299
5963
|
* Can be `checking`, `savings` or `other`.
|
|
5300
5964
|
*/
|
|
5301
|
-
account_type?:
|
|
5965
|
+
account_type?: ExternalAccounts.ExternalAccountType;
|
|
5302
5966
|
contact_details?: Array<ReceivingAccount.ContactDetails>;
|
|
5303
5967
|
/**
|
|
5304
5968
|
* Additional data represented as key-value pairs. Both the key and value must be
|
|
@@ -5539,7 +6203,7 @@ declare namespace PaymentOrderUpdateParams {
|
|
|
5539
6203
|
/**
|
|
5540
6204
|
* Can be `checking`, `savings` or `other`.
|
|
5541
6205
|
*/
|
|
5542
|
-
account_type?:
|
|
6206
|
+
account_type?: ExternalAccounts.ExternalAccountType;
|
|
5543
6207
|
contact_details?: Array<ReceivingAccount.ContactDetails>;
|
|
5544
6208
|
/**
|
|
5545
6209
|
* Additional data represented as key-value pairs. Both the key and value must be
|
|
@@ -5673,7 +6337,7 @@ declare namespace PaymentOrderCreateAsyncParams {
|
|
|
5673
6337
|
/**
|
|
5674
6338
|
* Can be `checking`, `savings` or `other`.
|
|
5675
6339
|
*/
|
|
5676
|
-
account_type?:
|
|
6340
|
+
account_type?: ExternalAccounts.ExternalAccountType;
|
|
5677
6341
|
contact_details?: Array<ReceivingAccount.ContactDetails>;
|
|
5678
6342
|
/**
|
|
5679
6343
|
* Additional data represented as key-value pairs. Both the key and value must be
|
|
@@ -5868,24 +6532,55 @@ declare namespace PaymentOrderCreateAsyncParams {
|
|
|
5868
6532
|
}
|
|
5869
6533
|
interface LineItems {
|
|
5870
6534
|
/**
|
|
5871
|
-
* Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
5872
|
-
* as 1000.
|
|
6535
|
+
* Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
6536
|
+
* as 1000.
|
|
6537
|
+
*/
|
|
6538
|
+
amount: number;
|
|
6539
|
+
/**
|
|
6540
|
+
* The ID of one of your accounting categories. Note that these will only be
|
|
6541
|
+
* accessible if your accounting system has been connected.
|
|
6542
|
+
*/
|
|
6543
|
+
accounting_category_id?: string | null;
|
|
6544
|
+
/**
|
|
6545
|
+
* A free-form description of the line item.
|
|
6546
|
+
*/
|
|
6547
|
+
description?: string | null;
|
|
6548
|
+
/**
|
|
6549
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
6550
|
+
* strings.
|
|
6551
|
+
*/
|
|
6552
|
+
metadata?: Record<string, string>;
|
|
6553
|
+
}
|
|
6554
|
+
}
|
|
6555
|
+
declare namespace RoutingDetail {
|
|
6556
|
+
interface BankAddress {
|
|
6557
|
+
/**
|
|
6558
|
+
* Country code conforms to [ISO 3166-1 alpha-2]
|
|
6559
|
+
*/
|
|
6560
|
+
country: string | null;
|
|
6561
|
+
created_at: string;
|
|
6562
|
+
id: string;
|
|
6563
|
+
line1: string | null;
|
|
6564
|
+
line2: string | null;
|
|
6565
|
+
/**
|
|
6566
|
+
* This field will be true if this object exists in the live environment or false
|
|
6567
|
+
* if it exists in the test environment.
|
|
5873
6568
|
*/
|
|
5874
|
-
|
|
6569
|
+
live_mode: boolean;
|
|
5875
6570
|
/**
|
|
5876
|
-
*
|
|
5877
|
-
* accessible if your accounting system has been connected.
|
|
6571
|
+
* Locality or City.
|
|
5878
6572
|
*/
|
|
5879
|
-
|
|
6573
|
+
locality: string | null;
|
|
6574
|
+
object: string;
|
|
5880
6575
|
/**
|
|
5881
|
-
*
|
|
6576
|
+
* The postal code of the address.
|
|
5882
6577
|
*/
|
|
5883
|
-
|
|
6578
|
+
postal_code: string | null;
|
|
5884
6579
|
/**
|
|
5885
|
-
*
|
|
5886
|
-
* strings.
|
|
6580
|
+
* Region or State.
|
|
5887
6581
|
*/
|
|
5888
|
-
|
|
6582
|
+
region: string | null;
|
|
6583
|
+
updated_at: string;
|
|
5889
6584
|
}
|
|
5890
6585
|
}
|
|
5891
6586
|
declare namespace RoutingNumberLookupRequest {
|
|
@@ -6861,27 +7556,32 @@ declare namespace API {
|
|
|
6861
7556
|
* One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen,
|
|
6862
7557
|
* sepa, signet, wire.
|
|
6863
7558
|
*/
|
|
6864
|
-
type:
|
|
6865
|
-
| 'ach'
|
|
6866
|
-
| 'au_becs'
|
|
6867
|
-
| 'bacs'
|
|
6868
|
-
| 'book'
|
|
6869
|
-
| 'card'
|
|
6870
|
-
| 'check'
|
|
6871
|
-
| 'cross_border'
|
|
6872
|
-
| 'eft'
|
|
6873
|
-
| 'interac'
|
|
6874
|
-
| 'masav'
|
|
6875
|
-
| 'neft'
|
|
6876
|
-
| 'provxchange'
|
|
6877
|
-
| 'rtp'
|
|
6878
|
-
| 'sen'
|
|
6879
|
-
| 'sepa'
|
|
6880
|
-
| 'signet'
|
|
6881
|
-
| 'wire'
|
|
6882
|
-
| null;
|
|
7559
|
+
type: ExpectedPaymentType;
|
|
6883
7560
|
updated_at: string;
|
|
6884
7561
|
}
|
|
7562
|
+
/**
|
|
7563
|
+
* One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen,
|
|
7564
|
+
* sepa, signet, wire.
|
|
7565
|
+
*/
|
|
7566
|
+
type ExpectedPaymentType =
|
|
7567
|
+
| 'ach'
|
|
7568
|
+
| 'au_becs'
|
|
7569
|
+
| 'bacs'
|
|
7570
|
+
| 'book'
|
|
7571
|
+
| 'card'
|
|
7572
|
+
| 'check'
|
|
7573
|
+
| 'cross_border'
|
|
7574
|
+
| 'eft'
|
|
7575
|
+
| 'interac'
|
|
7576
|
+
| 'masav'
|
|
7577
|
+
| 'neft'
|
|
7578
|
+
| 'provxchange'
|
|
7579
|
+
| 'rtp'
|
|
7580
|
+
| 'sen'
|
|
7581
|
+
| 'sepa'
|
|
7582
|
+
| 'signet'
|
|
7583
|
+
| 'wire'
|
|
7584
|
+
| null;
|
|
6885
7585
|
interface ExpectedPaymentCreateParams {
|
|
6886
7586
|
/**
|
|
6887
7587
|
* The lowest amount this expected payment may be equal to. Value in specified
|
|
@@ -6945,25 +7645,7 @@ declare namespace API {
|
|
|
6945
7645
|
* One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen,
|
|
6946
7646
|
* sepa, signet, wire.
|
|
6947
7647
|
*/
|
|
6948
|
-
type?:
|
|
6949
|
-
| 'ach'
|
|
6950
|
-
| 'au_becs'
|
|
6951
|
-
| 'bacs'
|
|
6952
|
-
| 'book'
|
|
6953
|
-
| 'card'
|
|
6954
|
-
| 'check'
|
|
6955
|
-
| 'cross_border'
|
|
6956
|
-
| 'eft'
|
|
6957
|
-
| 'interac'
|
|
6958
|
-
| 'masav'
|
|
6959
|
-
| 'neft'
|
|
6960
|
-
| 'provxchange'
|
|
6961
|
-
| 'rtp'
|
|
6962
|
-
| 'sen'
|
|
6963
|
-
| 'sepa'
|
|
6964
|
-
| 'signet'
|
|
6965
|
-
| 'wire'
|
|
6966
|
-
| null;
|
|
7648
|
+
type?: ExpectedPaymentType;
|
|
6967
7649
|
}
|
|
6968
7650
|
interface ExpectedPaymentUpdateParams {
|
|
6969
7651
|
/**
|
|
@@ -7002,248 +7684,54 @@ declare namespace API {
|
|
|
7002
7684
|
*/
|
|
7003
7685
|
direction?: 'credit' | 'debit';
|
|
7004
7686
|
/**
|
|
7005
|
-
* The ID of the Internal Account for the expected payment.
|
|
7006
|
-
*/
|
|
7007
|
-
internal_account_id?: string;
|
|
7008
|
-
/**
|
|
7009
|
-
* Additional data represented as key-value pairs. Both the key and value must be
|
|
7010
|
-
* strings.
|
|
7011
|
-
*/
|
|
7012
|
-
metadata?: Record<string, string>;
|
|
7013
|
-
/**
|
|
7014
|
-
* For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
7015
|
-
* payments the field will be passed through as the "Originator to Beneficiary
|
|
7016
|
-
* Information", also known as OBI or Fedwire tag 6000.
|
|
7017
|
-
*/
|
|
7018
|
-
remittance_information?: string | null;
|
|
7019
|
-
/**
|
|
7020
|
-
* The statement description you expect to see on the transaction. For ACH
|
|
7021
|
-
* payments, this will be the full line item passed from the bank. For wire
|
|
7022
|
-
* payments, this will be the OBI field on the wire. For check payments, this will
|
|
7023
|
-
* be the memo field.
|
|
7024
|
-
*/
|
|
7025
|
-
statement_descriptor?: string | null;
|
|
7026
|
-
/**
|
|
7027
|
-
* One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen,
|
|
7028
|
-
* sepa, signet, wire.
|
|
7029
|
-
*/
|
|
7030
|
-
type?:
|
|
7031
|
-
| 'ach'
|
|
7032
|
-
| 'au_becs'
|
|
7033
|
-
| 'bacs'
|
|
7034
|
-
| 'book'
|
|
7035
|
-
| 'card'
|
|
7036
|
-
| 'check'
|
|
7037
|
-
| 'cross_border'
|
|
7038
|
-
| 'eft'
|
|
7039
|
-
| 'interac'
|
|
7040
|
-
| 'masav'
|
|
7041
|
-
| 'neft'
|
|
7042
|
-
| 'provxchange'
|
|
7043
|
-
| 'rtp'
|
|
7044
|
-
| 'sen'
|
|
7045
|
-
| 'sepa'
|
|
7046
|
-
| 'signet'
|
|
7047
|
-
| 'wire'
|
|
7048
|
-
| null;
|
|
7049
|
-
}
|
|
7050
|
-
interface ExpectedPaymentListParams extends PageParams {
|
|
7051
|
-
/**
|
|
7052
|
-
* Specify counterparty_id to see expected_payments for a specific account.
|
|
7053
|
-
*/
|
|
7054
|
-
counterparty_id?: string;
|
|
7055
|
-
/**
|
|
7056
|
-
* Used to return expected payments created after some datetime
|
|
7057
|
-
*/
|
|
7058
|
-
created_at_lower_bound?: string;
|
|
7059
|
-
/**
|
|
7060
|
-
* Used to return expected payments created before some datetime
|
|
7061
|
-
*/
|
|
7062
|
-
created_at_upper_bound?: string;
|
|
7063
|
-
/**
|
|
7064
|
-
* One of credit, debit
|
|
7065
|
-
*/
|
|
7066
|
-
direction?: 'credit' | 'debit';
|
|
7067
|
-
/**
|
|
7068
|
-
* Specify internal_account_id to see expected_payments for a specific account.
|
|
7069
|
-
*/
|
|
7070
|
-
internal_account_id?: string;
|
|
7071
|
-
/**
|
|
7072
|
-
* For example, if you want to query for records with metadata key `Type` and value
|
|
7073
|
-
* `Loan`, the query would be `metadata%5BType%5D=Loan`. This encodes the query
|
|
7074
|
-
* parameters.
|
|
7075
|
-
*/
|
|
7076
|
-
metadata?: Record<string, string>;
|
|
7077
|
-
/**
|
|
7078
|
-
* One of unreconciled, reconciled, or archived.
|
|
7079
|
-
*/
|
|
7080
|
-
status?: 'archived' | 'reconciled' | 'unreconciled';
|
|
7081
|
-
/**
|
|
7082
|
-
* One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp,sen,
|
|
7083
|
-
* sepa, signet, wire
|
|
7084
|
-
*/
|
|
7085
|
-
type?:
|
|
7086
|
-
| 'ach'
|
|
7087
|
-
| 'au_becs'
|
|
7088
|
-
| 'bacs'
|
|
7089
|
-
| 'book'
|
|
7090
|
-
| 'card'
|
|
7091
|
-
| 'check'
|
|
7092
|
-
| 'cross_border'
|
|
7093
|
-
| 'eft'
|
|
7094
|
-
| 'interac'
|
|
7095
|
-
| 'masav'
|
|
7096
|
-
| 'neft'
|
|
7097
|
-
| 'provxchange'
|
|
7098
|
-
| 'rtp'
|
|
7099
|
-
| 'sen'
|
|
7100
|
-
| 'sepa'
|
|
7101
|
-
| 'signet'
|
|
7102
|
-
| 'wire';
|
|
7103
|
-
}
|
|
7104
|
-
class ExternalAccounts extends APIResource {
|
|
7105
|
-
create(
|
|
7106
|
-
body: ExternalAccountCreateParams,
|
|
7107
|
-
options?: Core.RequestOptions,
|
|
7108
|
-
): Promise<Core.APIResponse<ExternalAccount>>;
|
|
7109
|
-
retrieve(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<ExternalAccount>>;
|
|
7110
|
-
update(
|
|
7111
|
-
id: string,
|
|
7112
|
-
body?: ExternalAccountUpdateParams,
|
|
7113
|
-
options?: Core.RequestOptions,
|
|
7114
|
-
): Promise<Core.APIResponse<ExternalAccount>>;
|
|
7115
|
-
update(id: string, options?: Core.RequestOptions): Promise<Core.APIResponse<ExternalAccount>>;
|
|
7116
|
-
list(
|
|
7117
|
-
query?: ExternalAccountListParams,
|
|
7118
|
-
options?: Core.RequestOptions,
|
|
7119
|
-
): Core.PagePromise<ExternalAccountsPage>;
|
|
7120
|
-
list(options?: Core.RequestOptions): Core.PagePromise<ExternalAccountsPage>;
|
|
7121
|
-
del(id: string, options?: Core.RequestOptions): Promise<void>;
|
|
7122
|
-
completeVerification(
|
|
7123
|
-
id: string,
|
|
7124
|
-
body?: ExternalAccountCompleteVerificationParams,
|
|
7125
|
-
options?: Core.RequestOptions,
|
|
7126
|
-
): Promise<Core.APIResponse<ExternalAccount>>;
|
|
7127
|
-
completeVerification(
|
|
7128
|
-
id: string,
|
|
7129
|
-
options?: Core.RequestOptions,
|
|
7130
|
-
): Promise<Core.APIResponse<ExternalAccount>>;
|
|
7131
|
-
verify(
|
|
7132
|
-
id: string,
|
|
7133
|
-
body: ExternalAccountVerifyParams,
|
|
7134
|
-
options?: Core.RequestOptions,
|
|
7135
|
-
): Promise<Core.APIResponse<ExternalAccount>>;
|
|
7136
|
-
}
|
|
7137
|
-
class ExternalAccountsPage extends Page<ExternalAccount> {}
|
|
7138
|
-
interface ExternalAccount {
|
|
7139
|
-
account_details: Array<AccountDetails.AccountDetail>;
|
|
7140
|
-
/**
|
|
7141
|
-
* Can be `checking`, `savings` or `other`.
|
|
7142
|
-
*/
|
|
7143
|
-
account_type: 'cash' | 'checking' | 'loan' | 'non_resident' | 'other' | 'overdraft' | 'savings';
|
|
7144
|
-
contact_details: Array<ExternalAccount.ContactDetails>;
|
|
7145
|
-
counterparty_id: string | null;
|
|
7146
|
-
created_at: string;
|
|
7147
|
-
discarded_at: string | null;
|
|
7148
|
-
id: string;
|
|
7149
|
-
/**
|
|
7150
|
-
* This field will be true if this object exists in the live environment or false
|
|
7151
|
-
* if it exists in the test environment.
|
|
7152
|
-
*/
|
|
7153
|
-
live_mode: boolean;
|
|
7154
|
-
/**
|
|
7155
|
-
* Additional data represented as key-value pairs. Both the key and value must be
|
|
7156
|
-
* strings.
|
|
7157
|
-
*/
|
|
7158
|
-
metadata: Record<string, string>;
|
|
7159
|
-
/**
|
|
7160
|
-
* A nickname for the external account. This is only for internal usage and won't
|
|
7161
|
-
* affect any payments
|
|
7162
|
-
*/
|
|
7163
|
-
name: string | null;
|
|
7164
|
-
object: string;
|
|
7165
|
-
/**
|
|
7166
|
-
* The address associated with the owner or `null`.
|
|
7167
|
-
*/
|
|
7168
|
-
party_address: ExternalAccount.PartyAddress | null;
|
|
7169
|
-
/**
|
|
7170
|
-
* The legal name of the entity which owns the account.
|
|
7171
|
-
*/
|
|
7172
|
-
party_name: string;
|
|
7173
|
-
/**
|
|
7174
|
-
* Either `individual` or `business`.
|
|
7175
|
-
*/
|
|
7176
|
-
party_type: 'business' | 'individual' | null;
|
|
7177
|
-
routing_details: Array<RoutingDetails.RoutingDetail>;
|
|
7178
|
-
updated_at: string;
|
|
7179
|
-
verification_status: 'pending_verification' | 'unverified' | 'verified';
|
|
7180
|
-
}
|
|
7181
|
-
interface ExternalAccountCreateParams {
|
|
7182
|
-
counterparty_id: string | null;
|
|
7183
|
-
account_details?: Array<ExternalAccountCreateParams.AccountDetails>;
|
|
7184
|
-
/**
|
|
7185
|
-
* Can be `checking`, `savings` or `other`.
|
|
7186
|
-
*/
|
|
7187
|
-
account_type?: 'cash' | 'checking' | 'loan' | 'non_resident' | 'other' | 'overdraft' | 'savings';
|
|
7188
|
-
contact_details?: Array<ExternalAccountCreateParams.ContactDetails>;
|
|
7189
|
-
/**
|
|
7190
|
-
* Additional data represented as key-value pairs. Both the key and value must be
|
|
7191
|
-
* strings.
|
|
7192
|
-
*/
|
|
7193
|
-
metadata?: Record<string, string>;
|
|
7194
|
-
/**
|
|
7195
|
-
* A nickname for the external account. This is only for internal usage and won't
|
|
7196
|
-
* affect any payments
|
|
7687
|
+
* The ID of the Internal Account for the expected payment.
|
|
7197
7688
|
*/
|
|
7198
|
-
|
|
7689
|
+
internal_account_id?: string;
|
|
7199
7690
|
/**
|
|
7200
|
-
*
|
|
7691
|
+
* Additional data represented as key-value pairs. Both the key and value must be
|
|
7692
|
+
* strings.
|
|
7201
7693
|
*/
|
|
7202
|
-
|
|
7203
|
-
party_identifier?: string;
|
|
7694
|
+
metadata?: Record<string, string>;
|
|
7204
7695
|
/**
|
|
7205
|
-
*
|
|
7696
|
+
* For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
7697
|
+
* payments the field will be passed through as the "Originator to Beneficiary
|
|
7698
|
+
* Information", also known as OBI or Fedwire tag 6000.
|
|
7206
7699
|
*/
|
|
7207
|
-
|
|
7700
|
+
remittance_information?: string | null;
|
|
7208
7701
|
/**
|
|
7209
|
-
*
|
|
7702
|
+
* The statement description you expect to see on the transaction. For ACH
|
|
7703
|
+
* payments, this will be the full line item passed from the bank. For wire
|
|
7704
|
+
* payments, this will be the OBI field on the wire. For check payments, this will
|
|
7705
|
+
* be the memo field.
|
|
7210
7706
|
*/
|
|
7211
|
-
|
|
7707
|
+
statement_descriptor?: string | null;
|
|
7212
7708
|
/**
|
|
7213
|
-
*
|
|
7214
|
-
*
|
|
7709
|
+
* One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp, sen,
|
|
7710
|
+
* sepa, signet, wire.
|
|
7215
7711
|
*/
|
|
7216
|
-
|
|
7217
|
-
routing_details?: Array<ExternalAccountCreateParams.RoutingDetails>;
|
|
7712
|
+
type?: ExpectedPaymentType;
|
|
7218
7713
|
}
|
|
7219
|
-
interface
|
|
7714
|
+
interface ExpectedPaymentListParams extends PageParams {
|
|
7220
7715
|
/**
|
|
7221
|
-
*
|
|
7716
|
+
* Specify counterparty_id to see expected_payments for a specific account.
|
|
7222
7717
|
*/
|
|
7223
|
-
|
|
7224
|
-
counterparty_id?: string | null;
|
|
7718
|
+
counterparty_id?: string;
|
|
7225
7719
|
/**
|
|
7226
|
-
*
|
|
7227
|
-
* an empty string or `null` as the value.
|
|
7720
|
+
* Used to return expected payments created after some datetime
|
|
7228
7721
|
*/
|
|
7229
|
-
|
|
7722
|
+
created_at_lower_bound?: string;
|
|
7230
7723
|
/**
|
|
7231
|
-
*
|
|
7232
|
-
* affect any payments
|
|
7724
|
+
* Used to return expected payments created before some datetime
|
|
7233
7725
|
*/
|
|
7234
|
-
|
|
7235
|
-
party_address?: ExternalAccountUpdateParams.PartyAddress;
|
|
7726
|
+
created_at_upper_bound?: string;
|
|
7236
7727
|
/**
|
|
7237
|
-
*
|
|
7728
|
+
* One of credit, debit
|
|
7238
7729
|
*/
|
|
7239
|
-
|
|
7730
|
+
direction?: 'credit' | 'debit';
|
|
7240
7731
|
/**
|
|
7241
|
-
*
|
|
7732
|
+
* Specify internal_account_id to see expected_payments for a specific account.
|
|
7242
7733
|
*/
|
|
7243
|
-
|
|
7244
|
-
}
|
|
7245
|
-
interface ExternalAccountListParams extends PageParams {
|
|
7246
|
-
counterparty_id?: string;
|
|
7734
|
+
internal_account_id?: string;
|
|
7247
7735
|
/**
|
|
7248
7736
|
* For example, if you want to query for records with metadata key `Type` and value
|
|
7249
7737
|
* `Loan`, the query would be `metadata%5BType%5D=Loan`. This encodes the query
|
|
@@ -7251,23 +7739,14 @@ declare namespace API {
|
|
|
7251
7739
|
*/
|
|
7252
7740
|
metadata?: Record<string, string>;
|
|
7253
7741
|
/**
|
|
7254
|
-
*
|
|
7255
|
-
*/
|
|
7256
|
-
party_name?: string;
|
|
7257
|
-
}
|
|
7258
|
-
interface ExternalAccountCompleteVerificationParams {
|
|
7259
|
-
amounts?: Array<number>;
|
|
7260
|
-
}
|
|
7261
|
-
interface ExternalAccountVerifyParams {
|
|
7262
|
-
/**
|
|
7263
|
-
* The ID of the internal account where the micro-deposits originate from. Both
|
|
7264
|
-
* credit and debit capabilities must be enabled.
|
|
7742
|
+
* One of unreconciled, reconciled, or archived.
|
|
7265
7743
|
*/
|
|
7266
|
-
|
|
7744
|
+
status?: 'archived' | 'reconciled' | 'unreconciled';
|
|
7267
7745
|
/**
|
|
7268
|
-
*
|
|
7746
|
+
* One of: ach, au_becs, bacs, book, check, eft, interac, provxchange, rtp,sen,
|
|
7747
|
+
* sepa, signet, wire
|
|
7269
7748
|
*/
|
|
7270
|
-
|
|
7749
|
+
type?:
|
|
7271
7750
|
| 'ach'
|
|
7272
7751
|
| 'au_becs'
|
|
7273
7752
|
| 'bacs'
|
|
@@ -7285,10 +7764,6 @@ declare namespace API {
|
|
|
7285
7764
|
| 'sepa'
|
|
7286
7765
|
| 'signet'
|
|
7287
7766
|
| 'wire';
|
|
7288
|
-
/**
|
|
7289
|
-
* Defaults to the currency of the originating account.
|
|
7290
|
-
*/
|
|
7291
|
-
currency?: Shared.Currency;
|
|
7292
7767
|
}
|
|
7293
7768
|
class IncomingPaymentDetails extends APIResource {
|
|
7294
7769
|
/**
|
|
@@ -9019,7 +9494,7 @@ declare namespace API {
|
|
|
9019
9494
|
* payment orders, the `subtype` represents the SEC code. We currently support
|
|
9020
9495
|
* `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
|
|
9021
9496
|
*/
|
|
9022
|
-
subtype:
|
|
9497
|
+
subtype: PaymentOrderSubtype;
|
|
9023
9498
|
/**
|
|
9024
9499
|
* The IDs of all the transactions associated to this payment order. Usually, you
|
|
9025
9500
|
* will only have a single transaction ID. However, if a payment order initially
|
|
@@ -9036,24 +9511,7 @@ declare namespace API {
|
|
|
9036
9511
|
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
9037
9512
|
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
9038
9513
|
*/
|
|
9039
|
-
type:
|
|
9040
|
-
| 'ach'
|
|
9041
|
-
| 'au_becs'
|
|
9042
|
-
| 'bacs'
|
|
9043
|
-
| 'book'
|
|
9044
|
-
| 'card'
|
|
9045
|
-
| 'check'
|
|
9046
|
-
| 'cross_border'
|
|
9047
|
-
| 'eft'
|
|
9048
|
-
| 'interac'
|
|
9049
|
-
| 'masav'
|
|
9050
|
-
| 'neft'
|
|
9051
|
-
| 'provxchange'
|
|
9052
|
-
| 'rtp'
|
|
9053
|
-
| 'sen'
|
|
9054
|
-
| 'sepa'
|
|
9055
|
-
| 'signet'
|
|
9056
|
-
| 'wire';
|
|
9514
|
+
type: PaymentOrderType;
|
|
9057
9515
|
/**
|
|
9058
9516
|
* Identifier of the ultimate originator of the payment order.
|
|
9059
9517
|
*/
|
|
@@ -9071,6 +9529,35 @@ declare namespace API {
|
|
|
9071
9529
|
*/
|
|
9072
9530
|
vendor_failure_reason: string | null;
|
|
9073
9531
|
}
|
|
9532
|
+
/**
|
|
9533
|
+
* An additional layer of classification for the type of payment order you are
|
|
9534
|
+
* doing. This field is only used for `ach` payment orders currently. For `ach`
|
|
9535
|
+
* payment orders, the `subtype` represents the SEC code. We currently support
|
|
9536
|
+
* `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
|
|
9537
|
+
*/
|
|
9538
|
+
type PaymentOrderSubtype = 'CCD' | 'CIE' | 'CTX' | 'IAT' | 'PPD' | 'TEL' | 'WEB' | null;
|
|
9539
|
+
/**
|
|
9540
|
+
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
9541
|
+
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
9542
|
+
*/
|
|
9543
|
+
type PaymentOrderType =
|
|
9544
|
+
| 'ach'
|
|
9545
|
+
| 'au_becs'
|
|
9546
|
+
| 'bacs'
|
|
9547
|
+
| 'book'
|
|
9548
|
+
| 'card'
|
|
9549
|
+
| 'check'
|
|
9550
|
+
| 'cross_border'
|
|
9551
|
+
| 'eft'
|
|
9552
|
+
| 'interac'
|
|
9553
|
+
| 'masav'
|
|
9554
|
+
| 'neft'
|
|
9555
|
+
| 'provxchange'
|
|
9556
|
+
| 'rtp'
|
|
9557
|
+
| 'sen'
|
|
9558
|
+
| 'sepa'
|
|
9559
|
+
| 'signet'
|
|
9560
|
+
| 'wire';
|
|
9074
9561
|
interface PaymentOrderCreateParams {
|
|
9075
9562
|
/**
|
|
9076
9563
|
* Value in specified currency's smallest unit. e.g. $10 would be represented as
|
|
@@ -9092,24 +9579,7 @@ declare namespace API {
|
|
|
9092
9579
|
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
9093
9580
|
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
9094
9581
|
*/
|
|
9095
|
-
type:
|
|
9096
|
-
| 'ach'
|
|
9097
|
-
| 'au_becs'
|
|
9098
|
-
| 'bacs'
|
|
9099
|
-
| 'book'
|
|
9100
|
-
| 'card'
|
|
9101
|
-
| 'check'
|
|
9102
|
-
| 'cross_border'
|
|
9103
|
-
| 'eft'
|
|
9104
|
-
| 'interac'
|
|
9105
|
-
| 'masav'
|
|
9106
|
-
| 'neft'
|
|
9107
|
-
| 'provxchange'
|
|
9108
|
-
| 'rtp'
|
|
9109
|
-
| 'sen'
|
|
9110
|
-
| 'sepa'
|
|
9111
|
-
| 'signet'
|
|
9112
|
-
| 'wire';
|
|
9582
|
+
type: PaymentOrderType;
|
|
9113
9583
|
accounting?: PaymentOrderCreateParams.Accounting;
|
|
9114
9584
|
/**
|
|
9115
9585
|
* The ID of one of your accounting categories. Note that these will only be
|
|
@@ -9246,7 +9716,7 @@ declare namespace API {
|
|
|
9246
9716
|
* payment orders, the `subtype` represents the SEC code. We currently support
|
|
9247
9717
|
* `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
|
|
9248
9718
|
*/
|
|
9249
|
-
subtype?:
|
|
9719
|
+
subtype?: PaymentOrderSubtype;
|
|
9250
9720
|
/**
|
|
9251
9721
|
* A flag that determines whether a payment order should go through transaction
|
|
9252
9722
|
* monitoring.
|
|
@@ -9431,29 +9901,12 @@ declare namespace API {
|
|
|
9431
9901
|
* payment orders, the `subtype` represents the SEC code. We currently support
|
|
9432
9902
|
* `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
|
|
9433
9903
|
*/
|
|
9434
|
-
subtype?:
|
|
9904
|
+
subtype?: PaymentOrderSubtype;
|
|
9435
9905
|
/**
|
|
9436
9906
|
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
9437
9907
|
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
9438
9908
|
*/
|
|
9439
|
-
type?:
|
|
9440
|
-
| 'ach'
|
|
9441
|
-
| 'au_becs'
|
|
9442
|
-
| 'bacs'
|
|
9443
|
-
| 'book'
|
|
9444
|
-
| 'card'
|
|
9445
|
-
| 'check'
|
|
9446
|
-
| 'cross_border'
|
|
9447
|
-
| 'eft'
|
|
9448
|
-
| 'interac'
|
|
9449
|
-
| 'masav'
|
|
9450
|
-
| 'neft'
|
|
9451
|
-
| 'provxchange'
|
|
9452
|
-
| 'rtp'
|
|
9453
|
-
| 'sen'
|
|
9454
|
-
| 'sepa'
|
|
9455
|
-
| 'signet'
|
|
9456
|
-
| 'wire';
|
|
9909
|
+
type?: PaymentOrderType;
|
|
9457
9910
|
/**
|
|
9458
9911
|
* This represents the identifier by which the person is known to the receiver when
|
|
9459
9912
|
* using the CIE subtype for ACH payments. Only the first 22 characters of this
|
|
@@ -9563,24 +10016,7 @@ declare namespace API {
|
|
|
9563
10016
|
* One of `ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`,
|
|
9564
10017
|
* `au_becs`, `interac`, `signet`, `provexchange`.
|
|
9565
10018
|
*/
|
|
9566
|
-
type:
|
|
9567
|
-
| 'ach'
|
|
9568
|
-
| 'au_becs'
|
|
9569
|
-
| 'bacs'
|
|
9570
|
-
| 'book'
|
|
9571
|
-
| 'card'
|
|
9572
|
-
| 'check'
|
|
9573
|
-
| 'cross_border'
|
|
9574
|
-
| 'eft'
|
|
9575
|
-
| 'interac'
|
|
9576
|
-
| 'masav'
|
|
9577
|
-
| 'neft'
|
|
9578
|
-
| 'provxchange'
|
|
9579
|
-
| 'rtp'
|
|
9580
|
-
| 'sen'
|
|
9581
|
-
| 'sepa'
|
|
9582
|
-
| 'signet'
|
|
9583
|
-
| 'wire';
|
|
10019
|
+
type: PaymentOrderType;
|
|
9584
10020
|
accounting?: PaymentOrderCreateAsyncParams.Accounting;
|
|
9585
10021
|
/**
|
|
9586
10022
|
* The ID of one of your accounting categories. Note that these will only be
|
|
@@ -9712,29 +10148,368 @@ declare namespace API {
|
|
|
9712
10148
|
* payment orders, the `subtype` represents the SEC code. We currently support
|
|
9713
10149
|
* `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
|
|
9714
10150
|
*/
|
|
9715
|
-
subtype?:
|
|
10151
|
+
subtype?: PaymentOrderSubtype;
|
|
9716
10152
|
/**
|
|
9717
10153
|
* A flag that determines whether a payment order should go through transaction
|
|
9718
10154
|
* monitoring.
|
|
9719
10155
|
*/
|
|
9720
|
-
transaction_monitoring_enabled?: boolean;
|
|
10156
|
+
transaction_monitoring_enabled?: boolean;
|
|
10157
|
+
/**
|
|
10158
|
+
* Identifier of the ultimate originator of the payment order.
|
|
10159
|
+
*/
|
|
10160
|
+
ultimate_originating_party_identifier?: string | null;
|
|
10161
|
+
/**
|
|
10162
|
+
* Name of the ultimate originator of the payment order.
|
|
10163
|
+
*/
|
|
10164
|
+
ultimate_originating_party_name?: string | null;
|
|
10165
|
+
/**
|
|
10166
|
+
* Identifier of the ultimate funds recipient.
|
|
10167
|
+
*/
|
|
10168
|
+
ultimate_receiving_party_identifier?: string | null;
|
|
10169
|
+
/**
|
|
10170
|
+
* Name of the ultimate funds recipient.
|
|
10171
|
+
*/
|
|
10172
|
+
ultimate_receiving_party_name?: string | null;
|
|
10173
|
+
}
|
|
10174
|
+
class RoutingDetails extends APIResource {
|
|
10175
|
+
/**
|
|
10176
|
+
* Create a routing detail for a single external account.
|
|
10177
|
+
*/
|
|
10178
|
+
create(
|
|
10179
|
+
accountsType: 'external_accounts',
|
|
10180
|
+
accountId: string,
|
|
10181
|
+
body: RoutingDetailCreateParams,
|
|
10182
|
+
options?: Core.RequestOptions,
|
|
10183
|
+
): Promise<Core.APIResponse<RoutingDetail>>;
|
|
10184
|
+
/**
|
|
10185
|
+
* Get a single routing detail for a single internal or external account.
|
|
10186
|
+
*/
|
|
10187
|
+
retrieve(
|
|
10188
|
+
accountsType: 'external_accounts' | 'internal_accounts',
|
|
10189
|
+
accountId: string,
|
|
10190
|
+
id: string,
|
|
10191
|
+
options?: Core.RequestOptions,
|
|
10192
|
+
): Promise<Core.APIResponse<RoutingDetail>>;
|
|
10193
|
+
/**
|
|
10194
|
+
* Get a list of routing details for a single internal or external account.
|
|
10195
|
+
*/
|
|
10196
|
+
list(
|
|
10197
|
+
accountsType: 'external_accounts' | 'internal_accounts',
|
|
10198
|
+
accountId: string,
|
|
10199
|
+
query?: RoutingDetailListParams,
|
|
10200
|
+
options?: Core.RequestOptions,
|
|
10201
|
+
): Core.PagePromise<RoutingDetailsPage>;
|
|
10202
|
+
list(
|
|
10203
|
+
accountsType: 'external_accounts' | 'internal_accounts',
|
|
10204
|
+
accountId: string,
|
|
10205
|
+
options?: Core.RequestOptions,
|
|
10206
|
+
): Core.PagePromise<RoutingDetailsPage>;
|
|
10207
|
+
/**
|
|
10208
|
+
* Delete a routing detail for a single external account.
|
|
10209
|
+
*/
|
|
10210
|
+
del(
|
|
10211
|
+
accountsType: 'external_accounts',
|
|
10212
|
+
accountId: string,
|
|
10213
|
+
id: string,
|
|
10214
|
+
options?: Core.RequestOptions,
|
|
10215
|
+
): Promise<void>;
|
|
10216
|
+
}
|
|
10217
|
+
class RoutingDetailsPage extends Page<RoutingDetail> {}
|
|
10218
|
+
interface RoutingDetail {
|
|
10219
|
+
bank_address: RoutingDetail.BankAddress | null;
|
|
10220
|
+
/**
|
|
10221
|
+
* The name of the bank.
|
|
10222
|
+
*/
|
|
10223
|
+
bank_name: string;
|
|
10224
|
+
created_at: string;
|
|
10225
|
+
discarded_at: string | null;
|
|
10226
|
+
id: string;
|
|
10227
|
+
/**
|
|
10228
|
+
* This field will be true if this object exists in the live environment or false
|
|
10229
|
+
* if it exists in the test environment.
|
|
10230
|
+
*/
|
|
10231
|
+
live_mode: boolean;
|
|
10232
|
+
object: string;
|
|
10233
|
+
/**
|
|
10234
|
+
* If the routing detail is to be used for a specific payment type this field will
|
|
10235
|
+
* be populated, otherwise null.
|
|
10236
|
+
*/
|
|
10237
|
+
payment_type:
|
|
10238
|
+
| 'ach'
|
|
10239
|
+
| 'au_becs'
|
|
10240
|
+
| 'bacs'
|
|
10241
|
+
| 'book'
|
|
10242
|
+
| 'card'
|
|
10243
|
+
| 'check'
|
|
10244
|
+
| 'cross_border'
|
|
10245
|
+
| 'eft'
|
|
10246
|
+
| 'interac'
|
|
10247
|
+
| 'masav'
|
|
10248
|
+
| 'neft'
|
|
10249
|
+
| 'provxchange'
|
|
10250
|
+
| 'rtp'
|
|
10251
|
+
| 'sen'
|
|
10252
|
+
| 'sepa'
|
|
10253
|
+
| 'signet'
|
|
10254
|
+
| 'wire'
|
|
10255
|
+
| null;
|
|
10256
|
+
/**
|
|
10257
|
+
* The routing number of the bank.
|
|
10258
|
+
*/
|
|
10259
|
+
routing_number: string;
|
|
9721
10260
|
/**
|
|
9722
|
-
*
|
|
10261
|
+
* One of `aba`, `swift`, `ca_cpa`, `au_bsb`, `gb_sort_code`, `in_ifsc`, `cnaps`.
|
|
9723
10262
|
*/
|
|
9724
|
-
|
|
10263
|
+
routing_number_type:
|
|
10264
|
+
| 'aba'
|
|
10265
|
+
| 'au_bsb'
|
|
10266
|
+
| 'br_codigo'
|
|
10267
|
+
| 'ca_cpa'
|
|
10268
|
+
| 'cnaps'
|
|
10269
|
+
| 'gb_sort_code'
|
|
10270
|
+
| 'in_ifsc'
|
|
10271
|
+
| 'my_branch_code'
|
|
10272
|
+
| 'swift';
|
|
10273
|
+
updated_at: string;
|
|
10274
|
+
}
|
|
10275
|
+
interface RoutingDetailCreateParams {
|
|
9725
10276
|
/**
|
|
9726
|
-
*
|
|
10277
|
+
* The routing number of the bank.
|
|
9727
10278
|
*/
|
|
9728
|
-
|
|
10279
|
+
routing_number: string;
|
|
9729
10280
|
/**
|
|
9730
|
-
*
|
|
10281
|
+
* One of `aba`, `swift`, `ca_cpa`, `au_bsb`, `gb_sort_code`, `in_ifsc`, `cnaps`.
|
|
9731
10282
|
*/
|
|
9732
|
-
|
|
10283
|
+
routing_number_type:
|
|
10284
|
+
| 'aba'
|
|
10285
|
+
| 'au_bsb'
|
|
10286
|
+
| 'br_codigo'
|
|
10287
|
+
| 'ca_cpa'
|
|
10288
|
+
| 'cnaps'
|
|
10289
|
+
| 'gb_sort_code'
|
|
10290
|
+
| 'in_ifsc'
|
|
10291
|
+
| 'my_branch_code'
|
|
10292
|
+
| 'swift';
|
|
9733
10293
|
/**
|
|
9734
|
-
*
|
|
10294
|
+
* If the routing detail is to be used for a specific payment type this field will
|
|
10295
|
+
* be populated, otherwise null.
|
|
9735
10296
|
*/
|
|
9736
|
-
|
|
10297
|
+
payment_type?:
|
|
10298
|
+
| 'ach'
|
|
10299
|
+
| 'au_becs'
|
|
10300
|
+
| 'bacs'
|
|
10301
|
+
| 'book'
|
|
10302
|
+
| 'card'
|
|
10303
|
+
| 'check'
|
|
10304
|
+
| 'cross_border'
|
|
10305
|
+
| 'eft'
|
|
10306
|
+
| 'interac'
|
|
10307
|
+
| 'masav'
|
|
10308
|
+
| 'neft'
|
|
10309
|
+
| 'provxchange'
|
|
10310
|
+
| 'rtp'
|
|
10311
|
+
| 'sen'
|
|
10312
|
+
| 'sepa'
|
|
10313
|
+
| 'signet'
|
|
10314
|
+
| 'wire'
|
|
10315
|
+
| null;
|
|
9737
10316
|
}
|
|
10317
|
+
interface RoutingDetailListParams extends PageParams {}
|
|
10318
|
+
// File generated from our OpenAPI spec by Stainless.
|
|
10319
|
+
/**
|
|
10320
|
+
* Three-letter ISO currency code.
|
|
10321
|
+
*/
|
|
10322
|
+
type Currency =
|
|
10323
|
+
| 'AED'
|
|
10324
|
+
| 'AFN'
|
|
10325
|
+
| 'ALL'
|
|
10326
|
+
| 'AMD'
|
|
10327
|
+
| 'ANG'
|
|
10328
|
+
| 'AOA'
|
|
10329
|
+
| 'ARS'
|
|
10330
|
+
| 'AUD'
|
|
10331
|
+
| 'AWG'
|
|
10332
|
+
| 'AZN'
|
|
10333
|
+
| 'BAM'
|
|
10334
|
+
| 'BBD'
|
|
10335
|
+
| 'BCH'
|
|
10336
|
+
| 'BDT'
|
|
10337
|
+
| 'BGN'
|
|
10338
|
+
| 'BHD'
|
|
10339
|
+
| 'BIF'
|
|
10340
|
+
| 'BMD'
|
|
10341
|
+
| 'BND'
|
|
10342
|
+
| 'BOB'
|
|
10343
|
+
| 'BRL'
|
|
10344
|
+
| 'BSD'
|
|
10345
|
+
| 'BTC'
|
|
10346
|
+
| 'BTN'
|
|
10347
|
+
| 'BWP'
|
|
10348
|
+
| 'BYN'
|
|
10349
|
+
| 'BYR'
|
|
10350
|
+
| 'BZD'
|
|
10351
|
+
| 'CAD'
|
|
10352
|
+
| 'CDF'
|
|
10353
|
+
| 'CHF'
|
|
10354
|
+
| 'CLF'
|
|
10355
|
+
| 'CLP'
|
|
10356
|
+
| 'CNH'
|
|
10357
|
+
| 'CNY'
|
|
10358
|
+
| 'COP'
|
|
10359
|
+
| 'CRC'
|
|
10360
|
+
| 'CUC'
|
|
10361
|
+
| 'CUP'
|
|
10362
|
+
| 'CVE'
|
|
10363
|
+
| 'CZK'
|
|
10364
|
+
| 'DJF'
|
|
10365
|
+
| 'DKK'
|
|
10366
|
+
| 'DOP'
|
|
10367
|
+
| 'DZD'
|
|
10368
|
+
| 'EEK'
|
|
10369
|
+
| 'EGP'
|
|
10370
|
+
| 'ERN'
|
|
10371
|
+
| 'ETB'
|
|
10372
|
+
| 'EUR'
|
|
10373
|
+
| 'FJD'
|
|
10374
|
+
| 'FKP'
|
|
10375
|
+
| 'GBP'
|
|
10376
|
+
| 'GBX'
|
|
10377
|
+
| 'GEL'
|
|
10378
|
+
| 'GGP'
|
|
10379
|
+
| 'GHS'
|
|
10380
|
+
| 'GIP'
|
|
10381
|
+
| 'GMD'
|
|
10382
|
+
| 'GNF'
|
|
10383
|
+
| 'GTQ'
|
|
10384
|
+
| 'GYD'
|
|
10385
|
+
| 'HKD'
|
|
10386
|
+
| 'HNL'
|
|
10387
|
+
| 'HRK'
|
|
10388
|
+
| 'HTG'
|
|
10389
|
+
| 'HUF'
|
|
10390
|
+
| 'IDR'
|
|
10391
|
+
| 'ILS'
|
|
10392
|
+
| 'IMP'
|
|
10393
|
+
| 'INR'
|
|
10394
|
+
| 'IQD'
|
|
10395
|
+
| 'IRR'
|
|
10396
|
+
| 'ISK'
|
|
10397
|
+
| 'JEP'
|
|
10398
|
+
| 'JMD'
|
|
10399
|
+
| 'JOD'
|
|
10400
|
+
| 'JPY'
|
|
10401
|
+
| 'KES'
|
|
10402
|
+
| 'KGS'
|
|
10403
|
+
| 'KHR'
|
|
10404
|
+
| 'KMF'
|
|
10405
|
+
| 'KPW'
|
|
10406
|
+
| 'KRW'
|
|
10407
|
+
| 'KWD'
|
|
10408
|
+
| 'KYD'
|
|
10409
|
+
| 'KZT'
|
|
10410
|
+
| 'LAK'
|
|
10411
|
+
| 'LBP'
|
|
10412
|
+
| 'LKR'
|
|
10413
|
+
| 'LRD'
|
|
10414
|
+
| 'LSL'
|
|
10415
|
+
| 'LTL'
|
|
10416
|
+
| 'LVL'
|
|
10417
|
+
| 'LYD'
|
|
10418
|
+
| 'MAD'
|
|
10419
|
+
| 'MDL'
|
|
10420
|
+
| 'MGA'
|
|
10421
|
+
| 'MKD'
|
|
10422
|
+
| 'MMK'
|
|
10423
|
+
| 'MNT'
|
|
10424
|
+
| 'MOP'
|
|
10425
|
+
| 'MRO'
|
|
10426
|
+
| 'MRU'
|
|
10427
|
+
| 'MTL'
|
|
10428
|
+
| 'MUR'
|
|
10429
|
+
| 'MVR'
|
|
10430
|
+
| 'MWK'
|
|
10431
|
+
| 'MXN'
|
|
10432
|
+
| 'MYR'
|
|
10433
|
+
| 'MZN'
|
|
10434
|
+
| 'NAD'
|
|
10435
|
+
| 'NGN'
|
|
10436
|
+
| 'NIO'
|
|
10437
|
+
| 'NOK'
|
|
10438
|
+
| 'NPR'
|
|
10439
|
+
| 'NZD'
|
|
10440
|
+
| 'OMR'
|
|
10441
|
+
| 'PAB'
|
|
10442
|
+
| 'PEN'
|
|
10443
|
+
| 'PGK'
|
|
10444
|
+
| 'PHP'
|
|
10445
|
+
| 'PKR'
|
|
10446
|
+
| 'PLN'
|
|
10447
|
+
| 'PYG'
|
|
10448
|
+
| 'QAR'
|
|
10449
|
+
| 'RON'
|
|
10450
|
+
| 'RSD'
|
|
10451
|
+
| 'RUB'
|
|
10452
|
+
| 'RWF'
|
|
10453
|
+
| 'SAR'
|
|
10454
|
+
| 'SBD'
|
|
10455
|
+
| 'SCR'
|
|
10456
|
+
| 'SDG'
|
|
10457
|
+
| 'SEK'
|
|
10458
|
+
| 'SGD'
|
|
10459
|
+
| 'SHP'
|
|
10460
|
+
| 'SKK'
|
|
10461
|
+
| 'SLL'
|
|
10462
|
+
| 'SOS'
|
|
10463
|
+
| 'SRD'
|
|
10464
|
+
| 'SSP'
|
|
10465
|
+
| 'STD'
|
|
10466
|
+
| 'SVC'
|
|
10467
|
+
| 'SYP'
|
|
10468
|
+
| 'SZL'
|
|
10469
|
+
| 'THB'
|
|
10470
|
+
| 'TJS'
|
|
10471
|
+
| 'TMM'
|
|
10472
|
+
| 'TMT'
|
|
10473
|
+
| 'TND'
|
|
10474
|
+
| 'TOP'
|
|
10475
|
+
| 'TRY'
|
|
10476
|
+
| 'TTD'
|
|
10477
|
+
| 'TWD'
|
|
10478
|
+
| 'TZS'
|
|
10479
|
+
| 'UAH'
|
|
10480
|
+
| 'UGX'
|
|
10481
|
+
| 'USD'
|
|
10482
|
+
| 'UYU'
|
|
10483
|
+
| 'UZS'
|
|
10484
|
+
| 'VEF'
|
|
10485
|
+
| 'VES'
|
|
10486
|
+
| 'VND'
|
|
10487
|
+
| 'VUV'
|
|
10488
|
+
| 'WST'
|
|
10489
|
+
| 'XAF'
|
|
10490
|
+
| 'XAG'
|
|
10491
|
+
| 'XAU'
|
|
10492
|
+
| 'XBA'
|
|
10493
|
+
| 'XBB'
|
|
10494
|
+
| 'XBC'
|
|
10495
|
+
| 'XBD'
|
|
10496
|
+
| 'XCD'
|
|
10497
|
+
| 'XDR'
|
|
10498
|
+
| 'XFU'
|
|
10499
|
+
| 'XOF'
|
|
10500
|
+
| 'XPD'
|
|
10501
|
+
| 'XPF'
|
|
10502
|
+
| 'XPT'
|
|
10503
|
+
| 'XTS'
|
|
10504
|
+
| 'YER'
|
|
10505
|
+
| 'ZAR'
|
|
10506
|
+
| 'ZMK'
|
|
10507
|
+
| 'ZMW'
|
|
10508
|
+
| 'ZWD'
|
|
10509
|
+
| 'ZWL'
|
|
10510
|
+
| 'ZWN'
|
|
10511
|
+
| 'ZWR'
|
|
10512
|
+
| null;
|
|
9738
10513
|
// File generated from our OpenAPI spec by Stainless.
|
|
9739
10514
|
interface PingResponse {
|
|
9740
10515
|
ping: string;
|
|
@@ -10133,11 +10908,13 @@ declare namespace ModernTreasury {
|
|
|
10133
10908
|
export import EventsPage = API.EventsPage;
|
|
10134
10909
|
export import EventListParams = API.EventListParams;
|
|
10135
10910
|
export import ExpectedPayment = API.ExpectedPayment;
|
|
10911
|
+
export import ExpectedPaymentType = API.ExpectedPaymentType;
|
|
10136
10912
|
export import ExpectedPaymentsPage = API.ExpectedPaymentsPage;
|
|
10137
10913
|
export import ExpectedPaymentCreateParams = API.ExpectedPaymentCreateParams;
|
|
10138
10914
|
export import ExpectedPaymentUpdateParams = API.ExpectedPaymentUpdateParams;
|
|
10139
10915
|
export import ExpectedPaymentListParams = API.ExpectedPaymentListParams;
|
|
10140
10916
|
export import ExternalAccount = API.ExternalAccount;
|
|
10917
|
+
export import ExternalAccountType = API.ExternalAccountType;
|
|
10141
10918
|
export import ExternalAccountsPage = API.ExternalAccountsPage;
|
|
10142
10919
|
export import ExternalAccountCreateParams = API.ExternalAccountCreateParams;
|
|
10143
10920
|
export import ExternalAccountUpdateParams = API.ExternalAccountUpdateParams;
|
|
@@ -10195,6 +10972,8 @@ declare namespace ModernTreasury {
|
|
|
10195
10972
|
export import LineItemUpdateParams = API.LineItemUpdateParams;
|
|
10196
10973
|
export import LineItemListParams = API.LineItemListParams;
|
|
10197
10974
|
export import PaymentOrder = API.PaymentOrder;
|
|
10975
|
+
export import PaymentOrderSubtype = API.PaymentOrderSubtype;
|
|
10976
|
+
export import PaymentOrderType = API.PaymentOrderType;
|
|
10198
10977
|
export import PaymentOrdersPage = API.PaymentOrdersPage;
|
|
10199
10978
|
export import PaymentOrderCreateParams = API.PaymentOrderCreateParams;
|
|
10200
10979
|
export import PaymentOrderUpdateParams = API.PaymentOrderUpdateParams;
|