Class FinDtaBuilder
Simple utility class for easy building of German DTA files and records.
Inherited Members
Namespace: Subsembly.FinTS
Assembly: Subsembly.FinTS.Core.dll
Syntax
public class FinDtaBuilder : FinDtaBase
Constructors
FinDtaBuilder(Int32, Int32, Boolean)
Contructs a FinDtaBuilder instance with a suggested initial capacity.
Declaration
public FinDtaBuilder(int nCapacity, int nHandbookVersion, bool fWithUmlaut)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | nCapacity | The suggested initial capacity. This should be chosen according to the expected resulting data size. |
System.Int32 | nHandbookVersion | Obsolete and ignored. |
System.Boolean | fWithUmlaut | If |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | The parameter nCapacity or nHandbookVersion is less than zero. |
Properties
Size
Provides the byte size of the DTA data collected so far.
Declaration
public int Size { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
AppendRecordA(FinAcct, FinDtaBase.DtausType, DateTime, String, DateTime)
Declaration
public void AppendRecordA(FinAcct aOrderingCustAcct, FinDtaBase.DtausType nDtausType, DateTime tBuildDate, string sReferenceNo, DateTime tScheduleDate)
Parameters
Type | Name | Description |
---|---|---|
FinAcct | aOrderingCustAcct | The ordering customer account that is submitting the generated DTAUS file. The property HolderName may contain the account holder name to be inserted into the DTAUS record A. If it is not provided, then UNBEKANNT will be used as the ordering customer name. |
FinDtaBase.DtausType | nDtausType | The type of DTAUS file to generate. |
System.DateTime | tBuildDate | |
System.String | sReferenceNo | Optional reference number to be included. Must consist of digits only and must not
be longer than 10 characters. May be |
System.DateTime | tScheduleDate | Schduled execution date. For immediate execution the exact same value as the tBuildDate shall be given. |
AppendRecordC(FinRemitt, String)
Declaration
public void AppendRecordC(FinRemitt aRemitt, string sCustNumber)
Parameters
Type | Name | Description |
---|---|---|
FinRemitt | aRemitt | Complete remittance data. Must include a holder name of the ordering customer account. |
System.String | sCustNumber | The complete optional customer number for field C6. This may only contain digits
and must not be longer than 13 characters. May be |
Remarks
If the parameter sCustNumber is null
, then the new property
DtausCustNumber will be used to set the field C6. If this
property is null
, too, then field C6 will contain all zeroes.
AppendRecordE()
Adds the final DTAUS record E.
Declaration
public void AppendRecordE()
Remarks
The required check values are taken from the current values of the properties TotalValue, TotalCount, AcctNoSum, and BankCodeSum.
AppendRecordQ(FinAcct, SwiftTextLines, DateTime, Int32, DateTime)
Appends a complete DTAZV record Q to this DTA data buffer.
Declaration
public void AppendRecordQ(FinAcct aOrderingCustAcct, SwiftTextLines aOrderingCustName, DateTime tBuildDate, int nDailySeqNo, DateTime tScheduleDate)
Parameters
Type | Name | Description |
---|---|---|
FinAcct | aOrderingCustAcct | The ordering customer account for which the DTAZV is built. |
SwiftTextLines | aOrderingCustName | The name of the ordering customer, perhaps including the address in additional
lines. This must not be |
System.DateTime | tBuildDate | |
System.Int32 | nDailySeqNo | |
System.DateTime | tScheduleDate |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aOrderingCustAcct or sOrderingCustName was |
System.ArgumentException | The parameter sOrderingCustName was an empty string, or a required property of the given aOrderingCustAcct was not set. |
AppendRecordT(FinIntRemitt, DateTime)
Appends a complete DTAZV record T for a simple international remittance.
Declaration
public void AppendRecordT(FinIntRemitt aRemitt, DateTime tScheduleDate)
Parameters
Type | Name | Description |
---|---|---|
FinIntRemitt | aRemitt | International remittance data. This must contain valid data, e.g.
IsValid must be |
System.DateTime | tScheduleDate |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aRemitt was |
System.ArgumentException | The given FinIntRemitt was not a valid. |
AppendRecordZ()
Adds the final DTAZV record Z.
Declaration
public void AppendRecordZ()
Remarks
The required check values are taken from the current values of the properties TotalValue and TotalCount.
GenerateDTAUS(FinRemitt, FinDtaBase.DtausType)
Generates a complete DTAUS from a single remittance.
Declaration
public static FinDtaBuilder GenerateDTAUS(FinRemitt aRemitt, FinDtaBase.DtausType nDtausType)
Parameters
Type | Name | Description |
---|---|---|
FinRemitt | aRemitt | Complete remittance data. Must include a holder name of the ordering customer account. It also supplies the reference number for field A10 through its DtausReferenceNumber property. |
FinDtaBase.DtausType | nDtausType | The type of DTAUS file to generate. |
Returns
Type | Description |
---|---|
FinDtaBuilder |
GenerateDTAUS(FinRemitt[], FinDtaBase.DtausType, DateTime)
Generates a complete DTAUS.
Declaration
public static FinDtaBuilder GenerateDTAUS(FinRemitt[] vRemitts, FinDtaBase.DtausType nDtausType, DateTime tScheduleDate)
Parameters
Type | Name | Description |
---|---|---|
FinRemitt[] | vRemitts | Array of FinRemitt instances that provide the data for the C records of the DTAUS. All remittances must have the same OrderingCustAcct. The first remittance also supplies the reference number for field A10 through its DtausReferenceNumber property. |
FinDtaBase.DtausType | nDtausType | |
System.DateTime | tScheduleDate | The schedule date to indicate in record A. |
Returns
Type | Description |
---|---|
FinDtaBuilder |
Remarks
This method creates a single logical file with a single A record, followed by multiple C records and a final E record.
GenerateDTAZV(FinIntRemitt, DateTime, Int32)
Generates a complete DTAZV from a single international remittance.
Declaration
public static FinDtaBuilder GenerateDTAZV(FinIntRemitt aRemitt, DateTime tScheduleDate, int nDailySeqNo)
Parameters
Type | Name | Description |
---|---|---|
FinIntRemitt | aRemitt | The international remittance data to generate a DTAZV from. |
System.DateTime | tScheduleDate | The schedule date of the international remittance. |
System.Int32 | nDailySeqNo | The daily sequence number to put into field Q7. This must be in the range from zero to 99. |
Returns
Type | Description |
---|---|
FinDtaBuilder | A new FinDtaBuilder instance that holds the complete DTAZV including a header record Q, a single remittance record T, and a final record Z. The returned DTAZV will not contain notification records. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aRemitt was |
GenerateDTAZV(FinIntRemitt, Int32)
Generates a complete DTAZV from a single international remittance.
Declaration
public static FinDtaBuilder GenerateDTAZV(FinIntRemitt aRemitt, int nDailySeqNo)
Parameters
Type | Name | Description |
---|---|---|
FinIntRemitt | aRemitt | The international remittance data to generate a DTAZV from. |
System.Int32 | nDailySeqNo | The daily sequence number to put into field Q7. This must be in the range from zero to 99. |
Returns
Type | Description |
---|---|
FinDtaBuilder | A new FinDtaBuilder instance that holds the complete DTAZV including a header record Q, a single remittance record T, and a final record Z. The returned DTAZV will not contain notification records. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aRemitt was |
GenerateDTAZV(FinIntRemitt[], DateTime, Int32)
Generates a complete DTAZV from multiple international remittance.
Declaration
public static FinDtaBuilder GenerateDTAZV(FinIntRemitt[] vRemitts, DateTime tScheduleDate, int nDailySeqNo)
Parameters
Type | Name | Description |
---|---|---|
FinIntRemitt[] | vRemitts | The data of at least one international remittance. |
System.DateTime | tScheduleDate | The schedule date of the international remittance. |
System.Int32 | nDailySeqNo | The daily sequence number to put into field Q7. This must be in the range from zero to 99. |
Returns
Type | Description |
---|---|
FinDtaBuilder | A new FinDtaBuilder instance that holds the complete DTAZV including a header record Q, at least one remittance record T, and a final record Z. The returned DTAZV will not contain notification records. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter vRemitts was |
System.ArgumentException | vRemitts was an empty array. |
System.ArgumentException | One of the elements of vRemitts was |
ToBytes()
Convert the collected DTA data to a byte array.
Declaration
public byte[] ToBytes()
Returns
Type | Description |
---|---|
System.Byte[] | This method returns the complete collected data as a DTA conforming byte array. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
WriteDTAUS(String, FinRemitt[], FinDtaBase.DtausType, DateTime)
Creates or overwrites a file with a DTAUS file.
Declaration
public static void WriteDTAUS(string sFileName, FinRemitt[] vRemitts, FinDtaBase.DtausType nDtausType, DateTime tScheduleDate)
Parameters
Type | Name | Description |
---|---|---|
System.String | sFileName | THe file to create or overwrite. |
FinRemitt[] | vRemitts | Array of FinRemitt instances that provide the data for the C records of the file. All remittances must have the same OrderingCustAcct. |
FinDtaBase.DtausType | nDtausType | |
System.DateTime | tScheduleDate | The schedule date to indicate in record A. |
Remarks
This method creates a single logical file with a single A record, followed by multiple C records and a final E record.