forked from Increase/increase-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinbound-wire-transfers.ts
More file actions
237 lines (200 loc) · 6.49 KB
/
inbound-wire-transfers.ts
File metadata and controls
237 lines (200 loc) · 6.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../resource';
import { isRequestOptions } from '../core';
import * as Core from '../core';
import * as InboundWireTransfersAPI from './inbound-wire-transfers';
import { Page, type PageParams } from '../pagination';
export class InboundWireTransfers extends APIResource {
/**
* Retrieve an Inbound Wire Transfer
*/
retrieve(
inboundWireTransferId: string,
options?: Core.RequestOptions,
): Core.APIPromise<InboundWireTransfer> {
return this._client.get(`/inbound_wire_transfers/${inboundWireTransferId}`, options);
}
/**
* List Inbound Wire Transfers
*/
list(
query?: InboundWireTransferListParams,
options?: Core.RequestOptions,
): Core.PagePromise<InboundWireTransfersPage, InboundWireTransfer>;
list(options?: Core.RequestOptions): Core.PagePromise<InboundWireTransfersPage, InboundWireTransfer>;
list(
query: InboundWireTransferListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.PagePromise<InboundWireTransfersPage, InboundWireTransfer> {
if (isRequestOptions(query)) {
return this.list({}, query);
}
return this._client.getAPIList('/inbound_wire_transfers', InboundWireTransfersPage, {
query,
...options,
});
}
}
export class InboundWireTransfersPage extends Page<InboundWireTransfer> {}
/**
* An Inbound Wire Transfer is a wire transfer initiated outside of Increase to
* your account.
*/
export interface InboundWireTransfer {
/**
* The inbound wire transfer's identifier.
*/
id: string;
/**
* The Account to which the transfer belongs.
*/
account_id: string;
/**
* The identifier of the Account Number to which this transfer was sent.
*/
account_number_id: string;
/**
* The amount in USD cents.
*/
amount: number;
/**
* A free-form address field set by the sender.
*/
beneficiary_address_line1: string | null;
/**
* A free-form address field set by the sender.
*/
beneficiary_address_line2: string | null;
/**
* A free-form address field set by the sender.
*/
beneficiary_address_line3: string | null;
/**
* A name set by the sender.
*/
beneficiary_name: string | null;
/**
* A free-form reference string set by the sender, to help identify the transfer.
*/
beneficiary_reference: string | null;
/**
* An Increase-constructed description of the transfer.
*/
description: string;
/**
* A unique identifier available to the originating and receiving banks, commonly
* abbreviated as IMAD. It is created when the wire is submitted to the Fedwire
* service and is helpful when debugging wires with the originating bank.
*/
input_message_accountability_data: string | null;
/**
* The address of the wire originator, set by the sending bank.
*/
originator_address_line1: string | null;
/**
* The address of the wire originator, set by the sending bank.
*/
originator_address_line2: string | null;
/**
* The address of the wire originator, set by the sending bank.
*/
originator_address_line3: string | null;
/**
* The originator of the wire, set by the sending bank.
*/
originator_name: string | null;
/**
* The American Banking Association (ABA) routing number of the bank originating
* the transfer.
*/
originator_routing_number: string | null;
/**
* An Increase-created concatenation of the Originator-to-Beneficiary lines.
*/
originator_to_beneficiary_information: string | null;
/**
* A free-form message set by the wire originator.
*/
originator_to_beneficiary_information_line1: string | null;
/**
* A free-form message set by the wire originator.
*/
originator_to_beneficiary_information_line2: string | null;
/**
* A free-form message set by the wire originator.
*/
originator_to_beneficiary_information_line3: string | null;
/**
* A free-form message set by the wire originator.
*/
originator_to_beneficiary_information_line4: string | null;
/**
* The sending bank's reference number for the wire transfer.
*/
sender_reference: string | null;
/**
* The status of the transfer.
*
* - `pending` - The Inbound Wire Transfer is awaiting action, will transition
* automatically if no action is taken.
* - `accepted` - The Inbound Wire Transfer is accepted.
* - `declined` - The Inbound Wire Transfer was declined.
* - `reversed` - The Inbound Wire Transfer was reversed.
*/
status: 'pending' | 'accepted' | 'declined' | 'reversed';
/**
* A constant representing the object's type. For this resource it will always be
* `inbound_wire_transfer`.
*/
type: 'inbound_wire_transfer';
}
export interface InboundWireTransferListParams extends PageParams {
/**
* Filter Inbound Wire Tranfers to ones belonging to the specified Account.
*/
account_id?: string;
/**
* Filter Inbound Wire Tranfers to ones belonging to the specified Account Number.
*/
account_number_id?: string;
created_at?: InboundWireTransferListParams.CreatedAt;
/**
* Filter Inbound Wire Transfers to those with the specified status.
*
* - `pending` - The Inbound Wire Transfer is awaiting action, will transition
* automatically if no action is taken.
* - `accepted` - The Inbound Wire Transfer is accepted.
* - `declined` - The Inbound Wire Transfer was declined.
* - `reversed` - The Inbound Wire Transfer was reversed.
*/
status?: 'pending' | 'accepted' | 'declined' | 'reversed';
}
export namespace InboundWireTransferListParams {
export interface CreatedAt {
/**
* Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
* timestamp.
*/
after?: string;
/**
* Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
* timestamp.
*/
before?: string;
/**
* Return results on or after this
* [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
*/
on_or_after?: string;
/**
* Return results on or before this
* [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
*/
on_or_before?: string;
}
}
export namespace InboundWireTransfers {
export import InboundWireTransfer = InboundWireTransfersAPI.InboundWireTransfer;
export import InboundWireTransfersPage = InboundWireTransfersAPI.InboundWireTransfersPage;
export import InboundWireTransferListParams = InboundWireTransfersAPI.InboundWireTransferListParams;
}