Class SepaDummyAccount
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
aAccountSepaAccountThe account details of the account for which this class shall produce dummy data. Must not be
nulland must have a valid Currency code.
Exceptions
Fields
ALTERNATE_ACCT_NO
public const string ALTERNATE_ACCT_NO = "9999999998"
Field Value
BUSINESS_ACCT_NO
public const string BUSINESS_ACCT_NO = "9999999997"
Field Value
DEFAULT_ACCT_CURRENCY
public const string DEFAULT_ACCT_CURRENCY = "EUR"
Field Value
MAGIC_ACCT_NO
public const string MAGIC_ACCT_NO = "9999999999"
Field Value
MAGIC_CARD_NO
public const string MAGIC_CARD_NO = "2720999999999996"
Field Value
SUBSEMBLY_ACCTHOLDER
Default value for ProduceBankAccount(string, string, string, string, string).
public const string SUBSEMBLY_ACCTHOLDER = "Karin Schulz"
Field Value
SUBSEMBLY_BANKCODE
Default value for ProduceBankAccount(string, string, string, string, string).
public const string SUBSEMBLY_BANKCODE = "99000354"
Field Value
SUBSEMBLY_BIC
Default value for ProduceBankAccount(string, string, string, string, string).
public const string SUBSEMBLY_BIC = "SUBSDEM0000"
Field Value
SUBSEMBLY_CARDHOLDER
Default value for ProduceCardAccount(string, string, string).
public const string SUBSEMBLY_CARDHOLDER = "Karin Schulz"
Field Value
SUBSEMBLY_VATID
Default value for ProduceBankAccount(string, string, string, string, string).
public const string SUBSEMBLY_VATID = "DE999999999"
Field Value
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
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
CreditLimit
This limit is included as the CreditLineAmount in all balances generated for this dummy account.
public decimal CreditLimit { get; set; }
Property Value
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
tDateDateTimeThe entry date for which to compute and produce the closing balance.
nTypeSepaBalanceTypeOptional 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
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
sGermanAcctNostringMandatory domestic account number with up to 10 digits length.
sBankCodestringMandatory "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".
sBICstringMandatory BIC of the bank. This must be a syntactically correct BIC that contains the country code "DE".
sCurrencyCodestringMandatory valid account currency code.
sAcctHolderNamestringOptional name of the account owner. Must not be longer than MaxNmLen characters.
Returns
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
tFromDateDateTimeThe 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 equaltToDate.tToDateDateTimeThe 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 equaltFromDate.aMessageInfoSepaMessageInfoOptional 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
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
tFromDateDateTimeThe 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 equaltToDate.tToDateDateTimeThe 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 equaltFromDate.
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
ProduceBankToCustomerDebitCreditNotification(DateTime, DateTime, SepaMessageInfo)
public SepaDocument[] ProduceBankToCustomerDebitCreditNotification(DateTime tFromDate, DateTime tToDate, SepaMessageInfo aMessageInfo = null)
Parameters
tFromDateDateTimetToDateDateTimeaMessageInfoSepaMessageInfo
Returns
ProduceBankToCustomerDebitCreditNotificationStatement(string)
public SepaStatement ProduceBankToCustomerDebitCreditNotificationStatement(string sBatchID)
Parameters
sBatchIDstring
Returns
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
tFromDateDateTimeThe 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 equaltToDateand also less or equalDateTime.Today.tToDateDateTimeThe 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 equaltFromDateand also less or equalDateTime.Today.nElctrncSeqNbintThe Electronic Sequence Number is mandatory for CAMT.053 statements. Must not be zero or negative.
aMessageInfoSepaMessageInfoOptional 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
Exceptions
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
tFromDateDateTimeThe 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 equaltToDateand also less or equalDateTime.Today.tToDateDateTimeThe 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 equaltFromDateand also less or equalDateTime.Today.nElctrncSeqNbintThe 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
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
sPANstringThe primary account number of the credit card.
sCurrencyCodestringsCardHolderNamestring
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
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
vEntriesICollection<SepaStatementEntry>Destination collection that shall receive the entries produced. This must not be
null. Entries are added at the end of this collection.tFromDateDateTimeThe 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 equaltToDate.tToDateDateTimeThe 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 equaltFromDate.
Returns
- int
Returns the number of entries added to
vEntries.