Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit ecda693

Browse files
LI-50459 - Added support to CREDIT, PREPAID, FIS, UNKNOWN bank card types.
1 parent 58393ac commit ecda693

File tree

4 files changed

+94
-1
lines changed

4 files changed

+94
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
Changelog
22
=========
3+
2.4.8
4+
-------------------
5+
- Added support to CREDIT, PREPAID, FIS, UNKNOWN bank card types.
6+
2.4.7
7+
-------------------
8+
- Java_jason dependency library bump up
39
2.4.6
410
-------------------
511
- Added support to unclaimed status transition.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class HyperwalletBankCard extends HyperwalletBaseMonitor {
1717

1818
public enum Brand {VISA, MASTERCARD}
1919

20-
public enum CardType {DEBIT}
20+
public enum CardType {DEBIT, CREDIT, PREPAID, FIS, UNKNOWN}
2121

2222
public enum Type {BANK_CARD}
2323

src/test/java/com/hyperwallet/clientsdk/HyperwalletIT.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,13 @@ public void testListBankCard() throws Exception {
664664
assertThat(returnValue.getData().get(0).getCardBrand(), is(equalTo(HyperwalletBankCard.Brand.VISA)));
665665
assertThat(returnValue.getData().get(0).getDateOfExpiry(), is(equalTo(dateFormat.parse("2018-11-01T00:00:00 UTC"))));
666666
assertThat(returnValue.getData().get(0).getCvv(), is(nullValue()));
667+
668+
assertThat(returnValue.getData().get(1).getCardType(), is(equalTo(HyperwalletBankCard.CardType.CREDIT)));
669+
assertThat(returnValue.getData().get(2).getCardType(), is(equalTo(HyperwalletBankCard.CardType.PREPAID)));
670+
assertThat(returnValue.getData().get(3).getCardType(), is(equalTo(HyperwalletBankCard.CardType.FIS)));
671+
assertThat(returnValue.getData().get(4).getCardType(), is(equalTo(HyperwalletBankCard.CardType.UNKNOWN)));
672+
673+
667674
HyperwalletLink actualHyperwalletLink = returnValue.getLinks().get(0);
668675
HyperwalletLink expectedHyperwalletLink = hyperwalletLinks.get(0);
669676
assertThat(actualHyperwalletLink.getHref(), is(equalTo(expectedHyperwalletLink.getHref())));

src/test/resources/integration/listBankCards-response.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,86 @@
2323
"href": "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7e915660-8c97-47bf-8a4f-0c1bc890d46f"
2424
}
2525
]
26+
},
27+
{
28+
"token": "trm-7742f31d-452c-4bf7-8645-c003fa151144",
29+
"type": "BANK_CARD",
30+
"status": "ACTIVATED",
31+
"createdOn": "2017-11-09T23:18:34",
32+
"transferMethodCountry": "US",
33+
"transferMethodCurrency": "USD",
34+
"cardType": "CREDIT",
35+
"cardNumber": "************0113",
36+
"cardBrand": "VISA",
37+
"dateOfExpiry": "2018-12",
38+
"links": [
39+
{
40+
"params": {
41+
"rel": "self"
42+
},
43+
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa151144"
44+
}
45+
]
46+
},
47+
{
48+
"token": "trm-7742f31d-452c-4bf7-8645-c003fa151155",
49+
"type": "BANK_CARD",
50+
"status": "ACTIVATED",
51+
"createdOn": "2017-11-09T23:18:34",
52+
"transferMethodCountry": "US",
53+
"transferMethodCurrency": "USD",
54+
"cardType": "PREPAID",
55+
"cardNumber": "************0114",
56+
"cardBrand": "VISA",
57+
"dateOfExpiry": "2018-12",
58+
"links": [
59+
{
60+
"params": {
61+
"rel": "self"
62+
},
63+
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa151155"
64+
}
65+
]
66+
},
67+
{
68+
"token": "trm-7742f31d-452c-4bf7-8645-c003fa151156",
69+
"type": "BANK_CARD",
70+
"status": "ACTIVATED",
71+
"createdOn": "2017-11-09T23:18:34",
72+
"transferMethodCountry": "US",
73+
"transferMethodCurrency": "USD",
74+
"cardType": "FIS",
75+
"cardNumber": "************0115",
76+
"cardBrand": "VISA",
77+
"dateOfExpiry": "2018-12",
78+
"links": [
79+
{
80+
"params": {
81+
"rel": "self"
82+
},
83+
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa151156"
84+
}
85+
]
86+
},
87+
{
88+
"token": "trm-7742f31d-452c-4bf7-8645-c003fa151177",
89+
"type": "BANK_CARD",
90+
"status": "INVALID",
91+
"createdOn": "2017-11-09T23:18:34",
92+
"transferMethodCountry": "US",
93+
"transferMethodCurrency": "USD",
94+
"cardType": "UNKNOWN",
95+
"cardNumber": "************0144",
96+
"cardBrand": "VISA",
97+
"dateOfExpiry": "2018-12",
98+
"links": [
99+
{
100+
"params": {
101+
"rel": "self"
102+
},
103+
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa151177"
104+
}
105+
]
26106
}
27107
],
28108
"links": [

0 commit comments

Comments
 (0)