-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathBillRequest.java
More file actions
35 lines (27 loc) · 953 Bytes
/
BillRequest.java
File metadata and controls
35 lines (27 loc) · 953 Bytes
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
package com.flutterwave.bean;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.math.BigDecimal;
import java.util.Optional;
@Getter
@Setter
@NoArgsConstructor
public class BillRequest extends Shared {
private String biller_name;
private String recurrence;
private String country;
private String customer;
private String type;
private String reference;
public BillRequest(String country, String customer, BigDecimal amount, String type, String reference,
Optional<Recurrence> recurrence, Optional<GhanaAirtimeBills> ghanaAirtimeBills) {
this.country = country;
this.type = type;
this.reference = reference;
this.customer = customer;
this.setAmount(amount);
recurrence.ifPresent(value -> this.recurrence = String.valueOf(value));
ghanaAirtimeBills.ifPresent(s -> this.biller_name = s.name());
}
}