Skip to content

Commit f377438

Browse files
authored
Merge pull request #102 from bobbrodie/SP-48
SP-48 Add new fields to Refund
2 parents 6c75076 + 4c5caea commit f377438

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

src/main/java/com/bitpay/sdk/model/Invoice/Refund.java

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.fasterxml.jackson.annotation.JsonInclude;
66
import com.fasterxml.jackson.annotation.JsonProperty;
77

8+
import java.math.BigDecimal;
89
import java.util.Date;
910

1011
@JsonIgnoreProperties(ignoreUnknown = true)
@@ -21,6 +22,22 @@ public class Refund {
2122
private Double _refundFee;
2223
private Date _lastRefundNotification;
2324

25+
/**
26+
* Amount to be refunded in terms of the transaction currency.
27+
*/
28+
private BigDecimal _transactionAmount;
29+
30+
/**
31+
* The refund fee expressed in terms of transaction currency.
32+
*/
33+
private BigDecimal _transactionRefundFee;
34+
35+
/**
36+
* The currency used for the invoice transaction.
37+
*/
38+
private String _transactionCurrency;
39+
40+
2441
private String _id;
2542
private Date _requestDate;
2643
private String _status;
@@ -150,6 +167,81 @@ public void setStatus(String status) {
150167
this._status = status;
151168
}
152169

170+
/**
171+
* Gets the {@link #_transactionAmount} for a Refund.
172+
*
173+
* @return the transaction amount of the Refund
174+
*
175+
* @see Refund
176+
*/
177+
@JsonProperty("transactionAmount")
178+
public BigDecimal getTransactionAmount() {
179+
return _transactionAmount;
180+
}
181+
182+
/**
183+
* Sets the {@link #_transactionAmount} for a Refund.
184+
*
185+
* @param transactionAmount Amount to be refunded in terms of the transaction currency
186+
*
187+
* @see Refund
188+
*/
189+
@JsonProperty("transactionAmount")
190+
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
191+
public void setTransactionAmount(BigDecimal transactionAmount) {
192+
this._transactionAmount = transactionAmount;
193+
}
194+
195+
/**
196+
* Gets the {@link #_transactionRefundFee} for a Refund.
197+
*
198+
* @return the transaction refund fee of the Refund
199+
*
200+
* @see Refund
201+
*/
202+
@JsonProperty("transactionRefundFee")
203+
public BigDecimal getTransactionRefundFee() {
204+
return _transactionRefundFee;
205+
}
206+
207+
/**
208+
* Sets the {@link #_transactionAmount} for a Refund.
209+
*
210+
* @param transactionRefundFee The refund fee expressed in terms of transaction currency
211+
*
212+
* @see Refund
213+
*/
214+
@JsonProperty("transactionRefundFee")
215+
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
216+
public void setTransactionRefundFee(BigDecimal transactionRefundFee) {
217+
this._transactionRefundFee = transactionRefundFee;
218+
}
219+
220+
/**
221+
* Gets the {@link #_transactionCurrency} for a Refund.
222+
*
223+
* @return the transaction currency of the Refund
224+
*
225+
* @see Refund
226+
*/
227+
@JsonProperty("transactionCurrency")
228+
public String getTransactionCurrency() {
229+
return _transactionCurrency;
230+
}
231+
232+
/**
233+
* Sets the {@link #_transactionCurrency} for a Refund.
234+
*
235+
* @param transactionCurrency The refund fee expressed in terms of transaction currency
236+
*
237+
* @see Refund
238+
*/
239+
@JsonProperty("transactionCurrency")
240+
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
241+
public void setTransactionCurrency(String transactionCurrency) {
242+
this._transactionCurrency = transactionCurrency;
243+
}
244+
153245
@JsonIgnore
154246
public Date getLastRefundNotification() {
155247
return _lastRefundNotification;

0 commit comments

Comments
 (0)