-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathEnrichedTransaction.java
More file actions
80 lines (65 loc) · 2.04 KB
/
Copy pathEnrichedTransaction.java
File metadata and controls
80 lines (65 loc) · 2.04 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
package co.dapi.types;
import java.util.Optional;
public class EnrichedTransaction {
private final float amount;
private final String date;
private final TransactionType type;
private final String description;
private final String details;
private final Currency currency;
private final Float beforeAmount;
private final Float afterAmount;
private final String reference;
private final String category;
private final BrandDetails brandDetails;
public EnrichedTransaction(float amount, String date, TransactionType type, String description, String details, Currency currency, Float beforeAmount, Float afterAmount, String reference, String category, BrandDetails brandDetails) {
this.amount = amount;
this.date = date;
this.type = type;
this.description = description;
this.details = details;
this.currency = currency;
this.beforeAmount = beforeAmount;
this.afterAmount = afterAmount;
this.reference = reference;
this.category = category;
this.brandDetails = brandDetails;
}
public float getAmount() {
return amount;
}
public String getDate() {
return date;
}
public TransactionType getType() {
return type;
}
public String getDescription() {
return description;
}
public String getDetails() {
return details;
}
public Currency getCurrency() {
return currency;
}
public Optional<Float> getBeforeAmount() {
return Optional.ofNullable(beforeAmount);
}
public Optional<Float> getAfterAmount() {
return Optional.ofNullable(afterAmount);
}
public Optional<String> getReference() {
return Optional.ofNullable(reference);
}
public Optional<String> getCategory() {
return Optional.ofNullable(category);
}
public Optional<BrandDetails> getBrandDetails() {
return Optional.ofNullable(brandDetails);
}
public enum TransactionType {
credit,
debit
}
}