Class SepaGermanBankTransactionCode
Helper class to parse and generate the German SepaBankTransactionCode. ProprietaryCode.
public class SepaGermanBankTransactionCode
- Inheritance
-
SepaGermanBankTransactionCode
- Inherited Members
Remarks
A German bank transaction code consists of a sequence of fields separated by plus signs. Every field in the sequence is optional. The sequence has the format:
[SwiftTxCode]+[GVCode]+[PrimaNotaNo]+[TextKeyExt]
For example:
NCHG+808+7040+000
Properties
GVCode
Three digit German transaction code.
public string GVCode { get; set; }
Property Value
PrimaNotaNo
public string PrimaNotaNo { get; set; }
Property Value
SwiftTransactionCode
Four character swift transaction code.
public string SwiftTransactionCode { get; set; }
Property Value
TextKeyExtension
Three digit German text key extension.
public string TextKeyExtension { get; set; }
Property Value
Methods
Clear()
Clear the current content.
public void Clear()
DeriveGVCodeFromSwiftTransactionCode(string, SepaCreditDebitIndicator)
public static string DeriveGVCodeFromSwiftTransactionCode(string sSwiftTxCode, SepaCreditDebitIndicator nCdtDbtInd)
Parameters
sSwiftTxCodestringnCdtDbtIndSepaCreditDebitIndicator
Returns
IsEmpty()
Checks whether this object is completely empty, such that it won't write anything.
public bool IsEmpty()
Returns
Parse(string)
Parses the proprietary content of a SepaBankTransactionCode. ProprietaryCode from a German CAMT file.
public static SepaGermanBankTransactionCode Parse(string sBkTxCd)
Parameters
sBkTxCdstringThe content from SepaBankTransactionCode.ProprietaryCode to be parsed. If this is
null, then an empty SepaGermanBankTransactionCode is returned.
Returns
Remarks
This method throws an exception, when the given bank transaction code string is not valid.
Exceptions
- ArgumentException
The given
sBkTxCdis not a valid German bank transaction code.
SetupBankTransactionCode(SepaCreditDebitIndicator, string, SepaBankTransactionCode)
Setup a SepaBankTransactionCode element with the data from this SepaGermanBankTransactionCode.
public void SetupBankTransactionCode(SepaCreditDebitIndicator nCdtDbtInd, string sPurpCd, SepaBankTransactionCode aBkTxCd)
Parameters
nCdtDbtIndSepaCreditDebitIndicatorsPurpCdstringaBkTxCdSepaBankTransactionCode
Remarks
In addition to the obvious ProprietaryCode and ProprietaryIssuer, this will also setup DomainCode, FamilyCode, and SubFamilyCode, with values derived from GVCode or SwiftTransactionCode.
This method will always setup the SepaBankTransactionCode with
mandatory values, even if this SepaGermanBankTransactionCode
IsEmpty(). If the worst case, the
DomainCode,
FamilyCode, and
SubFamilyCode, are set up with
"PMNT", "OTHR", and "OTHR", and the proprietary fields are null.
ToString()
Generates the proprietary string for the SepaBankTransactionCode. ProprietaryCode.
public override string ToString()
Returns
TryParse(string)
Tries to parses the proprietary content of a SepaBankTransactionCode. ProprietaryCode from a German CAMT file.
public static SepaGermanBankTransactionCode TryParse(string sBkTxCd)
Parameters
sBkTxCdstringThe content from SepaBankTransactionCode.ProprietaryCode to be parsed. If this is
null, then an empty SepaGermanBankTransactionCode is returned.
Returns
Remarks
This method does never throw an exception. Instead it just skips invalid fields.