/
index.ts
52 lines (48 loc) · 1.12 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { MethodMetadata, Parameter } from '../..';
import { Headers } from '../../../helpers/axios';
import { useRestCall } from '../../../helpers/rest-calls';
const path =
'vezgo-transactions/:accountId/?pageNbr=:pageNbr&pageSize=:pageSize';
export function useMethod({ pathParameters, body }: any) {
const { data, error, loading, getData } = useRestCall({
pathParameters,
headers: Headers,
body,
metadata,
});
return { data, error, loading, getData };
}
const parameters: Parameter[] = [
{
key: 1,
name: 'accountId',
description: 'Account ID',
required: 'yes',
default: '',
dataType: 'string',
},
{
key: 2,
name: 'pageNbr',
description: 'Pagination page number',
required: 'no',
default: '',
dataType: 'number',
},
{
key: 3,
name: 'pageSize',
description: 'pageSize',
required: 'no',
default: '',
dataType: 'number',
},
];
export const metadata: MethodMetadata = {
author: 'Aaron Knott',
authorPicture: '',
description: 'Get list of Vezgo Transactions for a given account',
name: path,
method: 'GET',
parameters,
};