-
Notifications
You must be signed in to change notification settings - Fork 150
/
transactions.ts
53 lines (47 loc) · 946 Bytes
/
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
export interface TransactionsAccount {
accountNumber: string;
balance?: number;
txns: Transaction[];
}
export enum TransactionTypes {
Normal = 'normal',
Installments = 'installments'
}
export enum TransactionStatuses {
Completed = 'completed',
Pending = 'pending'
}
export interface TransactionInstallments {
/**
* the current installment number
*/
number: number;
/**
* the total number of installments
*/
total: number;
}
export interface Transaction {
type: TransactionTypes;
/**
* sometimes called Asmachta
*/
identifier?: string | number;
/**
* ISO date string
*/
date: string;
/**
* ISO date string
*/
processedDate: string;
originalAmount: number;
originalCurrency: string;
chargedAmount: number;
chargedCurrency?: string;
description: string;
memo?: string;
status: TransactionStatuses;
installments?: TransactionInstallments;
category?: string;
}