Class FinRemitt

Namespace
Subsembly.FinTS
Assembly
Subsembly.FinTS.Core.dll

Generic class that holds the information of a german domestic remittance (Ueberweisung or Lastschrift).

public class FinRemitt : FinPersist
Inheritance
FinRemitt
Inherited Members

Constructors

FinRemitt()

Creates an all empty FinRemitt to be initialised from scratch.

public FinRemitt()

Remarks

This constructor actually returns with an invalid instance of the FinRemitt class. Only after all required properties have been properly initialised, the instance will be a valid remittance.

FinRemitt(FinAcct, FinAcct, string, SwiftAmt, string)

Creates a FinRemitt from scratch with the given properties.

public FinRemitt(FinAcct aOrderingCustAcct, FinAcct aPayeePayerAcct, string sPayeePayerName, SwiftAmt aAmount, string sTextKey)

Parameters

aOrderingCustAcct FinAcct

The ordering custiomer account. This will be placed into the OrderingCustAcct property.

aPayeePayerAcct FinAcct

The payee/payer account. This will be placed into the PayeePayerAcct property.

sPayeePayerName string

One line of payee/payer name. This will be placed into the PayeePayerName1 property. The optional second line remains null.

aAmount SwiftAmt

Monetary amount. This will be placed into the Amount property.

sTextKey string

The text key. This will be placed into the TextKey property. The text key extension remains null.

Remarks

Note that the PaymtPurpose is optional and therefor is not initialised by this constructor.

Fields

MaxLineLength

The maximum length of text lines in a FinRemitt instance. Applies to the properties PayeePayerName1, PayeePayerName2, and PaymtPurpose.

public const int MaxLineLength = 27

Field Value

int

MaxPaymtPurposeLines

The maximum number of payment purpose text lines in a FinRemitt instance. Applies to the property PaymtPurpose.

public const int MaxPaymtPurposeLines = 14

Field Value

int

Properties

Amount

The monetary amount of this remittance.

public SwiftAmt Amount { get; set; }

Property Value

SwiftAmt

The amount is a required field of any remittance.

DtausCustNumber

The DTAUS file customer number (field C6).

public string DtausCustNumber { get; set; }

Property Value

string

Remarks

This field is only used when converting to or from a DTAUS file format. It corresponds with the middle content of field C6 of the DTAUS file. Thus is may consist of up to 11 digits only. If it is shorted, it will be prefixed with zeroes.

DtausReferenceNumber

The DTAUS file reference number (field A10).

public string DtausReferenceNumber { get; set; }

Property Value

string

Remarks

This field is only used when converting to or from a DTAUS file format. It corresponds with field A10 of the DTAUS file. Thus is may consist of up to 10 digits only. If it is shorted, it will be prefixed with zeroes.

IsDebit

Indicates whether the current TextKey is a debit or credit text key.

public bool IsDebit { get; }

Property Value

bool

Remarks

This property is true, if, any only if, the TextKey has been set and it is below 50.

OrderID

Optional order ID that was assiged by the bank to this remittance.

public string OrderID { get; set; }

Property Value

string

If an order ID is available for this remittance, then it shall be stored in this property. Otherwise this property shall be null.

OrderingCustAcct

Ordering customers account.

public FinAcct OrderingCustAcct { get; set; }

Property Value

FinAcct

PayeePayerAcct

Peer account of this remittance. Depending on the direction of transfer, this can be the payee or the payer.

public FinAcct PayeePayerAcct { get; set; }

Property Value

FinAcct

PayeePayerName

The concatenation of PayeePayerName1 and PayeePayerName2.

public string PayeePayerName { get; set; }

Property Value

string

Setting this property automatically splits the string after MaxLineLength characters. The first halve is stored in PayeePayerName1, the second halve is stored in PayeePayerName2.

Reading this property returns the concatenation of PayeePayerName1 and PayeePayerName2. If PayeePayerName1 is shorter than MaxLineLength, then a blank will be inserted between the two strings. In any case the returned string is trimmed.

PayeePayerName1

Name of peer of this remittance. Depending on the direction of transfer, this can be the payee or the payer.

public string PayeePayerName1 { get; set; }

Property Value

string

The payee/payer name can consist of up to two lines with up to MaxLineLength (currently always 27) characters each. If a second line is used, it is stored in the PayeePayerName2 property. The payee/payer name is a required field of any remittance. However, it can be set to null.

When the remittance is transmitted or converted into DTAUS format, the characters of this property may be converted to the DTAUS character set (See ToDta(string, bool)). During this conversion lower case characters are converted to upper case characters and any characters that are not in the DTAUS character set are replaced by dot characters.

PayeePayerName2

Optional second line of payee/payer name.

public string PayeePayerName2 { get; set; }

Property Value

string

The payee/payer name can consist of up to two lines with up to MaxLineLength (currently always 27) characters each. If a second line is used, it is stored in this property. The first line is stored in the PayeePayerName1 property. The second line is optional and therefore may be set to a null value.

When the remittance is transmitted or converted into DTAUS format, the characters of this property may be converted to the DTAUS character set (See ToDta(string, bool)). During this conversion lower case characters are converted to upper case characters and any characters that are not in the DTAUS character set are replaced by dot characters.

PaymtPurpose

The remittance text information.

public string[] PaymtPurpose { get; set; }

Property Value

string[]

For a domestic money transfer the payment purpose text can consist of up to MaxPaymtPurposeLines (currently always 14) lines with up to MaxLineLength (currently always 27) characters on each line. It can also be null, but usually isn't.

The payment purpose text is stored as a string array with a maximum length of MaxPaymtPurposeLines. Each string in the array represents a payment purpose line, which may be an empty string.

When the remittance is transmitted or converted into DTAUS format, the characters of this property may be converted to the DTAUS character set (See ToDta(string, bool)). During this conversion lower case characters are converted to upper case characters and any characters that are not in the DTAUS character set are replaced by dot characters.

ScheduledDate

Optional date when this remittance shall be executed.

public SwiftDate ScheduledDate { get; set; }

Property Value

SwiftDate

This may be any date, even a past date. Past dates can be used to model historical remittance objects. If this is a null date, which it is by default, then this remittance is not scheduled for a partcular date.

TextKey

Two digit text key of this remittance.

public string TextKey { get; set; }

Property Value

string

The text key is defined by the DTAUS specification. It always consists of exactly two digits. The text key is a required field of any remittance and therefore cannot be set to a null value. However, it can be null immediately after construction of an empty FinRemitt instance.

Exceptions

ArgumentException

An attempt was made to set a string that did not contain two digits.

TextKeyExt

Three digit text key extension of this remittance.

public string TextKeyExt { get; set; }

Property Value

string

The text key extension is defined by the DTAUS specification. It consists of exactly three digits. The text key extension is optional and may be null. Logically a null value is equivalent to three zeroes (000). The text key extension cannot be set to anything but null or a string with exactly three digits.

Exceptions

ArgumentException

An attempt was made to set a string that did not contain three digits.

Methods

FromSegment(FinSegment, bool)

Extract all remittance data from the given standard remittance segment.

public void FromSegment(FinSegment aSegment, bool fWithSubAcct)

Parameters

aSegment FinSegment

Segment that provides the remittance data. This must not be null.

fWithSubAcct bool

Indicates if the segment contains subaccount information.

ReadXml(XmlReader)

Reads this remittance from a FinTS 4.0 format XML stream.

public override void ReadXml(XmlReader aXmlReader)

Parameters

aXmlReader XmlReader

Remarks

This method does not expect a root element. It only reads the sequence of elements from <OrderingCustAcct> through <OrderID>. Only elements that are found will replace the current value of the corresponding fields. Other fields remain untouched.

Exceptions

ArgumentNullException

The parameter aXmlReader was null.

WriteXml(XmlWriter)

Writes this remittance as a FinTS 4.0 XML formatted stream.

public override void WriteXml(XmlWriter aXmlWriter)

Parameters

aXmlWriter XmlWriter

Remarks

This method does not write a root element. It only writes the elements <OrderingCustAcct> through <OrderID>. Any null fields will be omitted from the output. Empty strings are written as empty XML elements.

Exceptions

ArgumentNullException

The parameter aXmlWriter was null.