Skip to content

Commit 0dcf8de

Browse files
authored
Release Candidate (#57)
Add support for PayPal account endpoint Add support to get user endpoint Changes to GraphQl queries Add support for User and Prepaid Cards receipts
1 parent d019818 commit 0dcf8de

File tree

183 files changed

+13029
-4055
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+13029
-4055
lines changed

CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
Changelog
22
=========
33

4-
1.0.0-beta01
4+
[1.0.0-beta01](https://github.com/hyperwallet/hyperwallet-android-sdk/releases/tag/1.0.0-beta01)
55
-------------------
66
- Initial release
77
* Create Bank Account and Bank Card for United States (USD)
88
* Retrieve field requirements for bank Accounts and Bank Cards
99
* List Accounts
1010
* Deactivate (Remove) Accounts
1111

12-
1.0.0-beta02
12+
[1.0.0-beta02](https://github.com/hyperwallet/hyperwallet-android-sdk/releases/tag/1.0.0-beta02)
1313
-------------------
1414
* Added PayPal as a Transfer method
15-
* Added support to get User object
15+
* Added support to get User object
16+
17+
[1.0.0-beta03](https://github.com/hyperwallet/hyperwallet-android-sdk/releases/tag/1.0.0-beta03)
18+
-------------------
19+
* Added support to list Users and Prepaid Card receipts
20+
* Enhancements to GraphQL queries and data structure

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ We also provide an out-of-the-box [Hyperwallet Android UI SDK](https://github.c
1717
To install Hyperwallet Core SDK, you just need to add the dependency into your build.gradle file in Android Studio (or Gradle). For example:
1818

1919
```bash
20-
api 'com.hyperwallet.android:core-sdk:1.0.0-beta02'
20+
api 'com.hyperwallet.android:core-sdk:1.0.0-beta03'
2121
```
2222

2323
## Initialization
@@ -82,6 +82,17 @@ public class TestAuthenticationProvider implements HyperwalletAuthenticationToke
8282
## Usage
8383
The functions in core SDK are available to use once the authentication is done.
8484

85+
### Using ```createPayPalAccount```
86+
87+
```
88+
final PayPalAccount payPalAccount = new PayPalAccount.Builder()
89+
.transferMethodCountry("US")
90+
.transferMethodCurrency("USD")
91+
92+
.build();
93+
Hyperwallet.getDefault().createPayPalAccount(bankAccount, listener);
94+
```
95+
8596
### Using ```createBankAccount```
8697

8798
```
@@ -140,4 +151,4 @@ Hyperwallet.getDefault().updateBankCard(updatedBankCard, listener);
140151
```
141152

142153
## License
143-
The Hyperwallet Android Core SDK is open source and available under the [MIT](https://github.com/hyperwallet/hyperwallet-android-sdk/blob/master/LICENSE) license.
154+
The Hyperwallet Android Core SDK is open source and available under the [MIT](https://github.com/hyperwallet/hyperwallet-android-sdk/blob/master/LICENSE) license.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ allprojects {
2121
mavenLocal()
2222
}
2323

24-
project.version = "1.0.0-beta02";
24+
project.version = "1.0.0-beta03"
2525
}
2626

2727
task clean(type: Delete) {

core/build.gradle

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android {
1010
defaultConfig {
1111
minSdkVersion 21
1212
targetSdkVersion 28
13-
versionCode 1
13+
versionCode 3
1414
versionName version
1515
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1616
}
@@ -25,26 +25,6 @@ android {
2525
}
2626
}
2727

28-
flavorDimensions "server"
29-
30-
productFlavors {
31-
dev {
32-
33-
}
34-
prod {
35-
36-
}
37-
}
38-
39-
android.variantFilter { variant ->
40-
if (variant.buildType.name.equals('release')
41-
&& variant.getFlavors().get(0).name.equals('debug')) {
42-
variant.setIgnore(true)
43-
}
44-
}
45-
46-
47-
4828
lintOptions {
4929
abortOnError true
5030
warningsAsErrors true
@@ -58,12 +38,12 @@ dependencies {
5838
implementation "androidx.appcompat:appcompat:1.0.2"
5939

6040
testImplementation "junit:junit:4.12"
61-
testImplementation "org.mockito:mockito-core:2.23.4"
62-
testImplementation "org.robolectric:robolectric:4.1"
41+
testImplementation "org.mockito:mockito-core:2.27.0"
42+
testImplementation "org.robolectric:robolectric:4.2"
6343
testImplementation "com.squareup.okhttp3:mockwebserver:3.11.0"
6444
testImplementation group: 'pl.pragmatists', name: 'JUnitParams', version: "1.1.1"
65-
testImplementation group: 'org.hamcrest', name: 'java-hamcrest', version: "2.0.0.0"
66-
45+
testImplementation 'org.hamcrest:hamcrest:2.1'
46+
testImplementation 'org.hamcrest:hamcrest-library:2.1'
6747
}
6848

6949

@@ -151,7 +131,7 @@ publishing {
151131

152132
tasks.withType(Sign) {
153133
onlyIf {
154-
isReleaseVersion && !gradle.taskGraph.hasTask("publishToMavenLocal")
134+
isReleaseVersion && sonatypeUsername?.trim() && sonatypePassword?.trim()
155135
}
156136
}
157137

core/config/jacoco-settings.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ def fileFilter = ['**/R.class',
2929
'**/com/hyperwallet/android/Hyperwallet.class',
3030
'**/com/hyperwallet/android/Hyperwallet$*.class']
3131
def debugClassPaths = [
32-
'**/intermediates/javac/devDebug/*/classes/**'
32+
'**/intermediates/javac/debug/*/classes/**'
3333
]
3434

3535
final def coverageSourceDirs = ["$project.projectDir/src/main/java/*"]
3636

37-
task jacocoTestReport(type: JacocoReport, dependsOn: 'testDevDebugUnitTest') {
37+
task jacocoTestReport(type: JacocoReport, dependsOn: 'testDebugUnitTest') {
3838

3939
group = 'Reporting'
4040
description = 'Generate Jacoco coverage reports.'
@@ -54,7 +54,7 @@ task jacocoTestReport(type: JacocoReport, dependsOn: 'testDevDebugUnitTest') {
5454

5555
additionalSourceDirs.from = files(coverageSourceDirs)
5656
sourceDirectories.from = files(coverageSourceDirs)
57-
executionData.from = files("${buildDir}/jacoco/testDevDebugUnitTest.exec")
57+
executionData.from = files("${buildDir}/jacoco/testDebugUnitTest.exec")
5858
}
5959

6060
task jacocoTestCoverageVerification(type: JacocoCoverageVerification, dependsOn: 'jacocoTestReport') {
@@ -67,7 +67,7 @@ task jacocoTestCoverageVerification(type: JacocoCoverageVerification, dependsOn:
6767
)
6868
additionalSourceDirs.from = files(coverageSourceDirs)
6969
sourceDirectories.from = files(coverageSourceDirs)
70-
executionData.from = files("${buildDir}/jacoco/testDevDebugUnitTest.exec")
70+
executionData.from = files("${buildDir}/jacoco/testDebugUnitTest.exec")
7171

7272
violationRules {
7373
setFailOnViolation(true)

core/config/lint.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<lint>
3-
3+
<issue id="OldTargetApi">
4+
<ignore regexp="(build).gradle"/>
5+
</issue>
6+
<issue id="GradleDependency">
7+
<ignore regexp="(build).gradle"/>
8+
</issue>
49
</lint>

core/src/main/java/com/hyperwallet/android/GqlTransaction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import com.hyperwallet.android.exception.HyperwalletGqlException;
2323
import com.hyperwallet.android.listener.HyperwalletListener;
2424
import com.hyperwallet.android.model.TypeReference;
25-
import com.hyperwallet.android.model.meta.error.GqlErrors;
26-
import com.hyperwallet.android.model.meta.query.HyperwalletGqlQuery;
25+
import com.hyperwallet.android.model.graphql.error.GqlErrors;
26+
import com.hyperwallet.android.model.graphql.query.HyperwalletGqlQuery;
2727
import com.hyperwallet.android.util.HttpClient;
2828
import com.hyperwallet.android.util.HttpMethod;
2929
import com.hyperwallet.android.util.JsonUtils;

core/src/main/java/com/hyperwallet/android/HttpTransaction.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@
3434

3535
public abstract class HttpTransaction implements Runnable {
3636

37+
protected static final String AUTHENTICATION_STRATEGY = "Bearer ";
38+
protected static final String HTTP_HEADER_AUTHORIZATION = "Authorization";
3739
private static final String APPLICATION_JSON = "application/json";
3840
private static final String HTTP_HEADER_ACCEPT_KEY = "Accept";
3941
private static final String HTTP_HEADER_CONTENT_TYPE_KEY = "Content-Type";
40-
protected static final String AUTHENTICATION_STRATEGY = "Bearer ";
41-
protected static final String HTTP_HEADER_AUTHORIZATION = "Authorization";
42-
4342
private Map<String, String> mHeaderMap;
4443
private HyperwalletListener mListener;
4544
private HttpMethod mMethod;
@@ -90,14 +89,14 @@ public HyperwalletListener getListener() {
9089
return mListener;
9190
}
9291

93-
protected void setPayload(String payload) {
94-
mPayload = payload;
95-
}
96-
9792
protected String getPayload() {
9893
return mPayload;
9994
}
10095

96+
protected void setPayload(String payload) {
97+
mPayload = payload;
98+
}
99+
101100
protected String getPath() {
102101
return mPath;
103102
}

0 commit comments

Comments
 (0)