Package co.dapi
Class DapiApp
java.lang.Object
co.dapi.DapiApp
public class DapiApp
extends java.lang.Object
DapiApp represents a client app that's using one or more of the Dapi products.-
Constructor Summary
-
Method Summary
Modifier and Type Method Description CreateBeneficiaryResponsecreateBeneficiary(Payment.BeneficiaryInfo beneficiary, java.lang.String accessToken, java.lang.String userSecret)createBeneficiary talks to the CreateBeneficiary endpoint of Dapi, with thisDapiApp's appSecret.CreateBeneficiaryResponsecreateBeneficiary(Payment.BeneficiaryInfo beneficiary, java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs)createBeneficiary talks to the CreateBeneficiary endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.CreateTransferResponsecreateTransfer(Payment.Transfer transfer, java.lang.String accessToken, java.lang.String userSecret)createTransfer talks to the CreateTransfer endpoint of Dapi, with thisDapiApp's appSecret.CreateTransferResponsecreateTransfer(Payment.Transfer transfer, java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs)createTransfer talks to the CreateTransfer endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.ExchangeTokenResponseexchangeToken(java.lang.String accessCode, java.lang.String connectionID)exchangeToken talks to the ExchangeToken endpoint of Dapi, with thisDapiApp's appSecret.GetAccountsResponsegetAccounts(java.lang.String accessToken, java.lang.String userSecret)getAccounts talks to the GetAccounts endpoint of Dapi, with thisDapiApp's appSecret.GetAccountsResponsegetAccounts(java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs)getAccounts talks to the GetAccounts endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.GetAccountsMetadataResponsegetAccountsMetadata(java.lang.String accessToken, java.lang.String userSecret)getAccountsMetadata talks to the GetAccountsMetadata endpoint of Dapi, with thisDapiApp's appSecret.GetAccountsMetadataResponsegetAccountsMetadata(java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs)getAccountsMetadata talks to the GetAccountsMetadata endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.GetBalanceResponsegetBalance(java.lang.String accountID, java.lang.String accessToken, java.lang.String userSecret)getBalance talks to the GetBalance endpoint of Dapi, with thisDapiApp's appSecret.GetBalanceResponsegetBalance(java.lang.String accountID, java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs)getBalance talks to the GetBalance endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.GetBeneficiariesResponsegetBeneficiaries(java.lang.String accessToken, java.lang.String userSecret)getBeneficiaries talks to the GetBeneficiaries endpoint of Dapi, with thisDapiApp's appSecret.GetBeneficiariesResponsegetBeneficiaries(java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs)getBeneficiaries talks to the GetBeneficiaries endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.GetIdentityResponsegetIdentity(java.lang.String accessToken, java.lang.String userSecret)getIdentity talks to the GetIdentity endpoint of Dapi, with thisDapiApp's appSecret.GetIdentityResponsegetIdentity(java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs)getIdentity talks to the GetIdentity endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.GetTransactionsResponsegetTransactions(java.lang.String accountID, java.time.LocalDate fromDate, java.time.LocalDate toDate, java.lang.String accessToken, java.lang.String userSecret)getTransactions talks to the GetTransactions endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.GetTransactionsResponsegetTransactions(java.lang.String accountID, java.time.LocalDate fromDate, java.time.LocalDate toDate, java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs)getTransactions talks to the GetTransactions endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.okhttp3.ResponsehandleSDKRequest(java.lang.String bodyJson)handleSDKRequest injects thisDapiApp's appSecret in the passed request body, bodyJson, and then forwards the request to Dapi, and returns the RAW response got.okhttp3.ResponsehandleSDKRequest(java.lang.String bodyJson, java.util.HashMap<java.lang.String,java.lang.String> headersMap)handleSDKRequest injects thisDapiApp's appSecret in the passed request body, bodyJson, and then forwards the request to Dapi, with the passed headers, headersMap, and returns the RAW response got.TransferAutoflowResponsetransferAutoflow(Payment.TransferAutoflow transferAutoflow, java.lang.String accessToken, java.lang.String userSecret)transferAutoflow talks to the TransferAutoflow endpoint of Dapi, with thisDapiApp's appSecret.TransferAutoflowResponsetransferAutoflow(Payment.TransferAutoflow transferAutoflow, java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs)transferAutoflow talks to the TransferAutoflow endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
DapiApp
-
-
Method Details
-
exchangeToken
public ExchangeTokenResponse exchangeToken(java.lang.String accessCode, java.lang.String connectionID) throws java.io.IOExceptionexchangeToken talks to the ExchangeToken endpoint of Dapi, with thisDapiApp's appSecret.- Parameters:
accessCode- retrieved from user login.connectionID- retrieved from user login.- Returns:
- an
ExchangeTokenResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
getIdentity
public GetIdentityResponse getIdentity(java.lang.String accessToken, java.lang.String userSecret) throws java.io.IOExceptiongetIdentity talks to the GetIdentity endpoint of Dapi, with thisDapiApp's appSecret.- Parameters:
accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.- Returns:
- a
GetIdentityResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
getIdentity
public GetIdentityResponse getIdentity(java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs) throws java.io.IOExceptiongetIdentity talks to the GetIdentity endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.- Parameters:
accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.operationID- retrieved from the previous call's response.userInputs- built from the previous call's response, and the required user input.- Returns:
- a
GetIdentityResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
getAccounts
public GetAccountsResponse getAccounts(java.lang.String accessToken, java.lang.String userSecret) throws java.io.IOExceptiongetAccounts talks to the GetAccounts endpoint of Dapi, with thisDapiApp's appSecret.- Parameters:
accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.- Returns:
- an
GetAccountsResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
getAccounts
public GetAccountsResponse getAccounts(java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs) throws java.io.IOExceptiongetAccounts talks to the GetAccounts endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.- Parameters:
accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.operationID- retrieved from the previous call's response.userInputs- built from the previous call's response, and the required user input.- Returns:
- an
GetAccountsResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
getBalance
public GetBalanceResponse getBalance(java.lang.String accountID, java.lang.String accessToken, java.lang.String userSecret) throws java.io.IOExceptiongetBalance talks to the GetBalance endpoint of Dapi, with thisDapiApp's appSecret.- Parameters:
accountID- the id of the account which this operation is about.accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.- Returns:
- an
GetBalanceResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
getBalance
public GetBalanceResponse getBalance(java.lang.String accountID, java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs) throws java.io.IOExceptiongetBalance talks to the GetBalance endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.- Parameters:
accountID- the id of the account which this operation is about.accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.operationID- retrieved from the previous call's response.userInputs- built from the previous call's response, and the required user input.- Returns:
- an
GetBalanceResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
getTransactions
public GetTransactionsResponse getTransactions(java.lang.String accountID, java.time.LocalDate fromDate, java.time.LocalDate toDate, java.lang.String accessToken, java.lang.String userSecret) throws java.io.IOExceptiongetTransactions talks to the GetTransactions endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.- Parameters:
accountID- the id of the account which this operation is about.fromDate- the start date of the transactions we want.toDate- the end date of the transactions we want.accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.- Returns:
- an
GetTransactionsResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
getTransactions
public GetTransactionsResponse getTransactions(java.lang.String accountID, java.time.LocalDate fromDate, java.time.LocalDate toDate, java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs) throws java.io.IOExceptiongetTransactions talks to the GetTransactions endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.- Parameters:
accountID- the id of the account which this operation is about.fromDate- the start date of the transactions we want.toDate- the end date of the transactions we want.accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.operationID- retrieved from the previous call's response.userInputs- built from the previous call's response, and the required user input.- Returns:
- an
GetTransactionsResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
createBeneficiary
public CreateBeneficiaryResponse createBeneficiary(Payment.BeneficiaryInfo beneficiary, java.lang.String accessToken, java.lang.String userSecret) throws java.io.IOExceptioncreateBeneficiary talks to the CreateBeneficiary endpoint of Dapi, with thisDapiApp's appSecret.- Parameters:
accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.- Returns:
- an
CreateBeneficiaryResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
createBeneficiary
public CreateBeneficiaryResponse createBeneficiary(Payment.BeneficiaryInfo beneficiary, java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs) throws java.io.IOExceptioncreateBeneficiary talks to the CreateBeneficiary endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.- Parameters:
accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.operationID- retrieved from the previous call's response.userInputs- built from the previous call's response, and the required user input.- Returns:
- an
CreateBeneficiaryResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
getBeneficiaries
public GetBeneficiariesResponse getBeneficiaries(java.lang.String accessToken, java.lang.String userSecret) throws java.io.IOExceptiongetBeneficiaries talks to the GetBeneficiaries endpoint of Dapi, with thisDapiApp's appSecret.- Parameters:
accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.- Returns:
- an
GetBeneficiariesResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
getBeneficiaries
public GetBeneficiariesResponse getBeneficiaries(java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs) throws java.io.IOExceptiongetBeneficiaries talks to the GetBeneficiaries endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.- Parameters:
accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.operationID- retrieved from the previous call's response.userInputs- built from the previous call's response, and the required user input.- Returns:
- an
GetBeneficiariesResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
createTransfer
public CreateTransferResponse createTransfer(Payment.Transfer transfer, java.lang.String accessToken, java.lang.String userSecret) throws java.io.IOExceptioncreateTransfer talks to the CreateTransfer endpoint of Dapi, with thisDapiApp's appSecret.- Parameters:
transfer- the transfer details that we want to initiate.accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.- Returns:
- an
CreateTransferResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
createTransfer
public CreateTransferResponse createTransfer(Payment.Transfer transfer, java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs) throws java.io.IOExceptioncreateTransfer talks to the CreateTransfer endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.- Parameters:
transfer- the transfer details that we want to initiate.accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.operationID- retrieved from the previous call's response.userInputs- built from the previous call's response, and the required user input.- Returns:
- an
CreateTransferResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
transferAutoflow
public TransferAutoflowResponse transferAutoflow(Payment.TransferAutoflow transferAutoflow, java.lang.String accessToken, java.lang.String userSecret) throws java.io.IOExceptiontransferAutoflow talks to the TransferAutoflow endpoint of Dapi, with thisDapiApp's appSecret.- Parameters:
transferAutoflow- the details required to create a TransferAutoflow operation.accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.- Returns:
- an
TransferAutoflowResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
transferAutoflow
public TransferAutoflowResponse transferAutoflow(Payment.TransferAutoflow transferAutoflow, java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs) throws java.io.IOExceptiontransferAutoflow talks to the TransferAutoflow endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.- Parameters:
transferAutoflow- the details required to create a TransferAutoflow operation.accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.operationID- retrieved from the previous call's response.userInputs- built from the previous call's response, and the required user input.- Returns:
- an
TransferAutoflowResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
getAccountsMetadata
public GetAccountsMetadataResponse getAccountsMetadata(java.lang.String accessToken, java.lang.String userSecret) throws java.io.IOExceptiongetAccountsMetadata talks to the GetAccountsMetadata endpoint of Dapi, with thisDapiApp's appSecret.- Parameters:
accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.- Returns:
- an
GetAccountsMetadataResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
getAccountsMetadata
public GetAccountsMetadataResponse getAccountsMetadata(java.lang.String accessToken, java.lang.String userSecret, java.lang.String operationID, UserInput[] userInputs) throws java.io.IOExceptiongetAccountsMetadata talks to the GetAccountsMetadata endpoint of Dapi, with thisDapiApp's appSecret, to continue a previous operation that required to provide some userInputs.- Parameters:
accessToken- retrieved from the ExchangeToken process.userSecret- retrieved from the user login.operationID- retrieved from the previous call's response.userInputs- built from the previous call's response, and the required user input.- Returns:
- an
GetAccountsMetadataResponse. - Throws:
java.io.IOException- in case of trouble happened while executing the request or reading the response.
-
handleSDKRequest
public okhttp3.Response handleSDKRequest(java.lang.String bodyJson, java.util.HashMap<java.lang.String,java.lang.String> headersMap) throws java.io.IOException, com.google.gson.JsonSyntaxExceptionhandleSDKRequest injects thisDapiApp's appSecret in the passed request body, bodyJson, and then forwards the request to Dapi, with the passed headers, headersMap, and returns the RAW response got.- Parameters:
bodyJson- the body of the request, in JSON format.headersMap- any headers that needs to be passed with the request.- Returns:
- an
Responserepresenting the HTTP response of this operation. - Throws:
java.io.IOException- in case of trouble happened while executing the request.com.google.gson.JsonSyntaxException- in case of trouble happened while reading the request body.
-
handleSDKRequest
public okhttp3.Response handleSDKRequest(java.lang.String bodyJson) throws java.io.IOException, com.google.gson.JsonSyntaxExceptionhandleSDKRequest injects thisDapiApp's appSecret in the passed request body, bodyJson, and then forwards the request to Dapi, and returns the RAW response got.- Parameters:
bodyJson- the body of the request, in JSON format.- Returns:
- an
Responserepresenting the HTTP response of this operation. - Throws:
java.io.IOException- in case of trouble happened while executing the request.com.google.gson.JsonSyntaxException- in case of trouble happened while reading the request body.
-