Skip to content

Commit c9ffa15

Browse files
Improve create clients
1 parent 8189435 commit c9ffa15

File tree

7 files changed

+1
-139
lines changed

7 files changed

+1
-139
lines changed

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public class RefundInfo {
2424

2525
private String supportRequest = DEFAULT_NON_SENT_VALUE;
2626
private String currency = DEFAULT_NON_SENT_VALUE;
27-
private String refundRequestEid = DEFAULT_NON_SENT_VALUE;
2827
private Hashtable<String, Double> amounts;
2928

3029
/**
@@ -79,25 +78,6 @@ public void setCurrency(String currency) throws BitPayException {
7978
this.currency = currency;
8079
}
8180

82-
/**
83-
* Gets Refund Request Eid.
84-
*
85-
* @return Refund Request Eid
86-
*/
87-
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
88-
public String getRefundRequestEid() {
89-
return this.refundRequestEid;
90-
}
91-
92-
/**
93-
* Sets Refund Request Eid.
94-
*
95-
* @param refundRequestEid Refund Request Eid
96-
*/
97-
public void setRefundRequestEid(String refundRequestEid) {
98-
this.refundRequestEid = refundRequestEid;
99-
}
100-
10181
/**
10282
* Gets amounts. For a refunded invoice, this object will contain the crypto currency amount refunded by BitPay
10383
* to the consumer (in the selected transactionCurrency) and the equivalent refunded amount from the invoice

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public class InvoiceData {
2525
private String transactionCurrency;
2626
private Float overPaidAmount;
2727
private Map<String, Double> payoutPercentage;
28-
private Float btcPrice;
2928
private RefundInfo refundInfo;
3029

3130
/**
@@ -181,26 +180,6 @@ public void setPayoutPercentage(Map<String, Double> payoutPercentage) {
181180
this.payoutPercentage = payoutPercentage;
182181
}
183182

184-
/**
185-
* Gets btc price.
186-
*
187-
* @return the btc price
188-
*/
189-
@JsonIgnore
190-
public Float getBtcPrice() {
191-
return this.btcPrice;
192-
}
193-
194-
/**
195-
* Sets btc price.
196-
*
197-
* @param btcPrice the btc price
198-
*/
199-
@JsonProperty("btcPrice")
200-
public void setBtcPrice(Float btcPrice) {
201-
this.btcPrice = btcPrice;
202-
}
203-
204183
/**
205184
* Gets amount.
206185
*

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

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ public class RefundInfo {
1919
private String supportRequest;
2020
private String currency;
2121
private Hashtable<String, Double> amounts;
22-
private String reference;
23-
private String refundRequestEid;
2422

2523
/**
2624
* Instantiates a new Refund info.
@@ -91,48 +89,4 @@ public Hashtable<String, Double> getAmount() {
9189
public void setAmount(Hashtable<String, Double> amounts) {
9290
this.amounts = amounts;
9391
}
94-
95-
/**
96-
* Gets reference. Present only if specified in the request to create the refund.
97-
* This is your reference label for this refund.
98-
* It will be passed-through on each response for you to identify the refund in your system.
99-
* Maximum string length is 100 characters.
100-
*
101-
* @return the reference
102-
*/
103-
@JsonIgnore
104-
public String getReference() {
105-
return this.reference;
106-
}
107-
108-
/**
109-
* Sets reference. Present only if specified in the request to create the refund.
110-
* This is your reference label for this refund.
111-
* It will be passed-through on each response for you to identify the refund in your system.
112-
* Maximum string length is 100 characters.
113-
*
114-
* @param reference the reference
115-
*/
116-
@JsonProperty("reference")
117-
public void setReference(String reference) {
118-
this.reference = reference;
119-
}
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-
}
13892
}

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/Ledger/LedgerEntryTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public void it_should_change_timestamp() {
7676
}
7777

7878
@Test
79+
@SuppressWarnings("deprecation")
7980
public void it_should_change_txType() {
8081
// given
8182
String expected = "expectedString";

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,6 @@ public void it_should_change_payoutPercentage() {
103103
Assertions.assertEquals(expected, testedClass.getPayoutPercentage());
104104
}
105105

106-
@Test
107-
public void it_should_change_btcPrice() {
108-
// given
109-
Float expected = 12.34F;
110-
InvoiceData testedClass = this.getTestedClass();
111-
112-
// when
113-
testedClass.setBtcPrice(expected);
114-
115-
// then
116-
Assertions.assertEquals(expected, testedClass.getBtcPrice());
117-
}
118-
119106
@Test
120107
public void it_should_change_refundInfo() {
121108
// given

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

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,32 +49,6 @@ public void it_should_change_amounts() {
4949
Assertions.assertSame(expected, testedClass.getAmount());
5050
}
5151

52-
@Test
53-
public void it_should_change_reference() {
54-
// given
55-
String expected = "expectedString";
56-
RefundInfo testedClass = this.getTestedClass();
57-
58-
// when
59-
testedClass.setReference(expected);
60-
61-
// then
62-
Assertions.assertEquals(expected, testedClass.getReference());
63-
}
64-
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-
7852
private RefundInfo getTestedClass() {
7953
return new RefundInfo();
8054
}

0 commit comments

Comments
 (0)