org.mustangproject.ZUGFeRD.IZUGFeRDTradeSettlementPayment Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of library Show documentation
Show all versions of library Show documentation
FOSS Java library to read, write and validate european electronic invoices and orders in the UN/CEFACT
Cross Industry Invoice based formats Factur-X/ZUGFeRD, XRechnung and Order-X in your invoice PDFs.
The newest version!
/** **********************************************************************
*
* Copyright 2019 by ak on 12.04.19.
*
* Use is subject to license terms.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*
*********************************************************************** */
package org.mustangproject.ZUGFeRD;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.mustangproject.XMLTools;
public interface IZUGFeRDTradeSettlementPayment extends IZUGFeRDTradeSettlement {
/**
* get payment information text. e.g. Bank transfer
*
* @return payment information text
*/
@JsonIgnore
default String getOwnPaymentInfoText() {
return null;
}
/**
* BIC of the sender
*
* @return the BIC code of the recipient sender's bank
*/
default String getOwnBIC() {
return null;
}
/**
* IBAN of the sender
*
* @return the IBAN of the invoice sender's bank account
*/
default String getOwnIBAN() {
return null;
}
/***
* Account name
*
* @return the name of the account holder (if not identical to sender)
*/
default String getAccountName() { return null; }
@Override
@JsonIgnore
default String getSettlementXML() {
String accountNameStr="";
if (getAccountName()!=null) {
accountNameStr="" + XMLTools.encodeXML(getAccountName()) + " ";
}
String xml = ""
+ "58 "
+ "SEPA credit transfer "
+ ""
+ "" + XMLTools.encodeXML(getOwnIBAN()) + " ";
xml+= accountNameStr;
xml+= " ";
if (getOwnBIC()!=null) {
xml+= ""
+ "" + XMLTools.encodeXML(getOwnBIC()) + " "
// + " "+trans.getOwnBankName()+" "
//
+ " ";
}
xml+= " ";
return xml;
}
/* I'd love to implement getPaymentXML() and put there because this is where it belongs
* unfortunately, the due date is part of the transaction which is not accessible here :-(
*/
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy