Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from hyperwallet/feature/HW-66771-V4-BankAccounts
Changes for HW-66771 V4 Bank Accounts
- Loading branch information
Showing
17 changed files
with
597 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
327 changes: 327 additions & 0 deletions
327
src/test/java/com/hyperwallet/clientsdk/HyperwalletIT.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/test/resources/integration/createBankAccount-request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
curl -X "POST" "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-accounts" \ | ||
-u testuser@12345678:myAccPassw0rd \ | ||
-H "Content-Type: application/json" \ | ||
-H "Accept: application/json" \ | ||
-d "{ | ||
"transferMethodCountry": "US", | ||
"transferMethodCurrency": "USD", | ||
"type": "BANK_ACCOUNT", | ||
"branchId": "021000021", | ||
"bankAccountId": "1234", | ||
"bankAccountPurpose": "SAVINGS" | ||
}" |
35 changes: 35 additions & 0 deletions
35
src/test/resources/integration/createBankAccount-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"token": "trm-2bd0b56d-e111-4d12-bd24-d77fc02b9f4f", | ||
"type": "BANK_ACCOUNT", | ||
"status": "ACTIVATED", | ||
"createdOn": "2020-09-08T15:01:07", | ||
"transferMethodCountry": "US", | ||
"transferMethodCurrency": "USD", | ||
"bankName": "JPMORGAN CHASE BANK", | ||
"branchId": "021000021", | ||
"bankAccountId": "1599557466", | ||
"bankAccountPurpose": "SAVINGS", | ||
"userToken": "usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad", | ||
"profileType": "INDIVIDUAL", | ||
"firstName": "firstName", | ||
"lastName": "lastName", | ||
"dateOfBirth": "2000-09-08T15:01:07", | ||
"gender": "MALE", | ||
"phoneNumber": "605-555-1323", | ||
"mobileNumber": "605-555-1323", | ||
"governmentId": "444444444", | ||
"addressLine1": "1234 IndividualAddress St", | ||
"addressLine2": "1234 AddressLineTwo St", | ||
"city": "Test1111", | ||
"stateProvince": "CA", | ||
"country": "US", | ||
"postalCode": "12345", | ||
"links": [ | ||
{ | ||
"params": { | ||
"rel": "self" | ||
}, | ||
"href": "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad/bank-accounts/trm-2bd0b56d-e111-4d12-bd24-d77fc02b9f4f" | ||
} | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
src/test/resources/integration/deactivateBankAccount-request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
curl -X "POST" "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-accounts/trm-d69300ef-5011-486b-bd2e-bfd8b20fef26/status-transitions" \ | ||
-u testuser@12345678:myAccPassw0rd \ | ||
-H "Content-Type: application/json" \ | ||
-H "Accept: application/json" \ | ||
-d "{ | ||
"transition": "DE_ACTIVATED" | ||
}" |
16 changes: 16 additions & 0 deletions
16
src/test/resources/integration/deactivateBankAccount-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"token": "sts-1825afa2-61f1-4860-aa69-a65b9d14f556", | ||
"createdOn": "2017-11-16T00:55:57", | ||
"transition": "DE_ACTIVATED", | ||
"fromStatus": "ACTIVATED", | ||
"toStatus": "DE_ACTIVATED", | ||
"notes": "Closing this account.", | ||
"links": [ | ||
{ | ||
"params": { | ||
"rel": "self" | ||
}, | ||
"href": "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-f695ef43-9614-4e17-9269-902c234616c3/bank-accounts/trm-d69300ef-5011-486b-bd2e-bfd8b20fef26/status-transitions/sts-1825afa2-61f1-4860-aa69-a65b9d14f556" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl -X "GET" "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad/bank-accounts/trm-2bd0b56d-e111-4d12-bd24-d77fc02b9f4f" \ | ||
-u testuser@12345678:myAccPassw0rd \ | ||
-H "Accept: application/json" |
35 changes: 35 additions & 0 deletions
35
src/test/resources/integration/getBankAccount-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"token": "trm-2bd0b56d-e111-4d12-bd24-d77fc02b9f4f", | ||
"type": "BANK_ACCOUNT", | ||
"status": "DE_ACTIVATED", | ||
"createdOn": "2020-09-08T15:01:07", | ||
"transferMethodCountry": "US", | ||
"transferMethodCurrency": "USD", | ||
"bankName": "JPMORGAN CHASE BANK", | ||
"branchId": "021000021", | ||
"bankAccountId": "1599557466", | ||
"bankAccountPurpose": "SAVINGS", | ||
"userToken": "usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad", | ||
"profileType": "INDIVIDUAL", | ||
"firstName": "firstName", | ||
"lastName": "lastName", | ||
"dateOfBirth": "2000-09-08T15:01:07", | ||
"gender": "MALE", | ||
"phoneNumber": "605-555-1323", | ||
"mobileNumber": "605-555-1323", | ||
"governmentId": "444444444", | ||
"addressLine1": "1234 IndividualAddress St", | ||
"addressLine2": "1234 AddressLineTwo St", | ||
"city": "Test1111", | ||
"stateProvince": "CA", | ||
"country": "US", | ||
"postalCode": "12345", | ||
"links": [ | ||
{ | ||
"params": { | ||
"rel": "self" | ||
}, | ||
"href": "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad/bank-accounts/trm-2bd0b56d-e111-4d12-bd24-d77fc02b9f4f" | ||
} | ||
] | ||
} |
3 changes: 3 additions & 0 deletions
3
src/test/resources/integration/listBankAccountStatusTransitions-request.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl -X "GET" "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad/bank-accounts/trm-2bd0b56d-e111-4d12-bd24-d77fc02b9f4f/status-transitions" \ | ||
-u testuser@12345678:myAccPassw0rd \ | ||
-H "Accept: application/json" |
31 changes: 31 additions & 0 deletions
31
src/test/resources/integration/listBankAccountStatusTransitions-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"hasNextPage": false, | ||
"hasPreviousPage": false, | ||
"limit": 100, | ||
"data": [ | ||
{ | ||
"token": "sts-1834b075-ee3c-4c00-b1dc-a517fe8a87ab", | ||
"createdOn": "2020-09-08T15:01:58", | ||
"transition": "DE_ACTIVATED", | ||
"fromStatus": "ACTIVATED", | ||
"toStatus": "DE_ACTIVATED", | ||
"notes": "Deactivating card", | ||
"links": [ | ||
{ | ||
"params": { | ||
"rel": "self" | ||
}, | ||
"href": "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad/bank-accounts/trm-2bd0b56d-e111-4d12-bd24-d77fc02b9f4f/status-transitions/sts-1834b075-ee3c-4c00-b1dc-a517fe8a87ab" | ||
} | ||
] | ||
} | ||
], | ||
"links": [ | ||
{ | ||
"params": { | ||
"rel": "self" | ||
}, | ||
"href": "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad/bank-accounts/trm-2bd0b56d-e111-4d12-bd24-d77fc02b9f4f/status-transitions?limit=100" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
curl -X "GET" "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad/bank-accounts" \ | ||
-u testuser@12345678:myAccPassw0rd \ | ||
-H "Accept: application/json" |
51 changes: 51 additions & 0 deletions
51
src/test/resources/integration/listBankAccounts-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"hasNextPage": false, | ||
"hasPreviousPage": false, | ||
"limit": 100, | ||
"data": [ | ||
{ | ||
"token": "trm-2bd0b56d-e111-4d12-bd24-d77fc02b9f4f", | ||
"type": "BANK_ACCOUNT", | ||
"status": "DE_ACTIVATED", | ||
"verificationStatus": "NOT_REQUIRED", | ||
"createdOn": "2020-09-08T15:01:07", | ||
"transferMethodCountry": "US", | ||
"transferMethodCurrency": "USD", | ||
"bankName": "JPMORGAN CHASE BANK", | ||
"branchId": "021000021", | ||
"bankAccountId": "1599557466", | ||
"bankAccountPurpose": "SAVINGS", | ||
"userToken": "usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad", | ||
"profileType": "INDIVIDUAL", | ||
"firstName": "firstName", | ||
"lastName": "lastName", | ||
"dateOfBirth": "2000-09-08T15:01:07", | ||
"gender": "MALE", | ||
"phoneNumber": "605-555-1323", | ||
"mobileNumber": "605-555-1323", | ||
"governmentId": "444444444", | ||
"addressLine1": "1234 IndividualAddress St", | ||
"addressLine2": "1234 AddressLineTwo St", | ||
"city": "Test1111", | ||
"stateProvince": "CA", | ||
"country": "US", | ||
"postalCode": "12345", | ||
"links": [ | ||
{ | ||
"params": { | ||
"rel": "self" | ||
}, | ||
"href": "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad/bank-accounts/trm-2bd0b56d-e111-4d12-bd24-d77fc02b9f4f" | ||
} | ||
] | ||
} | ||
], | ||
"links": [ | ||
{ | ||
"params": { | ||
"rel": "self" | ||
}, | ||
"href": "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad/bank-accounts?limit=100" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
curl -X "PUT" "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-c4292f1a-866f-4310-a289-b916853939de/bank-accounts/trm-950a3055-e54c-456f-beb2-c6f6d42eddce" \ | ||
-u testuser@12345678:myAccPassw0rd \ | ||
-H "Content-Type: application/json" \ | ||
-H "Accept: application/json" \ | ||
-d "{ | ||
"firstName": "FirstNameChanged" | ||
}" |
35 changes: 35 additions & 0 deletions
35
src/test/resources/integration/updateBankAccount-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"token": "trm-2bd0b56d-e111-4d12-bd24-d77fc02b9f4f", | ||
"type": "BANK_ACCOUNT", | ||
"status": "ACTIVATED", | ||
"createdOn": "2020-09-08T15:01:07", | ||
"transferMethodCountry": "US", | ||
"transferMethodCurrency": "USD", | ||
"bankName": "JPMORGAN CHASE BANK", | ||
"branchId": "021000021", | ||
"bankAccountId": "1599557466", | ||
"bankAccountPurpose": "SAVINGS", | ||
"userToken": "usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad", | ||
"profileType": "INDIVIDUAL", | ||
"firstName": "FirstNameChanged", | ||
"lastName": "lastName", | ||
"dateOfBirth": "2000-09-08T15:01:07", | ||
"gender": "MALE", | ||
"phoneNumber": "605-555-1323", | ||
"mobileNumber": "605-555-1323", | ||
"governmentId": "444444444", | ||
"addressLine1": "1234 IndividualAddress St", | ||
"addressLine2": "1234 AddressLineTwo St", | ||
"city": "Test1111", | ||
"stateProvince": "CA", | ||
"country": "US", | ||
"postalCode": "12345", | ||
"links": [ | ||
{ | ||
"params": { | ||
"rel": "self" | ||
}, | ||
"href": "https://api.sandbox.hyperwallet.com/rest/v4/users/usr-321ad2c1-df3f-4a7a-bce4-3e88416b54ad/bank-accounts/trm-2bd0b56d-e111-4d12-bd24-d77fc02b9f4f" | ||
} | ||
] | ||
} |