@pax2pay/client 0.3.72 → 0.3.73
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/Client/Accounts/index.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as model from "../../model"
|
|
2
2
|
import { Connection } from "../Connection"
|
|
3
3
|
import { List } from "../List"
|
|
4
|
-
import { Paginated } from "../Paginated"
|
|
5
4
|
|
|
6
5
|
export class Accounts extends List<model.AccountResponse> {
|
|
7
6
|
protected folder = "funding-accounts"
|
|
@@ -47,63 +46,36 @@ export class Accounts extends List<model.AccountResponse> {
|
|
|
47
46
|
`${this.folder}/${providerCode}/${providerAccountId}/limits`
|
|
48
47
|
)
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
(page, size, sort) =>
|
|
61
|
-
this.connection.get<
|
|
62
|
-
{ list: model.FundingAccountResponseV2Basic[]; totalCount: number } | model.FundingAccountResponseV2Basic[]
|
|
63
|
-
>(`v2/${this.folder}`, {
|
|
64
|
-
page: page,
|
|
65
|
-
size: size,
|
|
66
|
-
sort: sort,
|
|
67
|
-
provider: provider,
|
|
68
|
-
}),
|
|
69
|
-
undefined,
|
|
70
|
-
page,
|
|
71
|
-
size,
|
|
72
|
-
sort
|
|
73
|
-
)
|
|
49
|
+
async getAllFundingAccountsV2(providerCode: model.ProviderCode[], size = 500, sort = "friendlyName") {
|
|
50
|
+
const response = await this.connection.get<{
|
|
51
|
+
list: model.FundingAccountResponseV2Basic[]
|
|
52
|
+
totalCount: number
|
|
53
|
+
}>(`v2/${this.folder}`, {
|
|
54
|
+
provider: providerCode,
|
|
55
|
+
size: size,
|
|
56
|
+
sort: sort,
|
|
57
|
+
})
|
|
58
|
+
return this.extractResponse(response)
|
|
74
59
|
}
|
|
75
|
-
async
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
previous,
|
|
84
|
-
(page, size, sort) =>
|
|
85
|
-
this.connection.get<
|
|
86
|
-
{ list: model.FundingAccountResponseV2Full[]; totalCount: number } | model.FundingAccountResponseV2Full[]
|
|
87
|
-
>(`v2/${this.folder}/info`, {
|
|
88
|
-
page: page,
|
|
89
|
-
size: size,
|
|
90
|
-
sort: sort,
|
|
91
|
-
provider: provider,
|
|
92
|
-
}),
|
|
93
|
-
undefined,
|
|
94
|
-
page,
|
|
95
|
-
size,
|
|
96
|
-
sort
|
|
60
|
+
async getAllFundingAccountsV2Full(providerCode: model.ProviderCode[], size = 500, sort = "friendlyName") {
|
|
61
|
+
const response = await this.connection.get<{ list: model.FundingAccountResponseV2Full[]; totalCount: number }>(
|
|
62
|
+
`v2/${this.folder}/info`,
|
|
63
|
+
{
|
|
64
|
+
provider: providerCode,
|
|
65
|
+
size: size,
|
|
66
|
+
sort: sort,
|
|
67
|
+
}
|
|
97
68
|
)
|
|
69
|
+
return this.extractResponse(response)
|
|
98
70
|
}
|
|
99
|
-
async getFundingAccountV2(providerCode: model.ProviderCode,
|
|
71
|
+
async getFundingAccountV2(providerCode: model.ProviderCode, providerAccountId: string) {
|
|
100
72
|
return await this.connection.get<model.FundingAccountResponseV2Basic>(
|
|
101
|
-
`v2/${this.folder}/${providerCode}/${
|
|
73
|
+
`v2/${this.folder}/${providerCode}/${providerAccountId}`
|
|
102
74
|
)
|
|
103
75
|
}
|
|
104
|
-
async getFundingAccountV2Full(providerCode: model.ProviderCode,
|
|
76
|
+
async getFundingAccountV2Full(providerCode: model.ProviderCode, providerAccountId: string) {
|
|
105
77
|
return await this.connection.get<model.FundingAccountResponseV2Full>(
|
|
106
|
-
`v2/${this.folder}/${providerCode}/${
|
|
78
|
+
`v2/${this.folder}/${providerCode}/${providerAccountId}/info`
|
|
107
79
|
)
|
|
108
80
|
}
|
|
109
81
|
async getFundingAccounts(
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as model from "../../model";
|
|
2
2
|
import { Connection } from "../Connection";
|
|
3
3
|
import { List } from "../List";
|
|
4
|
-
import { Paginated } from "../Paginated";
|
|
5
4
|
export declare class Accounts extends List<model.AccountResponse> {
|
|
6
5
|
protected folder: string;
|
|
7
6
|
private constructor();
|
|
@@ -13,12 +12,12 @@ export declare class Accounts extends List<model.AccountResponse> {
|
|
|
13
12
|
cancelLimitAlert(providerCode: model.ProviderCode, providerAccountId: string): Promise<model.AccountResponse | model.ErrorResponse | (model.ErrorResponse & {
|
|
14
13
|
status: 400 | 404 | 500 | 403 | 503;
|
|
15
14
|
})>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
getFundingAccountV2(providerCode: model.ProviderCode,
|
|
15
|
+
getAllFundingAccountsV2(providerCode: model.ProviderCode[], size?: number, sort?: string): Promise<model.ErrorResponse | model.FundingAccountResponseV2Basic[]>;
|
|
16
|
+
getAllFundingAccountsV2Full(providerCode: model.ProviderCode[], size?: number, sort?: string): Promise<model.ErrorResponse | model.FundingAccountResponseV2Full[]>;
|
|
17
|
+
getFundingAccountV2(providerCode: model.ProviderCode, providerAccountId: string): Promise<model.FundingAccountResponseV2Basic | (model.ErrorResponse & {
|
|
19
18
|
status: 400 | 404 | 500 | 403 | 503;
|
|
20
19
|
})>;
|
|
21
|
-
getFundingAccountV2Full(providerCode: model.ProviderCode,
|
|
20
|
+
getFundingAccountV2Full(providerCode: model.ProviderCode, providerAccountId: string): Promise<model.FundingAccountResponseV2Full | (model.ErrorResponse & {
|
|
22
21
|
status: 400 | 404 | 500 | 403 | 503;
|
|
23
22
|
})>;
|
|
24
23
|
getFundingAccounts(searchRequest: model.FundingAccountSearchRequest): Promise<model.ErrorResponse | model.AccountResponse[]>;
|
|
@@ -23,27 +23,27 @@ export class Accounts extends List {
|
|
|
23
23
|
async cancelLimitAlert(providerCode, providerAccountId) {
|
|
24
24
|
return await this.connection.remove(`${this.folder}/${providerCode}/${providerAccountId}/limits`);
|
|
25
25
|
}
|
|
26
|
-
async
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
async getAllFundingAccountsV2(providerCode, size = 500, sort = "friendlyName") {
|
|
27
|
+
const response = await this.connection.get(`v2/${this.folder}`, {
|
|
28
|
+
provider: providerCode,
|
|
29
29
|
size: size,
|
|
30
30
|
sort: sort,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
});
|
|
32
|
+
return this.extractResponse(response);
|
|
33
33
|
}
|
|
34
|
-
async
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
async getAllFundingAccountsV2Full(providerCode, size = 500, sort = "friendlyName") {
|
|
35
|
+
const response = await this.connection.get(`v2/${this.folder}/info`, {
|
|
36
|
+
provider: providerCode,
|
|
37
37
|
size: size,
|
|
38
38
|
sort: sort,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
});
|
|
40
|
+
return this.extractResponse(response);
|
|
41
41
|
}
|
|
42
|
-
async getFundingAccountV2(providerCode,
|
|
43
|
-
return await this.connection.get(`v2/${this.folder}/${providerCode}/${
|
|
42
|
+
async getFundingAccountV2(providerCode, providerAccountId) {
|
|
43
|
+
return await this.connection.get(`v2/${this.folder}/${providerCode}/${providerAccountId}`);
|
|
44
44
|
}
|
|
45
|
-
async getFundingAccountV2Full(providerCode,
|
|
46
|
-
return await this.connection.get(`v2/${this.folder}/${providerCode}/${
|
|
45
|
+
async getFundingAccountV2Full(providerCode, providerAccountId) {
|
|
46
|
+
return await this.connection.get(`v2/${this.folder}/${providerCode}/${providerAccountId}/info`);
|
|
47
47
|
}
|
|
48
48
|
async getFundingAccounts(searchRequest) {
|
|
49
49
|
const response = await this.connection.post(`${this.folder}/searches`, searchRequest);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Accounts/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM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