-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathOrder.java
More file actions
60 lines (48 loc) · 1.28 KB
/
Order.java
File metadata and controls
60 lines (48 loc) · 1.28 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 Ironhack.com;
import java.math.BigDecimal;
import java.util.List;
public class Order {
private String orderId;
private String customer;
private List<OrderItem> items;
private BigDecimal total;
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
public String getCustomer() {
return customer;
}
public void setCustomer(String customer) {
this.customer = customer;
}
public List<OrderItem> getItems() {
return items;
}
public void setItems(List<OrderItem> items) {
this.items = items;
}
public BigDecimal getTotal() {
return total;
}
public void setTotal(BigDecimal total) {
this.total = total;
}
public Order(String orderId, String customer, List<OrderItem> items, BigDecimal total) {
this.orderId = orderId;
this.customer = customer;
this.items = items;
this.total = total;
}
@Override
public String toString() {
return "Order{" +
"orderId='" + orderId + '\'' +
", customer='" + customer + '\'' +
", items=" + items +
", total=" + total +
'}';
}
}