Class EbicsServiceMap
Catalog of well known EBICS services. This is required for conversion between an EBICS Service element and an EBICS OrderType.
public class EbicsServiceMap
- Inheritance
-
EbicsServiceMap
- Inherited Members
Constructors
EbicsServiceMap()
Creates an empty EbicsServiceMap.
public EbicsServiceMap()
EbicsServiceMap(EbicsServiceMapRecord[])
Creates a EbicsServiceMap that initially contains the given records.
public EbicsServiceMap(EbicsServiceMapRecord[] vRecords)
Parameters
vRecordsEbicsServiceMapRecord[]
Exceptions
- ArgumentNullException
- ArgumentException
The given array of records did contain a duplicate entry for the same OrderType or, one of the records in the array was not correctly initialized.
Properties
Default
public static EbicsServiceMap Default { get; }
Property Value
Methods
AddRecord(EbicsServiceMapRecord, bool)
Add or replace a EbicsServiceMapRecord in this map.
public bool AddRecord(EbicsServiceMapRecord aRecord, bool fReplace = false)
Parameters
aRecordEbicsServiceMapRecordfReplaceboolIf
true, then an existing entry with the same OrderType will be replaced with the given entry. Iffalse, then an existing entry will not be replaced and the given record will not be added in that case.
Returns
- bool
If the given record was actually added as a new entry, then
trueis returned. If the entry already exists, thenfalseis returned, even when it was replaced.
Exceptions
CreateService(string)
public EbicsService CreateService(string sOrderType)
Parameters
sOrderTypestringThe classic order type for which a corresponding EBICS 3.0 Service shall be created. May be
null.
Returns
- EbicsService
If the given
sOrderTypeisnull, or cannot be mapped to a Service, thennullwill be returned. Otherwise a new EbicsService instance that matches the classic order type, will be returned.
Exceptions
- ArgumentException
The parameter
sOrderTypewas not a valid order type specification.
CreateServiceMap(string)
Creates a new instance of a EbicsServiceMap, initialized with the well known entries for a given country.
public static EbicsServiceMap CreateServiceMap(string sCountryCode)
Parameters
sCountryCodestringThe ISO country code of the country to get a EbicsServiceMap for. Must not be
null.
Returns
- EbicsServiceMap
If there is a well known EbicsServiceMap for the requested country, then it is returned. If no service map is known for that country, then
nullis returned.
Remarks
Currently there are well known service maps for Germany (DE), Switzerland (CH),
and Austria (AT). For any other country codes the value null will be
returned.
Exceptions
- ArgumentNullException
- ArgumentException
The parameter
sCountryCodewas not a valid ISO country code.
FindByOrderType(string)
Tries to find a service mapping for a given order type.
public EbicsServiceMapRecord FindByOrderType(string sOrderType)
Parameters
sOrderTypestring
Returns
- EbicsServiceMapRecord
If a mapping was found, then it is returned. If there is no mapping known for the given order type, then
nullis returned.
Exceptions
- ArgumentNullException
The parameter
sOrderTypewasnull.- ArgumentException
The parameter
sOrderTypewas not a valid order type specification.
FindByService(EbicsService)
Tries to find the EbicsServiceMapRecord for a EbicsService instance.
public EbicsServiceMapRecord FindByService(EbicsService aService)
Parameters
aServiceEbicsServiceThe EbicsService element for which to find a record entry.
Returns
- EbicsServiceMapRecord
If a mapping was found, then it is returned. If there is no mapping known for the given service, then
nullis returned.
Exceptions
- ArgumentNullException
The parameter
aServicewasnull.
GetOrderType(EbicsService)
Tries to get the order type for a BTD or BTU service.
public string GetOrderType(EbicsService aService)
Parameters
aServiceEbicsServiceThe EbicsService for which to determine the order type. This may be
null, in which casenullwill be returned.
Returns
- string
Returns the classic order type that matches the given service, or
null, if the given service cannot be resolved to a known classic order type.
Exceptions
- ArgumentNullException
The parameter
aServicewasnull.
GetOrderType(string, EbicsService)
Tries to get the order type for an AdminOrderType and Service.
public string GetOrderType(string sAdminOrderType, EbicsService aService)
Parameters
sAdminOrderTypestringThe AdminOrderType associated with the optional
aService. This must not benull. This is usually BTD or BTU, but may be any other order type.aServiceEbicsServiceIf the
sAdminOrderTypeis BTD or BTU, then the Service element must be provided in order to derive the classic OrderType.