Skip to content

Commit 9d9cc65

Browse files
Deprecate Double to String (#220)
* Deprecate Double to String * Fix unit test * Prepare to release 1.9.7
1 parent f25f391 commit 9d9cc65

13 files changed

+110
-106
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Changelog
22
=========
3+
1.9.7
4+
-------------------
5+
- Deprecate Double to String
6+
-------------------
37
1.9.6
48
-------------------
59
- Added support to CREDIT, PREPAID, FIS, UNKNOWN bank card types.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.hyperwallet</groupId>
66
<artifactId>sdk</artifactId>
7-
<version>1.9.7-SNAPSHOT</version>
7+
<version>1.9.7</version>
88
<packaging>jar</packaging>
99

1010
<name>hyperwallet-java-sdk</name>

src/main/java/com/hyperwallet/clientsdk/model/HyperwalletPayment.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class HyperwalletPayment extends HyperwalletBaseMonitor {
1717
private String status;
1818
private String transition;
1919
private Date createdOn;
20-
private Double amount;
20+
private String amount;
2121
private String currency;
2222
private String notes;
2323
private String memo;
@@ -134,16 +134,16 @@ public HyperwalletPayment clearCreatedOn() {
134134
return this;
135135
}
136136

137-
public Double getAmount() {
137+
public String getAmount() {
138138
return amount;
139139
}
140140

141-
public void setAmount(Double amount) {
141+
public void setAmount(String amount) {
142142
addField("amount", amount);
143143
this.amount = amount;
144144
}
145145

146-
public HyperwalletPayment amount(Double amount) {
146+
public HyperwalletPayment amount(String amount) {
147147
addField("amount", amount);
148148
this.amount = amount;
149149
return this;

src/main/java/com/hyperwallet/clientsdk/model/HyperwalletReceipt.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,13 @@ public String key() {
212212

213213
private String destinationToken;
214214

215-
private Double amount;
215+
private String amount;
216216

217-
private Double fee;
217+
private String fee;
218218

219219
private String currency;
220220

221-
private Double foreignExchangeRate;
221+
private String foreignExchangeRate;
222222

223223
private String foreignExchangeCurrency;
224224

@@ -272,19 +272,19 @@ public void setDestinationToken(String destinationToken) {
272272
this.destinationToken = destinationToken;
273273
}
274274

275-
public Double getAmount() {
275+
public String getAmount() {
276276
return amount;
277277
}
278278

279-
public void setAmount(Double amount) {
279+
public void setAmount(String amount) {
280280
this.amount = amount;
281281
}
282282

283-
public Double getFee() {
283+
public String getFee() {
284284
return fee;
285285
}
286286

287-
public void setFee(Double fee) {
287+
public void setFee(String fee) {
288288
this.fee = fee;
289289
}
290290

@@ -296,11 +296,11 @@ public void setCurrency(String currency) {
296296
this.currency = currency;
297297
}
298298

299-
public Double getForeignExchangeRate() {
299+
public String getForeignExchangeRate() {
300300
return foreignExchangeRate;
301301
}
302302

303-
public void setForeignExchangeRate(Double foreignExchangeRate) {
303+
public void setForeignExchangeRate(String foreignExchangeRate) {
304304
this.foreignExchangeRate = foreignExchangeRate;
305305
}
306306

src/main/java/com/hyperwallet/clientsdk/model/HyperwalletTransfer.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ public static enum Status {QUOTED, SCHEDULED, IN_PROGRESS, VERIFICATION_REQUIRED
2222
private Date createdOn;
2323
private String clientTransferId;
2424
private String sourceToken;
25-
private Double sourceAmount;
26-
private Double sourceFeeAmount;
25+
private String sourceAmount;
26+
private String sourceFeeAmount;
2727
private String sourceCurrency;
2828
private String destinationToken;
29-
private Double destinationAmount;
30-
private Double destinationFeeAmount;
29+
private String destinationAmount;
30+
private String destinationFeeAmount;
3131
private String destinationCurrency;
3232
private List<ForeignExchange> foreignExchanges;
3333
private String notes;
@@ -139,16 +139,16 @@ public HyperwalletTransfer clearSourceToken() {
139139
return this;
140140
}
141141

142-
public Double getSourceAmount() {
142+
public String getSourceAmount() {
143143
return sourceAmount;
144144
}
145145

146-
public void setSourceAmount(Double sourceAmount) {
146+
public void setSourceAmount(String sourceAmount) {
147147
addField("sourceAmount", sourceAmount);
148148
this.sourceAmount = sourceAmount;
149149
}
150150

151-
public HyperwalletTransfer sourceAmount(Double sourceAmount) {
151+
public HyperwalletTransfer sourceAmount(String sourceAmount) {
152152
addField("sourceAmount", sourceAmount);
153153
this.sourceAmount = sourceAmount;
154154
return this;
@@ -160,16 +160,16 @@ public HyperwalletTransfer clearSourceAmount() {
160160
return this;
161161
}
162162

163-
public Double getSourceFeeAmount() {
163+
public String getSourceFeeAmount() {
164164
return sourceFeeAmount;
165165
}
166166

167-
public void setSourceFeeAmount(Double sourceFeeAmount) {
167+
public void setSourceFeeAmount(String sourceFeeAmount) {
168168
addField("sourceFeeAmount", sourceFeeAmount);
169169
this.sourceFeeAmount = sourceFeeAmount;
170170
}
171171

172-
public HyperwalletTransfer sourceFeeAmount(Double sourceFeeAmount) {
172+
public HyperwalletTransfer sourceFeeAmount(String sourceFeeAmount) {
173173
addField("sourceFeeAmount", sourceFeeAmount);
174174
this.sourceFeeAmount = sourceFeeAmount;
175175
return this;
@@ -223,16 +223,16 @@ public HyperwalletTransfer clearDestinationToken() {
223223
return this;
224224
}
225225

226-
public Double getDestinationAmount() {
226+
public String getDestinationAmount() {
227227
return destinationAmount;
228228
}
229229

230-
public void setDestinationAmount(Double destinationAmount) {
230+
public void setDestinationAmount(String destinationAmount) {
231231
addField("destinationAmount", destinationAmount);
232232
this.destinationAmount = destinationAmount;
233233
}
234234

235-
public HyperwalletTransfer destinationAmount(Double destinationAmount) {
235+
public HyperwalletTransfer destinationAmount(String destinationAmount) {
236236
addField("destinationAmount", destinationAmount);
237237
this.destinationAmount = destinationAmount;
238238
return this;
@@ -244,16 +244,16 @@ public HyperwalletTransfer clearDestinationAmount() {
244244
return this;
245245
}
246246

247-
public Double getDestinationFeeAmount() {
247+
public String getDestinationFeeAmount() {
248248
return destinationFeeAmount;
249249
}
250250

251-
public void setDestinationFeeAmount(Double destinationFeeAmount) {
251+
public void setDestinationFeeAmount(String destinationFeeAmount) {
252252
addField("destinationFeeAmount", destinationFeeAmount);
253253
this.destinationFeeAmount = destinationFeeAmount;
254254
}
255255

256-
public HyperwalletTransfer destinationFeeAmount(Double destinationFeeAmount) {
256+
public HyperwalletTransfer destinationFeeAmount(String destinationFeeAmount) {
257257
addField("destinationFeeAmount", destinationFeeAmount);
258258
this.destinationFeeAmount = destinationFeeAmount;
259259
return this;
@@ -371,17 +371,17 @@ public HyperwalletTransfer clearForeignExchanges() {
371371
}
372372

373373
public static class ForeignExchange {
374-
private Double sourceAmount;
374+
private String sourceAmount;
375375
private String sourceCurrency;
376-
private Double destinationAmount;
376+
private String destinationAmount;
377377
private String destinationCurrency;
378-
private Double rate;
378+
private String rate;
379379

380-
public Double getSourceAmount() {
380+
public String getSourceAmount() {
381381
return sourceAmount;
382382
}
383383

384-
public void setSourceAmount(Double sourceAmount) {
384+
public void setSourceAmount(String sourceAmount) {
385385
this.sourceAmount = sourceAmount;
386386
}
387387

@@ -393,11 +393,11 @@ public void setSourceCurrency(String sourceCurrency) {
393393
this.sourceCurrency = sourceCurrency;
394394
}
395395

396-
public Double getDestinationAmount() {
396+
public String getDestinationAmount() {
397397
return destinationAmount;
398398
}
399399

400-
public void setDestinationAmount(Double destinationAmount) {
400+
public void setDestinationAmount(String destinationAmount) {
401401
this.destinationAmount = destinationAmount;
402402
}
403403

@@ -409,11 +409,11 @@ public void setDestinationCurrency(String destinationCurrency) {
409409
this.destinationCurrency = destinationCurrency;
410410
}
411411

412-
public Double getRate() {
412+
public String getRate() {
413413
return rate;
414414
}
415415

416-
public void setRate(Double rate) {
416+
public void setRate(String rate) {
417417
this.rate = rate;
418418
}
419419
}

src/main/java/com/hyperwallet/clientsdk/model/HyperwalletTransferRefund.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ public static enum Status {PENDING, FAILED, COMPLETED}
2121
private Status status;
2222
private String clientRefundId;
2323
private String sourceToken;
24-
private Double sourceAmount;
24+
private String sourceAmount;
2525
private String sourceCurrency;
2626
private String destinationToken;
27-
private Double destinationAmount;
27+
private String destinationAmount;
2828
private String destinationCurrency;
2929
private List<ForeignExchange> foreignExchanges;
3030
private Date createdOn;
@@ -115,16 +115,16 @@ public HyperwalletTransferRefund clearSourceToken() {
115115
return this;
116116
}
117117

118-
public Double getSourceAmount() {
118+
public String getSourceAmount() {
119119
return sourceAmount;
120120
}
121121

122-
public void setSourceAmount(Double sourceAmount) {
122+
public void setSourceAmount(String sourceAmount) {
123123
addField("sourceAmount", sourceAmount);
124124
this.sourceAmount = sourceAmount;
125125
}
126126

127-
public HyperwalletTransferRefund sourceAmount(Double sourceAmount) {
127+
public HyperwalletTransferRefund sourceAmount(String sourceAmount) {
128128
addField("sourceAmount", sourceAmount);
129129
this.sourceAmount = sourceAmount;
130130
return this;
@@ -178,16 +178,16 @@ public HyperwalletTransferRefund clearDestinationToken() {
178178
return this;
179179
}
180180

181-
public Double getDestinationAmount() {
181+
public String getDestinationAmount() {
182182
return destinationAmount;
183183
}
184184

185-
public void setDestinationAmount(Double destinationAmount) {
185+
public void setDestinationAmount(String destinationAmount) {
186186
addField("destinationAmount", destinationAmount);
187187
this.destinationAmount = destinationAmount;
188188
}
189189

190-
public HyperwalletTransferRefund destinationAmount(Double destinationAmount) {
190+
public HyperwalletTransferRefund destinationAmount(String destinationAmount) {
191191
addField("destinationAmount", destinationAmount);
192192
this.destinationAmount = destinationAmount;
193193
return this;

0 commit comments

Comments
 (0)