Skip to content

Commit

Permalink
LI-50459 - Added support to CREDIT, PREPAID, FIS, UNKNOWN bank card t…
Browse files Browse the repository at this point in the history
…ypes.
  • Loading branch information
grmeyer-hw-dev committed Jul 4, 2024
1 parent 58393ac commit ecda693
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Changelog
=========
2.4.8
-------------------
- Added support to CREDIT, PREPAID, FIS, UNKNOWN bank card types.
2.4.7
-------------------
- Java_jason dependency library bump up
2.4.6
-------------------
- Added support to unclaimed status transition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class HyperwalletBankCard extends HyperwalletBaseMonitor {

public enum Brand {VISA, MASTERCARD}

public enum CardType {DEBIT}
public enum CardType {DEBIT, CREDIT, PREPAID, FIS, UNKNOWN}

public enum Type {BANK_CARD}

Expand Down
7 changes: 7 additions & 0 deletions src/test/java/com/hyperwallet/clientsdk/HyperwalletIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,13 @@ public void testListBankCard() throws Exception {
assertThat(returnValue.getData().get(0).getCardBrand(), is(equalTo(HyperwalletBankCard.Brand.VISA)));
assertThat(returnValue.getData().get(0).getDateOfExpiry(), is(equalTo(dateFormat.parse("2018-11-01T00:00:00 UTC"))));
assertThat(returnValue.getData().get(0).getCvv(), is(nullValue()));

assertThat(returnValue.getData().get(1).getCardType(), is(equalTo(HyperwalletBankCard.CardType.CREDIT)));
assertThat(returnValue.getData().get(2).getCardType(), is(equalTo(HyperwalletBankCard.CardType.PREPAID)));
assertThat(returnValue.getData().get(3).getCardType(), is(equalTo(HyperwalletBankCard.CardType.FIS)));
assertThat(returnValue.getData().get(4).getCardType(), is(equalTo(HyperwalletBankCard.CardType.UNKNOWN)));


HyperwalletLink actualHyperwalletLink = returnValue.getLinks().get(0);
HyperwalletLink expectedHyperwalletLink = hyperwalletLinks.get(0);
assertThat(actualHyperwalletLink.getHref(), is(equalTo(expectedHyperwalletLink.getHref())));
Expand Down
80 changes: 80 additions & 0 deletions src/test/resources/integration/listBankCards-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,86 @@
"href": "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7e915660-8c97-47bf-8a4f-0c1bc890d46f"
}
]
},
{
"token": "trm-7742f31d-452c-4bf7-8645-c003fa151144",
"type": "BANK_CARD",
"status": "ACTIVATED",
"createdOn": "2017-11-09T23:18:34",
"transferMethodCountry": "US",
"transferMethodCurrency": "USD",
"cardType": "CREDIT",
"cardNumber": "************0113",
"cardBrand": "VISA",
"dateOfExpiry": "2018-12",
"links": [
{
"params": {
"rel": "self"
},
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa151144"
}
]
},
{
"token": "trm-7742f31d-452c-4bf7-8645-c003fa151155",
"type": "BANK_CARD",
"status": "ACTIVATED",
"createdOn": "2017-11-09T23:18:34",
"transferMethodCountry": "US",
"transferMethodCurrency": "USD",
"cardType": "PREPAID",
"cardNumber": "************0114",
"cardBrand": "VISA",
"dateOfExpiry": "2018-12",
"links": [
{
"params": {
"rel": "self"
},
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa151155"
}
]
},
{
"token": "trm-7742f31d-452c-4bf7-8645-c003fa151156",
"type": "BANK_CARD",
"status": "ACTIVATED",
"createdOn": "2017-11-09T23:18:34",
"transferMethodCountry": "US",
"transferMethodCurrency": "USD",
"cardType": "FIS",
"cardNumber": "************0115",
"cardBrand": "VISA",
"dateOfExpiry": "2018-12",
"links": [
{
"params": {
"rel": "self"
},
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa151156"
}
]
},
{
"token": "trm-7742f31d-452c-4bf7-8645-c003fa151177",
"type": "BANK_CARD",
"status": "INVALID",
"createdOn": "2017-11-09T23:18:34",
"transferMethodCountry": "US",
"transferMethodCurrency": "USD",
"cardType": "UNKNOWN",
"cardNumber": "************0144",
"cardBrand": "VISA",
"dateOfExpiry": "2018-12",
"links": [
{
"params": {
"rel": "self"
},
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa151177"
}
]
}
],
"links": [
Expand Down

0 comments on commit ecda693

Please sign in to comment.