Skip to main content

Exploring DeleteAccountJson

Overview

The DeleteAccountJson class represents the JSON structure for deleting an account. It contains a field delaccCommarea, which is an instance of DelaccJson, representing the communication area for the delete account operation. The class includes methods to get and set the delaccCommarea field, allowing for manipulation of the account deletion data.

Methods

The DeleteAccountJson class provides several methods to interact with the account deletion data.


getDelaccCommarea

The getDelaccCommarea method retrieves the communication area for the delete account operation.

	public DelaccJson getDelaccCommarea()
{
return delaccCommarea;
}


setDelaccCommarea

The setDelaccCommarea method sets the communication area for the delete account operation.

	public void setDelaccCommarea(DelaccJson delaccCommareaIn)
{
delaccCommarea = delaccCommareaIn;
}


toPrettyString

The toPrettyString method formats the account details into a human-readable string, including information such as account number, sort code, account type, customer number, interest rate, overdraft limit, available balance, actual balance, account opened date, last statement date, and next statement date.

	public String toPrettyString()
{
DelaccJson accInfo = delaccCommarea;
String output = "";
output += "Account Number: "
+ OutputFormatUtils.leadingZeroes(8, accInfo.getDelaccAccno())
+ "\n" + "Sort Code: " + accInfo.getDelaccSortcode() + "\n"
+ "Account Type: " + accInfo.getDelaccAccType() + "\n"
+ "Customer Number: "
+ OutputFormatUtils.leadingZeroes(10, accInfo.getDelaccCustno())
+ "\n" + "Interest Rate: "
+ String.format(FLOAT_FORMAT, accInfo.getDelaccInterestRate())
+ "\n" + "Overdraft Limit: " + accInfo.getDelaccOverdraft()
+ "\n" + "Available Balance: "
+ String.format(FLOAT_FORMAT,
accInfo.getDelaccAvailableBalance())
+ "\n" + "Actual Balance: "
+ String.format(FLOAT_FORMAT, accInfo.getDelaccActualBalance())
+ "\n" + "Account Opened: "
+ OutputFormatUtils.date(accInfo.getDelaccOpened()) + "\n"
+ "Last Statement Date: "

Usage

To remove an account, click on 'Delete account' from the landing page.

Example

In this example, the response from the delete account operation is parsed into a DeleteAccountJson object.


The response from the delete account operation is logged and then parsed into a DeleteAccountJson object using ObjectMapper.

				log.info(responseBody);
DeleteAccountJson responseObj = new ObjectMapper()
.readValue(responseBody, DeleteAccountJson.class);

Additional Methods in DelaccJson

The DelaccJson class, which is used within DeleteAccountJson, provides additional methods to interact with various account details.


setDelaccSuccess

The setDelaccSuccess method sets the success status of the delete account operation.

	public void setDelaccSuccess(String delaccSuccessIn)
{
delaccSuccess = delaccSuccessIn;
}


setDelaccInterestRate

The setDelaccInterestRate method sets the interest rate of the account.

	public void setDelaccInterestRate(float delaccInterestRateIn)
{
delaccInterestRate = delaccInterestRateIn;
}


getDelaccActualBalance

The getDelaccActualBalance method retrieves the actual balance of the account.

	public float getDelaccActualBalance()
{
return delaccActualBalance;
}


setDelaccActualBalance

The setDelaccActualBalance method sets the actual balance of the account.

	public void setDelaccActualBalance(float delaccActualBalanceIn)
{
delaccActualBalance = delaccActualBalanceIn;
}


getDelaccAvailableBalance

The getDelaccAvailableBalance method retrieves the available balance of the account.

	public float getDelaccAvailableBalance()
{
return delaccAvailableBalance;
}


setDelaccAvailableBalance

The setDelaccAvailableBalance method sets the available balance of the account.

	public void setDelaccAvailableBalance(float delaccAvailableBalanceIn)
{
delaccAvailableBalance = delaccAvailableBalanceIn;
}


getDelaccOverdraft

The getDelaccOverdraft method retrieves the overdraft limit of the account.

	public int getDelaccOverdraft()
{
return delaccOverdraft;
}


setDelaccOverdraft

The setDelaccOverdraft method sets the overdraft limit of the account.

	public void setDelaccOverdraft(int delaccOverdraftIn)
{
delaccOverdraft = delaccOverdraftIn;
}

 

This is an auto-generated document by Swimm 🌊 and has not yet been verified by a human