PaymentEntry.java
2.2 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
package fi.insomnia.bortal.verkkomaksutfi;
import java.math.BigDecimal;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import fi.insomnia.bortal.beanutil.DecimalXMLAdapter;
@XmlRootElement(name = "payment")
@XmlAccessorType(XmlAccessType.FIELD)
public class PaymentEntry {
private enum AvailableLocales {
fi_FI, sv_SE, en_US,
}
private UrlSetEntry urlSet;
private OrderDetailsEntry orderDetails;
private String orderNumber = "";
private String currency = "EUR";
private Integer referenceNumber;
private String description;
private AvailableLocales locale = AvailableLocales.fi_FI;
/**
* NOTICE!
*
* Only either price or orderDetails can be set ( other must be null )
*/
@XmlJavaTypeAdapter(DecimalXMLAdapter.class)
private BigDecimal price;
public PaymentEntry(String url) {
setUrlSet(new UrlSetEntry(url));
// setOrderDetails(new OrderDetailsEntry());
}
public PaymentEntry()
{
}
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public UrlSetEntry getUrlSet() {
return urlSet;
}
public void setUrlSet(UrlSetEntry urlSet) {
this.urlSet = urlSet;
}
public OrderDetailsEntry getOrderDetails() {
return orderDetails;
}
public void setOrderDetails(OrderDetailsEntry orderDetails) {
this.orderDetails = orderDetails;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public AvailableLocales getLocale() {
return locale;
}
public void setLocale(AvailableLocales locale) {
this.locale = locale;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public Integer getReferenceNumber() {
return referenceNumber;
}
public void setReferenceNumber(Integer referenceNumber) {
this.referenceNumber = referenceNumber;
}
}