io.trippay.sdk.payment.api.AccountApi Maven / Gradle / Ivy
Show all versions of payment-sdk-java Show documentation
package io.trippay.sdk.payment.api;
import io.trippay.sdk.payment.invoker.ApiClient;
import io.trippay.sdk.payment.model.Account;
import io.trippay.sdk.payment.model.AccountStatusResponse;
import io.trippay.sdk.payment.model.CreateAccountRequest;
import io.trippay.sdk.payment.model.KeyValuePair;
import io.trippay.sdk.payment.model.RemoveEntryResponse;
import io.trippay.sdk.payment.model.SetTaxIdentifierRequest;
import io.trippay.sdk.payment.model.UniqueResult;
import io.trippay.sdk.payment.model.UpsertAccountRequest;
import io.trippay.sdk.payment.model.UpsertBankAccountRequest;
import io.trippay.sdk.payment.model.VerifyAccountRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.web.reactive.function.client.WebClient.ResponseSpec;
import org.springframework.web.reactive.function.client.WebClientResponseException;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Flux;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-08-12T10:13:49.239999511+07:00[Asia/Bangkok]")
public class AccountApi {
private ApiClient apiClient;
public AccountApi() {
this(new ApiClient());
}
@Autowired
public AccountApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Check Account Status
* Returns account status about whether this account has been verified and whether it is active.
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return AccountStatusResponse
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec checkAccountStatusRequestCreation(String id, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new WebClientResponseException("Missing the required parameter 'id' when calling checkAccountStatus", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("id", id);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/account/{id}/status", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Check Account Status
* Returns account status about whether this account has been verified and whether it is active.
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return AccountStatusResponse
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono checkAccountStatus(String id, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return checkAccountStatusRequestCreation(id, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Check Account Status
* Returns account status about whether this account has been verified and whether it is active.
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<AccountStatusResponse>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> checkAccountStatusWithHttpInfo(String id, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return checkAccountStatusRequestCreation(id, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Check Account Status
* Returns account status about whether this account has been verified and whether it is active.
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec checkAccountStatusWithResponseSpec(String id, String winkVersion, String accept) throws WebClientResponseException {
return checkAccountStatusRequestCreation(id, winkVersion, accept);
}
/**
* Check External Account Status
* Returns account status about whether this account has been verified and whether it is active.
*
200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return AccountStatusResponse
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec checkExternalAccountStatusRequestCreation(String id, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new WebClientResponseException("Missing the required parameter 'id' when calling checkExternalAccountStatus", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("id", id);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/account/external/{id}/status", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Check External Account Status
* Returns account status about whether this account has been verified and whether it is active.
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return AccountStatusResponse
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono checkExternalAccountStatus(String id, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return checkExternalAccountStatusRequestCreation(id, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Check External Account Status
* Returns account status about whether this account has been verified and whether it is active.
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<AccountStatusResponse>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> checkExternalAccountStatusWithHttpInfo(String id, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return checkExternalAccountStatusRequestCreation(id, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Check External Account Status
* Returns account status about whether this account has been verified and whether it is active.
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec checkExternalAccountStatusWithResponseSpec(String id, String winkVersion, String accept) throws WebClientResponseException {
return checkExternalAccountStatusRequestCreation(id, winkVersion, accept);
}
/**
* Create Account
* Create a new account
*
201 - Created
* @param createAccountRequest The createAccountRequest parameter
* @param winkVersion The winkVersion parameter
* @return Account
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createAccountRequestCreation(CreateAccountRequest createAccountRequest, String winkVersion) throws WebClientResponseException {
Object postBody = createAccountRequest;
// verify the required parameter 'createAccountRequest' is set
if (createAccountRequest == null) {
throw new WebClientResponseException("Missing the required parameter 'createAccountRequest' when calling createAccount", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/account", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create Account
* Create a new account
* 201 - Created
* @param createAccountRequest The createAccountRequest parameter
* @param winkVersion The winkVersion parameter
* @return Account
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createAccount(CreateAccountRequest createAccountRequest, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createAccountRequestCreation(createAccountRequest, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Create Account
* Create a new account
* 201 - Created
* @param createAccountRequest The createAccountRequest parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<Account>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createAccountWithHttpInfo(CreateAccountRequest createAccountRequest, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createAccountRequestCreation(createAccountRequest, winkVersion).toEntity(localVarReturnType);
}
/**
* Create Account
* Create a new account
* 201 - Created
* @param createAccountRequest The createAccountRequest parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createAccountWithResponseSpec(CreateAccountRequest createAccountRequest, String winkVersion) throws WebClientResponseException {
return createAccountRequestCreation(createAccountRequest, winkVersion);
}
/**
* Add Bank Account
* Add a bank account to an existing account using local account identifier
*
200 - OK
* @param id The id parameter
* @param upsertBankAccountRequest The upsertBankAccountRequest parameter
* @param winkVersion The winkVersion parameter
* @return Account
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createAccountBankAccountRequestCreation(String id, UpsertBankAccountRequest upsertBankAccountRequest, String winkVersion) throws WebClientResponseException {
Object postBody = upsertBankAccountRequest;
// verify the required parameter 'id' is set
if (id == null) {
throw new WebClientResponseException("Missing the required parameter 'id' when calling createAccountBankAccount", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertBankAccountRequest' is set
if (upsertBankAccountRequest == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertBankAccountRequest' when calling createAccountBankAccount", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("id", id);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/account/{id}/bankaccount", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Add Bank Account
* Add a bank account to an existing account using local account identifier
* 200 - OK
* @param id The id parameter
* @param upsertBankAccountRequest The upsertBankAccountRequest parameter
* @param winkVersion The winkVersion parameter
* @return Account
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createAccountBankAccount(String id, UpsertBankAccountRequest upsertBankAccountRequest, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createAccountBankAccountRequestCreation(id, upsertBankAccountRequest, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Add Bank Account
* Add a bank account to an existing account using local account identifier
* 200 - OK
* @param id The id parameter
* @param upsertBankAccountRequest The upsertBankAccountRequest parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<Account>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createAccountBankAccountWithHttpInfo(String id, UpsertBankAccountRequest upsertBankAccountRequest, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createAccountBankAccountRequestCreation(id, upsertBankAccountRequest, winkVersion).toEntity(localVarReturnType);
}
/**
* Add Bank Account
* Add a bank account to an existing account using local account identifier
* 200 - OK
* @param id The id parameter
* @param upsertBankAccountRequest The upsertBankAccountRequest parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createAccountBankAccountWithResponseSpec(String id, UpsertBankAccountRequest upsertBankAccountRequest, String winkVersion) throws WebClientResponseException {
return createAccountBankAccountRequestCreation(id, upsertBankAccountRequest, winkVersion);
}
/**
* Add Bank Account to External
* Add a bank account to an existing account using the external account identifier
*
200 - OK
* @param id The id parameter
* @param upsertBankAccountRequest The upsertBankAccountRequest parameter
* @param winkVersion The winkVersion parameter
* @return Account
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createExternalAccountBankAccountRequestCreation(String id, UpsertBankAccountRequest upsertBankAccountRequest, String winkVersion) throws WebClientResponseException {
Object postBody = upsertBankAccountRequest;
// verify the required parameter 'id' is set
if (id == null) {
throw new WebClientResponseException("Missing the required parameter 'id' when calling createExternalAccountBankAccount", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertBankAccountRequest' is set
if (upsertBankAccountRequest == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertBankAccountRequest' when calling createExternalAccountBankAccount", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("id", id);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/account/external/{id}/bankaccount", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Add Bank Account to External
* Add a bank account to an existing account using the external account identifier
* 200 - OK
* @param id The id parameter
* @param upsertBankAccountRequest The upsertBankAccountRequest parameter
* @param winkVersion The winkVersion parameter
* @return Account
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createExternalAccountBankAccount(String id, UpsertBankAccountRequest upsertBankAccountRequest, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createExternalAccountBankAccountRequestCreation(id, upsertBankAccountRequest, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Add Bank Account to External
* Add a bank account to an existing account using the external account identifier
* 200 - OK
* @param id The id parameter
* @param upsertBankAccountRequest The upsertBankAccountRequest parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<Account>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createExternalAccountBankAccountWithHttpInfo(String id, UpsertBankAccountRequest upsertBankAccountRequest, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createExternalAccountBankAccountRequestCreation(id, upsertBankAccountRequest, winkVersion).toEntity(localVarReturnType);
}
/**
* Add Bank Account to External
* Add a bank account to an existing account using the external account identifier
* 200 - OK
* @param id The id parameter
* @param upsertBankAccountRequest The upsertBankAccountRequest parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createExternalAccountBankAccountWithResponseSpec(String id, UpsertBankAccountRequest upsertBankAccountRequest, String winkVersion) throws WebClientResponseException {
return createExternalAccountBankAccountRequestCreation(id, upsertBankAccountRequest, winkVersion);
}
/**
* Delete Account
* Show a specific account
*
200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RemoveEntryResponse
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec deleteAccountRequestCreation(String id, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new WebClientResponseException("Missing the required parameter 'id' when calling deleteAccount", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("id", id);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/account/{id}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Account
* Show a specific account
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RemoveEntryResponse
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono deleteAccount(String id, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return deleteAccountRequestCreation(id, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Delete Account
* Show a specific account
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<RemoveEntryResponse>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> deleteAccountWithHttpInfo(String id, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return deleteAccountRequestCreation(id, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Delete Account
* Show a specific account
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec deleteAccountWithResponseSpec(String id, String winkVersion, String accept) throws WebClientResponseException {
return deleteAccountRequestCreation(id, winkVersion, accept);
}
/**
* Verify Account Name
* Check if account name is unique
*
200 - OK
* @param name The name parameter
* @param identifier The identifier parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return UniqueResult
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec isAccountNameUniqueRequestCreation(String name, String identifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'name' is set
if (name == null) {
throw new WebClientResponseException("Missing the required parameter 'name' when calling isAccountNameUnique", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("name", name);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "identifier", identifier));
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/account/unique/{name}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Verify Account Name
* Check if account name is unique
* 200 - OK
* @param name The name parameter
* @param identifier The identifier parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return UniqueResult
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono isAccountNameUnique(String name, String identifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return isAccountNameUniqueRequestCreation(name, identifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Verify Account Name
* Check if account name is unique
* 200 - OK
* @param name The name parameter
* @param identifier The identifier parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<UniqueResult>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> isAccountNameUniqueWithHttpInfo(String name, String identifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return isAccountNameUniqueRequestCreation(name, identifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Verify Account Name
* Check if account name is unique
* 200 - OK
* @param name The name parameter
* @param identifier The identifier parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec isAccountNameUniqueWithResponseSpec(String name, String identifier, String winkVersion, String accept) throws WebClientResponseException {
return isAccountNameUniqueRequestCreation(name, identifier, winkVersion, accept);
}
/**
* Show Account
* Show a specific account
*
200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return Account
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec loadAccountRequestCreation(String id, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new WebClientResponseException("Missing the required parameter 'id' when calling loadAccount", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("id", id);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/account/{id}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Account
* Show a specific account
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return Account
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono loadAccount(String id, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return loadAccountRequestCreation(id, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Show Account
* Show a specific account
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<Account>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> loadAccountWithHttpInfo(String id, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return loadAccountRequestCreation(id, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Show Account
* Show a specific account
* 200 - OK
* @param id The id parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec loadAccountWithResponseSpec(String id, String winkVersion, String accept) throws WebClientResponseException {
return loadAccountRequestCreation(id, winkVersion, accept);
}
/**
* Show Accounts by Name
* Show accounts matching name
*
200 - OK
* @param name The name parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<Account>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec loadAccountByNameRequestCreation(String name, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'name' is set
if (name == null) {
throw new WebClientResponseException("Missing the required parameter 'name' when calling loadAccountByName", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("name", name);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/account/name/{name}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Accounts by Name
* Show accounts matching name
* 200 - OK
* @param name The name parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<Account>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux loadAccountByName(String name, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return loadAccountByNameRequestCreation(name, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Accounts by Name
* Show accounts matching name
* 200 - OK
* @param name The name parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<Account>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> loadAccountByNameWithHttpInfo(String name, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return loadAccountByNameRequestCreation(name, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Accounts by Name
* Show accounts matching name
* 200 - OK
* @param name The name parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec loadAccountByNameWithResponseSpec(String name, String winkVersion, String accept) throws WebClientResponseException {
return loadAccountByNameRequestCreation(name, winkVersion, accept);
}
/**
* Show Accounts by Name like
* Show accounts matching name that are like...
*
200 - OK
* @param name The name parameter
* @param ignoreCase The ignoreCase parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<Account>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec loadAccountByNameLikeRequestCreation(String name, Boolean ignoreCase, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'name' is set
if (name == null) {
throw new WebClientResponseException("Missing the required parameter 'name' when calling loadAccountByNameLike", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "name", name));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "ignore-case", ignoreCase));
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/account/name", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Accounts by Name like
* Show accounts matching name that are like...
* 200 - OK
* @param name The name parameter
* @param ignoreCase The ignoreCase parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<Account>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux loadAccountByNameLike(String name, Boolean ignoreCase, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return loadAccountByNameLikeRequestCreation(name, ignoreCase, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Accounts by Name like
* Show accounts matching name that are like...
* 200 - OK
* @param name The name parameter
* @param ignoreCase The ignoreCase parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<Account>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> loadAccountByNameLikeWithHttpInfo(String name, Boolean ignoreCase, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return loadAccountByNameLikeRequestCreation(name, ignoreCase, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Accounts by Name like
* Show accounts matching name that are like...
* 200 - OK
* @param name The name parameter
* @param ignoreCase The ignoreCase parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec loadAccountByNameLikeWithResponseSpec(String name, Boolean ignoreCase, String winkVersion, String accept) throws WebClientResponseException {
return loadAccountByNameLikeRequestCreation(name, ignoreCase, winkVersion, accept);
}
/**
* Show Account for User
* Load account details for authenticated user
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<Account>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec loadAccountsForAuthenticatedUserRequestCreation(String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// create path and map variables
final Map pathParams = new HashMap();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/account/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Account for User
* Load account details for authenticated user
* 200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<Account>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux loadAccountsForAuthenticatedUser(String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return loadAccountsForAuthenticatedUserRequestCreation(winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Account for User
* Load account details for authenticated user
* 200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<Account>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> loadAccountsForAuthenticatedUserWithHttpInfo(String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return loadAccountsForAuthenticatedUserRequestCreation(winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Account for User
* Load account details for authenticated user
* 200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec loadAccountsForAuthenticatedUserWithResponseSpec(String winkVersion, String accept) throws WebClientResponseException {
return loadAccountsForAuthenticatedUserRequestCreation(winkVersion, accept);
}
/**
* Show Account for External
* Show a specific account by passing your own external identifier
*
200 - OK
* @param externalAccountIdentifier The externalAccountIdentifier parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return Account
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec loadExternalAccountRequestCreation(String externalAccountIdentifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'externalAccountIdentifier' is set
if (externalAccountIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'externalAccountIdentifier' when calling loadExternalAccount", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("externalAccountIdentifier", externalAccountIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/account/external/{externalAccountIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Account for External
* Show a specific account by passing your own external identifier
* 200 - OK
* @param externalAccountIdentifier The externalAccountIdentifier parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return Account
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono loadExternalAccount(String externalAccountIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return loadExternalAccountRequestCreation(externalAccountIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Show Account for External
* Show a specific account by passing your own external identifier
* 200 - OK
* @param externalAccountIdentifier The externalAccountIdentifier parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<Account>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> loadExternalAccountWithHttpInfo(String externalAccountIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return loadExternalAccountRequestCreation(externalAccountIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Show Account for External
* Show a specific account by passing your own external identifier
* 200 - OK
* @param externalAccountIdentifier The externalAccountIdentifier parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec loadExternalAccountWithResponseSpec(String externalAccountIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return loadExternalAccountRequestCreation(externalAccountIdentifier, winkVersion, accept);
}
/**
* Remove Bank Account
* Remove an existing bank account for an existing account using local account identifier
*
200 - OK
* @param id The id parameter
* @param bankAccountId The bankAccountId parameter
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return Account
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec removeAccountBankAccountRequestCreation(String id, String bankAccountId, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new WebClientResponseException("Missing the required parameter 'id' when calling removeAccountBankAccount", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'bankAccountId' is set
if (bankAccountId == null) {
throw new WebClientResponseException("Missing the required parameter 'bankAccountId' when calling removeAccountBankAccount", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("id", id);
pathParams.put("bankAccountId", bankAccountId);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference