Skip to content

Commit 59d80ec

Browse files
kevmo314ilyamerman
andauthored
use union type for direction (#67)
Co-authored-by: Ilya Merman <[email protected]>
1 parent 6b9df46 commit 59d80ec

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

types/events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ interface TransactionCreated {
177177
attributes: {
178178
createdAt: string
179179
summary: string
180-
direction: string
180+
direction: "Credit" | "Debit"
181181
amount: string
182182
}
183183
relationships: {

types/payments.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface BasePaymentAttributes {
2424
/**
2525
* The direction in which the funds flow (either Debit or Credit).
2626
*/
27-
direction: string
27+
direction: "Credit" | "Debit"
2828

2929
/**
3030
* Payment description (maximum of 10 characters), also known as Company Entry Description, this will show up on statement of the counterparty.
@@ -207,7 +207,7 @@ export interface CreateInlinePaymentRequest {
207207
/**
208208
* The direction in which the funds flow.
209209
*/
210-
direction: string
210+
direction: "Credit" | "Debit"
211211

212212
/**
213213
* The party on the other side of the ACH payment.
@@ -261,7 +261,7 @@ export interface CreateLinkedPaymentRequest {
261261
/**
262262
* The direction in which the funds flow.
263263
*/
264-
direction: string
264+
direction: "Credit" | "Debit"
265265

266266
/**
267267
* Payment description (maximum of 10 characters), also known as Company Entry Description, this will show up on statement of the counterparty.
@@ -314,7 +314,7 @@ export interface CreateVerifiedPaymentRequest {
314314
/**
315315
* The direction in which the funds flow.
316316
*/
317-
direction: string
317+
direction: "Credit" | "Debit"
318318

319319
/**
320320
* Payment description (maximum of 10 characters), also known as Company Entry Description, this will show up on statement of the counterparty.

types/transactions.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface OriginatedAchTransaction {
2828
/**
2929
* The direction in which the funds flow. Common to all transaction types.
3030
*/
31-
direction: string
31+
direction: "Credit" | "Debit"
3232

3333
/**
3434
* The amount (cents) of the transaction. Common to all transaction types.
@@ -107,7 +107,7 @@ export interface ReceivedAchTransaction {
107107
/**
108108
* The direction in which the funds flow. Common to all transaction types.
109109
*/
110-
direction: string
110+
direction: "Credit" | "Debit"
111111

112112
/**
113113
* The amount (cents) of the transaction. Common to all transaction types.
@@ -201,7 +201,7 @@ export interface ReturnedAchTransaction {
201201
/**
202202
* The direction in which the funds flow. Common to all transaction types.
203203
*/
204-
direction: string
204+
direction: "Credit" | "Debit"
205205

206206
/**
207207
* The amount (cents) of the transaction. Common to all transaction types.
@@ -290,7 +290,7 @@ export interface ReturnedReceivedAchTransaction {
290290
/**
291291
* The direction in which the funds flow. Common to all transaction types.
292292
*/
293-
direction: string
293+
direction: "Credit" | "Debit"
294294

295295
/**
296296
* The amount (cents) of the transaction. Common to all transaction types.
@@ -369,7 +369,7 @@ export interface DishonoredAchTransaction {
369369
/**
370370
* The direction in which the funds flow. Common to all transaction types.
371371
*/
372-
direction: string
372+
direction: "Credit" | "Debit"
373373

374374
/**
375375
* The amount (cents) of the transaction. Common to all transaction types.
@@ -463,7 +463,7 @@ export interface BookTransaction {
463463
/**
464464
* The direction in which the funds flow. Common to all transaction types.
465465
*/
466-
direction: string
466+
direction: "Credit" | "Debit"
467467

468468
/**
469469
* The amount (cents) of the transaction. Common to all transaction types.
@@ -542,7 +542,7 @@ export interface PurchaseTransaction {
542542
/**
543543
* The direction in which the funds flow. Common to all transaction types.
544544
*/
545-
direction: string
545+
direction: "Credit" | "Debit"
546546

547547
/**
548548
* The amount (cents) of the transaction. Common to all transaction types.
@@ -655,7 +655,7 @@ export interface AtmTransaction {
655655
/**
656656
* The direction in which the funds flow. Common to all transaction types.
657657
*/
658-
direction: string
658+
direction: "Credit" | "Debit"
659659

660660
/**
661661
* The amount (cents) of the transaction. Common to all transaction types.
@@ -743,7 +743,7 @@ export interface FeeTransaction {
743743
/**
744744
* The direction in which the funds flow. Common to all transaction types.
745745
*/
746-
direction: string
746+
direction: "Credit" | "Debit"
747747

748748
/**
749749
* The amount (cents) of the transaction. Common to all transaction types.
@@ -811,7 +811,7 @@ export interface CardReversalTransaction {
811811
/**
812812
* The direction in which the funds flow. Common to all transaction types.
813813
*/
814-
direction: string
814+
direction: "Credit" | "Debit"
815815

816816
/**
817817
* The amount (cents) of the transaction. Common to all transaction types.
@@ -884,7 +884,7 @@ export interface CardTransaction {
884884
/**
885885
* The direction in which the funds flow. Common to all transaction types.
886886
*/
887-
direction: string
887+
direction: "Credit" | "Debit"
888888

889889
/**
890890
* The amount (cents) of the transaction. Common to all transaction types.
@@ -952,7 +952,7 @@ export interface WireTransaction {
952952
/**
953953
* The direction in which the funds flow. Common to all transaction types.
954954
*/
955-
direction: string
955+
direction: "Credit" | "Debit"
956956

957957
/**
958958
* The amount (cents) of the transaction. Common to all transaction types.
@@ -1122,7 +1122,7 @@ export interface AdjustmentTransaction {
11221122
/**
11231123
* The direction in which the funds flow. Common to all transaction types.
11241124
*/
1125-
direction: string
1125+
direction: "Credit" | "Debit"
11261126

11271127
/**
11281128
* The account balance (cents) after the transaction. Common to all transaction types.
@@ -1180,7 +1180,7 @@ export interface InterestTransaction {
11801180
/**
11811181
* The direction in which the funds flow. Common to all transaction types.
11821182
*/
1183-
direction: string
1183+
direction: "Credit" | "Debit"
11841184

11851185
/**
11861186
* The amount (cents) of the transaction. Common to all transaction types.
@@ -1243,7 +1243,7 @@ export interface DisputeTransaction {
12431243
/**
12441244
* The direction in which the funds flow. Common to all transaction types.
12451245
*/
1246-
direction: string
1246+
direction: "Credit" | "Debit"
12471247

12481248
/**
12491249
* The amount (cents) of the transaction. Common to all transaction types.

0 commit comments

Comments
 (0)