Class SepaDummyAccount

Namespace
Subsembly.Sepa
Assembly
Subsembly.Sepa.dll

Helper class that can be used to generate CAMT data for a dummy test account.

public class SepaDummyAccount
Inheritance
SepaDummyAccount
Inherited Members

Remarks

The statement entries generated for the dummy account always have the status BOOK if they have a past entry date, and have the status PDNG if they have an entry date of Today or later.

Constructors

SepaDummyAccount(SepaAccount)

public SepaDummyAccount(SepaAccount aAccount)

Parameters

aAccount SepaAccount

The account details of the account for which this class shall produce dummy data. Must not be null and must have a valid Currency code.

Exceptions

ArgumentNullException
ArgumentException
NotSupportedException

Fields

ALTERNATE_ACCT_NO

public const string ALTERNATE_ACCT_NO = "9999999998"

Field Value

string

BUSINESS_ACCT_NO

public const string BUSINESS_ACCT_NO = "9999999997"

Field Value

string

DEFAULT_ACCT_CURRENCY

public const string DEFAULT_ACCT_CURRENCY = "EUR"

Field Value

string

MAGIC_ACCT_NO

public const string MAGIC_ACCT_NO = "9999999999"

Field Value

string

MAGIC_CARD_NO

public const string MAGIC_CARD_NO = "2720999999999996"

Field Value

string

SUBSEMBLY_ACCTHOLDER

public const string SUBSEMBLY_ACCTHOLDER = "Karin Schulz"

Field Value

string

SUBSEMBLY_BANKCODE

public const string SUBSEMBLY_BANKCODE = "99000354"

Field Value

string

SUBSEMBLY_BIC

public const string SUBSEMBLY_BIC = "SUBSDEM0000"

Field Value

string

SUBSEMBLY_CARDHOLDER

public const string SUBSEMBLY_CARDHOLDER = "Karin Schulz"

Field Value

string

SUBSEMBLY_VATID

public const string SUBSEMBLY_VATID = "DE999999999"

Field Value

string

Remarks

TODO: This dummy VAT ID probably has a wrong check digit. Should be changed to a VAT ID with a correct check digit.

Properties

Account

The SepaAccount that was passed to the ctor.

public SepaAccount Account { get; }

Property Value

SepaAccount

AdditionalStmtInformation

This information is included in the AdditionalInformation property of the statement generated by ProduceBankToCustomerStatementStatement(DateTime, DateTime, int).

public string AdditionalStmtInformation { get; set; }

Property Value

string

CreditLimit

This limit is included as the CreditLineAmount in all balances generated for this dummy account.

public decimal CreditLimit { get; set; }

Property Value

decimal

Methods

ProduceBalance(DateTime, SepaBalanceType)

Computes and produces the closing day balance for the given entry date.

public SepaBalance ProduceBalance(DateTime tDate, SepaBalanceType nType = SepaBalanceType.ClosingBooked)

Parameters

tDate DateTime

The entry date for which to compute and produce the closing balance.

nType SepaBalanceType

Optional balance type. The default is ClosingBooked. Chosing a different balance type does not change the computed balance value. Regardless of the balance type, this method always computes and returns the closing day balance of the given date.

Returns

SepaBalance

ProduceBankAccount(string, string, string, string, string)

Produces a fully initialized SepaAccount instance for a German bank account.

public static SepaAccount ProduceBankAccount(string sGermanAcctNo = "9999999999", string sBankCode = "99000354", string sBIC = "SUBSDEM0000", string sCurrencyCode = "EUR", string sAcctHolderName = "Karin Schulz")

Parameters

sGermanAcctNo string

Mandatory domestic account number with up to 10 digits length.

sBankCode string

Mandatory "Bankleitzahl" with exactly eight digits. To allow test bank codes, this is not checked to be a valid "Bankleitzahl" and may start with any digit, including "0" and "9".

sBIC string

Mandatory BIC of the bank. This must be a syntactically correct BIC that contains the country code "DE".

sCurrencyCode string

Mandatory valid account currency code.

sAcctHolderName string

Optional name of the account owner. Must not be longer than MaxNmLen characters.

Returns

SepaAccount

ProduceBankToCustomerAccountReport()

Produces a current CAMT 052 account report using the current CAMT 052 version.

public SepaDocument ProduceBankToCustomerAccountReport()

Returns

SepaDocument

Returns a new SepaDocument that contains a single SepaStatement with statement entries from Today and the following three days. If there are no statement entries in this range, then an empty SepaStatement is contained. The returned statement does not contain any balance in Balances.

ProduceBankToCustomerAccountReport(DateTime, DateTime, SepaMessageInfo)

Produces a dummy CAMT 052 account report for any date range.

public SepaDocument ProduceBankToCustomerAccountReport(DateTime tFromDate, DateTime tToDate, SepaMessageInfo aMessageInfo = null)

Parameters

tFromDate DateTime

The entry date of the first date that shall be included in the returned statement data. This must not be DateTime.MinValue. This must be less or equal tToDate.

tToDate DateTime

The entry date of the last date that shall be included in the returned statement data. This must not be DateTime.MinValue. This must be greater or equal tFromDate.

aMessageInfo SepaMessageInfo

Optional specification of the CAMT message version that shall be created. If this is null, then the currently state-of-the-art message version will be used. This must have the MessageType BankToCustomerAccountReport.

Returns

SepaDocument

Returns a new SepaDocument that contains a single SepaStatement that contains all the statement entries from the requested date range. If there are no statement entries in the requested range, then an empty SepaStatement is contained. The returned statement does not contain any balance in Balances.

Exceptions

ArgumentNullException
ArgumentException

ProduceBankToCustomerAccountReportStatement(DateTime, DateTime)

Produces a dummy CAMT 052 account report for any past, current or future date range.

public SepaStatement ProduceBankToCustomerAccountReportStatement(DateTime tFromDate, DateTime tToDate)

Parameters

tFromDate DateTime

The entry date of the first date that shall be included in the returned statement data. This must not be DateTime.MinValue. This must be less or equal tToDate.

tToDate DateTime

The entry date of the last date that shall be included in the returned statement data. This must not be DateTime.MinValue. This must be greater or equal tFromDate.

Returns

SepaStatement

Returns a new SepaStatement configured as a "Bank to Customer Account Report" that contains all the statement entries from the requested date range. If there are no statement entries in the requested range, then an empty SepaStatement is returned. The returned statement does not contain any balance in Balances.

Exceptions

ArgumentException

ProduceBankToCustomerDebitCreditNotification(DateTime, DateTime, SepaMessageInfo)

public SepaDocument[] ProduceBankToCustomerDebitCreditNotification(DateTime tFromDate, DateTime tToDate, SepaMessageInfo aMessageInfo = null)

Parameters

tFromDate DateTime
tToDate DateTime
aMessageInfo SepaMessageInfo

Returns

SepaDocument[]

ProduceBankToCustomerDebitCreditNotificationStatement(string)

public SepaStatement ProduceBankToCustomerDebitCreditNotificationStatement(string sBatchID)

Parameters

sBatchID string

Returns

SepaStatement

ProduceBankToCustomerStatement(DateTime, DateTime, int, SepaMessageInfo)

Produces a dummy CAMT 053 statement for any past date range.

public SepaDocument ProduceBankToCustomerStatement(DateTime tFromDate, DateTime tToDate, int nElctrncSeqNb, SepaMessageInfo aMessageInfo = null)

Parameters

tFromDate DateTime

The booking date of the first date that shall be included in the returned statement data. This must not be DateTime.MinValue. This must be less or equal tToDate and also less or equal DateTime.Today.

tToDate DateTime

The booking date of the last date that shall be included in the returned statement data. This must not be DateTime.MinValue. This must be greater or equal tFromDate and also less or equal DateTime.Today.

nElctrncSeqNb int

The Electronic Sequence Number is mandatory for CAMT.053 statements. Must not be zero or negative.

aMessageInfo SepaMessageInfo

Optional specification of the CAMT message version that shall be created. If this is null, then the currently state-of-the-art message version will be used. This must have the MessageType BankToCustomerStatement.

Returns

SepaDocument

Exceptions

ArgumentNullException
ArgumentException
ArgumentOutOfRangeException

ProduceBankToCustomerStatementStatement(DateTime, DateTime, int)

Produces a dummy CAMT 053 statement for any past date range.

public SepaStatement ProduceBankToCustomerStatementStatement(DateTime tFromDate, DateTime tToDate, int nElctrncSeqNb)

Parameters

tFromDate DateTime

The booking date of the first date that shall be included in the returned statement data. This must not be DateTime.MinValue. This must be less or equal tToDate and also less or equal DateTime.Today.

tToDate DateTime

The booking date of the last date that shall be included in the returned statement data. This must not be DateTime.MinValue. This must be greater or equal tFromDate and also less or equal DateTime.Today.

nElctrncSeqNb int

The Electronic Sequence Number is mandatory for CAMT.053 statements. Must not be zero or negative.

Returns

SepaStatement

Always returns a SepaStatement, even if it does not contain any statement entries. The returned statement always contains two balances of type PreviouslyClosedBooked and ClosingBooked.

Exceptions

ArgumentException
ArgumentOutOfRangeException

ProduceCardAccount(string, string, string)

Produces an artificial SepaAccount instance that represents a credit card account.

public static SepaAccount ProduceCardAccount(string sPAN = "2720999999999996", string sCurrencyCode = "EUR", string sCardHolderName = "Karin Schulz")

Parameters

sPAN string

The primary account number of the credit card.

sCurrencyCode string
sCardHolderName string

Returns

SepaAccount

The returned SepaAccount is ISO 20022 conforming, but it is not conforming to the rules for German CAMT documents.

ProduceClosingBalance()

Computes and produces the current closing day balance for this account.

public SepaBalance ProduceClosingBalance()

Returns

SepaBalance

ProduceEntries(ICollection<SepaStatementEntry>, DateTime, DateTime)

Produces and adds dummy entries for the given date range.

public int ProduceEntries(ICollection<SepaStatementEntry> vEntries, DateTime tFromDate, DateTime tToDate)

Parameters

vEntries ICollection<SepaStatementEntry>

Destination collection that shall receive the entries produced. This must not be null. Entries are added at the end of this collection.

tFromDate DateTime

The entry date of the first date that shall be included in the returned data. This must not be DateTime.MinValue. This must be less or equal tToDate.

tToDate DateTime

The entry date of the last date that shall be included in the returned data. This must not be DateTime.MinValue. This must be greater or equal tFromDate.

Returns

int

Returns the number of entries added to vEntries.

Exceptions

ArgumentNullException
ArgumentException