-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathintrafi-exclusions.ts
More file actions
185 lines (163 loc) · 5.49 KB
/
intrafi-exclusions.ts
File metadata and controls
185 lines (163 loc) · 5.49 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../core/resource';
import { APIPromise } from '../core/api-promise';
import { Page, type PageParams, PagePromise } from '../core/pagination';
import { RequestOptions } from '../internal/request-options';
import { path } from '../internal/utils/path';
export class IntrafiExclusions extends APIResource {
/**
* Create an IntraFi Exclusion
*
* @example
* ```ts
* const intrafiExclusion =
* await client.intrafiExclusions.create({
* entity_id: 'entity_n8y8tnk2p9339ti393yi',
* fdic_certificate_number: '314159',
* });
* ```
*/
create(body: IntrafiExclusionCreateParams, options?: RequestOptions): APIPromise<IntrafiExclusion> {
return this._client.post('/intrafi_exclusions', { body, ...options });
}
/**
* Get an IntraFi Exclusion
*
* @example
* ```ts
* const intrafiExclusion =
* await client.intrafiExclusions.retrieve(
* 'account_in71c4amph0vgo2qllky',
* );
* ```
*/
retrieve(intrafiExclusionID: string, options?: RequestOptions): APIPromise<IntrafiExclusion> {
return this._client.get(path`/intrafi_exclusions/${intrafiExclusionID}`, options);
}
/**
* List IntraFi Exclusions
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const intrafiExclusion of client.intrafiExclusions.list()) {
* // ...
* }
* ```
*/
list(
query: IntrafiExclusionListParams | null | undefined = {},
options?: RequestOptions,
): PagePromise<IntrafiExclusionsPage, IntrafiExclusion> {
return this._client.getAPIList('/intrafi_exclusions', Page<IntrafiExclusion>, { query, ...options });
}
/**
* Archive an IntraFi Exclusion
*
* @example
* ```ts
* const intrafiExclusion =
* await client.intrafiExclusions.archive(
* 'intrafi_exclusion_ygfqduuzpau3jqof6jyh',
* );
* ```
*/
archive(intrafiExclusionID: string, options?: RequestOptions): APIPromise<IntrafiExclusion> {
return this._client.post(path`/intrafi_exclusions/${intrafiExclusionID}/archive`, options);
}
}
export type IntrafiExclusionsPage = Page<IntrafiExclusion>;
/**
* Certain institutions may be excluded per Entity when sweeping funds into the
* IntraFi network. This is useful when an Entity already has deposits at a
* particular bank, and does not want to sweep additional funds to it. It may take
* 5 business days for an exclusion to be processed.
*/
export interface IntrafiExclusion {
/**
* The identifier of this exclusion request.
*/
id: string;
/**
* The name of the excluded institution.
*/
bank_name: string | null;
/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
* the exclusion was created.
*/
created_at: string;
/**
* The entity for which this institution is excluded.
*/
entity_id: string;
/**
* When this was exclusion was confirmed by IntraFi.
*/
excluded_at: string | null;
/**
* The Federal Deposit Insurance Corporation's certificate number for the
* institution.
*/
fdic_certificate_number: string | null;
/**
* The idempotency key you chose for this object. This value is unique across
* Increase and is used to ensure that a request is only processed once. Learn more
* about [idempotency](https://increase.com/documentation/idempotency-keys).
*/
idempotency_key: string | null;
/**
* The status of the exclusion request.
*
* - `pending` - The exclusion is being added to the IntraFi network.
* - `completed` - The exclusion has been added to the IntraFi network.
* - `archived` - The exclusion has been removed from the IntraFi network.
* - `ineligible` - The exclusion wasn't eligible to be added to the IntraFi
* network.
*/
status: 'pending' | 'completed' | 'archived' | 'ineligible';
/**
* When this was exclusion was submitted to IntraFi by Increase.
*/
submitted_at: string | null;
/**
* A constant representing the object's type. For this resource it will always be
* `intrafi_exclusion`.
*/
type: 'intrafi_exclusion';
}
export interface IntrafiExclusionCreateParams {
/**
* The identifier of the Entity whose deposits will be excluded.
*/
entity_id: string;
/**
* The FDIC certificate number of the financial institution to be excluded. An FDIC
* certificate number uniquely identifies a financial institution, and is different
* than a routing number. To find one, we recommend searching by Bank Name using
* the [FDIC's bankfind tool](https://banks.data.fdic.gov/bankfind-suite/bankfind).
*/
fdic_certificate_number: string;
[k: string]: unknown;
}
export interface IntrafiExclusionListParams extends PageParams {
/**
* Filter IntraFi Exclusions for those belonging to the specified Entity.
*/
entity_id?: string;
/**
* Filter records to the one with the specified `idempotency_key` you chose for
* that object. This value is unique across Increase and is used to ensure that a
* request is only processed once. Learn more about
* [idempotency](https://increase.com/documentation/idempotency-keys).
*/
idempotency_key?: string;
}
export declare namespace IntrafiExclusions {
export {
type IntrafiExclusion as IntrafiExclusion,
type IntrafiExclusionsPage as IntrafiExclusionsPage,
type IntrafiExclusionCreateParams as IntrafiExclusionCreateParams,
type IntrafiExclusionListParams as IntrafiExclusionListParams,
};
}