uk.org.openbanking.datamodel.account.CreditInterest1TierBandSet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openbanking-sdk Show documentation
Show all versions of openbanking-sdk Show documentation
A Java SDK to help implementing the Open Banking standard : https://www.openbanking.org.uk/read-write-apis/
/**
*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at https://forgerock.org/cddlv1-0/. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2019 ForgeRock AS.
*/
/*
* Account and Transaction API Specification
* Swagger for Account and Transaction API Specification
*
* OpenAPI spec version: v3.1.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package uk.org.openbanking.datamodel.account;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/**
* The group of tiers or bands for which credit interest can be applied.
*/
@ApiModel(description = "The group of tiers or bands for which credit interest can be applied.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-05-23T11:27:41.089+01:00")
public class CreditInterest1TierBandSet {
@JsonProperty("TierBandMethod")
private TierBandMethodEnum tierBandMethod = null;
@JsonProperty("CalculationMethod")
private CalculationMethodEnum calculationMethod = null;
@JsonProperty("Destination")
private DestinationEnum destination = null;
@JsonProperty("Notes")
private List notes = null;
@JsonProperty("TierBand")
private List tierBand = new ArrayList();
public CreditInterest1TierBandSet tierBandMethod(TierBandMethodEnum tierBandMethod) {
this.tierBandMethod = tierBandMethod;
return this;
}
/**
* The methodology of how credit interest is charged. It can be:- 1. Banded Interest rates are banded. i.e. Increasing rate on whole balance as balance increases. 2. Tiered Interest rates are tiered. i.e. increasing rate for each tier as balance increases, but interest paid on tier fixed for that tier and not on whole balance. 3. Whole The same interest rate is applied irrespective of the PCA balance
*
* @return tierBandMethod
**/
@NotNull
@ApiModelProperty(required = true, value = "The methodology of how credit interest is charged. It can be:- 1. Banded Interest rates are banded. i.e. Increasing rate on whole balance as balance increases. 2. Tiered Interest rates are tiered. i.e. increasing rate for each tier as balance increases, but interest paid on tier fixed for that tier and not on whole balance. 3. Whole The same interest rate is applied irrespective of the PCA balance")
public TierBandMethodEnum getTierBandMethod() {
return tierBandMethod;
}
public void setTierBandMethod(TierBandMethodEnum tierBandMethod) {
this.tierBandMethod = tierBandMethod;
}
public CreditInterest1TierBandSet calculationMethod(CalculationMethodEnum calculationMethod) {
this.calculationMethod = calculationMethod;
return this;
}
/**
* Methods of calculating interest
*
* @return calculationMethod
**/
@ApiModelProperty(value = "Methods of calculating interest")
public CalculationMethodEnum getCalculationMethod() {
return calculationMethod;
}
public void setCalculationMethod(CalculationMethodEnum calculationMethod) {
this.calculationMethod = calculationMethod;
}
public CreditInterest1TierBandSet destination(DestinationEnum destination) {
this.destination = destination;
return this;
}
/**
* Describes whether accrued interest is payable only to the PCA or to another bank account
*
* @return destination
**/
@ApiModelProperty(value = "Describes whether accrued interest is payable only to the PCA or to another bank account")
public DestinationEnum getDestination() {
return destination;
}
public void setDestination(DestinationEnum destination) {
this.destination = destination;
}
public CreditInterest1TierBandSet notes(List notes) {
this.notes = notes;
return this;
}
public CreditInterest1TierBandSet addNotesItem(String notesItem) {
if (this.notes == null) {
this.notes = new ArrayList();
}
this.notes.add(notesItem);
return this;
}
/**
* Optional additional notes to supplement the Tier Band Set details
*
* @return notes
**/
@ApiModelProperty(value = "Optional additional notes to supplement the Tier Band Set details")
public List getNotes() {
return notes;
}
public void setNotes(List notes) {
this.notes = notes;
}
public CreditInterest1TierBandSet tierBand(List tierBand) {
this.tierBand = tierBand;
return this;
}
public CreditInterest1TierBandSet addTierBandItem(CreditInterest1TierBand tierBandItem) {
this.tierBand.add(tierBandItem);
return this;
}
/**
* Tier Band Details
*
* @return tierBand
**/
@NotNull
@Valid
@Size(min = 1)
@ApiModelProperty(required = true, value = "Tier Band Details")
public List getTierBand() {
return tierBand;
}
public void setTierBand(List tierBand) {
this.tierBand = tierBand;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreditInterest1TierBandSet creditInterest1TierBandSet = (CreditInterest1TierBandSet) o;
return Objects.equals(this.tierBandMethod, creditInterest1TierBandSet.tierBandMethod) &&
Objects.equals(this.calculationMethod, creditInterest1TierBandSet.calculationMethod) &&
Objects.equals(this.destination, creditInterest1TierBandSet.destination) &&
Objects.equals(this.notes, creditInterest1TierBandSet.notes) &&
Objects.equals(this.tierBand, creditInterest1TierBandSet.tierBand);
}
@Override
public int hashCode() {
return Objects.hash(tierBandMethod, calculationMethod, destination, notes, tierBand);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreditInterest1TierBandSet {\n");
sb.append(" tierBandMethod: ").append(toIndentedString(tierBandMethod)).append("\n");
sb.append(" calculationMethod: ").append(toIndentedString(calculationMethod)).append("\n");
sb.append(" destination: ").append(toIndentedString(destination)).append("\n");
sb.append(" notes: ").append(toIndentedString(notes)).append("\n");
sb.append(" tierBand: ").append(toIndentedString(tierBand)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* The methodology of how credit interest is charged. It can be:- 1. Banded Interest rates are banded. i.e. Increasing rate on whole balance as balance increases. 2. Tiered Interest rates are tiered. i.e. increasing rate for each tier as balance increases, but interest paid on tier fixed for that tier and not on whole balance. 3. Whole The same interest rate is applied irrespective of the PCA balance
*/
public enum TierBandMethodEnum {
TIERED("Tiered"),
WHOLE("Whole");
private String value;
TierBandMethodEnum(String value) {
this.value = value;
}
@JsonCreator
public static TierBandMethodEnum fromValue(String text) {
for (TierBandMethodEnum b : TierBandMethodEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
}
/**
* Methods of calculating interest
*/
public enum CalculationMethodEnum {
COMPOUND("Compound"),
SIMPLEINTEREST("SimpleInterest");
private String value;
CalculationMethodEnum(String value) {
this.value = value;
}
@JsonCreator
public static CalculationMethodEnum fromValue(String text) {
for (CalculationMethodEnum b : CalculationMethodEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
}
/**
* Describes whether accrued interest is payable only to the PCA or to another bank account
*/
public enum DestinationEnum {
PAYAWAY("PayAway"),
SELFCREDIT("SelfCredit");
private String value;
DestinationEnum(String value) {
this.value = value;
}
@JsonCreator
public static DestinationEnum fromValue(String text) {
for (DestinationEnum b : DestinationEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
}
}