-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransactions.ts
69 lines (50 loc) · 1.35 KB
/
transactions.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../resource';
import * as Core from '../core';
export class Transactions extends APIResource {
/**
* Get transactions
*/
list(query: TransactionListParams, options?: Core.RequestOptions): Core.APIPromise<Transactions> {
return this._client.get('/transactions', { query, ...options });
}
}
export interface Transactions {
data: Array<Transactions.Data>;
}
export namespace Transactions {
export interface Data {
id: string;
amount: number;
balance: number | null;
category: string | null;
currency: string;
date: string;
description: string | null;
method: string | null;
name: string;
status: 'pending' | 'posted';
}
}
export interface TransactionListParams {
/**
* Get transactions by accountId
*/
accountId: string;
/**
* Get transactions with the correct amount depending on credit or depository
*/
accountType: 'credit' | 'depository';
provider: 'teller' | 'plaid' | 'gocardless';
/**
* Used for Teller and Plaid
*/
accessToken?: string;
/**
* Get latest transactions
*/
latest?: 'true' | 'false';
}
export declare namespace Transactions {
export { type Transactions as Transactions, type TransactionListParams as TransactionListParams };
}