Class SepaPartyIdentification
A generic SEPA party identification (initiator, debtor, creditor, etc.).
public sealed class SepaPartyIdentification : SepaObject, ISepaNameAndAddress
- Inheritance
-
SepaPartyIdentification
- Implements
- Inherited Members
- Extension Methods
Remarks
Currently this class primarily consists of a Name and a BIC property. However, it is likely that this class will be extended with postal address and other properties in the future.
Other SEPA object embed instances of the SepaPartyIdentification as needed. Please refer to the documentation of these other SEPA objects to learn which properties of the SepaPartyIdentification shall be set.
Constructors
SepaPartyIdentification(string, Fields, Fields)
Constructor.
public SepaPartyIdentification(string sTagName, SepaPartyIdentification.Fields nSupportedFields, SepaPartyIdentification.Fields nRequiredFields = Fields.None)
Parameters
sTagNamestringThe local name of the XML element tag to be used when reading or writing this object in XML format.
nSupportedFieldsSepaPartyIdentification.FieldsFields that may occur in an instance of this party identfication.
nRequiredFieldsSepaPartyIdentification.FieldsFields that must occur in an instance of this party identfication. If this is None, then the entire element is considered to be optional. All fields in included in
nRequiredFieldsmust also be included innSupportedFields.
Remarks
An application usually does not need to create its own SepaPartyIdentification instances, but just uses the instances provided by other SEPA objects.
Properties
BIC
The BIC of an organisational party.
public SepaBIC BIC { get; set; }
Property Value
Remarks
Setting this value to a non-null BIC will implicitly set the PartyChoice to OrgId.
CreditorSchemeIdentification
Identifier of the creditor (CI).
public string CreditorSchemeIdentification { get; set; }
Property Value
Remarks
Optional creditor identifier (Gläubiger ID), if the party is a creditor. Must
only occur in a related agent Creditor in a
SepaTransactionDetails instance. Must be null in all other
instances.
Setting this property will replace the complete OtherIdentifications collection with a single SepaOtherId containing the given Creditor ID. In addition the PartyChoice will be set to PrvtId.
Setting this property to null or an empty string will just clear the
OtherIdentifications collection.
IsEmpty
Indicates if any supported property of this instance has been set at all.
public override bool IsEmpty { get; }
Property Value
Name
Name of the party.
public string Name { get; set; }
Property Value
Remarks
Only latin characters should be used. It is up to the caller to ensure that the provided string contains only characters accepted by the recipient of the SEPA document.
Exceptions
- ArgumentException
An attempt was made to set a string longer than 70 characters.
OtherIdentification
Shortcut to the first entry of OtherIdentifications.
[Obsolete]
public SepaOtherId OtherIdentification { get; }
Property Value
Remarks
This property shall no longer be used. In order to get, set or add SepaOtherIds, please use the OtherIdentifications collection.
If the OtherIdentifications collection is empty, then accessing this property will add an empty SepaOtherId instance to it and return it.
OtherIdentifications
Some other party identifications.
public SepaOtherIds OtherIdentifications { get; }
Property Value
Remarks
This is the complete collection of all Othr elements contained in
either the OrgId, or the PrvtId child element.
PartyChoice
Selects whether this SepaPartyIdentification identifies an organisation, or a private individual.
public SepaPartyIdentification.Choice PartyChoice { get; set; }
Property Value
Remarks
Based on this choice the element will either have an OrgId, or a
PrvtId child element.
PostalAddress
Postal address.
public SepaPostalAddress PostalAddress { get; }
Property Value
Methods
Clear()
public override void Clear()
OnReadXml(XmlReader, SepaMessageInfo)
protected override void OnReadXml(XmlReader aXmlReader, SepaMessageInfo aMessageInfo)
Parameters
aXmlReaderXmlReaderaMessageInfoSepaMessageInfo
OnValidate(ICollection<SepaException>, string)
protected override void OnValidate(ICollection<SepaException> vErrors, string sPath)
Parameters
vErrorsICollection<SepaException>sPathstring
OnWriteXml(XmlWriter, SepaMessageInfo)
protected override void OnWriteXml(XmlWriter aXmlWriter, SepaMessageInfo aMessageInfo)
Parameters
aXmlWriterXmlWriteraMessageInfoSepaMessageInfo