Skip to content

Commit 7e7cec3

Browse files
authored
Merge pull request #179 from mwarzybok-sumoheavy/feature/SP-326
SP-326 Update Java SDK with new field for reconciliation report
2 parents 62c7072 + 28fe0ed commit 7e7cec3

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public class RefundInfo {
2222

2323
private String _supportRequest;
2424
private String _currency;
25+
private String refundRequestEid;
2526
private Hashtable<String, Double> _amounts;
2627

2728
/**
@@ -74,6 +75,24 @@ public void setCurrency(String currency) throws BitPayException {
7475
this._currency = currency;
7576
}
7677

78+
/**
79+
* Gets Refund Request Eid.
80+
*
81+
* @return Refund Request Eid
82+
*/
83+
public String getRefundRequestEid() {
84+
return refundRequestEid;
85+
}
86+
87+
/**
88+
* Sets Refund Request Eid.
89+
*
90+
* @param refundRequestEid Refund Request Eid
91+
*/
92+
public void setRefundRequestEid(String refundRequestEid) {
93+
this.refundRequestEid = refundRequestEid;
94+
}
95+
7796
/**
7897
* Gets amounts. For a refunded invoice, this object will contain the crypto currency amount refunded by BitPay
7998
* to the consumer (in the selected transactionCurrency) and the equivalent refunded amount from the invoice

src/test/java/com/bitpay/sdk/model/Invoice/RefundInfoTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,19 @@ public void it_should_manipulate_currency() throws BitPayException {
3737
Assertions.assertEquals(expected, testedClass.getCurrency());
3838
}
3939

40+
@Test
41+
public void it_should_manipulate_refundRequestEid() {
42+
// given
43+
String expected = "someString";
44+
RefundInfo testedClass = this.getTestedClass();
45+
46+
// when
47+
testedClass.setRefundRequestEid(expected);
48+
49+
// then
50+
Assertions.assertEquals(expected, testedClass.getRefundRequestEid());
51+
}
52+
4053
@Test
4154
public void it_should_not_allow_to_set_invalid_currency() {
4255
Assertions.assertThrows(BitPayException.class, () -> {

0 commit comments

Comments
 (0)