Repository navigation
Expand file tree
/
Copy pathRefund.java
More file actions
161 lines (126 loc) · 3.3 KB
/
Copy pathRefund.java
File metadata and controls
161 lines (126 loc) · 3.3 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
package model;
import java.util.Date;
import com.fasterxml.jackson.annotation.*;
@JsonIgnoreProperties(ignoreUnknown=true)
public class Refund {
private String _guid = "";
private String _token = "";
// _token is used for both the invoice resource token (during the request) and the refund resource token (for the response).
private Double _amount = 0.0;
private String _bitcoinAddress = "";
private String _refundEmail = "";
private String _currency = "";
private String _id;
private Date _requestDate;
private String _status;
private RefundParams _params = new RefundParams();
/*
{
"id":"CWsqDZX3miQH57r1kjXyKw",
"requestDate":"2015-10-23T15:54:44.937Z",
"status":"pending",
"params":{
"guid":"61254802",
"token":"AKJQRv4ugw5invg2Ha4D4oJgNQ47qme6Y6YrHekXuQtSzGqXKyZJJN2BbeCGAHKP7V",
"currency":"USD",
"amount":1,
"bitcoinAddress":"381rUw3naC9HujBPMyVfPoVsnVCeTQz1m8",
"invoiceId":"9Hz86CCoAJWdTHGsB6Bra9"
},
"token":"6a33WsLwD68kGjoGk4NiL2WX8b1ZfGJdB5LBNSJ8z5nJWr6QgtMaGMqJiwUL9B8xzL"
}
*/
public Refund() {}
// API fields
//
@JsonProperty("guid")
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public String getGuid() {
return _guid;
}
@JsonProperty("guid")
public void setGuid(String guid) {
this._guid = guid;
}
@JsonProperty("token")
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public String getToken() {
return _token;
}
@JsonProperty("token")
public void setToken(String token) {
this._token = token;
}
// Request fields
//
@JsonProperty("amount")
public Double getAmount() {
return _amount;
}
@JsonProperty("amount")
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public void setAmount(Double amount) {
this._amount = amount;
}
@JsonProperty("bitcoinAddress")
public String getBitcoinAddress() {
return _bitcoinAddress;
}
@JsonProperty("bitcoinAddress")
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public void setBitcoinAddress(String bitcoinAddress) {
this._bitcoinAddress = bitcoinAddress;
}
@JsonProperty("refundEmail")
public String getRefundEmail() {
return _refundEmail;
}
@JsonProperty("refundEmail")
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public void setRefundEmail(String refundEmail) {
this._refundEmail = refundEmail;
}
@JsonProperty("currency")
public String getCurrency() {
return _currency;
}
@JsonProperty("currency")
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
public void setCurrency(String currency) {
this._currency = currency;
}
// Response fields
//
@JsonIgnore
public String getId() {
return _id;
}
@JsonProperty("id")
public void setId(String id) {
this._id = id;
}
@JsonIgnore
public Date getRequestDate() {
return _requestDate;
}
@JsonProperty("requestDate")
public void setRequestDate(Date requestDate) {
this._requestDate = requestDate;
}
@JsonIgnore
public String getStatus() {
return _status;
}
@JsonProperty("status")
public void setStatus(String status) {
this._status = status;
}
@JsonIgnore
public RefundParams getParams() {
return _params;
}
@JsonProperty("params")
public void setPaymentUrls(RefundParams refundParams) {
this._params = refundParams;
}
}