Class SepaGermanBankTransactionCode

Namespace
Subsembly.Sepa
Assembly
Subsembly.Sepa.dll

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

string

PrimaNotaNo

public string PrimaNotaNo { get; set; }

Property Value

string

SwiftTransactionCode

Four character swift transaction code.

public string SwiftTransactionCode { get; set; }

Property Value

string

TextKeyExtension

Three digit German text key extension.

public string TextKeyExtension { get; set; }

Property Value

string

Methods

Clear()

Clear the current content.

public void Clear()

DeriveGVCodeFromSwiftTransactionCode(string, SepaCreditDebitIndicator)

public static string DeriveGVCodeFromSwiftTransactionCode(string sSwiftTxCode, SepaCreditDebitIndicator nCdtDbtInd)

Parameters

sSwiftTxCode string
nCdtDbtInd SepaCreditDebitIndicator

Returns

string

IsEmpty()

Checks whether this object is completely empty, such that it won't write anything.

public bool IsEmpty()

Returns

bool

Parse(string)

Parses the proprietary content of a SepaBankTransactionCode. ProprietaryCode from a German CAMT file.

public static SepaGermanBankTransactionCode Parse(string sBkTxCd)

Parameters

sBkTxCd string

The content from SepaBankTransactionCode.ProprietaryCode to be parsed. If this is null, then an empty SepaGermanBankTransactionCode is returned.

Returns

SepaGermanBankTransactionCode

Remarks

This method throws an exception, when the given bank transaction code string is not valid.

Exceptions

ArgumentException

The given sBkTxCd is 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

nCdtDbtInd SepaCreditDebitIndicator
sPurpCd string
aBkTxCd SepaBankTransactionCode

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

string

TryParse(string)

Tries to parses the proprietary content of a SepaBankTransactionCode. ProprietaryCode from a German CAMT file.

public static SepaGermanBankTransactionCode TryParse(string sBkTxCd)

Parameters

sBkTxCd string

The content from SepaBankTransactionCode.ProprietaryCode to be parsed. If this is null, then an empty SepaGermanBankTransactionCode is returned.

Returns

SepaGermanBankTransactionCode

Remarks

This method does never throw an exception. Instead it just skips invalid fields.