Class SepaAmount
public sealed class SepaAmount : SepaObject
  - Inheritance
 - 
      
      
      SepaAmount
 
- Inherited Members
 
Constructors
SepaAmount()
The default constructor creates an element with
TagName "Amt",
SepaAmountCreditDebitIndicatorConstraint Optional,
and IsMandatory as false.
public SepaAmount()
  SepaAmount(string, SepaAmountCreditDebitIndicatorConstraint)
public SepaAmount(string sTagName, SepaAmountCreditDebitIndicatorConstraint nCdtDbtIndConstraint)
  Parameters
sTagNamestringnCdtDbtIndConstraintSepaAmountCreditDebitIndicatorConstraint
SepaAmount(string, SepaAmountCreditDebitIndicatorConstraint, bool)
public SepaAmount(string sTagName, SepaAmountCreditDebitIndicatorConstraint nCdtDbtIndConstraint, bool fIsMandatory)
  Parameters
sTagNamestringThe XML tag that shall be used for writing the amount element. Usually this is "Amt", but can be different.
nCdtDbtIndConstraintSepaAmountCreditDebitIndicatorConstraintIndicates whether the CreditDebitIndicator must be set to either Credit or Debit for a valid amount.
fIsMandatorybool
Fields
CRDT
The CreditDebitIndicatorCode for credits (positive amounts).
public const string CRDT = "CRDT"
  Field Value
DBIT
The CreditDebitIndicatorCode for debits (negative amounts).
public const string DBIT = "DBIT"
  Field Value
Properties
Amount
The decimal amount.
public decimal Amount { get; set; }
  Property Value
- decimal
 For SEPA payments the value must be in the range from 0.00 through 999,999,999.99. The initial value is zero.
Exceptions
- ArgumentOutOfRangeException
 An attempt was made to set a negative value.
CreditDebitIndicator
Credit debit indicator of the amount.
public SepaCreditDebitIndicator CreditDebitIndicator { get; set; }
  Property Value
Remarks
The value Undefined indicates that no credit
debit indicator was given. The initial value of this property is
Undefined. Whenever this is set to either
Credit or
Debit, then a CdtDbtInd XML element
will be written.
Exceptions
- InvalidOperationException
 Is thrown if this method is invoked on an instance that does not support the CreditDebitIndicator.
- See Also
 
CreditDebitIndicatorCode
Credit debit indicator as a four letter code string.
public string CreditDebitIndicatorCode { get; set; }
  Property Value
- string
 This is "CRDT" for Credit, "DBIT" for Debit, or
nullfor Undefined. Setting an empty string will also set the CreditDebitIndicator to Undefined.
Exceptions
- ArgumentException
 An attempt was made to set a string value that was neither "CRDT" nor "DBIT".
- InvalidOperationException
 Is thrown if this method is invoked on an instance that does not support the CreditDebitIndicator.
- See Also
 
Currency
The currency code of the amount. According to the XSD the use of this attribute is required.
public string Currency { get; set; }
  Property Value
- string
 The initial value of this property is
null. It is possible to set this property tonullif you want to just reset this amount.
Exceptions
- ArgumentException
 An attempt was made to set a value that is not a syntactically valid currency code.
IsDebit
Convenience property that indicates whether CreditDebitIndicator is Debit.
public bool IsDebit { get; }
  Property Value
IsEmpty
public override bool IsEmpty { get; }
  Property Value
Value
Provides the signed value of the amount.
public decimal Value { get; }
  Property Value
- decimal
 If the CreditDebitIndicator is Debit, then minus Amount is provided. In any other case simply the Amount is provided.
Methods
Clear()
public override void Clear()
  Clone()
public SepaAmount Clone()
  Returns
OnReadObjectXml(XmlReader, SepaMessageInfo, string)
protected override bool OnReadObjectXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo, string sTagName)
  Parameters
aXmlReaderXmlReaderaMessageInfoSepaMessageInfosTagNamestring
Returns
Exceptions
OnReadXml(XmlReader, SepaMessageInfo)
protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo)
  Parameters
aXmlReaderXmlReaderaMessageInfoSepaMessageInfo
Exceptions
OnValidate(ICollection<SepaException>, string)
protected override void OnValidate(ICollection<SepaException> vErrors, string sPath)
  Parameters
vErrorsICollection<SepaException>sPathstring
OnWriteObjectXml(XmlWriter, SepaMessageInfo, string)
protected override void OnWriteObjectXml(XmlWriter aXmlWriter, SepaMessageInfo aMessageInfo, string sTagName)
  Parameters
aXmlWriterXmlWriteraMessageInfoSepaMessageInfosTagNamestring
OnWriteXml(XmlWriter, SepaMessageInfo)
protected override void OnWriteXml(XmlWriter aXmlWriter, SepaMessageInfo aMessageInfo)
  Parameters
aXmlWriterXmlWriteraMessageInfoSepaMessageInfo
Exceptions
SetValue(decimal)
Sets the Amount and CreditDebitIndicator from a signed decimal value.
public void SetValue(decimal nValue)
  Parameters
nValuedecimalSigned decimal value. The Amount will be set to the unsigned absolute amount of this value.
Remarks
If this instance does support the CreditDebitIndicator, then this method will update it according to the sign of the value. If the value is negative, then the CreditDebitIndicator will be set to Debit. If the value is zero or positive, then then the CreditDebitIndicator will be set to Credit.
- See Also
 
ToString()
public override string ToString()