Skip to content

Commit

Permalink
add helper methods to get keys from ebs response
Browse files Browse the repository at this point in the history
  • Loading branch information
adonese committed Jul 21, 2022
1 parent 1ac700a commit 84638c7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/src/main/java/com/tuti/api/data/TutiResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import com.google.gson.annotations.SerializedName;
import com.tuti.api.ebs.EBSResponse;

/**
* TutiResponse class the encapsulates all noebs responses. Reference class to get
* values for about any field
*/
public class TutiResponse {
private String message;
private String code;
Expand All @@ -11,6 +15,19 @@ public String getStatus() {
return status;
}

// get EBS public key for IPIN generation
public String getiPINKey() {
return this.getEbsResponse().getPubKeyValue();
}

/**
* get EBS public key for encryption (used throughout the code to encrypt all transactions except for IPIN generation. Check {@link #getiPINKey()} instead
*/
public String getKey() {
return this.getEbsResponse().getPubKeyValue();
}


public void setStatus(String status) {
this.status = status;
}
Expand Down

0 comments on commit 84638c7

Please sign in to comment.