Skip to content

Commit cda9a84

Browse files
authored
Merge pull request #183 from mwarzybok-sumoheavy/feature/SP-345
SP-345 Move refundRequestEid
2 parents 4567696 + 0683024 commit cda9a84

File tree

4 files changed

+32
-32
lines changed

4 files changed

+32
-32
lines changed

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

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

2323
private String _supportRequest;
2424
private String _currency;
25-
private String refundRequestEid;
2625
private Hashtable<String, Double> _amounts;
2726

2827
/**
@@ -75,24 +74,6 @@ public void setCurrency(String currency) throws BitPayException {
7574
this._currency = currency;
7675
}
7776

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-
9677
/**
9778
* Gets amounts. For a refunded invoice, this object will contain the crypto currency amount refunded by BitPay
9879
* to the consumer (in the selected transactionCurrency) and the equivalent refunded amount from the invoice

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public class RefundInfo {
2020
private String _currency;
2121
private Hashtable<String, Double> _amounts;
2222
private String _reference;
23+
private String refundRequestEid;
2324

2425
/**
2526
* Instantiates a new Refund info.
@@ -116,4 +117,22 @@ public String getReference() {
116117
public void setReference(String reference) {
117118
this._reference = reference;
118119
}
120+
121+
/**
122+
* Gets Refund Request Eid.
123+
*
124+
* @return Refund Request Eid
125+
*/
126+
public String getRefundRequestEid() {
127+
return this.refundRequestEid;
128+
}
129+
130+
/**
131+
* Sets Refund Request Eid.
132+
*
133+
* @param refundRequestEid Refund Request Eid
134+
*/
135+
public void setRefundRequestEid(String refundRequestEid) {
136+
this.refundRequestEid = refundRequestEid;
137+
}
119138
}

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,6 @@ 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-
5340
@Test
5441
public void it_should_not_allow_to_set_invalid_currency() {
5542
Assertions.assertThrows(BitPayException.class, () -> {

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,19 @@ public void it_should_change_reference() {
6262
Assertions.assertEquals(expected, testedClass.getReference());
6363
}
6464

65+
@Test
66+
public void it_should_manipulate_refundRequestEid() {
67+
// given
68+
String expected = "someString";
69+
RefundInfo testedClass = this.getTestedClass();
70+
71+
// when
72+
testedClass.setRefundRequestEid(expected);
73+
74+
// then
75+
Assertions.assertEquals(expected, testedClass.getRefundRequestEid());
76+
}
77+
6578
private RefundInfo getTestedClass() {
6679
return new RefundInfo();
6780
}

0 commit comments

Comments
 (0)