-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBeneficiary.java
More file actions
60 lines (49 loc) · 1.32 KB
/
Copy pathBeneficiary.java
File metadata and controls
60 lines (49 loc) · 1.32 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
package co.dapi.types;
import java.util.Optional;
public class Beneficiary {
private final String name;
private final String id;
private final BeneficiaryType type;
private final BeneficiaryStatus status;
private final String iban;
private final String accountNumber;
public Beneficiary(String name, String id, BeneficiaryType type, BeneficiaryStatus status, String iban, String accountNumber) {
this.name = name;
this.id = id;
this.type = type;
this.status = status;
this.iban = iban;
this.accountNumber = accountNumber;
}
public String getName() {
return name;
}
public String getId() {
return id;
}
public BeneficiaryType getType() {
return type;
}
public Optional<BeneficiaryStatus> getStatus() {
return Optional.ofNullable(status);
}
public Optional<String> getIban() {
return Optional.ofNullable(iban);
}
public Optional<String> getAccountNumber() {
return Optional.ofNullable(accountNumber);
}
public enum BeneficiaryType {
own,
same,
local,
intl
}
public enum BeneficiaryStatus {
approved,
rejected,
cancelled,
waiting_for_confirmation,
modified_for_pending_approval
}
}