Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Changelog
=========
1.9.6
-------------------
- Added support to CREDIT, PREPAID, FIS, UNKNOWN bank card types.
1.9.5
-------------------
- Added support to unclaimed status transition.
1.9.4
-------------------
- Added attribute 'isDefaultTransferMethod' to identify default accounts.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public class HyperwalletBankCard extends HyperwalletBaseMonitor {

public enum Brand {VISA, MASTERCARD}
public enum CardType {DEBIT}
public enum CardType {DEBIT, CREDIT, PREPAID, FIS, UNKNOWN}
public static enum Type {BANK_CARD}
public static enum Status {ACTIVATED, VERIFIED, INVALID, DE_ACTIVATED}
private Type type;
Expand Down
5 changes: 5 additions & 0 deletions src/test/java/com/hyperwallet/clientsdk/HyperwalletIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,11 @@ public void testListBankCard() throws Exception {
assertThat(returnValue.getData().get(0).getProcessingTime(), is(nullValue()));
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(2).getCardType(), is(equalTo(HyperwalletBankCard.CardType.CREDIT)));
assertThat(returnValue.getData().get(3).getCardType(), is(equalTo(HyperwalletBankCard.CardType.PREPAID)));
assertThat(returnValue.getData().get(4).getCardType(), is(equalTo(HyperwalletBankCard.CardType.FIS)));
assertThat(returnValue.getData().get(5).getCardType(), is(equalTo(HyperwalletBankCard.CardType.UNKNOWN)));
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/integration/getBankCard-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7e915660-8c97-47bf-8a4f-0c1bc890d46f"
}
]
}
}
82 changes: 81 additions & 1 deletion src/test/resources/integration/listBankCards-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,86 @@
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa1511d5"
}
]
},
{
"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 All @@ -52,4 +132,4 @@
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards?offset=0&limit=10"
}
]
}
}