All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.org.openbanking.datamodel.account.OverdraftOverdraftTierBand Maven / Gradle / Ivy

Go to download

A Java SDK to help implementing the Open Banking standard : https://www.openbanking.org.uk/read-write-apis/

There is a newer version: 3.1.2.5
Show newest version
/**
 *
 * 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.Pattern;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * Provides overdraft details for a specific tier or band
 */
@ApiModel(description = "Provides overdraft details for a specific tier or band")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-05-23T11:27:41.089+01:00")
public class OverdraftOverdraftTierBand {
    @JsonProperty("Identification")
    private String identification = null;

    @JsonProperty("TierValueMin")
    private String tierValueMin = null;

    @JsonProperty("TierValueMax")
    private String tierValueMax = null;

    @JsonProperty("EAR")
    private String EAR = null;

    @JsonProperty("AgreementLengthMin")
    private Float agreementLengthMin = null;

    @JsonProperty("AgreementLengthMax")
    private Float agreementLengthMax = null;
    @JsonProperty("AgreementPeriod")
    private AgreementPeriodEnum agreementPeriod = null;
    @JsonProperty("OverdraftInterestChargingCoverage")
    private OverdraftInterestChargingCoverageEnum overdraftInterestChargingCoverage = null;
    @JsonProperty("BankGuaranteedIndicator")
    private Boolean bankGuaranteedIndicator = null;
    @JsonProperty("Notes")
    private List notes = null;
    @JsonProperty("OverdraftFeesCharges")
    private List overdraftFeesCharges = null;

    public OverdraftOverdraftTierBand identification(String identification) {
        this.identification = identification;
        return this;
    }

    /**
     * Unique and unambiguous identification of a  Tier Band for a overdraft.
     *
     * @return identification
     **/
    @Size(min = 1, max = 35)
    @ApiModelProperty(value = "Unique and unambiguous identification of a  Tier Band for a overdraft.")
    public String getIdentification() {
        return identification;
    }

    public void setIdentification(String identification) {
        this.identification = identification;
    }

    public OverdraftOverdraftTierBand tierValueMin(String tierValueMin) {
        this.tierValueMin = tierValueMin;
        return this;
    }

    /**
     * Minimum value of Overdraft Tier/Band
     *
     * @return tierValueMin
     **/
    @NotNull
    @Pattern(regexp = "^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$")
    @ApiModelProperty(required = true, value = "Minimum value of Overdraft Tier/Band")
    public String getTierValueMin() {
        return tierValueMin;
    }

    public void setTierValueMin(String tierValueMin) {
        this.tierValueMin = tierValueMin;
    }

    public OverdraftOverdraftTierBand tierValueMax(String tierValueMax) {
        this.tierValueMax = tierValueMax;
        return this;
    }

    /**
     * Maximum value of Overdraft Tier/Band
     *
     * @return tierValueMax
     **/
    @Pattern(regexp = "^(-?\\d{1,14}){1}(\\.\\d{1,4}){0,1}$")
    @ApiModelProperty(value = "Maximum value of Overdraft Tier/Band")
    public String getTierValueMax() {
        return tierValueMax;
    }

    public void setTierValueMax(String tierValueMax) {
        this.tierValueMax = tierValueMax;
    }

    public OverdraftOverdraftTierBand EAR(String EAR) {
        this.EAR = EAR;
        return this;
    }

    /**
     * EAR means Effective Annual Rate and/or Equivalent Annual Rate (frequently used interchangeably), being the actual annual interest rate of an Overdraft.
     *
     * @return EAR
     **/
    @Pattern(regexp = "^(-?\\d{1,3}){1}(\\.\\d{1,4}){0,1}$")
    @ApiModelProperty(value = "EAR means Effective Annual Rate and/or Equivalent Annual Rate (frequently used interchangeably), being the actual annual interest rate of an Overdraft.")
    public String getEAR() {
        return EAR;
    }

    public void setEAR(String EAR) {
        this.EAR = EAR;
    }

    public OverdraftOverdraftTierBand agreementLengthMin(Float agreementLengthMin) {
        this.agreementLengthMin = agreementLengthMin;
        return this;
    }

    /**
     * Specifies the minimum length of a band for a fixed overdraft agreement
     *
     * @return agreementLengthMin
     **/
    @ApiModelProperty(value = "Specifies the minimum length of a band for a fixed overdraft agreement")
    public Float getAgreementLengthMin() {
        return agreementLengthMin;
    }

    public void setAgreementLengthMin(Float agreementLengthMin) {
        this.agreementLengthMin = agreementLengthMin;
    }

    public OverdraftOverdraftTierBand agreementLengthMax(Float agreementLengthMax) {
        this.agreementLengthMax = agreementLengthMax;
        return this;
    }

    /**
     * Specifies the maximum length of a band for a fixed overdraft agreement
     *
     * @return agreementLengthMax
     **/
    @ApiModelProperty(value = "Specifies the maximum length of a band for a fixed overdraft agreement")
    public Float getAgreementLengthMax() {
        return agreementLengthMax;
    }

    public void setAgreementLengthMax(Float agreementLengthMax) {
        this.agreementLengthMax = agreementLengthMax;
    }

    public OverdraftOverdraftTierBand agreementPeriod(AgreementPeriodEnum agreementPeriod) {
        this.agreementPeriod = agreementPeriod;
        return this;
    }

    /**
     * Specifies the period of a fixed length overdraft agreement
     *
     * @return agreementPeriod
     **/
    @ApiModelProperty(value = "Specifies the period of a fixed length overdraft agreement")
    public AgreementPeriodEnum getAgreementPeriod() {
        return agreementPeriod;
    }

    public void setAgreementPeriod(AgreementPeriodEnum agreementPeriod) {
        this.agreementPeriod = agreementPeriod;
    }

    public OverdraftOverdraftTierBand overdraftInterestChargingCoverage(OverdraftInterestChargingCoverageEnum overdraftInterestChargingCoverage) {
        this.overdraftInterestChargingCoverage = overdraftInterestChargingCoverage;
        return this;
    }

    /**
     * Refers to which interest rate is applied when interests are tiered. For example, if an overdraft balance is £2k and the interest tiers are:- 0-£500 0.1%, 500-1000 0.2%, 1000-10000 0.5%, then the applicable interest rate could either be 0.5% of the entire balance (since the account balance sits in the top interest tier) or (0.1%*500)+(0.2%*500)+(0.5%*1000). In the 1st situation, we say the interest is applied to the ‘Whole’ of the account balance,  and in the 2nd that it is ‘Tiered’.
     *
     * @return overdraftInterestChargingCoverage
     **/
    @ApiModelProperty(value = "Refers to which interest rate is applied when interests are tiered. For example, if an overdraft balance is £2k and the interest tiers are:- 0-£500 0.1%, 500-1000 0.2%, 1000-10000 0.5%, then the applicable interest rate could either be 0.5% of the entire balance (since the account balance sits in the top interest tier) or (0.1%*500)+(0.2%*500)+(0.5%*1000). In the 1st situation, we say the interest is applied to the ‘Whole’ of the account balance,  and in the 2nd that it is ‘Tiered’.")
    public OverdraftInterestChargingCoverageEnum getOverdraftInterestChargingCoverage() {
        return overdraftInterestChargingCoverage;
    }

    public void setOverdraftInterestChargingCoverage(OverdraftInterestChargingCoverageEnum overdraftInterestChargingCoverage) {
        this.overdraftInterestChargingCoverage = overdraftInterestChargingCoverage;
    }

    public OverdraftOverdraftTierBand bankGuaranteedIndicator(Boolean bankGuaranteedIndicator) {
        this.bankGuaranteedIndicator = bankGuaranteedIndicator;
        return this;
    }

    /**
     * Indicates whether the advertised overdraft rate is guaranteed to be offered to a borrower by the bank e.g. if it’s part of a government scheme, or whether the rate may vary dependent on the applicant’s circumstances.
     *
     * @return bankGuaranteedIndicator
     **/
    @ApiModelProperty(value = "Indicates whether the advertised overdraft rate is guaranteed to be offered to a borrower by the bank e.g. if it’s part of a government scheme, or whether the rate may vary dependent on the applicant’s circumstances.")
    public Boolean isBankGuaranteedIndicator() {
        return bankGuaranteedIndicator;
    }

    public void setBankGuaranteedIndicator(Boolean bankGuaranteedIndicator) {
        this.bankGuaranteedIndicator = bankGuaranteedIndicator;
    }

    public OverdraftOverdraftTierBand notes(List notes) {
        this.notes = notes;
        return this;
    }

    public OverdraftOverdraftTierBand 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 details
     *
     * @return notes
     **/
    @ApiModelProperty(value = "Optional additional notes to supplement the Tier/band details")
    public List getNotes() {
        return notes;
    }

    public void setNotes(List notes) {
        this.notes = notes;
    }

    public OverdraftOverdraftTierBand overdraftFeesCharges(List overdraftFeesCharges) {
        this.overdraftFeesCharges = overdraftFeesCharges;
        return this;
    }

    public OverdraftOverdraftTierBand addOverdraftFeesChargesItem(OverdraftOverdraftFeesCharges overdraftFeesChargesItem) {
        if (this.overdraftFeesCharges == null) {
            this.overdraftFeesCharges = new ArrayList();
        }
        this.overdraftFeesCharges.add(overdraftFeesChargesItem);
        return this;
    }

    /**
     * Overdraft fees and charges
     *
     * @return overdraftFeesCharges
     **/
    @Valid
    @ApiModelProperty(value = "Overdraft fees and charges")
    public List getOverdraftFeesCharges() {
        return overdraftFeesCharges;
    }

    public void setOverdraftFeesCharges(List overdraftFeesCharges) {
        this.overdraftFeesCharges = overdraftFeesCharges;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        OverdraftOverdraftTierBand overdraftOverdraftTierBand = (OverdraftOverdraftTierBand) o;
        return Objects.equals(this.identification, overdraftOverdraftTierBand.identification) &&
                Objects.equals(this.tierValueMin, overdraftOverdraftTierBand.tierValueMin) &&
                Objects.equals(this.tierValueMax, overdraftOverdraftTierBand.tierValueMax) &&
                Objects.equals(this.EAR, overdraftOverdraftTierBand.EAR) &&
                Objects.equals(this.agreementLengthMin, overdraftOverdraftTierBand.agreementLengthMin) &&
                Objects.equals(this.agreementLengthMax, overdraftOverdraftTierBand.agreementLengthMax) &&
                Objects.equals(this.agreementPeriod, overdraftOverdraftTierBand.agreementPeriod) &&
                Objects.equals(this.overdraftInterestChargingCoverage, overdraftOverdraftTierBand.overdraftInterestChargingCoverage) &&
                Objects.equals(this.bankGuaranteedIndicator, overdraftOverdraftTierBand.bankGuaranteedIndicator) &&
                Objects.equals(this.notes, overdraftOverdraftTierBand.notes) &&
                Objects.equals(this.overdraftFeesCharges, overdraftOverdraftTierBand.overdraftFeesCharges);
    }

    @Override
    public int hashCode() {
        return Objects.hash(identification, tierValueMin, tierValueMax, EAR, agreementLengthMin, agreementLengthMax, agreementPeriod, overdraftInterestChargingCoverage, bankGuaranteedIndicator, notes, overdraftFeesCharges);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class OverdraftOverdraftTierBand {\n");

        sb.append("    identification: ").append(toIndentedString(identification)).append("\n");
        sb.append("    tierValueMin: ").append(toIndentedString(tierValueMin)).append("\n");
        sb.append("    tierValueMax: ").append(toIndentedString(tierValueMax)).append("\n");
        sb.append("    EAR: ").append(toIndentedString(EAR)).append("\n");
        sb.append("    agreementLengthMin: ").append(toIndentedString(agreementLengthMin)).append("\n");
        sb.append("    agreementLengthMax: ").append(toIndentedString(agreementLengthMax)).append("\n");
        sb.append("    agreementPeriod: ").append(toIndentedString(agreementPeriod)).append("\n");
        sb.append("    overdraftInterestChargingCoverage: ").append(toIndentedString(overdraftInterestChargingCoverage)).append("\n");
        sb.append("    bankGuaranteedIndicator: ").append(toIndentedString(bankGuaranteedIndicator)).append("\n");
        sb.append("    notes: ").append(toIndentedString(notes)).append("\n");
        sb.append("    overdraftFeesCharges: ").append(toIndentedString(overdraftFeesCharges)).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    ");
    }


    /**
     * Specifies the period of a fixed length overdraft agreement
     */
    public enum AgreementPeriodEnum {
        DAY("Day"),

        HALF_YEAR("Half Year"),

        MONTH("Month"),

        QUARTER("Quarter"),

        WEEK("Week"),

        YEAR("Year");

        private String value;

        AgreementPeriodEnum(String value) {
            this.value = value;
        }

        @JsonCreator
        public static AgreementPeriodEnum fromValue(String text) {
            for (AgreementPeriodEnum b : AgreementPeriodEnum.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);
        }
    }

    /**
     * Refers to which interest rate is applied when interests are tiered. For example, if an overdraft balance is £2k and the interest tiers are:- 0-£500 0.1%, 500-1000 0.2%, 1000-10000 0.5%, then the applicable interest rate could either be 0.5% of the entire balance (since the account balance sits in the top interest tier) or (0.1%*500)+(0.2%*500)+(0.5%*1000). In the 1st situation, we say the interest is applied to the ‘Whole’ of the account balance,  and in the 2nd that it is ‘Tiered’.
     */
    public enum OverdraftInterestChargingCoverageEnum {
        BANDED("Banded"),

        TIERED("Tiered"),

        WHOLE("Whole");

        private String value;

        OverdraftInterestChargingCoverageEnum(String value) {
            this.value = value;
        }

        @JsonCreator
        public static OverdraftInterestChargingCoverageEnum fromValue(String text) {
            for (OverdraftInterestChargingCoverageEnum b : OverdraftInterestChargingCoverageEnum.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);
        }
    }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy