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 javax.xml.bind.annotation.XmlElement;
022import javax.xml.bind.annotation.XmlType;
023import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
024import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
025
026/**
027 *  
028 * The Creditor Financial Account.
029 */
030@XmlType(name = "CreditorFinancialAccountType", propOrder = { "iban", "accountName", "proprietaryId" })
031public class CreditorFinancialAccount implements FinancialAccount {
032
033   @XmlElement(name = "IBANID")
034   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
035   private String iban;
036
037   @XmlElement(name = "AccountName")
038   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
039   protected String accountName;
040
041   @XmlElement(name = "ProprietaryID")
042   @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
043   private String proprietaryId;
044
045   /**
046    * Instantiates a new creditor financial account.
047    */
048   public CreditorFinancialAccount() {
049   }
050
051   /**
052    * Instantiates a new creditor financial account.
053    *
054    * @param iban the iban
055    */
056   public CreditorFinancialAccount(String iban) {
057      super();
058      this.iban = iban;
059   }
060
061   /**
062    * Instantiates a new creditor financial account.
063    *
064    * @param iban the iban
065    * @param accountName the account name
066    */
067   public CreditorFinancialAccount(String iban, String accountName) {
068      super();
069      this.iban = iban;
070      this.accountName = accountName;
071   }
072
073   @Override
074   public String getIban() {
075      return iban;
076   }
077
078   @Override
079   public CreditorFinancialAccount setIban(String iban) {
080      this.iban = iban;
081      return this;
082   }
083
084   /**
085    * Gets the account owner name.
086    *
087    * @return the account name
088    */
089   public String getAccountName() {
090      return accountName;
091   }
092
093   /**
094    * Sets the account owner name.
095    *
096    * @param value the value
097    * @return the creditor financial account
098    */
099   public CreditorFinancialAccount setAccountName(String value) {
100      this.accountName = value;
101      return this;
102   }
103
104   @Override
105   public String getProprietaryId() {
106      return proprietaryId;
107   }
108
109   @Override
110   public CreditorFinancialAccount setProprietaryId(String proprietaryId) {
111      this.proprietaryId = proprietaryId;
112      return this;
113   }
114
115}