-
Notifications
You must be signed in to change notification settings - Fork 5
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 #15 from processout/apm-token
Apm: add support for makeAPMToken method
- Loading branch information
Showing
7 changed files
with
208 additions
and
52 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
55 changes: 55 additions & 0 deletions
55
processout-sdk/src/main/java/com/processout/processout_sdk/APMTokenReturn.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,55 @@ | ||
package com.processout.processout_sdk; | ||
|
||
import android.support.annotation.NonNull; | ||
|
||
import com.processout.processout_sdk.ProcessOutExceptions.ProcessOutException; | ||
|
||
public class APMTokenReturn { | ||
|
||
public enum APMReturnType { | ||
Authorization, | ||
TokenCreation | ||
} | ||
|
||
private String token; | ||
private String tokenId; | ||
private String customerId; | ||
private APMReturnType type; | ||
private ProcessOutException error; | ||
|
||
public APMTokenReturn(@NonNull String token, @NonNull String customerId, @NonNull String tokenId) { | ||
this.token = token; | ||
this.tokenId = tokenId; | ||
this.customerId = customerId; | ||
this.type = APMReturnType.TokenCreation; | ||
} | ||
|
||
public APMTokenReturn(@NonNull String token) { | ||
this.token = token; | ||
this.type = APMReturnType.Authorization; | ||
} | ||
|
||
public APMTokenReturn(ProcessOutException error) { | ||
this.error = error; | ||
} | ||
|
||
public ProcessOutException getError() { | ||
return error; | ||
} | ||
|
||
public String getToken() { | ||
return token; | ||
} | ||
|
||
public String getTokenId() { | ||
return tokenId; | ||
} | ||
|
||
public String getCustomerId() { | ||
return customerId; | ||
} | ||
|
||
public APMReturnType getType() { | ||
return type; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...-sdk/src/main/java/com/processout/processout_sdk/FetchGatewaysConfigurationsCallback.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,9 @@ | ||
package com.processout.processout_sdk; | ||
|
||
import java.util.ArrayList; | ||
|
||
public interface FetchGatewaysConfigurationsCallback { | ||
void onSuccess(ArrayList<GatewayConfiguration> gateways); | ||
|
||
void onError(Exception e); | ||
} |
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
9 changes: 0 additions & 9 deletions
9
...ssout-sdk/src/main/java/com/processout/processout_sdk/ListAlternativeMethodsCallback.java
This file was deleted.
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