"use strict";
// SPDX-License-Identifier: Apache-2.0
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BondFixedRateDetailsData = void 0;
const ValidatedArgs_1 = __importDefault(require("../../../core/validation/ValidatedArgs"));
const SecurityDate_1 = require("../shared/SecurityDate");
const BondFixedRateDetails_1 = require("../bond/BondFixedRateDetails");
class BondFixedRateDetailsData extends ValidatedArgs_1.default {
    currency;
    nominalValue;
    nominalValueDecimals;
    startingDate;
    maturityDate;
    rate;
    rateDecimals;
    constructor(currency, nominalValue, nominalValueDecimals, startingDate, maturityDate, rate, rateDecimals) {
        super({
            maturityDate: (val) => {
                return SecurityDate_1.SecurityDate.checkDateTimestamp(parseInt(val), parseInt(this.startingDate));
            },
            rateDecimals: (_) => {
                return BondFixedRateDetails_1.BondFixedRateDetails.checkRate(this.rateDecimals);
            },
        });
        this.currency = currency;
        this.nominalValue = nominalValue;
        this.nominalValueDecimals = nominalValueDecimals;
        this.startingDate = startingDate;
        this.maturityDate = maturityDate;
        this.rate = rate;
        this.rateDecimals = rateDecimals;
        ValidatedArgs_1.default.handleValidation(BondFixedRateDetailsData.name, this);
    }
}
exports.BondFixedRateDetailsData = BondFixedRateDetailsData;
