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

Commit 71f1970

Browse files
LI-50459 - Add support to git hubaction
1 parent e8dfe73 commit 71f1970

File tree

5 files changed

+184
-2
lines changed

5 files changed

+184
-2
lines changed

.github/workflows/ci.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Java SDK CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
- support/SDK-V3
9+
- feature/**
10+
- bugfix/**
11+
- dependabot/**
12+
13+
jobs:
14+
build:
15+
# Compile the project using the predefined JDK versions in the strategy section
16+
runs-on: ubuntu-latest
17+
name: Build - JDK ${{ matrix.java-version }}
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
java-version: [ 8 ]
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- name: Setup JDK ${{ matrix.java }}
28+
uses: actions/setup-java@v3
29+
with:
30+
distribution: 'zulu'
31+
java-version: ${{ matrix.java-version }}
32+
33+
- name: Build and Test JDK ${{ matrix.java-version }}
34+
# --batch-mode Run in non-interactive (batch) mode (disables output color)
35+
# --update-snapshots Forces a check for missing releases and updated snapshots on remote repositories
36+
run: mvn --batch-mode --update-snapshots compile
37+
38+
test:
39+
# Perform the unit and integration tests using the predefined JDK versions in the strategy section
40+
needs: [build]
41+
runs-on: ubuntu-latest
42+
name: Test - JDK ${{ matrix.java-version }}
43+
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
java-version: [ 8, 9, 10, 11, 12, 13, 14, 15, 16 ,17, 18 ]
48+
49+
steps:
50+
- uses: actions/checkout@v3
51+
52+
- name: Setup JDK ${{ matrix.java-version }}
53+
uses: actions/setup-java@v3
54+
with:
55+
distribution: 'zulu'
56+
architecture: x64
57+
java-version: ${{ matrix.java-version }}
58+
59+
- name: Run the Maven test phase JDK ${{ matrix.java-version }}
60+
# --batch-mode Run in non-interactive (batch) mode (disables output color)
61+
# --update-snapshots Forces a check for missing releases and updated snapshots on remote repositories
62+
run: mvn --batch-mode --update-snapshots test
63+
64+
code-coverage:
65+
needs: [ test ]
66+
runs-on: ubuntu-latest
67+
68+
name: Report code coverage - JDK ${{ matrix.java-version }}
69+
70+
strategy:
71+
fail-fast: false
72+
matrix:
73+
java-version: [ 8 ]
74+
steps:
75+
- uses: actions/checkout@v3
76+
77+
- name: Setup JDK ${{ matrix.java-version }}
78+
uses: actions/setup-java@v3
79+
with:
80+
distribution: 'zulu'
81+
java-version: ${{ matrix.java-version }}
82+
83+
- name: "Report: Coverage via coveralls.io"
84+
env:
85+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
86+
run: |
87+
mvn clean \
88+
cobertura:cobertura \
89+
coveralls:report \
90+
--no-transfer-progress \
91+
-D repoToken=$COVERALLS_REPO_TOKEN

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
Changelog
22
=========
3+
1.9.6
4+
-------------------
5+
- Added support to CREDIT, PREPAID, FIS, UNKNOWN bank card types.
6+
1.9.5
7+
-------------------
8+
- Added support to unclaimed status transition.
39
1.9.4
410
-------------------
511
- Added attribute 'isDefaultTransferMethod' to identify default accounts.

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,11 @@ public void testListBankCard() throws Exception {
463463
assertThat(returnValue.getData().get(0).getProcessingTime(), is(nullValue()));
464464
assertThat(returnValue.getData().get(0).getDateOfExpiry(), is(equalTo(dateFormat.parse("2018-11-01T00:00:00 UTC"))));
465465
assertThat(returnValue.getData().get(0).getCvv(), is(nullValue()));
466+
467+
assertThat(returnValue.getData().get(2).getCardType(), is(equalTo(HyperwalletBankCard.CardType.CREDIT)));
468+
assertThat(returnValue.getData().get(3).getCardType(), is(equalTo(HyperwalletBankCard.CardType.PREPAID)));
469+
assertThat(returnValue.getData().get(4).getCardType(), is(equalTo(HyperwalletBankCard.CardType.FIS)));
470+
assertThat(returnValue.getData().get(5).getCardType(), is(equalTo(HyperwalletBankCard.CardType.UNKNOWN)));
466471
}
467472

468473
@Test

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7e915660-8c97-47bf-8a4f-0c1bc890d46f"
1818
}
1919
]
20-
}
20+
}

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

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,86 @@
4242
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa1511d5"
4343
}
4444
]
45+
},
46+
{
47+
"token": "trm-7742f31d-452c-4bf7-8645-c003fa151144",
48+
"type": "BANK_CARD",
49+
"status": "ACTIVATED",
50+
"createdOn": "2017-11-09T23:18:34",
51+
"transferMethodCountry": "US",
52+
"transferMethodCurrency": "USD",
53+
"cardType": "CREDIT",
54+
"cardNumber": "************0113",
55+
"cardBrand": "VISA",
56+
"dateOfExpiry": "2018-12",
57+
"links": [
58+
{
59+
"params": {
60+
"rel": "self"
61+
},
62+
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa151144"
63+
}
64+
]
65+
},
66+
{
67+
"token": "trm-7742f31d-452c-4bf7-8645-c003fa151155",
68+
"type": "BANK_CARD",
69+
"status": "ACTIVATED",
70+
"createdOn": "2017-11-09T23:18:34",
71+
"transferMethodCountry": "US",
72+
"transferMethodCurrency": "USD",
73+
"cardType": "PREPAID",
74+
"cardNumber": "************0114",
75+
"cardBrand": "VISA",
76+
"dateOfExpiry": "2018-12",
77+
"links": [
78+
{
79+
"params": {
80+
"rel": "self"
81+
},
82+
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa151155"
83+
}
84+
]
85+
},
86+
{
87+
"token": "trm-7742f31d-452c-4bf7-8645-c003fa151156",
88+
"type": "BANK_CARD",
89+
"status": "ACTIVATED",
90+
"createdOn": "2017-11-09T23:18:34",
91+
"transferMethodCountry": "US",
92+
"transferMethodCurrency": "USD",
93+
"cardType": "FIS",
94+
"cardNumber": "************0115",
95+
"cardBrand": "VISA",
96+
"dateOfExpiry": "2018-12",
97+
"links": [
98+
{
99+
"params": {
100+
"rel": "self"
101+
},
102+
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa151156"
103+
}
104+
]
105+
},
106+
{
107+
"token": "trm-7742f31d-452c-4bf7-8645-c003fa151177",
108+
"type": "BANK_CARD",
109+
"status": "INVALID",
110+
"createdOn": "2017-11-09T23:18:34",
111+
"transferMethodCountry": "US",
112+
"transferMethodCurrency": "USD",
113+
"cardType": "UNKNOWN",
114+
"cardNumber": "************0144",
115+
"cardBrand": "VISA",
116+
"dateOfExpiry": "2018-12",
117+
"links": [
118+
{
119+
"params": {
120+
"rel": "self"
121+
},
122+
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards/trm-7742f31d-452c-4bf7-8645-c003fa151177"
123+
}
124+
]
45125
}
46126
],
47127
"links": [
@@ -52,4 +132,4 @@
52132
"href": "https://api.sandbox.hyperwallet.com/rest/v3/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-cards?offset=0&limit=10"
53133
}
54134
]
55-
}
135+
}

0 commit comments

Comments
 (0)