-
Notifications
You must be signed in to change notification settings - Fork 9
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 #59 from ConstantinKV/doc
3.0.3: Partner Consent Revoke feature
- Loading branch information
Showing
22 changed files
with
209 additions
and
24 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
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
Binary file added
BIN
+57.5 KB
repo/com/saltedge/sdk/saltedge-library/3.0.3/saltedge-library-3.0.3-sources.jar
Binary file not shown.
1 change: 1 addition & 0 deletions
1
repo/com/saltedge/sdk/saltedge-library/3.0.3/saltedge-library-3.0.3-sources.jar.md5
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 @@ | ||
a1d08bb255884123b889297e40092a88 |
1 change: 1 addition & 0 deletions
1
repo/com/saltedge/sdk/saltedge-library/3.0.3/saltedge-library-3.0.3-sources.jar.sha1
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 @@ | ||
bb8800ba8cd84f1a3ee7fd4afe000ce529eb5134 |
Binary file added
BIN
+484 KB
repo/com/saltedge/sdk/saltedge-library/3.0.3/saltedge-library-3.0.3.aar
Binary file not shown.
1 change: 1 addition & 0 deletions
1
repo/com/saltedge/sdk/saltedge-library/3.0.3/saltedge-library-3.0.3.aar.md5
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 @@ | ||
dc8648ecfb00bdb3016fb34b6aa23eee |
1 change: 1 addition & 0 deletions
1
repo/com/saltedge/sdk/saltedge-library/3.0.3/saltedge-library-3.0.3.aar.sha1
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 @@ | ||
77e01e0c8043918cc7541b7bd7a85a4e99d0cdb4 |
41 changes: 41 additions & 0 deletions
41
repo/com/saltedge/sdk/saltedge-library/3.0.3/saltedge-library-3.0.3.pom
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,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.saltedge.sdk</groupId> | ||
<artifactId>saltedge-library</artifactId> | ||
<version>3.0.3</version> | ||
<packaging>aar</packaging> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.android.gms</groupId> | ||
<artifactId>play-services-safetynet</artifactId> | ||
<version>17.0.0</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.squareup.retrofit2</groupId> | ||
<artifactId>retrofit</artifactId> | ||
<version>2.5.0</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.squareup.retrofit2</groupId> | ||
<artifactId>converter-gson</artifactId> | ||
<version>2.5.0</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.squareup.okhttp3</groupId> | ||
<artifactId>logging-interceptor</artifactId> | ||
<version>3.12.2</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jetbrains</groupId> | ||
<artifactId>annotations-java5</artifactId> | ||
<version>16.0.3</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
1 change: 1 addition & 0 deletions
1
repo/com/saltedge/sdk/saltedge-library/3.0.3/saltedge-library-3.0.3.pom.md5
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 @@ | ||
ed6e6aa00cf68467943cd6c4fa722d45 |
1 change: 1 addition & 0 deletions
1
repo/com/saltedge/sdk/saltedge-library/3.0.3/saltedge-library-3.0.3.pom.sha1
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 @@ | ||
21ce481ec14b3579a8bbe87f606960193fcba394 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
35dadab2c16515ec18eb4dab93e3cf23 | ||
5f010124ee305fef7947523a72b28887 |
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 |
---|---|---|
@@ -1 +1 @@ | ||
1fac2fad449962c3eec2be614d1a5e81dcf9f046 | ||
b0e4b9055002711f8a5cfc76f065a07e5f339b9f |
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
72 changes: 72 additions & 0 deletions
72
saltedge-library/src/main/java/com/saltedge/sdk/connector/PartnerConsentRevokeConnector.java
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,72 @@ | ||
/* | ||
Copyright © 2019 Salt Edge. https://saltedge.com | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
*/ | ||
package com.saltedge.sdk.connector; | ||
|
||
import com.saltedge.sdk.interfaces.DeleteEntryResult; | ||
import com.saltedge.sdk.model.response.ConsentResponse; | ||
import com.saltedge.sdk.network.SERestClient; | ||
import com.saltedge.sdk.utils.SEErrorTools; | ||
import com.saltedge.sdk.utils.SEJsonTools; | ||
|
||
import retrofit2.Call; | ||
import retrofit2.Callback; | ||
import retrofit2.Response; | ||
|
||
public class PartnerConsentRevokeConnector extends BasePinnedConnector implements Callback<ConsentResponse> { | ||
|
||
private final DeleteEntryResult callback; | ||
private String connectionId; | ||
private String consentId; | ||
|
||
public PartnerConsentRevokeConnector(DeleteEntryResult callback) { | ||
this.callback = callback; | ||
} | ||
|
||
public void revokePartnerConsent(String connectionId, String consentId) { | ||
this.connectionId = connectionId; | ||
this.consentId = consentId; | ||
checkAndLoadPinsOrDoRequest(); | ||
} | ||
|
||
@Override | ||
void enqueueCall() { | ||
SERestClient.getInstance().service.revokePartnerConsent(connectionId, consentId).enqueue(this); | ||
} | ||
|
||
@Override | ||
void onFailure(String errorMessage) { | ||
if (callback != null) callback.onFailure(errorMessage); | ||
} | ||
|
||
@Override | ||
public void onResponse(Call<ConsentResponse> call, Response<ConsentResponse> response) { | ||
ConsentResponse responseBody = response.body(); | ||
if (response.isSuccessful() && responseBody != null && responseBody.getData() != null) { | ||
callback.onSuccess(responseBody.getData().getRevokedAt() != null, consentId); | ||
} else onFailure(SEJsonTools.getErrorMessage(response.errorBody())); | ||
} | ||
|
||
@Override | ||
public void onFailure(Call<ConsentResponse> call, Throwable t) { | ||
onFailure(SEErrorTools.processConnectionError(t)); | ||
} | ||
} |
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
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