From e8dfe7311178cf580bc86bd9038a23b03326217c Mon Sep 17 00:00:00 2001 From: Gustavo Meyer Date: Thu, 4 Jul 2024 09:08:55 -0700 Subject: [PATCH 1/4] LI-50459 - Update bank card types --- .../com/hyperwallet/clientsdk/model/HyperwalletBankCard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/hyperwallet/clientsdk/model/HyperwalletBankCard.java b/src/main/java/com/hyperwallet/clientsdk/model/HyperwalletBankCard.java index 395167aec..98267b874 100644 --- a/src/main/java/com/hyperwallet/clientsdk/model/HyperwalletBankCard.java +++ b/src/main/java/com/hyperwallet/clientsdk/model/HyperwalletBankCard.java @@ -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; From 71f1970f879554bce75f902e6975c9917acb882a Mon Sep 17 00:00:00 2001 From: Gustavo Meyer Date: Thu, 4 Jul 2024 09:53:36 -0700 Subject: [PATCH 2/4] LI-50459 - Add support to git hubaction --- .github/workflows/ci.yml | 91 +++++++++++++++++++ CHANGELOG.md | 6 ++ .../hyperwallet/clientsdk/HyperwalletIT.java | 5 + .../integration/getBankCard-response.json | 2 +- .../integration/listBankCards-response.json | 82 ++++++++++++++++- 5 files changed, 184 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..6d6a2fab0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,91 @@ +name: Java SDK CI + +on: + workflow_dispatch: + push: + branches: + - master + - support/SDK-V3 + - feature/** + - bugfix/** + - dependabot/** + +jobs: + build: + # Compile the project using the predefined JDK versions in the strategy section + runs-on: ubuntu-latest + name: Build - JDK ${{ matrix.java-version }} + + strategy: + fail-fast: false + matrix: + java-version: [ 8 ] + + steps: + - uses: actions/checkout@v3 + + - name: Setup JDK ${{ matrix.java }} + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: ${{ matrix.java-version }} + + - name: Build and Test JDK ${{ matrix.java-version }} + # --batch-mode Run in non-interactive (batch) mode (disables output color) + # --update-snapshots Forces a check for missing releases and updated snapshots on remote repositories + run: mvn --batch-mode --update-snapshots compile + + test: + # Perform the unit and integration tests using the predefined JDK versions in the strategy section + needs: [build] + runs-on: ubuntu-latest + name: Test - JDK ${{ matrix.java-version }} + + strategy: + fail-fast: false + matrix: + java-version: [ 8, 9, 10, 11, 12, 13, 14, 15, 16 ,17, 18 ] + + steps: + - uses: actions/checkout@v3 + + - name: Setup JDK ${{ matrix.java-version }} + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + architecture: x64 + java-version: ${{ matrix.java-version }} + + - name: Run the Maven test phase JDK ${{ matrix.java-version }} + # --batch-mode Run in non-interactive (batch) mode (disables output color) + # --update-snapshots Forces a check for missing releases and updated snapshots on remote repositories + run: mvn --batch-mode --update-snapshots test + + code-coverage: + needs: [ test ] + runs-on: ubuntu-latest + + name: Report code coverage - JDK ${{ matrix.java-version }} + + strategy: + fail-fast: false + matrix: + java-version: [ 8 ] + steps: + - uses: actions/checkout@v3 + + - name: Setup JDK ${{ matrix.java-version }} + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: ${{ matrix.java-version }} + + - name: "Report: Coverage via coveralls.io" + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} + run: | + mvn clean \ + cobertura:cobertura \ + coveralls:report \ + --no-transfer-progress \ + -D repoToken=$COVERALLS_REPO_TOKEN diff --git a/CHANGELOG.md b/CHANGELOG.md index 437520104..06994d595 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/src/test/java/com/hyperwallet/clientsdk/HyperwalletIT.java b/src/test/java/com/hyperwallet/clientsdk/HyperwalletIT.java index 656106890..b5ea35a27 100644 --- a/src/test/java/com/hyperwallet/clientsdk/HyperwalletIT.java +++ b/src/test/java/com/hyperwallet/clientsdk/HyperwalletIT.java @@ -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 diff --git a/src/test/resources/integration/getBankCard-response.json b/src/test/resources/integration/getBankCard-response.json index da5351742..2fe773d01 100644 --- a/src/test/resources/integration/getBankCard-response.json +++ b/src/test/resources/integration/getBankCard-response.json @@ -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" } ] -} \ No newline at end of file +} diff --git a/src/test/resources/integration/listBankCards-response.json b/src/test/resources/integration/listBankCards-response.json index 6f1fbcb27..b2fd71eb6 100644 --- a/src/test/resources/integration/listBankCards-response.json +++ b/src/test/resources/integration/listBankCards-response.json @@ -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": [ @@ -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" } ] -} \ No newline at end of file +} From f02297815c687a907e3890ac817c0bc69deb339d Mon Sep 17 00:00:00 2001 From: Gustavo Meyer Date: Thu, 4 Jul 2024 09:59:28 -0700 Subject: [PATCH 3/4] LI-50459 - Add support to git action --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d6a2fab0..15eb4e47e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: strategy: fail-fast: false matrix: - java-version: [ 8, 9, 10, 11, 12, 13, 14, 15, 16 ,17, 18 ] + java-version: [ 15 ] steps: - uses: actions/checkout@v3 From fa7c608afc593933032c99a25d0938358ed02d3e Mon Sep 17 00:00:00 2001 From: Gustavo Meyer Date: Thu, 4 Jul 2024 10:23:10 -0700 Subject: [PATCH 4/4] LI-50459 - Move CI to another PR --- .github/workflows/ci.yml | 91 ---------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 15eb4e47e..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Java SDK CI - -on: - workflow_dispatch: - push: - branches: - - master - - support/SDK-V3 - - feature/** - - bugfix/** - - dependabot/** - -jobs: - build: - # Compile the project using the predefined JDK versions in the strategy section - runs-on: ubuntu-latest - name: Build - JDK ${{ matrix.java-version }} - - strategy: - fail-fast: false - matrix: - java-version: [ 8 ] - - steps: - - uses: actions/checkout@v3 - - - name: Setup JDK ${{ matrix.java }} - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: ${{ matrix.java-version }} - - - name: Build and Test JDK ${{ matrix.java-version }} - # --batch-mode Run in non-interactive (batch) mode (disables output color) - # --update-snapshots Forces a check for missing releases and updated snapshots on remote repositories - run: mvn --batch-mode --update-snapshots compile - - test: - # Perform the unit and integration tests using the predefined JDK versions in the strategy section - needs: [build] - runs-on: ubuntu-latest - name: Test - JDK ${{ matrix.java-version }} - - strategy: - fail-fast: false - matrix: - java-version: [ 15 ] - - steps: - - uses: actions/checkout@v3 - - - name: Setup JDK ${{ matrix.java-version }} - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - architecture: x64 - java-version: ${{ matrix.java-version }} - - - name: Run the Maven test phase JDK ${{ matrix.java-version }} - # --batch-mode Run in non-interactive (batch) mode (disables output color) - # --update-snapshots Forces a check for missing releases and updated snapshots on remote repositories - run: mvn --batch-mode --update-snapshots test - - code-coverage: - needs: [ test ] - runs-on: ubuntu-latest - - name: Report code coverage - JDK ${{ matrix.java-version }} - - strategy: - fail-fast: false - matrix: - java-version: [ 8 ] - steps: - - uses: actions/checkout@v3 - - - name: Setup JDK ${{ matrix.java-version }} - uses: actions/setup-java@v3 - with: - distribution: 'zulu' - java-version: ${{ matrix.java-version }} - - - name: "Report: Coverage via coveralls.io" - env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} - run: | - mvn clean \ - cobertura:cobertura \ - coveralls:report \ - --no-transfer-progress \ - -D repoToken=$COVERALLS_REPO_TOKEN