001/* Copyright (C) 2014 konik.io
002 *
003 * This file is part of the Konik library.
004 *
005 * The Konik library is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Affero General Public License as
007 * published by the Free Software Foundation, either version 3 of the
008 * License, or (at your option) any later version.
009 *
010 * The Konik library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU Affero General Public License for more details.
014 *
015 * You should have received a copy of the GNU Affero General Public License
016 * along with the Konik library. If not, see <http://www.gnu.org/licenses/>.
017 */
018
019package io.konik.zugferd.entity;
020
021import io.konik.jaxb.bindable.unqualified.PercentRoundingAdapter;
022import io.konik.zugferd.unqualified.Amount;
023import io.konik.zugferd.unqualified.Measure;
024import io.konik.zugferd.unqualified.ZfDate;
025
026import java.math.BigDecimal;
027
028import javax.validation.Valid;
029import javax.xml.bind.annotation.XmlAccessType;
030import javax.xml.bind.annotation.XmlAccessorType;
031import javax.xml.bind.annotation.XmlElement;
032import javax.xml.bind.annotation.XmlType;
033import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
034
035/**
036 * 
037 * = The trades payment penalty terms and conditions
038 */
039@XmlAccessorType(XmlAccessType.FIELD)
040@XmlType(name = "TradePaymentPenaltyTermsType", propOrder = { "reference", "maturityPeriod", "basis",
041      "calculationPercent", "actualPenalty" })
042public class PaymentPenaltyTerms {
043
044   @XmlElement(name = "BasisDateTime")
045   private ZfDate reference;
046
047   @Valid
048   @XmlElement(name = "BasisPeriodMeasure")
049   private Measure maturityPeriod;
050
051   @Valid
052   @XmlElement(name = "BasisAmount")
053   private Amount basis;
054
055   @XmlElement(name = "CalculationPercent")
056   @XmlJavaTypeAdapter(PercentRoundingAdapter.class)
057   private BigDecimal calculationPercent;
058
059   @Valid
060   @XmlElement(name = "ActualPenaltyAmount")
061   private Amount actualPenalty;
062
063   /**
064    * Gets the reference.
065    *
066    * @return the reference
067    */
068   public ZfDate getReference() {
069      return reference;
070   }
071
072   /**
073    * Sets the reference.
074    *
075    * @param reference the new reference
076    */
077   public void setReference(ZfDate reference) {
078      this.reference = reference;
079   }
080
081   /**
082    * Gets the maturity period.
083    *
084    * @return the maturity period
085    */
086   public Measure getMaturityPeriod() {
087      return maturityPeriod;
088   }
089
090   /**
091    * Sets the maturity period.
092    *
093    * @param maturityPeriod the new maturity period
094    */
095   public void setMaturityPeriod(Measure maturityPeriod) {
096      this.maturityPeriod = maturityPeriod;
097   }
098
099   /**
100    * Gets the basis.
101    *
102    * @return the basis
103    */
104   public Amount getBasis() {
105      return basis;
106   }
107
108   /**
109    * Sets the basis.
110    *
111    * @param basis the new basis
112    */
113   public void setBasis(Amount basis) {
114      this.basis = basis;
115   }
116
117   /**
118    * Gets the calculation percent.
119    *
120    * @return the calculation percent
121    */
122   public BigDecimal getCalculationPercent() {
123      return calculationPercent;
124   }
125
126   /**
127    * Sets the calculation percent.
128    *
129    * @param calculationPercent the new calculation percent
130    */
131   public void setCalculationPercent(BigDecimal calculationPercent) {
132      this.calculationPercent = calculationPercent;
133   }
134
135   /**
136    * Gets the actual penalty.
137    *
138    * @return the actual penalty
139    */
140   public Amount getActualPenalty() {
141      return actualPenalty;
142   }
143
144   /**
145    * Sets the actual penalty.
146    *
147    * @param actualPenalty the new actual penalty
148    */
149   public void setActualPenalty(Amount actualPenalty) {
150      this.actualPenalty = actualPenalty;
151   }
152
153}